Artistic Style 3.1

A Free, Fast, and Small Automatic Formatter

for C, C++, C++/CLI, Objective‑C, C#, and Java Source Code

Artistic Style is a source code indenter, formatter, and beautifier for the C, C++, C++/CLI, Objective‑C, C# and Java programming languages.

When indenting source code, we as programmers have a tendency to use both spaces and tab characters to create the wanted indentation. Moreover, some editors by default insert spaces instead of tabs when pressing the tab key. Other editors (Emacs for example) have the ability to "pretty up" lines by automatically setting up the white space before the code on the line, possibly inserting spaces in code that up to now used only tabs for indentation.

The NUMBER of spaces for each tab character in the source code can change between editors (unless the user sets up the number to his liking...). One of the standard problems programmers face when moving from one editor to another is that code containing both spaces and tabs, which was perfectly indented, suddenly becomes a mess to look at. Even if you as a programmer take care to ONLY use spaces or tabs, looking at other people's source code can still be problematic.

To address this problem, Artistic Style was created – a filter written in C++ that automatically re-indents and re-formats C / C++ / Objective‑C / C++/CLI / C# / Java source files. It can be used from a command line, or it can be incorporated as a library in another program.

There is complete documentation for using Artistic Style. The documentation needed to install and run Artistic Style is included in the distribution package. It does not need an Internet connection.

These contain information on the changes in the current release. The News contains information on major changes and how they might affect the use of Artistic Style. The Release Notes contain a list of all changes made to the program. Information on old releases is also listed.

The latest release can be downloaded from the SourceForge file releases page. A link to the "latest version" near the top of the page will download the correct package for your platform. Or you can select the appropriate package from the "astyle" release folders. The Windows package contains a compiled binary. Other platforms will need to compile the source code. Makefiles are included for the most popular compilers. Follow the install instructions for the appropriate platform as described in the "Install" documentation.

This contains information on compiling and installing Artistic Style. The Windows platform comes with a precompiled executable. Other platforms must compile the project. Follow the instructions for the appropriate platform (Linux, Mac, or Windows).

The latest development files can be checked out from the Artistic Style repository using Subversion.

Artistic Style may be used and distributed under the MIT license. The MIT is a permissive license with a minimum of restrictions on software use. It is compatible with the GNU General Public License (GPL) and most other licenses.

The main points of the terms of the license are:

The source code and executables can be used in free or commercial applications.

The source code can be modified to create derivative works.

The source code does NOT have to be made available in the derivative works.

No guarantee or warranty is provided, the software is provided "as-is".

In addition to the license, the documentation accompanying Artistic Style may be distributed or republished without the author's consent.

This page contains scripts to support the Artistic Style program. They are in various script languages and work on different platforms. It includes scripts to clean the directories of backup files created by Artistic Style.

There are several applications that use Artistic Style as contributed software. It is either embedded in the application or called as a command line program. The applications include Graphical User Interfaces to view the effect of formatting of the source code, development environments for various platforms, and other software. There are also links to style information and various style guides.

Artistic Style has compile options for creating a shared library (DLL) or static library for use with a Graphical User Interface (GUI). With the Java Development Kit (JDK) installed it can be compiled as a Java Native Interface (JNI) and called from a Java program. The Developer Information documents the calling procedure and has example programs for C++, C++/CLI, Objective‑C, Java, C#, and Python.

Bug Reports, Change Requests, Update Notifications

Bug reports and change requests should be submitted to the Artistic Style bug tracker page. You must be logged in to SourceForge to submit a report. Include an example that shows the problem, reduced to the minimum that still has the problem. It does not need to be functional code.

The bug report will not be indented after the data is submitted. You may indicate the indentation when you submit the request (e.g. replace leading spaces with periods). Or, you can use the "Formatting Help" button to the left of the ticket form. To submit preformatted text, make a code block using 3 or more tildes (~~~) or backticks (```) on a line before and after the text.

You can subscribe to file change notifications using an RSS feed. There is an RSS symbol on the Artistic Style files page. You can also subscribe after downloading a file. To the right of the "Me" option in the SourceForge header, there will be a button containing a number (it may be 0). Click on this to get your "Download History". Beside the download will be an option to subscribe. You should receive an email of the file changes.

To contact the project by email use the address jimp03@email.com.

Maintainers

Artistic Style is maintained and updated by Jim Pattee. The original author was Tal Davidson, Israel.

Acknowledgments

Thanks to Jim Watson, Fred Shwartz, W. Nathaniel Mills III, Danny Deschenes, Andre Houde, Richard Bullington, Paul-Michael Agapow, Daryn Adler, Dieter Bayer, Sam Cooler, Jim Duff, Emilio Guijarro, Jens Krinke, Eran Ifrah, Travis Robinson, Max Horn, Ettl Martin, Mario Gleichmann, J P Nurmi, Colin D Bennett, Christian Stimming, MrTact, Wim Rosseel, Matthew Woehlke, Chris Schwarz, Chang Jiang, Arseny Solokha, Milian Wolff, Johannes Martin, Arne F?rlie, Marvin Humphrey, J, Christopher Sean Morrison, Keith OHara, louis6g, Evmenov Georgiy, beta100100, Ruzzz, Peter A. Bigot, HyungKi Jeong, David Faure, Carl Moore, Mofi, Travis Vitek, Bunel Nicolas, Juan Alday, Rian Quinn, David Haney, Tam�s Kurucsai for their patches and contributions to Artistic Style.

Thanks to SourceForge for giving Artistic Style its home.

Thanks to all the dedicated beta-testers and bug notifiers!