I'm switching to Linux. I have a C source terminal mode program that I use that does some printing. In windowz I just opened the PRN device with fopen() and output to that stream.

With Linux, I tried /dev/lp0 as the print device with fopen(). It worked as long I was root but that's not what I'm after. I'm searching for another way. I came across lpr and thought I could create a file from the program's output and pipe it to lpr. That is a modification to the source I'd like to avoid if possible. Is there an elegant solution? Any help appreciated, thanx.