Artistic Style

# Artistic Style - Release notes

### 1.17.0 (in progress, not-yet-released)

- Martin Baute joined the team as new project admin.
- Major cleanup of code and documentation.
- Bug fixes and new features:
  - #1171227 - Won't compile under g++3.4.1 (SunOS5.9). Fixed.
  - #914902 - 'break-blocks' option in '.astylerc' option file. Fixed.
  - #1023390 - astyle cannot parse .astylerc file. Fixed.
  - #848640 - Astyle changes read-only files. Fixed.
  - #551891 - Unhandled exception under Solaris. Fixed.
  - #639614 - Errors in parsing option files. Fixed.
  - #510207 - Source line length limit (2047 chars). Fixed.
  - #435232 - --options not documented. Fixed.
  - #909243 - %HOMEPATH% incomplete for finding .astylerc. Fixed.
  - #551897 - print help on stdout, not stderr. Fixed.
  - #494551 - Suppress .orig files. Fixed.
  - #718779 - Seperate C# support from C/C++. Fixed.
  - CVS sources now include a test driver, runable with "make test".
- Core classes released under LGPL (with kind permission of Tal Davidson) to faciliate inclusion in non-GPL'ed projects.
- Skipped 1.16.x to stay in-line with numbering scheme (even-minor-numbered reserved for "stable" versions).

### 1.15.3 (7 March 2002)

- Bug fix in handling of brackets after line-comments.
- Bug fix: C# add/remove event property headers now properly formatted.

### 1.15.2 (2 March 2002)

- Bug fixes in exception handling phrases, e.g. multiple catches and try..finally.

### 1.15.1 (2 March 2002)

- Bug fix: C# properties are now formatted properly.

### 1.15.0 (2 March 2002)

- Added support for C#.
- Artistic Style is now licensed only under the GNU Public License (GPL).
- Compilation under G++ 3.0 now works properly.
- Bug fix: Opening brackets that appear at the begining of a line immediately after an empty line comment are now handled properly, and not appended as part of the line comment.
- Bug fix: Brackets inside comments are now not misindented within the comment.

### 1.14.1 (2 June 2001)

- Bug fix: : '<' and '>' symbols within template declarations (e.g. 'foo<bar*, xoo>') are now left unpadded in the padding modes.
- Bug fix: Fixed false recognizing of headers within larger words (e.g. 'catch' in 'gcatch').

### 1.14.0 (1 June 2001)

- Bug fix: Fixed indentation of statements within preprocessor '#if...' statements.
- Bug fix: Templates are now not broken from their bodies.
- Bug fix: '<' and '>' symbols within template definitions (e.g. 'template<class T>') are now left unpadded in the padding modes.

### 1.13.8 (13 April 2001)

- Bug fix: Fixed indentation of multiple nested non-block brackets, such as in multi bracketed static array declarations.

### 1.13.7 (6 April 2001)

- Newoption:'--force-indent=tab=#' (or 'T#') instructs astyle to indent using tabs in all the pre-statement white space, including areas astyle's '--indent=tab' prefers to indent using spaces, such as white space in multi-line statements.
- Bug fix: Fixed unwanted empty line insertions between empty blocks (e.g. '{}') and closing brackets that come immediately after them.
- Bug fix: Fixed unwanted empty line insertions immediately after colons (e.g. 'default:', 'label:', ...)

### 1.13.6 (24 January 2001)

- Bug fix: Preprocessor lines now remain unpadded in padding modes.

### 1.13.5 (24 January 2001)

- Bug fix: Fixed the insertion of phantom empty lines immediately after {} blocks.
- Bug fix: Bare open brackets ('{') with no preceding headers are now broken appropriately from their preceding code lines in the 'attach'and 'linux' bracketmodes.
- Bug fix: Fixed operator recognition for long operators such as '>>=', '<<= '.

### 1.13.4 (24 January 2001)

- Bug fix: L" unicode strings are now handled properly in padding modes.
- Bug fix: Fixed the padding around '-' operators (which went sour somewhere in the past).
- Bug fix: Fixed the handling of exponent numbers (e.g. 12.2e+2) in padding modes. The fix enables 'e+' to be regarded as part of the exponent.

### 1.13.3 (23 January 2001)

- Line that contain both headers and their following non-header code (e.g. 'if (isFoo) doBar();') are now broken by default into multiple lines. To keep these lines as single lines, use '--one-line= keep-statements'.
- Added the new option '--break-elseifs' which breaks 'else if()' statements into multiple lines.
- The option block breaking options now works properly with the padding options.
- Various minor bug fixes.

### 1.13.2 (21 January 2001)

- Added the new option '--brackets=break-closing-headers'. When this option is added to either '--brackets=attach' or '--brackets= linux', astyle breaks closing headers (e.g. 'else', 'catch') from their preceding closing brackets.
- '--break-blocks' and '--break-blocks= all' now correctly handle blocks that appear immediately before closing brackets, and do not append empty lines between them and the closing brackets.

### 1.13.0 (27 September 1999)

- Moved back to odd-minor-numbered development versions, and even-minor-numbered stable versions.
- Added the new option '--break-blocks' which breaks apart unrelated blocks, labels, classes, etc.
- Added the new option '--break-blocks=all' which also breaks apart blocks of closing headers, such as 'else', 'catch', etc.
- Fixed indentation handling of labels and class-definition identifiers such as 'public:', 'protected:', ... (thanks to Daryn Adler for his patch)
- Fixed indentation of nested class definitions. (thanks to Daryn Adler for his patch)
- Added the new option '--indent-preprocessor' which (surprisingly) tries to reindent C/C++ preprocessor macro lines. Astyle should do an pretty nice indentation job if the macro code is sane, but don't expect miracales for horrid macro definitions...

### 1.11.6 (27 September 1999)

- Improved indentation of lines containing single-line blocks.

### 1.11.5 (25 September 1999)

- Improved the bugfix for a 'const' keyword bug which resulted in wrong indentation of methods that are declared const.

### 1.11.4 (18 September 1999)

- Improved handling of single colons (':') in class headers, e.g. class Foo : public Bar { ... }
- Improved handling of single colons (':') in method (constructor) headers, e.g. Foo::Foo(int a) : Bar(a)

### 1.11.3 (16 September 1999)

- Fixed a serious bug in the formatting of brackets, introduced in 1.11.2.

### 1.11.2 (10 September 1999)

- Fixed an indentation bug in statements that contain the 'const', that resulted in wrong indentation of array blocks that where declared const. (Thanks Daniel!)
- Fixed an indentation bug that could arise in lines that appear immediately after several preprocessor commands. (Thanks Daniel!).
- Fixed a bug that inserted an empty line after closing brackets if a comment appeared immediately prior to the closing bracket. (Thanks Ed!)
- Fixed a bug that eliminated empty lines between closing brackets and immediately following opening brackets. (Thanks Ed!)

### 1.11.1 (3 September 1999)

- Fixed a bug that inserted an empty line at the begining of source files.

### 1.11.0 (3 September 1999)

- Astyle now filters out linefeeds ('\r') before begining to parse lines. This should take care of bizzare formatting that existed when moving source files from Windows (which breaks lines with a linefeed AND newline ("\r\n") to unix (which breaks lines only with newlines).
- The "struct", "static" and "synchronized" keywords are now finally handled correctly in both the contexts of block headers AND simple keywords.
- Better treatment of precompiler lines that end with backslashes, and the lines that immediately follow them.
- The '--indent-classes' (or '-C') option now works correctly (again...).
- Series of short command-line options (e.g. "-b -s4 -C") are now parsed correctly.

### 1.10.4 (27 July 1999)

- Fixed a MAJOR bug (inserted in 1.10.3) that resulted wrong handling of double-colons ('::') in C++.

### 1.10.3 (24 July 1999)

- Fixed a bug (inserted yesterday) that resulted in unwanted line breaks before closing-brackets.
- Fixed a bug in the handling of 'static' blocks in java.
- Added the new option '--indent-cases' (or '-K') for indenting 'case XXX:' lines so they are flush with their following code lines.
- Added the new option '--fill-empty-lines' (or '-E') which fills empty lines with the white-space of their previous line.

### 1.10.2 (23 July 1999)

- Fixed a series of related bugs that resulted in certain cases of lacking line breaks after close-brackets, and colons. Thanks Jeroen!

### 1.10.1 (18 July 1999)

- Fixed a bug (introduced in astyle 1.10.0) that can result in missing line breaks before closing brackets if they appear immediately after comments. Thanks Larry!

### 1.10.0 Release (14 July 1999)

- Improved handling of empty bracket blocks ( e.g.{ } ). Thanks Michael!

### 1.10.0 Prerelease (4 July 1999)

- Fixed a bug in the in-statement indentation algorithm which resulted in sub-optimal indentation of multiple-line conditional statements that immediately follow headers such as 'if', 'else if', 'while', etc... As a result, the current in-statement indentation is finally what it should have been long ago - MUCH better then in the last stable versions.
- The "linux" bracket style (in which definition brackets are broken while code brackets are attached) has been fixed, and should finally work correctly.
- Artistic Style can now parse both C/C++ and Java files in the same command. Unless a specific language mode is specified (e.g. --style=java or --style=c), astyle will now automatically set the language mode according to each file's suffix (java mode for the '.java' suffix , c mode otherwise).
- Multiple statements in a single line (e.g. aaa; bbb; fff;) are now broken up by default.
- Added the option '--one-line=keep-statements' (or '-o') that keeps multiple statements in a single line attached, thus countering the default break detailed above.
- Changed the option previously called '--keep-one-line-blocks' to '--one-line=keep-blocks', for similarity with the new option above.
- Changed the short option name of the option '--errors-to-standard-output' from '-o' to '-X'.
- Up to now, Artistic Style always inserted a minimal indent of twice the current selected indent size inside multi-line conditional headers ('if', 'while' ...), so that it would be clear where the headers end and the code after them begins. The current version adds the option '--min-conditional-indent=#' (or '-m#') that sets the absolute minimal indent between conditional headers and their multiple-line conditional statements. If this option is not specified, the default indent remains twice the current selected indent size.
  For example, This option should come very handy in code that already has brackets after EVERY conditional statement (even if just one line is in that bracket...) - in such a case, it would be wise to set --min-conditional-indent=0 since the brackets already make it clear where the header ends and the code begins...
- Added the ability to set the assumed tab size when in '--indent-tab' mode by using '--indent-tab=#' or '-t#' and replacing the # with the wanted size. If the size is not specified, the size of each tab is assumed to be 4 spaces long.

### 1.8.2 (18 March 1999)

- Fixed pointer handling problems in ASBeautifier that led to crashes when parsing preprocessor commands.
- Fixed the problem in locating the default options file in the directory pointed to by $HOME or %HOMEPATH% when these system variables do not contain an '/' (or '\' ...) at their end.
- Fixed inverse insertion of spaces vs. tabs when in -t mode. (Thanks Brian!)
- Got rid of those pesky C4786 warnings when compiling under Visual C++ (Thanks John!)

### 1.8.1 (9 March 1999)

- Changed the '--style=k&r' option to '--style= kr' , so that linux/unix machines don't misinterpret the '&' as a background processing command.

### 1.8.0 (3 March 1999)

- Added support for predefined styles. Current supported styles are: ansi, k&r, linux, gnu, java. these can be set by using '--style=THESTYLE' (e.g. '--style=linux').
- Added '--indent-blocks' (or -G) option, which adds indentation to entire blocks, including their brackets, in similar fashion to the standard gnu style.
- Added option '--brackets=linux' (or '-l') which breaks definition-block brackets, but attaches command-block brackets.
- Padding can now be set separately for operators alone('-p' or '--pad=oper'), parentheses alone ('--pad=paren) or both ('-P' or '--pad=all').
- Artistic Style looks for a default options file in the following order:
  1. The contents of the ARTISTIC_STYLE_OPTIONS environment variable if it exists.
  2. The file called .astylerc in the directory pointed to by the HOME environment variable ( i.e. $HOME/.astylerc ).
  3. The file called .astylerc in the directory pointed to by the HOMEPATH environment variable ( i.e. %HOMEPATH%\.astylerc ).
  If a default options file is found, the options in this file will be parsed BEFORE the command-line options. Options within the default option file may be written without the preliminary '-' or '--'. Indentation within #if , #else and #endif precompiler commands now works correctly even if the program lines between these precompiler commands contain non-pared brackets.
- Improved handling of labels (e.g. 'exit:'). By default, labels are now flushed completely to the left. Labels can also be indented to one indent LESS than current standard indentation by using the new option '--indent-labels' (or '-L') .
- Fixed handling of the 'operator' keyword when it is preceded by a non space character (such as '&' or '*').
- Fixed wrong bracket handling after 'throws' statements.
- Fixed wrong indentation of single-line blocks. These where indented 1 indent to much.
- Fixed wrong indentation of headers in internal classes (java mode). These where indented 1 indent to little.
- The option ' --errors-to-standard-output' now has the one-letter option '-o'.
- Fixed bug which resulted in an unneeded indent in function-declarations in which function-variables are declared before the function declaration and are preceded by the 'static' keyword. Thanks Scott.

### 1.6.0 (5 January 1999)

- Fixed zero indentation that resulted when a '-suffix' option was set after a '--indent=spaces' (or '-s') option..
- Wrong options are now announced.
- Changed default indentation to NOT automatically indent class blocks and switch blocks. Instead, the new options '--indent-classes' (or '-C') and '--indent-switches' (or '-S') should be used. The option '--indent-switches' replaces the old option '--flush-switches'.

### 1.4.1 (4 January 1999)

- Fixed ability to write options without the preceding '--' in the default options file.
- Added one-letter options to most options that had only long-options in version 1.4.0 .
- Added a '-v' or '--version' option that writes the current Artistic Style version.

### 1.4.0 (3 January 1999)

- MAJOR NEW CHANGE IN THE FORMAT OF OPTIONS:
  Options are now either short one-letter options starting with '-', or long multi-letter options starting with '--'. The Short one-letter options MAY BE ATTACHED TOGETHER. Thus, writing '-bps4' is the same as writing '-b -p -s4'.
  Many options that have up to now had a 2 letter format now retain only their long format. I truly believe that the combination of attached-one-letter options PLUS a default option's file containing long-letter-options related to style will be much easier to work with than the previous setup.
- Added support for a default options file (pointed to by the ARTISTIC_STYLE_OPTIONS environment variable).
- Changed downloading method from the server. From now, there will be specific directories containing the latest stable sources, stable binaries, and development sources.
- Space padding ('-p' or '--pad') now works correctly (1) around semicolons and commas, (2) between headers that require parentheses after them (such as 'if', 'while'...)and those parentheses, and (3) after parentheses (unless immediately followed by a ';' or ',' or '.') .
- From now on, namespace blocks are NOT indented by default. To indent namespace blocks use the new '--indent-namespaces' option.
- Added options '--errors-to-standard-output' for redirection of standard-error to standard-output from within Artistic Style, and '--suffix=' for specifying a suffix other than '.orig' to append to original filenames..
- Corrected indentation of 'default' in switch statements. (Up to now, this only worked correctly in java mode...).

### 1.2.0 (19 December 1998)

- Artistic Style 1.2.0 is the first stable result of a new version numbering, in which development versions are numbered with an odd minor number (such as 1.1.x), and stable versions are numbered with an even number (1.2.x). Thus, version 1.2.0 accumulates all the additions/changes of the 1.1.x development versions of Artistic Style.
- A new '-ol' formatting mode that eliminates breaking of one-line blocks.
- Fixed a SERIOUS bug, which resulted in wrong formatting of brackets ('{', '}') that came IMMEDIATELY AFTER definition type brackets, (e.g. brackets that come right after 'class', 'interface', 'name-space', etc ...). This bug was mistakenly introduced when I set out to correctly space-pad pointer and reference signs, somewhere in version 0.9.x .
- Fixed unwanted elimination of final empty lines.
- Fixed broken indentation of virgin opening-brackets that occur immediately after a previous closing-bracket.
- Fixed space-padding to not insert a space in front of ':' characters unless they are a part of a '? ... : ' statement.

### 1.0.5 (11 December 1998)

- 'extern' blocks now handled correctly.
- Fixed handling of ^= in '-p' mode.
- Win32 executables now contain wildcard expansion. *** Look at the README.TXT for info on how to include wildcard expansion abilities when compiling Artistic Style under Win32. (Thanks for the info on wildcard-expansion enabling, Nat!!!)

### 1.0.4 (2 December 1998)

- Fixed unwanted space-padding around urinary minuses and '-' symbols within exponents (e.g. 2.5E-5) when using the '-p' option.

### 1.0.3 (1 December 1998)

- Control characters now remain in the indented file.
- Fixed a bug in which long quoted white-space sequences where mistakenly eliminated in the '-p' mode.
- Fixed unwanted line-breaks in '-ab -p' mode, that in some cases occurred between '//' and the rest of a line comment.
- Fixed handling of '>>=', '<<= ' in '-p' mode.

### 1.0.2 (27 November 1998)

- Fixed a SERIOUS bug of missing needed line-breaks in lines immediately after line-comments when in '-ab' mode.
- Support for the 'finally' header.
- lines that contain only white-space now become empty lines.

### 1.0.1 (26 November 1998)

- Fixed a SERIOUS bug, which lacked a needed line-break between closing brackets and the headers that follow them (e.g. '} else') when in '-bb' mode. In fixing the bug, I used a variation on a patch sent by Richard Bullington - THANKS!
- Fixed a set of SERIOUS bugs which inserted an empty line into both the start and end of the reindented file.
- Improved documentation of formatting options in the file astyle.html .

### 1.0.0 (24 November 1998)

- Indented files now retain the original file name, while the original pre-indented file is saved with a ".orig"at its end. Thus, after the call "astyle -bb foo.cpp", the newly indented file will be called "foo.cpp", while a file called "foo.cpp.orig" will contain the original pre-indented file.
- Artistic Style may now be used and /or modified and/or distributed under EITHER the "Artistic License", or the GNU General Public License (GPL).
- Methods with headers that end with 'const' are now properly indented.
- Cleaner, more robust, and better documented source code.

### 0.9.2

- Fixed a serious bug which led to a maximal supported source code line size of 128 characters!!!
- Maximal supported line size is now 1024 characters.
- Fixed a serious bug in the handling of brackets inside '#define' statements.
- Fixed a serious bug in which '#include' files containing slashes (i.e. #include <foo_dir/foo> ) where space-padded when using option '-p' on C, C++ files.

### 0.9.1

- Much improved space-padding around pointers ('*') and references ('&') and the 'operator' key-word in C and C++ source files when using the '-p' space padding option.
- Fixed several pointer handling bugs which led to potential core dumps.
- Version 0.9.1 now includes all the abilities I am planning for the final 1.0 version, and should be looked at as the first pre-release version of Artistic Style.

### 0.9.0

- Added a formatting layer (ASFormatter.cpp) around the indentation layer (ASBeautifier.cpp).
- As a result, the following formatting capabilities have been added:
- - Bracket ('{' and '}') placement in either ANSI C style or Java style.
  - Space padding around operators, i.e. (1+2)*3-4 becomes ( 1 + 2 ) * 3 - 4 .
- Fixed the 'tab' elimination bug introduced in ASBeautifier 0.8.2 .
- Fixed a bug which under-indented class headers containing inheritance info.

### In ASBeautifier 0.8.2

- Fixed indentation problem in brackets around 'struct', and 'union' blocks.
- Added recognition for '\' characters in the end of lines.
- Improved indentation of post-method-declaration variable initializations.
- Several minor bug fixes.

### In ASBeautifier 0.8.1

- Fixed an important bug in pointer arithmetic which resulted both in phantom indentation errors, and in core-dumps when trying to indent java files.

### In ASBeautifier 0.8.0

- This is the first public release of ASBeautifier. It is a direct port to C++ of JSBeautifier 1.1.1, PLUS extensions to for C++ indentation.
- So far, very little beta-testing has been done for the C++ extensions. This should change extremely with the open-source release (this was the case with JSBeautifier...), so expect ASBeautifier to become bug-free fast!!!
- The C++ source code is not yet written in optimal quality. I rushed a little so that I could release this initial release as soon as possible. This will soon change.