C++ formatter/beautifier?

Discussion in 'C++' started by OvErboRed, Jul 25, 2004.

  1. OvErboRed

    OvErboRed Guest

    Hi, I'm wondering if anybody can point me to a good, free C++
    formatter/beautifier. I'm looking for something that offers the level of
    control that the Unix/Linux 'indent' program provides, but for C++ (indent
    has some quirks when applied to C++). I have spent a while Googling for
    something along these lines, but haven't come up with anything, only
    various very basic formatting programs like Artistic Style. It would be
    best if someone could point me to an open-source program, but I'm willing
    to work with something that's free (as in beer). Thanks in advance.
     
    OvErboRed, Jul 25, 2004
    #1
    1. Advertising

  2. OvErboRed

    Phlip Guest

    OvErboRed wrote:

    > Hi, I'm wondering if anybody can point me to a good, free C++
    > formatter/beautifier. I'm looking for something that offers the level of
    > control that the Unix/Linux 'indent' program provides, but for C++ (indent
    > has some quirks when applied to C++). I have spent a while Googling for
    > something along these lines, but haven't come up with anything, only
    > various very basic formatting programs like Artistic Style. It would be
    > best if someone could point me to an open-source program, but I'm willing
    > to work with something that's free (as in beer). Thanks in advance.


    http://astyle.sourceforge.net

    --
    Phlip
    http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces
     
    Phlip, Jul 25, 2004
    #2
    1. Advertising

  3. Try 'CodeWorker' at http://www.codeworker.org.

    This is a parsing tool and a universal source code generator that
    interprets a scripting language. The language provides the function
    'indentFile()'.

    If you just have a file to indent, write a single-line script, called
    "indent.cws" for instance:
    indentFile("my-C++-file.cpp");

    and type:
    codeworker indent.cws

    If you have more files to indent, change "indent.cws" to:
    forfile i in "*.cpp" indentFile(i);
    forfile i in "*.h" indentFile(i);

    Regards,

    Cedric Lemaire
     
    Cedric LEMAIRE, Jul 25, 2004
    #3
  4. OvErboRed

    roman ziak Guest

    "OvErboRed" <> wrote in message
    news:Xns9530DF42A37DCyangstaoverbored@127.0.0.1...
    > Hi, I'm wondering if anybody can point me to a good, free C++
    > formatter/beautifier. I'm looking for something that offers the level of


    http://dickey.his.com/bcpp/bcpp.html
     
    roman ziak, Jul 25, 2004
    #4
  5. OvErboRed

    OvErboRed Guest

    Thanks for your reply. As I mentioned in my post, AS is too basic for my
    needs.

    "Phlip" <> wrote in
    news:pnHMc.3108$:

    > http://astyle.sourceforge.net
    >
     
    OvErboRed, Jul 26, 2004
    #5
  6. OvErboRed

    OvErboRed Guest

    Thanks for your reply. Unfortunately, BCPP is too basic for my needs.

    "roman ziak" <> wrote in news:ZQOMc.1110$i_2.51482
    @news20.bellglobal.com:

    > http://dickey.his.com/bcpp/bcpp.html
     
    OvErboRed, Jul 26, 2004
    #6
  7. OvErboRed

    Phlip Guest

    Phlip, Jul 26, 2004
    #7
  8. OvErboRed wrote:
    > Thanks for your reply. Unfortunately, BCPP is too basic for my needs.


    Perhaps you should explain why the suggested programs are to basic for
    your needs. In other word what do you need that those programs don't
    provide?

    --
    Peter van Merkerk
    peter.van.merkerk(at)dse.nl
     
    Peter van Merkerk, Jul 26, 2004
    #8
  9. Phlip <> wrote:

    > What the hell kind of needs could AS be "too basic" for? Do you intent to
    > turn innocent functions into ASCII Art of recumbent bicycles?


    a while back I wrote editor macros to transform comment-boxes to/from the
    single-marker form:

    /*******/
    /* xxx */
    /*******/

    /*
    xxx
    */

    One of the developers in my project group found it unsuitable because he
    wanted curved edges on the boxes.

    --
    Thomas E. Dickey
    http://invisible-island.net
    ftp://invisible-island.net
     
    Thomas Dickey, Jul 26, 2004
    #9
  10. OvErboRed

    Ira Baxter Guest

    "OvErboRed" <> wrote in message
    news:Xns9530DF42A37DCyangstaoverbored@127.0.0.1...
    > Hi, I'm wondering if anybody can point me to a good, free C++
    > formatter/beautifier. I'm looking for something that offers the level of
    > control that the Unix/Linux 'indent' program provides, but for C++ (indent
    > has some quirks when applied to C++). I have spent a while Googling for
    > something along these lines, but haven't come up with anything, only
    > various very basic formatting programs like Artistic Style. It would be
    > best if someone could point me to an open-source program, but I'm willing
    > to work with something that's free (as in beer). Thanks in advance.


    Not free, but specific to C++ and doesn't have Indent quirks.
    See http://www.semdesigns.com/Products/Formatters/CppFormatter.html

    --
    Ira D. Baxter, Ph.D., CTO 512-250-1018
    Semantic Designs, Inc. www.semdesigns.com
     
    Ira Baxter, Jul 30, 2004
    #10
  11. Peter van Merkerk <> wrote in news:2mk07gFmkmabU1@uni-
    berlin.de:

    > OvErboRed wrote:
    >> Thanks for your reply. Unfortunately, BCPP is too basic for my needs.

    >
    > Perhaps you should explain why the suggested programs are to basic for
    > your needs. In other word what do you need that those programs don't
    > provide?
    >


    At least be able to do what indent is capable of, e.g., be able to produce
    GNU style, K&R style, or Berkeley style code, but adapted to C++.
     
    Class Account, Sep 3, 2004
    #11
  12. OvErboRed

    overbored Guest

    Sorry, that was me, posted with wrong account.

    Class Account <> wrote in
    news:Xns955999538B58Ecs184ajimaileecsberk@127.0.0.1:

    > Peter van Merkerk <> wrote in
    > news:2mk07gFmkmabU1@uni- berlin.de:
    >
    >> Perhaps you should explain why the suggested programs are to basic
    >> for your needs. In other word what do you need that those programs
    >> don't provide?
    >>

    >
    > At least be able to do what indent is capable of, e.g., be able to
    > produce GNU style, K&R style, or Berkeley style code, but adapted to
    > C++.
    >
     
    overbored, Sep 3, 2004
    #12
  13. OvErboRed

    overbored Guest

    At least be able to do what indent is capable of, e.g., be able to produce
    GNU style, K&R style, or Berkeley style code, but adapted to C++.

    "Phlip" <> wrote in news:ZQ0Nc.23$Z56.11
    @newssvr33.news.prodigy.com:

    > [Top-post fixed. Please take pride in your posts.]
    >
    >> Phlip wrote:
    >>
    >> > http://astyle.sourceforge.net

    >
    > OvErboRed wrote:
    >
    >> Thanks for your reply. As I mentioned in my post, AS is too basic for my
    >> needs.

    >
    > What the hell kind of needs could AS be "too basic" for? Do you intent to
    > turn innocent functions into ASCII Art of recumbent bicycles?
    >
    > Use the source, Luke!
    >
     
    overbored, Sep 3, 2004
    #13
  14. OvErboRed

    Phlip Guest

    Phlip, Sep 4, 2004
    #14
  15. OvErboRed

    noahmiller

    Joined:
    Oct 16, 2008
    Messages:
    1
    Uncrustify + UniversalIndentGUI

    I have just found and used Uncrustify, which gives something like 200 options for spacing, new lines, braces, wrapping lines, etc. It doesn't appear to have any presets, so it takes a lot of work to get it configured right. But there is a lot of control in its options.
    http://uncrustify.sourceforge.net/

    I used UniversalIndentGUI in tandem, which provides a GUI for setting config options and seeing immediate results in any code. It also works with Artistic Style and others.
    http://universalindent.sourceforge.net/

    Noah
     
    noahmiller, Oct 16, 2008
    #15
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. brett
    Replies:
    0
    Views:
    2,597
    brett
    Mar 28, 2005
  2. Berlin Brown

    Jsp beautifier

    Berlin Brown, Jan 26, 2004, in forum: Java
    Replies:
    5
    Views:
    1,074
    Leo Gaggl
    Jan 28, 2004
  3. Tivo Escobar
    Replies:
    6
    Views:
    764
  4. Diego Andres Alvarez Marin

    C/C++ code beautifier

    Diego Andres Alvarez Marin, Nov 16, 2004, in forum: C++
    Replies:
    20
    Views:
    6,940
    Jason Taylor
    Nov 28, 2004
  5. A.M-SG

    Switching from XML formatter to Binary Formatter

    A.M-SG, Nov 21, 2005, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    356
    Steven Cheng[MSFT]
    Nov 22, 2005
Loading...

Share This Page