Compare commits

...
243 Commits
Author SHA1 Message Date
saalen b6342ef6a3 updated docs 2024-08-09 16:06:27 +02:00
saalen b83740a620 updated version 2024-08-09 16:06:16 +02:00
saalen b714d5e4e4 combined GHC and GSC style options 2024-08-09 15:44:07 +02:00
saalen c4365b0cb3 https://sourceforge.net/p/astyle/tickets/578/ improve combination of --align-pointer=type and --pad-oper 2024-08-09 13:42:38 +02:00
saalen 6eb1268718 https://sourceforge.net/p/astyle/tickets/572/ improve multiplication recognition with --align-pointer=type 2024-08-06 15:31:53 +02:00
saalen 200d373cb7 update compiler options in build files 2024-08-02 13:56:08 +02:00
André Simon f05cf51b77 Merge branch 'gcc_build_fix' into 'master'
build/gcc: Fix Makefile to use c++17

See merge request saalen/astyle!12
2024-07-29 19:44:51 +00:00
Lars Wendler e1024fd185 build/gcc: Fix Makefile to use c++17
or else build breaks like this:

  astyle.h:332:44: error: ‘std::string_view’ has not been declared
    332 |         const std::string* findHeader(std::string_view line, int i,
        |                                            ^~~~~~~~~~~
2024-07-29 14:13:58 +02:00
André Simon e3910ee5f9 Merge branch 'cwhii-master-patch-22673' into 'master'
Add link to source code on gitlab #49

See merge request saalen/astyle!11
2024-07-11 07:34:06 +00:00
CW Holeman II 7ed82c2a70 Add link to source code on gitlab 2024-07-08 20:44:57 +00:00
saalen 7899f6637d https://gitlab.com/saalen/astyle/-/issues/47 fix indent of assignments within macros 2024-07-08 16:09:51 +02:00
Andre Simon a3c26f4a3e https://sourceforge.net/p/astyle/tickets/117/ adjust pad-include to adhere to indent-preproc-block
Signed-off-by: Andre Simon <as@andre-simon.de>
2024-07-06 16:53:30 +02:00
André Simon ea6b45b5df Merge branch 'bai/3.5.1-fixes' into 'master'
#48 fix(astyle_main.cpp): fix build against recent changes

See merge request saalen/astyle!10
2024-07-05 05:40:17 +00:00
Mingcong Bai 2c9258da22 fix(astyle_main.cpp): fix parseOption() usage against a recent change
This method used to take two parameters, now it only takes one.

Fixes: 5146121caa
2024-07-04 23:01:07 +08:00
Mingcong Bai 7e0e06dca5 fix(astyle_main.cpp): fix build against a recent change
Fixes: 8aeea822b9
2024-07-04 22:58:36 +08:00
Andre Simon 16fd02b032 update docs
Signed-off-by: Andre Simon <as@andre-simon.de>
2024-06-30 15:02:46 +02:00
Andre Simon 178d5286da #46 added gsc mode
Signed-off-by: Andre Simon <as@andre-simon.de>
2024-06-30 14:57:36 +02:00
Andre Simon 5146121caa https://sourceforge.net/p/astyle/bugs/575 fix VS19 compiler warnings 2024-06-30 11:22:57 +02:00
saalen 614e75d706 https://sourceforge.net/p/astyle/tickets/117/ added pad-include options 2024-06-24 14:26:43 +02:00
saalen cbac1114a4 updated docs 2024-06-20 15:59:15 +02:00
saalen 8aeea822b9 https://gitlab.com/saalen/astyle/-/issues/43 keep initial EOL for file name input 2024-06-19 15:31:24 +02:00
André Simon 5d96c868ac fix binary mode of stdin/stdout in Windows builds 2024-06-18 22:11:30 +02:00
saalen 96b8fde1d8 https://gitlab.com/saalen/astyle/-/issues/43 improve EOL handling, keep initial EOL 2024-06-18 15:54:29 +02:00
saalen 85b24a1e01 https://gitlab.com/saalen/astyle/-/issues/43 improve EOL handling 2024-06-18 15:38:20 +02:00
saalen bfa423b949 https://sourceforge.net/p/astyle/bugs/574/ update docs 2024-06-18 15:36:49 +02:00
saalen 893a433aa7 https://sourceforge.net/p/astyle/bugs/574/ fix crash 2024-06-17 17:01:32 +02:00
saalen 3524d66639 #42 fix recognition of Java/C# multi line strings 2024-06-05 14:42:43 +02:00
saalen 3f3f90b577 updated version number 2024-06-04 16:27:41 +02:00
saalen af17f3b833 https://sourceforge.net/p/astyle/bugs/571 add option --pad-negation=before 2024-06-04 16:16:23 +02:00
saalen 88a2903caf https://sourceforge.net/p/astyle/bugs/571 add option --pad-negation in bash completion 2024-06-03 16:22:35 +02:00
saalen 4154588caf https://sourceforge.net/p/astyle/bugs/571 add option --pad-negation in help messages 2024-06-03 16:18:34 +02:00
saalen 9369c8455f https://sourceforge.net/p/astyle/bugs/571 add option --pad-negation 2024-06-03 15:27:10 +02:00
saalen aa7e2febec https://sourceforge.net/p/astyle/bugs/573/ apply align-pointer=type only if type is present 2024-06-03 14:51:15 +02:00
saalen 4e72cf7e15 updated docs 2024-06-03 14:51:15 +02:00
saalen 683a618343 https://sourceforge.net/p/astyle/bugs/574/ avoid deletion of empty lines after continuation 2024-06-03 14:51:01 +02:00
saalen 422985f01b https://sourceforge.net/p/astyle/bugs/572/ fix alignment of logical and operators 2024-06-03 12:52:57 +02:00
saalen 9fd80e1abe updated docs and version 2024-05-16 11:15:42 +02:00
saalen 485382e2aa https://gitlab.com/saalen/astyle/-/issues/35 fix of reference args alignment 2024-05-16 11:13:13 +02:00
saalen b27cccdb9d https://sourceforge.net/p/astyle/bugs/570/ fix padding of scientific notation literals 2024-05-14 23:09:36 +02:00
saalen 8c69e067ec fix padding of lambda capture with align-pointer option 2024-05-07 13:04:16 +02:00
saalen b09b2355e0 https://sourceforge.net/p/astyle/bugs/560/ exclude files ending with backup suffix from input file names list 2024-05-03 15:59:06 +02:00
saalen 86532b948f https://gitlab.com/saalen/astyle/-/issues/35 fix of --align-pointer=type option for all types in lambda parameter lists 2024-05-03 13:14:17 +02:00
saalen 3623229876 https://sourceforge.net/p/astyle/bugs/569/ fix --break-block handling of class and function blocks 2024-05-03 09:37:56 +02:00
saalen bac6279b26 https://sourceforge.net/p/astyle/bugs/566/ fix parsing of floating point literals 2024-05-02 17:09:29 +02:00
Andre Simon 050c108c28 updated astyle readme 2024-04-28 18:01:57 +02:00
saalen bcf5bb4a5e removed getIndentedLineReturn method 2024-04-17 17:16:27 +02:00
saalen 9a77b83a8b enabled C++17 compiler switch 2024-04-09 17:38:46 +02:00
saalen fd449b0e5e replaced const string refs by string_view parameters 2024-04-09 17:27:18 +02:00
saalen 803ba0955a https://gitlab.com/saalen/astyle/-/issues/24 add cmake option to disable documentation installation 2024-04-05 16:05:06 +02:00
saalen 086ed3a3d3 https://gitlab.com/saalen/astyle/-/issues/29 fix of --indent-after-parens indent count 2024-04-04 17:00:44 +02:00
saalen 9af46ccc6c https://gitlab.com/saalen/astyle/-/issues/35 fix of --align-pointer=type option for fundamental types in lambda parameter lists 2024-04-04 16:21:55 +02:00
saalen 04aabdd005 https://sourceforge.net/p/astyle/bugs/565/ fixed split references with -k1 option 2024-03-28 13:27:32 +01:00
saalen 15cf1e018b Merge branch 'master' of gitlab.com:saalen/astyle 2024-03-06 13:01:51 +01:00
saalen f32c555bc1 https://sourceforge.net/p/astyle/bugs/564/ fixed documentation 2024-03-06 12:16:10 +01:00
saalen 7e97becbcf update documentation and notes 2024-03-06 12:07:16 +01:00
saalen 21b58e214e #39 fix comment indent after string macro with R suffix 2024-03-06 12:00:40 +01:00
saalen 16c4a56aa4 #38 do not break single line block after enum in mozilla mode 2024-03-06 10:52:33 +01:00
saalen aa58fe1aa4 #40 adjust cmake policy for new versions only 2024-03-05 15:59:52 +01:00
André Simon 87e0136e5f Merge branch 'master' into 'master'
News page: Fix typo, add last release dates

See merge request saalen/astyle!9
2024-02-24 06:39:44 +00:00
Peu 3bdf5fb041 News page: Fix typo, add last release dates 2024-02-24 06:39:43 +00:00
André Simon b66f3cb173 Merge branch 'master' into 'master'
support scikit-build-core

See merge request saalen/astyle!8
2024-02-12 15:21:55 +00:00
Wu Zhenyu 055c06d4c5 support scikit-build-core
refer https://github.com/scikit-build/scikit-build-core/issues/632#issuecomment-1936946228
we must patch code to avoid more issues down the line
2024-02-10 17:12:38 +08:00
Wu Zhenyu 93605a0147 change /usr/man to /usr/share/man to respect standard 2024-02-10 17:12:12 +08:00
saalen 1c27f34918 https://gitlab.com/saalen/astyle/-/issues/36 fixed addition of closing brace within statement blocks 2024-02-02 17:19:14 +01:00
saalen 96bd14dee1 https://gitlab.com/saalen/astyle/-/issues/36 fixed addition of closing brace after multi line statements 2024-02-01 16:49:20 +01:00
saalen 90499c92cf https://gitlab.com/saalen/astyle/-/issues/36 fixed crash with opening block in next line 2024-01-30 21:21:51 +01:00
saalen cf95606462 updated docs 2024-01-30 16:32:30 +01:00
saalen 05502078e1 https://gitlab.com/saalen/astyle/-/issues/36 fixed crash with --add-braces=nested applied to if-else blocks 2024-01-26 16:22:59 +01:00
saalen 95c9e4f6db https://gitlab.com/saalen/astyle/-/issues/33 added --pad-brackets-in and --pad-brackets-out options 2024-01-19 16:40:02 +01:00
saalen 619081a737 https://gitlab.com/saalen/astyle/-/issues/28 fixed indentation of initializer lists 2024-01-16 10:37:57 +01:00
saalen 3f2b5c92a0 https://gitlab.com/saalen/astyle/-/issues/27 updated notes.html 2024-01-05 17:28:54 +01:00
saalen 99ceeb79b4 https://gitlab.com/saalen/astyle/-/issues/27 avoid assertion error if brace already exists 2024-01-05 17:26:21 +01:00
saalen bbf726c605 https://gitlab.com/saalen/astyle/-/issues/27 add new option --add-braces=nested to add braces around nested one line stmts 2024-01-05 16:59:46 +01:00
saalen 2987c9b361 https://gitlab.com/saalen/astyle/-/issues/28 fix indent of struct members with dot prefix 2024-01-03 16:19:54 +01:00
saalen 48b574fccf updated notes.html 2024-01-02 17:27:41 +01:00
saalen 15ae8d6bdb https://gitlab.com/saalen/astyle/-/issues/28 fix indent after double template brackets 2024-01-02 17:18:19 +01:00
saalen 58710b4b86 https://gitlab.com/saalen/astyle/-/issues/28 fix indent after dot 2024-01-02 15:10:36 +01:00
Andre Simon d31b289c0d https://sourceforge.net/p/astyle/bugs/559/ fix CI pipeline 2024-01-01 21:35:36 +01:00
Andre Simon 9c6e9f942a https://sourceforge.net/p/astyle/bugs/559/ change squeeze line counter int type 2024-01-01 21:24:26 +01:00
André Simon 8218a855f7 https://sourceforge.net/p/astyle/bugs/559/ initialize squeeze line counter 2024-01-01 20:58:57 +01:00
saalen 9a26f1e6d4 https://gitlab.com/saalen/astyle/-/issues/31 add experimental GHC mode 2023-12-29 16:53:22 +01:00
saalen 6f8e619193 https://gitlab.com/saalen/astyle/-/issues/32 fix indent after raw string 2023-12-29 16:01:41 +01:00
saalen a2056ddf70 https://gitlab.com/saalen/astyle/-/issues/26 disable for another approach 2023-11-30 16:52:39 +01:00
saalen c988613837 https://gitlab.com/saalen/astyle/-/issues/26 apply only to C syntax 2023-11-28 15:33:59 +01:00
saalen cea7932ed4 https://gitlab.com/saalen/astyle/-/issues/26 fix indent of switch blocks 2023-11-27 16:38:56 +01:00
saalen 05a5acaf64 https://gitlab.com/saalen/astyle/-/issues/26 fix indent of labels within functions returning a struct 2023-11-27 14:25:06 +01:00
saalen 774bf30237 https://sourceforge.net/p/astyle/bugs/558/ fixed some typos 2023-11-10 16:28:09 +01:00
saalen 824d4b7991 https://gitlab.com/saalen/astyle/-/issues/16 fixed missing indent in function parameter list 2023-10-19 18:17:11 +02:00
saalen 3818cc1def fixed CI script 2023-10-16 17:20:16 +02:00
saalen 3905a70a59 updated astyle paths in CI test scripts 2023-10-16 17:17:23 +02:00
saalen e2870b5171 https://sourceforge.net/p/astyle/bugs/557 fixed inserting space with combined --pad-oper and --align-pointer=type option 2023-10-16 13:27:30 +02:00
saalen 859f868f26 https://sourceforge.net/p/astyle/bugs/557 fixed inserting space with combined --pad-oper and --align-pointer options 2023-10-16 13:20:24 +02:00
André Simon 5b302bf3fa Merge branch 'master' into 'master'
Master

See merge request saalen/astyle!7
2023-10-13 14:37:25 +00:00
CW Holeman II 86f28be2b8 Merge branch astyle:master into master 2023-10-12 17:57:44 +00:00
cwhii 2eb37a49f6 #21 backed out style as not for HTML comments. 2023-10-12 10:56:11 -07:00
André Simon 797da683e5 Merge branch 'master' into 'master'
Master

See merge request saalen/astyle!6
2023-10-10 13:49:03 +00:00
CW Holeman II da93cd3051 Merge branch astyle:master into master 2023-10-09 14:29:45 +00:00
cwhii b0c8794ad0 #21 Use CSS white-space/nowrap rather than special dash charcter in HTML files. 2023-10-09 07:25:28 -07:00
André Simon 025ad91b75 Merge branch 'master' into 'master'
Master

See merge request saalen/astyle!5
2023-10-05 16:10:22 +00:00
saalen 45833e5e1b https://sourceforge.net/p/astyle/bugs/97/ fixed multi line assignment indentation 2023-10-04 16:30:01 +02:00
saalen 51bb19097d simplified code 2023-10-04 16:29:15 +02:00
cwhii 2cee63dd71 #21 Spell Objective-C consistently. 2023-10-03 14:54:05 -07:00
cwhii c00b836e3c Spell Objective-C consistently. 2023-10-03 14:42:43 -07:00
CW Holeman II d83f96a5b4 Merge branch astyle:master into master 2023-10-02 17:58:31 +00:00
cwhii 9db81c02ce Typo. 2023-10-02 10:15:44 -07:00
saalen 1084cdaf92 updated version 2023-09-29 16:13:29 +02:00
saalen ae991ee51c https://gitlab.com/saalen/astyle/-/issues/16 fix line break with several array initializers in a single line block 2023-09-29 16:09:55 +02:00
saalen 1e727f453d Merge branch 'master' of gitlab.com:saalen/astyle 2023-09-28 16:52:35 +02:00
saalen 77ff0d844f https://gitlab.com/saalen/astyle/-/issues/16 fix line break after casting within an if block 2023-09-28 16:52:21 +02:00
André Simon 1b2631e578 Merge branch 'master' into 'master'
Force ASCIIdoc to passthru C++ w/o formatting.

See merge request saalen/astyle!4
2023-09-27 21:04:51 +00:00
cwhii 2f60ecae3b Forse ASCIIdoc to passthru C++ w/o formatting. 2023-09-27 13:59:26 -07:00
saalen 44da67c6fb https://gitlab.com/saalen/astyle/-/issues/19 improved expressions in docs 2023-09-22 09:34:37 +02:00
saalen 7cf2c8e678 updated version 2023-09-21 17:13:07 +02:00
saalen 9ab14f1f50 https://gitlab.com/saalen/astyle/-/issues/19 added new option --pad-empty-paren 2023-09-21 17:11:37 +02:00
saalen 3368b0bc16 updated version and notes 2023-09-21 16:39:38 +02:00
saalen 80070921d5 https://gitlab.com/saalen/astyle/-/issues/16 fix line break after set variable name 2023-09-21 16:25:53 +02:00
saalen 223a8a765c https://gitlab.com/saalen/astyle/-/issues/16 adjusted indent count 2023-09-18 22:30:39 +02:00
saalen 3ed3247931 https://gitlab.com/saalen/astyle/-/issues/18 fixed empty line after switch block 2023-09-15 14:18:32 +02:00
saalen 537c3d10d3 https://gitlab.com/saalen/astyle/-/issues/19 added outer padding for emtpy parens pairs 2023-09-14 20:33:04 +02:00
saalen 55ff6e9425 https://sourceforge.net/p/astyle/bugs/556 fixed astyle docs 2023-09-13 16:10:54 +02:00
saalen 52f0e25f7f https://gitlab.com/saalen/astyle/-/issues/18 fixed empty line after closing while block - new approach 2023-09-13 16:09:02 +02:00
saalen 061c17f5e8 updated version and notes 2023-09-08 16:38:36 +02:00
saalen e1fc3515a5 https://sourceforge.net/p/astyle/bugs/434/ fixed indentation of method calls - avoid more regressions 2023-09-08 14:25:44 +02:00
saalen 664168e298 https://sourceforge.net/p/astyle/bugs/434/ fixed indentation of method calls - avoid regression 2023-09-08 13:41:19 +02:00
saalen 2d1a88565e https://sourceforge.net/p/astyle/bugs/434/ fixed indentation of method calls 2023-09-07 16:48:07 +02:00
saalen c8a2db74c9 https://gitlab.com/saalen/astyle/-/issues/18 fixed empty line after closing while block 2023-09-04 16:34:25 +02:00
saalen c7b4dbcea1 https://sourceforge.net/p/astyle/bugs/554 fixed lambda broken brace after auto keyword 2023-09-01 16:04:28 +02:00
saalen ca002bd04d https://sourceforge.net/p/astyle/bugs/226 fixed line break after comment in asm block 2023-09-01 15:18:58 +02:00
saalen 5e6a58a962 https://sourceforge.net/p/astyle/bugs/126 fixed padding of multiply operator 2023-08-31 16:14:02 +02:00
saalen ebbd504e0f fix CS padding in array method invocation 2023-08-24 14:49:50 +02:00
saalen 4bdeb795e7 https://gitlab.com/saalen/astyle/-/issues/16 updated version 2023-08-24 14:17:02 +02:00
saalen 3e849512f2 https://gitlab.com/saalen/astyle/-/issues/16 fixed line break in value list 2023-08-23 17:13:05 +02:00
saalen 09f0e26cd5 https://gitlab.com/saalen/astyle/-/issues/16 delete unused variable 2023-08-22 14:19:56 +02:00
saalen 62e13df4f2 https://gitlab.com/saalen/astyle/-/issues/16 fixed CS indent of array init lists within parentheses 2023-08-22 14:15:49 +02:00
saalen 75500584dd https://gitlab.com/saalen/astyle/-/issues/16 reverted some changes to avoid regressions 2023-08-21 16:43:15 +02:00
saalen 37e62ef92e https://gitlab.com/saalen/astyle/-/issues/16 fixed CS indent after new keyword in using clause 2023-08-18 14:33:42 +02:00
saalen ff64d03617 https://sourceforge.net/p/astyle/bugs/553/ fixed block breaks in lambda blocks 2023-08-18 13:50:56 +02:00
saalen 8c4c45aa5e #8 fixed formatting of CS interpolation literals - testing for escaped quote 2023-08-17 18:07:43 +02:00
saalen 803e9aa64e https://gitlab.com/saalen/astyle/-/issues/16 fixed CS indent after new keyword in if clause 2023-08-17 17:13:34 +02:00
saalen 2843dfde8f https://gitlab.com/saalen/astyle/-/issues/16 fixed CS indent after new keyword checking for header types 2023-08-16 14:44:28 +02:00
saalen fad44e2ee7 https://gitlab.com/saalen/astyle/-/issues/16 fixed CS indent after new keyword 2023-08-15 15:36:45 +02:00
saalen 3067304024 https://gitlab.com/saalen/astyle/-/issues/17 added C# coalesce operator #2 2023-08-11 16:27:08 +02:00
saalen 91d458cc25 updated version and notes 2023-08-11 16:17:04 +02:00
saalen 4b25cf7cea https://gitlab.com/saalen/astyle/-/issues/17 added C# coalesce operator 2023-08-11 15:48:02 +02:00
saalen 6152d3d67c https://gitlab.com/saalen/astyle/-/issues/16 new approach 2023-08-11 15:36:37 +02:00
Andre Simon 59ea063e6e fix typos of codespell report 2023-08-03 18:14:46 +02:00
saalen da71161dda updated version and notes 2023-08-02 09:24:41 +02:00
André Simon 6f12728575 Merge branch 'master' into 'master'
Moved squeeze-lines option and added VS2022

See merge request saalen/astyle!3
2023-08-02 07:18:57 +00:00
saalen 41da8a746b https://gitlab.com/saalen/astyle/-/issues/16 updated notes 2023-08-01 17:57:01 +02:00
saalen 32fba0e9b5 https://gitlab.com/saalen/astyle/-/issues/16 C# fixed indentation of comments after interpolation quotes 2023-08-01 17:53:37 +02:00
saalen 9a0ff6b2a1 https://gitlab.com/saalen/astyle/-/issues/14 added TODO hints 2023-08-01 17:26:08 +02:00
elverimu 8a1f941db1 moved squeeze-lines option, so it can be used in library 2023-08-01 15:52:52 +02:00
elverimu 688d706f3e added VS2022 solutions 2023-08-01 15:52:35 +02:00
saalen 19850fcdb6 https://sourceforge.net/p/astyle/bugs/464/ fixed indent of C# allocation blocks 2023-07-05 16:20:02 +02:00
saalen d93540a274 https://sourceforge.net/p/astyle/bugs/504/ fixed indent of function declarations following access modifiers 2023-06-26 12:11:44 +02:00
saalen 30cf6f3baa code reformatting 2023-06-23 14:20:08 +02:00
saalen 75d3e4ed62 https://sourceforge.net/p/astyle/bugs/552/ fixed padding of & following a comma 2023-06-23 14:10:27 +02:00
Andre Simon 82fd2d21c7 updated notes 2023-06-16 21:42:37 +02:00
saalen 3675f954b6 https://sourceforge.net/p/astyle/bugs/353/ fix indent after new in previous line #2 2023-06-15 17:02:25 +02:00
saalen 5551b2b25b https://sourceforge.net/p/astyle/bugs/353/ fix indent after new in previous line 2023-06-14 16:14:35 +02:00
saalen 221457c348 updated astyle docs and shell completion 2023-06-14 10:31:25 +02:00
saalen 21a892b5b5 updated notes 2023-06-14 10:08:56 +02:00
saalen a372130733 #6 updated docs 2023-06-14 10:01:48 +02:00
saalen 69c8c34f43 https://gitlab.com/saalen/astyle/-/issues/12 fixed indentation of struct assignments 2023-06-14 10:01:14 +02:00
saalen 8e66ef8de3 #10 fixed indentation of member declarations 2023-06-12 13:57:20 +02:00
saalen e0963a5233 #11 fixed false lambda recognition 2023-06-12 11:44:57 +02:00
saalen 8f421ab582 #7 added new option --indent-lambda to to enable new lambda recognition 2023-06-12 11:44:21 +02:00
saalen 28f2c87919 #8 fixed formatting of CS interpolation literals 2023-06-06 13:37:05 +02:00
André Simon 90232de96e Merge branch 'std_namespace' into 'master'
Add missing std namespace

See merge request saalen/astyle!2
2023-05-24 12:31:51 +00:00
Antoine Belvire c03fe1133f Add missing std namespace
Fixes build on Linux.
2023-05-24 10:38:10 +00:00
saalen 0ffb5e4426 updated version string 2023-05-17 11:10:34 +02:00
saalen aa9a8beafa https://sourceforge.net/p/astyle/bugs/487/ fixed indent of brace initializer with new 2023-05-15 16:46:49 +02:00
saalen 56ddd730d9 updated release notes 2023-05-11 16:00:03 +02:00
André Simon 2ad0c5176a Merge branch 'meson_compat' into 'master'
Small CMake changes to make compatible with meson

See merge request saalen/astyle!1
2023-05-07 12:01:11 +00:00
Jacob Alexander c3383ee125 Small CMake changes to make compatible with meson
- Meson requires all subprojects to have a top-level build file
  (meson.build or CMakeLists.txt) to use them as a dependency.
- Also added a CMP0112 policy to disable warning in newer versions of CMake
2023-05-05 12:02:44 -07:00
saalen 204cf3d702 updated release notes 2023-05-05 16:51:22 +02:00
saalen 9bcfd5174e added new --pad-brackets and --unpad-brackets options 2023-05-05 16:17:57 +02:00
saalen 297825af4a https://sourceforge.net/p/astyle/bugs/537/ fixed padding of pointers separated by comma, checking for open parens 2023-05-02 14:19:18 +02:00
saalen c246d5ae46 updated help message 2023-04-24 16:41:04 +02:00
saalen 5e85ad4283 https://sourceforge.net/p/astyle/tickets/84/ added new --squeeze-lines option 2023-04-20 17:57:39 +02:00
saalen 631e24f690 https://gitlab.com/saalen/astyle/-/issues/4 fixed a regression related to #534 2023-04-20 16:46:27 +02:00
saalen df1613046f https://gitlab.com/saalen/astyle/-/issues/3 fixed a regression related to #534 2023-04-19 16:44:43 +02:00
saalen af89dfd3cb added new --squeeze-ws option 2023-04-18 17:11:35 +02:00
saalen 62713fe165 updated notes.html 2023-04-15 14:53:14 +02:00
saalen 0add646b21 refactored namespace std usage 2023-04-14 16:26:59 +02:00
saalen bb885d22ba https://sourceforge.net/p/astyle/bugs/516/ fixed indent of C++11 initializer lists 2023-04-14 14:54:24 +02:00
saalen 3f467c58de https://sourceforge.net/p/astyle/tickets/121/ fixed indent of lambda bodies in fct calls - new approach 2023-04-12 16:29:51 +02:00
saalen 8edb11ab09 version set to 3.3 beta 2023-04-06 16:52:58 +02:00
saalen 7171c3a9ec https://sourceforge.net/p/astyle/tickets/121/ fixed indent of lambda bodies in fct calls 2023-04-04 17:14:30 +02:00
saalen 62ed88a770 https://sourceforge.net/p/astyle/bugs/526/ fixed struct name indent 2023-04-04 15:24:19 +02:00
saalen 2e9fe14947 https://sourceforge.net/p/astyle/bugs/534/ fixed indent of struct initializer lists 2023-03-31 15:58:26 +02:00
saalen a865024320 Merge branch 'master' of gitlab.com:saalen/astyle 2023-03-31 14:21:10 +02:00
saalen 0c3eb8ec46 updated notes.html 2023-03-31 14:15:54 +02:00
saalen 785d52fa55 updated version number 2023-03-31 14:15:29 +02:00
saalen b637cbb6d2 #2 https://sourceforge.net/p/astyle/bugs/534/ fixed yet another regression 2023-03-31 14:03:32 +02:00
Andre Simon 9ae2751ce4 fixed merge conflict 2023-03-29 20:14:48 +02:00
saalen 3cf316a785 added local development.html 2023-03-29 15:13:25 +02:00
saalen a5b17494e3 added check for undefined HOME env var 2023-03-29 15:13:04 +02:00
saalen 6c530550af updated docs; version string 2023-03-28 17:12:39 +02:00
saalen fdbae61b21 updated astyle.html 2023-03-27 17:30:02 +02:00
saalen fd13fe36d5 updated news and notes 2023-03-27 16:02:08 +02:00
saalen a62e84df90 https://sourceforge.net/p/astyle/bugs/518/ fixed break-blocks format after struct 2023-03-24 16:26:43 +01:00
saalen 06ab3e60a1 added Objective C to conditions 2023-03-24 15:47:31 +01:00
Andre Simon 555b106346 Merge branch 'master' of https://gitlab.com/saalen/astyle 2023-03-15 20:30:52 +01:00
saalen 0d3113cfbb https://sourceforge.net/p/astyle/bugs/525/ avoid regression of align-method-colon 2023-03-15 17:27:06 +01:00
saalen 63973c381d fix pad-method-colon options in ObjectiveC mode 2023-03-15 14:07:05 +01:00
Andre Simon 9d566d77d4 Merge branch 'master' of https://gitlab.com/saalen/astyle 2023-03-14 17:48:34 +01:00
saalen f5c48f89e2 updated css definitions 2023-03-14 16:31:18 +01:00
Andre Simon 34a2afaa7e added undefined home env var check 2023-03-05 18:01:39 +01:00
saalen 26d2c5e1d6 https://sourceforge.net/p/astyle/bugs/525/ fix indent of ObjectiveC statements 2023-03-02 16:07:33 +01:00
saalen 61621517fc https://sourceforge.net/p/astyle/bugs/483/ fix parsing of C# interpolation strings 2023-03-01 16:00:08 +01:00
saalen 010c88cbee added INVALID_TYPE constant 2023-03-01 14:04:28 +01:00
Andre Simon 66796b7075 added man page to file install list 2023-02-27 21:25:43 +01:00
Andre Simon ff3cf03bb3 https://sourceforge.net/p/astyle/bugs/541/ fixed project file search on Linux 2023-02-27 20:40:39 +01:00
Andre Simon 529b93f073 fixed help messages of pad-param-type options 2023-02-23 21:32:15 +01:00
Andre Simon caafa42ade added shell completion scripts 2023-02-23 21:24:14 +01:00
saalen 378dda7c97 added --mode=objc option 2023-02-16 18:11:25 +01:00
saalen ceed0550ed updated libs-base test case 2023-02-16 18:11:15 +01:00
Andre Simon 85b22457a2 fixed project file search on Linux (https://sourceforge.net/p/astyle/bugs/541/) 2023-02-12 18:11:41 +01:00
André Simon b439d89c9d fixed project file search on windows (https://sourceforge.net/p/astyle/bugs/541/) 2023-02-12 17:35:39 +01:00
Andre Simon b6d95cc2b1 updated notes 2023-02-11 17:36:50 +01:00
Andre Simon 0a5c3c303e resolved merge conflict 2023-02-11 17:29:47 +01:00
Andre Simon 36c986f08c updated docs 2023-02-11 17:24:58 +01:00
saalen d2ea1dc7e8 reformatted code 2023-02-10 21:29:47 +01:00
saalen 51989e0120 #1 fixed project file search with wildcard input paths 2023-02-10 21:24:23 +01:00
saalen 91b0bcf74e https://sourceforge.net/p/astyle/bugs/546/ removed debug line 2023-02-10 15:55:27 +01:00
saalen 873d7a662e https://sourceforge.net/p/astyle/bugs/546/ fixed regression #2 2023-02-10 15:54:43 +01:00
saalen a2135227e5 https://sourceforge.net/p/astyle/bugs/546/ fixed regression 2023-02-09 12:36:03 +01:00
saalen 4c39b21a70 https://sourceforge.net/p/astyle/bugs/521 revert to avoid indent regression of code lines in #ifdef stmts 2023-02-08 16:50:29 +01:00
saalen fc011d3cc4 https://sourceforge.net/p/astyle/bugs/534/ fixed another regression 2023-02-06 19:23:27 +01:00
saalen 6740158058 https://sourceforge.net/p/astyle/bugs/485 fixed negative integer literal breaks initializer list 2023-02-06 18:45:16 +01:00
saalen 369d247f73 https://sourceforge.net/p/astyle/bugs/508 fixed documentation of --delete-empty-lines short option 2023-02-06 18:19:44 +01:00
saalen 946cc2d878 https://sourceforge.net/p/astyle/bugs/521 fixed preprocessor indentation 2023-02-06 17:58:49 +01:00
saalen 92bdbe869e https://sourceforge.net/p/astyle/bugs/534/ fixed regression 2023-02-06 17:54:31 +01:00
saalen 83b32c8ea9 https://sourceforge.net/p/astyle/bugs/521/ applied patch to fix preprocessor indentation 2023-02-05 20:14:16 +01:00
saalen 76431ab6db https://sourceforge.net/p/astyle/bugs/541/ fixed project file search 2023-02-05 19:44:37 +01:00
saalen 74bdc62e4b updated notes.html 2023-02-05 19:10:48 +01:00
saalen 44d857e88b https://sourceforge.net/p/astyle/tickets/130/ better description for stat errors 2023-02-05 17:28:38 +01:00
saalen c413186c0d https://sourceforge.net/p/astyle/bugs/533/ fixed break of continued preprocessor strings with colon 2023-02-05 17:13:50 +01:00
saalen a7304fb036 Merge branch 'master' of gitlab.com:saalen/astyle 2023-02-04 19:46:23 +01:00
saalen cb6953049f https://sourceforge.net/p/astyle/bugs/534/ fixed struct bitfield indentation 2023-02-04 19:43:31 +01:00
saalen 9816287f87 added man page to cmake install list 2023-02-04 19:42:04 +01:00
Andre Simon 903b1b0b9a added README.adoc in project root 2023-01-30 18:50:27 +01:00
97 changed files with 12000 additions and 3659 deletions
+1 -1
View File
@@ -7,4 +7,4 @@ AStyleTest/file-py/*.tmp
AStyleTest/file-py/*.pyc
AStyleTest/file-py/test-diff.txt
AStyleTest/file-py/test.txt
AStyle/src/.idea/
+17
View File
@@ -0,0 +1,17 @@
# Specify the docker image to use (only used if using docker runners)
# See: http://doc.gitlab.com/ee/ci/docker/using_docker_images.html
image: debian:stable-slim
# Define commands that run before each job's script
before_script:
- apt-get update
- apt-get install -y make gcc g++ cmake
compile:
script:
- cd AStyle/
- mkdir build_local && cd build_local
- cmake .. && make
- cd ../../AStyleTest/regression-sh/
# Verify that our compiled app works properly with a custom "test" script
- bash ./run_tests.sh
+5
View File
@@ -1,4 +1,9 @@
cmake_minimum_required(VERSION 3.8)
if(CMAKE_VERSION VERSION_GREATER "3.19.0")
cmake_policy(SET CMP0112 OLD)
endif()
project(astyle CXX)
include( build/cmake/Options.cmake REQUIRED )
+1 -1
View File
@@ -3,7 +3,7 @@ Instructions for using Artistic Style are included in the *doc* directory.
The file **install.html** contains instructions for compiling and
installing Artistic Style.
The file **astyle.html**' contains information on using Artistic Style.
The file **astyle.html** contains information on using Artistic Style.
The files **news.html** and **notes.html** contain information on changes
made to the various releases.
+2 -2
View File
@@ -16,7 +16,7 @@
<Compiler>
<Add option="-Wall" />
<Add option="-g" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-Wextra" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
@@ -34,7 +34,7 @@
<Add option="-O3" />
<Add option="-Weverything" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-Wextra" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
+2 -2
View File
@@ -14,7 +14,7 @@
<Compiler>
<Add option="-Weverything" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-g" />
<Add option="-Wextra" />
<Add option="-fno-rtti" />
@@ -51,7 +51,7 @@
<Add option="-fPIC" />
<Add option="-O3" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-Wextra" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
+2 -2
View File
@@ -15,7 +15,7 @@
<Add option="-fPIC" />
<Add option="-Wall" />
<Add option="-g" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-Wextra" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
@@ -34,7 +34,7 @@
<Add option="-fPIC" />
<Add option="-O3" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-Wextra" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
+3 -3
View File
@@ -19,7 +19,7 @@
<Compiler>
<Add option="-Wall" />
<Add option="-g" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-Wextra" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
@@ -34,7 +34,7 @@
<Compiler>
<Add option="-O3" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-Wextra" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
@@ -59,7 +59,7 @@
<Add option="-Weverything" />
<Add option="-Wall" />
<Add option="-g" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-Wextra" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
+2 -2
View File
@@ -16,7 +16,7 @@
<Compiler>
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-g" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
@@ -34,7 +34,7 @@
<Add option="-O3" />
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
<Add option="-DNDEBUG" />
+2 -2
View File
@@ -14,7 +14,7 @@
<Compiler>
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fPIC" />
<Add option="-g" />
<Add option="-fno-rtti" />
@@ -39,7 +39,7 @@
<Add option="-O3" />
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fPIC" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
+2 -2
View File
@@ -14,7 +14,7 @@
<Compiler>
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fPIC" />
<Add option="-g" />
<Add option="-fno-rtti" />
@@ -34,7 +34,7 @@
<Add option="-O3" />
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fPIC" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
+4 -4
View File
@@ -15,7 +15,7 @@
<Compiler>
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-g" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
@@ -31,7 +31,7 @@
<Add option="-O3" />
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
<Add option="-DNDEBUG" />
@@ -64,7 +64,7 @@
<Add option="-pedantic" />
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fno-exceptions" />
<Add option="-fno-rtti" />
<Add option="-Wconversion" />
@@ -92,7 +92,7 @@
<Compiler>
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-pg" />
<Add option="-g" />
<Add option="-fprofile-arcs" />
+2 -2
View File
@@ -19,7 +19,7 @@
<Add option="-g" />
<Add option="-Wextra" />
<Add option="-fno-exceptions" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-DASTYLE_LIB" />
</Compiler>
</Target>
@@ -36,7 +36,7 @@
<Add option="-Wall" />
<Add option="-Wextra" />
<Add option="-fno-exceptions" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-wd11074,11076" />
<Add option="-DNDEBUG" />
<Add option="-DASTYLE_LIB" />
+2 -2
View File
@@ -17,7 +17,7 @@
<Add option="-g" />
<Add option="-Wextra" />
<Add option="-fno-exceptions" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fPIC" />
<Add option="-DASTYLE_JNI" />
<Add directory="/usr/lib/jvm/default-java/include" />
@@ -39,7 +39,7 @@
<Add option="-Wall" />
<Add option="-Wextra" />
<Add option="-fno-exceptions" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fPIC" />
<Add option="-wd11074,11076" />
<Add option="-DASTYLE_JNI" />
+2 -2
View File
@@ -18,7 +18,7 @@
<Add option="-Wextra" />
<Add option="-fno-exceptions" />
<Add option="-fPIC" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-DASTYLE_LIB" />
</Compiler>
<Linker>
@@ -38,7 +38,7 @@
<Add option="-Wextra" />
<Add option="-fno-exceptions" />
<Add option="-fPIC" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-wd11074,11076" />
<Add option="-DASTYLE_LIB" />
<Add option="-DDNDEBUG" />
+2 -2
View File
@@ -17,7 +17,7 @@
<Add option="-Wall" />
<Add option="-g" />
<Add option="-fno-exceptions" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-Wextra" />
</Compiler>
</Target>
@@ -32,7 +32,7 @@
<Add option="-O3" />
<Add option="-Wall" />
<Add option="-fno-exceptions" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-Wextra" />
<Add option="-wd11074,11076" />
<Add option="-DNDEBUG" />
+2 -2
View File
@@ -16,7 +16,7 @@
<Compiler>
<Add option="-Weverything" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-g" />
<Add option="-Wextra" />
<Add option="-fno-rtti" />
@@ -45,7 +45,7 @@
<Add option="-O3" />
<Add option="-Weverything" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-Wextra" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
+2 -2
View File
@@ -14,7 +14,7 @@
<Compiler>
<Add option="-Weverything" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-g" />
<Add option="-Wextra" />
<Add option="-fno-rtti" />
@@ -41,7 +41,7 @@
<Add option="-O3" />
<Add option="-Weverything" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-Wextra" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
+4 -4
View File
@@ -14,13 +14,13 @@
<Compiler>
<Add option="-Weverything" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-g" />
<Add option="-Wextra" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
<Add option="-fpic" />
<Add option="-Wno-c++11-long-long" />
<Add option="-Wno-c++17-long-long" />
<Add option="-Wno-c++98-compat" />
<Add option="-Wno-c++98-compat-pedantic" />
<Add option="-Wno-exit-time-destructors" />
@@ -48,12 +48,12 @@
<Add option="-O3" />
<Add option="-Weverything" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-Wextra" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
<Add option="-fpic" />
<Add option="-Wno-c++11-long-long" />
<Add option="-Wno-c++17-long-long" />
<Add option="-Wno-c++98-compat" />
<Add option="-Wno-c++98-compat-pedantic" />
<Add option="-Wno-exit-time-destructors" />
+2 -2
View File
@@ -15,7 +15,7 @@
<Compiler>
<Add option="-Weverything" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-g" />
<Add option="-Wextra" />
<Add option="-fno-rtti" />
@@ -44,7 +44,7 @@
<Add option="-O3" />
<Add option="-Weverything" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-Wextra" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
+3 -3
View File
@@ -15,7 +15,7 @@
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-g" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
<Add option="-DASTYLE_LIB" />
@@ -33,7 +33,7 @@
<Add option="-O3" />
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
<Add option="-DNDEBUG" />
@@ -71,7 +71,7 @@
<Add option="-Wint-to-pointer-cast" />
<Add option="-Woverloaded-virtual" />
<Add option="-Wwrite-strings" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fno-exceptions" />
<Add option="-fno-rtti" />
<Add option="-DASTYLE_LIB" />
+3 -3
View File
@@ -15,7 +15,7 @@
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-g" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
<Add option="-DASTYLE_JNI" />
@@ -35,7 +35,7 @@
<Add option="-O3" />
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
<Add option="-DNDEBUG" />
@@ -75,7 +75,7 @@
<Add option="-Wint-to-pointer-cast" />
<Add option="-Woverloaded-virtual" />
<Add option="-Wwrite-strings" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fno-exceptions" />
<Add option="-fno-rtti" />
<Add option="-DASTYLE_JNI" />
+2 -2
View File
@@ -17,7 +17,7 @@
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-g" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
<Add option="-DASTYLE_LIB" />
@@ -34,7 +34,7 @@
<Add option="-O3" />
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
<Add option="-DNDEBUG" />
+4 -4
View File
@@ -16,7 +16,7 @@
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-g" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
</Compiler>
@@ -30,7 +30,7 @@
<Add option="-O3" />
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fno-rtti" />
<Add option="-fno-exceptions" />
<Add option="-DNDEBUG" />
@@ -66,7 +66,7 @@
<Add option="-Wint-to-pointer-cast" />
<Add option="-Woverloaded-virtual" />
<Add option="-Wwrite-strings" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-fno-exceptions" />
<Add option="-fno-rtti" />
</Compiler>
@@ -79,7 +79,7 @@
<Compiler>
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-std=c++17" />
<Add option="-pg" />
<Add option="-g" />
<Add option="-fprofile-arcs" />
+2 -2
View File
@@ -39,14 +39,14 @@ endif
bindir = bin
objdir = obj
ipath=$(prefix)/bin
CBASEFLAGS = -Wall -Wextra -fno-rtti -fno-exceptions -std=c++11
CBASEFLAGS = -Wall -Wextra -fno-rtti -fno-exceptions -std=c++17
JAVAINCS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
INSTALL=install -o $(USER) -g $(USER)
# Library's major version number -- Increment in case of incompatible API
# change.
MAJORVER = 3
# Library's minor version number -- Increment when functionnality is added in a
# Library's minor version number -- Increment when functionality is added in a
# backward-compatible manner; reset to 0 when major number changes.
MINORVER = 2
# Library's patch version number -- Increment in case of backward-compatible
+4 -4
View File
@@ -1,8 +1,8 @@
# Set default compile options for supported compilers
if(APPLE)
target_compile_options( astyle PRIVATE -W -Wall -fno-rtti -fno-exceptions -std=c++11 -stdlib=libc++)
target_compile_options( astyle PRIVATE -W -Wall -fno-rtti -fno-exceptions -std=c++17 -stdlib=libc++)
elseif(NOT WIN32) # Linux
target_compile_options(astyle PRIVATE -Wall -Wextra -fno-rtti -fno-exceptions -std=c++11)
target_compile_options(astyle PRIVATE -Wall -Wextra -fno-rtti -fno-exceptions -std=c++17)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "gnu")
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (NOT (GCC_VERSION VERSION_GREATER 4.6 OR GCC_VERSION VERSION_EQUAL 4.6))
@@ -13,8 +13,8 @@ elseif(NOT WIN32) # Linux
target_compile_options(astyle PRIVATE -wd11074,11076)
endif()
elseif(MINGW)
target_compile_options(astyle PRIVATE -Wall -Wextra -fno-rtti -fno-exceptions -std=c++11)
elseif(BORLAND) # Release must be explicitely requested for Borland
target_compile_options(astyle PRIVATE -Wall -Wextra -fno-rtti -fno-exceptions -std=c++17)
elseif(BORLAND) # Release must be explicitly requested for Borland
target_compile_options(astyle PRIVATE -q -w -x-) # Cannot use no-rtti (-RT-)
endif()
+17 -3
View File
@@ -3,12 +3,21 @@
# Default linux install prefix is /usr/local"
# This may be modified by -DCMAKE_INSTALL_PREFIX=
# Default Win32 install prefix is not used (C:/Program Files (x86))
option(INSTALL_DOC ON)
if(BUILD_SHARED_LIBS OR BUILD_STATIC_LIBS)
if(NOT WIN32)
install(TARGETS astyle DESTINATION lib)
endif()
else()
if(WIN32)
if(SKBUILD)
install(TARGETS astyle DESTINATION "${SKBUILD_SCRIPTS_DIR}")
if(INSTALL_DOC)
install(FILES ${DOCS} DESTINATION "${SKBUILD_DATA_DIR}/share/doc/astyle/html")
install(FILES ${MAN} DESTINATION "${SKBUILD_DATA_DIR}/share/man/man1")
endif()
elseif(WIN32)
set(pf86 "PROGRAMFILES(x86)")
set(prog_files $ENV{${pf86}})
if(NOT ${prog_files})
@@ -19,13 +28,18 @@ else()
elseif(APPLE)
# install to the default /usr/local/bin because of SIP restrictions
install(TARGETS astyle DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
install(FILES ${DOCS} DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/astyle/html")
if(INSTALL_DOC)
install(FILES ${DOCS} DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/astyle/html")
endif()
else()
# change default to /usr/bin, the same as package installs
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "/usr")
endif()
install(TARGETS astyle DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
install(FILES ${DOCS} DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/astyle/html")
if(INSTALL_DOC)
install(FILES ${DOCS} DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/astyle/html")
install(FILES ${MAN} DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1")
endif()
endif()
endif()
+4 -1
View File
@@ -10,7 +10,7 @@ endif()
# Linux Soname Version
set(MAJORVER 3)
set(MINORVER 2)
set(MINORVER 5)
set(PATCHVER 0)
set(SOLIBVER ${MAJORVER}.${MINORVER}.${PATCHVER})
@@ -25,6 +25,9 @@ list(APPEND DOCS
doc/notes.html
doc/styles.css)
list(APPEND MAN
man/astyle.1)
# Define java as a shared library
if(BUILD_JAVA_LIBS)
set(BUILD_SHARED_LIBS ON)
+2 -2
View File
@@ -36,14 +36,14 @@ SYSCONF_PATH=$(prefix)/share/doc/astyle
bindir = bin
objdir = obj
ipath=$(prefix)/bin
CBASEFLAGS = -Wall -Wextra -fno-rtti -fno-exceptions -std=c++11
CBASEFLAGS = -Wall -Wextra -fno-rtti -fno-exceptions -std=c++17
JAVAINCS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
INSTALL=install -o $(USER) -g $(USER)
# Library's major version number -- Increment in case of incompatible API
# change.
MAJORVER = 3
# Library's minor version number -- Increment when functionnality is added in a
# Library's minor version number -- Increment when functionality is added in a
# backward-compatible manner; reset to 0 when major number changes.
MINORVER = 2
# Library's patch version number -- Increment in case of backward-compatible
+2 -2
View File
@@ -49,14 +49,14 @@ endif
bindir = bin
objdir = obj
ipath=$(prefix)/bin
CBASEFLAGS = -Wall -Wextra -fno-rtti -fno-exceptions -std=c++11
CBASEFLAGS = -Wall -Wextra -fno-rtti -fno-exceptions -std=c++17
JAVAINCS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
INSTALL=install -o $(USER) -g $(USER)
# Library's major version number -- Increment in case of incompatible API
# change.
MAJORVER = 3
# Library's minor version number -- Increment when functionnality is added in a
# Library's minor version number -- Increment when functionality is added in a
# backward-compatible manner; reset to 0 when major number changes.
MINORVER = 2
# Library's patch version number -- Increment in case of backward-compatible
+1 -1
View File
@@ -39,7 +39,7 @@ dynamiclib = -dynamiclib
bindir = bin
objdir = obj
ipath=$(prefix)/bin
CBASEFLAGS = -W -Wall -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions \
CBASEFLAGS = -W -Wall -std=c++17 -stdlib=libc++ -fno-rtti -fno-exceptions \
-mmacosx-version-min=10.9
LDBASEFLAGS =
JAVAINCS = -I/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/include \
+37
View File
@@ -0,0 +1,37 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28516.95
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AStyle", "AStyle\AStyle.vcxproj", "{24189F85-8CB6-4993-8530-855BD6C8B70A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
Static|x64 = Static|x64
Static|x86 = Static|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Debug|x64.ActiveCfg = Debug|x64
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Debug|x64.Build.0 = Debug|x64
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Debug|x86.ActiveCfg = Debug|Win32
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Debug|x86.Build.0 = Debug|Win32
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Release|x64.ActiveCfg = Release|x64
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Release|x64.Build.0 = Release|x64
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Release|x86.ActiveCfg = Release|Win32
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Release|x86.Build.0 = Release|Win32
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Static|x64.ActiveCfg = Static|x64
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Static|x64.Build.0 = Static|x64
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Static|x86.ActiveCfg = Static|Win32
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Static|x86.Build.0 = Static|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C49A012F-6AB6-4660-B927-2AAF54D082AA}
EndGlobalSection
EndGlobal
+37
View File
@@ -0,0 +1,37 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28516.95
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AStyle Dll", "AStyle Dll\AStyle Dll.vcxproj", "{07229666-1841-4021-B206-1A8917985A66}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
Static|x64 = Static|x64
Static|x86 = Static|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{07229666-1841-4021-B206-1A8917985A66}.Debug|x64.ActiveCfg = Debug|x64
{07229666-1841-4021-B206-1A8917985A66}.Debug|x64.Build.0 = Debug|x64
{07229666-1841-4021-B206-1A8917985A66}.Debug|x86.ActiveCfg = Debug|Win32
{07229666-1841-4021-B206-1A8917985A66}.Debug|x86.Build.0 = Debug|Win32
{07229666-1841-4021-B206-1A8917985A66}.Release|x64.ActiveCfg = Release|x64
{07229666-1841-4021-B206-1A8917985A66}.Release|x64.Build.0 = Release|x64
{07229666-1841-4021-B206-1A8917985A66}.Release|x86.ActiveCfg = Release|Win32
{07229666-1841-4021-B206-1A8917985A66}.Release|x86.Build.0 = Release|Win32
{07229666-1841-4021-B206-1A8917985A66}.Static|x64.ActiveCfg = Static|x64
{07229666-1841-4021-B206-1A8917985A66}.Static|x64.Build.0 = Static|x64
{07229666-1841-4021-B206-1A8917985A66}.Static|x86.ActiveCfg = Static|Win32
{07229666-1841-4021-B206-1A8917985A66}.Static|x86.Build.0 = Static|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {71D57643-84DD-4750-89C3-6369BEA22324}
EndGlobalSection
EndGlobal
@@ -0,0 +1,279 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static|Win32">
<Configuration>Static</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static|x64">
<Configuration>Static</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{07229666-1841-4021-B206-1A8917985A66}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>AStyleDll</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)debug\</OutDir>
<TargetName>AStyle32d</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\debug\</OutDir>
<TargetName>AStyle32d</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)bin\</OutDir>
<TargetName>AStyle32</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)binstatic\</OutDir>
<TargetName>AStyle32</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\bin\</OutDir>
<TargetName>AStyle32</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\binstatic\</OutDir>
<TargetName>AStyle32</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;ASTYLE_LIB</PreprocessorDefinitions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<AdditionalOptions>/EXPORT:AStyleMain=_AStyleMain@16
/EXPORT:AStyleMainUtf16=_AStyleMainUtf16@16
/EXPORT:AStyleGetVersion=_AStyleGetVersion@0</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;ASTYLE_LIB</PreprocessorDefinitions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_HAS_EXCEPTIONS=0;ASTYLE_LIB</PreprocessorDefinitions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<ExceptionHandling>false</ExceptionHandling>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>No</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalOptions>/EXPORT:AStyleMain=_AStyleMain@16
/EXPORT:AStyleMainUtf16=_AStyleMainUtf16@16
/EXPORT:AStyleGetVersion=_AStyleGetVersion@0</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_HAS_EXCEPTIONS=0;ASTYLE_LIB</PreprocessorDefinitions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<ExceptionHandling>false</ExceptionHandling>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>No</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalOptions>/EXPORT:AStyleMain=_AStyleMain@16
/EXPORT:AStyleMainUtf16=_AStyleMainUtf16@16
/EXPORT:AStyleGetVersion=_AStyleGetVersion@0</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_HAS_EXCEPTIONS=0;ASTYLE_LIB</PreprocessorDefinitions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<ExceptionHandling>false</ExceptionHandling>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>No</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_HAS_EXCEPTIONS=0;ASTYLE_LIB</PreprocessorDefinitions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<ExceptionHandling>false</ExceptionHandling>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>No</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\ASBeautifier.cpp" />
<ClCompile Include="..\..\..\src\ASEnhancer.cpp" />
<ClCompile Include="..\..\..\src\ASFormatter.cpp" />
<ClCompile Include="..\..\..\src\ASResource.cpp" />
<ClCompile Include="..\..\..\src\astyle_main.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\src\astyle.h" />
<ClInclude Include="..\..\..\src\astyle_main.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\src\astyle.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\astyle_main.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\ASBeautifier.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ASEnhancer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ASFormatter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ASResource.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\astyle_main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
+37
View File
@@ -0,0 +1,37 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28516.95
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AStyle Java", "AStyle Java\AStyle Java.vcxproj", "{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
Static|x64 = Static|x64
Static|x86 = Static|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Debug|x64.ActiveCfg = Debug|x64
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Debug|x64.Build.0 = Debug|x64
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Debug|x86.ActiveCfg = Debug|Win32
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Debug|x86.Build.0 = Debug|Win32
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Release|x64.ActiveCfg = Release|x64
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Release|x64.Build.0 = Release|x64
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Release|x86.ActiveCfg = Release|Win32
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Release|x86.Build.0 = Release|Win32
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Static|x64.ActiveCfg = Static|x64
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Static|x64.Build.0 = Static|x64
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Static|x86.ActiveCfg = Static|Win32
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Static|x86.Build.0 = Static|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A4619C60-3409-478F-B944-70443175BDEB}
EndGlobalSection
EndGlobal
@@ -0,0 +1,285 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static|Win32">
<Configuration>Static</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static|x64">
<Configuration>Static</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>AStyleJava</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)debug\</OutDir>
<TargetName>AStyle32jd</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\debug\</OutDir>
<TargetName>AStyle32jd</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)bin\</OutDir>
<TargetName>AStyle32j</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)binstatic\</OutDir>
<TargetName>AStyle32j</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\bin\</OutDir>
<TargetName>AStyle32j</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\binstatic\</OutDir>
<TargetName>AStyle32j</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;ASTYLE_JNI</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32</AdditionalIncludeDirectories>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<AdditionalOptions>/EXPORT:AStyleMain=_AStyleMain@16
/EXPORT:AStyleMainUtf16=_AStyleMainUtf16@16
/EXPORT:AStyleGetVersion=_AStyleGetVersion@0 %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;ASTYLE_JNI</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32</AdditionalIncludeDirectories>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_HAS_EXCEPTIONS=0;ASTYLE_JNI</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32</AdditionalIncludeDirectories>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ExceptionHandling>false</ExceptionHandling>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>No</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalOptions>/EXPORT:AStyleMain=_AStyleMain@16
/EXPORT:AStyleMainUtf16=_AStyleMainUtf16@16
/EXPORT:AStyleGetVersion=_AStyleGetVersion@0 %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_HAS_EXCEPTIONS=0;ASTYLE_JNI</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32</AdditionalIncludeDirectories>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<ExceptionHandling>false</ExceptionHandling>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>No</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalOptions>/EXPORT:AStyleMain=_AStyleMain@16
/EXPORT:AStyleMainUtf16=_AStyleMainUtf16@16
/EXPORT:AStyleGetVersion=_AStyleGetVersion@0 %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_HAS_EXCEPTIONS=0;ASTYLE_JNI</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32</AdditionalIncludeDirectories>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ExceptionHandling>false</ExceptionHandling>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>No</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_HAS_EXCEPTIONS=0;ASTYLE_JNI</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32</AdditionalIncludeDirectories>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<ExceptionHandling>false</ExceptionHandling>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>No</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\ASBeautifier.cpp" />
<ClCompile Include="..\..\..\src\ASEnhancer.cpp" />
<ClCompile Include="..\..\..\src\ASFormatter.cpp" />
<ClCompile Include="..\..\..\src\ASResource.cpp" />
<ClCompile Include="..\..\..\src\astyle_main.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\src\astyle.h" />
<ClInclude Include="..\..\..\src\astyle_main.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\src\astyle.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\astyle_main.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\ASBeautifier.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ASEnhancer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ASFormatter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ASResource.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\astyle_main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
+37
View File
@@ -0,0 +1,37 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28516.95
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AStyle Lib", "AStyle Lib\AStyle Lib.vcxproj", "{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
Static|x64 = Static|x64
Static|x86 = Static|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Debug|x64.ActiveCfg = Debug|x64
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Debug|x64.Build.0 = Debug|x64
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Debug|x86.ActiveCfg = Debug|Win32
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Debug|x86.Build.0 = Debug|Win32
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Release|x64.ActiveCfg = Release|x64
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Release|x64.Build.0 = Release|x64
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Release|x86.ActiveCfg = Release|Win32
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Release|x86.Build.0 = Release|Win32
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Static|x64.ActiveCfg = Static|x64
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Static|x64.Build.0 = Static|x64
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Static|x86.ActiveCfg = Static|Win32
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Static|x86.Build.0 = Static|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9A55493F-97EF-4723-B937-B41EBB84F52B}
EndGlobalSection
EndGlobal
@@ -0,0 +1,266 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static|Win32">
<Configuration>Static</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static|x64">
<Configuration>Static</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>AStyleLib</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)debug\</OutDir>
<TargetName>AStyleLibd</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)$(Platform)\debug\</OutDir>
<TargetName>AStyleLibd</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)bin\</OutDir>
<TargetName>AStyleLib</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'">
<OutDir>$(SolutionDir)binstatic\</OutDir>
<TargetName>AStyleLib</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)$(Platform)\bin\</OutDir>
<TargetName>AStyleLib</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'">
<OutDir>$(SolutionDir)$(Platform)\binstatic\</OutDir>
<TargetName>AStyleLib</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;ASTYLE_LIB;ASTYLE_NO_EXPORT</PreprocessorDefinitions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;ASTYLE_LIB;ASTYLE_NO_EXPORT</PreprocessorDefinitions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_HAS_EXCEPTIONS=0;ASTYLE_LIB;ASTYLE_NO_EXPORT</PreprocessorDefinitions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<ExceptionHandling>false</ExceptionHandling>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_HAS_EXCEPTIONS=0;ASTYLE_LIB;ASTYLE_NO_EXPORT</PreprocessorDefinitions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<ExceptionHandling>false</ExceptionHandling>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_HAS_EXCEPTIONS=0;ASTYLE_LIB;ASTYLE_NO_EXPORT</PreprocessorDefinitions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<ExceptionHandling>false</ExceptionHandling>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_HAS_EXCEPTIONS=0;ASTYLE_LIB;ASTYLE_NO_EXPORT</PreprocessorDefinitions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<ExceptionHandling>false</ExceptionHandling>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\ASBeautifier.cpp" />
<ClCompile Include="..\..\..\src\ASEnhancer.cpp" />
<ClCompile Include="..\..\..\src\ASFormatter.cpp" />
<ClCompile Include="..\..\..\src\ASResource.cpp" />
<ClCompile Include="..\..\..\src\astyle_main.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\src\astyle.h" />
<ClInclude Include="..\..\..\src\astyle_main.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\src\astyle.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\astyle_main.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\ASBeautifier.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ASEnhancer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ASFormatter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ASResource.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\astyle_main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
+285
View File
@@ -0,0 +1,285 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static|Win32">
<Configuration>Static</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static|x64">
<Configuration>Static</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{24189F85-8CB6-4993-8530-855BD6C8B70A}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>AStyle</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)debug\</OutDir>
<TargetName>AStyled</TargetName>
<RunCodeAnalysis>false</RunCodeAnalysis>
<EnableCppCoreCheck>true</EnableCppCoreCheck>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\debug\</OutDir>
<TargetName>AStyled</TargetName>
<RunCodeAnalysis>false</RunCodeAnalysis>
<EnableCppCoreCheck>true</EnableCppCoreCheck>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)bin\</OutDir>
<TargetName>AStyle</TargetName>
<RunCodeAnalysis>false</RunCodeAnalysis>
<EnableCppCoreCheck>true</EnableCppCoreCheck>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)binstatic\</OutDir>
<TargetName>AStyle</TargetName>
<RunCodeAnalysis>false</RunCodeAnalysis>
<EnableCppCoreCheck>true</EnableCppCoreCheck>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\bin\</OutDir>
<TargetName>AStyle</TargetName>
<RunCodeAnalysis>false</RunCodeAnalysis>
<EnableCppCoreCheck>true</EnableCppCoreCheck>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\binstatic\</OutDir>
<TargetName>AStyle</TargetName>
<RunCodeAnalysis>false</RunCodeAnalysis>
<EnableCppCoreCheck>true</EnableCppCoreCheck>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>_DEBUG</PreprocessorDefinitions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalOptions>/utf-8</AdditionalOptions>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>_DEBUG</PreprocessorDefinitions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalOptions>/utf-8</AdditionalOptions>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_HAS_EXCEPTIONS=0</PreprocessorDefinitions>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OmitFramePointers>true</OmitFramePointers>
<ExceptionHandling>false</ExceptionHandling>
<AdditionalOptions>/utf-8</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>false</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_HAS_EXCEPTIONS=0</PreprocessorDefinitions>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OmitFramePointers>true</OmitFramePointers>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<ExceptionHandling>false</ExceptionHandling>
<AdditionalOptions>/utf-8</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>false</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_HAS_EXCEPTIONS=0</PreprocessorDefinitions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<ExceptionHandling>false</ExceptionHandling>
<AdditionalOptions>/utf-8</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnablePREfast>false</EnablePREfast>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>false</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_HAS_EXCEPTIONS=0</PreprocessorDefinitions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<ExceptionHandling>false</ExceptionHandling>
<AdditionalOptions>/utf-8</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>false</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\ASBeautifier.cpp" />
<ClCompile Include="..\..\..\src\ASEnhancer.cpp" />
<ClCompile Include="..\..\..\src\ASFormatter.cpp" />
<ClCompile Include="..\..\..\src\ASLocalizer.cpp" />
<ClCompile Include="..\..\..\src\ASResource.cpp" />
<ClCompile Include="..\..\..\src\astyle_main.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\src\ASLocalizer.h" />
<ClInclude Include="..\..\..\src\astyle.h" />
<ClInclude Include="..\..\..\src\astyle_main.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\ASBeautifier.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ASEnhancer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ASFormatter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ASLocalizer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ASResource.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\astyle_main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\src\ASLocalizer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\astyle.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\astyle_main.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
+79
View File
@@ -0,0 +1,79 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28516.95
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AStyle", "AStyle\AStyle.vcxproj", "{24189F85-8CB6-4993-8530-855BD6C8B70A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AStyle Dll", "AStyle Dll\AStyle Dll.vcxproj", "{07229666-1841-4021-B206-1A8917985A66}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AStyle Java", "AStyle Java\AStyle Java.vcxproj", "{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AStyle Lib", "AStyle Lib\AStyle Lib.vcxproj", "{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
Static|x64 = Static|x64
Static|x86 = Static|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Debug|x64.ActiveCfg = Debug|x64
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Debug|x64.Build.0 = Debug|x64
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Debug|x86.ActiveCfg = Debug|Win32
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Debug|x86.Build.0 = Debug|Win32
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Release|x64.ActiveCfg = Release|x64
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Release|x64.Build.0 = Release|x64
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Release|x86.ActiveCfg = Release|Win32
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Release|x86.Build.0 = Release|Win32
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Static|x64.ActiveCfg = Static|x64
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Static|x64.Build.0 = Static|x64
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Static|x86.ActiveCfg = Static|Win32
{24189F85-8CB6-4993-8530-855BD6C8B70A}.Static|x86.Build.0 = Static|Win32
{07229666-1841-4021-B206-1A8917985A66}.Debug|x64.ActiveCfg = Debug|x64
{07229666-1841-4021-B206-1A8917985A66}.Debug|x64.Build.0 = Debug|x64
{07229666-1841-4021-B206-1A8917985A66}.Debug|x86.ActiveCfg = Debug|Win32
{07229666-1841-4021-B206-1A8917985A66}.Debug|x86.Build.0 = Debug|Win32
{07229666-1841-4021-B206-1A8917985A66}.Release|x64.ActiveCfg = Release|x64
{07229666-1841-4021-B206-1A8917985A66}.Release|x64.Build.0 = Release|x64
{07229666-1841-4021-B206-1A8917985A66}.Release|x86.ActiveCfg = Release|Win32
{07229666-1841-4021-B206-1A8917985A66}.Release|x86.Build.0 = Release|Win32
{07229666-1841-4021-B206-1A8917985A66}.Static|x64.ActiveCfg = Static|x64
{07229666-1841-4021-B206-1A8917985A66}.Static|x64.Build.0 = Static|x64
{07229666-1841-4021-B206-1A8917985A66}.Static|x86.ActiveCfg = Static|Win32
{07229666-1841-4021-B206-1A8917985A66}.Static|x86.Build.0 = Static|Win32
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Debug|x64.ActiveCfg = Debug|x64
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Debug|x64.Build.0 = Debug|x64
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Debug|x86.ActiveCfg = Debug|Win32
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Debug|x86.Build.0 = Debug|Win32
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Release|x64.ActiveCfg = Release|x64
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Release|x64.Build.0 = Release|x64
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Release|x86.ActiveCfg = Release|Win32
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Release|x86.Build.0 = Release|Win32
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Static|x64.ActiveCfg = Static|x64
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Static|x64.Build.0 = Static|x64
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Static|x86.ActiveCfg = Static|Win32
{4EDD4F9E-2088-4FE1-BDED-9357F05305CB}.Static|x86.Build.0 = Static|Win32
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Debug|x64.ActiveCfg = Debug|x64
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Debug|x64.Build.0 = Debug|x64
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Debug|x86.ActiveCfg = Debug|Win32
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Debug|x86.Build.0 = Debug|Win32
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Release|x64.ActiveCfg = Release|x64
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Release|x64.Build.0 = Release|x64
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Release|x86.ActiveCfg = Release|Win32
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Release|x86.Build.0 = Release|Win32
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Static|x64.ActiveCfg = Static|x64
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Static|x64.Build.0 = Static|x64
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Static|x86.ActiveCfg = Static|Win32
{5CBCE435-6123-4FFA-A5C7-B91EA0FAE44E}.Static|x86.Build.0 = Static|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {33934F68-90BE-4D0F-B5D0-5EEF8F43412D}
EndGlobalSection
EndGlobal
+3 -3
View File
@@ -53,7 +53,7 @@ if [ ! -f install.sh ]; then
exit 1
fi
# remove previous documentaion
# remove previous documentation
echo $CYAN
echo "Installing documentation to $SYSCONF_PATH"
echo -n $YELLOW
@@ -61,12 +61,12 @@ if [ -d $SYSCONF_PATH/html ]; then
rm -rf $SYSCONF_PATH/html
result=$?; check_error
fi
# create documentaion install directory
# create documentation install directory
if [ ! -d $SYSCONF_PATH/html ]; then
$INSTALL -m 755 -d $SYSCONF_PATH/html
result=$?; check_error
fi
# copy documentaion
# copy documentation
for files in astyle.html \
install.html \
news.html \
+482 -312
View File
File diff suppressed because it is too large Load Diff
+157
View File
@@ -0,0 +1,157 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Artistic Style Developer</title>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<link href="../favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!-- body text -->
<h1>Artistic Style Developer Information</h1>
<p class="noindent">
Artistic Style has compile options for creating a shared library (DLL) or static library for use with a Graphical
User Interface (GUI). The shared library can be called from a C++, <span style="white-space: nowrap;">Objective-C</span>, C#, or Python program. There
are also compile options for a Java Native Interface (JNI) that allows it to be called from a Java program. Information
on compiling the various configurations of Artistic Style is in the Install Information.</p>
<p class="noindent">
The following Examples show how to call the Artistic Style shared library using the various programming languages.
They are command line programs and do NOT contain a Graphical User Interface for the Artistic Style options.
</p>
<p class="noindent">
Source code, documentation, and test files for all examples can be downloaded below or obtained from the <a href="subversion.html">source code repositories</a>.
These projects also require the source from Artistic Style in addition to the development examples.
</p>
<h3>Examples</h3>
<p>
Source code from the following examples can be copied and pasted into an editor or development environment for
compiling and running. Or the source code can be downloaded from the "Source Code Downloads" section below. The
code highlighting for the example html pages was done with <a href="http://www.andre-simon.de/"
target="_blank" title="open new window">Highlight</a>.
The examples were formatted with Artistic Style using the Horstmann style.</p>
<p>
<a href="https://astyle.sourceforge.net/develop/cpp.html">Calling Artistic Style from a C++ Program</a> contains information on calling Artistic Style
as a shared or static library from a C++ program. It includes a C++ sample program that can be used to test the
Artistic Style libraries.</p>
<p>
<a href="https://astyle.sourceforge.net/develop/objc.html">Calling Artistic Style from an <span style="white-space: nowrap;">Objective-C</span> Program</a> contains information on calling Artistic
Style as a shared or static library from an <span style="white-space: nowrap;">Objective-C</span> program. It includes an <span style="white-space: nowrap;">Objective-C</span> sample program that
can be used to test the Artistic Style shared libraries.</p>
<p style="margin-left: 0.5in;">
<a href="https://astyle.sourceforge.net/develop/gnustep.html"><span style="white-space: nowrap;">Objective-C</span> on Windows and Linux</a> contains information on compiling and running
<span style="white-space: nowrap;">Objective-C</span> programs using GNUstep. It has instructions for compiling the Example program on Windows or
Linux.</p>
<p>
<a href="https://astyle.sourceforge.net/develop/jni.html">Calling Artistic Style as a Java Native Interface</a> contains information on calling Artistic
Style as a shared library from a Java program using the Java Native Interface (JNI). It includes a Java sample
program that can be used to test the shared library. The Java Development Kit (JDK) must be installed to compile
Artistic Style.</p>
<p>
<a href="https://astyle.sourceforge.net/develop/sharp.html">Calling Artistic Style from a C# Program</a> contains information on calling Artistic Style
as a shared library from a C# program. It includes a C# sample program that can be used to test the shared
library.</p>
<p style="margin-left: 0.5in;">
<a href="https://astyle.sourceforge.net/develop/sharp2.html">Calling Artistic Style from a C# Program Using Explicit Linking</a> contains information
on calling Artistic Style as a shared library from a C# program. It uses explicit linking to do a dynamic load
of the shared library. It includes a C# sample program that can be used to test the shared library.</p>
<p style="margin-left: 0.5in;">
With explicit linking the shared library name can be changed at runtime, allowing the C# program to load
either an x86 or x64 bit shared library. This provides the capability to make the program run on &quot;Any
CPU&quot;. The shared object can also be loaded from any directory, not just the directories searched by the
system.</p>
<p>
<a href="https://astyle.sourceforge.net/develop/python.html">Calling Artistic Style from a Python Script</a> contains information on calling Artistic
Style as a shared library from a Python script. It includes a sample Python script that can be used to test the
shared library.</p>
<h3>Source Code Downloads (old examples)</h3>
<p>
The downloads contain the above example source files and the test data. The test data is the same for all
downloads.</p>
<h4>
<a href="https://sourceforge.net/projects/astyle/files/OldFiles/examples/example-cpp.zip" target="_blank"
title="open new window">C++ Example</a>
</h4>
<p>
The example for C++ contains the methods to call Artistic Style from a static or shared library using a C++ program.
Compile Artistic Style as a static or shared library using the macro ASTYLE_LIB. Copy the shared library to the
same folder as the C++ Example executable. Compile Example.cpp as an executable and link it to the library. It
will format files in the test&#8209;data directory included in the download.</p>
<h4>
<a href="https://sourceforge.net/projects/astyle/files/OldFiles/examples/example-objc.zip" target="_blank"
title="open new window"><span style="white-space: nowrap;">Objective-C</span> Example</a>
</h4>
<p>
The example for <span style="white-space: nowrap;">Objective-C</span> contains the methods to call Artistic Style from a static or shared library
using an <span style="white-space: nowrap;">Objective-C</span> program. Compile Artistic Style as a static or shared library using the macro ASTYLE_LIB.
Copy the shared library to the same folder as the <span style="white-space: nowrap;">Objective-C</span> Example executable. It will format files in
the test&#8209;data directory included in the download.</p>
<h4>
<a href="https://sourceforge.net/projects/astyle/files/OldFiles/examples/example-java.zip" target="_blank"
title="open new window">Java Example</a>
</h4>
<p>
The example for Java includes an AStyleInterface class that calls the shared library using the Java Native Interface
(JNI). Artistic Style must be compiled as a shared library using the macro ASTYLE_JNI. Copy the shared library
to the same folder as the Java class files (it is loaded from the classpath directory). It will format files in
the test&#8209;data directory included in the download.</p>
<h4>
<a href="https://sourceforge.net/projects/astyle/files/OldFiles/examples/example-sharp.zip" target="_blank"
title="open new window">C# Example</a>
</h4>
<p>
This example for C# includes an AStyleInterface class that calls the shared library using a C# program. Compile
Artistic Style as a shared library using the macro ASTYLE_LIB. Copy the shared library to the same folder as the
C# class files (C# does a Windows type search for the shared library, looking first in the startup program's directory).
It will format files in the test&#8209;data directory included in the download.</p>
<h4 style="margin-left: 0.5in;">
<a href="https://sourceforge.net/projects/astyle/files/OldFiles/examples/example-sharp2.zip" target="_blank"
title="open new window">C# Example Using Explicit Linking</a>
</h4>
<p style="margin-left: 0.5in;">
This example for C# includes an AStyleInterface class that calls the shared library using a C# program.
It uses explicit linking to do a dynamic load of the shared library. Compile Artistic Style as a shared library
using the macro ASTYLE_LIB. Copy the shared library to the same folder as the C# class files. It will format files
in the test&#8209;data directory included in the download.</p>
<h4>
<a href="https://sourceforge.net/projects/astyle/files/OldFiles/examples/example-python.zip" target="_blank"
title="open new window">Python Examples</a>
</h4>
<p>
This download contains three Python scripts. The script ExampleExe.py calls an Artistic Style executable to format
C++ source code. The scripts ExampleByte.py and ExampleUnicode.py call the Artistic Style shared library. The
executable and shared library must be compiled using the macro ASTYLE_LIB. Copy the executable and shared library
to the same folder as the Python scripts. They will format files in the test&#8209;data directory included in
the download.</p>
<p style="margin-left: -0.4in; text-align: center;">
<a href="http://sourceforge.net/projects/astyle">
<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2319&type=16" alt="" />
</a></p>
</body>
</html>
+38 -39
View File
@@ -1,24 +1,29 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<!doctype html>
<html lang="en">
<head>
<title>Artistic Style - Index</title>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href="styles.css" rel="stylesheet" type="text/css" />
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
<title>Artistic Style - Index</title>
</head>
<body>
<!-- body text -->
<h1>Artistic Style 3.2</h1>
<h1>Artistic Style</h1>
<h2>
A Free, Fast, and Small Automatic Formatter<br />
for C, C++, C++/CLI, Objective&#8209;C, C#, and Java Source Code
for C, C++, C++/CLI, <span style="white-space: nowrap;">Objective-C</span>, C#, and Java Source Code
</h2>
<center>
@@ -36,14 +41,19 @@
<td>SourceForge:</td>
<td><a href="http://sourceforge.net/projects/astyle/">http://sourceforge.net/projects/astyle/</a></td>
</tr>
<tr>
<td>
<img src="folder-green-git.ico" alt="" /></td>
<td>Source code:</td>
<td><a href="https://gitlab.com/saalen/astyle">https://gitlab.com/saalen/astyle</a></td>
</tr>
</tbody>
</table>
</center>
<p>
&nbsp;</p>
<p class="noindent">
Artistic Style is a source code indenter, formatter, and beautifier for the C, C++, C++/CLI, Objective&#8209;C,
<p class="noindent" style="margin-top: 2em">
Artistic Style is a source code indenter, formatter, and beautifier for the C, C++, C++/CLI, <span style="white-space: nowrap;">Objective-C</span>,
C# and Java programming languages. Written in C++, it can be used from the command line or incorporated as
a library in another program. Options can be entered from the command line or from an option file. The library
version can be called from programs written in languages other that C++.</p>
@@ -52,7 +62,7 @@
<p>
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.</p>
Style is included in the distribution package.</p>
<h3><a href="news.html">News</a> and <a href="notes.html">Release Notes</a></h3>
@@ -77,10 +87,10 @@
executable. Other platforms must compile the project. Follow the instructions for the appropriate platform (Linux,
Mac, or Windows).</p>
<h3><a href="subversion.html">Subversion</a></h3>
<h3><a href="subversion.html">Source Repositories</a></h3>
<p>
The latest development files can be checked out from the Artistic Style repository using Subversion.</p>
The latest development files can be checked out from the Artistic Style repository using Subversion or Git.</p>
<h3><a href="http://opensource.org/licenses/MIT">License</a></h3>
@@ -116,21 +126,21 @@
formatting of the source code, development environments for various platforms, and other software. There
are also links to style information and various style guides.</p>
<h3><a href="http://astyle.sourceforge.net/develop/">Developer Information</a></h3>
<h3><a href="development.html">Developer Information</a></h3>
<p>
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&#8209;C, Java, C#, and Python.</p>
programs for C++, C++/CLI, <span style="white-space: nowrap;">Objective-C</span>, Java, C#, and Python.</p>
<h3>Bug Reports, Change Requests, Update Notifications</h3>
<p>
Bug reports and change requests should be submitted to the Artistic Style <a href="https://sourceforge.net/p/astyle/bugs/">
bug tracker page</a>. You must be logged in to SourceForge to submit a report. Include an example that shows
Bug reports and change requests should be submitted to the <a href="https://sourceforge.net/p/astyle/bugs/">
Sourceforge</a> or <a href="https://gitlab.com/saalen/astyle/-/issues">Gitlab</a> bug trackers. Include an example that shows
the problem, reduced to the minimum that still has the problem. It does not need to be functional code.</p>
<p>
<p><strong>Sourceforge notes:</strong><br>
The bug report <strong>will not be indented</strong>
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 &quot;Formatting Help&quot; button to the left of the ticket form. To
@@ -141,14 +151,13 @@
<a href="https://sourceforge.net/projects/astyle/files/">files page</a>. You can also subscribe after downloading
a file. To the right of the &quot;Me&quot; option in the SourceForge header, there will be a button containing
a number (it may be 0). Click on this to get your &quot;Download History&quot;. Beside the download will be an
option to subscribe. You should receive an email of the file changes.</p>
<p>
To contact the project by email use the address <a href="mailto:jimp03@email.com">jimp03@email.com</a>.</p>
option to subscribe. You should receive an email of the file changes.
</p>
<h3>Maintainers</h3>
<p>
Artistic Style is maintained and updated by <a href="mailto:a.simon@mailbox.org">Andre Simon</a>.
Artistic Style is maintained and updated by <a href="mailto:as@andre-simon.de">Andre Simon</a>.
Previous maintainer: Jim Pattee. The original author was Tal Davidson, Israel.
</p>
@@ -163,27 +172,17 @@
Arne&nbsp;F?rlie, Marvin&nbsp;Humphrey, J, Christopher&nbsp;Sean&nbsp;Morrison, Keith&nbsp;OHara, louis6g, Evmenov&nbsp;Georgiy,
beta100100, Ruzzz, Peter&nbsp;A.&nbsp;Bigot, HyungKi&nbsp;Jeong, David&nbsp;Faure, Carl&nbsp;Moore, Mofi, Travis&nbsp;Vitek,
Bunel&nbsp;Nicolas, Juan&nbsp;Alday, Rian&nbsp;Quinn, David&nbsp;Haney, Tam&aacute;s Kurucsai
for their patches and contributions to Artistic Style.</p>
<p>
Thanks to <strong><a href="http://sourceforge.net">SourceForge</a></strong> for giving Artistic Style its
home.</p>
<p>
Thanks to all the dedicated beta-testers and bug notifiers!</p>
<!-- bottom of document -->
for their patches and contributions to Artistic Style.
</p>
<p>
&nbsp;</p>
Thanks to all the dedicated beta-testers and bug notifiers!
</p>
<p style="margin-left: -0.4in; text-align: center;">
<a href="http://sourceforge.net/projects/astyle">
<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2319&type=16" alt="" />
</a></p>
<p>
&nbsp;</p>
</body>
</html>
+34 -22
View File
@@ -1,23 +1,26 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<!doctype html>
<html lang="en">
<head>
<title>Artistic Style - Install Information</title>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href="styles.css" rel="stylesheet" type="text/css" />
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
<title>Artistic Style - Installation</title>
</head>
<body>
<h1>Artistic Style Install Information</h1>
<p>
&nbsp;</p>
<div style="float: left; background-color: #fbfaef;padding: 2em;">
<h3 id="Contents">Contents</h3>
<h3 id="Contents" style="margin-top: 0em;">Contents</h3>
<p class="contents1">
<a class="contents" href="#_Artistic_Style_Versions">Artistic Style Versions</a></p>
@@ -58,7 +61,13 @@
<p class="contents1">
<a class="contents" href="#_Compiler_Options">Compiler Options</a></p>
<h3 id="_Artistic_Style_Versions">Artistic Style Versions</h3>
<p class="contents2">
<a class="contents" href="#_PIP">Python PIP</a></p>
</div>
<div style="float: right; width: 65%; margin-top: 0em;">
<h3 id="_Artistic_Style_Versions" style="margin-top: 1em;">Artistic Style Versions</h3>
<p>
astyle_x.x_linux.tar.gz is the <strong>Linux </strong>version of Artistic Style. It contains the source code,
@@ -210,7 +219,7 @@ make install</pre>
<h4 id="_Clang_Makefile">Clang Makefile</h4>
<p>
Clang has a static analyzer that finds potential bugs in C/C++ and Objective-C programs. It can be run as a standalone
Clang has a static analyzer that finds potential bugs in C/C++ and <span style="white-space: nowrap;">Objective-C</span> programs. It can be run as a standalone
tool from the command-line and runs in tandem with a build. There is a script file, analyze.sh, that will run
the analysis on Artistic Style.</p>
<p>
@@ -325,7 +334,7 @@ make install</pre>
<li><strong>AStyleA</strong> builds the Artistic Style program as a Static Library (libastyle.a). This can be statically
linked with an executable.</li>
<li><strong>AStyleDylib</strong> builds the Artistic Style program as a Dynamic Library (libastyle.dylib). It can
be used with C/C++, Objective C, C#, and Python programs.</li>
be used with C/C++, <span style="white-space: nowrap;">Objective-C</span>, C#, and Python programs.</li>
<li><strong>AStyleJava</strong> builds the Artistic Style program as a Dynamic Library (libastylej.dylib) that can
be called from a Java program. The Java Development (JDK) is required for the project to compile. The Project
Properties must have an include path to the JDK include directory. The output dylib can also be called from a
@@ -585,18 +594,21 @@ mingw32-make</pre>
option that allows inline function expansion. Runtime Type Information (RTTI) is NOT needed and exceptions are
NOT used. Use whole program optimization if your compiler supports it. There may be other options you can use
depending on the compiler. </p>
<p>
&nbsp;</p>
<h3 id="_PIP">Python PIP</h3>
<p>
There are two projects which enable astyle installation using PIP: <a href="https://github.com/Freed-Wu/astyle-wheel/">astyle-wheel</a> and <a href="https://github.com/igrr/astyle_py">astyle_py (using WASM)</a>.<br>
These are useful to be included in git pre-commit hooks.
</p>
<p style="margin-left: -0.4in; text-align: center;">
<a href="http://sourceforge.net/projects/astyle">
<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2319&type=16" alt="" />
</a></p>
<p>
&nbsp;</p>
<p>
&nbsp;</p>
</div>
</body>
+13 -15
View File
@@ -1,22 +1,24 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<!doctype html>
<html lang="en">
<head>
<title>Artistic Style - Links</title>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href="styles.css" rel="stylesheet" type="text/css" />
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
<title>Artistic Style - Links</title>
</head>
<body>
<h1>Artistic Style Links</h1>
<p>
&nbsp;</p>
<h3>Programs Using Artistic Style</h3>
<p>
@@ -216,15 +218,11 @@
toolset v100). Visual Studio 2012 (platform toolset v110) and higher contains dependencies on Windows API functions
that exist only on Windows Vista, Windows 7, and Windows 8. This means that applications built with Visual Studio
2012 and higher would fail to load and execute on Windows XP.</p>
<p>
&nbsp;</p>
<p style="margin-left: -0.4in; text-align: center;">
<a href="http://sourceforge.net/projects/astyle">
<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2319&type=16" alt="" /></a></p>
<p>
&nbsp;</p>
</body>
</html>
+607 -580
View File
File diff suppressed because it is too large Load Diff
+24 -24
View File
@@ -23,13 +23,13 @@
With a new Artistic Style release some unchanged source files will be formatted because of changes to Artistic
Style. You may want to format your source before making program changes in order to bring it up to date.</p>
<p>
A new programming language, Objective&#8209;C, has been added to Artistic Style. Four new options, "align&#8209;method&#8209;colon",
A new programming language, <span style="white-space: nowrap;">Objective-C</span>, has been added to Artistic Style. Four new options, "align&#8209;method&#8209;colon",
"pad&#8209;method&#8209;colon=", "pad&#8209;method&#8209;prefix", and "unpad&#8209;method&#8209;prefix" have been
added to format the methods. The options are described in a new "Objective&#8209;C" section in the documentation.
These new options affect only Objective&#8209;C source code. They have no effect on the other programming
added to format the methods. The options are described in a new "<span style="white-space: nowrap;">Objective-C</span>" section in the documentation.
These new options affect only <span style="white-space: nowrap;">Objective-C</span> source code. They have no effect on the other programming
languages.</p>
<p>
Because of the longer continuation indents sometimes needed for Objective&#8209;C, the option "max-instatement-indent"
Because of the longer continuation indents sometimes needed for <span style="white-space: nowrap;">Objective-C</span>, the option "max-instatement-indent"
may need to be increased. If you are not getting the paren and block paren alignment you want, try increasing
this value. The default minimum is 40 and the maximum is 120.</p>
<p>
@@ -87,11 +87,11 @@
The "Links" page has two new sections for links mentioned in previous versions of Artistic Style. It links to
free software and other information.</p>
<p>
The "Developer Information" section has a new example and download for calling Artistic Style from an Objective&#8209;C
The "Developer Information" section has a new example and download for calling Artistic Style from an <span style="white-space: nowrap;">Objective-C</span>
program. Since it is another "C" language the only thing needed is to link the program with a library build of
Artistic Style. The example was developed on Windows and Linux using the GNUstep project. Since the example is
a console program the problems with the GNUstep GUI have been avoided. It has not been tested on a Mac, but should
be close to working. The "Developer Information" section also has a new page for "Objective&#8209;C on Windows
be close to working. The "Developer Information" section also has a new page for "<span style="white-space: nowrap;">Objective-C</span> on Windows
and Linux" which has information on compiling and running the example on those systems.</p>
<p>
The executable included in the Windows distribution was compiled with Visual Studio 2010 (platform toolset v100).
@@ -209,7 +209,7 @@
This bug fix release is issued because of the length of time required for the some of the changes in the next
release (2.03). Bugs with the breaking of "case" statements and a crash with pointer to pointer (**) in align-pointer=type
have been fixed. The "case" statements that have been incorrectly broken will be fixed in this release. Pointers
and references are now processed for C# files. See the "Release Notes" for more information and additional
and references are now processed for C# files. See the "Release Notes" for more information and additional
changes.</p>
<h4><strong>The following information is for the original 2.02 release.</strong></h4>
@@ -229,8 +229,8 @@
must be input from the command line and not an option file. See the documentation for details.</p>
<p>
The translations were mostly done with an automated translation program, Google Translate, so they may not be
the best translation possible. The translations are at the end of ASLocalizer.cpp in the form of an
English&#8209;Translation pair. If you correct a translation, send the source as a bug report and it will be
the best translation possible. The translations are at the end of ASLocalizer.cpp in the form of an
English&#8209;Translation pair. If you correct a translation, send the source as a bug report and it will be
included in the next release.</p>
<p>
To add a language, add a new translation class to ASLocalizer.h. Add the English&#8209;Translation pair to the
@@ -270,15 +270,15 @@
of containing no uninformative lines. Like Pico, it is also a very compact style.</p>
<p>
The option "brackets=horstmann" has been removed. Instead use "style=horstmann" or "A9". The short option "g"
is now equivalent to the new "brackets=run-in". Run-in brackets are used for both Horstmann and Pico
is now equivalent to the new "brackets=run-in". Run-in brackets are used for both Horstmann and Pico
styles.</p>
<p>
The option "indent-brackets" and short option "B" have been removed. Instead use "style=whitesmith" or
The option "indent-brackets" and short option "B" have been removed. Instead use "style=whitesmith" or
"style=banner".</p>
<p>
The option "indent-blocks" and short option "G" have been removed. Instead use "style=gnu".</p>
<p>
Two new options, "style=break" and "style=attach", have been added for Allman and Java bracket styles
Two new options, "style=break" and "style=attach", have been added for Allman and Java bracket styles
respectively.</p>
<h4>Other Changes</h4>
@@ -399,7 +399,7 @@
is no change necessary to the input. Otherwise, check the documentation for the new codes.</p>
<p>
The --style=linux has been changed to ALWAYS use a minimum conditional indent of one-half the indent length. This
is in the style definition and cannot be changed. If you do not want this setting use the K&amp;R style
is in the style definition and cannot be changed. If you do not want this setting use the K&amp;R style
instead.</p>
<p>
The MFC macros BEGIN_DISPATCH_MAP, BEGIN_EVENT_MAP, and BEGIN_PROPPAGEIDS are now formatted.</p>
@@ -518,7 +518,7 @@
should result in a noticeable speed improvement.</p>
<p>
Checks for the maximum in-statement indent have been fixed. The indent for some long continuation lines may be
decreased. If you want the previous indentation, increase the &#8209;&#8209;max&#8209;in&#8209;statement
decreased. If you want the previous indentation, increase the &#8209;&#8209;max&#8209;in&#8209;statement
option.</p>
<p>
Occasionally, someone will use Artistic Style to format a file encoded with UTF-16 or UTF-32 bit encoding. These
@@ -529,7 +529,7 @@
of Unicode encodings", "Compatibility issues".</p>
<p>
The Artistic Style documentation has been changed to include a new "Padding Options" section. The padding options
were previously in the "Formatting Options" section. This was done to allow space for additional options in
were previously in the "Formatting Options" section. This was done to allow space for additional options in
GUIs.</p>
<p>
The Scripts page has a couple of new scripts, including a "clean" script in python.</p>
@@ -669,7 +669,7 @@
and Emacs does not have the style. <strong>Artistic Style uses an extra indent for switch blocks and C++ class blocks
for both Whitesmith and Banner styles.</strong> This provides the best appearance in defining the style. If
a different format is wanted, use the individual options instead of the predefined style. You can try indent&#8209;brackets,
indent&#8209;classes, and indent&#8209;swiches on a class or switch block to see the results.</p>
indent&#8209;classes, and indent&#8209;switches on a class or switch block to see the results.</p>
<p>
The GNU style and indent&#8209;blocks option have been changed to indent only the blocks within a function body.
The opening bracket for namespaces and classes is no longer indented. The opening bracket for functions remains
@@ -794,13 +794,13 @@
The OpenVMS distribution is prepared by Jim Duff, an OpenVMS Systems Specialist living in Sydney, Australia. His
website is eight&#8209;cubed.com.</p>
<p>
Thanks to Eran Ifrah and Max Horn for their contributions. Travis Robinson wrote the original C# interface
Thanks to Eran Ifrah and Max Horn for their contributions. Travis Robinson wrote the original C# interface
program.</p>
<h4>Developers</h4>
<p>
There is a new page in the Developer Information that has an example of calling Artistic Style from a C#
There is a new page in the Developer Information that has an example of calling Artistic Style from a C#
program.</p>
<p>
There was an omission in the peekNextLine function added in the last release which causes it to bypass empty lines.
@@ -815,7 +815,7 @@
<p>
The predefined style options will now override all other options. The order of entry does not matter as in previous
versions. This will be done even if astyle_main is not used by your system. This was done by moving the checks
from astyle_main to ASFormatter. The procedure is in the function fixOptionVariableConflicts in
from astyle_main to ASFormatter. The procedure is in the function fixOptionVariableConflicts in
ASFormatter.</p>
<p>
The predefined style options now define only the bracket placement and sometimes the spaces per tab. This will
@@ -824,7 +824,7 @@
The conflicts will be resolved by the fixOptionVariableConflicts function which is called after all options have
been processed. All you need to do is set the options selected by the user.</p>
<p>
The Artistic Style for Windows program has been updated to support the current release. It is available at
The Artistic Style for Windows program has been updated to support the current release. It is available at
jimp03.zxq.net</p>
<p>
I apologize for the unplanned changes this may add to your system. But Artistic Style is starting to mature as
@@ -869,7 +869,7 @@
<p>
When processing directories recursively it is sometimes necessary to exclude certain files or directories. This
can be done using a new exclude (&#8209;&#8209;exclude=file&#8209;or&#8209;directory) option. There is no short
option. Multiple exclude statements are allowed. The Other Options section of the documentation contains the
option. Multiple exclude statements are allowed. The Other Options section of the documentation contains the
details.</p>
<p>
It is always a good idea to create a backup for files that have been formatted. This can cause a problem in that
@@ -964,7 +964,7 @@
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.</p>
<p>
Thanks to Norbert Holzki and Siemens AG, Medical Solutions, Forchheim, Germany for testing the array
Thanks to Norbert Holzki and Siemens AG, Medical Solutions, Forchheim, Germany for testing the array
formatting.</p>
<p>
Thanks to Sam Cooler for testing the Mac OS X version.</p>
@@ -996,7 +996,7 @@
<p>
There is a sample GUI program for Windows available at http://jimp03.zxq.net/. 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
Linux using WINE. Future enhancements and platform support will depend on the response to the sample
program.</p>
<p>
To support the new Artistic Style preprocessor option there are new makefiles and project files. Windows users
@@ -1024,7 +1024,7 @@
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
the unnecessary padding will be removed. This will enable the paren padding to be changed in one formatting
run.</p>
<p>
Padding to paren headers (e.g. "if", "for", "while") was reinstated. This was done in previous releases if pad=oper
+211 -45
View File
@@ -1,20 +1,180 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<!doctype html>
<html lang="en">
<head>
<title>Artistic Style - Release Notes</title>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href="styles.css" rel="stylesheet" type="text/css" />
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
<title>Artistic Style - Release notes</title>
</head>
<body>
<h1>Artistic Style Release Notes</h1>
<h3>Artistic Style 3.2 (pending; January 2023)</h3>
<h3>Artistic Style 3.6 (August 2024)</h3>
<ul>
<li>Add option --pad-include (https://sourceforge.net/p/astyle/tickets/117/)</li>
<li>combined GHC and GSC style options</li>
<li>improve combination of --align-pointer=type and --pad-oper (https://sourceforge.net/p/astyle/tickets/578/)</li>
<li>improve multiplication recognition with --align-pointer=type (https://sourceforge.net/p/astyle/tickets/572/)</li>
<li>update compiler options in build files</li>
<li>fix indent of assignments within macros ( https://gitlab.com/saalen/astyle/-/issues/47)</li>
</ul>
<h3>Artistic Style 3.5.2 (July 2024)</h3>
<ul>
<li>Fix library compilation errors (https://gitlab.com/saalen/astyle/-/issues/48)</li>
</ul>
<h3>Artistic Style 3.5.1 (June 2024)</h3>
<ul>
<li>Fix crash concerning macro continuation (https://sourceforge.net/p/astyle/bugs/574)</li>
<li>Fix EOL handling for Windows builds (https://gitlab.com/saalen/astyle/-/issues/43)</li>
<li>Fix GSC comment recognition (https://gitlab.com/saalen/astyle/-/issues/46)</li>
<li>Fix MSVC compiler warnings (https://sourceforge.net/p/astyle/bugs/575)</li>
</ul>
<h3>Artistic Style 3.5 (June 2024)</h3>
<ul>
<li>Add option --pad-negation (https://sourceforge.net/p/astyle/bugs/571)</li>
<li>Apply align-pointer=type only if type is present (https://sourceforge.net/p/astyle/bugs/573)</li>
<li>Avoid deletion of empty lines after continuation (https://sourceforge.net/p/astyle/bugs/574)</li>
<li>Fix alignment of logical AND operators (https://sourceforge.net/p/astyle/bugs/572)</li>
<li>Fix recognition of Java/C# multi line strings (https://gitlab.com/saalen/astyle/-/issues/42)</li>
</ul>
<h3>Artistic Style 3.4.16 (May 2024)</h3>
<ul>
<li>Fix padding of scientific notation literals (#570)</li>
<li>Fix of reference args alignment (https://gitlab.com/saalen/astyle/-/issues/35)</li>
</ul>
<h3>Artistic Style 3.4.15 (May 2024)</h3>
<ul>
<li>Fix parsing of floating point literals (#566)</li>
<li>Fix "--break-block" handling of class and function blocks (#569)</li>
<li>Fix "--align-pointer=type" option for all types in lambda parameter lists (https://gitlab.com/saalen/astyle/-/issues/35)</li>
<li>Fix padding of lambda capture with align-pointer option</li>
<li>Exclude files ending with backup suffix from input file names list (#560)</li>
</ul>
<h3>Artistic Style 3.4.14 (April 2024)</h3>
<ul>
<li>Fix split references with "-k1" option (#565)</li>
<li>Fix "--align-pointer=type" option for fundamental types in lambda parameter lists (https://gitlab.com/saalen/astyle/-/issues/35)</li>
<li>Fix "--indent-after-parens" indent count (https://gitlab.com/saalen/astyle/-/issues/29)</li>
</ul>
<h3>Artistic Style 3.4.13 (March 2024)</h3>
<ul>
<li>Fix comment indent after string macro with R suffix (https://gitlab.com/saalen/astyle/-/issues/39)</li>
<li>Do not break single line block after enum in mozilla mode (https://gitlab.com/saalen/astyle/-/issues/38)</li>
<li>Adjust cmake policy for new versions only (https://gitlab.com/saalen/astyle/-/issues/40)</li>
<li>Update man page path</li>
<li>Add support for scikit-build-core</li>
</ul>
<h3>Artistic Style 3.4.12 (February 2024)</h3>
<ul>
<li>Add "--pad-brackets-in" and "--pad-brackets-out" options (https://gitlab.com/saalen/astyle/-/issues/33)</li>
<li>Fix indentation of initializer lists (https://gitlab.com/saalen/astyle/-/issues/28)</li>
<li>Fix crash with "--add-braces=nested" applied to if-else blocks (https://gitlab.com/saalen/astyle/-/issues/36)</li>
</ul>
<h3>Artistic Style 3.4.11 (January 2024)</h3>
<ul>
<li>Add new option "--add-braces=nested" to add braces in nested single line statements (https://gitlab.com/saalen/astyle/-/issues/27)</li>
<li>Fix indent after double template brackets (https://gitlab.com/saalen/astyle/-/issues/28)</li>
<li>Fix indent after dot (https://gitlab.com/saalen/astyle/-/issues/28)</li>
<li>Option "--squeeze-lines=1" is no longer default with Linux builds (#559)</li>
<li>Add experimental GHC mode (https://gitlab.com/saalen/astyle/-/issues/31)</li>
<li>Fix indent after raw string (https://gitlab.com/saalen/astyle/-/issues/32)</li>
</ul>
<h3>Artistic Style 3.4.10 (October 2023)</h3>
<ul>
<li>Fix missing indent in function parameter list (https://gitlab.com/saalen/astyle/-/issues/16)</li>
</ul>
<h3>Artistic Style 3.4.9 (October 2023)</h3>
<ul>
<li>Apply one wording for <span style="white-space: nowrap;">Objective-C</span> in the docs</li>
<li>Fix more CS regressions (https://gitlab.com/saalen/astyle/-/issues/16)</li>
<li>Fix inserting space with combined "--pad-oper" and "--align-pointer" options (#557)</li>
</ul>
<h3>Artistic Style 3.4.8 (September 2023)</h3>
<ul>
<li>Fix lambda broken brace after auto keyword (#554)</li>
<li>Fix line break after comment in asm block (#226)</li>
<li>Fix padding of multiply operator (#126)</li>
<li>Fix indentation of method calls (#434)</li>
<li>Fix empty line after closing while block (https://gitlab.com/saalen/astyle/-/issues/18)</li>
<li>Add outer padding for empty parens pairs (https://gitlab.com/saalen/astyle/-/issues/19) </li>
<li>Fix more CS regressions (https://gitlab.com/saalen/astyle/-/issues/16)</li>
</ul>
<h3>Artistic Style 3.4.6 (August 2023)</h3>
<ul>
<li>Add VS2022 project files (https://gitlab.com/saalen/astyle/-/merge_requests/3)</li>
<li>Fix CS regressions (https://gitlab.com/saalen/astyle/-/issues/16)</li>
<li>Add CS coalesce assignment operator (https://gitlab.com/saalen/astyle/-/issues/17)</li>
</ul>
<h3>Artistic Style 3.4.1 (August 2023)</h3>
<ul>
<li>Fix padding of &amp; following a comma (#552)</li>
<li>Fix indent of function declarations following access modifiers (#504)</li>
<li>Fix indent of C# allocation blocks (#464)</li>
<li>Fix indentation of comments after CS interpolation quotes (https://gitlab.com/saalen/astyle/-/issues/16)</li>
</ul>
<h3>Artistic Style 3.4 (June 2023)</h3>
<ul>
<li>Fix formatting of CS interpolation literals (https://gitlab.com/saalen/astyle/-/issues/8).</li>
<li>Fix false lambda recognition (https://gitlab.com/saalen/astyle/-/issues/11)</li>
<li>Fix indentation of member declarations (https://gitlab.com/saalen/astyle/-/issues/10)</li>
<li>Fix indentation of struct assignments (https://gitlab.com/saalen/astyle/-/issues/12)</li>
<li>Add new option "--indent-lambda" to enable new lambda recognition (https://gitlab.com/saalen/astyle/-/issues/7)</li>
<li>Add link to astyle Python distribution projects (https://gitlab.com/saalen/astyle/-/issues/6)</li>
</ul>
<h3>Artistic Style 3.3 (May 2023)</h3>
<ul>
<li>Add new option "--squeeze-ws" to remove superfluous whitespace (experimental)</li>
<li>Add new option "--squeeze-lines" to remove superfluous empty lines (experimental, #19, #22, #43, #72, #84, #93, #105, #517)</li>
<li>Add new options "--pad-brackets" and "--unpad-brackets" to add or remove whitespace around square brackets (experimental)</li>
<li>Fix indent of lambda bodies in fct calls (#121)</li>
<li>Fix indent of struct names including &quot;struct&quot; (#526)</li>
<li>Fix indent of C++11 initializer lists (#516)</li>
<li>Fix padding of pointers separated by comma (#537)</li>
<li>Refactor namespace std usage</li>
</ul>
<h3>Artistic Style 3.2.1 (March 2023)</h3>
<ul>
<li>Fix struct recognition related to SF #534 (https://gitlab.com/saalen/astyle/-/issues/1)</li>
</ul>
<h3>Artistic Style 3.2 (March 2023)</h3>
<ul>
<li>Add new option "style=webkit" for the WebKit brace style.</li>
@@ -30,23 +190,36 @@
<li>Changes from clang-tidy to modernize code.</li>
</ul>
</li>
<li>created man page</li>
<li>added man page</li>
<li>removed deprecated options</li>
<li>added shell completion scripts</li>
<li>added &quot;--mode=js&quot; option</li>
<li>removed upper limit of max-continuation-indent</li>
<li>#535 fix raw string parsing</li>
<li>#543 fix recognition of rvalue operator as reference</li>
<li>#527 fix reverting effect of AttachReturnType option</li>
<li>#544 fixed padding of dereference operator</li>
<li>#538 added spaceship operator</li>
<li>#550 fixed case indent after enum return value</li>
<li>#546 fixed space deletion when aligning ref value name</li>
<li>#545 fix reverting effect of maxCodeLength and AttachReturnType options</li>
<li>added INVALID_TYPE constant</li>
<li>removed upper limit of &quot;max-continuation-indent&quot;</li>
<li>fixed raw string parsing (#535)</li>
<li>fixed recognition of rvalue operator as reference (#543)</li>
<li>fixed reverting effect of AttachReturnType option (#527)</li>
<li>fixed padding of dereference operator (#544)</li>
<li>added C++ spaceship operator (#538)</li>
<li>fixed case indent after enum return value (#550)</li>
<li>fixed space deletion when aligning ref value name (#546)</li>
<li>fixed reverting effect of maxCodeLength and AttachReturnType options (#545)</li>
<li>fixed break of continued preprocessor strings with colon (#533)</li>
<li>fixed struct bitfield indentation (#534)</li>
<li>replace PATH_MAX by realpath (#549)</li>
<li>fixed negative integer literal breaks initializer list (#485)</li>
<li>fixed documentation of --delete-empty-lines short option (#508)</li>
<li>fixed project file search (#541)</li>
<li>fixed indent of ObjectiveC statements (#525)</li>
<li>fixed parsing of C# interpolation strings (#483)</li>
<li>fixed break-blocks format after struct (#518)</li>
<li>fixed project file search with wildcard input paths (https://gitlab.com/saalen/astyle/-/issues/1)</li>
<li>https://sourceforge.net/p/astyle/tickets/130/ better description for stat errors</li>
<li>https://sourceforge.net/p/astyle/tickets/129/ applied IT localization patch</li>
<li>improved DE localization</li>
</ul>
<h3>Artistic Style 3.1&nbsp; (January 2018)</h3>
<h3>Artistic Style 3.1 (January 2018)</h3>
<ul>
<li>Add new options "project", "project=####", and "project=none" (#11).</li>
@@ -70,12 +243,12 @@
<li>Fix indentation of compound literals in an argument list (#456).</li>
<li>Fix indentation of trailing return type method following a constructor (#463).</li>
<li>Fix space padding of closing brace before a dot (#468).</li>
<li>Fix Objective-C to allow for &quot;Extern C&quot; statements in the source files (#443, 444, 446).</li>
<li>Fix Objective-C to allow for method definitions without a specified return type (#447).</li>
<li>Fix Objective-C to allow for method definitions with multiple param types.</li>
<li>Fix Objective-C to replace tabbed padding with a space.</li>
<li>Fix Objective-C formatting of line-end comments with &quot;unpad-return-type&quot;.</li>
<li>Fix Objective-C &quot;align-method-colon&quot; to ignore ternary (?) operators.</li>
<li>Fix <span style="white-space: nowrap;">Objective-C</span> to allow for &quot;Extern C&quot; statements in the source files (#443, 444, 446).</li>
<li>Fix <span style="white-space: nowrap;">Objective-C</span> to allow for method definitions without a specified return type (#447).</li>
<li>Fix <span style="white-space: nowrap;">Objective-C</span> to allow for method definitions with multiple param types.</li>
<li>Fix <span style="white-space: nowrap;">Objective-C</span> to replace tabbed padding with a space.</li>
<li>Fix <span style="white-space: nowrap;">Objective-C</span> formatting of line-end comments with &quot;unpad-return-type&quot;.</li>
<li>Fix <span style="white-space: nowrap;">Objective-C</span> &quot;align-method-colon&quot; to ignore ternary (?) operators.</li>
<li>Fix C# base class constructor indentation (#459).</li>
<li>Fix C# indentation of method declaration containing a colon (#465)</li>
<li>Fix C/C++ to allow &quot;interface&quot; as a non-keyword (#445).</li>
@@ -96,7 +269,7 @@
</li>
</ul>
<h3>Artistic Style 3.0.1&nbsp; (May 2017)</h3>
<h3>Artistic Style 3.0.1 (May 2017)</h3>
<ul>
<li>Fix crash caused by certain class initializer formats (#435).</li>
@@ -104,7 +277,7 @@
<li>Fix recognition of certain rvalue reference variables.</li>
</ul>
<h3>Artistic Style 3.0&nbsp; (April 2017)</h3>
<h3>Artistic Style 3.0 (April 2017)</h3>
<ul>
<li>Add new option "indent-after-parens" (#396, 152, 108, 79).</li>
@@ -139,7 +312,7 @@
</li>
</ul>
<h3>Artistic Style 2.06&nbsp; (December 2016)</h3>
<h3>Artistic Style 2.06 (December 2016)</h3>
<ul>
<li>Add new bracket style option "style=mozilla".</li>
@@ -147,13 +320,13 @@
<li>Add new option &quot;indent-continuation&quot;.</li>
<li>Add new option &quot;pad-comma&quot; (#100).</li>
<li>Add removing spaces before a comma (#100).</li>
<li>Add new Objective&#8209;C options "pad-return-type" (-xq) and "unpad-return-type" (-xr).</li>
<li>Add new Objective&#8209;C options "pad-param-type" (-xS) and "unpad-param-type" (-xs).</li>
<li>Add new <span style="white-space: nowrap;">Objective-C</span> options "pad-return-type" (-xq) and "unpad-return-type" (-xr).</li>
<li>Add new <span style="white-space: nowrap;">Objective-C</span> options "pad-param-type" (-xS) and "unpad-param-type" (-xs).</li>
<li>Add formatting of C++14 single-quote digit separators (#337).</li>
<li>Add indentation for CORBA IDL module statement (#414).</li>
<li>Add translations for Bulgarian, Estonian, Greek, Hungarian, Norwegian, and Romanian.</li>
<li>Remove lineend option from formatCinToCout function.</li>
<li>Improve align-method-colon and apply to Objective&#8209;C method calls.</li>
<li>Improve align-method-colon and apply to <span style="white-space: nowrap;">Objective-C</span> method calls.</li>
<li>Improve recognition of header guards in preprocessor statements.</li>
<li>Improve recognition of C++11 uniform initializer brackets (#381, 411, 415).</li>
<li>Improve the processing of quoted strings and verbatim strings.</li>
@@ -178,8 +351,8 @@
<li>Fix C# to recognize &quot;using&quot; as a header.</li>
<li>Fix C# to always recognize &quot;forever&quot; as a header.</li>
<li>Fix Pico style not always computing the indentation for one line blocks.</li>
<li>Fix indentation of Objective-C @interface statement (#333).</li>
<li>Fix assert error when Objective-C &quot;@&quot; is followed by whitespace.</li>
<li>Fix indentation of <span style="white-space: nowrap;">Objective-C</span> @interface statement (#333).</li>
<li>Fix assert error when <span style="white-space: nowrap;">Objective-C</span> &quot;@&quot; is followed by whitespace.</li>
<li>Fix end of line comments for &quot;pad-method-prefix&quot; and &quot;unpad-method-prefix&quot;.</li>
<li>Fix end of line comments for &quot;pad-method-colon&quot;.</li>
<li>Refactoring:
@@ -195,7 +368,7 @@
</li>
</ul>
<h3>Artistic Style 2.05.1&nbsp; (December 2014)</h3>
<h3>Artistic Style 2.05.1 (December 2014)</h3>
<ul>
<li>Fix incorrectly reporting files containing disabled formatting as being formatted.</li>
@@ -207,7 +380,7 @@
<li>Fix removing trailing whitespace after a changed pointer or reference cast.</li>
</ul>
<h3>Artistic Style 2.05&nbsp; (November 2014)</h3>
<h3>Artistic Style 2.05 (November 2014)</h3>
<ul>
<li>Add new bracket style option "style=vtk" (#155).</li>
@@ -274,20 +447,13 @@
</ul>
<p>
&nbsp;</p>
<p>
<strong>Previous releases are available in the <a href="http://astyle.sourceforge.net/notesArchives.html">Release
Notes Archives</a>.</strong></p>
<p>
&nbsp;</p>
<strong>Previous releases are available in the <a href="http://astyle.sourceforge.net/notesArchives.html">Release Notes Archives</a>.</strong>
</p>
<p style="margin-left: -0.4in; text-align: center;">
<a href="http://sourceforge.net/projects/astyle">
<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2319&type=16" alt="" /></a></p>
<p>
&nbsp;</p>
</body>
</html>
+9 -10
View File
@@ -20,7 +20,7 @@
<h3>Artistic Style 2.04&nbsp; (November 2013)</h3>
<ul>
<li>Add new programming language Objective&#8209;C.</li>
<li>Add new programming language <span style="white-space: nowrap;">Objective-C</span>.</li>
<li>Add new bracket style option "style=google" (-A14). </li>
<li>Add new option "indent-preproc-cond" (xw) to indent preprocessor conditional statements (#118). </li>
<li>Add new bracket modify options "attach-namespaces", "attach-classes", "attach-inlines", and "attach-extern-c".
@@ -28,9 +28,9 @@
<li>Add new option "indent-modifiers" (-xG) to indent class access modifiers one-half indent (#130). </li>
<li>Add new option "remove-brackets" (-xj) to remove brackets from single line conditional statements.</li>
<li>Add new option "remove-comment-prefix" (-xp) to remove the leading '*' from multi-line comments. </li>
<li>Add new option "align-method-colon" (-xM) to align Objective&#8209;C method colons. </li>
<li>Add new option "pad-method-colon=#" (-xP#) to space pad Objective&#8209;C method colons. </li>
<li>Add new options "pad-method-prefix" (-xQ), and "unpad-method-prefix" (-xR) to pad the Objective&#8209;C "-" and
<li>Add new option "align-method-colon" (-xM) to align <span style="white-space: nowrap;">Objective-C</span> method colons. </li>
<li>Add new option "pad-method-colon=#" (-xP#) to space pad <span style="white-space: nowrap;">Objective-C</span> method colons. </li>
<li>Add new options "pad-method-prefix" (-xQ), and "unpad-method-prefix" (-xR) to pad the <span style="white-space: nowrap;">Objective-C</span> "-" and
"+" method prefix. </li>
<li>Add new dll entry point AStyleMainUtf16 for processing C# UTF-16 strings. </li>
<li>Add formatting of C++11 raw string literals (#222). </li>
@@ -39,7 +39,7 @@
<li>Improve recognition and formatting of pointers and references (#174 and other changes). </li>
<li>Improve the recognition of block-opening brackets.</li>
<li>Improve code using a static code analyzer (#195).</li>
<li>Change "max-code-length" to include Objective&#8209;C methods.</li>
<li>Change "max-code-length" to include <span style="white-space: nowrap;">Objective-C</span> methods.</li>
<li>Change "indent-elseifs" and "break-blocks" to look ahead only if in command-type brackets (speed improvement).
</li>
<li>Fix linux bracket styles to break the opening bracket in inline function definitions (#185). </li>
@@ -876,7 +876,7 @@
<li>Compilation under G++ 3.0 now works properly.</li>
<li>Bug fix: Opening brackets that appear at the beginning of a line immediately after an empty line comment are now
handled properly, and not appended as part of the line comment.</li>
<li>Bug fix: Brackets inside comments are now not mis-indented within the comment.</li>
<li>Bug fix: Brackets inside comments are properly indented within the comment.</li>
</ul>
<h3>Artistic Style 1.14.1 (2 June 2001)</h3>
@@ -1015,13 +1015,13 @@
<h3>Artistic Style 1.11.1 (3 September 1999)</h3>
<ul>
<li>Fixed a bug that inserted an empty line at the begining of source files.</li>
<li>Fixed a bug that inserted an empty line at the beginning of source files.</li>
</ul>
<h3>Artistic Style 1.11.0 (3 September 1999)</h3>
<ul>
<li>Astyle now filters out line-feeds ('\r') before begining to parse lines. This should take care of bizarre formatting
<li>Astyle now filters out line-feeds ('\r') before beginning to parse lines. This should take care of bizarre 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).</li>
<li>The "struct", "static" and "synchronized" keywords are now finally handled correctly in both the contexts of block
@@ -1088,7 +1088,7 @@
for similarity with the new option above.</li>
<li>Changed the short option name of the option '-<strong>-errors-to-standard-output</strong>' from '<strong>-o</strong>'
to '<strong>-X</strong>'.</li>
<li>Up to now, Artistic Style always inserted a minimal indent of <strong>t</strong>wice the current selected indent
<li>Up to now, Artistic Style always inserted a minimal indent of <strong>twice</strong> 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 '<strong>--min-conditional-indent=#</strong>'
(or '<strong>-m#</strong>') that sets the absolute minimal indent between conditional headers and their multiple-line
@@ -1347,4 +1347,3 @@
</body>
</html>
+7 -25
View File
@@ -1,31 +1,13 @@

/* h1 is a title
* h2 is a subtitle
* h3 is a hanging text title
* h4 is a non-hanging text title
* h5 is a non-hanging text title in all caps and black font
* p.noindent is non-hanging text (text without a title)
* p.contents entries are for the table of contents
* a.contents are table of contents links (not underlined)
* a.links are links (underlined)
* img does not have a border
* pre is a predefined format for formatting code
*/
body { background-color: white; margin: 5em 15em 5em 2em; font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; }
/* margin: [top] [right] [bottom] [left] */
body { background-color: white; margin: 0.5in 0.8in 0.5in 1.3in; }
h1 { color: mediumblue; text-align: center; font-style: italic; margin-top: 0.4in; margin-left: -0.5in; }
h2 { color: mediumblue; text-align: center; font-size: larger; margin-top: 0.4in; margin-left: -0.5in; }
h3 { color: mediumblue; margin-top: 0.4in; margin-left: -0.4in; }
h4 { color: mediumblue; margin-top: 0.3in; }
h1 { color: mediumblue; font-style: italic; margin-top: 2em; }
h2 { color: mediumblue; font-size: larger; margin-top: 2em; }
h3 { color: mediumblue; margin-top: 2em; }
h4 { color: mediumblue; margin-top: 1em; }
h5 { text-transform: uppercase }
/* paragraph classes */
.noindent { margin-left: -0.4in; }
.contents1 { font-size: 105%; margin: 0; }
.contents2 { margin: 0 0.4in 0 0.4in; }
p { line-height: 1.4em;}
a.contents:link, a.contents:visited { color: mediumblue; text-decoration: none; }
a.contents:hover { color: red; text-decoration: none; }
@@ -34,7 +16,7 @@ a:hover { color: red; text-decoration: underline; }
img { border: none; }
pre { margin-left: 0.3in; color: mediumblue; font-weight: bold; }
pre { color: mediumblue; font-family: 'Courier New', Courier, monospace; background-color: #fffdda; padding: 1em;}
/*- the following styles are for the 'top' button
the corresponding javascript is in the html document from
+19 -58
View File
@@ -12,41 +12,41 @@
<body>
<h1>Artistic Style Subversion Repository</h1>
<h1>Artistic Style Source Repositories</h1>
<h2>Git</h2>
<p>
The <a href="https://gitlab.com/saalen/astyle/-/tree/master">Git repository</a> is located at Gitlab. This repo is used for day to day development. The SVN repo mentioned below is kept up to date regularly.
</p>
<h2>Subversion</h2>
<p>
&nbsp;</p>
<h3>Artistic Style</h3>
<p>
The latest development source is in the Artistic Style repository at SourceForge. It can be checked out using
Subversion. The source code is under development and some changes take several weeks to complete. The intermediate
The <a href="https://svn.code.sf.net/p/astyle/code/">SVN repository</a> is located at SourceForge. The intermediate
source files have not been through the extensive system tests that are done before each release. Use reasonable
precautions when using source code from the repository.</p>
<p>
The current version is in the "trunk/AStyle" branch of the repository. The file and directory names are case
sensitive.</p>
The current version is in the "trunk/AStyle" branch of the repository. The file and directory names are case
sensitive.
</p>
<p>
A sample checkout is:<br />
<strong>svn&nbsp; checkout&nbsp; "https://svn.code.sf.net/p/astyle/code/trunk/AStyle"&nbsp;
<strong>svn&nbsp; checkout&nbsp; "https://svn.code.sf.net/p/astyle/code/trunk/AStyle"&nbsp;
"$HOME/astyle"</strong></p>
<p>
You can also <a href="https://sourceforge.net/p/astyle/code/HEAD/tree/" target="_blank" title="open new window">browse
the subversion repository</a>. The current development release is in the "trunk" directory. This gives you
a view into the current status of the project's code without actually checking-out the files.</p>
<p>
&nbsp;</p>
<h3>Other Projects</h3>
<p>
Two additional Artistic Style projects are available in the repository. They are not maintained for the general
public, but are available if you want them. You may have to create your own project files and scripts to use
public, but are available if you want them. You may have to create your own project files and scripts to use
them.</p>
<p>
All projects, and any additional source required, should be installed in the same top level folder. A sample file
directory containing ALL the projects should look as follows. The project dependencies are described
directory containing ALL the projects should look as follows. The project dependencies are described
below.</p>
<pre> Projects
AStyle
@@ -54,8 +54,7 @@
AStyleTest
AStyleWx
AStyleWxTest
googlemock
googletest</pre>
</pre>
<h4>AStyleDev</h4>
@@ -78,7 +77,7 @@
This project requires the Artistic Style project to compile.
In addition, the test program requires Google Mock and Google Test described below.</p>
<p>
The main test project, AStyleTest, can be run in Visual Studio using the graphical Visual Studio Test
The main test project, AStyleTest, can be run in Visual Studio using the graphical Visual Studio Test
Explorer. The procedure is described below.</p>
<p>
A sample checkout is:<br />
@@ -90,8 +89,8 @@
<p>
AStyleWx contains a GUI test program for Artistic Style that uses the wxWidgets C++ library.</p>
<p>
This project requires the Artistic Style project to compile.
Files for download are made available in the
This project requires the Artistic Style project to compile.
Files for download are made available in the
<a href="https://sourceforge.net/projects/astylewx.astyle.p/" target="_blank" title="open new window">Artistic Style
Wx</a> subproject. The download contains all files needed to compile the project. The subproject can be accessed
from the Artistic Style SourceForge pages.</p>
@@ -112,43 +111,6 @@
<strong>svn&nbsp; checkout&nbsp; "https://svn.code.sf.net/p/astyle/code/trunk/AStyleWxTest"&nbsp; "$HOME/astylewxtest"
</strong></p>
<h4>Google Mock and Google Test</h4>
<p>
Google Test and Google Mock is the Google multi-platform framework for writing C++ unit tests.
It is available on <a href="https://github.com/google/googletest" target="_blank" title="open new window">GitHub</a>
and can be downloaded as a zip file by pressing the green &quot;clone or download&quot; button and selecting
&quot;Download ZIP&quot;. The default is to download the master development branch. The latest stable release
can be obtained by using the drop-down box labeled &quot;Branch: master&quot;, selecting the &quot;tags&quot;
tab, and then selecting the latest release. The selected release can then be downloaded using the &quot;clone
or download&quot; button. Download the latest release for googletest and googlemock from the repository.</p>
<p>
The Artistic Style project files are set up to use googletest and googlemock installed in the top level folder
as indicated above. The library compile for googlemock includes googletest. The library compile for googletest
includes only googletest. The AStyle test programs have their own project files for compiling the test platform.
There are also compile project files in the downloaded google modules if you want to use them. They create a static
library file that is linked to the test program. The google downloads contain instructions for using the
package. </p>
<h4>Visual Studio Test Explorer</h4>
<p>
Some of the test projects can be run in Visual Studio Community using Visual Studio Test Explorer.
If there is a <strong>.gta.runsettings</strong> file in the solution directory for a test project,
the test will run in the Test Explorer.</p>
<p>
The &quot;Google Test Adapter&quot; extension must be installed from the Tools &gt; &quot;Extensions
and Updates&quot; menu. After restarting Visual Studio the test window is activated from the Test
&gt; Window &gt; &quot;Test Explorer&quot; menu option. After compiling, the tests will appear in
the test window. Then they may be run from the &quot;Test Explorer&quot; window or from the Test menu
options.</p>
<p>
Test Explorer may be used for other test projects. The tests can also be run as a command line program by using
the standard debug or run button on the menu or toolbar.</p>
<p>
&nbsp;</p>
<p style="margin-left: -0.4in; text-align: center;">
<a href="http://sourceforge.net/projects/astyle">
<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2319&type=16" alt="" /></a></p>
@@ -159,4 +121,3 @@
</body>
</html>
+1 -1
View File
@@ -32,6 +32,6 @@ align-method-colon
pad-method-colon=after
# other options
lineend=windows
lineend=linux
# don't use "other options" (e.g. formatted) in this file
# send them as additional command line options
+148 -109
View File
@@ -1,4 +1,4 @@
.TH astyle 1 "2023-01-16" "Andre Simon" "user documentation"
.TH astyle 1 "2024-06-30" "Andre Simon" "user documentation"
.SH NAME
astyle - C syntax indenter and formatter
@@ -9,7 +9,7 @@ astyle - C syntax indenter and formatter
.SH DESCRIPTION
.B astyle
provides a variety of options to apply a consistent coding style to C, C++, Java or Objective C source code files.
provides a variety of options to apply a consistent coding style to C, C++, Java or Objective-C source code files.
.PP
When indenting a specific file, the resulting indented file RETAINS
the original file-name. The original pre-indented file is renamed,
@@ -30,70 +30,70 @@ and NO formatting options.
If no brace style is requested, the opening braces will not be
changed and closing braces will be broken from the preceding line.
.IP "--style=allman OR --style=bsd OR --style=break OR -A1"
.IP "--style=allman OR --style=bsd OR --style=break OR -A1"
Allman style formatting/indenting.
Broken braces.
.IP "--style=java OR --style=attach OR -A2"
.IP "--style=java OR --style=attach OR -A2"
Java style formatting/indenting.
Attached braces.
.IP "--style=kr OR --style=k&r OR --style=k/r OR -A3"
.IP "--style=kr OR --style=k&r OR --style=k/r OR -A3"
Kernighan & Ritchie style formatting/indenting.
Linux braces.
.IP "--style=stroustrup OR -A4"
.IP "--style=stroustrup OR -A4"
Stroustrup style formatting/indenting.
Linux braces, with broken closing headers.
.IP "--style=whitesmith OR -A5"
.IP "--style=whitesmith OR -A5"
Whitesmith style formatting/indenting.
Broken, indented braces.
Indented class blocks and switch blocks.
.IP "--style=vtk OR -A15"
.IP "--style=vtk OR -A15"
VTK style formatting/indenting.
Broken, indented braces except for the opening braces.
.IP "--style=ratliff OR --style=banner OR -A6"
.IP "--style=ratliff OR --style=banner OR -A6"
Ratliff style formatting/indenting.
Attached, indented braces.
.IP "--style=gnu OR -A7"
.IP "--style=gnu OR -A7"
GNU style formatting/indenting.
Broken braces, indented blocks.
.IP "--style=linux OR --style=knf OR -A8"
.IP "--style=linux OR --style=knf OR -A8"
Linux style formatting/indenting.
Linux braces, minimum conditional indent is one-half indent.
.IP "--style=horstmann OR --style=run-in OR -A9"
.IP "--style=horstmann OR --style=run-in OR -A9"
Horstmann style formatting/indenting.
Run-in braces, indented switches.
.IP "--style=1tbs OR --style=otbs OR -A10"
.IP "--style=1tbs OR --style=otbs OR -A10"
One True Brace Style formatting/indenting.
Linux braces, add braces to all conditionals.
.IP "--style=google OR -A14"
.IP "--style=google OR -A14"
Google style formatting/indenting.
Attached braces, indented class modifiers.
.IP "--style=mozilla OR -A16"
.IP "--style=mozilla OR -A16"
Mozilla style formatting/indenting.
Linux braces, with broken braces for structs and enums,
and attached braces for namespaces.
.IP "--style=webkit OR -A17"
.IP "--style=webkit OR -A17"
WebKit style formatting/indenting.
Linux braces, with attached closing headers.
.IP "--style=pico OR -A11"
.IP "--style=pico OR -A11"
Pico style formatting/indenting.
Run-in opening braces and attached closing braces.
Uses keep one line blocks and keep one line statements.
.IP "--style=lisp OR -A12"
.IP "--style=lisp OR -A12"
Lisp style formatting/indenting.
Attached opening braces and attached closing braces.
Uses keep one line statements.
@@ -103,92 +103,92 @@ Uses keep one line statements.
If no indentation option is set, the default
option of 4 spaces per indent will be used.
.IP "--indent=spaces=# OR -s#"
.IP "--indent=spaces=# OR -s#"
Indent using # spaces per indent. Not specifying #
will result in a default of 4 spaces per indent.
.IP "--indent=tab OR --indent=tab=# OR -t OR -t#"
.IP "--indent=tab OR --indent=tab=# OR -t OR -t#"
Indent using tab characters, assuming that each
indent is # spaces long. Not specifying # will result
in a default assumption of 4 spaces per indent.
.IP "--indent=force-tab=# OR -T#"
.IP "--indent=force-tab=# OR -T#"
Indent using tab characters, assuming that each
indent is # spaces long. Force tabs to be used in areas
AStyle would prefer to use spaces.
.IP "--indent=force-tab-x=# OR -xT#"
.IP "--indent=force-tab-x=# OR -xT#"
Allows the tab length to be set to a length that is different
from the indent length. This may cause the indentation to be
a mix of both spaces and tabs. This option sets the tab length.
.SH Brace Modify Options:
.IP "--attach-namespaces OR -xn"
.IP "--attach-namespaces OR -xn"
Attach braces to a namespace statement.
.IP "--attach-classes OR -xc"
.IP "--attach-classes OR -xc"
Attach braces to a class statement.
.IP "--attach-inlines OR -xl"
.IP "--attach-inlines OR -xl"
Attach braces to class inline function definitions.
.IP "--attach-extern-c OR -xk"
.IP "--attach-extern-c OR -xk"
Attach braces to an extern "C" statement.
.IP "--attach-closing-while OR -xV"
.IP "--attach-closing-while OR -xV"
Attach closing while of do-while to the closing brace.
.SH Indentation Options:
.IP "--indent-classes OR -C"
.IP "--indent-classes OR -C"
Indent 'class' blocks so that the entire block is indented.
.IP "--indent-modifiers OR -xG"
.IP "--indent-modifiers OR -xG"
Indent 'class' access modifiers, 'public:', 'protected:' or
'private:', one half indent. The rest of the class is not
indented.
.IP "--indent-switches OR -S"
.IP "--indent-switches OR -S"
Indent 'switch' blocks, so that the inner 'case XXX:'
headers are indented in relation to the switch block.
.IP "--indent-cases OR -K"
.IP "--indent-cases OR -K"
Indent case blocks from the 'case XXX:' headers.
Case statements not enclosed in blocks are NOT indented.
.IP "--indent-namespaces OR -N"
.IP "--indent-namespaces OR -N"
Indent the contents of namespace blocks.
.IP "--indent-after-parens OR -xU"
.IP "--indent-after-parens OR -xU"
Indent, instead of align, continuation lines following lines
that contain an opening paren '(' or an assignment '='.
.IP "--indent-continuation=# OR -xt#"
.IP "--indent-continuation=# OR -xt#"
Indent continuation lines an additional # indents.
The valid values are 0 thru 4 indents.
The default value is 1 indent.
.IP "--indent-labels OR -L"
.IP "--indent-labels OR -L"
Indent labels so that they appear one indent less than
the current indentation level, rather than being
flushed completely to the left (which is the default).
.IP "--indent-preproc-block OR -xW"
.IP "--indent-preproc-block OR -xW"
Indent preprocessor blocks at brace level 0.
Without this option the preprocessor block is not indented.
.IP "--indent-preproc-cond OR -xw"
.IP "--indent-preproc-cond OR -xw"
Indent preprocessor conditional statements #if/#else/#endif
to the same level as the source code.
.IP "--indent-preproc-define OR -w"
.IP "--indent-preproc-define OR -w"
Indent multi-line preprocessor #define statements.
.IP "--indent-col1-comments OR -Y"
.IP "--indent-col1-comments OR -Y"
Indent line comments that start in column one.
.IP "--min-conditional-indent=# OR -m#"
.IP "--min-conditional-indent=# OR -m#"
Indent a minimal # spaces in a continuous conditional
belonging to a conditional header.
The valid values are:
@@ -198,122 +198,152 @@ The valid values are:
3 - indent at least one-half an additional indent.
The default value is 2, two additional indents.
.IP "--max-continuation-indent=# OR -M#"
.IP "--max-continuation-indent=# OR -M#"
Indent a maximal # spaces in a continuation line,
relative to the previous line.
The minimum and default value is 40.
.SH Padding Options
.IP "--break-blocks OR -f"
.IP "--break-blocks OR -f"
Insert empty lines around unrelated blocks, labels, classes, ...
.IP "--break-blocks=all OR -F"
.IP "--break-blocks=all OR -F"
Like --break-blocks, except also insert empty lines
around closing headers (e.g. 'else', 'catch', ...).
.IP "--pad-oper OR -p"
.IP "--pad-oper OR -p"
Insert space padding around operators.
.IP "--pad-comma OR -xg"
.IP "--pad-comma OR -xg"
Insert space padding after commas.
.IP "--pad-paren OR -P"
.IP "--pad-negation"
Insert space padding after negations.
.IP "--pad-negation=before"
Insert space padding also before negations.
.IP "--pad-paren OR -P"
Insert space padding around parenthesis on both the outside
and the inside.
.IP "--pad-paren-out OR -d"
.IP "--pad-paren-out OR -d"
Insert space padding around parenthesis on the outside only.
.IP "--pad-first-paren-out OR -xd"
.IP "--pad-first-paren-out OR -xd"
Insert space padding around first parenthesis in a series on
the outside only.
.IP "--pad-paren-in OR -D"
.IP "--pad-paren-in OR -D"
Insert space padding around parenthesis on the inside only.
.IP "--pad-header OR -H"
.IP "--pad-header OR -H"
Insert space padding after paren headers (e.g. 'if', 'for'...).
.IP "--unpad-paren OR -U"
.IP "--unpad-paren OR -U"
Remove unnecessary space padding around parenthesis. This
can be used in combination with the 'pad' options above.
.IP "--delete-empty-lines OR -xd"
.IP "--pad-empty-paren OR -xo"
Apply padding to empty pairs of parentheses; combine with other
parenthesis padding options.
.IP "--pad-brackets"
Insert space padding around square brackets on both the outside
and the inside.
.IP "--pad-brackets-in"
Insert space padding around square brackets the inside only.
.IP "--pad-brackets-out"
Insert space padding around square brackets the outside only.
.IP "--unpad-brackets"
Remove unnecessary space padding around square brackets.
.IP "--delete-empty-lines OR -xe"
Delete empty lines within a function or method.
It will NOT delete lines added by the break-blocks options.
.IP "--fill-empty-lines OR -E"
.IP "--fill-empty-lines OR -E"
Fill empty lines with the white space of their
previous lines.
.IP "--align-pointer=type OR -k1"
.IP "--align-pointer=middle OR -k2"
.IP "--align-pointer=name OR -k3"
.IP "--align-pointer=type OR -k1"
.IP "--align-pointer=middle OR -k2"
.IP "--align-pointer=name OR -k3"
Attach a pointer or reference operator (*, &, or ^) to either
the operator type (left), middle, or operator name (right).
To align the reference separately use --align-reference.
.IP "--align-reference=none OR -W0"
.IP "--align-reference=type OR -W1"
.IP "--align-reference=middle OR -W2"
.IP "--align-reference=name OR -W3"
.IP "--align-reference=none OR -W0"
.IP "--align-reference=type OR -W1"
.IP "--align-reference=middle OR -W2"
.IP "--align-reference=name OR -W3"
Attach a reference operator (&) to either
the operator type (left), middle, or operator name (right).
If not set, follow pointer alignment.
.IP "--squeeze-lines=#"
Remove superfluous empty lines exceeding the given number.
.IP "--squeeze-ws"
Remove superfluous whitespace.
.SH Formatting Options
.IP "--break-closing-braces OR -y"
.IP "--break-closing-braces OR -y"
Break braces before closing headers (e.g. 'else', 'catch', ...).
Use with --style=java, --style=kr, --style=stroustrup, --style=linux, or --style=1tbs."
.IP "--break-elseifs OR -e"
.IP "--break-elseifs OR -e"
Break 'else if()' statements into two different lines.
.IP "--break-one-line-headers OR -xb"
.IP "--break-one-line-headers OR -xb"
Break one line headers (e.g. 'if', 'while', 'else', ...) from a
statement residing on the same line.
.IP "--add-braces OR -j"
.IP "--add-braces OR -j"
.IP "--add-braces=nested (experimental)"
Add braces to unbraced one line conditional statements.
.IP "--add-one-line-braces OR -J"
.IP "--add-one-line-braces OR -J"
Add one line braces to unbraced one line conditional
statements.
.IP "--remove-braces OR -xj"
.IP "--remove-braces OR -xj"
Remove braces from a braced one line conditional statements.
.IP "--break-return-type OR -xB"
.IP "--break-return-type-decl OR -xD"
.IP "--break-return-type OR -xB"
.IP "--break-return-type-decl OR -xD"
Break the return type from the function name. Options are
for the function definitions and the function declarations.
.IP "--attach-return-type OR -xf"
.IP "--attach-return-type-decl OR -xh"
.IP "--attach-return-type OR -xf"
.IP "--attach-return-type-decl OR -xh"
Attach the return type to the function name. Options are
for the function definitions and the function declarations.
.IP "--keep-one-line-blocks OR -O"
.IP "--keep-one-line-blocks OR -O"
Don't break blocks residing completely on one line.
.IP "--keep-one-line-statements OR -o"
.IP "--keep-one-line-statements OR -o"
Don't break lines containing multiple statements into
multiple single-statement lines.
.IP "--convert-tabs OR -c"
.IP "--convert-tabs OR -c"
Convert tabs to the appropriate number of spaces.
.IP "--close-templates OR -xy"
.IP "--close-templates OR -xy"
Close ending angle brackets on template definitions.
.IP "--remove-comment-prefix OR -xp"
.IP "--remove-comment-prefix OR -xp"
Remove the leading '*' prefix on multi-line comments and
indent the comment text one indent.
.IP "--max-code-length=# OR -xC#"
.IP "--break-after-logical OR -xL"
.IP "--max-code-length=# OR -xC#"
.IP "--break-after-logical OR -xL"
max-code-length=# will break the line if it exceeds more than
# characters. The valid values are 50 thru 200.
If the line contains logical conditionals they will be placed
@@ -330,38 +360,47 @@ Indent a Java source file.
.IP "--mode=cs"
Indent a C# source file.
.IP "--mode=objc"
Indent an Objective-C source file.
.IP "--mode=js"
Indent a JavaScript source file (experimental).
.IP "--mode=ghc"
Indent a GHC source file (experimental).
.IP "--mode=gsc"
Indent a GSC source file (experimental).
.SH Objective-C Options
.IP "--pad-method-prefix OR -xQ"
.IP "--pad-method-prefix OR -xQ"
Insert space padding after the '-' or '+' Objective-C
method prefix.
.IP "--unpad-method-prefix OR -xR"
.IP "--unpad-method-prefix OR -xR"
Remove all space padding after the '-' or '+' Objective-C
method prefix.
.IP "--pad-return-type OR -xq"
.IP "--pad-return-type OR -xq"
Insert space padding after the Objective-C return type.
.IP "--unpad-return-type OR -xr"
.IP "--unpad-return-type OR -xr"
Remove all space padding after the Objective-C return type.
.IP "--pad-param-type OR -xS"
Insert space padding after the Objective-C return type.
.IP "--pad-param-type OR -xS"
Insert space padding after the Objective-C param type.
.IP "--unpad-param-type OR -xs"
Remove all space padding after the Objective-C return type.
.IP "--unpad-param-type OR -xs"
Remove all space padding after the Objective-C param type.
.IP "--align-method-colon OR -xM"
.IP "--align-method-colon OR -xM"
Align the colons in an Objective-C method definition.
.IP "--pad-method-colon=none OR -xP"
.IP "--pad-method-colon=all OR -xP1"
.IP "--pad-method-colon=after OR -xP2"
.IP "--pad-method-colon=before OR -xP3"
.IP "--pad-method-colon=none OR -xP"
.IP "--pad-method-colon=all OR -xP1"
.IP "--pad-method-colon=after OR -xP2"
.IP "--pad-method-colon=before OR -xP3"
Add or remove space padding before or after the colons in an
Objective-C method call.
@@ -370,10 +409,10 @@ Objective-C method call.
.IP "--suffix=####"
Append the suffix #### instead of '.orig' to original filename.
.IP "--suffix=none OR -n"
.IP "--suffix=none OR -n"
Do not retain a backup of the original file.
.IP "--recursive OR -r OR -R"
.IP "--recursive OR -r OR -R"
Process subdirectories recursively.
.IP "--dry-run"
@@ -382,35 +421,35 @@ Perform a trial run with no changes made to check for formatting.
.IP "--exclude=####"
Specify a file or directory #### to be excluded from processing.
.IP "--ignore-exclude-errors OR -i"
.IP "--ignore-exclude-errors OR -i"
Allow processing to continue if there are errors in the exclude=####
options. It will display the unmatched excludes.
.IP "--ignore-exclude-errors-x OR -xi"
.IP "--ignore-exclude-errors-x OR -xi"
Allow processing to continue if there are errors in the exclude=####
options. It will NOT display the unmatched excludes.
.IP "--errors-to-stdout OR -X"
.IP "--errors-to-stdout OR -X"
Print errors and help information to standard-output rather than
to standard-error.
.IP "--preserve-date OR -Z"
.IP "--preserve-date OR -Z"
Preserve the original file's date and time modified. The time
modified will be changed a few micro seconds to force a compile.
.IP "--verbose OR -v"
.IP "--verbose OR -v"
Verbose mode. Extra informational messages will be displayed.
.IP "--formatted OR -Q"
.IP "--formatted OR -Q"
Formatted display mode. Display only the files that have been
formatted.
.IP "--quiet OR -q"
.IP "--quiet OR -q"
Quiet mode. Suppress all output except error messages.
.IP "--lineend=windows OR -z1"
.IP "--lineend=linux OR -z2"
.IP "--lineend=macold OR -z3"
.IP "--lineend=windows OR -z1"
.IP "--lineend=linux OR -z2"
.IP "--lineend=macold OR -z3"
Force use of the specified line end style. Valid options
are windows (CRLF), linux (LF), and macold (CR).
@@ -431,16 +470,16 @@ The file should be included in the project top-level directory.
The default file name is .astylerc or _astylerc.
'none' disables the project or environment variable file.
.IP "--ascii OR -I"
.IP "--ascii OR -I"
The displayed output will be ascii characters only.
.IP "--version OR -V"
.IP "--version OR -V"
Print version number.
.IP "--help OR -h OR -?"
.IP "--help OR -h OR -?"
Print this help message.
.IP "--html OR -!"
.IP "--html OR -!"
Open the HTML help file "astyle.html" in the default browser.
The documentation must be installed in the standard install path.
@@ -482,7 +521,7 @@ Long options within the option files may be written without '--'.
.PP
Line-end comments begin with a '#'.
.SH Disable Formatting
.SH Disable Formatting
Blocks of code can be disabled with the comment tags *INDENT-OFF*
and *INDENT-ON*. It must be contained in a one-line comment.
@@ -501,6 +540,6 @@ astyle --style=allman --recursive /home/project/*.cpp,*.h
astyle --style=allman < OriginalSourceFile > BeautifiedSourceFile
.SH AUTHORS
Andre Simon <a.simon@mailbox.org>
Andre Simon <as@andre-simon.de>
.SH SEE ALSO
More information at https://sourceforge.net/p/astyle/.
More information at https://sourceforge.net/p/astyle/.
+93
View File
@@ -0,0 +1,93 @@
_astyle() {
local IFS=$' \t\n'
local args cur prev cmd opts arg
args=("${COMP_WORDS[@]}")
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="--style --indent --attach-namespaces --attach-classes --attach-inlines --attach-extern-c --attach-closing-while --indent-classes --indent-modifiers --indent-switches --indent-cases --indent-namespaces --indent-after-parens --indent-continuation --indent-labels --indent-preproc-block --indent-preproc-cond --indent-preproc-define --indent-col1-comments --min-conditional-indent --max-continuation-indent --break-blocks --pad-oper --pad-comma --pad-negation --pad-paren --pad-paren-out --pad-first-paren-out --pad-paren-in --pad-header --unpad-paren --pad-empty-paren --pad-brackets --unpad-brackets --delete-empty-lines --fill-empty-lines --align-pointer --align-reference --break-closing-braces --break-elseifs --break-one-line-headers --add-braces --add-one-line-braces --remove-braces --break-return-type --attach-return-type-decl --keep-one-line-blocks --keep-one-line-statements --convert-tabs --close-templates --remove-comment-prefix --max-code-length --break-after-logical mode --pad-method-prefix --unpad-method-prefix --pad-return-type --unpad-return-type --pad-param-type --unpad-param-type --align-method-colon --pad-method-colon --suffix --recursive --dry-run --exclude --ignore-exclude-errors --ignore-exclude-errors-x --errors-to-stdout --preserve-date --verbose --formatted --quiet --lineend --options --project --ascii --version --help --html --stdin --stdout --squeeze-lines --squeeze-ws"
case "$prev" in
--style)
COMPREPLY=($(compgen -W "allman java kr stroustrup whitesmith vtk ratliff gnu linux horstmann 1tbs google mozilla webkit pico lisp" -- "$cur"))
return 0
;;
--indent)
COMPREPLY=($(compgen -W "spaces tab force-tab force-tab-x" -- "$cur"))
return 0
;;
--indent-continuation)
COMPREPLY=($(compgen -W "0 1 2 3 4" -- "$cur"))
return 0
;;
--min-conditional-indent)
COMPREPLY=($(compgen -W "0 1 2 3" -- "$cur"))
return 0
;;
--max-continuation-indent)
COMPREPLY=($(compgen -f -- "$cur"))
return 0
;;
--break-blocks)
COMPREPLY=($(compgen -W "all" -- "$cur"))
return 0
;;
--align-pointer)
COMPREPLY=($(compgen -W "type middle name" -- "$cur"))
return 0
;;
--align-reference)
COMPREPLY=($(compgen -W "none type middle name" -- "$cur"))
return 0
;;
--max-code-length)
COMPREPLY=($(compgen -f -- "$cur"))
return 0
;;
mode)
COMPREPLY=($(compgen -W "c java cs objc js" -- "$cur"))
return 0
;;
--pad-method-colon)
COMPREPLY=($(compgen -W "none all after before" -- "$cur"))
return 0
;;
--suffix)
COMPREPLY=($(compgen -f -- "$cur"))
return 0
;;
--exclude)
COMPREPLY=($(compgen -f -- "$cur"))
return 0
;;
--lineend)
COMPREPLY=($(compgen -W "windows linux macold" -- "$cur"))
return 0
;;
--options)
COMPREPLY=($(compgen -f -- "$cur"))
return 0
;;
--project)
COMPREPLY=($(compgen -f -- "$cur"))
return 0
;;
--stdin)
COMPREPLY=($(compgen -f -- "$cur"))
return 0
;;
--stdout)
COMPREPLY=($(compgen -f -- "$cur"))
return 0
;;
--squeeze-lines)
COMPREPLY=($(compgen -f -- "$cur"))
return 0
;;
esac
if [[ "$cur" = -* ]]; then
COMPREPLY=($(compgen -W "$opts" -- "$cur"))
fi
}
complete -F _astyle -o bashdefault -o default astyle
+84
View File
@@ -0,0 +1,84 @@
complete -c astyle -l style -xa 'allman java kr stroustrup whitesmith vtk ratliff gnu linux horstmann 1tbs google mozilla webkit pico lisp' -d 'Set a formatting and indenting style'
complete -c astyle -l indent -xa 'spaces tab force-tab force-tab-x' -d 'Set indentation option'
complete -c astyle -l attach-namespaces -d 'Attach braces to a namespace statement'
complete -c astyle -l attach-classes -d 'Attach braces to a class statement'
complete -c astyle -l attach-inlines -d 'Attach braces to class inline function definitions'
complete -c astyle -l attach-extern-c -d 'Attach braces to an extern C statement'
complete -c astyle -l attach-closing-while -d 'Attach closing while of do-while to the closing brace'
complete -c astyle -l indent-classes -d 'Indent \'class\' blocks so that the entire block is indented'
complete -c astyle -l indent-modifiers -d 'Indent \'class\' access modifiers, \'public:\', \'protected:\' or \'private:\', one half indent'
complete -c astyle -l indent-switches -d 'Indent \'switch\' blocks, so that the inner \'case XXX:\' headers are indented in relation to the switch block'
complete -c astyle -l indent-cases -d 'Indent case blocks from the \'case XXX:\' headers'
complete -c astyle -l indent-namespaces -d 'Indent the contents of namespace blocks'
complete -c astyle -l indent-after-parens -d 'Indent, instead of align, continuation lines following lines that contain an opening paren \'(\' or an assignment \'=\''
complete -c astyle -l indent-continuation -xa '0 1 2 3 4' -d 'Indent continuation lines an additional indents'
complete -c astyle -l indent-labels -d 'Indent labels so that they appear one indent less than the current indentation level, rather than being flushed completely to the left'
complete -c astyle -l indent-preproc-block -d 'Indent preprocessor blocks at brace level 0'
complete -c astyle -l indent-preproc-cond -d 'Indent preprocessor conditional statements #if/#else/#endif to the same level as the source code'
complete -c astyle -l indent-preproc-define -d 'Indent multi-line preprocessor #define statements'
complete -c astyle -l indent-col1-comments -d 'Indent line comments that start in column one'
complete -c astyle -l min-conditional-indent -xa '0 1 2 3' -d 'Indent a minimal # spaces in a continuous conditional belonging to a conditional header'
complete -c astyle -l max-continuation-indent -r -d 'Indent a maximal # spaces in a continuation line, relative to the previous line'
complete -c astyle -l break-blocks -xa 'all' -d 'Insert empty lines around unrelated blocks, labels, classes, ..'
complete -c astyle -l pad-oper -d 'Insert space padding around operators'
complete -c astyle -l pad-comma -d 'Insert space padding after commas'
complete -c astyle -l pad-paren -d 'Insert space padding around parenthesis on both the outside and the inside'
complete -c astyle -l pad-paren-out -d 'Insert space padding around parenthesis on the outside only'
complete -c astyle -l pad-first-paren-out -d 'Insert space padding around first parenthesis in a series on the outside only'
complete -c astyle -l pad-paren-in -d 'Insert space padding around parenthesis on the inside only'
complete -c astyle -l pad-header -d 'Insert space padding after paren headers (e.g'
complete -c astyle -l unpad-paren -d 'Remove unnecessary space padding around parenthesis'
complete -c astyle -l pad-empty-paren -d 'Apply padding to empty pairs of parentheses'
complete -c astyle -l pad-brackets -d 'Insert space padding around square brackets on both the outside and the inside (experimental)'
complete -c astyle -l unpad-brackets -d 'Remove unnecessary space padding around square brackets (experimental)'
complete -c astyle -l delete-empty-lines -d 'Delete empty lines within a function or method'
complete -c astyle -l fill-empty-lines -d 'Fill empty lines with the white space of their previous lines'
complete -c astyle -l align-pointer -xa 'type middle name' -d 'Attach a pointer or reference operator (*, &, or ^) to either the operator type (left), middle, or operator name (right)'
complete -c astyle -l align-reference -xa 'none type middle name' -d 'Attach a reference operator (&) to either the operator type (left), middle, or operator name (right)'
complete -c astyle -l break-closing-braces -d 'Break braces before closing headers (e.g'
complete -c astyle -l break-elseifs -d 'Break \'else if()\' statements into two different lines'
complete -c astyle -l break-one-line-headers -d 'Break one line headers (e.g'
complete -c astyle -l add-braces -d 'Add braces to unbraced one line conditional statements'
complete -c astyle -l add-one-line-braces -d 'Add one line braces to unbraced one line conditional statements'
complete -c astyle -l remove-braces -d 'Remove braces from a braced one line conditional statements'
complete -c astyle -l break-return-type -d 'Break the return type from the function name definitions'
complete -c astyle -l attach-return-type-decl -d 'Break the return type from the function name declarations'
complete -c astyle -l keep-one-line-blocks -d 'Don\'t break blocks residing completely on one line'
complete -c astyle -l keep-one-line-statements -d 'Don\'t break lines containing multiple statements into multiple single-statement lines'
complete -c astyle -l convert-tabs -d 'Convert tabs to the appropriate number of spaces'
complete -c astyle -l close-templates -d 'Close ending angle brackets on template definitions'
complete -c astyle -l remove-comment-prefix -d 'Remove the leading \'*\' prefix on multi-line comments and indent the comment text one indent'
complete -c astyle -l max-code-length -r -d 'Break the line if it exceeds more than # characters'
complete -c astyle -l break-after-logical -d 'After break line using --max-code-length, place logical conditional last on the previous line'
complete -c astyle -xa 'c java cs objc js' -d 'Set input syntax mode'
complete -c astyle -l pad-method-prefix -d 'Insert space padding after the \'-\' or \'+\' Objective-C method prefix'
complete -c astyle -l unpad-method-prefix -d 'Remove all space padding after the \'-\' or \'+\' Objective-C method prefix'
complete -c astyle -l pad-return-type -d 'Insert space padding after the Objective-C return type'
complete -c astyle -l unpad-return-type -d 'Remove all space padding after the Objective-C return type'
complete -c astyle -l pad-param-type -d 'Insert space padding after the Objective-C param type'
complete -c astyle -l unpad-param-type -d 'Remove all space padding after the Objective-C param type'
complete -c astyle -l align-method-colon -d 'Align the colons in an Objective-C method definition'
complete -c astyle -l pad-method-colon -xa 'none all after before' -d 'Add or remove space padding before or after the colons in an Objective-C method call'
complete -c astyle -l suffix -r -d 'Append the suffix #### instead of \'.orig\' to original filename or do not retain a backup of the original file if set to none'
complete -c astyle -l recursive -d 'Process subdirectories recursively'
complete -c astyle -l dry-run -d 'Perform a trial run with no changes made to check for formatting'
complete -c astyle -l exclude -r -d 'Specify a file or directory #### to be excluded from processing'
complete -c astyle -l ignore-exclude-errors -d 'Allow processing to continue if there are errors in the --exclude options'
complete -c astyle -l ignore-exclude-errors-x -d 'Allow processing to continue if there are errors in the --exclude options'
complete -c astyle -l errors-to-stdout -d 'Print errors and help information to standard-output rather than to standard-error'
complete -c astyle -l preserve-date -d 'Preserve the original file\'s date and time modified'
complete -c astyle -l verbose -d 'Extra informational messages will be displayed'
complete -c astyle -l formatted -d 'Display only the files that have been formatted'
complete -c astyle -l quiet -d 'Suppress all output except error messages'
complete -c astyle -l lineend -xa 'windows linux macold' -d 'Force use of the specified line end style'
complete -c astyle -l options -r -d 'Specify a default option file to read and use'
complete -c astyle -l project -r -d 'Specify a project option file to read and use'
complete -c astyle -l ascii -d 'The displayed output will be ASCII characters only'
complete -c astyle -l version -d 'Print version number'
complete -c astyle -l help -d 'Print help message'
complete -c astyle -l html -d 'Open the HTML help file astyle.html in the default browser'
complete -c astyle -l stdin -r -d 'Use the file path as input to single file formatting'
complete -c astyle -l stdout -r -d 'Use the file path as output from single file formatting'
complete -c astyle -l squeeze-lines -r -d 'Remove superfluous empty lines exceeding the given number'
complete -c astyle -l squeeze-ws -d 'Remove superfluous whitespace'
+97
View File
@@ -0,0 +1,97 @@
#compdef astyle
_astyle() {
local -a options=(
"--style[Set a formatting and indenting style]: :(allman java kr stroustrup whitesmith vtk ratliff gnu linux horstmann 1tbs google mozilla webkit pico lisp)"
"--indent[Set indentation option]: :(spaces tab force-tab force-tab-x)"
"--attach-namespaces[Attach braces to a namespace statement]"
"--attach-classes[Attach braces to a class statement]"
"--attach-inlines[Attach braces to class inline function definitions]"
"--attach-extern-c[Attach braces to an extern C statement]"
"--attach-closing-while[Attach closing while of do-while to the closing brace]"
"--indent-classes[Indent 'class' blocks so that the entire block is indented]"
"--indent-modifiers[Indent 'class' access modifiers, 'public\:', 'protected\:' or 'private\:', one half indent]"
"--indent-switches[Indent 'switch' blocks, so that the inner 'case XXX\:' headers are indented in relation to the switch block]"
"--indent-cases[Indent case blocks from the 'case XXX\:' headers]"
"--indent-namespaces[Indent the contents of namespace blocks]"
"--indent-after-parens[Indent, instead of align, continuation lines following lines that contain an opening paren '(' or an assignment '=']"
"--indent-continuation[Indent continuation lines an additional indents]: :(0 1 2 3 4)"
"--indent-labels[Indent labels so that they appear one indent less than the current indentation level, rather than being flushed completely to the left]"
"--indent-preproc-block[Indent preprocessor blocks at brace level 0]"
"--indent-preproc-cond[Indent preprocessor conditional statements #if/#else/#endif to the same level as the source code]"
"--indent-preproc-define[Indent multi-line preprocessor #define statements]"
"--indent-col1-comments[Indent line comments that start in column one]"
"--min-conditional-indent[Indent a minimal # spaces in a continuous conditional belonging to a conditional header]: :(0 1 2 3)"
"--max-continuation-indent[Indent a maximal # spaces in a continuation line, relative to the previous line]: :_files"
"--break-blocks[Insert empty lines around unrelated blocks, labels, classes, ..]: :(all)"
"--pad-oper[Insert space padding around operators]"
"--pad-comma[Insert space padding after commas]"
"--pad-paren[Insert space padding around parenthesis on both the outside and the inside]"
"--pad-paren-out[Insert space padding around parenthesis on the outside only]"
"--pad-first-paren-out[Insert space padding around first parenthesis in a series on the outside only]"
"--pad-paren-in[Insert space padding around parenthesis on the inside only]"
"--pad-header[Insert space padding after paren headers (e.g]"
"--unpad-paren[Remove unnecessary space padding around parenthesis]"
"--pad-empty-paren[Apply padding to empty pairs of parentheses]"
"--pad-brackets[Insert space padding around square brackets on both the outside and the inside (experimental)]"
"--unpad-brackets[Remove unnecessary space padding around square brackets (experimental)]"
"--delete-empty-lines[Delete empty lines within a function or method]"
"--fill-empty-lines[Fill empty lines with the white space of their previous lines]"
"--align-pointer[Attach a pointer or reference operator (*, &, or ^) to either the operator type (left), middle, or operator name (right)]: :(type middle name)"
"--align-reference[Attach a reference operator (&) to either the operator type (left), middle, or operator name (right)]: :(none type middle name)"
"--break-closing-braces[Break braces before closing headers (e.g]"
"--break-elseifs[Break 'else if()' statements into two different lines]"
"--break-one-line-headers[Break one line headers (e.g]"
"--add-braces[Add braces to unbraced one line conditional statements]"
"--add-one-line-braces[Add one line braces to unbraced one line conditional statements]"
"--remove-braces[Remove braces from a braced one line conditional statements]"
"--break-return-type[Break the return type from the function name definitions]"
"--attach-return-type-decl[Break the return type from the function name declarations]"
"--keep-one-line-blocks[Don't break blocks residing completely on one line]"
"--keep-one-line-statements[Don't break lines containing multiple statements into multiple single-statement lines]"
"--convert-tabs[Convert tabs to the appropriate number of spaces]"
"--close-templates[Close ending angle brackets on template definitions]"
"--remove-comment-prefix[Remove the leading '*' prefix on multi-line comments and indent the comment text one indent]"
"--max-code-length[Break the line if it exceeds more than # characters]: :_files"
"--break-after-logical[After break line using --max-code-length, place logical conditional last on the previous line]"
"mode[Set input syntax mode]: :(c java cs objc js)"
"--pad-method-prefix[Insert space padding after the '-' or '+' Objective-C method prefix]"
"--unpad-method-prefix[Remove all space padding after the '-' or '+' Objective-C method prefix]"
"--pad-return-type[Insert space padding after the Objective-C return type]"
"--unpad-return-type[Remove all space padding after the Objective-C return type]"
"--pad-param-type[Insert space padding after the Objective-C param type]"
"--unpad-param-type[Remove all space padding after the Objective-C param type]"
"--align-method-colon[Align the colons in an Objective-C method definition]"
"--pad-method-colon[Add or remove space padding before or after the colons in an Objective-C method call]: :(none all after before)"
"--suffix[Append the suffix #### instead of '.orig' to original filename or do not retain a backup of the original file if set to none]: :_files"
"--recursive[Process subdirectories recursively]"
"--dry-run[Perform a trial run with no changes made to check for formatting]"
"--exclude[Specify a file or directory #### to be excluded from processing]: :_files"
"--ignore-exclude-errors[Allow processing to continue if there are errors in the --exclude options]"
"--ignore-exclude-errors-x[Allow processing to continue if there are errors in the --exclude options]"
"--errors-to-stdout[Print errors and help information to standard-output rather than to standard-error]"
"--preserve-date[Preserve the original file's date and time modified]"
"--verbose[Extra informational messages will be displayed]"
"--formatted[Display only the files that have been formatted]"
"--quiet[Suppress all output except error messages]"
"--lineend[Force use of the specified line end style]: :(windows linux macold)"
"--options[Specify a default option file to read and use]: :_files"
"--project[Specify a project option file to read and use]: :_files"
"--ascii[The displayed output will be ASCII characters only]"
"--version[Print version number]"
"--help[Print help message]"
"--html[Open the HTML help file astyle.html in the default browser]"
"--stdin[Use the file path as input to single file formatting]: :_files"
"--stdout[Use the file path as output from single file formatting]: :_files"
"--squeeze-lines[Remove superfluous empty lines exceeding the given number]: :_files"
"--squeeze-ws[Remove superfluous whitespace]"
)
_arguments -s -S \
$options \
"*: :_files" \
&& return 0
return 1
}
_astyle
+295
View File
@@ -0,0 +1,295 @@
#!/usr/bin/env lua
-- Based on the generator script written by Paul Ouellette for highlight:
-- https://gitlab.com/saalen/highlight/-/merge_requests/137
local argparse = require "argparse"
local parser = argparse "astyle"
:add_help(false)
parser:argument "file"
:args "*"
parser:option "--style"
:description "Set a formatting and indenting style"
:choices {"allman", "java", "kr", "stroustrup", "whitesmith", "vtk", "ratliff", "gnu", "linux", "horstmann", "1tbs", "google", "mozilla", "webkit", "pico", "lisp"}
parser:option "--indent"
:description "Set indentation option"
:choices {"spaces", "tab", "force-tab", "force-tab-x"}
parser:flag "--attach-namespaces"
:description "Attach braces to a namespace statement"
parser:flag "--attach-classes"
:description "Attach braces to a class statement"
parser:flag "--attach-inlines"
:description "Attach braces to class inline function definitions"
parser:flag "--attach-extern-c"
:description "Attach braces to an extern C statement"
parser:flag "--attach-closing-while"
:description "Attach closing while of do-while to the closing brace"
parser:flag "--indent-classes"
:description "Indent 'class' blocks so that the entire block is indented"
parser:flag "--indent-modifiers"
:description "Indent 'class' access modifiers, 'public:', 'protected:' or 'private:', one half indent."
parser:flag "--indent-switches"
:description "Indent 'switch' blocks, so that the inner 'case XXX:' headers are indented in relation to the switch block"
parser:flag "--indent-cases"
:description "Indent case blocks from the 'case XXX:' headers"
parser:flag "--indent-namespaces"
:description "Indent the contents of namespace blocks"
parser:flag "--indent-after-parens"
:description "Indent, instead of align, continuation lines following lines that contain an opening paren '(' or an assignment '='"
parser:option "--indent-continuation"
:description "Indent continuation lines an additional indents"
:choices {"0", "1", "2", "3", "4"}
parser:flag "--indent-labels"
:description "Indent labels so that they appear one indent less than the current indentation level, rather than being flushed completely to the left"
parser:flag "--indent-preproc-block"
:description "Indent preprocessor blocks at brace level 0. Without this option the preprocessor block is not indented"
parser:flag "--indent-preproc-cond"
:description "Indent preprocessor conditional statements #if/#else/#endif to the same level as the source code"
parser:flag "--indent-preproc-define"
:description "Indent multi-line preprocessor #define statements"
parser:flag "--indent-col1-comments"
:description "Indent line comments that start in column one"
parser:option "--min-conditional-indent"
:description "Indent a minimal # spaces in a continuous conditional belonging to a conditional header"
:choices {"0", "1", "2", "3"}
parser:option "--max-continuation-indent"
:description "Indent a maximal # spaces in a continuation line, relative to the previous line"
parser:option "--break-blocks"
:description "Insert empty lines around unrelated blocks, labels, classes, ..."
:args "?"
:choices {"all"}
parser:flag "--pad-oper"
:description "Insert space padding around operators"
parser:flag "--pad-comma"
:description "Insert space padding after commas"
parser:flag "--pad-negation"
:description "Insert space padding after negations"
parser:flag "--pad-paren"
:description "Insert space padding around parenthesis on both the outside and the inside"
parser:flag "--pad-paren-out"
:description "Insert space padding around parenthesis on the outside only"
parser:flag "--pad-first-paren-out"
:description "Insert space padding around first parenthesis in a series on the outside only"
parser:flag "--pad-paren-in"
:description "Insert space padding around parenthesis on the inside only"
parser:flag "--pad-header"
:description "Insert space padding after paren headers (e.g. 'if', 'for'...)"
parser:flag "--unpad-paren"
:description "Remove unnecessary space padding around parenthesis"
parser:flag "--pad-brackets"
:description "Insert space padding around square brackets on both the outside and the inside."
parser:flag "--pad-brackets-in"
:description "Insert space padding around square brackets on the inside only."
parser:flag "--pad-brackets-out"
:description "Insert space padding around square brackets on the outside only."
parser:flag "--unpad-brackets"
:description "Remove unnecessary space padding around square brackets (experimental)."
parser:flag "--delete-empty-lines"
:description "Delete empty lines within a function or method"
parser:flag "--fill-empty-lines"
:description "Fill empty lines with the white space of their previous lines"
parser:option "--align-pointer"
:description "Attach a pointer or reference operator (*, &, or ^) to either the operator type (left), middle, or operator name (right)"
:choices {"type", "middle", "name"}
parser:option "--align-reference"
:description "Attach a reference operator (&) to either the operator type (left), middle, or operator name (right). If not set, follow pointer alignment"
:choices {"none", "type", "middle", "name"}
parser:flag "--break-closing-braces"
:description "Break braces before closing headers (e.g. 'else', 'catch', ...)"
parser:flag "--break-elseifs"
:description "Break 'else if()' statements into two different lines"
parser:flag "--break-one-line-headers"
:description "Break one line headers (e.g. 'if', 'while', 'else', ...) from a statement residing on the same line"
parser:flag "--add-braces"
:description "Add braces to unbraced one line conditional statements"
parser:flag "--add-one-line-braces"
:description "Add one line braces to unbraced one line conditional statements"
parser:flag "--remove-braces"
:description "Remove braces from a braced one line conditional statements"
parser:flag "--break-return-type"
:description "Break the return type from the function name definitions"
parser:flag "--attach-return-type-decl"
:description "Break the return type from the function name declarations"
parser:flag "--keep-one-line-blocks"
:description "Don't break blocks residing completely on one line"
parser:flag "--keep-one-line-statements"
:description "Don't break lines containing multiple statements into multiple single-statement lines"
parser:flag "--convert-tabs"
:description "Convert tabs to the appropriate number of spaces"
parser:flag "--close-templates"
:description "Close ending angle brackets on template definitions"
parser:flag "--remove-comment-prefix"
:description "Remove the leading '*' prefix on multi-line comments and indent the comment text one indent"
parser:option "--max-code-length"
:description "Break the line if it exceeds more than # characters"
parser:flag "--break-after-logical"
:description "After break line using --max-code-length, place logical conditional last on the previous line"
parser:option "mode"
:description "Set input syntax mode"
:choices {"c", "java", "cs", "objc", "js"}
parser:flag "--pad-method-prefix"
:description "Insert space padding after the '-' or '+' Objective-C method prefix"
parser:flag "--unpad-method-prefix"
:description "Remove all space padding after the '-' or '+' Objective-C method prefix"
parser:flag "--pad-return-type"
:description "Insert space padding after the Objective-C return type"
parser:flag "--unpad-return-type"
:description "Remove all space padding after the Objective-C return type"
parser:flag "--pad-param-type"
:description "Insert space padding after the Objective-C param type"
parser:flag "--unpad-param-type"
:description "Remove all space padding after the Objective-C param type"
parser:flag "--align-method-colon"
:description "Align the colons in an Objective-C method definition."
parser:option "--pad-method-colon"
:description "Add or remove space padding before or after the colons in an Objective-C method call"
:choices {"none", "all", "after", "before"}
parser:option "--suffix"
:description "Append the suffix #### instead of '.orig' to original filename or do not retain a backup of the original file if set to none"
parser:flag "--recursive"
:description "Process subdirectories recursively"
parser:flag "--dry-run"
:description "Perform a trial run with no changes made to check for formatting"
parser:option "--exclude"
:description "Specify a file or directory #### to be excluded from processing"
parser:flag "--ignore-exclude-errors"
:description "Allow processing to continue if there are errors in the --exclude options. It will display the unmatched excludes"
parser:flag "--ignore-exclude-errors-x"
:description "Allow processing to continue if there are errors in the --exclude options. It will NOT display the unmatched excludes"
parser:flag "--errors-to-stdout"
:description "Print errors and help information to standard-output rather than to standard-error"
parser:flag "--preserve-date"
:description "Preserve the original file's date and time modified"
parser:flag "--verbose"
:description "Extra informational messages will be displayed"
parser:flag "--formatted"
:description "Display only the files that have been formatted"
parser:flag "--quiet"
:description "Suppress all output except error messages"
parser:option "--lineend"
:description "Force use of the specified line end style"
:choices {"windows", "linux", "macold"}
parser:option "--options"
:description "Specify a default option file to read and use."
parser:option "--project"
:description "Specify a project option file to read and use"
parser:flag "--ascii"
:description "The displayed output will be ASCII characters only"
parser:flag "--version"
:description "Print version number"
parser:flag "--help"
:description "Print help message"
parser:flag "--html"
:description "Open the HTML help file astyle.html in the default browser"
parser:option "--stdin"
:description "Use the file path as input to single file formatting"
parser:option "--stdout"
:description "Use the file path as output from single file formatting"
parser:option "--squeeze-lines"
:description "Remove superfluous empty lines exceeding the given number"
parser:flag "--squeeze-ws"
:description "Remove superfluous whitespace"
parser:flag "--indent-lambda"
:description "Indent C++ lambda functions (experimental, broken for complex fct bodies)"
local p = argparse "gen-completions"
p:argument "shell"
:choices {"bash", "zsh", "fish"}
local shell = p:parse().shell
if shell == "bash" then
io.write(parser:get_bash_complete())
elseif shell == "zsh" then
io.write(parser:get_zsh_complete())
else
io.write(parser:get_fish_complete())
end
File diff suppressed because it is too large Load Diff
+27 -28
View File
@@ -34,7 +34,7 @@ void ASEnhancer::init(int _fileType,
bool _preprocBlockIndent,
bool _preprocDefineIndent,
bool _emptyLineFill,
vector<const pair<const string, const string>* >* _indentableMacros)
std::vector<const std::pair<const std::string, const std::string>* >* _indentableMacros)
{
// formatting variables from ASFormatter and ASBeautifier
ASBase::init(_fileType);
@@ -84,7 +84,7 @@ void ASEnhancer::init(int _fileType,
*
* @param line the original formatted line will be updated if necessary.
*/
void ASEnhancer::enhance(string& line, bool isInNamespace, bool isInPreprocessor, bool isInSQL)
void ASEnhancer::enhance(std::string& line, bool isInNamespace, bool isInPreprocessor, bool isInSQL)
{
shouldUnindentLine = true;
shouldUnindentComment = false;
@@ -125,7 +125,7 @@ void ASEnhancer::enhance(string& line, bool isInNamespace, bool isInPreprocessor
if (isInDeclareSection)
{
size_t firstText = line.find_first_not_of(" \t");
if (firstText == string::npos || line[firstText] != '#')
if (firstText == std::string::npos || line[firstText] != '#')
indentLine(line, 1);
}
@@ -135,7 +135,7 @@ void ASEnhancer::enhance(string& line, bool isInNamespace, bool isInPreprocessor
|| (namespaceIndent && isInNamespace)))
{
size_t firstText = line.find_first_not_of(" \t");
if (firstText == string::npos || line[firstText] != '#')
if (firstText == std::string::npos || line[firstText] != '#')
indentLine(line, 1);
}
@@ -150,7 +150,7 @@ void ASEnhancer::enhance(string& line, bool isInNamespace, bool isInPreprocessor
*
* @param line a reference to the line that will be converted.
*/
void ASEnhancer::convertForceTabIndentToSpaces(string& line) const
void ASEnhancer::convertForceTabIndentToSpaces(std::string& line) const
{
// replace tab indents with spaces
for (size_t i = 0; i < line.length(); i++)
@@ -171,7 +171,7 @@ void ASEnhancer::convertForceTabIndentToSpaces(string& line) const
*
* @param line a reference to the line that will be converted.
*/
void ASEnhancer::convertSpaceIndentToForceTab(string& line) const
void ASEnhancer::convertSpaceIndentToForceTab(std::string& line) const
{
assert(tabLength > 0);
@@ -188,7 +188,7 @@ void ASEnhancer::convertSpaceIndentToForceTab(string& line) const
* @param caseIndex the line index of the case statement.
* @return the line index of the colon.
*/
size_t ASEnhancer::findCaseColon(const string& line, size_t caseIndex) const
size_t ASEnhancer::findCaseColon(std::string_view line, size_t caseIndex) const
{
size_t i = caseIndex;
bool isInQuote_ = false;
@@ -236,7 +236,7 @@ size_t ASEnhancer::findCaseColon(const string& line, size_t caseIndex) const
* @param indent the number of tabsets to insert.
* @return the number of characters inserted.
*/
int ASEnhancer::indentLine(string& line, int indent) const
int ASEnhancer::indentLine(std::string& line, int indent) const
{
if (line.length() == 0
&& !emptyLineFill)
@@ -276,22 +276,22 @@ int ASEnhancer::indentLine(string& line, int indent) const
* @param index the current line index.
* @return true if a hit.
*/
bool ASEnhancer::isBeginDeclareSectionSQL(const string& line, size_t index) const
bool ASEnhancer::isBeginDeclareSectionSQL(std::string_view line, size_t index) const
{
string word;
size_t hits = 0;
size_t i;
for (i = index; i < line.length(); i++)
{
i = line.find_first_not_of(" \t", i);
if (i == string::npos)
if (i == std::string::npos)
return false;
if (line[i] == ';')
break;
if (!isCharPotentialHeader(line, i))
continue;
word = getCurrentWord(line, i);
for (char& character : word)
std::string_view word = getCurrentWord(line, i);
for (char character : word)
character = (char) toupper(character);
if (word == "EXEC" || word == "SQL")
{
@@ -325,22 +325,21 @@ bool ASEnhancer::isBeginDeclareSectionSQL(const string& line, size_t index) cons
* @param index the current line index.
* @return true if a hit.
*/
bool ASEnhancer::isEndDeclareSectionSQL(const string& line, size_t index) const
bool ASEnhancer::isEndDeclareSectionSQL(std::string_view line, size_t index) const
{
string word;
size_t hits = 0;
size_t i;
for (i = index; i < line.length(); i++)
{
i = line.find_first_not_of(" \t", i);
if (i == string::npos)
if (i == std::string::npos)
return false;
if (line[i] == ';')
break;
if (!isCharPotentialHeader(line, i))
continue;
word = getCurrentWord(line, i);
for (char& character : word)
std::string_view word = getCurrentWord(line, i);
for (char character : word)
character = (char) toupper(character);
if (word == "EXEC" || word == "SQL")
{
@@ -374,7 +373,7 @@ bool ASEnhancer::isEndDeclareSectionSQL(const string& line, size_t index) const
* @return false = one-line brace has not been reached.
* true = one-line brace has been reached.
*/
bool ASEnhancer::isOneLineBlockReached(const string& line, int startChar) const
bool ASEnhancer::isOneLineBlockReached(std::string_view line, int startChar) const
{
assert(line[startChar] == '{');
@@ -446,7 +445,7 @@ bool ASEnhancer::isOneLineBlockReached(const string& line, int startChar) const
* parse characters in the current line to determine if an indent
* or unindent is needed.
*/
void ASEnhancer::parseCurrentLine(string& line, bool isInPreprocessor, bool isInSQL)
void ASEnhancer::parseCurrentLine(std::string& line, bool isInPreprocessor, bool isInSQL)
{
bool isSpecialChar = false; // is a backslash escape character
@@ -516,7 +515,7 @@ void ASEnhancer::parseCurrentLine(string& line, bool isInPreprocessor, bool isIn
shouldUnindentComment = true;
isInComment = true;
size_t commentEnd = line.find("*/", i);
if (commentEnd == string::npos)
if (commentEnd == std::string::npos)
i = line.length() - 1;
else
i = commentEnd - 1;
@@ -537,7 +536,7 @@ void ASEnhancer::parseCurrentLine(string& line, bool isInPreprocessor, bool isIn
if (sw.switchBraceCount == 1 && sw.unindentCase)
shouldUnindentComment = true;
size_t commentEnd = line.find("*/", i);
if (commentEnd == string::npos)
if (commentEnd == std::string::npos)
i = line.length() - 1;
else
i = commentEnd - 1;
@@ -555,7 +554,7 @@ void ASEnhancer::parseCurrentLine(string& line, bool isInPreprocessor, bool isIn
// check for preprocessor within an event table
if (isInEventTable && line[i] == '#' && preprocBlockIndent)
{
string preproc;
std::string preproc;
preproc = line.substr(i + 1);
if (preproc.substr(0, 2) == "if") // #if, #ifdef, #ifndef)
eventPreprocDepth += 1;
@@ -619,7 +618,7 @@ void ASEnhancer::parseCurrentLine(string& line, bool isInPreprocessor, bool isIn
// bypass the entire word
if (isPotentialKeyword)
{
string name = getCurrentWord(line, i);
std::string_view name = getCurrentWord(line, i);
i += name.length() - 1;
}
continue;
@@ -637,7 +636,7 @@ void ASEnhancer::parseCurrentLine(string& line, bool isInPreprocessor, bool isIn
* @param index the current line index.
* @return the new line index.
*/
size_t ASEnhancer::processSwitchBlock(string& line, size_t index)
size_t ASEnhancer::processSwitchBlock(std::string& line, size_t index)
{
size_t i = index;
bool isPotentialKeyword = isCharPotentialHeader(line, i);
@@ -712,7 +711,7 @@ size_t ASEnhancer::processSwitchBlock(string& line, size_t index)
}
if (isPotentialKeyword)
{
string name = getCurrentWord(line, i); // bypass the entire name
std::string_view name = getCurrentWord(line, i); // bypass the entire name
i += name.length() - 1;
}
return i;
@@ -726,11 +725,11 @@ size_t ASEnhancer::processSwitchBlock(string& line, size_t index)
* @param unindent the number of tabsets to erase.
* @return the number of characters erased.
*/
int ASEnhancer::unindentLine(string& line, int unindent) const
int ASEnhancer::unindentLine(std::string& line, int unindent) const
{
size_t whitespace = line.find_first_not_of(" \t");
if (whitespace == string::npos) // if line is blank
if (whitespace == std::string::npos) // if line is blank
whitespace = line.length(); // must remove padding, if any
if (whitespace == 0)
+941 -550
View File
File diff suppressed because it is too large Load Diff
+16 -16
View File
@@ -183,7 +183,7 @@ void ASLocalizer::setLanguageFromLCID(size_t lcid)
#endif // _WIN32
string ASLocalizer::getLanguageID() const
std::string ASLocalizer::getLanguageID() const
// Returns the language ID in m_langID.
{
return m_langID;
@@ -217,13 +217,13 @@ void ASLocalizer::setLanguageFromName(const char* langID)
// de_DE.iso88591@euro
{
// the constants describing the format of lang_LANG locale string
string langStr = langID;
std::string langStr = langID;
m_langID = langStr.substr(0, 2);
// need the sublang for chinese
if (m_langID == "zh" && langStr[2] == '_')
{
string subLang = langStr.substr(3, 2);
std::string subLang = langStr.substr(3, 2);
if (subLang == "CN" || subLang == "SG")
m_subLangID = "CHS";
else
@@ -236,7 +236,7 @@ const char* ASLocalizer::settext(const char* textIn) const
// Call the settext class and return the value.
{
assert(m_translationClass);
const string stringIn = textIn;
const std::string stringIn = textIn;
return m_translationClass->translate(stringIn).c_str();
}
@@ -311,22 +311,22 @@ Translation::Translation()
m_translationVector.reserve(translationElements);
}
void Translation::addPair(const string& english, const wstring& translated)
void Translation::addPair(const std::string& english, const std::wstring& translated)
// Add a string pair to the translation vector.
{
pair<string, wstring> entry(english, translated);
std::pair<std::string, std::wstring> entry(english, translated);
m_translationVector.emplace_back(entry);
assert(m_translationVector.size() <= translationElements);
}
string Translation::convertToMultiByte(const wstring& wideStr) const
std::string Translation::convertToMultiByte(const std::wstring& wideStr) const
// Convert wchar_t to a multibyte string using the currently assigned locale.
// Return an empty string if an error occurs.
{
static bool msgDisplayed = false;
// get length of the output excluding the nullptr and validate the parameters
size_t mbLen = wcstombs(nullptr, wideStr.c_str(), 0);
if (mbLen == string::npos)
if (mbLen == std::string::npos)
{
if (!msgDisplayed)
{
@@ -336,7 +336,7 @@ string Translation::convertToMultiByte(const wstring& wideStr) const
return "";
}
// convert the characters
char* mbStr = new (nothrow) char[mbLen + 1];
char* mbStr = new (std::nothrow) char[mbLen + 1];
if (mbStr == nullptr)
{
if (!msgDisplayed)
@@ -348,16 +348,16 @@ string Translation::convertToMultiByte(const wstring& wideStr) const
}
wcstombs(mbStr, wideStr.c_str(), mbLen + 1);
// return the string
string mbTranslation = mbStr;
std::string mbTranslation = mbStr;
delete[] mbStr;
return mbTranslation;
}
string Translation::getTranslationString(size_t i) const
std::string Translation::getTranslationString(size_t i) const
// Return the translation ascii value. Used for testing.
{
if (i >= m_translationVector.size())
return string();
return std::string();
return m_translationVector[i].first;
}
@@ -367,10 +367,10 @@ size_t Translation::getTranslationVectorSize() const
return m_translationVector.size();
}
bool Translation::getWideTranslation(const string& stringIn, wstring& wideOut) const
bool Translation::getWideTranslation(const std::string& stringIn, std::wstring& wideOut) const
// Get the wide translation string. Used for testing.
{
for (const pair<string, wstring>& translation : m_translationVector)
for (const std::pair<std::string, std::wstring>& translation : m_translationVector)
{
if (translation.first == stringIn)
{
@@ -383,13 +383,13 @@ bool Translation::getWideTranslation(const string& stringIn, wstring& wideOut) c
return false;
}
string& Translation::translate(const string& stringIn) const
std::string& Translation::translate(const std::string& stringIn) const
// Translate a string.
// Return a mutable string so the method can have a "const" designation.
// This allows "settext" to be called from a "const" method.
{
m_mbTranslation.clear();
for (const pair<string, wstring>& translation : m_translationVector)
for (const std::pair<std::string, std::wstring>& translation : m_translationVector)
{
if (translation.first == stringIn)
{
+14 -16
View File
@@ -19,8 +19,6 @@
namespace astyle {
using namespace std;
#ifndef ASTYLE_LIB
//-----------------------------------------------------------------------------
@@ -35,7 +33,7 @@ class ASLocalizer
public: // functions
ASLocalizer();
virtual ~ASLocalizer();
string getLanguageID() const;
std::string getLanguageID() const;
const Translation* getTranslationClass() const;
#ifdef _WIN32
void setLanguageFromLCID(size_t lcid);
@@ -48,8 +46,8 @@ private: // functions
private: // variables
Translation* m_translationClass;// pointer to a polymorphic Translation class
string m_langID; // language identifier from the locale
string m_subLangID; // sub language identifier, if needed
std::string m_langID; // language identifier from the locale
std::string m_subLangID; // sub language identifier, if needed
#ifdef _WIN32
size_t m_lcid; // LCID of the user locale (Windows only)
size_t m_codepage; // active codepage, 65001 = utf-8
@@ -63,36 +61,36 @@ private: // variables
class Translation
// This base class is inherited by the language translation classes.
// Polymorphism is used to call the correct language translator.
// This class contains the translation vector and settext translation method.
// The language vector is built by the language sub classes.
// This class contains the translation std::vector and settext translation method.
// The language std::vector is built by the language sub classes.
// NOTE: This class must have virtual methods for typeid() to work.
// typeid() is used by AStyleTestI18n_Localizer.cpp.
{
public:
Translation();
virtual ~Translation() = default;
string convertToMultiByte(const wstring& wideStr) const;
string getTranslationString(size_t i) const;
std::string convertToMultiByte(const std::wstring& wideStr) const;
std::string getTranslationString(size_t i) const;
size_t getTranslationVectorSize() const;
bool getWideTranslation(const string& stringIn, wstring& wideOut) const;
string& translate(const string& stringIn) const;
bool getWideTranslation(const std::string& stringIn, std::wstring& wideOut) const;
std::string& translate(const std::string& stringIn) const;
protected:
void addPair(const string& english, const wstring& translated);
void addPair(const std::string& english, const std::wstring& translated);
// variables
vector<pair<string, wstring> > m_translationVector;
std::vector<std::pair<std::string, std::wstring> > m_translationVector;
private:
// the number of translation pairs added a constructor
static const size_t translationElements = 30; // need static for vs2013
// the translated string
mutable string m_mbTranslation;
// the translated std::string
mutable std::string m_mbTranslation;
};
//----------------------------------------------------------------------------
// Translation classes
// One class for each language.
// These classes have only a constructor which builds the language vector.
// These classes have only a constructor which builds the language std::vector.
//----------------------------------------------------------------------------
class Bulgarian : public Translation
+199 -177
View File
@@ -16,158 +16,164 @@
namespace astyle {
//
const string ASResource::_AS_EXCEPT = string("__except");
const string ASResource::_AS_FINALLY = string("__finally");
const string ASResource::_AS_TRY = string("__try");
const string ASResource::AS_ADD = string("add");
const string ASResource::AS_AUTO = string("auto");
const string ASResource::AS_AUTORELEASEPOOL = string("autoreleasepool");
const string ASResource::AS_CASE = string("case");
const string ASResource::AS_CATCH = string("catch");
const string ASResource::AS_CLASS = string("class");
const string ASResource::AS_CONST = string("const");
const string ASResource::AS_CONST_CAST = string("const_cast");
const string ASResource::AS_DEFAULT = string("default");
const string ASResource::AS_DELEGATE = string("delegate");
const string ASResource::AS_DELETE = string("delete");
const string ASResource::AS_DO = string("do");
const string ASResource::AS_DYNAMIC_CAST = string("dynamic_cast");
const string ASResource::AS_ELSE = string("else");
const string ASResource::AS_END = string("end");
const string ASResource::AS_ENUM = string("enum");
const string ASResource::AS_EXTERN = string("extern");
const string ASResource::AS_FINAL = string("final");
const string ASResource::AS_FINALLY = string("finally");
const string ASResource::AS_FIXED = string("fixed");
const string ASResource::AS_FOR = string("for");
const string ASResource::AS_FOREACH = string("foreach");
const string ASResource::AS_FOREVER = string("forever");
const string ASResource::AS_GET = string("get");
const string ASResource::AS_IF = string("if");
const string ASResource::AS_INTERFACE = string("interface");
const string ASResource::AS_INTERRUPT = string("interrupt");
const string ASResource::AS_LET = string("let");
const string ASResource::AS_LOCK = string("lock");
const string ASResource::AS_MODULE = string("module"); // CORBA IDL module definition
const string ASResource::AS_NAMESPACE = string("namespace");
const string ASResource::AS_NEW = string("new");
const string ASResource::AS_NOEXCEPT = string("noexcept");
const string ASResource::AS_NS_DURING = string("NS_DURING");
const string ASResource::AS_NS_HANDLER = string("NS_HANDLER");
const string ASResource::AS_OPERATOR = string("operator");
const string ASResource::AS_OVERRIDE = string("override");
const string ASResource::AS_PRIVATE = string("private");
const string ASResource::AS_PROTECTED = string("protected");
const string ASResource::AS_PUBLIC = string("public");
const string ASResource::AS_QFOREACH = string("Q_FOREACH");
const string ASResource::AS_QFOREVER = string("Q_FOREVER");
const string ASResource::AS_REINTERPRET_CAST = string("reinterpret_cast");
const string ASResource::AS_REMOVE = string("remove");
const string ASResource::AS_SEALED = string("sealed");
const string ASResource::AS_SELECTOR = string("selector");
const string ASResource::AS_SET = string("set");
const string ASResource::AS_STATIC = string("static");
const string ASResource::AS_STATIC_CAST = string("static_cast");
const string ASResource::AS_STRUCT = string("struct");
const string ASResource::AS_SWITCH = string("switch");
const string ASResource::AS_SYNCHRONIZED = string("synchronized");
const string ASResource::AS_TEMPLATE = string("template");
const string ASResource::AS_THROW = string("throw");
const string ASResource::AS_THROWS = string("throws");
const string ASResource::AS_TRY = string("try");
const string ASResource::AS_UNCHECKED = string("unchecked");
const string ASResource::AS_UNION = string("union");
const string ASResource::AS_UNSAFE = string("unsafe");
const string ASResource::AS_USING = string("using");
const string ASResource::AS_VOLATILE = string("volatile");
const string ASResource::AS_WHERE = string("where");
const string ASResource::AS_WHILE = string("while");
const std::string ASResource::_AS_EXCEPT = std::string("__except");
const std::string ASResource::_AS_FINALLY = std::string("__finally");
const std::string ASResource::_AS_TRY = std::string("__try");
const std::string ASResource::AS_ADD = std::string("add");
const std::string ASResource::AS_AUTO = std::string("auto");
const std::string ASResource::AS_AUTORELEASEPOOL = std::string("autoreleasepool");
const std::string ASResource::AS_CASE = std::string("case");
const std::string ASResource::AS_CATCH = std::string("catch");
const std::string ASResource::AS_CLASS = std::string("class");
const std::string ASResource::AS_CONST = std::string("const");
const std::string ASResource::AS_CONST_CAST = std::string("const_cast");
const std::string ASResource::AS_DEFAULT = std::string("default");
const std::string ASResource::AS_DELEGATE = std::string("delegate");
const std::string ASResource::AS_DELETE = std::string("delete");
const std::string ASResource::AS_DO = std::string("do");
const std::string ASResource::AS_DYNAMIC_CAST = std::string("dynamic_cast");
const std::string ASResource::AS_ELSE = std::string("else");
const std::string ASResource::AS_END = std::string("end");
const std::string ASResource::AS_ENUM = std::string("enum");
const std::string ASResource::AS_EXTERN = std::string("extern");
const std::string ASResource::AS_FINAL = std::string("final");
const std::string ASResource::AS_FINALLY = std::string("finally");
const std::string ASResource::AS_FIXED = std::string("fixed");
const std::string ASResource::AS_FOR = std::string("for");
const std::string ASResource::AS_FOREACH = std::string("foreach");
const std::string ASResource::AS_FOREVER = std::string("forever");
const std::string ASResource::AS_GET = std::string("get");
const std::string ASResource::AS_IF = std::string("if");
const std::string ASResource::AS_INTERFACE = std::string("interface");
const std::string ASResource::AS_INTERRUPT = std::string("interrupt");
const std::string ASResource::AS_LET = std::string("let");
const std::string ASResource::AS_LOCK = std::string("lock");
const std::string ASResource::AS_MODULE = std::string("module"); // CORBA IDL module definition
const std::string ASResource::AS_NAMESPACE = std::string("namespace");
const std::string ASResource::AS_NEW = std::string("new");
const std::string ASResource::AS_NOEXCEPT = std::string("noexcept");
const std::string ASResource::AS_NS_DURING = std::string("NS_DURING");
const std::string ASResource::AS_NS_HANDLER = std::string("NS_HANDLER");
const std::string ASResource::AS_OPERATOR = std::string("operator");
const std::string ASResource::AS_OVERRIDE = std::string("override");
const std::string ASResource::AS_PRIVATE = std::string("private");
const std::string ASResource::AS_PROTECTED = std::string("protected");
const std::string ASResource::AS_PUBLIC = std::string("public");
const std::string ASResource::AS_QFOREACH = std::string("Q_FOREACH");
const std::string ASResource::AS_QFOREVER = std::string("Q_FOREVER");
const std::string ASResource::AS_REINTERPRET_CAST = std::string("reinterpret_cast");
const std::string ASResource::AS_REMOVE = std::string("remove");
const std::string ASResource::AS_SEALED = std::string("sealed");
const std::string ASResource::AS_SELECTOR = std::string("selector");
const std::string ASResource::AS_SET = std::string("set");
const std::string ASResource::AS_STATIC = std::string("static");
const std::string ASResource::AS_STATIC_CAST = std::string("static_cast");
const std::string ASResource::AS_STRUCT = std::string("struct");
const std::string ASResource::AS_TYPEDEF_STRUCT = std::string("typedef struct");
const std::string ASResource::AS_SWITCH = std::string("switch");
const std::string ASResource::AS_SYNCHRONIZED = std::string("synchronized");
const std::string ASResource::AS_TEMPLATE = std::string("template");
const std::string ASResource::AS_THROW = std::string("throw");
const std::string ASResource::AS_THROWS = std::string("throws");
const std::string ASResource::AS_TRY = std::string("try");
const std::string ASResource::AS_UNCHECKED = std::string("unchecked");
const std::string ASResource::AS_UNION = std::string("union");
const std::string ASResource::AS_UNSAFE = std::string("unsafe");
const std::string ASResource::AS_USING = std::string("using");
const std::string ASResource::AS_VOLATILE = std::string("volatile");
const std::string ASResource::AS_WHERE = std::string("where");
const std::string ASResource::AS_WHILE = std::string("while");
const string ASResource::AS_ASM = string("asm");
const string ASResource::AS__ASM__ = string("__asm__");
const string ASResource::AS_MS_ASM = string("_asm");
const string ASResource::AS_MS__ASM = string("__asm");
const std::string ASResource::AS_ASM = std::string("asm");
const std::string ASResource::AS__ASM__ = std::string("__asm__");
const std::string ASResource::AS_MS_ASM = std::string("_asm");
const std::string ASResource::AS_MS__ASM = std::string("__asm");
const string ASResource::AS_BAR_DEFINE = string("#define");
const string ASResource::AS_BAR_INCLUDE = string("#include");
const string ASResource::AS_BAR_IF = string("#if");
const string ASResource::AS_BAR_EL = string("#el");
const string ASResource::AS_BAR_ENDIF = string("#endif");
const std::string ASResource::AS_BAR_DEFINE = std::string("#define");
const std::string ASResource::AS_BAR_INCLUDE = std::string("#include");
const std::string ASResource::AS_BAR_IF = std::string("#if");
const std::string ASResource::AS_BAR_EL = std::string("#el");
const std::string ASResource::AS_BAR_ENDIF = std::string("#endif");
const string ASResource::AS_OPEN_PAREN = string("(");
const string ASResource::AS_CLOSE_PAREN = string(")");
const string ASResource::AS_OPEN_BRACE = string("{");
const string ASResource::AS_CLOSE_BRACE = string("}");
const string ASResource::AS_OPEN_LINE_COMMENT = string("//");
const string ASResource::AS_OPEN_COMMENT = string("/*");
const string ASResource::AS_CLOSE_COMMENT = string("*/");
const std::string ASResource::AS_OPEN_PAREN = std::string("(");
const std::string ASResource::AS_CLOSE_PAREN = std::string(")");
const std::string ASResource::AS_OPEN_BRACE = std::string("{");
const std::string ASResource::AS_CLOSE_BRACE = std::string("}");
const std::string ASResource::AS_OPEN_LINE_COMMENT = std::string("//");
const std::string ASResource::AS_OPEN_COMMENT = std::string("/*");
const std::string ASResource::AS_CLOSE_COMMENT = std::string("*/");
const string ASResource::AS_ASSIGN = string("=");
const string ASResource::AS_PLUS_ASSIGN = string("+=");
const string ASResource::AS_MINUS_ASSIGN = string("-=");
const string ASResource::AS_MULT_ASSIGN = string("*=");
const string ASResource::AS_DIV_ASSIGN = string("/=");
const string ASResource::AS_MOD_ASSIGN = string("%=");
const string ASResource::AS_OR_ASSIGN = string("|=");
const string ASResource::AS_AND_ASSIGN = string("&=");
const string ASResource::AS_XOR_ASSIGN = string("^=");
const string ASResource::AS_GR_GR_ASSIGN = string(">>=");
const string ASResource::AS_LS_LS_ASSIGN = string("<<=");
const string ASResource::AS_GR_GR_GR_ASSIGN = string(">>>=");
const string ASResource::AS_LS_LS_LS_ASSIGN = string("<<<=");
const string ASResource::AS_GCC_MIN_ASSIGN = string("<?");
const string ASResource::AS_GCC_MAX_ASSIGN = string(">?");
const std::string ASResource::AS_GSC_OPEN_COMMENT = std::string("/#");
const std::string ASResource::AS_GSC_CLOSE_COMMENT = std::string("#/");
const string ASResource::AS_RETURN = string("return");
const string ASResource::AS_CIN = string("cin");
const string ASResource::AS_COUT = string("cout");
const string ASResource::AS_CERR = string("cerr");
const std::string ASResource::AS_ASSIGN = std::string("=");
const std::string ASResource::AS_PLUS_ASSIGN = std::string("+=");
const std::string ASResource::AS_MINUS_ASSIGN = std::string("-=");
const std::string ASResource::AS_MULT_ASSIGN = std::string("*=");
const std::string ASResource::AS_DIV_ASSIGN = std::string("/=");
const std::string ASResource::AS_MOD_ASSIGN = std::string("%=");
const std::string ASResource::AS_OR_ASSIGN = std::string("|=");
const std::string ASResource::AS_AND_ASSIGN = std::string("&=");
const std::string ASResource::AS_XOR_ASSIGN = std::string("^=");
const std::string ASResource::AS_GR_GR_ASSIGN = std::string(">>=");
const std::string ASResource::AS_LS_LS_ASSIGN = std::string("<<=");
const std::string ASResource::AS_GR_GR_GR_ASSIGN = std::string(">>>=");
const std::string ASResource::AS_LS_LS_LS_ASSIGN = std::string("<<<=");
const std::string ASResource::AS_GCC_MIN_ASSIGN = std::string("<?");
const std::string ASResource::AS_GCC_MAX_ASSIGN = std::string(">?");
const string ASResource::AS_EQUAL = string("==");
const string ASResource::AS_PLUS_PLUS = string("++");
const string ASResource::AS_MINUS_MINUS = string("--");
const string ASResource::AS_NOT_EQUAL = string("!=");
const string ASResource::AS_GR_EQUAL = string(">=");
const string ASResource::AS_GR_GR = string(">>");
const string ASResource::AS_GR_GR_GR = string(">>>");
const string ASResource::AS_LS_EQUAL = string("<=");
const string ASResource::AS_LS_LS = string("<<");
const string ASResource::AS_LS_LS_LS = string("<<<");
const string ASResource::AS_QUESTION_QUESTION = string("??");
const string ASResource::AS_LAMBDA = string("=>"); // C# lambda expression arrow
const string ASResource::AS_ARROW = string("->");
const string ASResource::AS_AND = string("&&");
const string ASResource::AS_OR = string("||");
const string ASResource::AS_SCOPE_RESOLUTION = string("::");
const string ASResource::AS_SPACESHIP = string("<=>");
const string ASResource::AS_EQUAL_JS = string("===");
const std::string ASResource::AS_RETURN = std::string("return");
const std::string ASResource::AS_CIN = std::string("cin");
const std::string ASResource::AS_COUT = std::string("cout");
const std::string ASResource::AS_CERR = std::string("cerr");
const string ASResource::AS_PLUS = string("+");
const string ASResource::AS_MINUS = string("-");
const string ASResource::AS_MULT = string("*");
const string ASResource::AS_DIV = string("/");
const string ASResource::AS_MOD = string("%");
const string ASResource::AS_GR = string(">");
const string ASResource::AS_LS = string("<");
const string ASResource::AS_NOT = string("!");
const string ASResource::AS_BIT_OR = string("|");
const string ASResource::AS_BIT_AND = string("&");
const string ASResource::AS_BIT_NOT = string("~");
const string ASResource::AS_BIT_XOR = string("^");
const string ASResource::AS_QUESTION = string("?");
const string ASResource::AS_COLON = string(":");
const string ASResource::AS_COMMA = string(",");
const string ASResource::AS_SEMICOLON = string(";");
const std::string ASResource::AS_EQUAL = std::string("==");
const std::string ASResource::AS_PLUS_PLUS = std::string("++");
const std::string ASResource::AS_MINUS_MINUS = std::string("--");
const std::string ASResource::AS_NOT_EQUAL = std::string("!=");
const std::string ASResource::AS_GR_EQUAL = std::string(">=");
const std::string ASResource::AS_GR_GR = std::string(">>");
const std::string ASResource::AS_GR_GR_GR = std::string(">>>");
const std::string ASResource::AS_LS_EQUAL = std::string("<=");
const std::string ASResource::AS_LS_LS = std::string("<<");
const std::string ASResource::AS_LS_LS_LS = std::string("<<<");
const std::string ASResource::AS_QUESTION_QUESTION = std::string("??");
const std::string ASResource::AS_LAMBDA = std::string("=>"); // C# lambda expression arrow
const std::string ASResource::AS_ARROW = std::string("->");
const std::string ASResource::AS_AND = std::string("&&");
const std::string ASResource::AS_OR = std::string("||");
const std::string ASResource::AS_SCOPE_RESOLUTION = std::string("::");
const std::string ASResource::AS_SPACESHIP = std::string("<=>");
const std::string ASResource::AS_EQUAL_JS = std::string("===");
const std::string ASResource::AS_COALESCE_CS = std::string("?" "?="); // Avoid trigraph
const std::string ASResource::AS_PLUS = std::string("+");
const std::string ASResource::AS_MINUS = std::string("-");
const std::string ASResource::AS_MULT = std::string("*");
const std::string ASResource::AS_DIV = std::string("/");
const std::string ASResource::AS_MOD = std::string("%");
const std::string ASResource::AS_GR = std::string(">");
const std::string ASResource::AS_LS = std::string("<");
const std::string ASResource::AS_NOT = std::string("!");
const std::string ASResource::AS_BIT_OR = std::string("|");
const std::string ASResource::AS_BIT_AND = std::string("&");
const std::string ASResource::AS_BIT_NOT = std::string("~");
const std::string ASResource::AS_BIT_XOR = std::string("^");
const std::string ASResource::AS_QUESTION = std::string("?");
const std::string ASResource::AS_COLON = std::string(":");
const std::string ASResource::AS_COMMA = std::string(",");
const std::string ASResource::AS_DOT = std::string(".");
const std::string ASResource::AS_SEMICOLON = std::string(";");
/**
* Sort comparison function.
* Compares the length of the value of pointers in the vectors.
* The LONGEST strings will be first in the vector.
* The LONGEST std::strings will be first in the vector.
*
* @param a and b, the string pointers to be compared.
* @param a and b, the std::string pointers to be compared.
*/
bool sortOnLength(const string* a, const string* b)
bool sortOnLength(const std::string* a, const std::string* b)
{
return (*a).length() > (*b).length();
}
@@ -176,9 +182,9 @@ bool sortOnLength(const string* a, const string* b)
* Sort comparison function.
* Compares the value of pointers in the vectors.
*
* @param a and b, the string pointers to be compared.
* @param a and b, the std::string pointers to be compared.
*/
bool sortOnName(const string* a, const string* b)
bool sortOnName(const std::string* a, const std::string* b)
{
return *a < *b;
}
@@ -189,7 +195,7 @@ bool sortOnName(const string* a, const string* b)
*
* @param assignmentOperators a reference to the vector to be built.
*/
void ASResource::buildAssignmentOperators(vector<const string*>* assignmentOperators)
void ASResource::buildAssignmentOperators(std::vector<const std::string*>* assignmentOperators)
{
const size_t elements = 15;
assignmentOperators->reserve(elements);
@@ -222,7 +228,7 @@ void ASResource::buildAssignmentOperators(vector<const string*>* assignmentOpera
*
* @param castOperators a reference to the vector to be built.
*/
void ASResource::buildCastOperators(vector<const string*>* castOperators)
void ASResource::buildCastOperators(std::vector<const std::string*>* castOperators)
{
const size_t elements = 5;
castOperators->reserve(elements);
@@ -242,7 +248,7 @@ void ASResource::buildCastOperators(vector<const string*>* castOperators)
*
* @param headers a reference to the vector to be built.
*/
void ASResource::buildHeaders(vector<const string*>* headers, int fileType, bool beautifier)
void ASResource::buildHeaders(std::vector<const std::string*>* headers, int fileType, bool beautifier)
{
const size_t elements = 25;
headers->reserve(elements);
@@ -262,7 +268,7 @@ void ASResource::buildHeaders(vector<const string*>* headers, int fileType, bool
headers->emplace_back(&AS_FOREACH); // QT & C#
headers->emplace_back(&AS_FOREVER); // Qt & Boost
if (fileType == C_TYPE)
if (fileType == C_TYPE || fileType == OBJC_TYPE)
{
headers->emplace_back(&_AS_TRY); // __try
headers->emplace_back(&_AS_FINALLY); // __finally
@@ -288,7 +294,7 @@ void ASResource::buildHeaders(vector<const string*>* headers, int fileType, bool
if (beautifier)
{
if (fileType == C_TYPE)
if (fileType == C_TYPE || fileType == OBJC_TYPE)
{
headers->emplace_back(&AS_TEMPLATE);
}
@@ -309,11 +315,9 @@ void ASResource::buildHeaders(vector<const string*>* headers, int fileType, bool
*
* @param indentableHeaders a reference to the vector to be built.
*/
void ASResource::buildIndentableHeaders(vector<const string*>* indentableHeaders)
void ASResource::buildIndentableHeaders(std::vector<const std::string*>* indentableHeaders)
{
indentableHeaders->emplace_back(&AS_RETURN);
// sort(indentableHeaders->begin(), indentableHeaders->end(), sortOnName);
}
/**
@@ -322,13 +326,13 @@ void ASResource::buildIndentableHeaders(vector<const string*>* indentableHeaders
*
* @param indentableMacros a reference to the vector to be built.
*/
void ASResource::buildIndentableMacros(vector<const pair<const string, const string>* >* indentableMacros)
void ASResource::buildIndentableMacros(std::vector<const std::pair<const std::string, const std::string>* >* indentableMacros)
{
const size_t elements = 10;
indentableMacros->reserve(elements);
// the pairs must be retained in memory because of pair pointers
using macro_pair = pair<const string, const string>;
using macro_pair = std::pair<const std::string, const std::string>;
static const macro_pair macros[] =
{
// wxWidgets
@@ -353,9 +357,9 @@ void ASResource::buildIndentableMacros(vector<const pair<const string, const str
*
* @param nonAssignmentOperators a reference to the vector to be built.
*/
void ASResource::buildNonAssignmentOperators(vector<const string*>* nonAssignmentOperators)
void ASResource::buildNonAssignmentOperators(std::vector<const std::string*>* nonAssignmentOperators)
{
const size_t elements = 15;
const size_t elements = 16;
nonAssignmentOperators->reserve(elements);
nonAssignmentOperators->emplace_back(&AS_EQUAL);
@@ -372,6 +376,7 @@ void ASResource::buildNonAssignmentOperators(vector<const string*>* nonAssignmen
nonAssignmentOperators->emplace_back(&AS_AND);
nonAssignmentOperators->emplace_back(&AS_OR);
nonAssignmentOperators->emplace_back(&AS_LAMBDA);
nonAssignmentOperators->emplace_back(&AS_DOT);
assert(nonAssignmentOperators->size() < elements);
sort(nonAssignmentOperators->begin(), nonAssignmentOperators->end(), sortOnLength);
@@ -382,9 +387,9 @@ void ASResource::buildNonAssignmentOperators(vector<const string*>* nonAssignmen
* Used by BOTH ASFormatter.cpp and ASBeautifier.cpp.
* NOTE: Non-paren headers should also be included in the headers vector.
*
* @param nonParenHeaders a reference to the vector to be built.
* @param nonParenHeaders a reference to the std::vector to be built.
*/
void ASResource::buildNonParenHeaders(vector<const string*>* nonParenHeaders, int fileType, bool beautifier)
void ASResource::buildNonParenHeaders(std::vector<const std::string*>* nonParenHeaders, int fileType, bool beautifier)
{
const size_t elements = 20;
nonParenHeaders->reserve(elements);
@@ -398,7 +403,7 @@ void ASResource::buildNonParenHeaders(vector<const string*>* nonParenHeaders, in
nonParenHeaders->emplace_back(&AS_QFOREVER); // QT
nonParenHeaders->emplace_back(&AS_FOREVER); // Boost
if (fileType == C_TYPE)
if (fileType == C_TYPE || fileType == OBJC_TYPE)
{
nonParenHeaders->emplace_back(&_AS_TRY); // __try
nonParenHeaders->emplace_back(&_AS_FINALLY); // __finally
@@ -439,7 +444,7 @@ void ASResource::buildNonParenHeaders(vector<const string*>* nonParenHeaders, in
*
* @param operators a reference to the vector to be built.
*/
void ASResource::buildOperators(vector<const string*>* operators, int fileType)
void ASResource::buildOperators(std::vector<const std::string*>* operators, int fileType)
{
const size_t elements = 50;
operators->reserve(elements);
@@ -497,6 +502,10 @@ void ASResource::buildOperators(vector<const string*>* operators, int fileType)
{
operators->emplace_back(&AS_EQUAL_JS);
}
if (fileType == SHARP_TYPE)
{
operators->emplace_back(&AS_COALESCE_CS);
}
assert(operators->size() < elements);
sort(operators->begin(), operators->end(), sortOnLength);
}
@@ -508,13 +517,13 @@ void ASResource::buildOperators(vector<const string*>* operators, int fileType)
*
* @param preBlockStatements a reference to the vector to be built.
*/
void ASResource::buildPreBlockStatements(vector<const string*>* preBlockStatements, int fileType)
void ASResource::buildPreBlockStatements(std::vector<const std::string*>* preBlockStatements, int fileType)
{
const size_t elements = 10;
preBlockStatements->reserve(elements);
preBlockStatements->emplace_back(&AS_CLASS);
if (fileType == C_TYPE)
if (fileType == C_TYPE || fileType == OBJC_TYPE)
{
preBlockStatements->emplace_back(&AS_STRUCT);
preBlockStatements->emplace_back(&AS_UNION);
@@ -548,12 +557,12 @@ void ASResource::buildPreBlockStatements(vector<const string*>* preBlockStatemen
* the closing paren and the opening brace.
* e.g. in "void foo() const {}", "const" is a preCommandHeader.
*/
void ASResource::buildPreCommandHeaders(vector<const string*>* preCommandHeaders, int fileType)
void ASResource::buildPreCommandHeaders(std::vector<const std::string*>* preCommandHeaders, int fileType)
{
const size_t elements = 10;
preCommandHeaders->reserve(elements);
if (fileType == C_TYPE)
if (fileType == C_TYPE || fileType == OBJC_TYPE)
{
preCommandHeaders->emplace_back(&AS_CONST);
preCommandHeaders->emplace_back(&AS_FINAL);
@@ -562,6 +571,10 @@ void ASResource::buildPreCommandHeaders(vector<const string*>* preCommandHeaders
preCommandHeaders->emplace_back(&AS_OVERRIDE);
preCommandHeaders->emplace_back(&AS_VOLATILE);
preCommandHeaders->emplace_back(&AS_SEALED); // Visual C only
}
if (fileType == OBJC_TYPE)
{
preCommandHeaders->emplace_back(&AS_AUTORELEASEPOOL); // Obj-C only
}
@@ -587,13 +600,13 @@ void ASResource::buildPreCommandHeaders(vector<const string*>* preCommandHeaders
*
* @param preDefinitionHeaders a reference to the vector to be built.
*/
void ASResource::buildPreDefinitionHeaders(vector<const string*>* preDefinitionHeaders, int fileType)
void ASResource::buildPreDefinitionHeaders(std::vector<const std::string*>* preDefinitionHeaders, int fileType)
{
const size_t elements = 10;
preDefinitionHeaders->reserve(elements);
preDefinitionHeaders->emplace_back(&AS_CLASS);
if (fileType == C_TYPE)
if (fileType == C_TYPE || fileType == OBJC_TYPE)
{
preDefinitionHeaders->emplace_back(&AS_STRUCT);
preDefinitionHeaders->emplace_back(&AS_UNION);
@@ -621,15 +634,15 @@ void ASResource::buildPreDefinitionHeaders(vector<const string*>* preDefinitionH
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// check if a specific line position contains a header.
const string* ASBase::findHeader(const string& line, int i,
const vector<const string*>* possibleHeaders) const
const std::string* ASBase::findHeader(std::string_view line, int i,
const std::vector<const std::string*>* possibleHeaders) const
{
assert(isCharPotentialHeader(line, i));
// check the word
size_t maxHeaders = possibleHeaders->size();
for (size_t p = 0; p < maxHeaders; p++)
{
const string* header = (*possibleHeaders)[p];
const std::string* header = (*possibleHeaders)[p];
const size_t wordEnd = i + header->length();
if (wordEnd > line.length())
continue;
@@ -653,7 +666,7 @@ const string* ASBase::findHeader(const string& line, int i,
if ((header == &AS_GET
|| header == &AS_SET
|| header == &AS_DEFAULT)
&& (peekChar == ';' || peekChar == '(' || peekChar == '='))
&& (peekChar == '.' || peekChar == ';' || peekChar == '(' || peekChar == '='))
break;
return header;
}
@@ -661,7 +674,7 @@ const string* ASBase::findHeader(const string& line, int i,
}
// check if a specific line position contains a keyword.
bool ASBase::findKeyword(const string& line, int i, const string& keyword) const
bool ASBase::findKeyword(std::string_view line, int i, std::string_view keyword) const
{
assert(isCharPotentialHeader(line, i));
// check the word
@@ -673,19 +686,25 @@ bool ASBase::findKeyword(const string& line, int i, const string& keyword) const
return false;
// check that this is not part of a longer word
if (wordEnd == line.length())
{
//std::cerr << "findKeyword t1 \n";
return true;
}
if (isLegalNameChar(line[wordEnd]))
return false;
// is not a keyword if part of a definition
const char peekChar = peekNextChar(line, (int) wordEnd - 1);
if (peekChar == ',' || peekChar == ')')
return false;
//std::cerr << "findKeyword t2 \n";
return true;
}
// check if a specific line position contains an operator.
const string* ASBase::findOperator(const string& line, int i,
const vector<const string*>* possibleOperators) const
const std::string* ASBase::findOperator(std::string_view line, int i,
const std::vector<const std::string*>* possibleOperators) const
{
assert(isCharPotentialOperator(line[i]));
// find the operator in the vector
@@ -705,14 +724,16 @@ const string* ASBase::findOperator(const string& line, int i,
// get the current word on a line
// index must point to the beginning of the word
string ASBase::getCurrentWord(const string& line, size_t index) const
std::string_view ASBase::getCurrentWord(std::string_view line, size_t index) const
{
assert(isCharPotentialHeader(line, index));
//assert(isCharPotentialHeader(line, index));
size_t lineLength = line.length();
size_t i;
for (i = index; i < lineLength; i++)
{
if (!isLegalNameChar(line[i]))
if (!isLegalNameChar(line[i])
|| ( (isCStyle() || isJavaStyle()) && i > index && line[i]=='.')
)
break;
}
return line.substr(index, i - index);
@@ -726,13 +747,14 @@ bool ASBase::isLegalNameChar(char ch) const
if ((unsigned char) ch > 127)
return false;
return (isalnum((unsigned char) ch)
|| ch == '.' || ch == '_'
|| ch == '_'
|| (!isSharpStyle() && ch == '.' )
|| (isJavaStyle() && ch == '$')
|| (isSharpStyle() && ch == '@')); // may be used as a prefix
}
// check if a specific character can be part of a header
bool ASBase::isCharPotentialHeader(const string& line, size_t i) const
bool ASBase::isCharPotentialHeader(std::string_view line, size_t i) const
{
assert(!isWhiteSpace(line[i]));
char prevCh = ' ';
@@ -768,7 +790,7 @@ bool ASBase::isDigit(char ch) const
}
// check if a specific character is a digit separator
bool ASBase::isDigitSeparator(const string& line, int i) const
bool ASBase::isDigitSeparator(std::string_view line, int i) const
{
assert(line[i] == '\'');
// casting to (unsigned char) eliminates negative characters
@@ -781,11 +803,11 @@ bool ASBase::isDigitSeparator(const string& line, int i) const
}
// peek at the next unread character.
char ASBase::peekNextChar(const string& line, int i) const
char ASBase::peekNextChar(std::string_view line, int i) const
{
char ch = ' ';
size_t peekNum = line.find_first_not_of(" \t", i + 1);
if (peekNum == string::npos)
if (peekNum == std::string::npos)
return ch;
ch = line[peekNum];
return ch;
+279 -214
View File
@@ -21,6 +21,7 @@
#include <iostream> // for cout
#include <memory>
#include <string>
#include <string_view>
#include <vector>
#ifdef __GNUC__
@@ -52,19 +53,19 @@
#pragma clang diagnostic ignored "-Wshorten-64-to-32"
#endif
#define ASTYLE_VERSION "3.6"
//-----------------------------------------------------------------------------
// astyle namespace
//-----------------------------------------------------------------------------
namespace astyle {
//
using namespace std;
//----------------------------------------------------------------------------
// definitions
//----------------------------------------------------------------------------
enum FileType { C_TYPE = 0, JAVA_TYPE = 1, SHARP_TYPE = 2, JS_TYPE = 3 };
enum FileType { C_TYPE = 0, JAVA_TYPE = 1, SHARP_TYPE = 2, JS_TYPE = 3, OBJC_TYPE = 4, GSC_TYPE = 5, INVALID_TYPE = -1 };
/* The enums below are not recognized by 'vectors' in Microsoft Visual C++
V5 when they are part of a namespace!!! Use Visual C++ V6 or higher.
@@ -169,10 +170,21 @@ enum LineEndFormat
LINEEND_DEFAULT, // Use line break that matches most of the file
LINEEND_WINDOWS,
LINEEND_LINUX,
LINEEND_MACOLD,
LINEEND_CRLF = LINEEND_WINDOWS,
LINEEND_LF = LINEEND_LINUX,
LINEEND_CR = LINEEND_MACOLD
LINEEND_MACOLD
};
enum NegationPaddingMode
{
NEGATION_PAD_NO_CHANGE,
NEGATION_PAD_AFTER,
NEGATION_PAD_BEFORE
};
enum IncludeDirectivePaddingMode
{
INCLUDE_PAD_NO_CHANGE,
INCLUDE_PAD_NONE,
INCLUDE_PAD_AFTER
};
//-----------------------------------------------------------------------------
@@ -188,13 +200,13 @@ class ASSourceIterator
public:
ASSourceIterator() = default;
virtual ~ASSourceIterator() = default;
virtual streamoff getPeekStart() const = 0;
virtual std::streamoff getPeekStart() const = 0;
virtual int getStreamLength() const = 0;
virtual bool hasMoreLines() const = 0;
virtual string nextLine(bool emptyLineWasDeleted) = 0;
virtual string peekNextLine() = 0;
virtual std::string nextLine(bool emptyLineWasDeleted) = 0;
virtual std::string peekNextLine() = 0;
virtual void peekReset() = 0;
virtual streamoff tellg() = 0;
virtual std::streamoff tellg() = 0;
};
//-----------------------------------------------------------------------------
@@ -220,7 +232,7 @@ public:
bool hasMoreLines() const
{ return sourceIterator->hasMoreLines(); }
string peekNextLine()
std::string peekNextLine()
{ needReset = true; return sourceIterator->peekNextLine(); }
};
@@ -232,61 +244,62 @@ public:
class ASResource
{
public:
void buildAssignmentOperators(vector<const string*>* assignmentOperators);
void buildCastOperators(vector<const string*>* castOperators);
void buildHeaders(vector<const string*>* headers, int fileType, bool beautifier = false);
void buildIndentableMacros(vector<const pair<const string, const string>* >* indentableMacros);
void buildIndentableHeaders(vector<const string*>* indentableHeaders);
void buildNonAssignmentOperators(vector<const string*>* nonAssignmentOperators);
void buildNonParenHeaders(vector<const string*>* nonParenHeaders, int fileType, bool beautifier = false);
void buildOperators(vector<const string*>* operators, int fileType);
void buildPreBlockStatements(vector<const string*>* preBlockStatements, int fileType);
void buildPreCommandHeaders(vector<const string*>* preCommandHeaders, int fileType);
void buildPreDefinitionHeaders(vector<const string*>* preDefinitionHeaders, int fileType);
void buildAssignmentOperators(std::vector<const std::string*>* assignmentOperators);
void buildCastOperators(std::vector<const std::string*>* castOperators);
void buildHeaders(std::vector<const std::string*>* headers, int fileType, bool beautifier = false);
void buildIndentableMacros(std::vector<const std::pair<const std::string, const std::string>* >* indentableMacros);
void buildIndentableHeaders(std::vector<const std::string*>* indentableHeaders);
void buildNonAssignmentOperators(std::vector<const std::string*>* nonAssignmentOperators);
void buildNonParenHeaders(std::vector<const std::string*>* nonParenHeaders, int fileType, bool beautifier = false);
void buildOperators(std::vector<const std::string*>* operators, int fileType);
void buildPreBlockStatements(std::vector<const std::string*>* preBlockStatements, int fileType);
void buildPreCommandHeaders(std::vector<const std::string*>* preCommandHeaders, int fileType);
void buildPreDefinitionHeaders(std::vector<const std::string*>* preDefinitionHeaders, int fileType);
public:
static const string AS_IF, AS_ELSE;
static const string AS_DO, AS_WHILE;
static const string AS_FOR;
static const string AS_SWITCH, AS_CASE, AS_DEFAULT;
static const string AS_TRY, AS_CATCH, AS_THROW, AS_THROWS, AS_FINALLY, AS_USING;
static const string _AS_TRY, _AS_FINALLY, _AS_EXCEPT;
static const string AS_PUBLIC, AS_PROTECTED, AS_PRIVATE;
static const string AS_CLASS, AS_STRUCT, AS_UNION, AS_INTERFACE, AS_NAMESPACE;
static const string AS_MODULE;
static const string AS_END;
static const string AS_SELECTOR;
static const string AS_EXTERN, AS_ENUM;
static const string AS_FINAL, AS_OVERRIDE;
static const string AS_STATIC, AS_CONST, AS_SEALED, AS_VOLATILE, AS_NEW, AS_DELETE;
static const string AS_NOEXCEPT, AS_INTERRUPT, AS_AUTORELEASEPOOL;
static const string AS_WHERE, AS_LET, AS_SYNCHRONIZED;
static const string AS_OPERATOR, AS_TEMPLATE;
static const string AS_OPEN_PAREN, AS_CLOSE_PAREN;
static const string AS_OPEN_BRACE, AS_CLOSE_BRACE;
static const string AS_OPEN_LINE_COMMENT, AS_OPEN_COMMENT, AS_CLOSE_COMMENT;
static const string AS_BAR_DEFINE, AS_BAR_INCLUDE, AS_BAR_IF, AS_BAR_EL, AS_BAR_ENDIF;
static const string AS_AUTO, AS_RETURN;
static const string AS_CIN, AS_COUT, AS_CERR;
static const string AS_ASSIGN, AS_PLUS_ASSIGN, AS_MINUS_ASSIGN, AS_MULT_ASSIGN;
static const string AS_DIV_ASSIGN, AS_MOD_ASSIGN, AS_XOR_ASSIGN, AS_OR_ASSIGN, AS_AND_ASSIGN;
static const string AS_GR_GR_ASSIGN, AS_LS_LS_ASSIGN, AS_GR_GR_GR_ASSIGN, AS_LS_LS_LS_ASSIGN;
static const string AS_GCC_MIN_ASSIGN, AS_GCC_MAX_ASSIGN, AS_SPACESHIP, AS_EQUAL_JS;
static const string AS_EQUAL, AS_PLUS_PLUS, AS_MINUS_MINUS, AS_NOT_EQUAL, AS_GR_EQUAL;
static const string AS_LS_EQUAL, AS_LS_LS_LS, AS_LS_LS, AS_GR_GR_GR, AS_GR_GR;
static const string AS_QUESTION_QUESTION, AS_LAMBDA;
static const string AS_ARROW, AS_AND, AS_OR;
static const string AS_SCOPE_RESOLUTION;
static const string AS_PLUS, AS_MINUS, AS_MULT, AS_DIV, AS_MOD, AS_GR, AS_LS;
static const string AS_NOT, AS_BIT_XOR, AS_BIT_OR, AS_BIT_AND, AS_BIT_NOT;
static const string AS_QUESTION, AS_COLON, AS_SEMICOLON, AS_COMMA;
static const string AS_ASM, AS__ASM__, AS_MS_ASM, AS_MS__ASM;
static const string AS_QFOREACH, AS_QFOREVER, AS_FOREVER;
static const string AS_FOREACH, AS_LOCK, AS_UNSAFE, AS_FIXED;
static const string AS_GET, AS_SET, AS_ADD, AS_REMOVE;
static const string AS_DELEGATE, AS_UNCHECKED;
static const string AS_CONST_CAST, AS_DYNAMIC_CAST, AS_REINTERPRET_CAST, AS_STATIC_CAST;
static const string AS_NS_DURING, AS_NS_HANDLER;
static const std::string AS_IF, AS_ELSE;
static const std::string AS_DO, AS_WHILE;
static const std::string AS_FOR;
static const std::string AS_SWITCH, AS_CASE, AS_DEFAULT;
static const std::string AS_TRY, AS_CATCH, AS_THROW, AS_THROWS, AS_FINALLY, AS_USING;
static const std::string _AS_TRY, _AS_FINALLY, _AS_EXCEPT;
static const std::string AS_PUBLIC, AS_PROTECTED, AS_PRIVATE;
static const std::string AS_CLASS, AS_STRUCT, AS_TYPEDEF_STRUCT, AS_UNION, AS_INTERFACE, AS_NAMESPACE;
static const std::string AS_MODULE;
static const std::string AS_END;
static const std::string AS_SELECTOR;
static const std::string AS_EXTERN, AS_ENUM;
static const std::string AS_FINAL, AS_OVERRIDE;
static const std::string AS_STATIC, AS_CONST, AS_SEALED, AS_VOLATILE, AS_NEW, AS_DELETE;
static const std::string AS_NOEXCEPT, AS_INTERRUPT, AS_AUTORELEASEPOOL;
static const std::string AS_WHERE, AS_LET, AS_SYNCHRONIZED;
static const std::string AS_OPERATOR, AS_TEMPLATE;
static const std::string AS_OPEN_PAREN, AS_CLOSE_PAREN;
static const std::string AS_OPEN_BRACE, AS_CLOSE_BRACE;
static const std::string AS_OPEN_LINE_COMMENT, AS_OPEN_COMMENT, AS_CLOSE_COMMENT;
static const std::string AS_GSC_OPEN_COMMENT, AS_GSC_CLOSE_COMMENT;
static const std::string AS_BAR_DEFINE, AS_BAR_INCLUDE, AS_BAR_IF, AS_BAR_EL, AS_BAR_ENDIF;
static const std::string AS_AUTO, AS_RETURN;
static const std::string AS_CIN, AS_COUT, AS_CERR, AS_MAPPING;
static const std::string AS_ASSIGN, AS_PLUS_ASSIGN, AS_MINUS_ASSIGN, AS_MULT_ASSIGN;
static const std::string AS_DIV_ASSIGN, AS_MOD_ASSIGN, AS_XOR_ASSIGN, AS_OR_ASSIGN, AS_AND_ASSIGN;
static const std::string AS_GR_GR_ASSIGN, AS_LS_LS_ASSIGN, AS_GR_GR_GR_ASSIGN, AS_LS_LS_LS_ASSIGN;
static const std::string AS_GCC_MIN_ASSIGN, AS_GCC_MAX_ASSIGN, AS_SPACESHIP, AS_EQUAL_JS, AS_COALESCE_CS;
static const std::string AS_EQUAL, AS_PLUS_PLUS, AS_MINUS_MINUS, AS_NOT_EQUAL, AS_GR_EQUAL;
static const std::string AS_LS_EQUAL, AS_LS_LS_LS, AS_LS_LS, AS_GR_GR_GR, AS_GR_GR;
static const std::string AS_QUESTION_QUESTION, AS_LAMBDA;
static const std::string AS_ARROW, AS_AND, AS_OR;
static const std::string AS_SCOPE_RESOLUTION;
static const std::string AS_PLUS, AS_MINUS, AS_MULT, AS_DIV, AS_MOD, AS_GR, AS_LS;
static const std::string AS_NOT, AS_BIT_XOR, AS_BIT_OR, AS_BIT_AND, AS_BIT_NOT;
static const std::string AS_QUESTION, AS_COLON, AS_SEMICOLON, AS_COMMA, AS_DOT;
static const std::string AS_ASM, AS__ASM__, AS_MS_ASM, AS_MS__ASM;
static const std::string AS_QFOREACH, AS_QFOREVER, AS_FOREVER;
static const std::string AS_FOREACH, AS_LOCK, AS_UNSAFE, AS_FIXED;
static const std::string AS_GET, AS_SET, AS_ADD, AS_REMOVE;
static const std::string AS_DELEGATE, AS_UNCHECKED;
static const std::string AS_CONST_CAST, AS_DYNAMIC_CAST, AS_REINTERPRET_CAST, AS_STATIC_CAST;
static const std::string AS_NS_DURING, AS_NS_HANDLER;
}; // Class ASResource
//-----------------------------------------------------------------------------
@@ -305,26 +318,28 @@ protected:
protected: // inline functions
void init(int fileTypeArg) { baseFileType = fileTypeArg; }
bool isCStyle() const { return (baseFileType == C_TYPE); }
bool isJavaStyle() const { return (baseFileType == JAVA_TYPE); }
bool isSharpStyle() const { return (baseFileType == SHARP_TYPE); }
bool isJSStyle() const { return (baseFileType == JS_TYPE); }
bool isCStyle() const { return baseFileType == C_TYPE || baseFileType == OBJC_TYPE || baseFileType == GSC_TYPE; }
bool isJavaStyle() const { return baseFileType == JAVA_TYPE; }
bool isSharpStyle() const { return baseFileType == SHARP_TYPE; }
bool isJSStyle() const { return baseFileType == JS_TYPE; }
bool isObjCStyle() const { return baseFileType == OBJC_TYPE; }
bool isGSCStyle() const { return baseFileType == GSC_TYPE; }
bool isWhiteSpace(char ch) const { return (ch == ' ' || ch == '\t'); }
protected: // functions definitions are at the end of ASResource.cpp
const string* findHeader(const string& line, int i,
const vector<const string*>* possibleHeaders) const;
bool findKeyword(const string& line, int i, const string& keyword) const;
const string* findOperator(const string& line, int i,
const vector<const string*>* possibleOperators) const;
string getCurrentWord(const string& line, size_t index) const;
const std::string* findHeader(std::string_view line, int i,
const std::vector<const std::string*>* possibleHeaders) const;
bool findKeyword(std::string_view line, int i, std::string_view keyword) const;
const std::string* findOperator(std::string_view line, int i,
const std::vector<const std::string*>* possibleOperators) const;
std::string_view getCurrentWord(std::string_view, size_t index) const;
bool isDigit(char ch) const;
bool isLegalNameChar(char ch) const;
bool isCharPotentialHeader(const string& line, size_t i) const;
bool isCharPotentialHeader(std::string_view line, size_t i) const;
bool isCharPotentialOperator(char ch) const;
bool isDigitSeparator(const string& line, int i) const;
char peekNextChar(const string& line, int i) const;
bool isDigitSeparator(std::string_view line, int i) const;
char peekNextChar(std::string_view line, int i) const;
}; // Class ASBase
//-----------------------------------------------------------------------------
@@ -342,7 +357,7 @@ public:
ASBeautifier& operator=(ASBeautifier&&) = delete;
virtual void init(ASSourceIterator* iter);
virtual string beautify(const string& originalLine);
virtual std::string beautify(const std::string& originalLine);
void setCaseIndent(bool state);
void setClassIndent(bool state);
void setContinuationIndentation(int indent = 1);
@@ -353,6 +368,9 @@ public:
void setAfterParenIndent(bool state);
void setJavaStyle();
void setJSStyle();
void setObjCStyle();
void setSharpStyle();
void setGSCStyle();
void setLabelIndent(bool state);
void setMaxContinuationIndentLength(int max);
@@ -363,18 +381,19 @@ public:
void setModifierIndent(bool state);
void setNamespaceIndent(bool state);
void setAlignMethodColon(bool state);
void setSharpStyle();
void setSpaceIndentation(int length = 4);
void setSwitchIndent(bool state);
void setTabIndentation(int length = 4, bool forceTabs = false);
void setPreprocDefineIndent(bool state);
void setPreprocConditionalIndent(bool state);
void setSqueezeWhitespace(bool state);
void setLambdaIndentation(bool state);
int getBeautifierFileType() const;
int getFileType() const;
int getIndentLength() const;
int getTabLength() const;
string getIndentString() const;
string getNextWord(const string& line, size_t currPos) const;
std::string getIndentString() const;
std::string getNextWord(const std::string& line, size_t currPos) const;
bool getAlignMethodColon() const;
bool getBraceIndent() const;
bool getBlockIndent() const;
@@ -390,14 +409,14 @@ public:
protected:
void deleteBeautifierVectors();
int getNextProgramCharDistance(const string& line, int i) const;
int indexOf(const vector<const string*>& container, const string* element) const;
int getNextProgramCharDistance(std::string_view line, int i) const;
int indexOf(const std::vector<const std::string*>& container, const std::string* element) const;
void setBlockIndent(bool state);
void setBraceIndent(bool state);
void setBraceIndentVtk(bool state);
string extractPreprocessorStatement(const string& line) const;
string trim(const string& str) const;
string rtrim(const string& str) const;
std::string extractPreprocessorStatement(std::string_view line) const;
std::string trim(std::string_view str) const;
std::string rtrim(std::string_view str) const;
// variables set by ASFormatter - must be updated in activeBeautifierStack
int inLineNumber;
@@ -414,77 +433,80 @@ protected:
bool isInBeautifySQL;
bool isInIndentableStruct;
bool isInIndentablePreproc;
bool lambdaIndicator;
private: // functions
void adjustObjCMethodDefinitionIndentation(const string& line_);
void adjustObjCMethodCallIndentation(const string& line_);
void adjustObjCMethodDefinitionIndentation(std::string_view line_);
void adjustObjCMethodCallIndentation(std::string_view line_);
void adjustParsedLineIndentation(size_t iPrelim, bool isInExtraHeaderIndent);
void computePreliminaryIndentation();
void parseCurrentLine(const string& line);
void parseCurrentLine(std::string_view line);
void popLastContinuationIndent();
void processPreprocessor(const string& preproc, const string& line);
void registerContinuationIndent(const string& line, int i, int spaceIndentCount_,
void processPreprocessor(std::string_view preproc, std::string_view line);
void registerContinuationIndent(std::string_view line, int i, int spaceIndentCount_,
int tabIncrementIn, int minIndent, bool updateParenStack);
void registerContinuationIndentColon(const string& line, int i, int tabIncrementIn);
void registerContinuationIndentColon(std::string_view line, int i, int tabIncrementIn);
void initVectors();
void initTempStacksContainer(vector<vector<const string*>*>*& container,
vector<vector<const string*>*>* value);
void initTempStacksContainer(std::vector<std::vector<const std::string*>*>*& container,
std::vector<std::vector<const std::string*>*>* value);
void clearObjCMethodDefinitionAlignment();
void deleteBeautifierContainer(vector<ASBeautifier*>*& container);
void deleteTempStacksContainer(vector<vector<const string*>*>*& container);
void deleteBeautifierContainer(std::vector<ASBeautifier*>*& container);
void deleteTempStacksContainer(std::vector<std::vector<const std::string*>*>*& container);
int adjustIndentCountForBreakElseIfComments() const;
int computeObjCColonAlignment(const string& line, int colonAlignPosition) const;
int computeObjCColonAlignment(std::string_view line, int colonAlignPosition) const;
int convertTabToSpaces(int i, int tabIncrementIn) const;
int findObjCColonAlignment(const string& line) const;
int getContinuationIndentAssign(const string& line, size_t currPos) const;
int getContinuationIndentComma(const string& line, size_t currPos) const;
int getObjCFollowingKeyword(const string& line, int bracePos) const;
bool isIndentedPreprocessor(const string& line, size_t currPos) const;
bool isLineEndComment(const string& line, int startPos) const;
bool isPreprocessorConditionalCplusplus(const string& line) const;
bool isInPreprocessorUnterminatedComment(const string& line);
int findObjCColonAlignment(std::string_view line) const;
int getContinuationIndentAssign(std::string_view line, size_t currPos) const;
int getContinuationIndentComma(std::string_view line, size_t currPos) const;
int getObjCFollowingKeyword(std::string_view line, int bracePos) const;
bool isIndentedPreprocessor(std::string_view line, size_t currPos) const;
bool isLineEndComment(std::string_view line, int startPos) const;
bool isPreprocessorConditionalCplusplus(std::string_view line) const;
bool isInPreprocessorUnterminatedComment(std::string_view line);
bool isTopLevel() const;
bool statementEndsWithComma(const string& line, int index) const;
const string& getIndentedLineReturn(const string& newLine, const string& originalLine) const;
string getIndentedSpaceEquivalent(const string& line_) const;
string preLineWS(int lineIndentCount, int lineSpaceIndentCount) const;
bool statementEndsWithComma(std::string_view line, int index) const;
std::string getIndentedSpaceEquivalent(std::string_view line_) const;
std::string preLineWS(int lineIndentCount, int lineSpaceIndentCount) const;
template<typename T> void deleteContainer(T& container);
template<typename T> void initContainer(T& container, T value);
vector<vector<const string*>*>* copyTempStacks(const ASBeautifier& other) const;
pair<int, int> computePreprocessorIndent();
std::vector<std::vector<const std::string*>*>* copyTempStacks(const ASBeautifier& other) const;
std::pair<int, int> computePreprocessorIndent();
private: // variables
int beautifierFileType;
vector<const string*>* headers;
vector<const string*>* nonParenHeaders;
vector<const string*>* preBlockStatements;
vector<const string*>* preCommandHeaders;
vector<const string*>* assignmentOperators;
vector<const string*>* nonAssignmentOperators;
vector<const string*>* indentableHeaders;
std::vector<const std::string*>* headers;
std::vector<const std::string*>* nonParenHeaders;
std::vector<const std::string*>* preBlockStatements;
std::vector<const std::string*>* preCommandHeaders;
std::vector<const std::string*>* assignmentOperators;
std::vector<const std::string*>* nonAssignmentOperators;
std::vector<const std::string*>* indentableHeaders;
vector<ASBeautifier*>* waitingBeautifierStack;
vector<ASBeautifier*>* activeBeautifierStack;
vector<size_t>* waitingBeautifierStackLengthStack;
vector<size_t>* activeBeautifierStackLengthStack;
vector<const string*>* headerStack;
vector<vector<const string*>* >* tempStacks;
vector<int>* parenDepthStack;
vector<bool>* blockStatementStack;
vector<bool>* parenStatementStack;
vector<bool>* braceBlockStateStack;
vector<int>* continuationIndentStack;
vector<size_t>* continuationIndentStackSizeStack;
vector<int>* parenIndentStack;
vector<pair<int, int> >* preprocIndentStack;
std::vector<ASBeautifier*>* waitingBeautifierStack;
std::vector<ASBeautifier*>* activeBeautifierStack;
std::vector<size_t>* waitingBeautifierStackLengthStack;
std::vector<size_t>* activeBeautifierStackLengthStack;
std::vector<const std::string*>* headerStack;
std::vector<std::vector<const std::string*>* >* tempStacks;
std::vector<int>* parenDepthStack;
std::vector<bool>* blockStatementStack;
std::vector<bool>* parenStatementStack;
std::vector<bool>* braceBlockStateStack;
std::vector<int>* continuationIndentStack;
std::vector<size_t>* continuationIndentStackSizeStack;
std::vector<int>* parenIndentStack;
std::vector<std::pair<int, int> >* preprocIndentStack;
std::vector<std::pair<size_t, size_t> > squeezeWSStack;
ASSourceIterator* sourceIterator;
const string* currentHeader;
const string* previousLastLineHeader;
const string* probationHeader;
const string* lastLineHeader;
string indentString;
string verbatimDelimiter;
const std::string* currentHeader;
const std::string* previousLastLineHeader;
const std::string* probationHeader;
const std::string* lastLineHeader;
std::string indentString;
std::string verbatimDelimiter;
bool isInQuote;
bool isInVerbatimQuote;
bool haveLineContinuationChar;
@@ -516,6 +538,7 @@ private: // variables
bool isInObjCInterface;
bool isInEnum;
bool isInEnumTypeID;
bool isInStruct;
bool isInLet;
bool isInTrailingReturnType;
bool modifierIndent;
@@ -550,6 +573,13 @@ private: // variables
bool foundPreCommandMacro;
bool shouldAlignMethodColon;
bool shouldIndentPreprocConditional;
bool squeezeWhitespace;
bool attemptLambdaIndentation;
bool isInAssignment;
bool isInInitializerList;
bool isInMultiLineString;
int indentCount;
int spaceIndentCount;
int spaceIndentObjCMethodAlignment;
@@ -584,25 +614,27 @@ private: // variables
// Class ASEnhancer
//-----------------------------------------------------------------------------
// TODO rewrite methods to return altered stings
class ASEnhancer : protected ASBase
{
public: // functions
ASEnhancer() = default;
void init(int, int, int, bool, bool, bool, bool, bool, bool, bool,
vector<const pair<const string, const string>* >*);
void enhance(string& line, bool isInNamespace, bool isInPreprocessor, bool isInSQL);
std::vector<const std::pair<const std::string, const std::string>* >*);
void enhance(std::string& line, bool isInNamespace, bool isInPreprocessor, bool isInSQL);
private: // functions
void convertForceTabIndentToSpaces(string& line) const;
void convertSpaceIndentToForceTab(string& line) const;
size_t findCaseColon(const string& line, size_t caseIndex) const;
int indentLine(string& line, int indent) const;
bool isBeginDeclareSectionSQL(const string& line, size_t index) const;
bool isEndDeclareSectionSQL(const string& line, size_t index) const;
bool isOneLineBlockReached(const string& line, int startChar) const;
void parseCurrentLine(string& line, bool isInPreprocessor, bool isInSQL);
size_t processSwitchBlock(string& line, size_t index);
int unindentLine(string& line, int unindent) const;
void convertForceTabIndentToSpaces(std::string& line) const;
void convertSpaceIndentToForceTab(std::string& line) const;
size_t findCaseColon(std::string_view line, size_t caseIndex) const;
int indentLine(std::string& line, int indent) const;
bool isBeginDeclareSectionSQL(std::string_view line, size_t index) const;
bool isEndDeclareSectionSQL(std::string_view line, size_t index) const;
bool isOneLineBlockReached(std::string_view line, int startChar) const;
void parseCurrentLine(std::string& line, bool isInPreprocessor, bool isInSQL);
size_t processSwitchBlock(std::string& line, size_t index);
int unindentLine(std::string& line, int unindent) const;
private:
// options from command line or options file
@@ -641,12 +673,12 @@ private:
};
SwitchVariables sw; // switch variables struct
vector<SwitchVariables> switchStack; // stack vector of switch variables
std::vector<SwitchVariables> switchStack; // stack std::vector of switch variables
// event table variables
bool nextLineIsEventIndent; // begin event table indent is reached
bool isInEventTable; // need to indent an event table
vector<const pair<const string, const string>* >* indentableMacros;
std::vector<const std::pair<const std::string, const std::string>* >* indentableMacros;
// SQL variables
bool nextLineIsDeclareIndent; // begin declare section indent is reached
@@ -670,11 +702,11 @@ public: // functions
void init(ASSourceIterator* si) override;
bool hasMoreLines() const;
string nextLine();
std::string nextLine();
LineEndFormat getLineEndFormat() const;
bool getIsLineReady() const;
void setFormattingStyle(FormatStyle style);
void setAddBracesMode(bool state);
void setAddBracesMode(int state);
void setAddOneLineBracesMode(bool state);
void setRemoveBracesMode(bool state);
void setAttachClass(bool state);
@@ -709,11 +741,23 @@ public: // functions
void setMaxCodeLength(int max);
void setObjCColonPaddingMode(ObjCColonPad mode);
void setOperatorPaddingMode(bool state);
void setNegationPaddingMode(NegationPaddingMode mode);
void setIncludeDirectivePaddingMode(IncludeDirectivePaddingMode mode);
void setParensOutsidePaddingMode(bool state);
void setParensFirstPaddingMode(bool state);
void setEmptyParensPaddingMode(bool state);
void setParensInsidePaddingMode(bool state);
void setParensHeaderPaddingMode(bool state);
void setParensUnPaddingMode(bool state);
void setBracketsOutsidePaddingMode(bool state);
void setBracketsInsidePaddingMode(bool state);
void setBracketsUnPaddingMode(bool state);
void setPointerAlignment(PointerAlign alignment);
void setPreprocBlockIndent(bool state);
void setReferenceAlignment(ReferenceAlign alignment);
@@ -730,7 +774,7 @@ public: // functions
void setAddOneLineBracketsMode(bool state);
void setRemoveBracketsMode(bool state);
void setBreakClosingHeaderBracketsMode(bool state);
void setSqueezeEmptyLinesNumber(int);
private: // functions
template<typename T> void deleteContainer(T& container);
@@ -738,8 +782,8 @@ private: // functions
char peekNextChar() const;
BraceType getBraceType();
bool adjustChecksumIn(int adjustment);
bool computeChecksumIn(const string& currentLine_);
bool computeChecksumOut(const string& beautifiedLine);
bool computeChecksumIn(std::string_view currentLine_);
bool computeChecksumOut(std::string_view beautifiedLine);
bool addBracesToStatement();
bool removeBracesFromStatement();
bool commentAndHeaderFollows();
@@ -752,25 +796,25 @@ private: // functions
bool isBeforeMultipleLineEndComments(int startPos) const;
bool isBraceType(BraceType a, BraceType b) const;
bool isClassInitializer() const;
bool isClosingHeader(const string* header) const;
bool isClosingHeader(const std::string* header) const;
bool isCurrentBraceBroken() const;
bool isDereferenceOrAddressOf() const;
bool isExecSQL(const string& line, size_t index) const;
bool isEmptyLine(const string& line) const;
bool isExecSQL(std::string_view line, size_t index) const;
bool isEmptyLine(std::string_view line) const;
bool isExternC() const;
bool isMultiStatementLine() const;
bool isNextWordSharpNonParenHeader(int startChar) const;
bool isNonInStatementArrayBrace() const;
bool isNumericVariable(const string& word) const;
bool isNumericVariable(std::string_view word) const;
bool isOkToSplitFormattedLine();
bool isPointerOrReference() const;
bool isPointerOrReferenceCentered() const;
bool isPointerOrReferenceVariable(const string& word) const;
bool isPointerToPointer(const string& line, int currPos) const;
bool isSharpStyleWithParen(const string* header) const;
bool isStructAccessModified(const string& firstLine, size_t index) const;
bool isIndentablePreprocessorBlock(const string& firstLine, size_t index);
bool isNDefPreprocStatement(const string& nextLine_, const string& preproc) const;
bool isPointerOrReferenceVariable(std::string_view word) const;
bool isPointerToPointer(std::string_view line, int currPos) const;
bool isSharpStyleWithParen(const std::string* header) const;
bool isStructAccessModified(const std::string& firstLine, size_t index) const;
bool isIndentablePreprocessorBlock(const std::string& firstLine, size_t index);
bool isNDefPreprocStatement(std::string_view nextLine_, std::string_view preproc) const;
bool isUnaryOperator() const;
bool isUniformInitializerBrace() const;
bool isImmediatelyPostCast() const;
@@ -783,24 +827,24 @@ private: // functions
int findObjCColonAlignment() const;
int getCurrentLineCommentAdjustment();
int getNextLineCommentAdjustment();
int isOneLineBlockReached(const string& line, int startChar) const;
int isOneLineBlockReached(std::string_view line, int startChar) const;
void adjustComments();
void appendChar(char ch, bool canBreakLine);
void appendCharInsideComments();
void appendClosingHeader();
void appendOperator(const string& sequence, bool canBreakLine = true);
void appendSequence(const string& sequence, bool canBreakLine = true);
void appendOperator(std::string_view sequence, bool canBreakLine = true);
void appendSequence(std::string_view sequence, bool canBreakLine = true);
void appendSpacePad();
void appendSpaceAfter();
void breakLine(bool isSplitLine = false);
void buildLanguageVectors();
void updateFormattedLineSplitPoints(char appendedChar);
void updateFormattedLineSplitPointsOperator(const string& sequence);
void updateFormattedLineSplitPointsOperator(std::string_view sequence);
void checkIfTemplateOpener();
void clearFormattedLineSplitPoints();
void convertTabToSpaces();
void deleteContainer(vector<BraceType>*& container);
void findReturnTypeSplitPoint(const string& firstLine);
void deleteContainer(std::vector<BraceType>*& container);
void findReturnTypeSplitPoint(const std::string& firstLine);
void formatArrayRunIn();
void formatRunIn();
void formatArrayBraces(BraceType braceType, bool isOpeningArrayBrace);
@@ -821,14 +865,14 @@ private: // functions
void fixOptionVariableConflicts();
void goForward(int i);
void isLineBreakBeforeClosingHeader();
void initContainer(vector<BraceType>*& container, vector<BraceType>* value);
void initContainer(std::vector<BraceType>*& container, std::vector<BraceType>* value);
void initNewLine();
void padObjCMethodColon();
void padObjCMethodPrefix();
void padObjCParamType();
void padObjCReturnType();
void padOperators(const string* newOperator);
void padParens();
void padOperators(const std::string* newOperator);
void padParensOrBrackets(char openDelim, char closeDelim, bool padFirstParen);
void processPreprocessor();
void resetEndOfStatement();
void setAttachClosingBraceMode(bool state);
@@ -837,45 +881,46 @@ private: // functions
void trimContinuationLine();
void updateFormattedLineSplitPointsPointerOrReference(size_t index);
size_t findFormattedLineSplitPoint() const;
size_t findNextChar(const string& line, char searchChar, int searchStart = 0) const;
const string* checkForHeaderFollowingComment(const string& firstLine) const;
const string* getFollowingOperator() const;
string getPreviousWord(const string& line, int currPos) const;
string peekNextText(const string& firstLine,
bool endOnEmptyLine = false,
const shared_ptr<ASPeekStream>& streamArg = nullptr) const;
size_t findNextChar(std::string_view line, char searchChar, int searchStart = 0) const;
const std::string* checkForHeaderFollowingComment(std::string_view firstLine) const;
const std::string* getFollowingOperator() const;
std::string getPreviousWord(const std::string& line, int currPos, bool allowDots = false) const;
std::string peekNextText(std::string_view firstLine,
bool endOnEmptyLine = false,
const std::shared_ptr<ASPeekStream>& streamArg = nullptr) const;
private: // variables
int formatterFileType;
vector<const string*>* headers;
vector<const string*>* nonParenHeaders;
vector<const string*>* preDefinitionHeaders;
vector<const string*>* preCommandHeaders;
vector<const string*>* operators;
vector<const string*>* assignmentOperators;
vector<const string*>* castOperators;
vector<const pair<const string, const string>* >* indentableMacros; // for ASEnhancer
std::vector<const std::string*>* headers;
std::vector<const std::string*>* nonParenHeaders;
std::vector<const std::string*>* preDefinitionHeaders;
std::vector<const std::string*>* preCommandHeaders;
std::vector<const std::string*>* operators;
std::vector<const std::string*>* assignmentOperators;
std::vector<const std::string*>* castOperators;
std::vector<const std::pair<const std::string, const std::string>* >* indentableMacros; // for ASEnhancer
ASSourceIterator* sourceIterator;
ASEnhancer* enhancer;
vector<const string*>* preBraceHeaderStack;
vector<BraceType>* braceTypeStack;
vector<int>* parenStack;
vector<bool>* structStack;
vector<bool>* questionMarkStack;
std::vector<const std::string*>* preBraceHeaderStack;
std::vector<BraceType>* braceTypeStack;
std::vector<int>* parenStack;
std::vector<bool>* structStack;
std::vector<bool>* questionMarkStack;
string currentLine;
string formattedLine;
string readyFormattedLine;
string verbatimDelimiter;
const string* currentHeader;
std::string currentLine;
std::string formattedLine;
std::string readyFormattedLine;
std::string verbatimDelimiter;
const std::string* currentHeader;
const std::string* previousHeader;
char currentChar;
char previousChar;
char previousNonWSChar;
char previousCommandChar;
char quoteChar;
streamoff preprocBlockEnd;
std::streamoff preprocBlockEnd;
int charNum;
int runInIndentChars;
int nextLineSpacePadNum;
@@ -885,6 +930,11 @@ private: // variables
int tabIncrementIn;
int templateDepth;
int squareBracketCount;
int parenthesesCount;
int closingBracesCount;
size_t squeezeEmptyLineNum;
size_t squeezeEmptyLineCount;
size_t checksumIn;
size_t checksumOut;
size_t currentLineFirstBraceNum; // first brace location on currentLine
@@ -916,12 +966,16 @@ private: // variables
ReferenceAlign referenceAlignment;
ObjCColonPad objCColonPadMode;
LineEndFormat lineEnd;
NegationPaddingMode negationPadMode;
IncludeDirectivePaddingMode includeDirectivePaddingMode;
bool isVirgin;
bool isInVirginLine;
bool shouldPadCommas;
bool shouldPadOperators;
bool shouldPadParensOutside;
bool shouldPadFirstParen;
bool shouldPadEmptyParens;
bool shouldPadParensInside;
bool shouldPadHeader;
bool shouldStripCommentPrefix;
@@ -953,6 +1007,7 @@ private: // variables
bool isInClassInitializer;
bool isInQuote;
bool isInVerbatimQuote;
bool checkInterpolation;
bool haveLineContinuationChar;
bool isInQuoteContinuation;
bool isHeaderInMultiStatementLine;
@@ -974,6 +1029,8 @@ private: // variables
bool lineCommentNoIndent;
bool isFormattingModeOff;
bool isInEnum;
bool isInStruct;
bool isInContinuedPreProc;
bool isInExecSQL;
bool isInAsm;
bool isInAsmOneLine;
@@ -1011,7 +1068,7 @@ private: // variables
bool shouldBreakClosingHeaderBraces;
bool shouldBreakElseIfs;
bool shouldBreakLineAfterLogical;
bool shouldAddBraces;
int shouldAddBraces;
bool shouldAddOneLineBraces;
bool shouldRemoveBraces;
bool shouldPadMethodColon;
@@ -1027,6 +1084,9 @@ private: // variables
bool shouldBreakReturnTypeDecl;
bool shouldAttachReturnType;
bool shouldAttachReturnTypeDecl;
bool shouldPadBracketsOutside;
bool shouldPadBracketsInside;
bool shouldUnPadBrackets;
bool needHeaderOpeningBrace;
bool shouldBreakLineAtNextChar;
bool shouldKeepLineUnbroken;
@@ -1049,8 +1109,8 @@ private: // variables
bool shouldBreakClosingHeaderBlocks;
bool isPrependPostBlockEmptyLineRequested;
bool isAppendPostBlockEmptyLineRequested;
bool isIndentableProprocessor;
bool isIndentableProprocessorBlock;
bool isIndentablePreprocessor;
bool isIndentablePreprocessorBlck;
bool prependEmptyLine;
bool appendOpeningBrace;
bool foundClosingHeader;
@@ -1060,22 +1120,27 @@ private: // variables
bool isFirstPreprocConditional;
bool processedFirstConditional;
bool isJavaStaticConstructor;
bool isInAllocator;
bool isInMultlineStatement;
int isInExplicitBlock;
private: // inline functions
// append the CURRENT character (curentChar) to the current formatted line.
// append the CURRENT character (currentChar) to the current formatted line.
void appendCurrentChar(bool canBreakLine = true)
{ appendChar(currentChar, canBreakLine); }
// check if a specific sequence exists in the current placement of the current line
bool isSequenceReached(const char* sequence) const
{ return currentLine.compare(charNum, strlen(sequence), sequence) == 0; }
bool isSequenceReached(std::string_view sequence) const
{
return currentLine.compare(charNum, sequence.length(), sequence) == 0;
}
// call ASBase::findHeader for the current character
const string* findHeader(const vector<const string*>* headers_)
const std::string* findHeader(const std::vector<const std::string*>* headers_)
{ return ASBase::findHeader(currentLine, charNum, headers_); }
// call ASBase::findOperator for the current character
const string* findOperator(const vector<const string*>* operators_)
const std::string* findOperator(const std::vector<const std::string*>* operators_)
{ return ASBase::findOperator(currentLine, charNum, operators_); }
}; // Class ASFormatter
@@ -1083,8 +1148,8 @@ private: // inline functions
// astyle namespace global declarations
//-----------------------------------------------------------------------------
// sort comparison functions for ASResource
bool sortOnLength(const string* a, const string* b);
bool sortOnName(const string* a, const string* b);
bool sortOnLength(const std::string* a, const std::string* b);
bool sortOnName(const std::string* a, const std::string* b);
} // namespace astyle
+986 -986
View File
File diff suppressed because it is too large Load Diff
+91 -95
View File
@@ -108,31 +108,29 @@ public:
public: // function declarations
explicit ASStreamIterator(T* in);
~ASStreamIterator() override;
bool getLineEndChange(int lineEndFormat) const;
int getStreamLength() const override;
string nextLine(bool emptyLineWasDeleted) override;
string peekNextLine() override;
std::string nextLine(bool emptyLineWasDeleted) override;
std::string peekNextLine() override;
void peekReset() override;
void saveLastInputLine();
streamoff tellg() override;
std::streamoff tellg() override;
private:
T* inStream; // pointer to the input stream
string buffer; // current input line
string prevBuffer; // previous input line
string outputEOL; // next output end of line char
int eolWindows; // number of Windows line endings, CRLF
int eolLinux; // number of Linux line endings, LF
int eolMacOld; // number of old Mac line endings. CR
streamoff streamLength; // length of the input file stream
streamoff peekStart; // starting position for peekNextLine
std::string buffer; // current input line
std::string prevBuffer; // previous input line
std::string lastOutputEOL; // next output end of line char
std::streamoff streamLength; // length of the input file stream
std::streamoff peekStart; // starting position for peekNextLine
bool prevLineDeleted; // the previous input line was deleted
public: // inline functions
bool compareToInputBuffer(const string& nextLine_) const
bool compareToInputBuffer(const std::string& nextLine_) const
{ return (nextLine_ == prevBuffer); }
const string& getOutputEOL() const { return outputEOL; }
streamoff getPeekStart() const override { return peekStart; }
const std::string& getLastOutputEOL() const { return lastOutputEOL; }
std::streamoff getPeekStart() const override { return peekStart; }
bool hasMoreLines() const override { return !inStream->eof(); }
};
@@ -179,28 +177,28 @@ public:
#else
ASOptions(ASFormatter& formatterArg, ASConsole& consoleArg);
#endif
string getOptionErrors() const;
void importOptions(stringstream& in, vector<string>& optionsVector);
bool parseOptions(vector<string>& optionsVector, const string& errorInfo);
std::string getOptionErrors() const;
void importOptions(std::stringstream& in, std::vector<std::string>& optionsVector);
bool parseOptions(std::vector<std::string>& optionsVector);
private:
// variables
ASFormatter& formatter;
stringstream optionErrors; // option error messages
std::stringstream optionErrors; // option error messages
#ifndef ASTYLE_LIB
ASConsole& console; // DO NOT USE for ASTYLE_LIB
#endif
// functions
string getParam(const string& arg, const char* op);
string getParam(const string& arg, const char* op1, const char* op2);
bool isOption(const string& arg, const char* op);
bool isOption(const string& arg, const char* op1, const char* op2);
void isOptionError(const string& arg, const string& errorInfo);
bool isParamOption(const string& arg, const char* option);
bool isParamOption(const string& arg, const char* option1, const char* option2);
void parseOption(const string& arg, const string& errorInfo);
bool parseOptionContinued(const string& arg, const string& errorInfo);
std::string getParam(const std::string& arg, const char* op);
std::string getParam(const std::string& arg, const char* op1, const char* op2);
bool isOption(const std::string& arg, const char* op);
bool isOption(const std::string& arg, const char* op1, const char* op2);
void isOptionError(const std::string& arg);
bool isParamOption(const std::string& arg, const char* option);
bool isParamOption(const std::string& arg, const char* option1, const char* option2);
void parseOption(const std::string& arg);
bool parseOptionContinued(const std::string& arg);
};
#ifndef ASTYLE_LIB
@@ -215,7 +213,7 @@ private: // variables
ASFormatter& formatter; // reference to the ASFormatter object
ASEncoding encode; // file encoding conversion
ASLocalizer localizer; // language translation
ostream* errorStream; // direct error messages to cerr or cout
std::ostream* errorStream; // direct error messages to cerr or std::cout
// command line options
bool isRecursive; // recursive option
bool isDryRun; // dry-run option
@@ -234,41 +232,40 @@ private: // variables
bool filesAreIdentical; // input and output files are identical
int filesFormatted; // number of files formatted
int filesUnchanged; // number of files unchanged
bool lineEndsMixed; // output has mixed line ends
int linesOut; // number of output lines
string outputEOL; // current line end
string prevEOL; // previous line end
string astyleExePath; // absolute executable path and name from argv[0]
string optionFileName; // file path and name of the options file
string origSuffix; // suffix= option
string projectOptionFileName; // file path and name of the project options file
string stdPathIn; // path to input from stdin=
string stdPathOut; // path to output from stdout=
string targetDirectory; // path to the directory being processed
string targetFilename; // file name being processed
std::string outputEOL; // current line end
vector<string> excludeVector; // exclude from wildcard hits
vector<bool> excludeHitsVector; // exclude flags for error reporting
vector<string> fileNameVector; // file paths and names from the command line
vector<string> optionsVector; // options from the command line
vector<string> projectOptionsVector;// project options from the project options file
vector<string> fileOptionsVector; // options from the options file
vector<string> fileName; // files to be processed including path
std::string astyleExePath; // absolute executable path and name from argv[0]
std::string optionFileName; // file path and name of the options file
std::string origSuffix; // suffix= option
std::string projectOptionFileName; // file path and name of the project options file
std::string stdPathIn; // path to input from stdin=
std::string stdPathOut; // path to output from stdout=
std::string targetDirectory; // path to the directory being processed
std::string targetFilename; // file name being processed
std::vector<std::string> excludeVector; // exclude from wildcard hits
std::vector<bool> excludeHitsVector; // exclude flags for error reporting
std::vector<std::string> fileNameVector; // file paths and names from the command line
std::vector<std::string> optionsVector; // options from the command line
std::vector<std::string> projectOptionsVector;// project options from the project options file
std::vector<std::string> fileOptionsVector; // options from the options file
std::vector<std::string> fileName; // files to be processed including path
public: // functions
explicit ASConsole(ASFormatter& formatterArg);
ASConsole(const ASConsole&) = delete;
ASConsole& operator=(ASConsole const&) = delete;
void convertLineEnds(ostringstream& out, int lineEnd);
FileEncoding detectEncoding(const char* data, size_t dataSize) const;
void error() const;
void error(const char* why, const char* what) const;
void formatCinToCout();
vector<string> getArgvOptions(int argc, char** argv);
std::vector<std::string> getArgvOptions(int argc, char** argv);
bool fileExists(const char* file) const;
bool fileNameVectorIsEmpty() const;
ostream* getErrorStream() const;
std::ostream* getErrorStream() const;
bool getFilesAreIdentical() const;
int getFilesFormatted() const;
bool getIgnoreExcludeErrors() const;
@@ -281,19 +278,19 @@ public: // functions
bool getLineEndsMixed() const;
bool getNoBackup() const;
bool getPreserveDate() const;
string getLanguageID() const;
string getNumberFormat(int num, size_t lcid = 0) const;
string getNumberFormat(int num, const char* groupingArg, const char* separator) const;
string getOptionFileName() const;
string getOrigSuffix() const;
string getProjectOptionFileName() const;
string getStdPathIn() const;
string getStdPathOut() const;
void getTargetFilenames(string& targetFilename_, vector<string>& targetFilenameVector) const;
std::string getLanguageID() const;
std::string getNumberFormat(int num, size_t lcid = 0) const;
std::string getNumberFormat(int num, const char* groupingArg, const char* separator) const;
std::string getOptionFileName() const;
std::string getOrigSuffix() const;
std::string getProjectOptionFileName() const;
std::string getStdPathIn() const;
std::string getStdPathOut() const;
void getTargetFilenames(std::string& targetFilename_, std::vector<std::string>& targetFilenameVector) const;
void processFiles();
void processOptions(const vector<string>& argvOptions);
void processOptions(const std::vector<std::string>& argvOptions);
void setBypassBrowserOpen(bool state);
void setErrorStream(ostream* errStreamPtr);
void setErrorStream(std::ostream* errStreamPtr);
void setIgnoreExcludeErrors(bool state);
void setIgnoreExcludeErrorsAndDisplay(bool state);
void setIsDryRun(bool state);
@@ -302,54 +299,53 @@ public: // functions
void setIsRecursive(bool state);
void setIsVerbose(bool state);
void setNoBackup(bool state);
void setOptionFileName(const string& name);
void setOrigSuffix(const string& suffix);
void setOptionFileName(const std::string& name);
void setOrigSuffix(const std::string& suffix);
void setPreserveDate(bool state);
void setProjectOptionFileName(const string& optfilepath);
void setStdPathIn(const string& path);
void setStdPathOut(const string& path);
void standardizePath(string& path, bool removeBeginningSeparator = false) const;
bool stringEndsWith(const string& str, const string& suffix) const;
void updateExcludeVector(const string& suffixParam);
vector<string> getExcludeVector() const;
vector<bool> getExcludeHitsVector() const;
vector<string> getFileNameVector() const;
vector<string> getOptionsVector() const;
vector<string> getProjectOptionsVector() const;
vector<string> getFileOptionsVector() const;
vector<string> getFileName() const;
void setProjectOptionFileName(const std::string& optfilepath);
void setStdPathIn(const std::string& path);
void setStdPathOut(const std::string& path);
void standardizePath(std::string& path, bool removeBeginningSeparator = false) const;
bool stringEndsWith(std::string_view str, std::string_view suffix) const;
void updateExcludeVector(const std::string& suffixParam);
std::vector<std::string> getExcludeVector() const;
std::vector<bool> getExcludeHitsVector() const;
std::vector<std::string> getFileNameVector() const;
std::vector<std::string> getOptionsVector() const;
std::vector<std::string> getProjectOptionsVector() const;
std::vector<std::string> getFileOptionsVector() const;
std::vector<std::string> getFileName() const;
private: // functions
void correctMixedLineEnds(ostringstream& out);
void formatFile(const string& fileName_);
string getParentDirectory(const string& absPath) const;
string findProjectOptionFilePath(const string& fileName_) const;
string getCurrentDirectory(const string& fileName_) const;
void getFileNames(const string& directory, const vector<string>& wildcards);
void getFilePaths(const string& filePath);
string getFullPathName(const string& relativePath) const;
string getHtmlInstallPrefix() const;
string getParam(const string& arg, const char* op);
bool isHomeOrInvalidAbsPath(const string& absPath) const;
void formatFile(const std::string& fileName_);
std::string getParentDirectory(const std::string& absPath) const;
std::string findProjectOptionFilePath(const std::string& fileName_) const;
std::string getCurrentDirectory(const std::string& fileName_) const;
void getFileNames(const std::string& directory, const std::vector<std::string>& wildcards);
void getFilePaths(const std::string& filePath);
std::string getFullPathName(const std::string& relativePath) const;
std::string getHtmlInstallPrefix() const;
std::string getParam(const std::string& arg, const char* op);
bool isHomeOrInvalidAbsPath(const std::string& absPath) const;
void initializeOutputEOL(LineEndFormat lineEndFormat);
bool isOption(const string& arg, const char* op);
bool isOption(const string& arg, const char* a, const char* b);
bool isParamOption(const string& arg, const char* option);
bool isPathExclued(const string& subPath);
bool isOption(const std::string& arg, const char* op);
bool isOption(const std::string& arg, const char* a, const char* b);
bool isParamOption(const std::string& arg, const char* option);
bool isPathExclued(const std::string& subPath);
void launchDefaultBrowser(const char* filePathIn = nullptr) const;
void printHelp() const;
void printMsg(const char* msg, const string& data) const;
void printMsg(const char* msg, const std::string& data) const;
void printSeparatingLine() const;
void printVerboseHeader() const;
void printVerboseStats(clock_t startTime) const;
FileEncoding readFile(const string& fileName_, stringstream& in) const;
FileEncoding readFile(const std::string& fileName_, std::stringstream& in) const;
void removeFile(const char* fileName_, const char* errMsg) const;
void renameFile(const char* oldFileName, const char* newFileName, const char* errMsg) const;
void setOutputEOL(LineEndFormat lineEndFormat, const string& currentEOL);
void sleep(int seconds) const;
int waitForRemove(const char* newFileName) const;
int wildcmp(const char* wild, const char* data) const;
void writeFile(const string& fileName_, FileEncoding encoding, ostringstream& out) const;
void writeFile(const std::string& fileName_, FileEncoding encoding, std::ostringstream& out) const;
#ifdef _WIN32
void displayLastError();
#endif
+14 -14
View File
@@ -14,27 +14,27 @@
<h1>Artistic Style Developer Information</h1>
<h2 class="large">Objective&#8209;C on Windows and Linux</h2>
<h2 class="large"><span style="white-space: nowrap;">Objective-C</span> on Windows and Linux</h2>
<p>
&nbsp;</p>
<p class="noindent">
The best platform for developing Objective&#8209;C is Mac OS. But Objective&#8209;C programs can also be compiled
and run on Windows or Linux by using GNUstep and an Objective&#8209;C compiler. GNUstep is an object-oriented
library that provides the programmer with a range of libraries and utilities for building Objective&#8209;C
The best platform for developing <span style="white-space: nowrap;">Objective-C</span> is Mac OS. But <span style="white-space: nowrap;">Objective-C</span> programs can also be compiled
and run on Windows or Linux by using GNUstep and an <span style="white-space: nowrap;">Objective-C</span> compiler. GNUstep is an object-oriented
library that provides the programmer with a range of libraries and utilities for building <span style="white-space: nowrap;">Objective-C</span>
applications. GNUstep is generally compatible with recent developments of the MacOS (Cocoa) API.</p>
<p class="noindent">
Objective&#8209;C development environments are not readily available on Windows or Linux.
CodeBlocks can be used if additional options are set and an Objective-C compiler is used.. The Example program
<span style="white-space: nowrap;">Objective-C</span> development environments are not readily available on Windows or Linux.
CodeBlocks can be used if additional options are set and an <span style="white-space: nowrap;">Objective-C</span> compiler is used.. The Example program
can also be compiled by using a text editor with compile capability such as SciTE. Or it may be compiled from
the command line. Or scripts can be written using Python, Batch, Bash, or other scripting languages. Compile options
for each platform are included in the following descriptions.</p>
<h3>Objective&#8209;C on Windows</h3>
<h3><span style="white-space: nowrap;">Objective-C</span> on Windows</h3>
<p>
Objective&#8209;C on Windows requires the GNUstep packages and the MinGW compiler. Installing MinGW is optional
since it is included with GNUstep. If MinGW is installed separately be sure to include the Objective&#8209;C compiler
<span style="white-space: nowrap;">Objective-C</span> on Windows requires the GNUstep packages and the MinGW compiler. Installing MinGW is optional
since it is included with GNUstep. If MinGW is installed separately be sure to include the <span style="white-space: nowrap;">Objective-C</span> compiler
package. The GNUstep installation packages are available at the <a href="http://www.gnustep.org/experience/Windows.html">
GNUstep Windows Installer</a> page. For development you will need GNUstep MSYS, GNUstep Core, and GNUstep
Devel. GNUstep Cairo is optional. For now, it is best to use the "stable" packages.</p>
@@ -48,7 +48,7 @@
the menu display will be separate from the application window. This can be changed by running the "System Preferences"
program and selecting Themes &gt; WinUXThem. Most applications will then display a window with a menu at the top
as in Windows. <a href="http://www.gnustep.it/enrico/gworkspace/">GWorkspace</a> is a fairly large application
that includes source code. It can be used as a reference for Objective&#8209;C coding. The GNUstep MSYS shell
that includes source code. It can be used as a reference for <span style="white-space: nowrap;">Objective-C</span> coding. The GNUstep MSYS shell
must be used for the compile since Autoconf is used. There are INSTALL instructions in the top-level GWorkspace
directory.</p>
<p>
@@ -70,12 +70,12 @@
The compiled Example will run as any other console program. If Artistic Style is linked as a DLL it must be in
the same directory as the example, or in another system path directory.</p>
<h3>Objective&#8209;C on Linux</h3>
<h3><span style="white-space: nowrap;">Objective-C</span> on Linux</h3>
<p>
Objective&#8209;C on Linux requires the GNUstep packages and the GCC or Clang compiler. On many systems GNUstep
<span style="white-space: nowrap;">Objective-C</span> on Linux requires the GNUstep packages and the GCC or Clang compiler. On many systems GNUstep
will be available as a packaged install. For a typical installation the gobjc, gobjc++, gnustep, and
gnustep-core-devel packages are needed. The gobjc packages are the Objective&#8209;C compilers for GCC. If packages
gnustep-core-devel packages are needed. The gobjc packages are the <span style="white-space: nowrap;">Objective-C</span> compilers for GCC. If packages
are not available they can be compiled with source code available at the
<a href="http://www.gnustep.org/">GNUstep</a> website.</p>
<p>
@@ -84,7 +84,7 @@
application menu display is separate from the application window. This can NOT be changed with "System Preferences"
as on Windows. <a href="http://www.gnustep.it/enrico/gworkspace/">GWorkspace</a>
is a fairly large application that includes source code if downloaded from the website. It can be used as a reference
for Objective&#8209;C coding. There are INSTALL instructions in the top-level GWorkspace directory.</p>
for <span style="white-space: nowrap;">Objective-C</span> coding. There are INSTALL instructions in the top-level GWorkspace directory.</p>
<p>
To compile the Artistic Style Example program the GNUstep development packages must be installed. Artistic Style
should be compiled as a shared or static library for linking with the example. In the following options the "-L./"
+9 -9
View File
@@ -20,7 +20,7 @@
&nbsp;</p>
<p class="noindent">
Artistic Style has compile options for creating a shared library (DLL) or static library for use with a Graphical
User Interface (GUI). The shared library can be called from a C++, Objective&#8209;C, C#, or Python program. There
User Interface (GUI). The shared library can be called from a C++, <span style="white-space: nowrap;">Objective-C</span>, C#, or Python program. There
are also compile options for a Java Native Interface (JNI) that allows it to be called from a Java program. Information
on compiling the various configurations of Artistic Style is in the Install Information.</p>
<p class="noindent">
@@ -50,12 +50,12 @@
as a shared or static library from a C++ program. It includes a C++ sample program that can be used to test the
Artistic Style libraries.</p>
<p>
<a href="objc.html">Calling Artistic Style from an Objective-C Program</a> contains information on calling Artistic
Style as a shared or static library from an Objective-C program. It includes an Objective-C sample program that
<a href="objc.html">Calling Artistic Style from an <span style="white-space: nowrap;">Objective-C</span> Program</a> contains information on calling Artistic
Style as a shared or static library from an <span style="white-space: nowrap;">Objective-C</span> program. It includes an <span style="white-space: nowrap;">Objective-C</span> sample program that
can be used to test the Artistic Style shared libraries.</p>
<p style="margin-left: 0.5in;">
<a href="gnustep.html">Objective&#8209;C on Windows and Linux</a> contains information on compiling and running
Objective-C programs using GNUstep. It has instructions for compiling the Example program on Windows or
<a href="gnustep.html"><span style="white-space: nowrap;">Objective-C</span> on Windows and Linux</a> contains information on compiling and running
<span style="white-space: nowrap;">Objective-C</span> programs using GNUstep. It has instructions for compiling the Example program on Windows or
Linux.</p>
<p>
<a href="jni.html">Calling Artistic Style as a Java Native Interface</a> contains information on calling Artistic
@@ -99,13 +99,13 @@
<h4>
<a href="https://sourceforge.net/projects/astyle/files/OldFiles/examples/example-objc.zip" target="_blank"
title="open new window">Objective&#8209;C Example</a>
title="open new window"><span style="white-space: nowrap;">Objective-C</span> Example</a>
</h4>
<p>
The example for Objective&#8209;C contains the methods to call Artistic Style from a static or shared library
using an Objective&#8209;C program. Compile Artistic Style as a static or shared library using the macro ASTYLE_LIB.
Copy the shared library to the same folder as the Objective&#8209;C Example executable. It will format files in
The example for <span style="white-space: nowrap;">Objective-C</span> contains the methods to call Artistic Style from a static or shared library
using an <span style="white-space: nowrap;">Objective-C</span> program. Compile Artistic Style as a static or shared library using the macro ASTYLE_LIB.
Copy the shared library to the same folder as the <span style="white-space: nowrap;">Objective-C</span> Example executable. It will format files in
the test&#8209;data directory included in the download.</p>
<h4>
+5 -5
View File
@@ -15,20 +15,20 @@
<h1>Artistic Style Developer Information</h1>
<h2 class="large">Calling Artistic Style from an Objective&#8209;C Program</h2>
<h2 class="large">Calling Artistic Style from an <span style="white-space: nowrap;">Objective-C</span> Program</h2>
<p>
&nbsp;</p>
<p class="noindent">
Artistic Style can be compiled as a shared library (DLL) or a static library and linked with an Objective&#8209;C
program. This is usually done on a Mac OS computer. However,&nbsp; <a href="gnustep.html">Objective&#8209;C on Windows
and Linux</a> contains information on compiling and running Objective&#8209;C programs using GNUstep. It has
Artistic Style can be compiled as a shared library (DLL) or a static library and linked with an <span style="white-space: nowrap;">Objective-C</span>
program. This is usually done on a Mac OS computer. However,&nbsp; <a href="gnustep.html"><span style="white-space: nowrap;">Objective-C</span> on Windows
and Linux</a> contains information on compiling and running <span style="white-space: nowrap;">Objective-C</span> programs using GNUstep. It has
instructions for compiling the following example program on Windows or Linux.</p>
<h3>Compile Options</h3>
<p>
To compile AStyle for use with an Objective&#8209;C program the compile option ASTYLE_LIB must be defined. Then
To compile AStyle for use with an <span style="white-space: nowrap;">Objective-C</span> program the compile option ASTYLE_LIB must be defined. Then
AStyle will accept the files and options as parameters from a function call. It is the responsibility of the calling
program to read the source files and accept the options from the user via a graphical interface or other method.
These are then passed via the function call. After the source files are formatted they will be returned to the
+3 -3
View File
@@ -523,10 +523,10 @@ def get_project_filepaths(project):
# filepaths.append(test_directory + "/MonoDevelop/src/*.cs")
elif project == LIBSBASE:
if USE_MULTIPLE_EXTENSIONS:
filepaths.append(test_directory + "/libsBase/*.m,*.h")
filepaths.append(test_directory + "/libsBase/Source/*.m,*.h")
else:
filepaths.append(test_directory + "/libsBase/*.m")
filepaths.append(test_directory + "/libsBase/*.h")
filepaths.append(test_directory + "/libsBase/Source/*.m")
filepaths.append(test_directory + "/libsBase/Source/*.h")
elif project == SCITE:
if USE_MULTIPLE_EXTENSIONS:
filepaths.append(test_directory + "/SciTE/*.cxx,*.h")
+2 -2
View File
@@ -34,10 +34,10 @@ import libtest
# SHARPDEVELOP # C# - Compile on Windows only
# SHARPMAIN # C# - 1000 files from SharpDevelop
# TESTPROJECT
__project = libastyle.LSOF
__project = libastyle.LIBSBASE
# select OPT0 thru OPT3, or use customized options
__options = libastyle.OPT4
__options = libastyle.OPT2
# options_x are for BOTH executables
__options_x = ""
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
# Creates a new test case for a single long option
# if the string begins as flag the second part is stored in OPTS
# Examples:
# ./gen_old_file.sh style_kr
# ./gen_old_file.sh flag_attach-namespaces
# Loop through the command-line arguments
for arg in "$@"; do
# Split each argument into 'name' and 'value'
IFS="_" read -r name value <<< "$arg"
dirName="$arg"
mkdir -p "$dirName"
arg="--$name=$value"
if [ "$name" = "flag" ]; then
arg="--$value"
echo "$arg" > "$dirName/OPTS"
fi
# call the astyle version here which is considered as reference for the future
astyle_ref "$arg" < tmp.cpp > "$dirName/tmp.cpp.old"
done
+31
View File
@@ -0,0 +1,31 @@
#!/bin/sh
# run all test cases in the current directory
# it assumes a source file produced by a previous astyle version to compare with the output of the current
#
for dir in */
do
dir=${dir%*/} # remove the trailing "/"
# make string an array
cmd_arg=(${dir//_/ })
# default arg=val based on directory name
arg="--${cmd_arg[0]}=${cmd_arg[1]}"
# custom arguments
if [ -f "$dir/OPTS" ]; then
arg=$(<"$dir/OPTS")
fi
# call the latest astyle here
../../AStyle/build_local/astyle --squeeze-lines=1 "$arg" < tmp.cpp > "$dir/tmp.cpp.new"
diff $dir/tmp.cpp.old $dir/tmp.cpp.new
if [ $? -eq 0 ]; then
rm "$dir/tmp.cpp.new"
else
echo "${dir} -> FAILED"
exit 1
fi
done
@@ -0,0 +1,290 @@
#include "stdafx.h"
#include <emmintrin.h>
#include <iostream>
// a badly formatted file used for CI regression tests
#ifdef TEST
#endif
using namespace std;
// Function declaration
int add(int a, int b);
// Class definition
class MyClass
{
public:
MyClass (int value) : myValue (value ) {}
void display()
{
cout << "MyValue: " << myValue << endl;
}
private:
int myValue;
};
int main()
{
// Variables and data types
int a, b, c, x, someVal, someVal2, someVal3, someVal4 = 5;
double y, foo, bar = 3.14;
char ch = 'A';
bool isTrue = true;
struct { // Structure declaration
int myNum; // Member (int variable)
string myString; // Member (string variable)
} myStructure; // Structure variable
// Arithmetic operations
int result = x + 2 * (int)y;
cout << "Result: " << result << endl;
// Conditional statement
if (x > 0) {
cout << "x is positive" << endl;
} else {
cout << "x is non-positive" << endl;
}
// Loop
for (int i = 0; i < 5; i++) {
cout << "Iteration " << i + 1 << endl;
}
// Function call
int sum = add(3, 4);
cout << "Sum: " << sum << endl;
// Object creation and method call
MyClass obj(42);
obj.display();
goto label;
label:
MyClass.setA1234( 1 )
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa()
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa( 2 )
.setC12dsdsds( 3 );
if (a=b=c) {
func(a==b==c);
someVal = someVal2 =
someVal3 = someVal4 = 0;
if (x) {
someVal = someVal2 =
someVal3 = someVal4 = 0;
}
}
int x2;
do {
x2 = 1;
} while (func(foo,
bar));
return 0;
}
// Function definition
int add(int a, int b)
{
return a + b;
}
// Pointer alignment
if (anotherMethod((uint8_t *)param1, (uint8_t *)param2))
{
int x = 1 * 2;
return;
}
int fdfd(int* t)
{
return 1;
}
if (*f(xss) < mx)
{
return 1;
}
if (**f(xss) < mx)
{
return 1;
}
if (t * f(xss) < mx)
{
return 1;
}
int* p = (int*)& _mem;
void foo(int a, int c)
{
int* p = (int*)& _mem;
}
void win_ui_flush (bool validate)
{
FOR_ALL_TAB_WINDOWS (tp, wp) {
if (wp->w_pos_changed && wp->w_grid_alloc.chars != NULL) {
if (tp == curtab) {
ui_ext_win_position (wp, validate);
} else {
ui_call_win_hide (wp->w_grid_alloc.handle);
wp->w_pos_changed = false;
}
}
if (tp == curtab) {
ui_ext_win_viewport (wp);
}
}
}
win_T* lastwin_nofloating (void)
{
win_T* res = lastwin;
while (res->w_floating) {
res = res->w_prev;
}
return res;
}
CPPageFileMediaInfo::CPPageFileMediaInfo(CString path, IFileSourceFilter *pFSF)
: CPropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
, m_fn(path)
, m_path(path)
{
m_futureMIText = std::async(std::launch::async, [ = ]() {
#if USE_STATIC_MEDIAINFO
MediaInfoLib::String filename = m_path;
MediaInfoLib::MediaInfo MI;
#else
MediaInfoDLL::String filename = m_path;
MediaInfo MI;
#endif
return MI.Inform().c_str();
}).share();
}
Test::Test() : member1(argument)
, member2([this]
{
some_code(argument);
})
, member3(42)
, member4("test")
{
}
struct xxxx {
int a, b, c;
};
(struct xxxxx *p);
int main(int * p, int *q)
{
return;
}
int main(void)
{
switch (foo) {
case 1:
a += 1;
break;
case 2: {
a += 2;
break;
}
}
struct xxxx *p;
printf("sizeof p: %d\n", sizeof p);
int * p, *q;
return 0;
}
mapping someData = ([
"key": "value",
]);
void fn()
{
some_fn(([
"key1": "/path/to/file1.c",
"key2": "/path/to/file2.c",
]));
}
int main()
{
while (true) {
new int *[5]; // Remove this and everything works fine
if (5 > 2) {
abc();
for (int i = 0; i < 6; i++) {
def();
}
} else {
xyz();
for (int i = 0; i < 8; i++) {
xyz();
}
}
}
return 0;
}
struct s {
public:
inline s() :
size(x),
ia {new int [y]},
ia {new int [y]}
{}
}
#define MY_BITFIELD_WIDTH
typedef struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
typedef struct {
uint32_t member_1 : 8;
uint32_t member_1 : 2;
uint32_t member_2 : 3;
bool (*func) (void);
}
@@ -0,0 +1,320 @@
#include "stdafx.h"
#include <emmintrin.h>
#include <iostream>
// a badly formatted file used for CI regression tests
#ifdef TEST
#endif
using namespace std;
// Function declaration
int add(int a, int b);
// Class definition
class MyClass
{
public:
MyClass (int value) : myValue (value ) {}
void display()
{
cout << "MyValue: " << myValue << endl;
}
private:
int myValue;
};
int main()
{
// Variables and data types
int a, b, c, x, someVal, someVal2, someVal3, someVal4 = 5;
double y, foo, bar = 3.14;
char ch = 'A';
bool isTrue = true;
struct // Structure declaration
{
int myNum; // Member (int variable)
string myString; // Member (string variable)
} myStructure; // Structure variable
// Arithmetic operations
int result = x + 2 * (int)y;
cout << "Result: " << result << endl;
// Conditional statement
if (x > 0)
{
cout << "x is positive" << endl;
}
else
{
cout << "x is non-positive" << endl;
}
// Loop
for (int i = 0; i < 5; i++)
{
cout << "Iteration " << i + 1 << endl;
}
// Function call
int sum = add(3, 4);
cout << "Sum: " << sum << endl;
// Object creation and method call
MyClass obj(42);
obj.display();
goto label;
label:
MyClass.setA1234( 1 )
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa()
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa( 2 )
.setC12dsdsds( 3 );
if (a=b=c)
{
func(a==b==c);
someVal = someVal2 =
someVal3 = someVal4 = 0;
if (x)
{
someVal = someVal2 =
someVal3 = someVal4 = 0;
}
}
int x2;
do
{
x2 = 1;
}
while (func(foo,
bar));
return 0;
}
// Function definition
int add(int a, int b)
{
return a + b;
}
// Pointer alignment
if (anotherMethod((uint8_t *)param1, (uint8_t *)param2))
{
int x = 1 * 2;
return;
}
int fdfd(int* t)
{
return 1;
}
if (*f(xss) < mx)
{
return 1;
}
if (**f(xss) < mx)
{
return 1;
}
if (t * f(xss) < mx)
{
return 1;
}
int* p = (int*)& _mem;
void foo(int a, int c)
{
int* p = (int*)& _mem;
}
void win_ui_flush (bool validate)
{
FOR_ALL_TAB_WINDOWS (tp, wp)
{
if (wp->w_pos_changed && wp->w_grid_alloc.chars != NULL)
{
if (tp == curtab)
{
ui_ext_win_position (wp, validate);
}
else
{
ui_call_win_hide (wp->w_grid_alloc.handle);
wp->w_pos_changed = false;
}
}
if (tp == curtab)
{
ui_ext_win_viewport (wp);
}
}
}
win_T* lastwin_nofloating (void)
{
win_T* res = lastwin;
while (res->w_floating)
{
res = res->w_prev;
}
return res;
}
CPPageFileMediaInfo::CPPageFileMediaInfo(CString path, IFileSourceFilter *pFSF)
: CPropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
, m_fn(path)
, m_path(path)
{
m_futureMIText = std::async(std::launch::async, [ = ]()
{
#if USE_STATIC_MEDIAINFO
MediaInfoLib::String filename = m_path;
MediaInfoLib::MediaInfo MI;
#else
MediaInfoDLL::String filename = m_path;
MediaInfo MI;
#endif
return MI.Inform().c_str();
}).share();
}
Test::Test() : member1(argument)
, member2([this]
{
some_code(argument);
})
, member3(42)
, member4("test")
{
}
struct xxxx
{
int a, b, c;
};
(struct xxxxx *p);
int main(int * p, int *q)
{
return;
}
int main(void)
{
switch (foo)
{
case 1:
a += 1;
break;
case 2:
{
a += 2;
break;
}
}
struct xxxx *p;
printf("sizeof p: %d\n", sizeof p);
int * p, *q;
return 0;
}
mapping someData = ([
"key": "value",
]);
void fn()
{
some_fn(([
"key1": "/path/to/file1.c",
"key2": "/path/to/file2.c",
]));
}
int main()
{
while (true)
{
new int *[5]; // Remove this and everything works fine
if (5 > 2)
{
abc();
for (int i = 0; i < 6; i++)
{
def();
}
}
else
{
xyz();
for (int i = 0; i < 8; i++)
{
xyz();
}
}
}
return 0;
}
struct s
{
public:
inline s() :
size(x),
ia {new int [y]},
ia {new int [y]}
{}
}
#define MY_BITFIELD_WIDTH
typedef struct
{
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
struct
{
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
typedef struct
{
uint32_t member_1 : 8;
uint32_t member_1 : 2;
uint32_t member_2 : 3;
bool (*func) (void);
}
@@ -0,0 +1,320 @@
#include "stdafx.h"
#include <emmintrin.h>
#include <iostream>
// a badly formatted file used for CI regression tests
#ifdef TEST
#endif
using namespace std;
// Function declaration
int add(int a, int b);
// Class definition
class MyClass
{
public:
MyClass (int value) : myValue (value ) {}
void display()
{
cout << "MyValue: " << myValue << endl;
}
private:
int myValue;
};
int main()
{
// Variables and data types
int a, b, c, x, someVal, someVal2, someVal3, someVal4 = 5;
double y, foo, bar = 3.14;
char ch = 'A';
bool isTrue = true;
struct // Structure declaration
{
int myNum; // Member (int variable)
string myString; // Member (string variable)
} myStructure; // Structure variable
// Arithmetic operations
int result = x + 2 * (int)y;
cout << "Result: " << result << endl;
// Conditional statement
if (x > 0)
{
cout << "x is positive" << endl;
}
else
{
cout << "x is non-positive" << endl;
}
// Loop
for (int i = 0; i < 5; i++)
{
cout << "Iteration " << i + 1 << endl;
}
// Function call
int sum = add(3, 4);
cout << "Sum: " << sum << endl;
// Object creation and method call
MyClass obj(42);
obj.display();
goto label;
label:
MyClass.setA1234( 1 )
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa()
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa( 2 )
.setC12dsdsds( 3 );
if (a=b=c)
{
func(a==b==c);
someVal = someVal2 =
someVal3 = someVal4 = 0;
if (x)
{
someVal = someVal2 =
someVal3 = someVal4 = 0;
}
}
int x2;
do
{
x2 = 1;
}
while (func(foo,
bar));
return 0;
}
// Function definition
int add(int a, int b)
{
return a + b;
}
// Pointer alignment
if (anotherMethod((uint8_t *)param1, (uint8_t *)param2))
{
int x = 1 * 2;
return;
}
int fdfd(int* t)
{
return 1;
}
if (*f(xss) < mx)
{
return 1;
}
if (**f(xss) < mx)
{
return 1;
}
if (t * f(xss) < mx)
{
return 1;
}
int* p = (int*)& _mem;
void foo(int a, int c)
{
int* p = (int*)& _mem;
}
void win_ui_flush (bool validate)
{
FOR_ALL_TAB_WINDOWS (tp, wp)
{
if (wp->w_pos_changed && wp->w_grid_alloc.chars != NULL)
{
if (tp == curtab)
{
ui_ext_win_position (wp, validate);
}
else
{
ui_call_win_hide (wp->w_grid_alloc.handle);
wp->w_pos_changed = false;
}
}
if (tp == curtab)
{
ui_ext_win_viewport (wp);
}
}
}
win_T* lastwin_nofloating (void)
{
win_T* res = lastwin;
while (res->w_floating)
{
res = res->w_prev;
}
return res;
}
CPPageFileMediaInfo::CPPageFileMediaInfo(CString path, IFileSourceFilter *pFSF)
: CPropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
, m_fn(path)
, m_path(path)
{
m_futureMIText = std::async(std::launch::async, [ = ]()
{
#if USE_STATIC_MEDIAINFO
MediaInfoLib::String filename = m_path;
MediaInfoLib::MediaInfo MI;
#else
MediaInfoDLL::String filename = m_path;
MediaInfo MI;
#endif
return MI.Inform().c_str();
}).share();
}
Test::Test() : member1(argument)
, member2([this]
{
some_code(argument);
})
, member3(42)
, member4("test")
{
}
struct xxxx
{
int a, b, c;
};
(struct xxxxx *p);
int main(int * p, int *q)
{
return;
}
int main(void)
{
switch (foo)
{
case 1:
a += 1;
break;
case 2:
{
a += 2;
break;
}
}
struct xxxx *p;
printf("sizeof p: %d\n", sizeof p);
int * p, *q;
return 0;
}
mapping someData = ([
"key": "value",
]);
void fn()
{
some_fn(([
"key1": "/path/to/file1.c",
"key2": "/path/to/file2.c",
]));
}
int main()
{
while (true)
{
new int *[5]; // Remove this and everything works fine
if (5 > 2)
{
abc();
for (int i = 0; i < 6; i++)
{
def();
}
}
else
{
xyz();
for (int i = 0; i < 8; i++)
{
xyz();
}
}
}
return 0;
}
struct s
{
public:
inline s() :
size(x),
ia {new int [y]},
ia {new int [y]}
{}
}
#define MY_BITFIELD_WIDTH
typedef struct
{
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
struct
{
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
typedef struct
{
uint32_t member_1 : 8;
uint32_t member_1 : 2;
uint32_t member_2 : 3;
bool (*func) (void);
}
@@ -0,0 +1,271 @@
#include "stdafx.h"
#include <emmintrin.h>
#include <iostream>
// a badly formatted file used for CI regression tests
#ifdef TEST
#endif
using namespace std;
// Function declaration
int add(int a, int b);
// Class definition
class MyClass {
public:
MyClass (int value) : myValue (value ) {}
void display() {
cout << "MyValue: " << myValue << endl;
}
private:
int myValue;
};
int main() {
// Variables and data types
int a, b, c, x, someVal, someVal2, someVal3, someVal4 = 5;
double y, foo, bar = 3.14;
char ch = 'A';
bool isTrue = true;
struct { // Structure declaration
int myNum; // Member (int variable)
string myString; // Member (string variable)
} myStructure; // Structure variable
// Arithmetic operations
int result = x + 2 * (int)y;
cout << "Result: " << result << endl;
// Conditional statement
if (x > 0) {
cout << "x is positive" << endl;
} else {
cout << "x is non-positive" << endl;
}
// Loop
for (int i = 0; i < 5; i++) {
cout << "Iteration " << i + 1 << endl;
}
// Function call
int sum = add(3, 4);
cout << "Sum: " << sum << endl;
// Object creation and method call
MyClass obj(42);
obj.display();
goto label;
label:
MyClass.setA1234( 1 )
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa()
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa( 2 )
.setC12dsdsds( 3 );
if (a=b=c) {
func(a==b==c);
someVal = someVal2 =
someVal3 = someVal4 = 0;
if (x) {
someVal = someVal2 =
someVal3 = someVal4 = 0;
}
}
int x2;
do {
x2 = 1;
} while (func(foo,
bar));
return 0;
}
// Function definition
int add(int a, int b) {
return a + b;
}
// Pointer alignment
if (anotherMethod((uint8_t *)param1, (uint8_t *)param2)) {
int x = 1 * 2;
return;
}
int fdfd(int* t) {
return 1;
}
if (*f(xss) < mx) {
return 1;
}
if (**f(xss) < mx) {
return 1;
}
if (t * f(xss) < mx) {
return 1;
}
int* p = (int*)& _mem;
void foo(int a, int c) {
int* p = (int*)& _mem;
}
void win_ui_flush (bool validate) {
FOR_ALL_TAB_WINDOWS (tp, wp) {
if (wp->w_pos_changed && wp->w_grid_alloc.chars != NULL) {
if (tp == curtab) {
ui_ext_win_position (wp, validate);
} else {
ui_call_win_hide (wp->w_grid_alloc.handle);
wp->w_pos_changed = false;
}
}
if (tp == curtab) {
ui_ext_win_viewport (wp);
}
}
}
win_T* lastwin_nofloating (void) {
win_T* res = lastwin;
while (res->w_floating) {
res = res->w_prev;
}
return res;
}
CPPageFileMediaInfo::CPPageFileMediaInfo(CString path, IFileSourceFilter *pFSF)
: CPropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
, m_fn(path)
, m_path(path) {
m_futureMIText = std::async(std::launch::async, [ = ]() {
#if USE_STATIC_MEDIAINFO
MediaInfoLib::String filename = m_path;
MediaInfoLib::MediaInfo MI;
#else
MediaInfoDLL::String filename = m_path;
MediaInfo MI;
#endif
return MI.Inform().c_str();
}).share();
}
Test::Test() : member1(argument)
, member2([this] {
some_code(argument);
})
, member3(42)
, member4("test") {
}
struct xxxx {
int a, b, c;
};
(struct xxxxx *p);
int main(int * p, int *q) {
return;
}
int main(void) {
switch (foo) {
case 1:
a += 1;
break;
case 2: {
a += 2;
break;
}
}
struct xxxx *p;
printf("sizeof p: %d\n", sizeof p);
int * p, *q;
return 0;
}
mapping someData = ([
"key": "value",
]);
void fn() {
some_fn(([
"key1": "/path/to/file1.c",
"key2": "/path/to/file2.c",
]));
}
int main() {
while (true) {
new int *[5]; // Remove this and everything works fine
if (5 > 2) {
abc();
for (int i = 0; i < 6; i++) {
def();
}
} else {
xyz();
for (int i = 0; i < 8; i++) {
xyz();
}
}
}
return 0;
}
struct s {
public:
inline s() :
size(x),
ia {new int [y]},
ia {new int [y]}
{}
}
#define MY_BITFIELD_WIDTH
typedef struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
typedef struct {
uint32_t member_1 : 8;
uint32_t member_1 : 2;
uint32_t member_2 : 3;
bool (*func) (void);
}
@@ -0,0 +1,280 @@
#include "stdafx.h"
#include <emmintrin.h>
#include <iostream>
// a badly formatted file used for CI regression tests
#ifdef TEST
#endif
using namespace std;
// Function declaration
int add(int a, int b);
// Class definition
class MyClass
{
public:
MyClass (int value) : myValue (value ) {}
void display()
{ cout << "MyValue: " << myValue << endl;
}
private:
int myValue;
};
int main()
{ // Variables and data types
int a, b, c, x, someVal, someVal2, someVal3, someVal4 = 5;
double y, foo, bar = 3.14;
char ch = 'A';
bool isTrue = true;
struct // Structure declaration
{ int myNum; // Member (int variable)
string myString; // Member (string variable)
} myStructure; // Structure variable
// Arithmetic operations
int result = x + 2 * (int)y;
cout << "Result: " << result << endl;
// Conditional statement
if (x > 0)
{ cout << "x is positive" << endl;
}
else
{ cout << "x is non-positive" << endl;
}
// Loop
for (int i = 0; i < 5; i++)
{ cout << "Iteration " << i + 1 << endl;
}
// Function call
int sum = add(3, 4);
cout << "Sum: " << sum << endl;
// Object creation and method call
MyClass obj(42);
obj.display();
goto label;
label:
MyClass.setA1234( 1 )
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa()
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa( 2 )
.setC12dsdsds( 3 );
if (a=b=c)
{ func(a==b==c);
someVal = someVal2 =
someVal3 = someVal4 = 0;
if (x)
{ someVal = someVal2 =
someVal3 = someVal4 = 0;
}
}
int x2;
do
{ x2 = 1;
}
while (func(foo,
bar));
return 0;
}
// Function definition
int add(int a, int b)
{ return a + b;
}
// Pointer alignment
if (anotherMethod((uint8_t *)param1, (uint8_t *)param2))
{ int x = 1 * 2;
return;
}
int fdfd(int* t)
{ return 1;
}
if (*f(xss) < mx)
{ return 1;
}
if (**f(xss) < mx)
{ return 1;
}
if (t * f(xss) < mx)
{ return 1;
}
int* p = (int*)& _mem;
void foo(int a, int c)
{ int* p = (int*)& _mem;
}
void win_ui_flush (bool validate)
{ FOR_ALL_TAB_WINDOWS (tp, wp)
{ if (wp->w_pos_changed && wp->w_grid_alloc.chars != NULL)
{ if (tp == curtab)
{ ui_ext_win_position (wp, validate);
}
else
{ ui_call_win_hide (wp->w_grid_alloc.handle);
wp->w_pos_changed = false;
}
}
if (tp == curtab)
{ ui_ext_win_viewport (wp);
}
}
}
win_T* lastwin_nofloating (void)
{ win_T* res = lastwin;
while (res->w_floating)
{ res = res->w_prev;
}
return res;
}
CPPageFileMediaInfo::CPPageFileMediaInfo(CString path, IFileSourceFilter *pFSF)
: CPropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
, m_fn(path)
, m_path(path)
{ m_futureMIText = std::async(std::launch::async, [ = ]()
{
#if USE_STATIC_MEDIAINFO
MediaInfoLib::String filename = m_path;
MediaInfoLib::MediaInfo MI;
#else
MediaInfoDLL::String filename = m_path;
MediaInfo MI;
#endif
return MI.Inform().c_str();
}).share();
}
Test::Test() : member1(argument)
, member2([this]
{ some_code(argument);
})
, member3(42)
, member4("test")
{
}
struct xxxx
{ int a, b, c;
};
(struct xxxxx *p);
int main(int * p, int *q)
{ return;
}
int main(void)
{
switch (foo)
{ case 1:
a += 1;
break;
case 2:
{ a += 2;
break;
}
}
struct xxxx *p;
printf("sizeof p: %d\n", sizeof p);
int * p, *q;
return 0;
}
mapping someData = ([
"key": "value",
]);
void fn()
{ some_fn(([
"key1": "/path/to/file1.c",
"key2": "/path/to/file2.c",
]));
}
int main()
{ while (true)
{ new int *[5]; // Remove this and everything works fine
if (5 > 2)
{ abc();
for (int i = 0; i < 6; i++)
{ def();
}
}
else
{ xyz();
for (int i = 0; i < 8; i++)
{ xyz();
}
}
}
return 0;
}
struct s
{
public:
inline s() :
size(x),
ia {new int [y]},
ia {new int [y]}
{}
}
#define MY_BITFIELD_WIDTH
typedef struct
{ uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
struct
{ uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
typedef struct
{ uint32_t member_1 : 8;
uint32_t member_1 : 2;
uint32_t member_2 : 3;
bool (*func) (void);
}
@@ -0,0 +1,271 @@
#include "stdafx.h"
#include <emmintrin.h>
#include <iostream>
// a badly formatted file used for CI regression tests
#ifdef TEST
#endif
using namespace std;
// Function declaration
int add(int a, int b);
// Class definition
class MyClass {
public:
MyClass (int value) : myValue (value ) {}
void display() {
cout << "MyValue: " << myValue << endl;
}
private:
int myValue;
};
int main() {
// Variables and data types
int a, b, c, x, someVal, someVal2, someVal3, someVal4 = 5;
double y, foo, bar = 3.14;
char ch = 'A';
bool isTrue = true;
struct { // Structure declaration
int myNum; // Member (int variable)
string myString; // Member (string variable)
} myStructure; // Structure variable
// Arithmetic operations
int result = x + 2 * (int)y;
cout << "Result: " << result << endl;
// Conditional statement
if (x > 0) {
cout << "x is positive" << endl;
} else {
cout << "x is non-positive" << endl;
}
// Loop
for (int i = 0; i < 5; i++) {
cout << "Iteration " << i + 1 << endl;
}
// Function call
int sum = add(3, 4);
cout << "Sum: " << sum << endl;
// Object creation and method call
MyClass obj(42);
obj.display();
goto label;
label:
MyClass.setA1234( 1 )
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa()
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa( 2 )
.setC12dsdsds( 3 );
if (a=b=c) {
func(a==b==c);
someVal = someVal2 =
someVal3 = someVal4 = 0;
if (x) {
someVal = someVal2 =
someVal3 = someVal4 = 0;
}
}
int x2;
do {
x2 = 1;
} while (func(foo,
bar));
return 0;
}
// Function definition
int add(int a, int b) {
return a + b;
}
// Pointer alignment
if (anotherMethod((uint8_t *)param1, (uint8_t *)param2)) {
int x = 1 * 2;
return;
}
int fdfd(int* t) {
return 1;
}
if (*f(xss) < mx) {
return 1;
}
if (**f(xss) < mx) {
return 1;
}
if (t * f(xss) < mx) {
return 1;
}
int* p = (int*)& _mem;
void foo(int a, int c) {
int* p = (int*)& _mem;
}
void win_ui_flush (bool validate) {
FOR_ALL_TAB_WINDOWS (tp, wp) {
if (wp->w_pos_changed && wp->w_grid_alloc.chars != NULL) {
if (tp == curtab) {
ui_ext_win_position (wp, validate);
} else {
ui_call_win_hide (wp->w_grid_alloc.handle);
wp->w_pos_changed = false;
}
}
if (tp == curtab) {
ui_ext_win_viewport (wp);
}
}
}
win_T* lastwin_nofloating (void) {
win_T* res = lastwin;
while (res->w_floating) {
res = res->w_prev;
}
return res;
}
CPPageFileMediaInfo::CPPageFileMediaInfo(CString path, IFileSourceFilter *pFSF)
: CPropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
, m_fn(path)
, m_path(path) {
m_futureMIText = std::async(std::launch::async, [ = ]() {
#if USE_STATIC_MEDIAINFO
MediaInfoLib::String filename = m_path;
MediaInfoLib::MediaInfo MI;
#else
MediaInfoDLL::String filename = m_path;
MediaInfo MI;
#endif
return MI.Inform().c_str();
}).share();
}
Test::Test() : member1(argument)
, member2([this] {
some_code(argument);
})
, member3(42)
, member4("test") {
}
struct xxxx {
int a, b, c;
};
(struct xxxxx *p);
int main(int * p, int *q) {
return;
}
int main(void) {
switch (foo) {
case 1:
a += 1;
break;
case 2: {
a += 2;
break;
}
}
struct xxxx *p;
printf("sizeof p: %d\n", sizeof p);
int * p, *q;
return 0;
}
mapping someData = ([
"key": "value",
]);
void fn() {
some_fn(([
"key1": "/path/to/file1.c",
"key2": "/path/to/file2.c",
]));
}
int main() {
while (true) {
new int *[5]; // Remove this and everything works fine
if (5 > 2) {
abc();
for (int i = 0; i < 6; i++) {
def();
}
} else {
xyz();
for (int i = 0; i < 8; i++) {
xyz();
}
}
}
return 0;
}
struct s {
public:
inline s() :
size(x),
ia {new int [y]},
ia {new int [y]}
{}
}
#define MY_BITFIELD_WIDTH
typedef struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
typedef struct {
uint32_t member_1 : 8;
uint32_t member_1 : 2;
uint32_t member_2 : 3;
bool (*func) (void);
}
@@ -0,0 +1,290 @@
#include "stdafx.h"
#include <emmintrin.h>
#include <iostream>
// a badly formatted file used for CI regression tests
#ifdef TEST
#endif
using namespace std;
// Function declaration
int add(int a, int b);
// Class definition
class MyClass
{
public:
MyClass (int value) : myValue (value ) {}
void display()
{
cout << "MyValue: " << myValue << endl;
}
private:
int myValue;
};
int main()
{
// Variables and data types
int a, b, c, x, someVal, someVal2, someVal3, someVal4 = 5;
double y, foo, bar = 3.14;
char ch = 'A';
bool isTrue = true;
struct { // Structure declaration
int myNum; // Member (int variable)
string myString; // Member (string variable)
} myStructure; // Structure variable
// Arithmetic operations
int result = x + 2 * (int)y;
cout << "Result: " << result << endl;
// Conditional statement
if (x > 0) {
cout << "x is positive" << endl;
} else {
cout << "x is non-positive" << endl;
}
// Loop
for (int i = 0; i < 5; i++) {
cout << "Iteration " << i + 1 << endl;
}
// Function call
int sum = add(3, 4);
cout << "Sum: " << sum << endl;
// Object creation and method call
MyClass obj(42);
obj.display();
goto label;
label:
MyClass.setA1234( 1 )
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa()
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa( 2 )
.setC12dsdsds( 3 );
if (a=b=c) {
func(a==b==c);
someVal = someVal2 =
someVal3 = someVal4 = 0;
if (x) {
someVal = someVal2 =
someVal3 = someVal4 = 0;
}
}
int x2;
do {
x2 = 1;
} while (func(foo,
bar));
return 0;
}
// Function definition
int add(int a, int b)
{
return a + b;
}
// Pointer alignment
if (anotherMethod((uint8_t *)param1, (uint8_t *)param2))
{
int x = 1 * 2;
return;
}
int fdfd(int* t)
{
return 1;
}
if (*f(xss) < mx)
{
return 1;
}
if (**f(xss) < mx)
{
return 1;
}
if (t * f(xss) < mx)
{
return 1;
}
int* p = (int*)& _mem;
void foo(int a, int c)
{
int* p = (int*)& _mem;
}
void win_ui_flush (bool validate)
{
FOR_ALL_TAB_WINDOWS (tp, wp) {
if (wp->w_pos_changed && wp->w_grid_alloc.chars != NULL) {
if (tp == curtab) {
ui_ext_win_position (wp, validate);
} else {
ui_call_win_hide (wp->w_grid_alloc.handle);
wp->w_pos_changed = false;
}
}
if (tp == curtab) {
ui_ext_win_viewport (wp);
}
}
}
win_T* lastwin_nofloating (void)
{
win_T* res = lastwin;
while (res->w_floating) {
res = res->w_prev;
}
return res;
}
CPPageFileMediaInfo::CPPageFileMediaInfo(CString path, IFileSourceFilter *pFSF)
: CPropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
, m_fn(path)
, m_path(path)
{
m_futureMIText = std::async(std::launch::async, [ = ]() {
#if USE_STATIC_MEDIAINFO
MediaInfoLib::String filename = m_path;
MediaInfoLib::MediaInfo MI;
#else
MediaInfoDLL::String filename = m_path;
MediaInfo MI;
#endif
return MI.Inform().c_str();
}).share();
}
Test::Test() : member1(argument)
, member2([this]
{
some_code(argument);
})
, member3(42)
, member4("test")
{
}
struct xxxx {
int a, b, c;
};
(struct xxxxx *p);
int main(int * p, int *q)
{
return;
}
int main(void)
{
switch (foo) {
case 1:
a += 1;
break;
case 2: {
a += 2;
break;
}
}
struct xxxx *p;
printf("sizeof p: %d\n", sizeof p);
int * p, *q;
return 0;
}
mapping someData = ([
"key": "value",
]);
void fn()
{
some_fn(([
"key1": "/path/to/file1.c",
"key2": "/path/to/file2.c",
]));
}
int main()
{
while (true) {
new int *[5]; // Remove this and everything works fine
if (5 > 2) {
abc();
for (int i = 0; i < 6; i++) {
def();
}
} else {
xyz();
for (int i = 0; i < 8; i++) {
xyz();
}
}
}
return 0;
}
struct s {
public:
inline s() :
size(x),
ia {new int [y]},
ia {new int [y]}
{}
}
#define MY_BITFIELD_WIDTH
typedef struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
typedef struct {
uint32_t member_1 : 8;
uint32_t member_1 : 2;
uint32_t member_2 : 3;
bool (*func) (void);
}
@@ -0,0 +1,290 @@
#include "stdafx.h"
#include <emmintrin.h>
#include <iostream>
// a badly formatted file used for CI regression tests
#ifdef TEST
#endif
using namespace std;
// Function declaration
int add(int a, int b);
// Class definition
class MyClass
{
public:
MyClass (int value) : myValue (value ) {}
void display()
{
cout << "MyValue: " << myValue << endl;
}
private:
int myValue;
};
int main()
{
// Variables and data types
int a, b, c, x, someVal, someVal2, someVal3, someVal4 = 5;
double y, foo, bar = 3.14;
char ch = 'A';
bool isTrue = true;
struct { // Structure declaration
int myNum; // Member (int variable)
string myString; // Member (string variable)
} myStructure; // Structure variable
// Arithmetic operations
int result = x + 2 * (int)y;
cout << "Result: " << result << endl;
// Conditional statement
if (x > 0) {
cout << "x is positive" << endl;
} else {
cout << "x is non-positive" << endl;
}
// Loop
for (int i = 0; i < 5; i++) {
cout << "Iteration " << i + 1 << endl;
}
// Function call
int sum = add(3, 4);
cout << "Sum: " << sum << endl;
// Object creation and method call
MyClass obj(42);
obj.display();
goto label;
label:
MyClass.setA1234( 1 )
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa()
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa( 2 )
.setC12dsdsds( 3 );
if (a=b=c) {
func(a==b==c);
someVal = someVal2 =
someVal3 = someVal4 = 0;
if (x) {
someVal = someVal2 =
someVal3 = someVal4 = 0;
}
}
int x2;
do {
x2 = 1;
} while (func(foo,
bar));
return 0;
}
// Function definition
int add(int a, int b)
{
return a + b;
}
// Pointer alignment
if (anotherMethod((uint8_t *)param1, (uint8_t *)param2))
{
int x = 1 * 2;
return;
}
int fdfd(int* t)
{
return 1;
}
if (*f(xss) < mx)
{
return 1;
}
if (**f(xss) < mx)
{
return 1;
}
if (t * f(xss) < mx)
{
return 1;
}
int* p = (int*)& _mem;
void foo(int a, int c)
{
int* p = (int*)& _mem;
}
void win_ui_flush (bool validate)
{
FOR_ALL_TAB_WINDOWS (tp, wp) {
if (wp->w_pos_changed && wp->w_grid_alloc.chars != NULL) {
if (tp == curtab) {
ui_ext_win_position (wp, validate);
} else {
ui_call_win_hide (wp->w_grid_alloc.handle);
wp->w_pos_changed = false;
}
}
if (tp == curtab) {
ui_ext_win_viewport (wp);
}
}
}
win_T* lastwin_nofloating (void)
{
win_T* res = lastwin;
while (res->w_floating) {
res = res->w_prev;
}
return res;
}
CPPageFileMediaInfo::CPPageFileMediaInfo(CString path, IFileSourceFilter *pFSF)
: CPropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
, m_fn(path)
, m_path(path)
{
m_futureMIText = std::async(std::launch::async, [ = ]() {
#if USE_STATIC_MEDIAINFO
MediaInfoLib::String filename = m_path;
MediaInfoLib::MediaInfo MI;
#else
MediaInfoDLL::String filename = m_path;
MediaInfo MI;
#endif
return MI.Inform().c_str();
}).share();
}
Test::Test() : member1(argument)
, member2([this]
{
some_code(argument);
})
, member3(42)
, member4("test")
{
}
struct xxxx {
int a, b, c;
};
(struct xxxxx *p);
int main(int * p, int *q)
{
return;
}
int main(void)
{
switch (foo) {
case 1:
a += 1;
break;
case 2: {
a += 2;
break;
}
}
struct xxxx *p;
printf("sizeof p: %d\n", sizeof p);
int * p, *q;
return 0;
}
mapping someData = ([
"key": "value",
]);
void fn()
{
some_fn(([
"key1": "/path/to/file1.c",
"key2": "/path/to/file2.c",
]));
}
int main()
{
while (true) {
new int *[5]; // Remove this and everything works fine
if (5 > 2) {
abc();
for (int i = 0; i < 6; i++) {
def();
}
} else {
xyz();
for (int i = 0; i < 8; i++) {
xyz();
}
}
}
return 0;
}
struct s {
public:
inline s() :
size(x),
ia {new int [y]},
ia {new int [y]}
{}
}
#define MY_BITFIELD_WIDTH
typedef struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
typedef struct {
uint32_t member_1 : 8;
uint32_t member_1 : 2;
uint32_t member_2 : 3;
bool (*func) (void);
}
@@ -0,0 +1,231 @@
#include "stdafx.h"
#include <emmintrin.h>
#include <iostream>
// a badly formatted file used for CI regression tests
#ifdef TEST
#endif
using namespace std;
// Function declaration
int add(int a, int b);
// Class definition
class MyClass {
public:
MyClass (int value) : myValue (value ) {}
void display() {
cout << "MyValue: " << myValue << endl; }
private:
int myValue; };
int main() {
// Variables and data types
int a, b, c, x, someVal, someVal2, someVal3, someVal4 = 5;
double y, foo, bar = 3.14;
char ch = 'A';
bool isTrue = true;
struct { // Structure declaration
int myNum; // Member (int variable)
string myString; // Member (string variable)
} myStructure; // Structure variable
// Arithmetic operations
int result = x + 2 * (int)y;
cout << "Result: " << result << endl;
// Conditional statement
if (x > 0) {
cout << "x is positive" << endl; }
else {
cout << "x is non-positive" << endl; }
// Loop
for (int i = 0; i < 5; i++) {
cout << "Iteration " << i + 1 << endl; }
// Function call
int sum = add(3, 4);
cout << "Sum: " << sum << endl;
// Object creation and method call
MyClass obj(42);
obj.display();
goto label;
label:
MyClass.setA1234( 1 )
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa()
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa( 2 )
.setC12dsdsds( 3 );
if (a=b=c) {
func(a==b==c);
someVal = someVal2 =
someVal3 = someVal4 = 0;
if (x) {
someVal = someVal2 =
someVal3 = someVal4 = 0; } }
int x2;
do {
x2 = 1; }
while (func(foo,
bar));
return 0; }
// Function definition
int add(int a, int b) {
return a + b; }
// Pointer alignment
if (anotherMethod((uint8_t *)param1, (uint8_t *)param2)) {
int x = 1 * 2;
return; }
int fdfd(int* t) {
return 1; }
if (*f(xss) < mx) {
return 1; }
if (**f(xss) < mx) {
return 1; }
if (t * f(xss) < mx) {
return 1; }
int* p = (int*)& _mem;
void foo(int a, int c) {
int* p = (int*)& _mem; }
void win_ui_flush (bool validate) {
FOR_ALL_TAB_WINDOWS (tp, wp) {
if (wp->w_pos_changed && wp->w_grid_alloc.chars != NULL) {
if (tp == curtab) {
ui_ext_win_position (wp, validate); }
else {
ui_call_win_hide (wp->w_grid_alloc.handle);
wp->w_pos_changed = false; } }
if (tp == curtab) {
ui_ext_win_viewport (wp); } } }
win_T* lastwin_nofloating (void) {
win_T* res = lastwin;
while (res->w_floating) {
res = res->w_prev; }
return res; }
CPPageFileMediaInfo::CPPageFileMediaInfo(CString path, IFileSourceFilter *pFSF)
: CPropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
, m_fn(path)
, m_path(path) {
m_futureMIText = std::async(std::launch::async, [ = ]() {
#if USE_STATIC_MEDIAINFO
MediaInfoLib::String filename = m_path;
MediaInfoLib::MediaInfo MI;
#else
MediaInfoDLL::String filename = m_path;
MediaInfo MI;
#endif
return MI.Inform().c_str(); }).share(); }
Test::Test() : member1(argument)
, member2([this] {
some_code(argument); })
, member3(42)
, member4("test") {}
struct xxxx {
int a, b, c; };
(struct xxxxx *p);
int main(int * p, int *q) {
return; }
int main(void) {
switch (foo) {
case 1:
a += 1;
break;
case 2: {
a += 2;
break; } }
struct xxxx *p;
printf("sizeof p: %d\n", sizeof p);
int * p, *q;
return 0; }
mapping someData = ([
"key": "value",
]);
void fn() {
some_fn(([
"key1": "/path/to/file1.c",
"key2": "/path/to/file2.c",
])); }
int main() {
while (true) {
new int *[5]; // Remove this and everything works fine
if (5 > 2) {
abc();
for (int i = 0; i < 6; i++) {
def(); } }
else {
xyz();
for (int i = 0; i < 8; i++) {
xyz(); } } }
return 0; }
struct s {
public:
inline s() :
size(x),
ia {new int [y] },
ia {new int [y] }
{} }
#define MY_BITFIELD_WIDTH
typedef struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void); }
struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void); }
typedef struct {
uint32_t member_1 : 8;
uint32_t member_1 : 2;
uint32_t member_2 : 3;
bool (*func) (void); }
@@ -0,0 +1,296 @@
#include "stdafx.h"
#include <emmintrin.h>
#include <iostream>
// a badly formatted file used for CI regression tests
#ifdef TEST
#endif
using namespace std;
// Function declaration
int add(int a, int b);
// Class definition
class MyClass
{
public:
MyClass (int value) : myValue (value ) {}
void display()
{
cout << "MyValue: " << myValue << endl;
}
private:
int myValue;
};
int main()
{
// Variables and data types
int a, b, c, x, someVal, someVal2, someVal3, someVal4 = 5;
double y, foo, bar = 3.14;
char ch = 'A';
bool isTrue = true;
struct // Structure declaration
{
int myNum; // Member (int variable)
string myString; // Member (string variable)
} myStructure; // Structure variable
// Arithmetic operations
int result = x + 2 * (int)y;
cout << "Result: " << result << endl;
// Conditional statement
if (x > 0) {
cout << "x is positive" << endl;
} else {
cout << "x is non-positive" << endl;
}
// Loop
for (int i = 0; i < 5; i++) {
cout << "Iteration " << i + 1 << endl;
}
// Function call
int sum = add(3, 4);
cout << "Sum: " << sum << endl;
// Object creation and method call
MyClass obj(42);
obj.display();
goto label;
label:
MyClass.setA1234( 1 )
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa()
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa( 2 )
.setC12dsdsds( 3 );
if (a=b=c) {
func(a==b==c);
someVal = someVal2 =
someVal3 = someVal4 = 0;
if (x) {
someVal = someVal2 =
someVal3 = someVal4 = 0;
}
}
int x2;
do {
x2 = 1;
} while (func(foo,
bar));
return 0;
}
// Function definition
int add(int a, int b)
{
return a + b;
}
// Pointer alignment
if (anotherMethod((uint8_t *)param1, (uint8_t *)param2))
{
int x = 1 * 2;
return;
}
int fdfd(int* t)
{
return 1;
}
if (*f(xss) < mx)
{
return 1;
}
if (**f(xss) < mx)
{
return 1;
}
if (t * f(xss) < mx)
{
return 1;
}
int* p = (int*)& _mem;
void foo(int a, int c)
{
int* p = (int*)& _mem;
}
void win_ui_flush (bool validate)
{
FOR_ALL_TAB_WINDOWS (tp, wp) {
if (wp->w_pos_changed && wp->w_grid_alloc.chars != NULL) {
if (tp == curtab) {
ui_ext_win_position (wp, validate);
} else {
ui_call_win_hide (wp->w_grid_alloc.handle);
wp->w_pos_changed = false;
}
}
if (tp == curtab) {
ui_ext_win_viewport (wp);
}
}
}
win_T* lastwin_nofloating (void)
{
win_T* res = lastwin;
while (res->w_floating) {
res = res->w_prev;
}
return res;
}
CPPageFileMediaInfo::CPPageFileMediaInfo(CString path, IFileSourceFilter *pFSF)
: CPropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
, m_fn(path)
, m_path(path)
{
m_futureMIText = std::async(std::launch::async, [ = ]() {
#if USE_STATIC_MEDIAINFO
MediaInfoLib::String filename = m_path;
MediaInfoLib::MediaInfo MI;
#else
MediaInfoDLL::String filename = m_path;
MediaInfo MI;
#endif
return MI.Inform().c_str();
}).share();
}
Test::Test() : member1(argument)
, member2([this]
{
some_code(argument);
})
, member3(42)
, member4("test")
{
}
struct xxxx
{
int a, b, c;
};
(struct xxxxx *p);
int main(int * p, int *q)
{
return;
}
int main(void)
{
switch (foo) {
case 1:
a += 1;
break;
case 2: {
a += 2;
break;
}
}
struct xxxx *p;
printf("sizeof p: %d\n", sizeof p);
int * p, *q;
return 0;
}
mapping someData = ([
"key": "value",
]);
void fn()
{
some_fn(([
"key1": "/path/to/file1.c",
"key2": "/path/to/file2.c",
]));
}
int main()
{
while (true) {
new int *[5]; // Remove this and everything works fine
if (5 > 2) {
abc();
for (int i = 0; i < 6; i++) {
def();
}
} else {
xyz();
for (int i = 0; i < 8; i++) {
xyz();
}
}
}
return 0;
}
struct s
{
public:
inline s() :
size(x),
ia {new int [y]},
ia {new int [y]}
{}
}
#define MY_BITFIELD_WIDTH
typedef struct
{
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
struct
{
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
typedef struct
{
uint32_t member_1 : 8;
uint32_t member_1 : 2;
uint32_t member_2 : 3;
bool (*func) (void);
}
@@ -0,0 +1,236 @@
#include "stdafx.h"
#include <emmintrin.h>
#include <iostream>
// a badly formatted file used for CI regression tests
#ifdef TEST
#endif
using namespace std;
// Function declaration
int add(int a, int b);
// Class definition
class MyClass
{
public:
MyClass (int value) : myValue (value ) {}
void display()
{ cout << "MyValue: " << myValue << endl; }
private:
int myValue; };
int main()
{ // Variables and data types
int a, b, c, x, someVal, someVal2, someVal3, someVal4 = 5;
double y, foo, bar = 3.14;
char ch = 'A';
bool isTrue = true;
struct // Structure declaration
{ int myNum; // Member (int variable)
string myString; // Member (string variable)
} myStructure; // Structure variable
// Arithmetic operations
int result = x + 2 * (int)y;
cout << "Result: " << result << endl;
// Conditional statement
if (x > 0)
{ cout << "x is positive" << endl; }
else
{ cout << "x is non-positive" << endl; }
// Loop
for (int i = 0; i < 5; i++)
{ cout << "Iteration " << i + 1 << endl; }
// Function call
int sum = add(3, 4);
cout << "Sum: " << sum << endl;
// Object creation and method call
MyClass obj(42);
obj.display();
goto label;
label:
MyClass.setA1234( 1 )
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa()
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa( 2 )
.setC12dsdsds( 3 );
if (a=b=c)
{ func(a==b==c);
someVal = someVal2 =
someVal3 = someVal4 = 0;
if (x)
{ someVal = someVal2 =
someVal3 = someVal4 = 0; } }
int x2;
do
{ x2 = 1; }
while (func(foo,
bar));
return 0; }
// Function definition
int add(int a, int b)
{ return a + b; }
// Pointer alignment
if (anotherMethod((uint8_t *)param1, (uint8_t *)param2))
{ int x = 1 * 2;
return; }
int fdfd(int* t)
{ return 1; }
if (*f(xss) < mx)
{ return 1; }
if (**f(xss) < mx)
{ return 1; }
if (t * f(xss) < mx)
{ return 1; }
int* p = (int*)& _mem;
void foo(int a, int c)
{ int* p = (int*)& _mem; }
void win_ui_flush (bool validate)
{ FOR_ALL_TAB_WINDOWS (tp, wp)
{ if (wp->w_pos_changed && wp->w_grid_alloc.chars != NULL)
{ if (tp == curtab)
{ ui_ext_win_position (wp, validate); }
else
{ ui_call_win_hide (wp->w_grid_alloc.handle);
wp->w_pos_changed = false; } }
if (tp == curtab)
{ ui_ext_win_viewport (wp); } } }
win_T* lastwin_nofloating (void)
{ win_T* res = lastwin;
while (res->w_floating)
{ res = res->w_prev; }
return res; }
CPPageFileMediaInfo::CPPageFileMediaInfo(CString path, IFileSourceFilter *pFSF)
: CPropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
, m_fn(path)
, m_path(path)
{ m_futureMIText = std::async(std::launch::async, [ = ]()
{
#if USE_STATIC_MEDIAINFO
MediaInfoLib::String filename = m_path;
MediaInfoLib::MediaInfo MI;
#else
MediaInfoDLL::String filename = m_path;
MediaInfo MI;
#endif
return MI.Inform().c_str(); }).share(); }
Test::Test() : member1(argument)
, member2([this]
{ some_code(argument); })
, member3(42)
, member4("test")
{}
struct xxxx
{ int a, b, c; };
(struct xxxxx *p);
int main(int * p, int *q)
{ return; }
int main(void)
{
switch (foo)
{ case 1:
a += 1;
break;
case 2:
{ a += 2;
break; } }
struct xxxx *p;
printf("sizeof p: %d\n", sizeof p);
int * p, *q;
return 0; }
mapping someData = ([
"key": "value",
]);
void fn()
{ some_fn(([
"key1": "/path/to/file1.c",
"key2": "/path/to/file2.c",
])); }
int main()
{ while (true)
{ new int *[5]; // Remove this and everything works fine
if (5 > 2)
{ abc();
for (int i = 0; i < 6; i++)
{ def(); } }
else
{ xyz();
for (int i = 0; i < 8; i++)
{ xyz(); } } }
return 0; }
struct s
{
public:
inline s() :
size(x),
ia {new int [y] },
ia {new int [y] }
{} }
#define MY_BITFIELD_WIDTH
typedef struct
{ uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void); }
struct
{ uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void); }
typedef struct
{ uint32_t member_1 : 8;
uint32_t member_1 : 2;
uint32_t member_2 : 3;
bool (*func) (void); }
@@ -0,0 +1,275 @@
#include "stdafx.h"
#include <emmintrin.h>
#include <iostream>
// a badly formatted file used for CI regression tests
#ifdef TEST
#endif
using namespace std;
// Function declaration
int add(int a, int b);
// Class definition
class MyClass {
public:
MyClass (int value) : myValue (value ) {}
void display() {
cout << "MyValue: " << myValue << endl;
}
private:
int myValue;
};
int main() {
// Variables and data types
int a, b, c, x, someVal, someVal2, someVal3, someVal4 = 5;
double y, foo, bar = 3.14;
char ch = 'A';
bool isTrue = true;
struct { // Structure declaration
int myNum; // Member (int variable)
string myString; // Member (string variable)
} myStructure; // Structure variable
// Arithmetic operations
int result = x + 2 * (int)y;
cout << "Result: " << result << endl;
// Conditional statement
if (x > 0) {
cout << "x is positive" << endl;
}
else {
cout << "x is non-positive" << endl;
}
// Loop
for (int i = 0; i < 5; i++) {
cout << "Iteration " << i + 1 << endl;
}
// Function call
int sum = add(3, 4);
cout << "Sum: " << sum << endl;
// Object creation and method call
MyClass obj(42);
obj.display();
goto label;
label:
MyClass.setA1234( 1 )
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa()
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa( 2 )
.setC12dsdsds( 3 );
if (a=b=c) {
func(a==b==c);
someVal = someVal2 =
someVal3 = someVal4 = 0;
if (x) {
someVal = someVal2 =
someVal3 = someVal4 = 0;
}
}
int x2;
do {
x2 = 1;
}
while (func(foo,
bar));
return 0;
}
// Function definition
int add(int a, int b) {
return a + b;
}
// Pointer alignment
if (anotherMethod((uint8_t *)param1, (uint8_t *)param2)) {
int x = 1 * 2;
return;
}
int fdfd(int* t) {
return 1;
}
if (*f(xss) < mx) {
return 1;
}
if (**f(xss) < mx) {
return 1;
}
if (t * f(xss) < mx) {
return 1;
}
int* p = (int*)& _mem;
void foo(int a, int c) {
int* p = (int*)& _mem;
}
void win_ui_flush (bool validate) {
FOR_ALL_TAB_WINDOWS (tp, wp) {
if (wp->w_pos_changed && wp->w_grid_alloc.chars != NULL) {
if (tp == curtab) {
ui_ext_win_position (wp, validate);
}
else {
ui_call_win_hide (wp->w_grid_alloc.handle);
wp->w_pos_changed = false;
}
}
if (tp == curtab) {
ui_ext_win_viewport (wp);
}
}
}
win_T* lastwin_nofloating (void) {
win_T* res = lastwin;
while (res->w_floating) {
res = res->w_prev;
}
return res;
}
CPPageFileMediaInfo::CPPageFileMediaInfo(CString path, IFileSourceFilter *pFSF)
: CPropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
, m_fn(path)
, m_path(path) {
m_futureMIText = std::async(std::launch::async, [ = ]() {
#if USE_STATIC_MEDIAINFO
MediaInfoLib::String filename = m_path;
MediaInfoLib::MediaInfo MI;
#else
MediaInfoDLL::String filename = m_path;
MediaInfo MI;
#endif
return MI.Inform().c_str();
}).share();
}
Test::Test() : member1(argument)
, member2([this] {
some_code(argument);
})
, member3(42)
, member4("test") {
}
struct xxxx {
int a, b, c;
};
(struct xxxxx *p);
int main(int * p, int *q) {
return;
}
int main(void) {
switch (foo) {
case 1:
a += 1;
break;
case 2: {
a += 2;
break;
}
}
struct xxxx *p;
printf("sizeof p: %d\n", sizeof p);
int * p, *q;
return 0;
}
mapping someData = ([
"key": "value",
]);
void fn() {
some_fn(([
"key1": "/path/to/file1.c",
"key2": "/path/to/file2.c",
]));
}
int main() {
while (true) {
new int *[5]; // Remove this and everything works fine
if (5 > 2) {
abc();
for (int i = 0; i < 6; i++) {
def();
}
}
else {
xyz();
for (int i = 0; i < 8; i++) {
xyz();
}
}
}
return 0;
}
struct s {
public:
inline s() :
size(x),
ia {new int [y]},
ia {new int [y]}
{}
}
#define MY_BITFIELD_WIDTH
typedef struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
typedef struct {
uint32_t member_1 : 8;
uint32_t member_1 : 2;
uint32_t member_2 : 3;
bool (*func) (void);
}
@@ -0,0 +1,293 @@
#include "stdafx.h"
#include <emmintrin.h>
#include <iostream>
// a badly formatted file used for CI regression tests
#ifdef TEST
#endif
using namespace std;
// Function declaration
int add(int a, int b);
// Class definition
class MyClass {
public:
MyClass (int value) : myValue (value ) {}
void display()
{
cout << "MyValue: " << myValue << endl;
}
private:
int myValue;
};
int main()
{
// Variables and data types
int a, b, c, x, someVal, someVal2, someVal3, someVal4 = 5;
double y, foo, bar = 3.14;
char ch = 'A';
bool isTrue = true;
struct { // Structure declaration
int myNum; // Member (int variable)
string myString; // Member (string variable)
} myStructure; // Structure variable
// Arithmetic operations
int result = x + 2 * (int)y;
cout << "Result: " << result << endl;
// Conditional statement
if (x > 0) {
cout << "x is positive" << endl;
}
else {
cout << "x is non-positive" << endl;
}
// Loop
for (int i = 0; i < 5; i++) {
cout << "Iteration " << i + 1 << endl;
}
// Function call
int sum = add(3, 4);
cout << "Sum: " << sum << endl;
// Object creation and method call
MyClass obj(42);
obj.display();
goto label;
label:
MyClass.setA1234( 1 )
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa()
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa( 2 )
.setC12dsdsds( 3 );
if (a=b=c) {
func(a==b==c);
someVal = someVal2 =
someVal3 = someVal4 = 0;
if (x) {
someVal = someVal2 =
someVal3 = someVal4 = 0;
}
}
int x2;
do {
x2 = 1;
}
while (func(foo,
bar));
return 0;
}
// Function definition
int add(int a, int b)
{
return a + b;
}
// Pointer alignment
if (anotherMethod((uint8_t *)param1, (uint8_t *)param2))
{
int x = 1 * 2;
return;
}
int fdfd(int* t)
{
return 1;
}
if (*f(xss) < mx)
{
return 1;
}
if (**f(xss) < mx)
{
return 1;
}
if (t * f(xss) < mx)
{
return 1;
}
int* p = (int*)& _mem;
void foo(int a, int c)
{
int* p = (int*)& _mem;
}
void win_ui_flush (bool validate)
{
FOR_ALL_TAB_WINDOWS (tp, wp) {
if (wp->w_pos_changed && wp->w_grid_alloc.chars != NULL) {
if (tp == curtab) {
ui_ext_win_position (wp, validate);
}
else {
ui_call_win_hide (wp->w_grid_alloc.handle);
wp->w_pos_changed = false;
}
}
if (tp == curtab) {
ui_ext_win_viewport (wp);
}
}
}
win_T* lastwin_nofloating (void)
{
win_T* res = lastwin;
while (res->w_floating) {
res = res->w_prev;
}
return res;
}
CPPageFileMediaInfo::CPPageFileMediaInfo(CString path, IFileSourceFilter *pFSF)
: CPropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
, m_fn(path)
, m_path(path)
{
m_futureMIText = std::async(std::launch::async, [ = ]() {
#if USE_STATIC_MEDIAINFO
MediaInfoLib::String filename = m_path;
MediaInfoLib::MediaInfo MI;
#else
MediaInfoDLL::String filename = m_path;
MediaInfo MI;
#endif
return MI.Inform().c_str();
}).share();
}
Test::Test() : member1(argument)
, member2([this]
{
some_code(argument);
})
, member3(42)
, member4("test")
{
}
struct xxxx {
int a, b, c;
};
(struct xxxxx *p);
int main(int * p, int *q)
{
return;
}
int main(void)
{
switch (foo) {
case 1:
a += 1;
break;
case 2: {
a += 2;
break;
}
}
struct xxxx *p;
printf("sizeof p: %d\n", sizeof p);
int * p, *q;
return 0;
}
mapping someData = ([
"key": "value",
]);
void fn()
{
some_fn(([
"key1": "/path/to/file1.c",
"key2": "/path/to/file2.c",
]));
}
int main()
{
while (true) {
new int *[5]; // Remove this and everything works fine
if (5 > 2) {
abc();
for (int i = 0; i < 6; i++) {
def();
}
}
else {
xyz();
for (int i = 0; i < 8; i++) {
xyz();
}
}
}
return 0;
}
struct s {
public:
inline s() :
size(x),
ia {new int [y]},
ia {new int [y]}
{}
}
#define MY_BITFIELD_WIDTH
typedef struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
typedef struct {
uint32_t member_1 : 8;
uint32_t member_1 : 2;
uint32_t member_2 : 3;
bool (*func) (void);
}
@@ -0,0 +1,320 @@
#include "stdafx.h"
#include <emmintrin.h>
#include <iostream>
// a badly formatted file used for CI regression tests
#ifdef TEST
#endif
using namespace std;
// Function declaration
int add(int a, int b);
// Class definition
class MyClass
{
public:
MyClass (int value) : myValue (value ) {}
void display()
{
cout << "MyValue: " << myValue << endl;
}
private:
int myValue;
};
int main()
{
// Variables and data types
int a, b, c, x, someVal, someVal2, someVal3, someVal4 = 5;
double y, foo, bar = 3.14;
char ch = 'A';
bool isTrue = true;
struct // Structure declaration
{
int myNum; // Member (int variable)
string myString; // Member (string variable)
} myStructure; // Structure variable
// Arithmetic operations
int result = x + 2 * (int)y;
cout << "Result: " << result << endl;
// Conditional statement
if (x > 0)
{
cout << "x is positive" << endl;
}
else
{
cout << "x is non-positive" << endl;
}
// Loop
for (int i = 0; i < 5; i++)
{
cout << "Iteration " << i + 1 << endl;
}
// Function call
int sum = add(3, 4);
cout << "Sum: " << sum << endl;
// Object creation and method call
MyClass obj(42);
obj.display();
goto label;
label:
MyClass.setA1234( 1 )
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa()
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa( 2 )
.setC12dsdsds( 3 );
if (a=b=c)
{
func(a==b==c);
someVal = someVal2 =
someVal3 = someVal4 = 0;
if (x)
{
someVal = someVal2 =
someVal3 = someVal4 = 0;
}
}
int x2;
do
{
x2 = 1;
}
while (func(foo,
bar));
return 0;
}
// Function definition
int add(int a, int b)
{
return a + b;
}
// Pointer alignment
if (anotherMethod((uint8_t *)param1, (uint8_t *)param2))
{
int x = 1 * 2;
return;
}
int fdfd(int* t)
{
return 1;
}
if (*f(xss) < mx)
{
return 1;
}
if (**f(xss) < mx)
{
return 1;
}
if (t * f(xss) < mx)
{
return 1;
}
int* p = (int*)& _mem;
void foo(int a, int c)
{
int* p = (int*)& _mem;
}
void win_ui_flush (bool validate)
{
FOR_ALL_TAB_WINDOWS (tp, wp)
{
if (wp->w_pos_changed && wp->w_grid_alloc.chars != NULL)
{
if (tp == curtab)
{
ui_ext_win_position (wp, validate);
}
else
{
ui_call_win_hide (wp->w_grid_alloc.handle);
wp->w_pos_changed = false;
}
}
if (tp == curtab)
{
ui_ext_win_viewport (wp);
}
}
}
win_T* lastwin_nofloating (void)
{
win_T* res = lastwin;
while (res->w_floating)
{
res = res->w_prev;
}
return res;
}
CPPageFileMediaInfo::CPPageFileMediaInfo(CString path, IFileSourceFilter *pFSF)
: CPropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
, m_fn(path)
, m_path(path)
{
m_futureMIText = std::async(std::launch::async, [ = ]()
{
#if USE_STATIC_MEDIAINFO
MediaInfoLib::String filename = m_path;
MediaInfoLib::MediaInfo MI;
#else
MediaInfoDLL::String filename = m_path;
MediaInfo MI;
#endif
return MI.Inform().c_str();
}).share();
}
Test::Test() : member1(argument)
, member2([this]
{
some_code(argument);
})
, member3(42)
, member4("test")
{
}
struct xxxx
{
int a, b, c;
};
(struct xxxxx *p);
int main(int * p, int *q)
{
return;
}
int main(void)
{
switch (foo)
{
case 1:
a += 1;
break;
case 2:
{
a += 2;
break;
}
}
struct xxxx *p;
printf("sizeof p: %d\n", sizeof p);
int * p, *q;
return 0;
}
mapping someData = ([
"key": "value",
]);
void fn()
{
some_fn(([
"key1": "/path/to/file1.c",
"key2": "/path/to/file2.c",
]));
}
int main()
{
while (true)
{
new int *[5]; // Remove this and everything works fine
if (5 > 2)
{
abc();
for (int i = 0; i < 6; i++)
{
def();
}
}
else
{
xyz();
for (int i = 0; i < 8; i++)
{
xyz();
}
}
}
return 0;
}
struct s
{
public:
inline s() :
size(x),
ia {new int [y]},
ia {new int [y]}
{}
}
#define MY_BITFIELD_WIDTH
typedef struct
{
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
struct
{
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
typedef struct
{
uint32_t member_1 : 8;
uint32_t member_1 : 2;
uint32_t member_2 : 3;
bool (*func) (void);
}
@@ -0,0 +1,289 @@
#include "stdafx.h"
#include <emmintrin.h>
#include <iostream>
// a badly formatted file used for CI regression tests
#ifdef TEST
#endif
using namespace std;
// Function declaration
int add(int a, int b);
// Class definition
class MyClass {
public:
MyClass (int value) : myValue (value ) {}
void display()
{
cout << "MyValue: " << myValue << endl;
}
private:
int myValue;
};
int main()
{
// Variables and data types
int a, b, c, x, someVal, someVal2, someVal3, someVal4 = 5;
double y, foo, bar = 3.14;
char ch = 'A';
bool isTrue = true;
struct { // Structure declaration
int myNum; // Member (int variable)
string myString; // Member (string variable)
} myStructure; // Structure variable
// Arithmetic operations
int result = x + 2 * (int)y;
cout << "Result: " << result << endl;
// Conditional statement
if (x > 0) {
cout << "x is positive" << endl;
} else {
cout << "x is non-positive" << endl;
}
// Loop
for (int i = 0; i < 5; i++) {
cout << "Iteration " << i + 1 << endl;
}
// Function call
int sum = add(3, 4);
cout << "Sum: " << sum << endl;
// Object creation and method call
MyClass obj(42);
obj.display();
goto label;
label:
MyClass.setA1234( 1 )
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa()
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa( 2 )
.setC12dsdsds( 3 );
if (a=b=c) {
func(a==b==c);
someVal = someVal2 =
someVal3 = someVal4 = 0;
if (x) {
someVal = someVal2 =
someVal3 = someVal4 = 0;
}
}
int x2;
do {
x2 = 1;
} while (func(foo,
bar));
return 0;
}
// Function definition
int add(int a, int b)
{
return a + b;
}
// Pointer alignment
if (anotherMethod((uint8_t *)param1, (uint8_t *)param2))
{
int x = 1 * 2;
return;
}
int fdfd(int* t)
{
return 1;
}
if (*f(xss) < mx)
{
return 1;
}
if (**f(xss) < mx)
{
return 1;
}
if (t * f(xss) < mx)
{
return 1;
}
int* p = (int*)& _mem;
void foo(int a, int c)
{
int* p = (int*)& _mem;
}
void win_ui_flush (bool validate)
{
FOR_ALL_TAB_WINDOWS (tp, wp) {
if (wp->w_pos_changed && wp->w_grid_alloc.chars != NULL) {
if (tp == curtab) {
ui_ext_win_position (wp, validate);
} else {
ui_call_win_hide (wp->w_grid_alloc.handle);
wp->w_pos_changed = false;
}
}
if (tp == curtab) {
ui_ext_win_viewport (wp);
}
}
}
win_T* lastwin_nofloating (void)
{
win_T* res = lastwin;
while (res->w_floating) {
res = res->w_prev;
}
return res;
}
CPPageFileMediaInfo::CPPageFileMediaInfo(CString path, IFileSourceFilter *pFSF)
: CPropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
, m_fn(path)
, m_path(path)
{
m_futureMIText = std::async(std::launch::async, [ = ]() {
#if USE_STATIC_MEDIAINFO
MediaInfoLib::String filename = m_path;
MediaInfoLib::MediaInfo MI;
#else
MediaInfoDLL::String filename = m_path;
MediaInfo MI;
#endif
return MI.Inform().c_str();
}).share();
}
Test::Test() : member1(argument)
, member2([this]
{
some_code(argument);
})
, member3(42)
, member4("test")
{
}
struct xxxx {
int a, b, c;
};
(struct xxxxx *p);
int main(int * p, int *q)
{
return;
}
int main(void)
{
switch (foo) {
case 1:
a += 1;
break;
case 2: {
a += 2;
break;
}
}
struct xxxx *p;
printf("sizeof p: %d\n", sizeof p);
int * p, *q;
return 0;
}
mapping someData = ([
"key": "value",
]);
void fn()
{
some_fn(([
"key1": "/path/to/file1.c",
"key2": "/path/to/file2.c",
]));
}
int main()
{
while (true) {
new int *[5]; // Remove this and everything works fine
if (5 > 2) {
abc();
for (int i = 0; i < 6; i++) {
def();
}
} else {
xyz();
for (int i = 0; i < 8; i++) {
xyz();
}
}
}
return 0;
}
struct s {
public:
inline s() :
size(x),
ia {new int [y]},
ia {new int [y]}
{}
}
#define MY_BITFIELD_WIDTH
typedef struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
typedef struct {
uint32_t member_1 : 8;
uint32_t member_1 : 2;
uint32_t member_2 : 3;
bool (*func) (void);
}
@@ -0,0 +1,320 @@
#include "stdafx.h"
#include <emmintrin.h>
#include <iostream>
// a badly formatted file used for CI regression tests
#ifdef TEST
#endif
using namespace std;
// Function declaration
int add(int a, int b);
// Class definition
class MyClass
{
public:
MyClass (int value) : myValue (value ) {}
void display()
{
cout << "MyValue: " << myValue << endl;
}
private:
int myValue;
};
int main()
{
// Variables and data types
int a, b, c, x, someVal, someVal2, someVal3, someVal4 = 5;
double y, foo, bar = 3.14;
char ch = 'A';
bool isTrue = true;
struct // Structure declaration
{
int myNum; // Member (int variable)
string myString; // Member (string variable)
} myStructure; // Structure variable
// Arithmetic operations
int result = x + 2 * (int)y;
cout << "Result: " << result << endl;
// Conditional statement
if (x > 0)
{
cout << "x is positive" << endl;
}
else
{
cout << "x is non-positive" << endl;
}
// Loop
for (int i = 0; i < 5; i++)
{
cout << "Iteration " << i + 1 << endl;
}
// Function call
int sum = add(3, 4);
cout << "Sum: " << sum << endl;
// Object creation and method call
MyClass obj(42);
obj.display();
goto label;
label:
MyClass.setA1234( 1 )
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa()
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa( 2 )
.setC12dsdsds( 3 );
if (a=b=c)
{
func(a==b==c);
someVal = someVal2 =
someVal3 = someVal4 = 0;
if (x)
{
someVal = someVal2 =
someVal3 = someVal4 = 0;
}
}
int x2;
do
{
x2 = 1;
}
while (func(foo,
bar));
return 0;
}
// Function definition
int add(int a, int b)
{
return a + b;
}
// Pointer alignment
if (anotherMethod((uint8_t *)param1, (uint8_t *)param2))
{
int x = 1 * 2;
return;
}
int fdfd(int* t)
{
return 1;
}
if (*f(xss) < mx)
{
return 1;
}
if (**f(xss) < mx)
{
return 1;
}
if (t * f(xss) < mx)
{
return 1;
}
int* p = (int*)& _mem;
void foo(int a, int c)
{
int* p = (int*)& _mem;
}
void win_ui_flush (bool validate)
{
FOR_ALL_TAB_WINDOWS (tp, wp)
{
if (wp->w_pos_changed && wp->w_grid_alloc.chars != NULL)
{
if (tp == curtab)
{
ui_ext_win_position (wp, validate);
}
else
{
ui_call_win_hide (wp->w_grid_alloc.handle);
wp->w_pos_changed = false;
}
}
if (tp == curtab)
{
ui_ext_win_viewport (wp);
}
}
}
win_T* lastwin_nofloating (void)
{
win_T* res = lastwin;
while (res->w_floating)
{
res = res->w_prev;
}
return res;
}
CPPageFileMediaInfo::CPPageFileMediaInfo(CString path, IFileSourceFilter *pFSF)
: CPropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
, m_fn(path)
, m_path(path)
{
m_futureMIText = std::async(std::launch::async, [ = ]()
{
#if USE_STATIC_MEDIAINFO
MediaInfoLib::String filename = m_path;
MediaInfoLib::MediaInfo MI;
#else
MediaInfoDLL::String filename = m_path;
MediaInfo MI;
#endif
return MI.Inform().c_str();
}).share();
}
Test::Test() : member1(argument)
, member2([this]
{
some_code(argument);
})
, member3(42)
, member4("test")
{
}
struct xxxx
{
int a, b, c;
};
(struct xxxxx *p);
int main(int * p, int *q)
{
return;
}
int main(void)
{
switch (foo)
{
case 1:
a += 1;
break;
case 2:
{
a += 2;
break;
}
}
struct xxxx *p;
printf("sizeof p: %d\n", sizeof p);
int * p, *q;
return 0;
}
mapping someData = ([
"key": "value",
]);
void fn()
{
some_fn(([
"key1": "/path/to/file1.c",
"key2": "/path/to/file2.c",
]));
}
int main()
{
while (true)
{
new int *[5]; // Remove this and everything works fine
if (5 > 2)
{
abc();
for (int i = 0; i < 6; i++)
{
def();
}
}
else
{
xyz();
for (int i = 0; i < 8; i++)
{
xyz();
}
}
}
return 0;
}
struct s
{
public:
inline s() :
size(x),
ia {new int [y]},
ia {new int [y]}
{}
}
#define MY_BITFIELD_WIDTH
typedef struct
{
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
struct
{
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
typedef struct
{
uint32_t member_1 : 8;
uint32_t member_1 : 2;
uint32_t member_2 : 3;
bool (*func) (void);
}
+293
View File
@@ -0,0 +1,293 @@
#include "stdafx.h"
#include <emmintrin.h>
#include <iostream>
// a badly formatted file used for CI regression tests
#ifdef TEST
#endif
using namespace std;
// Function declaration
int add(int a, int b);
// Class definition
class MyClass {
public:
MyClass (int value) : myValue (value ) {}
void display() {
cout << "MyValue: " << myValue << endl;
}
private:
int myValue;
};
int main() {
// Variables and data types
int a, b, c, x, someVal, someVal2, someVal3, someVal4 = 5;
double y, foo, bar = 3.14;
char ch = 'A';
bool isTrue = true;
struct { // Structure declaration
int myNum; // Member (int variable)
string myString; // Member (string variable)
} myStructure; // Structure variable
// Arithmetic operations
int result = x + 2 * (int)y;
cout << "Result: " << result << endl;
// Conditional statement
if (x > 0) {
cout << "x is positive" << endl;
} else {
cout << "x is non-positive" << endl;
}
// Loop
for (int i = 0; i < 5; i++) {
cout << "Iteration " << i + 1 << endl;
}
// Function call
int sum = add(3, 4);
cout << "Sum: " << sum << endl;
// Object creation and method call
MyClass obj(42);
obj.display();
goto label;
label:
MyClass.setA1234( 1 )
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa()
.setB12dsadasdasdsa( 2 )
.setB12dsadasdasdsa( 2 )
.setC12dsdsds( 3 );
if (a=b=c) {
func(a==b==c);
someVal = someVal2 =
someVal3 = someVal4 = 0;
if (x) {
someVal = someVal2 =
someVal3 = someVal4 = 0;
}
}
int x2;
do
{
x2 = 1;
} while (func(foo,
bar));
return 0;
}
// Function definition
int add(int a, int b) {
return a + b;
}
// Pointer alignment
if (anotherMethod((uint8_t *)param1, (uint8_t *)param2)) {
int x = 1 * 2;
return;
}
int fdfd(int* t) {
return 1;
}
if (*f(xss) < mx) {
return 1;
}
if (**f(xss) < mx) {
return 1;
}
if (t * f(xss) < mx) {
return 1;
}
int* p = (int*)& _mem;
void foo(int a, int c)
{
int* p = (int*)& _mem;
}
void win_ui_flush (bool validate)
{
FOR_ALL_TAB_WINDOWS (tp, wp) {
if (wp->w_pos_changed && wp->w_grid_alloc.chars != NULL) {
if (tp == curtab) {
ui_ext_win_position (wp, validate);
} else {
ui_call_win_hide (wp->w_grid_alloc.handle);
wp->w_pos_changed = false;
}
}
if (tp == curtab) {
ui_ext_win_viewport (wp);
}
}
}
win_T* lastwin_nofloating (void)
{
win_T* res = lastwin;
while (res->w_floating) {
res = res->w_prev;
}
return res;
}
CPPageFileMediaInfo::CPPageFileMediaInfo(CString path, IFileSourceFilter *pFSF)
: CPropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
, m_fn(path)
, m_path(path)
{ m_futureMIText = std::async(std::launch::async, [ = ]()
{
#if USE_STATIC_MEDIAINFO
MediaInfoLib::String filename = m_path;
MediaInfoLib::MediaInfo MI;
#else
MediaInfoDLL::String filename = m_path;
MediaInfo MI;
#endif
return MI.Inform().c_str();
}).share();
}
Test::Test() : member1(argument)
, member2([this] {
some_code(argument);
})
, member3(42)
, member4("test")
{
}
struct xxxx {
int a, b, c;
};
(struct xxxxx *p);
int main(int * p, int *q)
{
return;
}
int main(void)
{
switch (foo) {
case 1:
a += 1;
break;
case 2: {
a += 2;
break;
}
}
struct xxxx *p;
printf("sizeof p: %d\n", sizeof p);
int * p, *q;
return 0;
}
mapping someData = ([
"key": "value",
]);
void fn() {
some_fn(([
"key1": "/path/to/file1.c",
"key2": "/path/to/file2.c",
]));
}
int main() {
while (true) {
new int *[5]; // Remove this and everything works fine
if (5 > 2) {
abc();
for (int i = 0; i < 6; i++) {
def();
}
} else {
xyz();
for (int i = 0; i < 8; i++) {
xyz();
}
}
}
return 0;
}
struct s {
public:
inline s() :
size(x),
ia {new int [y]},
ia {new int [y]}
{}
}
#define MY_BITFIELD_WIDTH
typedef struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
struct {
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_1 : MY_BITFIELD_WIDTH;
uint32_t member_2 : MY_BITFIELD_WIDTH;
bool (*func) (void);
}
typedef struct {
uint32_t member_1 : 8;
uint32_t member_1 : 2;
uint32_t member_2 : 3;
bool (*func) (void);
}
+10
View File
@@ -0,0 +1,10 @@
cmake_minimum_required(VERSION 3.8)
project(astyle CXX)
add_subdirectory( AStyle )
# Only attempt to build wxWidgets if found
find_package(wxWidgets)
if (wxWidgets_FOUND)
add_subdirectory( AStyleWx )
endif ()
+16
View File
@@ -0,0 +1,16 @@
= Artistic Style
Artistic Style is a source code indenter, formatter, and beautifier for the C, pass:[C++], pass:[C++]/CLI, Objective‑C, C# and Java programming languages.
Written in pass:[C++], it can be used from the command line or incorporated as a library in another program.
Options can be entered from the command line or from an option file.
The library version can be called from programs written in languages other than pass:[C++].
== Repositories
The home of Artistic Style is http://sourceforge.net/projects/astyle/. As nowadays git is more accepted for collaborate development, this git repo is used for day to day development and pull requests.
The SVN repo and download section at SF.net will be updated regularly.
== Maintainers
Artistic Style is maintained and updated by Andre Simon.
Previous maintainer: Jim Pattee. The original author was Tal Davidson, Israel.