Menu

Tree [7bf25d] uncrustify-0.58 /
 History

HTTPS access


File Date Author Commit
 documentation 2011-05-20 Ben Gardner Ben Gardner [7bf25d] Uncrustify 0.58
 etc 2011-05-20 Ben Gardner Ben Gardner [7bf25d] Uncrustify 0.58
 man 2010-11-25 Ben Gardner Ben Gardner [024775] Prep uncrustify 0.57 release
 osx 2009-10-19 André Berg André Berg [441fa5] Add missing osx directory.
 scripts 2009-10-17 Ben Gardner Ben Gardner [fe25b6] Import r1644 from subversion
 src 2011-05-20 Ben Gardner Ben Gardner [7bf25d] Uncrustify 0.58
 tests 2011-04-21 Ben Gardner Ben Gardner [f4c196] Add missing test file
 uncrustify.xcodeproj 2009-10-24 André Berg André Berg [809b47] Add OSX Xcode build & install instructions to R...
 win32 2009-12-29 Ben Gardner Ben Gardner [d55e99] Extend the flags variable to 64 bits
 .gitignore 2010-05-17 Ben Gardner Ben Gardner [5be573] Clean up build and project files.
 AUTHORS 2009-10-17 Ben Gardner Ben Gardner [fe25b6] Import r1644 from subversion
 BUGS 2009-10-17 Ben Gardner Ben Gardner [fe25b6] Import r1644 from subversion
 COPYING 2009-10-17 Ben Gardner Ben Gardner [fe25b6] Import r1644 from subversion
 ChangeLog 2011-05-20 Ben Gardner Ben Gardner [7bf25d] Uncrustify 0.58
 HELP 2009-10-17 Ben Gardner Ben Gardner [fe25b6] Import r1644 from subversion
 INSTALL 2009-10-17 Ben Gardner Ben Gardner [fe25b6] Import r1644 from subversion
 Makefile.am 2010-05-28 Ben Gardner Ben Gardner [d2c438] Use silent rules instead of nostdinc
 Makefile.in 2010-05-28 Ben Gardner Ben Gardner [aefb08] Rebuild automake stuff after applying the last ...
 NEWS 2009-10-17 Ben Gardner Ben Gardner [fe25b6] Import r1644 from subversion
 README 2009-10-24 André Berg André Berg [5e696d] Spelling fix. suprisingly -> surprisingly. Mino...
 aclocal.m4 2010-11-25 Ben Gardner Ben Gardner [024775] Prep uncrustify 0.57 release
 autogen.sh 2009-10-17 Ben Gardner Ben Gardner [fe25b6] Import r1644 from subversion
 commit.log 2011-05-20 Ben Gardner Ben Gardner [7bf25d] Uncrustify 0.58
 config.guess 2009-10-17 Ben Gardner Ben Gardner [fe25b6] Import r1644 from subversion
 config.sub 2009-10-17 Ben Gardner Ben Gardner [fe25b6] Import r1644 from subversion
 configure 2011-05-20 Ben Gardner Ben Gardner [7bf25d] Uncrustify 0.58
 configure.in 2011-05-20 Ben Gardner Ben Gardner [7bf25d] Uncrustify 0.58
 extras.vpj 2010-11-25 Ben Gardner Ben Gardner [024775] Prep uncrustify 0.57 release
 install-sh 2009-11-27 Ben Gardner Ben Gardner [42ca21] Run 'autogen.sh' on Ubuntu 9.10
 make_token_names.sh 2009-11-05 Ben Gardner Ben Gardner [fc97bf] Do a little whitspace cleanup in make_token_nam...
 make_win32.sh 2010-03-09 Ben Gardner Ben Gardner [b2354a] Add a script to build a win32 release zip on linux
 missing 2009-11-27 Ben Gardner Ben Gardner [42ca21] Run 'autogen.sh' on Ubuntu 9.10
 release-steps.txt 2010-11-25 Ben Gardner Ben Gardner [a22f48] Add note about how to push a tag
 run_tests.sh 2009-10-17 Ben Gardner Ben Gardner [fe25b6] Import r1644 from subversion
 uncrustify.vpj 2010-05-17 Ben Gardner Ben Gardner [5be573] Clean up build and project files.
 uncrustify.vpw 2009-10-17 Ben Gardner Ben Gardner [fe25b6] Import r1644 from subversion
 update-default-cfg.sh 2009-10-17 Ben Gardner Ben Gardner [fe25b6] Import r1644 from subversion
 working.txt 2009-12-05 Ben Gardner Ben Gardner [837f57] save off work in the freebsd branch

Read Me

README for Uncrustify
=====================


Building the program
--------------------

Quick start:
 $ ./configure
 $ make

The executable is src/uncrustify.
Copy that to your ~/bin/ folder or wherever you want.


Building the program using Xcode on Mac OS X
---------------------------------------------

You can of course just open the Xcode project and build uncrustify using the 
default 'Debug' configuration but if you want to install it the 'Install' 
configuration will not work from within Xcode. 

For that you will have to use the Xcode command line tool 'xcodebuild'.
 
To do that, cd into the uncrustify project folder where uncrustify.xcodeproj 
resides and enter the following command:

sudo xcodebuild -configuration 'Install' 

You will be prompted for the root level password. By doing this you will install 
uncrustify into /usr/local/bin. The install location can be changed by editing 
the Build Settings for the uncrustify target. The setting you need to change is 
called, surprisingly enough, 'Installation Directory'.


Configuring the program
-----------------------

Examine the example config files in etc and/or read
documentation/htdocs/configuration.txt.
Copy the existing config file that closely matches your style and put in
~/.uncrustify/.  Modify to your liking.


Running the program (and refining your style)
---------------------------------------------

As of the current release, I don't particularly trust this program to not make
mistakes and screw up my whitespace formatting.

Here's how to run it:
$ uncrustify -c ~/.uncrustify/mystyle.cfg -f somefile.c > somefile.c.unc

The -c option selects the configuration file.
The -f option specifies the input file.
The output is sent to stdout.  Error messages are sent to stderr.

Use a quality side-by-side diff tool to determine if the program did what you
wanted.
Repeat until your style is refined.


Running the program (once you've found your style)
--------------------------------------------------

Write a script to automate the above.
Check out etc/dofiles.sh for an example.
That script is used as follows:
1. navigate one level above your project
2. make a list of file to process
  $ find myproj -name "*.[ch]" > files.txt
3. sh etc/dofiles.sh files.txt
4. Use your favorite diff/merge program to merge in the changes
  $ xxdiff out/myproj myproj


Auth0 Logo