Re: [netatalk-admins] papd problem - never closes


Subject: Re: [netatalk-admins] papd problem - never closes
From: Les Klein (les@psgroup.cix.co.uk)
Date: Thu May 28 1998 - 03:56:55 EDT


Dear Robert
>
> Greetings again,
>
> Sorry, I didn't read too carefully ...
>
> > ..... Also, papd never closes PAP properly if the very
> > last character in a PostScript file is Ctrl-D ('\004'). Looking at the
> > source code for 1.4b2 it looks like netatalk/papd can not work with
binary
> > files. It does however look quite easy to correct. Can anyone
confirm/deny
> > this or say if they have already modified the code before I have a go?
> > Thanks
> >
> > Les Klein.
>
> With the source code for netatalk 1.4b2 comes the man pages for papd.
> It describes the problem you mention and how to call/start pap so
> it can work arround these problems.
>
Thanks for the reply but my man pages do not mention this problem at all.
The man page states that papd accepts a full 8 bits and that the printer
needs to be configured for this. (If you like I will send you my copy of
papd.8 from the 1.4b2 sources).
Well, my printer is configured for that and it prints binary PostScript
files OK.
The problem is with papd. Specifically the markline() function exits when
either a \r or a \n is found but then in magics.c, lp.c and header.c you
will find "*stop = '\n'". I.e. it blindly overwrites a \r with a \n and
corrupts binary data.
It seems to me that markline() is also the reason that papd fails if the
very last character sent is a '\004'. This is because markline() is still
looking for a \r or \n and one never comes.

Regards

Les.



This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:32:45 EST