Subject: printer daemon and manpages

From: [email-masked]

> 
> Hi,
> [...]
> 
> I think you mean lf and lf+cr. Did you get my reply to your last posting?
> I think you simply have to putc(10,outfile), putc(13,outfile) when
> lf (10) occurs in the input stream, not (12).
that is it, now i understand.:)             
> 
> > There is no /dev/lp in my /dev direc. Is it your par device?
> > Or your filter? I have sent the source of the program (the crippled source:))
> > that writes to /dev/par. I did the test with |od -b with the programm
> 
> od is short for octal display, which means that the output is in octal
> bytes (-b). So don't get confused by the octal number 12, which is actually
> decimal 10.
is there a way to get bytes as decimal numbers? should hexdumb -e "_u" work?
> If you got my last posting, then I can't understand, what your problems
> are. Sorry, maybe I just didn't get your point.
*I* am sorry. *I* did not get the point. You are right with your 
statement that there occure only 10s in the input stream, i did not
understand this....
> 
>   Guenther
> 
> [email-masked], maeuschen@irc (will be back next week)
>
but there was another problem in my configuration:
i did not set the \ at the end of the second line of my printcap.
So my filter was never called. 
It works now more or less with the following program in /usr/bin:
filter.c:
#include <stdio.h>
main()
{
int a;
while((a=getchar())!=EOF)
	{
	if(a==10){putchar(10);a=13;};
	putchar(a);
	};
}

my printcap:

lp|local line printer:\
	:lp=/dev/par:sd=/var/spool/lpd:lf=/var/log/lpd-errs:\
	pw#80:sb:if=/usr/bin/filter:

of course, there are no parameters managed..

with this configuration there is a problem when executing e.g.
lpr -h filter.c   
i get
lpd[90]: lp: Daemon filter 'f' exited (255)

is this due to the uncomplete printer filter or is there another thing
wrong?
The printing seems to work...
Does bsd send the banner through the filter, too?

Another problem i want to manage is to set up the manpages with
the original bsd-man. I dont have a proper bash-man and so
wonder how i can write a script for doing the converting.
Here on our HP9000/735 with the Korn-shell the following works:
 
#!/bin/sh
for file in *.1
do
 new=`echo $file | sed -e 's/.1/.0/'` 
 man $file >$new
 echo $file
done

i did not get something similar to work...
ciao
Carsten
ps: my english is very bad, my german is sometimes better:) so
all german people, please write answers in german