Re: [9fans] how to print a program

2010-09-08 Thread Charles Forsyth
> It's probably time to move past "lp". They don't exist much anymore > in the real world. has anyone ported CUPS? i just wanted to check whether someone should be burnt at the stake.

Re: [9fans] how to print a program

2010-09-08 Thread Akshat
On Sep 8, 2010, at 12:08 AM, "Lawrence E. Bakst" wrote: It's probably time to move past "lp". They don't exist much anymore in the real world. Sorry, how is this formatting issue the fault of 'lp', exactly? ak

Re: [9fans] how to print a program

2010-09-08 Thread erik quanstrom
> cb has been a looser since I've known it, > which is longer than most. It often dumped core, > even back in the 70's. It's good in a pinch to turn > someone's "far out" indenting style back to K&R normal form. loose programs, loose women. each to his own vice. - erik

Re: [9fans] how to print a program

2010-09-08 Thread Lawrence E. Bakst
At 8:25 AM +0200 9/8/10, Rudolf Sykora wrote: >also, just note that cb doesn't always work even for c source: >running on /sys/src/cmd/page/gfx.c >produces crap... cb has been a looser since I've known it, which is longer than most. It often dumped core, even back in the 70's. It's good in a pinc

Re: [9fans] how to print a program

2010-09-08 Thread Federico G. Benavento
steve has a fold program which he used combined with pr to generate http://plan9.bell-labs.com/sources/contrib/steve/doc/kernel-june2k-a4.ps /n/sources/contrib/steve/rc/kernel.print /n/sources/contrib/steve/fold.tbz On Wed, Sep 8, 2010 at 8:45 AM, roger peppe wrote: > i've always used an ancient

Re: [9fans] how to print a program

2010-09-08 Thread roger peppe
i've always used an ancient version of a2ps for this, ported to plan 9 by fors...@terzerima.net. this does almost everything i want (in particular two-column landscape mode) with the exception that it doesn't grok utf-8. i'm sure charles will send you a copy if you wish. the current gnu version is

Re: [9fans] how to print a program

2010-09-07 Thread Rudolf Sykora
> Run it through cb before you print it and give cb a length argument. I > did basically this same thing just the other day. > > John also, just note that cb doesn't always work even for c source: running on /sys/src/cmd/page/gfx.c produces crap... thanks ruda

Re: [9fans] how to print a program

2010-09-07 Thread erik quanstrom
> (Is awk line length-limited?) you can test stuff like this yourself: ; dd -if /dev/zero -bs 8192 -count 10 | tr '\0' 'x' | awk '{print length($1)}' 10+0 records in 10+0 records out 81920 - erik

Re: [9fans] how to print a program

2010-09-07 Thread Rudolf Sykora
> Run it through cb before you print it and give cb a length argument. I > did basically this same thing just the other day. > > John ok. this will be enough for now, I hope. Nonetheless, generally, there may be not-c files present (other languages...; even in my case there is a .ps file, which I

Re: [9fans] how to print a program

2010-09-07 Thread erik quanstrom
> (btw. why > fmt <>afile > doesn't work?) sure it does. fmt <>file will open file for reading and writing on fd 0. fd 1 will be your terminal. if you want fd1 to be the same channel, you can add >[1=0], but this will not have the intended effect in this case. why is left as an exercise. - er

Re: [9fans] how to print a program

2010-09-07 Thread Rudolf Sykora
also, a nice feature of 'fmt' is that long lines are broken AND indented according to the start of the just-being-processed line; this is welcome... R On 7 September 2010 23:00, Rudolf Sykora wrote: > Hello, > > I want to 'print' the 'page' program, i.e. put /sys/src/cmd/page/* on paper. > I want

Re: [9fans] how to print a program

2010-09-07 Thread John Floren
On Tue, Sep 7, 2010 at 5:00 PM, Rudolf Sykora wrote: > Hello, > > I want to 'print' the 'page' program, i.e. put /sys/src/cmd/page/* on paper. > I want different files start on new pages, with the header of every > page being the file name and the page. > For this the command > a=`{ls} pr $a | lp