./devel/astyle, Automatic formatter for C, C++, C++/CLI, C#, and Java

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ]


Branch: CURRENT, Version: 3.6.19, Package name: astyle-3.6.19, Maintainer: schmonz

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, and 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 a code that up to now used only tabs for indentation.

Since the NUMBER of space characters showed on screen for each tab
character in the source code changes between editors (until the
user sets up the number to his liking...), one of the standard
problems facing programmers when moving from one source code editor
to another is that code containing both spaces and tabs that was
up to now perfectly indented, suddently becomes a mess to look at
when changing to another editor. Even if you as a programmer take
care to ONLY use spaces or tabs, looking at other peoples source
code can still be problematic.

To address this problem I have created Artistic Style - a series
of filters, written in C++, that automatically reindent & reformat
C/C++/Java source files. These can be used from a command line, or
it can be incorporated as classes in another C++ program.


Required to build:
[pkgtools/cwrappers]

Master sites:

Filesize: 222.643 KB

Version history: (Expand)


CVS history: (Expand)


   2026-10-16 23:05:14 by Amitai Schleier | Files touched by this commit (2) | Package updated
Log message:
astyle: update to 3.6.19. Changes:

### 3.6.19

* Prevent reading of files with lossy path name encoding conversion
* Fix indent within extern C blocks
* Refactored vector memory handling

### 3.6.18

* Added option pad-semicolon=none (--unpad-semicolon) to remove space
  padding before a semicolon
* Fix unpad-paren being suppressed for the remainder of a file after a
  typedef struct
* Fix statement alignment with noexcept keyword and -xb option
* Reduced the documented command-line option surface: trimmed
  pure-synonym spellings (e.g. style=bsd/break) and composite shortcut
  options (--pad-paren, --pad-brackets, --break-blocks=all) from
  --help/the man page/shell completions; all previously accepted
  option spellings still parse identically. Also fixed
  --attach-extern-c's short form, which collided with -xk and had
  never worked; it is now -xa.
* Added optional "in"/"out" parameters to --pad-paren and \ 
--pad-brackets
  (e.g. --pad-paren=in) to replace --pad-paren-in/--pad-paren-out and
  --pad-brackets-in/--pad-brackets-out; the older option names still
  work but are no longer documented.
* Extended the same "option=value" consolidation to more option pairs:
  --pad-paren=none, --pad-brackets=none, --pad-method-prefix=none,
  --pad-return-type=none, --pad-param-type=none,
  --break-return-type=decl and --attach-return-type=decl now replace
  --unpad-paren, --unpad-brackets, --unpad-method-prefix,
  --unpad-return-type, --unpad-param-type, --break-return-type-decl and
  --attach-return-type-decl respectively; the older option names still
  work but are no longer documented.

### 3.6.17

* Added option remove-braces=one-line
* Fix address-of after a pointer cast padding
* Added sanitation of terminal output
* Added new file pattern option --include and auto-detect local
  project options
* Added new options --style=none --indent=none
* Added empty line before first method without all option
* Added the "no-indent-if-after-else" and "line-between-members"
  parameters
* Added new option --max-code-length-mode=ignore-side-comments
* Fix indent of upcoming long lines with total mode
* Apply more consistent indentation after line wrap
* Fixed `--align-pointer=name` for Function Arguments.

### 3.6.16

* Fix regression: incorrect spacing for negative return literal
  with type cast
* Fix regression: function signature opening bracket indentation
  collapses

### 3.6.15

* Fix indent of consecutive variable assignments
* Fix pad-oper after a function call
* Fix indent of function calls within initializer lists
* Added parameter max-code-length-mode to add indent count to line
  length for line wrapping
* Fix indent of code following C# verbatim triple quotes
* Set C++17 language standard for all VS project configurations

### 3.6.14

* Fix indent after comma with align-pointer=type option
* Fix preprocessor indent with align-pointer=type option
* Fix padding of C# template delimiters with --pad-oper
* Fix indent of concatenated raw strings
   2025-11-17 12:01:43 by Thomas Klausner | Files touched by this commit (709)
Log message:
*: switch all sourceforge HOMEPAGEs to https
   2025-10-28 17:25:23 by Amitai Schleier | Files touched by this commit (2) | Package updated
Log message:
astyle: update to 3.6.13. Changes:

- Fix indent of continued string literal as argument
- Fix regression related to template delimters
   2025-08-18 04:41:38 by Amitai Schleier | Files touched by this commit (2) | Package updated
Log message:
astyle: update to 3.6.12. Changes:

- Improved complex lambda body indentation
   2025-07-27 17:38:58 by Amitai Schleier | Files touched by this commit (2) | Package updated
Log message:
astyle: update to 3.6.11. Changes:

- Fix comment recognition after macro definition
- Fix indent of switch statements within structs
- Improved lambda body indentation
- Ignore lines with git conflict markers
- Replaced platform file functions by C++ filesystem library
   2025-06-25 19:04:54 by Amitai Schleier | Files touched by this commit (1)
Log message:
astyle: needs C++17 and <filesystem>. Hopefully fixes NetBSD 9 build.
   2025-05-21 20:30:35 by Amitai Schleier | Files touched by this commit (6) | Package updated
Log message:
astyle: update to 3.6.9, and take MAINTAINER. Changes:

3.6.9

* Fix --mode parameter in generation script
* disable old isInTemplate flag only within structs

3.6.8

* Adjust --break-blocks to break structs and functions only with _all_ option
* Fix space between pointer references with --align-pointer=type
* Define <<< and >>> operators for Java only
* Fix indentation of class modifiers within structs
* Fix parsing of nested structs
* Another approach to fix interpretation of closing nested templates as operator
* Fix indent of multiline strings with macros

3.6.7

* Add --error-on-changes option
* Add c++17 flags in VS2022 project files; avoid VS2022 compilation warnings
* Prevent --squeeze-ws of removing whitespace before comments
* Adjust --pad-include to ignore macros in include directives
* Adjust --pad-include section in the docs
* Fix interpretation of closing nested templates as operator
* Use standard filesystem API to retrieve absolute file paths
* Add operator --preserve-ws
* Disable --unpad-paren in structs for leading whitespace
* Do not remove space after opening parens and align-pointer=type
* Fix issue with --pad-oper and *= operand

3.6.6

* Fix indent after assignment operators (correct cause)
* Adjust delete-empty-lines feature description
* Support non-English versions of VS2022 in CMakeLists

3.6.5

* Add option --accept-empty-list
* Fix indent regression due to method extraction
* Fix indent in blocks after assignment operators
* Fix indent of multi line strings after preprocessor or comment sections
* Fix indent after assignment operators
* Fix --align-pointer=middle with existing whitespace

3.6.4

* Fix indent of brace initializers within constructor init list
* Improve indent of continued string literals
* Fix space after opening paren for GSC
* Update astyle.html layout
* Add deprecation hint for --html
* Update install docs
* Delete old IDE project files
* Move build/cmake scripts content into main CMakeLists.txt

3.6.3

* Fix indent after single open parenthse
* Fix padding of operator char * methods
* Fix padding of user defined type cast
* Fix bitfield line break with macros
* Fix GSC modulo padding
* Removed flawed option --add-braces=nested

3.6.2

* Reverted alignment of user defined types using --align-pointer

3.6.1

* Fix setting of --pad-negation and --pad-include options
* Fix --pad-include with UTF-8 BOM
* Improve multiplication recognition with --align-pointer=type
* Improve --align-pointer=type after parens and brackets
* Removed VMS compilation options
* Updated JNI interface to use Arduino IDE conventions

3.6

* Add option --pad-include
* Combined GHC and GSC style options
* Improve combination of --align-pointer=type and --pad-oper
* Improve multiplication recognition with --align-pointer=type
* Update compiler options in build files
* Fix indent of assignments within macros

3.5.2

* Fix library compilation errors

3.5.1

* Fix crash concerning macro continuation
* Fix EOL handling for Windows builds
* Fix GSC comment recognition
* Fix MSVC compiler warnings

3.5

* Add option --pad-negation
* Apply align-pointer=type only if type is present
* Avoid deletion of empty lines after continuation
* Fix alignment of logical AND operators
* Fix recognition of Java/C# multi line strings

3.4.16

* Fix padding of scientific notation literals
* Fix of reference args alignment

3.4.15

* Fix parsing of floating point literals
* Fix "--break-block" handling of class and function blocks
* Fix "--align-pointer=type" option for all types in lambda parameter lists
* Fix padding of lambda capture with align-pointer option
* Exclude files ending with backup suffix from input file names list

3.4.14

* Fix split references with "-k1" option
* Fix "--align-pointer=type" option for fundamental types in lambda \ 
parameter lists
* Fix "--indent-after-parens" indent count

3.4.13

* Fix comment indent after string macro with R suffix
* Do not break single line block after enum in mozilla mode
* Adjust cmake policy for new versions only
* Update man page path
* Add support for scikit-build-core

3.4.12

* Add "--pad-brackets-in" and "--pad-brackets-out" options
* Fix indentation of initializer lists
* Fix crash with "--add-braces=nested" applied to if-else blocks

3.4.11

* Add new option "--add-braces=nested" to add braces in nested single \ 
line statements
* Fix indent after double template brackets
* Fix indent after dot
* Option "--squeeze-lines=1" is no longer default with Linux builds
* Add experimental GHC mode
* Fix indent after raw string

3.4.10

* Fix missing indent in function parameter list

3.4.9

* Apply one wording for Objective-C in the docs
* Fix more CS regressions
* Fix inserting space with combined "--pad-oper" and \ 
"--align-pointer" options

3.4.8

* Fix lambda broken brace after auto keyword
* Fix line break after comment in asm block
* Fix padding of multiply operator
* Fix indentation of method calls
* Fix empty line after closing while block
* Add outer padding for empty parens pairs
* Fix more CS regressions

3.4.6

* Add VS2022 project files
* Fix CS regressions
* Add CS coalesce assignment operator

3.4.1

* Fix padding of & following a comma
* Fix indent of function declarations following access modifiers
* Fix indent of C# allocation blocks
* Fix indentation of comments after CS interpolation quotes

3.4

* Fix formatting of CS interpolation literals
* Fix false lambda recognition
* Fix indentation of member declarations
* Fix indentation of struct assignments
* Add new option "--indent-lambda" to enable new lambda recognition
* Add link to astyle Python distribution projects

3.3

* Add new option "--squeeze-ws" to remove superfluous whitespace \ 
(experimental)
* Add new option "--squeeze-lines" to remove superfluous empty lines \ 
(experimental)
* Add new options "--pad-brackets" and "--unpad-brackets" to \ 
add or
  remove whitespace around square brackets (experimental)
* Fix indent of lambda bodies in fct calls
* Fix indent of struct names including "struct"
* Fix indent of C++11 initializer lists
* Fix padding of pointers separated by comma
* Refactor namespace std usage

3.2.1

* Fix struct recognition related to SF #534

3.2

* Add new option "style=webkit" for the WebKit brace style.
* Improve recognition of pointer variable types.
* Change CMake files to the "modern" format.
* Fix formatting of raw string literals with the opening '(' at the \ 
end of line
* Fix indentation of comments in a preprocessor define indented with tabs
* Fix vector limit segfault with g++-8, recursive, and -D_GLIBCXX_ASSERTIONS
* Refactoring:
  * Extract new method for options in ASOptions class to avoid compiler limits.
  * Change vector push_back to emplace_back except for vector<bool>.
  * Changes from clang-tidy to modernize code.
* added man page
* removed deprecated options
* added shell completion scripts
* added "--mode=js" option
* added INVALID_TYPE constant
* removed upper limit of "max-continuation-indent"
* fixed raw string parsing
* fixed recognition of rvalue operator as reference
* fixed reverting effect of AttachReturnType option
* fixed padding of dereference operator
* added C++ spaceship operator
* fixed case indent after enum return value
* fixed space deletion when aligning ref value name
* fixed reverting effect of maxCodeLength and AttachReturnType options
* fixed break of continued preprocessor strings with colon
* fixed struct bitfield indentation
* replace PATH_MAX by realpath
* fixed negative integer literal breaks initializer list
* fixed documentation of --delete-empty-lines short option
* fixed project file search
* fixed indent of ObjectiveC statements
* fixed parsing of C# interpolation strings
* fixed break-blocks format after struct
* fixed project file search with wildcard input paths
* better description for stat errors
* applied IT localization patch
* improved DE localization
   2021-10-26 12:20:11 by Nia Alarie | Files touched by this commit (3016)
Log message:
archivers: Replace RMD160 checksums with BLAKE2s checksums

All checksums have been double-checked against existing RMD160 and
SHA512 hashes

Could not be committed due to merge conflict:
devel/py-traitlets/distinfo

The following distfiles were unfetchable (note: some may be only fetched
conditionally):

./devel/pvs/distinfo pvs-3.2-solaris.tgz
./devel/eclipse/distinfo eclipse-sourceBuild-srcIncluded-3.0.1.zip