Patch #: 16 Type: update Priority: high Modification: work around problems with laserwriter drivers > 5.2 Submitted: Dave Platt Archived: munnari.OZ.AU mac/cap.patches/cap60.patch016 Summary: add -N flag to stop new procset capture File: cap60/applications/lwsrv/lwsrv.c File: cap60/applications/lwsrv/simple.c *** applications/lwsrv/lwsrv.c.orig Wed May 8 00:24:33 1991 --- applications/lwsrv/lwsrv.c Sun May 26 19:19:48 1991 *************** *** 1,6 **** ! static char rcsid[] = "$Author: djh $ $Date: 1991/05/07 14:09:39 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/applications/lwsrv/RCS/lwsrv.c,v 2.5 1991/05/07 14:09:39 djh Exp djh $"; ! static char revision[] = "$Revision: 2.5 $"; /* * lwsrv - UNIX AppleTalk spooling program: act as a laserwriter --- 1,6 ---- ! static char rcsid[] = "$Author: djh $ $Date: 1991/05/26 09:19:28 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/applications/lwsrv/RCS/lwsrv.c,v 2.6 1991/05/26 09:19:28 djh Exp djh $"; ! static char revision[] = "$Revision: 2.6 $"; /* * lwsrv - UNIX AppleTalk spooling program: act as a laserwriter *************** *** 78,83 **** --- 78,84 ---- private int rflag = FALSE; /* remove print file */ private int hflag = TRUE; /* default to print banner */ private int singlefork = FALSE; + export int capture = TRUE; export PAPStatusRec statbuff; /* status buffer */ #ifdef PAGECOUNT export int pagecount; *************** *** 132,137 **** --- 133,139 ---- fprintf(stderr,"\t-l specifies a file to log the lwsrv session\n"); fprintf(stderr,"\t-e Allow an eexec to occur in a procset\n"); fprintf(stderr," warning: this may cause problems, use carefully\n"); + fprintf(stderr, "\t-N Turns off capturing of new procsets\n"); fprintf(stderr,"\t-r Will retain temp print file for inspection\n"); fprintf(stderr,"\t-h means to print without a banner page\n"); if (is_simple_dsc()) *************** *** 169,183 **** #ifndef LWSRV_AUFS_SECURITY #ifdef NeXT ! while ((c = getopt(argc,argv,"a:f:l:p:P:t:d:n:rehT:A:S:R")) != EOF) { #else NeXT ! while ((c = getopt(argc,argv,"a:f:l:p:P:t:d:n:rehT:A:S")) != EOF) { #endif NeXT #else LWSRV_AUFS_SECURITY #ifdef NeXT ! while ((c = getopt(argc,argv,"a:f:l:p:P:t:d:n:rehT:A:SX:R")) != EOF) { #else NeXT ! while ((c = getopt(argc,argv,"a:f:l:p:P:t:d:n:rehT:A:SX:")) != EOF) { #endif NeXT #endif LWSRV_AUFS_SECURITY switch (c) { --- 171,185 ---- #ifndef LWSRV_AUFS_SECURITY #ifdef NeXT ! while ((c = getopt(argc,argv,"a:f:l:p:P:t:d:n:rehNT:A:S:R")) != EOF) { #else NeXT ! while ((c = getopt(argc,argv,"a:f:l:p:P:t:d:n:rehNT:A:S")) != EOF) { #endif NeXT #else LWSRV_AUFS_SECURITY #ifdef NeXT ! while ((c = getopt(argc,argv,"a:f:l:p:P:t:d:n:rehNT:A:SX:R")) != EOF) { #else NeXT ! while ((c = getopt(argc,argv,"a:f:l:p:P:t:d:n:rehNT:A:SX:")) != EOF) { #endif NeXT #endif LWSRV_AUFS_SECURITY switch (c) { *************** *** 240,245 **** --- 242,250 ---- nextdpi = optarg; break; #endif NeXT + case 'N': + capture = FALSE; + break; case '?': /* illegal character */ usage(argv[0],NULL); /* usage and exit */ break; *** applications/lwsrv/simple.c.orig Tue May 7 19:20:50 1991 --- applications/lwsrv/simple.c Sun May 26 19:19:18 1991 *************** *** 1,6 **** ! static char rcsid[] = "$Author: djh $ $Date: 1991/05/07 09:20:28 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/applications/lwsrv/RCS/simple.c,v 2.3 1991/05/07 09:20:28 djh Exp djh $"; ! static char revision[] = "$Revision: 2.3 $"; /* * lwsrv - UNIX AppleTalk spooling program: act as a laserwriter --- 1,6 ---- ! static char rcsid[] = "$Author: djh $ $Date: 1991/05/26 09:18:44 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/applications/lwsrv/RCS/simple.c,v 2.4 1991/05/26 09:18:44 djh Exp djh $"; ! static char revision[] = "$Revision: 2.4 $"; /* * lwsrv - UNIX AppleTalk spooling program: act as a laserwriter *************** *** 486,491 **** --- 486,492 ---- int ltokval,tokval,echo; DictList *dl = NULL; /* current dictionary */ DictList *dlnew = NULL; /* new dictionary */ + extern int capture; #ifdef PAGECOUNT extern int pagecount; extern int pcopies; *************** *** 512,517 **** --- 513,522 ---- stripspaces(ts); /* clear off extra spaces */ if ((dl = GetProcSet(ts)) != NULL) { fprintf(stderr, "lwsrv: simple: procset %s already known\n", ts); + break; + } + if (!capture) { + echo = TRUE; /* pass unknown procsets through */ break; } sleep(1); /* raise odds of unique timestamp */ *** README.orig Sat May 18 19:34:30 1991 --- README Sat May 18 19:34:55 1991 *************** *** 3,9 **** (For use with AppleTalk/Ethernet bridge) o RELEASE NOTES ! o CAP Distribution 6.0, Patch Level 15, May 1991 Introduction ------------ --- 3,9 ---- (For use with AppleTalk/Ethernet bridge) o RELEASE NOTES ! o CAP Distribution 6.0, Patch Level 16, May 1991 Introduction ------------