Newsgroups: comp.sources.unix From: sir-alan!ispin!lbartz@iuvax.cs.indiana.edu (Larry Bartz) Subject: v25i122: Indianapolis Standard Printer Interface for Networked printers, Part11/15 Sender: sources-moderator@pa.dec.com Approved: vixie@pa.dec.com Submitted-By: sir-alan!ispin!lbartz@iuvax.cs.indiana.edu (Larry Bartz) Posting-Number: Volume 25, Issue 122 Archive-Name: ispin/part11 #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'ISPIN/src/ISPIN.c.ae' <<'END_OF_FILE' X X my_error(TIMEOUT); X } X X sprintf(banline, X "* SYSTEM: %-8.8s%*s*\n", sysnam.nodename,36," "); X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X /* Wait a long time for the write to */ X /* happen. This allows user time to */ X /* change the ribbon, clear paper */ X /* jam, or replenish paper supply. */ X /* On the other hand, we won't wait */ X /* forever. */ X alarm(WRITEWAIT); X X write(out_file, banline, strlen(banline)); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(TIMEOUT); X } X X sprintf(banline, X "* USER: %-8.8s%*s*\n",from,36," "); X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X /* Wait a long time for the write to */ X /* happen. This allows user time to */ X /* change the ribbon, clear paper */ X /* jam, or replenish paper supply. */ X /* On the other hand, we won't wait */ X /* forever. */ X alarm(WRITEWAIT); X X write(out_file, banline, strlen(banline)); X X X count1 = alarm(0); X X if(time_out == 1) X { X my_error(TIMEOUT); X } X X alarm((unsigned)count1); X X /* wait here for the output to drain */ X ioctl(out_file, TCSBRK, 1); X X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(TIMEOUT); X } X X sprintf(banline, X "* PRINTER: %s%*s*\n", dest, 44 - strlen(dest), " "); X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X /* Wait a long time for the write to */ X /* happen. This allows user time to */ X /* change the ribbon, clear paper */ X /* jam, or replenish paper supply. */ X /* On the other hand, we won't wait */ X /* forever. */ X alarm(WRITEWAIT); X X write(out_file, banline, strlen(banline)); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* disconnected. */ X X my_error(TIMEOUT); X } X X#ifdef NQ X sprintf(banline, X "* FILE: %s%*s*\n", fyle, 44 - strlen(fyle), " "); X#else X sprintf(banline, X "* FILE: %s%*s*\n", fyles[numfiles], 44 - strlen(fyles[numfiles]), " "); X#endif X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X /* Wait a long time for the write to */ X /* happen. This allows user time to */ X /* change the ribbon, clear paper */ X /* jam, or replenish paper supply. */ X /* On the other hand, we won't wait */ X /* forever. */ X alarm(WRITEWAIT); X X write(out_file, banline, strlen(banline)); X X X count1 = alarm(0); X X if(time_out == 1) X { X my_error(TIMEOUT); X } X X alarm((unsigned)count1); X X /* wait here for the output to drain */ X ioctl(out_file, TCSBRK, 1); X X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(TIMEOUT); X } X X sprintf(banline, X "* TIME: %-24.24s%*s*\n", time_str,20," "); X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X /* Wait a long time for the write to */ X /* happen. This allows user time to */ X /* change the ribbon, clear paper */ X /* jam, or replenish paper supply. */ X /* On the other hand, we won't wait */ X /* forever. */ X alarm(WRITEWAIT); X X write(out_file, banline, strlen(banline)); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(TIMEOUT); X } X X sprintf(banline, X "* *\n"); X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X /* Wait a long time for the write to */ X /* happen. This allows user time to */ X /* change the ribbon, clear paper */ X /* jam, or replenish paper supply. */ X /* On the other hand, we won't wait */ X /* forever. */ X alarm(WRITEWAIT); X X write(out_file, banline, strlen(banline)); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(TIMEOUT); X } X X sprintf(banline,"**********************************************************\n\f"); X X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X /* Wait a long time for the write to */ X /* happen. This allows user time to */ X /* change the ribbon, clear paper */ X /* jam, or replenish paper supply. */ X /* On the other hand, we won't wait */ X /* forever. */ X alarm(WRITEWAIT); X X write(out_file, banline, strlen(banline)); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(TIMEOUT); X } X X return(0); X} X X Xopen_fifos() X{ X /* allocate storage for our file status buffer */ X stat_buf = (struct stat *) calloc(1,sizeof(struct stat)); X X /* what is the name of the FIFO I talk through? */ X strcpy(outFIFO,FIFOdir); X strcat(outFIFO,"IQUEUER"); X /* does it exist? */ X if(stat(outFIFO,stat_buf)) X { X /* if not, */ X /* die horribly */ X /* need to send out an error msg */ X /* format an error message */ X time(&tloc); X nowtime = (struct tm *)localtime(&tloc); X time_str = asctime(nowtime); X X sprintf(errmsg,"ISPIN: printer %s: stat %s: %s.\n",dest,outFIFO,sys_errlist[errno]); X sprintf(errmsg2," USER: %s\n",from); X strcat(errmsg,errmsg2); X if(usr_addr) X { X sprintf(errmsg2," ADDR: %s\n",usr_strng); X strcat(errmsg,errmsg2); X } X#ifdef NQ X sprintf(errmsg2," FILE: %s\n",fyle); X#else X sprintf(errmsg2," FILE: %s\n",fyles[0]); X#endif X strcat(errmsg,errmsg2); X sprintf(errmsg2," TIME: %s\n",time_str); X strcat(errmsg,errmsg2); X X /* call the error routine, never come back */ X my_error(NONOTIFY); X X } X X X /* An open for writing will block unless a process (IQUEUER) has the file */ X /* open for reading. If we open it for reading ourselves, our write open */ X /* will not block. Let's write to the FIFO whether IQUEUER is listening or */ X /* not. That way, if IQUEUER happens to be dead, our message will wait in */ X /* the pipe until a new IQUEUER becomes available to read it; a stab at */ X /* robustness. Or is that robusticity? */ X X /* this open just tricks the FIFO into staying open for our write */ X if((outropn = open(outFIFO,O_RDWR | O_NDELAY)) == -1) X { X /* need to send out an error msg */ X /* format an error message */ X time(&tloc); X nowtime = (struct tm *)localtime(&tloc); X time_str = asctime(nowtime); X X sprintf(errmsg,"ISPIN: printer %s: open %s: %s.\n",dest,outFIFO,sys_errlist[errno]); X sprintf(errmsg2," USER: %s\n",from); X strcat(errmsg,errmsg2); X if(usr_addr) X { X sprintf(errmsg2," ADDR: %s\n",usr_strng); X strcat(errmsg,errmsg2); X } X#ifdef NQ X sprintf(errmsg2," FILE: %s\n",fyle); X#else X sprintf(errmsg2," FILE: %s\n",fyles[0]); X#endif X strcat(errmsg,errmsg2); X sprintf(errmsg2," TIME: %s\n",time_str); X strcat(errmsg,errmsg2); X X /* call the error routine, never come back */ X my_error(NONOTIFY); X X } X X /* this open of the FIFO is the one we'll use for our write */ X if((outfifo = open(outFIFO,O_WRONLY)) == -1) X { X /* need to send out an error msg */ X /* format an error message */ X time(&tloc); X nowtime = (struct tm *)localtime(&tloc); X time_str = asctime(nowtime); X X sprintf(errmsg,"ISPIN: printer %s: open %s: %s.\n",dest,outFIFO,sys_errlist[errno]); X sprintf(errmsg2," USER: %s\n",from); X strcat(errmsg,errmsg2); X if(usr_addr) X { X sprintf(errmsg2," ADDR: %s\n",usr_strng); X strcat(errmsg,errmsg2); X } X#ifdef NQ X sprintf(errmsg2," FILE: %s\n",fyle); X#else X sprintf(errmsg2," FILE: %s\n",fyles[0]); X#endif X strcat(errmsg,errmsg2); X sprintf(errmsg2," TIME: %s\n",time_str); X strcat(errmsg,errmsg2); X X /* call the error routine, never come back */ X my_error(NONOTIFY); X X } X X X X /* what is the name of the FIFO I listen through? */ X strcpy(inFIFO,FIFOdir); X strcat(inFIFO,dest); X /* does it exist? */ X if(stat(inFIFO,stat_buf)) X { X /* if not, */ X /* create it if we can */ X if(mknod(inFIFO,0010666,1) != SUCCESS) X { X /* It didn't exist and we couldn't create it either. */ X /* All hope is lost. */ X /* need to send out an error msg */ X /* format an error message */ X time(&tloc); X nowtime = (struct tm *)localtime(&tloc); X time_str = asctime(nowtime); X X sprintf(errmsg,"ISPIN: printer %s: mknod %s: %s.\n",dest,inFIFO,sys_errlist[errno]); X sprintf(errmsg2," USER: %s\n",from); X strcat(errmsg,errmsg2); X if(usr_addr) X { X sprintf(errmsg2," ADDR: %s\n",usr_strng); X strcat(errmsg,errmsg2); X } X#ifdef NQ X sprintf(errmsg2," FILE: %s\n",fyle); X#else X sprintf(errmsg2," FILE: %s\n",fyles[0]); X#endif X strcat(errmsg,errmsg2); X sprintf(errmsg2," TIME: %s\n",time_str); X strcat(errmsg,errmsg2); X X /* call the error routine, never come back */ X my_error(SYSERR); X X } X stat(inFIFO,stat_buf); X } X X /* capture the inode number of my FIFO */ X /* this is the only means we have to identify ourselves to IQUEUER */ X req_msg.my_fifo.intgr = (int)stat_buf->st_ino; X X /* our incoming pipe exists, so open it for reading */ X /* first, do a "false" open for read/write so we can hold it open */ X /* for writing. */ X if((inropn = open(inFIFO,O_RDWR | O_NDELAY)) == -1) X { X /* need to send out an error msg */ X /* format an error message */ X time(&tloc); X nowtime = (struct tm *)localtime(&tloc); X time_str = asctime(nowtime); X X sprintf(errmsg,"ISPIN: printer %s: open %s: %s.\n",dest,inFIFO,sys_errlist[errno]); X sprintf(errmsg2," USER: %s\n",from); X strcat(errmsg,errmsg2); X if(usr_addr) X { X sprintf(errmsg2," ADDR: %s\n",usr_strng); X strcat(errmsg,errmsg2); X } X#ifdef NQ X sprintf(errmsg2," FILE: %s\n",fyle); X#else X sprintf(errmsg2," FILE: %s\n",fyles[0]); X#endif X strcat(errmsg,errmsg2); X sprintf(errmsg2," TIME: %s\n",time_str); X strcat(errmsg,errmsg2); X X /* call the error routine, never come back */ X my_error(SYSERR); X X } X X X /* finally, do a "real" open for reading for */ X /* an opportunity to do "blocking" reads. */ X if((infifo = open(inFIFO,O_RDONLY)) == -1) X { X /* need to send out an error msg */ X /* format an error message */ X time(&tloc); X nowtime = (struct tm *)localtime(&tloc); X time_str = asctime(nowtime); X X sprintf(errmsg,"ISPIN: printer %s: open %s: %s.\n",dest,inFIFO,sys_errlist[errno]); X sprintf(errmsg2," USER: %s\n",from); X strcat(errmsg,errmsg2); X if(usr_addr) X { X sprintf(errmsg2," ADDR: %s\n",usr_strng); X strcat(errmsg,errmsg2); X } X#ifdef NQ X sprintf(errmsg2," FILE: %s\n",fyle); X#else X sprintf(errmsg2," FILE: %s\n",fyles[0]); X#endif X strcat(errmsg,errmsg2); X sprintf(errmsg2," TIME: %s\n",time_str); X strcat(errmsg,errmsg2); X X /* call the error routine, never come back */ X my_error(SYSERR); X X } X} X X Xwrite_net(msg) Xchar *msg; X{ X int count, wr_count, checkit, octal, oct_cnt; X char nul = '\0'; /* a NULL */ X char bs = '\010'; /* a backspace */ X char nl = '\012'; /* a newline */ X char cr = '\015'; /* a carriage return */ X char sp = '\040'; /* a space */ X char ht = '\011'; /* a tab */ X char ff = '\f'; /* 'C' formfeed character */ X char eot = '\004'; /* an EOT */ X char del = '\177'; /* a DELETE */ X char esc = '\033'; /* an ESCAPE */ X char octal_char[2]; /* place to put converted octal representation */ X X count = wr_count = checkit = 0; X X#ifdef DEBUG X /* format an error message */ X time(&tloc); X nowtime = (struct tm *)localtime(&tloc); X time_str = asctime(nowtime); X sprintf(errmsg,"ISPIN: write_net msg = [%s]\n",msg); X strcat(errmsg," "); X strcat(errmsg,time_str); X strcat(errmsg,"\n"); X if((logfile = fopen(LOGFILE,"a+")) != NULL) X { X fprintf(logfile,errmsg); X fclose(logfile); X } X#endif X X X checkit = msg[count++]; X X while(msg[count - 1] != '\0') X { X X#ifdef DEBUG X /* format an error message */ X time(&tloc); X nowtime = (struct tm *)localtime(&tloc); X time_str = asctime(nowtime); X sprintf(errmsg,"ISPIN: write_net msg char = [%c]\n",checkit); X strcat(errmsg," "); X strcat(errmsg,time_str); X strcat(errmsg,"\n"); X if((logfile = fopen(LOGFILE,"a+")) != NULL) X { X fprintf(logfile,errmsg); X fclose(logfile); X } X#endif X X switch(checkit) X { X case '\134': X /* the backslash char */ X checkit = msg[count++]; X if(msg[count - 1] != '\0') X { X switch(checkit) X { X case 'N': X /* send a NULL */ X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X alarm(NETWAIT); X X wr_count += write(out_file,&nul,1); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(NET_TIME); X } X X break; X case 'b': X /* send a backspace */ X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X alarm(NETWAIT); X X wr_count += write(out_file,&bs,1); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(NET_TIME); X } X X break; X case 'd': X /* delay 3 seconds */ X alarm(0); X sleep(3); X break; X case 'p': X /* pause a second */ X alarm(0); X sleep(1); X break; X case 'w': X /* wait 10 seconds */ X alarm(0); X sleep(10); X break; X case 'L': X /* loaf 30 seconds */ X alarm(0); X sleep(30); X break; X case 'n': X /* send a newline */ X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X alarm(NETWAIT); X X wr_count += write(out_file,&nl,1); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(NET_TIME); X } X X break; X case 'r': X /* send a carriage return */ X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X alarm(NETWAIT); X X wr_count += write(out_file,&cr,1); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(NET_TIME); X } X X break; X case 's': X /* send a space */ X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X alarm(NETWAIT); X X wr_count += write(out_file,&sp,1); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(NET_TIME); X } X X break; X case 't': X /* send a tab */ X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X alarm(NETWAIT); X X wr_count += write(out_file,&ht,1); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(NET_TIME); X } X X break; X case 'f': X /* send a formfeed */ X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X alarm(NETWAIT); X X wr_count += write(out_file,&ff,1); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(NET_TIME); X } X X break; X case 'K': X /* send BREAK */ X X /* start out with clean buffers */ X ioctl(out_file, TCFLSH, 2); X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X alarm(NETWAIT); X X /* wait for the output to drain */ X ioctl(out_file, TCSBRK, 0); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(NET_TIME); X } X X break; X case 'E': X /* send two EOT and newline pairs */ X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X alarm(NETWAIT); X X wr_count += write(out_file,&eot,1); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(NET_TIME); X } X X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X alarm(NETWAIT); X X wr_count += write(out_file,&nl,1); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(NET_TIME); X } X X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X alarm(NETWAIT); X X wr_count += write(out_file,&eot,1); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(NET_TIME); X } X X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X alarm(NETWAIT); X X wr_count += write(out_file,&nl,1); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(NET_TIME); X } X X break; X case 'D': X /* send a DELETE */ X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X alarm(NETWAIT); X X wr_count += write(out_file,&del,1); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(NET_TIME); X } X X break; X case 'e': X /* send an ESCAPE */ X X /* set up timeout for write */ X signal(SIGALRM, my_error); X X /* assume no timeout */ X time_out = 0; X X alarm(NETWAIT); X X wr_count += write(out_file,&esc,1); X X /* turn off the alarm clock */ X alarm(0); X X /* ignore alarm */ X signal(SIGALRM, SIG_IGN); X X if(time_out == 1) X { X /* We timed out on the write.*/ X /* Behave as though we were */ X /* disconnected. */ X X my_error(NET_TIME); X } X X break; X case 'U': X /* send the string supplied by the user */ X X /* just a flag to let us know we've been here */ X ++usr_addr; X X /* set up timeout for write */ X signal(SIGALRM, my_error); X END_OF_FILE if test 33854 -ne `wc -c <'ISPIN/src/ISPIN.c.ae'`; then echo shar: \"'ISPIN/src/ISPIN.c.ae'\" unpacked with wrong size! fi # end of 'ISPIN/src/ISPIN.c.ae' fi if test -f 'ISPIN/doc/COPY+WARR.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'ISPIN/doc/COPY+WARR.doc'\" else echo shar: Extracting \"'ISPIN/doc/COPY+WARR.doc'\" \(9934 characters\) sed "s/^X//" >'ISPIN/doc/COPY+WARR.doc' <<'END_OF_FILE' X X X GNU GENERAL PUBLIC LICENSE X Version 1, February 1989 X X Copyright (C) 1989 Free Software Foundation, Inc. X 675 Mass Ave, Cambridge, MA 02139, USA X Everyone is permitted to copy and distribute verbatim copies X of this license document, but changing it is not allowed. X X Preamble X X The license agreements of most software companies try to keep users Xat the mercy of those companies. By contrast, our General Public XLicense is intended to guarantee your freedom to share and change free Xsoftware--to make sure the software is free for all its users. The XGeneral Public License applies to the Free Software Foundation's Xsoftware and to any other program whose authors commit to using it. XYou can use it for your programs, too. X X When we speak of free software, we are referring to freedom, not Xprice. Specifically, the General Public License is designed to make Xsure that you have the freedom to give away or sell copies of free Xsoftware, that you receive source code or can get it if you want it, Xthat you can change the software or use pieces of it in new free Xprograms; and that you know you can do these things. X X To protect your rights, we need to make restrictions that forbid Xanyone to deny you these rights or to ask you to surrender the rights. XThese restrictions translate to certain responsibilities for you if you Xdistribute copies of the software, or if you modify it. X X For example, if you distribute copies of a such a program, whether Xgratis or for a fee, you must give the recipients all the rights that Xyou have. You must make sure that they, too, receive or can get the Xsource code. And you must tell them their rights. X X We protect your rights with two steps: (1) copyright the software, and X(2) offer you this license which gives you legal permission to copy, Xdistribute and/or modify the software. X X Also, for each author's protection and ours, we want to make certain Xthat everyone understands that there is no warranty for this free Xsoftware. If the software is modified by someone else and passed on, we Xwant its recipients to know that what they have is not the original, so Xthat any problems introduced by others will not reflect on the original Xauthors' reputations. X X The precise terms and conditions for copying, distribution and Xmodification follow. X X GNU GENERAL PUBLIC LICENSE X TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION X X 0. This License Agreement applies to any program or other work which Xcontains a notice placed by the copyright holder saying it may be Xdistributed under the terms of this General Public License. The X"Program", below, refers to any such program or work, and a "work based Xon the Program" means either the Program or any work containing the XProgram or a portion of it, either verbatim or with modifications. Each Xlicensee is addressed as "you". X X 1. You may copy and distribute verbatim copies of the Program's source Xcode as you receive it, in any medium, provided that you conspicuously and Xappropriately publish on each copy an appropriate copyright notice and Xdisclaimer of warranty; keep intact all the notices that refer to this XGeneral Public License and to the absence of any warranty; and give any Xother recipients of the Program a copy of this General Public License Xalong with the Program. You may charge a fee for the physical act of Xtransferring a copy. X X 2. You may modify your copy or copies of the Program or any portion of Xit, and copy and distribute such modifications under the terms of Paragraph X1 above, provided that you also do the following: X X a) cause the modified files to carry prominent notices stating that X you changed the files and the date of any change; and X X b) cause the whole of any work that you distribute or publish, that X in whole or in part contains the Program or any part thereof, either X with or without modifications, to be licensed at no charge to all X third parties under the terms of this General Public License (except X that you may choose to grant warranty protection to some or all X third parties, at your option). X X c) If the modified program normally reads commands interactively when X run, you must cause it, when started running for such interactive use X in the simplest and most usual way, to print or display an X announcement including an appropriate copyright notice and a notice X that there is no warranty (or else, saying that you provide a X warranty) and that users may redistribute the program under these X conditions, and telling the user how to view a copy of this General X Public License. X X d) You may charge a fee for the physical act of transferring a X copy, and you may at your option offer warranty protection in X exchange for a fee. X XMere aggregation of another independent work with the Program (or its Xderivative) on a volume of a storage or distribution medium does not bring Xthe other work under the scope of these terms. X X 3. You may copy and distribute the Program (or a portion or derivative of Xit, under Paragraph 2) in object code or executable form under the terms of XParagraphs 1 and 2 above provided that you also do one of the following: X X a) accompany it with the complete corresponding machine-readable X source code, which must be distributed under the terms of X Paragraphs 1 and 2 above; or, X X b) accompany it with a written offer, valid for at least three X years, to give any third party free (except for a nominal charge X for the cost of distribution) a complete machine-readable copy of the X corresponding source code, to be distributed under the terms of X Paragraphs 1 and 2 above; or, X X c) accompany it with the information you received as to where the X corresponding source code may be obtained. (This alternative is X allowed only for noncommercial distribution and only if you X received the program in object code or executable form alone.) X XSource code for a work means the preferred form of the work for making Xmodifications to it. For an executable file, complete source code means Xall the source code for all modules it contains; but, as a special Xexception, it need not include source code for modules which are standard Xlibraries that accompany the operating system on which the executable Xfile runs, or for standard header files or definitions files that Xaccompany that operating system. X X 4. You may not copy, modify, sublicense, distribute or transfer the XProgram except as expressly provided under this General Public License. XAny attempt otherwise to copy, modify, sublicense, distribute or transfer Xthe Program is void, and will automatically terminate your rights to use Xthe Program under this License. However, parties who have received Xcopies, or rights to use copies, from you under this General Public XLicense will not have their licenses terminated so long as such parties Xremain in full compliance. X X 5. By copying, distributing or modifying the Program (or any work based Xon the Program) you indicate your acceptance of this license to do so, Xand all its terms and conditions. X X 6. Each time you redistribute the Program (or any work based on the XProgram), the recipient automatically receives a license from the original Xlicensor to copy, distribute or modify the Program subject to these Xterms and conditions. You may not impose any further restrictions on the Xrecipients' exercise of the rights granted herein. X X 7. The Free Software Foundation may publish revised and/or new versions Xof the General Public License from time to time. Such new versions will Xbe similar in spirit to the present version, but may differ in detail to Xaddress new problems or concerns. X XEach version is given a distinguishing version number. If the Program Xspecifies a version number of the license which applies to it and "any Xlater version", you have the option of following the terms and conditions Xeither of that version or of any later version published by the Free XSoftware Foundation. If the Program does not specify a version number of Xthe license, you may choose any version ever published by the Free Software XFoundation. X X 8. If you wish to incorporate parts of the Program into other free Xprograms whose distribution conditions are different, write to the author Xto ask for permission. For software which is copyrighted by the Free XSoftware Foundation, write to the Free Software Foundation; we sometimes Xmake exceptions for this. Our decision will be guided by the two goals Xof preserving the free status of all derivatives of our free software and Xof promoting the sharing and reuse of software generally. X X NO WARRANTY X X 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY XFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN XOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES XPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED XOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF XMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS XTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE XPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, XREPAIR OR CORRECTION. X X 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING XWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR XREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, XINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING XOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED XTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY XYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER XPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE XPOSSIBILITY OF SUCH DAMAGES. X X END OF TERMS AND CONDITIONS X END_OF_FILE if test 9934 -ne `wc -c <'ISPIN/doc/COPY+WARR.doc'`; then echo shar: \"'ISPIN/doc/COPY+WARR.doc'\" unpacked with wrong size! fi # end of 'ISPIN/doc/COPY+WARR.doc' fi if test -f 'ISPIN/doc/OLD-DOCS/README.rel_1.1' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'ISPIN/doc/OLD-DOCS/README.rel_1.1'\" else echo shar: Extracting \"'ISPIN/doc/OLD-DOCS/README.rel_1.1'\" \(6834 characters\) sed "s/^X//" >'ISPIN/doc/OLD-DOCS/README.rel_1.1' <<'END_OF_FILE' X X X X date : June 30, 1989 X X to : X X from : Chief, Operations Branch, Information Systems Division X Indianapolis District Office X X subject: Indianapolis Standard Printer Interface (for Network printers) X ISPIN X production release 1 X X X X X *** *** *** *** *** *** INTRODUCTION *** *** *** *** *** *** *** *** X X This is the first version of the production release of ISPIN. X X June 30, 1989 marked approximately one year since ISPIN was just a X gleam in our eyes, and approx nine months since the first keystrokes X were struck in its development. Alpha site testing of ISPIN commenced X approx December 27, 1988. Beta site testing commenced approx Feb 14, X 1989. Ultimately, seven sites were actively involved in testing three X successive "beta" versions of the application. This is not experimental X software. X X ISPIN.rel_1 contains all of the functionality and features laid out X in our initial analysis and those which were identified and suggested X by those beta test sites which actively helped us test. Except for bug X fixes, this is the way the application is going to look and work. X We are not planning any added features, nor are we soliciting any X suggestions for added features. This application is simple, flexible, X robust, and adequately functional. We intend for it to remain stable. X X ISPIN has been successfully installed and tested on: X X Zilog Model 31 X Zilog Model 32 X Zilog Model 130 (Rev J OS) X AT&T 3B1 X Sequent Balance B8 X Pyramid 90x X IBM PC/AT with Intel 80386 CPU X (running XENIX) X Compaq with Intel 80286 CPU X (running XENIX) X X Except for conditional compile statements required to resolve the X differences between Zeus 3.21's nq/dqueuer and System V's lp, X the source code is the same for all target environments. X X X X *** *** *** *** *** *** THIS TRANSMITTAL *** *** *** *** *** *** *** X X The tape upon which we have transmitted the application was created X in cpio format. cd to a directory in which you want this release to X be written, then cpio -iudmvB < your_nine_track_drive X X The result of this cpio will be the creation of a directory named X ISPIN.rel_1.1. ISPIN.rel_1.1 will contain two subdirectories, namely X ISPI and ISPIN. X X X X *** *** *** *** *** *** ISPI subdirectory *** *** *** *** *** *** *** X X The ISPI directory contains the freshest version of our ISPI X application. ISPI is an application which serves as a FRONTEND X for the two queuer/spoolers. The ISPI application is fully self- X contained, with its own source code, documentation, etc. We sent X ISPI along because we have found it to be an extremely useful tool X to support the native queuer/spoolers. If you have any version of X ISPI previous to this one, please use this one as a replacement. The X ISPI included with this transmittal supersedes the ISPI which X accompanied the ISPIN.beta.3 release. X X ISPIN and ISPI are TWO SEPARATE AND DISTINCT APPLICATIONS. X X Neither depends upon the other for functionality. You may use ISPIN X without ISPI. You may use ISPI without ISPIN. X X X X *** *** *** *** *** *** ISPIN subdirectory *** *** *** *** *** *** *** X X ISPIN contains the source code, install documents, and install scripts X for the ISPIN application. The ISPIN application serves as a BACKEND X for either of two native queuer/spoolers, lp or dqueuer. We have X organized the directory ISPIN and its contents into subdirectories X using standard names "doc" (for documentation files), "h" (for header X files), "install" (where install scripts exist, and from which they X must be executed), "obj" (where the executables will be placed as X they are compiled), and "src" (where the source code resides). X X X X *** *** *** *** *** *** ISPIN documentation *** *** *** *** *** *** X X The documentation for this application is informal in style, and the X code is overflowing with comments. If you don't have time and inclin- X ation to read everything in the ISPIN.rel_1.1/ISPIN/doc directory, X X AT LEAST READ: X LPinstall.doc X NQinstall.doc X README.beta.3 X design X rtab X X X X X *** *** *** *** *** *** ISPIN installation *** *** *** *** *** *** *** X X If you are installing this application under ZEUS 3.21 and its X nq/xq/dqueuer queuer family, install per NQinstall.doc. X X If you are installing this application under System V UNIX and X the lp spooler, install per LPinstall.doc. X X X X X X *** *** *** *** *** *** FEEDBACK, please *** *** *** *** *** *** *** X X We are maintaining a list of sites to which we have sent ISPI/ISPIN X and of contact persons at those sites. Unless you tell us, however, X we will have no idea whether or not you actually use these applications X in production. Our expectation is that you will, but we will not X presume it. Please confirm installation and usage of ISPI/ISPIN. We X prefer written confirmation, but a phone call will do. Confirmed users X of ISPI/ISPIN will receive all subsequent update and informational X distributions. X X There is no bug-free software. Although the alpha site and beta site X testing has been extensive, we recognize the possibility of bugs which X have not yet been exposed. Please report them to us. We are committed X to supporting this application. X X If you install and use ISPI/ISPIN on hardware/software platforms which X are not listed in this memo, please let us know. This software is X intended to be portable, especially among machines which support a X System V UNIX environment. X X If you develop "rtab" entries which you feel others may find useful, X contact us. We'd like to be the clearinghouse for such information. X We haven't yet devised a mechanism for an ongoing distribution of X such information. But if supply and demand develop, we'll work it out X and let you know. X X X X X X Larry Bartz X X END_OF_FILE if test 6834 -ne `wc -c <'ISPIN/doc/OLD-DOCS/README.rel_1.1'`; then echo shar: \"'ISPIN/doc/OLD-DOCS/README.rel_1.1'\" unpacked with wrong size! fi # end of 'ISPIN/doc/OLD-DOCS/README.rel_1.1' fi if test -f 'ISPIN/misc/ISPIT.dr/rtab.entry' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'ISPIN/misc/ISPIT.dr/rtab.entry'\" else echo shar: Extracting \"'ISPIN/misc/ISPIT.dr/rtab.entry'\" \(522 characters\) sed "s/^X//" >'ISPIN/misc/ISPIT.dr/rtab.entry' <<'END_OF_FILE' X# This rtab entry is usable only for the ISPIT file transfer protocol. XINDY_5;/dev/tty000;19200;-L;-R;-Bcongestion;-Bremote dte;-Q\004\L\L\K\dclr\r\d;-DConnection cleared;-Dad>:;-Dogin:;ad>-\p\K\pclr\r\d\020\pclr\r\d-ad>;clr\r\r\d;ad>-\p\K\pclr\r\d\020\pclr\r\d-ad>;set recall=none\r\pset break-handling=send-break+recall\r\pset pad-flow=on\r\pset terminal-flow=on\r\p;ad>-\r\r\d-ad>;\pconnect\s00000099999999\r\d;Opened;\r\r\d;ogin:-\r\d-ogin:;ispit\r\d;assword:;notvalid\r\d\d;FILE?;\U\r\d\d;OK;\w;;; X#ispit to INDY_5 X# END_OF_FILE if test 522 -ne `wc -c <'ISPIN/misc/ISPIT.dr/rtab.entry'`; then echo shar: \"'ISPIN/misc/ISPIT.dr/rtab.entry'\" unpacked with wrong size! fi # end of 'ISPIN/misc/ISPIT.dr/rtab.entry' fi echo shar: End of archive 11 \(of 15\). cp /dev/null ark11isdone MISSING="" for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 15 archives. rm -f ark[1-9]isdone ark[1-9][0-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0