On Linux I am used to running indent -kr ...
to indent C files. /usr/bin/indent on Mac OS X 10.5 does not support the -kr
option. Does anyone have a ~/.indent.pro file that would produce results closest to K&R style? Thanks!
views:
280answers:
2
+4
A:
You can always just get the original gnu indent program and use -kr option. This is probably best as you will have exact results on both machines. But still, if you want to use OS X, this are the flags that make up the -kr option:
-nbad -bap -bbo -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs -nprs -npsl -saf -sai -saw -nsc -nsob -nss
daniel
2009-08-29 18:56:15
All these options are documented in the GNU indent man page and this is the first thing I tried. indent on OS X does not implement most of these options.
sigjuice
2009-08-29 23:07:37
Well there you go, then you clearly need gnu indent.
daniel
2009-08-30 17:26:36