The Open Source Swiss Army Knife

/unix/commandline/
/unix/commandline/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /unix   /commandline 
Permalink: /var/sirfsup/unix/commandline/indent.txt
Title: add
article options : please login   |  raw source view  

for loop formatting


-br,-blSpecifying -bl lines up compound statements like
this:
if (...)
{
code
}
               Specifying -br (the default) makes them look  like
               this:
                    if (...) {
                                   code
                    }

indentation

options are:

-din Specify the indentation, in character positions, from a

          declaration   keyword   to  the  following  identifier.
          Default:  -di16.

-din3 sets the indentation to 3 spaces

comments

comments by default are put on a separate line. Am looking for a way to right-indent all comments.

-cnThe column in which comments on code start.
Default: -c33.
     -cdn The column in which comments on declarations start. The
          default  is  for  these  comments  to start in the same
          column as those on code.

indent -di5 -c33 show_programs.c

does not indent at all.

extras

     -bad,-nbad
               If -bad is specified, a blank line is forced after
               every block of declarations.  Default: -nbad.

Leave a Reply
Your Name:     anonymous
Your Email:
Website:  
Comments:

The author will be notified of your reply.
return to top