github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

bengardner / uncrustify

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 20
    • 4
  • Source
  • Commits
  • Network (4)
  • Issues (3)
  • Downloads (2)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • master ✓
    • objc
  • Tags (2)
    • uncrustify-0.55
    • uncrustify-0.54
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Code beautifier — Read more

  cancel

http://uncrustify.sourceforge.net/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Spelling: statment -> statement 
bengardner (author)
Sun Jan 24 19:02:19 -0800 2010
commit  8909c9fc0c8f9f308c1ccef1bfc4cef5ce889d5d
tree    d1b8681c1c8fc1a35826158f2ec25b6d186a9c85
parent  5b4be42d368a2d8c049cd3361b1901649ec57c63
uncrustify /
name age
history
message
file .gitignore Tue Dec 08 18:57:38 -0800 2009 Makefile.in is required to build with MinGW. [bengardner]
file AUTHORS Sat Oct 17 11:13:55 -0700 2009 Import r1644 from subversion [bengardner]
file BUGS Sat Oct 17 11:13:55 -0700 2009 Import r1644 from subversion [bengardner]
file COPYING Sat Oct 17 11:13:55 -0700 2009 Import r1644 from subversion [bengardner]
file ChangeLog Fri Nov 27 19:17:48 -0800 2009 Move changelog to the root so 'make dist' can p... [bengardner]
file HELP Sat Oct 17 11:13:55 -0700 2009 Import r1644 from subversion [bengardner]
file INSTALL Sat Oct 17 11:13:55 -0700 2009 Import r1644 from subversion [bengardner]
file Makefile.am Fri Nov 27 19:46:07 -0800 2009 Missed some support files for Win32 and OSX [bengardner]
file Makefile.in Tue Dec 08 18:57:38 -0800 2009 Makefile.in is required to build with MinGW. [bengardner]
file NEWS Sat Oct 17 11:13:55 -0700 2009 Import r1644 from subversion [bengardner]
file README Sun Oct 25 07:51:35 -0700 2009 Spelling fix. suprisingly -> surprisingly. Mino... [André Berg]
file aclocal.m4 Fri Nov 27 13:32:29 -0800 2009 Run 'autogen.sh' on Ubuntu 9.10 [bengardner]
file autogen.sh Sat Oct 17 11:13:55 -0700 2009 Import r1644 from subversion [bengardner]
file config.guess Sat Oct 17 11:13:55 -0700 2009 Import r1644 from subversion [bengardner]
file config.sub Sat Oct 17 11:13:55 -0700 2009 Import r1644 from subversion [bengardner]
file configure Fri Nov 27 19:46:26 -0800 2009 Save off auto-generated files. [bengardner]
file configure.in Fri Nov 27 15:59:07 -0800 2009 Add the homepage URL [bengardner]
directory documentation/ Sun Jan 24 19:02:19 -0800 2010 Spelling: statment -> statement [bengardner]
directory etc/ Sun Jan 24 19:02:19 -0800 2010 Spelling: statment -> statement [bengardner]
file extras.vpj Fri Nov 27 18:59:52 -0800 2009 Update vpj file [bengardner]
file install-sh Fri Nov 27 13:32:29 -0800 2009 Run 'autogen.sh' on Ubuntu 9.10 [bengardner]
file make_token_names.sh Thu Nov 05 15:46:27 -0800 2009 Do a little whitspace cleanup in make_token_nam... [Ben Gardner]
directory man/ Tue Dec 08 18:57:38 -0800 2009 Makefile.in is required to build with MinGW. [bengardner]
file missing Fri Nov 27 13:32:29 -0800 2009 Run 'autogen.sh' on Ubuntu 9.10 [bengardner]
directory osx/ Sun Oct 25 07:51:30 -0700 2009 Add missing osx directory. [André Berg]
file release-steps.txt Fri Nov 27 19:54:47 -0800 2009 Update release step. [bengardner]
file run_tests.sh Sat Oct 17 11:13:55 -0700 2009 Import r1644 from subversion [bengardner]
directory scripts/ Sat Oct 17 11:13:55 -0700 2009 Import r1644 from subversion [bengardner]
directory src/ Sun Jan 24 19:02:19 -0800 2010 Spelling: statment -> statement [bengardner]
directory tests/ Sun Jan 24 19:02:19 -0800 2010 Spelling: statment -> statement [bengardner]
file uncrustify.vpj Thu Dec 31 11:15:55 -0800 2009 Update the vpj file [bengardner]
file uncrustify.vpw Sat Oct 17 11:13:55 -0700 2009 Import r1644 from subversion [bengardner]
directory uncrustify.xcodeproj/ Sun Oct 25 07:51:34 -0700 2009 Add OSX Xcode build & install instructions to R... [André Berg]
file update-default-cfg.sh Sat Oct 17 11:13:55 -0700 2009 Import r1644 from subversion [bengardner]
directory win32/ Tue Dec 29 11:28:34 -0800 2009 Extend the flags variable to 64 bits [bengardner]
file working.txt Sat Dec 05 07:38:44 -0800 2009 save off work in the freebsd branch [bengardner]
README
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


Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server