From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,5e33afa27906d9d2 X-Google-Attributes: gid1164f8,public From: "Craig A. Lavender" Subject: Using filters with lpd Date: 1996/09/27 Message-ID: <324C66B9.50DE@scrtec.rtec.org>#1/1 X-Deja-AN: 185764159 content-type: text/plain; charset=us-ascii organization: KU Special Education mime-version: 1.0 newsgroups: comp.sys.dec x-mailer: Mozilla 3.0 (Macintosh; I; PPC) Hi, Since our building only has Apple Laserwriters, I am forced to write a print filter for our DEC Unix 3.2D machine to convert linefeeds to carriage-return-linefeeds. However, when I write the filter and place a reference to it in my printcap file, it doesn't seem to work (linefeeds are still linefeeds). When I reprogramm the filter to copy the incoming stream on stdin to /dev/console, nothing seems to enter the filter at all. My two questions are: 1) Does anyone know why this wouldn't work? I know I'm probably not providing enough info, but does anyone have any suggestions? 2) Why, if I know the filter is not sending anything through, does output still get sent to the printer? Below are copies of my filter program and my printcap entry: lf2crlf.c: -------- #include #define STRING_SIZE 501 int main() { char s[STRING_SIZE]; while (fgets(s, STRING_SIZE, stdin) != NULL) { int len = strlen(s); s[len-1] = '\0'; # get rid of trailing '\n' printf("%s\r\n", s); } } printcap: --------- # LaserWriter 16/600 PS in Dole 3090 lp|lp0|0|spedlab:\ :lf=/var/adm/lperr:\ :lp=:\ :of=/usr/lib/filters/lf2crlf:\ :rm=spedlab:\ :rp=spedlab:\ :sd=/var/spool/spedlab: Please respond to my email address below {instead of,in addition to} the list. Thanks in advance, Craig -- ---------------------------------------------------------------------- Craig A. Lavender craig@scrtec.rtec.org Technical Coordinator 913-864-0705 South Central R*TEC http://scrtec.rtec.org/ University of Kansas "I use tech to teach" ----------------------------------------------------------------------