summaryrefslogtreecommitdiff
path: root/net/netatalk
diff options
context:
space:
mode:
authorchristos <christos>2000-01-18 01:09:25 +0000
committerchristos <christos>2000-01-18 01:09:25 +0000
commit8f9a7e1b0a0568bc1d3b119e5777c48798a11f7e (patch)
tree8a7ebb2365214616b61a8033d4484a15327b798a /net/netatalk
parentc6a36f45e10f8487eab070f3eb4271c0b361b269 (diff)
downloadpkgsrc-8f9a7e1b0a0568bc1d3b119e5777c48798a11f7e.tar.gz
How did papd ever work?
- make printcap parsing understand comments. - pass missing argument to function. XXX: mental note: ppd files are \r not \n separated. We need to fix the parsing so we don't have to convert them to unix files before they work.
Diffstat (limited to 'net/netatalk')
-rw-r--r--net/netatalk/patches/patch-bf61
1 files changed, 61 insertions, 0 deletions
diff --git a/net/netatalk/patches/patch-bf b/net/netatalk/patches/patch-bf
new file mode 100644
index 00000000000..99adf75d6cf
--- /dev/null
+++ b/net/netatalk/patches/patch-bf
@@ -0,0 +1,61 @@
+$NetBSD: patch-bf,v 1.1 2000/01/18 01:09:25 christos Exp $
+
+--- etc/papd/printcap.c.orig Sat Aug 16 19:20:28 1997
++++ etc/papd/printcap.c Mon Jan 17 19:40:24 2000
+@@ -159,6 +159,7 @@
+ char ibuf[BUFSIZ];
+ char *cp2;
+ int tf;
++ int skip;
+
+ hopcount = 0;
+ tbuf = bp;
+@@ -177,7 +178,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);
+ }
+@@ -191,6 +192,7 @@
+ #endif
+ if (tf < 0)
+ return (-1);
++ skip = 0;
+ for (;;) {
+ cp = bp;
+ for (;;) {
+@@ -204,12 +206,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;
+@@ -223,7 +233,7 @@
+ */
+ if (tnamatch(name)) {
+ close(tf);
+- return(tnchktc());
++ return(tnchktc(cap));
+ }
+ }
+ }