Return to BSD News archive
#! rnews 2533 bsd Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!nntp.coast.net!news2.acs.oakland.edu!news.tacom.army.mil!ulowell.uml.edu!wang!news.kei.com!news.mathworks.com!uunet!in3.uu.net!news.cybercomm.net!usenet From: "Glen" <gi143@cybercomm.net> Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Printing problem with Okidata OLE600. Date: 14 Sep 1996 12:57:51 GMT Organization: CyberComm Online Services Lines: 63 Message-ID: <01bba329$e0324c80$7fc4abc7@glen> References: <01bb9e93$2739c860$9bc4abc7@glen> <3234727C.6028@www.play-hookey.com> <01bb9f94$4e7e5920$7ac4abc7@glen> <3235D81C.47E6@www.play-hookey.com> <01bba11e$bf0cd280$81c4abc7@glen> <32385AD7.1632@www.play-hookey.com> NNTP-Posting-Host: sl-031.sl.cybercomm.net X-Newsreader: Microsoft Internet News 4.70.1155 Thank you Ken for all your help!!!!!!!!! Ken Bigelow <kbigelow@www.play-hookey.com> wrote in article <32385AD7.1632@www.play-hookey.com>... > Glen wrote: > > > > This is what I can up with! > > > > #include <stdio.h> > > > > main () > > > > { > > int c; > > while (( c = getchar()) != EOF) > > { > > if ( c == '/n') > > putchar(13); > > putchar(c); > > } > > return (0); > > } > > > > My new problem!!!!!!!!! This is my filter file. > > > > /bin/cat | theaboveprogram > Now I don't know what to do. How do I write > > this filter file. I have tryed all different things. > > > > Thank You. > > > > I do know a little C. Just don't know how to imply it well. > > > > > Close. Define c as a char, not an int. Also, I'm not sure whether or not > this routine will actually see an EOF marker, and I don't think it needs > one. Remember that here we are dealing with characters being sent to a > printer. The printer won't recognize an EOF or know what to do with it; > it will just print what it gets. The filter program just gets into the > character stream and plays with it a little. > > As for using it as a filter, refer to the Handbook. The section on > Printing is quite detailed, and includes setting up the filter file and > defining it properly in /etc/printcap. Once you've defined it, the > filter program will be automatically piped between the source and the > printer. > > Above all, be willing to tweak it a bit and waste a few sheets of paper > in testing. > > I hope this helps! > > -- > Ken > > Are you interested in | > byte-sized education | http://www.play-hookey.com > over the Internet? | >