luke@mtuno.ATT.COM (s.l.jones) (12/14/89)
Does anybody out there have a C++ beautifier like the UNIX cb(1)
program? I'm especially interested in something that can hack
function headers like
int main( int argc, char **argv ) {
printf( "hello, world\n" );
}
which, as you can see, is not even (necessarily) C++, but plain
vanilla ANSI C.
I don't want it bad enough to pay any money, but I promise to use
it a lot. (I need source, since I'd use it on both UNIX and DOS.)
Ideally, this cb++ should offer all sorts of customizations. I want
to use it to coerce other peoples code, since :-) my coding style is
already ideal. I'd like to be able to control how it treats comments,
(including the // kind), whether spaces go inside or outside parens,
or neither, or both, where the curly braces go (of course), and how
to indent run-on expressions like
if( condition1 && condition2 && condition3
&& condition4 && condition5 )
// also where to indent the line after that beast
It should also offer the choice of whether to use tabs, and, if so,
what width they should represent.
And so forth....generally speaking, the more the merrier. It should
be so complex it has to have its own .rc file :-).
Send a man page too. Thanks in advance.
Luke Jones
--
S. Luke Jones, luke@mtung.att.com or ...!att!mtung!luke 201/957-2733
AT&T Inf###Bell Labs, Rm. MT 2E-337, 200 Laurel Ave., Middletown, NJ 07748
DISCLAIMER: the opinions presented herein are solely my own, *NOT* AT&T's.
"System Test? That's for idiots!" --- me, misquoting "Dirty" Harry Calahan
rdr@mdavcr.UUCP (Randolph Roesler) (12/14/89)
In article <2774@mtuno.ATT.COM> luke@mtuno.ATT.COM (s.l.jones) writes: >Does anybody out there have a C++ beautifier like the UNIX cb(1) >program? >-- >S. Luke Jones, luke@mtung.att.com or ...!att!mtung!luke 201/957-2733 >AT&T Inf###Bell Labs, Rm. MT 2E-337, 200 Laurel Ave., Middletown, NJ 07748 >DISCLAIMER: the opinions presented herein are solely my own, *NOT* AT&T's. >"System Test? That's for idiots!" --- me, misquoting "Dirty" Harry Calahan Luke, somebody enhanced indent into an indent++ (i.e. indent that could handle C++ and Ansi code). Indent is a much better program for beautifing C(++) source code than cb ever was. It has all the things you talked about. It works using some very basic rules. Fairly good, and PD from BSD freed code. Does anybody remember who that brave feller (or lass) was. Maybe themselves or somebody who got the orginal indent++ could make it available to the rest of us poor unformted slobs. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It's not the size of your signature that Randy Roesler counts - it's how you use it! MacDonald Dettwiler & Assc. email ...!uunet!van-bc!mdavcr!rdr BC Canada 604-278-3411
micah@portia.Stanford.EDU (Micah Doyle) (02/14/90)
I'm looking for a C++ beautifier (similar to cb for C). Does anyone know if such a program exists? Thanks for any help anyone can provide. Micah Doyle micah@portia.Stanford.EDU
dulimart@cpsvax.cps.msu.edu (Hansye S. Dulimarta) (02/22/90)
In article <9153@portia.Stanford.EDU> micah@portia.Stanford.EDU (Micah Doyle) writes: |I'm looking for a C++ beautifier (similar to cb for C). Does anyone |know if such a program exists? Thanks for any help anyone can |provide. | Micah Doyle | micah@portia.Stanford.EDU So am I. It is either similar to 'cb' or 'indent'. /*---------------------------------------------------------------------------* * Hans Dulimarta (517) 355-3840 * * dulimart@pixel.cps.msu.edu [35.8.56.4] * * dulimart@cpsvax.cps.msu.edu [35.8.56.111] * * dulimart@{frith|msudoc}.egr.msu.edu [35.8.8.108] * * {....}!tank!eecae!cpsvax!dulimart * *---------------------------------------------------------------------------*/
ivan@cwi.nl (Ivan Herman) (02/13/91)
-- Ivan Herman Centre for Mathematics & Computer Sciences (CWI), Kruislaan 413, 1098 SJ Amsterdam, The Netherlands. Email:ivan@cwi.nl, Tel: +31-20-592.4164