Artistic Style - News

# Artistic Style News

> ### Artistic Style 1.21 (June 2007)

> > This release contains many bug fixes. Array formatting and indentation has been improved. Arrays and enums are now formatted by a different procedure than functions. Brackets will now attach to lines with comments. Brackets will be broken from lines with comments without bringing the comments with them. All comments will remain in their original column, if possible. The formatting of empty blocks was fixed. The BracketType definition was expanded and the bracket types are now correctly identified. There are several formatting fixes for Java files. See the Release Notes for a complete list of changes.

> > A new option, --preserve-date (-Z), has been added. This will retain the date modified of the original file in the new formatted file. Otherwise the new file will contain the current date.

> > The option --errors-to-standard-output has been shortened to --errors-to-stdout. The short options -c (mode=c) and -j (mode=java) have been removed. The options should seldom be needed since the mode is now set automatically from the file extension for each source file instead of for each program execution. A new long option --mode=cs (C#) has been added. Key words are now set for each file depending on the file mode (C, Java, or C#). This will eliminate formatting problems caused by not being able to identify the source code language.

> > There has been a change to the Linux style bracket formatting for C++ header files. In the past brackets have been broken for function definitions within a class. With this release the brackets will be attached. The brackets will also be attached for arrays, structs, enums, and other top level objects that are not classes or functions. The Linux style formatting for Java and C# has not been changed.

> > This release supports only one platform in each distribution package. In the past all platforms were included in every package. If you use Artistic Style on more than one platform you will need to download packages for each platform. The main difference in platforms is the build directory and the line endings. The source code and documentation are the same for all packages.

> > There are new instructions about optimizing compiler options in the Install Instructions. If you are compiling using a development environment you may want to read them.

> > If you have broken brackets with comments attached to the opening bracket instead of the previous line, do the following before formatting again with broken brackets. Use the current Artistic Style release (1.21). Format the source using attached brackets to reattach the brackets and the comments to the previous line. Then format the source again using broken brackets. This will move the brackets to the next line without the comments. The comments will now be on the correct line.

> > There is a new multi-platform GUI program, UniversalIndent, available at sourceforge.net/projects/universalindent. It allows you to view the effects of the Artistic Style options on your source code without saving the file. You can review the results of the formatting options before updating the file. It can be used with a test file or with your actual source code. It supports several other formatting programs. The Artistic Style for Windows program has been updated to support the current release. It is available at www.geocities.com/jpattee/

> > There have been a few inquiries about how to customize Artistic Style for an unsupported format. Changes can be made with Python or another text processing program after formatting the source, or you can modify the Artistic Style source code itself. The best place to modify the code is usually in ASEnhancer.cpp. The ASEnhancer class is called after the main formatting has been done so you are getting a formatted file. If you just need to change the indentation of a few things this is probably the best place to do it.

> > There is now a distribution package for OpenVMS thanks to Jim Duff, an OpenVMS Systems Specialist living in Sydney Australia. His website is at eight-cubed.com.

> > Thanks to Norbert Holzki and Siemens AG, Medical Solutions, Forchheim, Germany for testing the array formatting.

> > Thanks to Sam Cooler for testing the Mac OS X version.

> ### Artistic Style 1.20 (January 2007)

> > Release 1.20.2 fixed problems with the new stream I/O procedure added in release 1.20.1. Release 1.20.1 improved the processing for Mac OS X platforms. The compatibility with TextWrangler was improved. There is now a separate release for Mac.

> > Artistic Style will now indent message maps for Microsoft Foundation Class (MFC) and event tables for wxWidgets. The option --brackets=break-closing-headers has been shortened to --brackets=break-closing and a short option added (-y). There have been short options added for --break-elseifs (-e), --indent-preprocessor (-w), --break-blocks (-f), and --break-blocks=all (-F).

> > With this release the Artistic Style license changes from the GNU General Public License (GPL) to the GNU Lesser General Public License (LGPL). You can use Artistic Style for free or commercial software without charge. Projects that use Artistic Style do not have to make the their source code available. If Artistic Style itself is modified, however, the modified Artistic Style source code must be made available. See the GNU Lesser General Public License for more information.

> > There is a new preprocessor option to aid developers in using Artistic Style with a Graphical User Interface (GUI). It is no longer necessary to remove the source module astyle_main.cpp and write embedded code to call the formatter. It can be compiled as a static library or a shared library (DLL), or the entire source code can be included in the project. See the Artistic Style Developer Information for the calling procedure and other details.

> > There is a sample GUI program for Windows available at http://www.geocities.com/jpattee/. It uses the unmodified Artistic Style compiled for a GUI. The source code needs some work so it is not available for now. It should work under Linux using WINE. Future enhancements and platform support will depend on the response to the sample program.

> > To support the new Artistic Style preprocessor option there are new makefiles and project files. Windows users have a project file for Microsoft Visual C++ 2003 (version 7). Linux users have a new makefile that has several new options. The location of both files is in the build directory. Be sure to read the Artistic Style Install Information for the details.

> > Intel® is now offering it's C++ and Fortran compilers free for non-commercial use. Information is available at the Intel® Software Development Products website. Click on the Free Non-Commercial Download link to see if you qualify. The Intel Compilers on Windows and Linux require that other compilers be installed (Microsoft Visual C++ or GNU gcc respectively). This is because the Intel Compilers require the header files, runtime libraries and linkers distributed as part of these other compilers. If you want to use this compiler there is now a makefile (makeintel) included with the project. See Artistic Style Install Information for instructions.

> ### Artistic Style 1.19 (July 2006)

> > Most changes this release were again concerned with the options pad=oper and pad=paren. The formatting still worked a little different if both options were declared than if only one was used. The problems with distinguishing the multiplication operator from pointers, and of separating an object from the member access pointer (->) were fixed.

> > A new option, unpad=paren, was added. This will undo the pad=paren, pad=paren-out and pad=paren-in options. It can be used alone or with pad=paren-out or pad=paren-in. If used alone it will unpad all parens that have been previously padded. If used with a paren padding option, the paren padding option will take precedence and only the unnecessary padding will be removed. This will enable the paren padding to be changed in one formatting run.

> > Padding to paren headers (e.g. "if", "for", "while") was reinstated. This was done in previous releases if pad=oper was used. Since most people used this option, the headers were usually padded. The general opinion was that they looked better padded, especially in the case of "else if" statements. Since it is a minor point, it was not made an option.

> > This is the third release of Artistic Style in the last four months. The reason for the frequent releases was the number of pervasive errors in the formatting. In the future there will probably be two or three new releases per year, or one every four to six months. It will take about three years to make all the changes that are planned at this time. The releases will be a combination of fixes, changes to formatting, and new features.