Indent question

Mark A. Yedinak yedinak at motcid.UUCP
Sat Nov 17 03:34:20 AEST 1990


roy%cybrspc at cs.umn.edu (Roy M. Silvernail) writes:

:I have just picked up GNU Indent for MS-DOS. Unfortunately, no
:documentation came with it. I'd like to know if the following is
:possible...

:Indent (both GNU and the previous version I found on SIMTEL) formats all
:function declarations like this:

:int this_function(int param)
:{
:        do_something();
:}

:but I prefer this:

:int this_function(int param) {
:        do_something();
:}

:Can I get indent to use my preferred brace style, or must I hack the
:source?  (if I have to hack source, can someone point me to GNU source
:for indent?)

Consulting the man page for indent on the Suns's shows there is no way to tell
indent to do this. I am not sure if GNU indent follows the BSD version as far as
its options, so I am not sure if this helps.

The only other thing I question, is why declare your functions that way. I
realize there is the stylistic difference when it comes to if, while, for
statements, but this is the first time I have ever seen anyone wanting to format
functions in this manner. My only reservation to using this style, is that it is
radically differnet (at least from all the code, books, etc. I have ever seen)
from the norm.


-- 
Mark A. Yedinak - uunet!motcid!yedinak 		*  "Don't take life too
Motorola - General Systems Sector		*   seriously, you will
3205 Wilke Road, Arlington Heights, IL 60004	*   never get out of it
708-632-2874  (I said it, not the big M)	*         ALIVE!"



More information about the Comp.lang.c mailing list