f50888d9e3
Update to netatalk-asun-2.1.3nb3
61 lines
1.1 KiB
Text
61 lines
1.1 KiB
Text
$NetBSD: patch-ak,v 1.3 2000/08/15 14:48:23 abs Exp $
|
|
|
|
--- etc/papd/printcap.c.orig Fri May 30 01:27:35 1997
|
|
+++ etc/papd/printcap.c
|
|
@@ -158,6 +158,7 @@
|
|
register int i = 0, cnt = 0;
|
|
char ibuf[BUFSIZ];
|
|
int tf;
|
|
+ int skip;
|
|
|
|
hopcount = 0;
|
|
tbuf = bp;
|
|
@@ -176,7 +177,7 @@
|
|
cp2 = getenv("TERM");
|
|
if (cp2==(char *) 0 || strcmp(name,cp2)==0) {
|
|
strcpy(bp,cp);
|
|
- return(tnchktc());
|
|
+ return(tnchktc(cap));
|
|
} else {
|
|
tf = open(cap, 0);
|
|
}
|
|
@@ -190,6 +191,7 @@
|
|
#endif
|
|
if (tf < 0)
|
|
return (-1);
|
|
+ skip = 0;
|
|
for (;;) {
|
|
cp = bp;
|
|
for (;;) {
|
|
@@ -203,12 +205,20 @@
|
|
}
|
|
c = ibuf[i++];
|
|
if (c == '\n') {
|
|
- if (cp > bp && cp[-1] == '\\'){
|
|
+ if (!skip && cp > bp && cp[-1] == '\\'){
|
|
cp--;
|
|
continue;
|
|
}
|
|
- break;
|
|
+ skip = 0;
|
|
+ if (cp == bp)
|
|
+ continue;
|
|
+ else
|
|
+ break;
|
|
}
|
|
+ if (c == '#' && cp == bp)
|
|
+ skip++;
|
|
+ if (skip)
|
|
+ continue;
|
|
if (cp >= bp+BUFSIZ) {
|
|
write(2,"Termcap entry too long\n", 23);
|
|
break;
|
|
@@ -222,7 +232,7 @@
|
|
*/
|
|
if (tnamatch(name)) {
|
|
close(tf);
|
|
- return(tnchktc());
|
|
+ return(tnchktc(cap));
|
|
}
|
|
}
|
|
}
|