diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..68fd6d64 --- /dev/null +++ b/.gitignore @@ -0,0 +1,58 @@ +# Uncomment these types if you want even more clean repository. But be careful. +# It can make harm to an existing project source. Read explanations below. +# +# Resource files are binaries containing manifest, project icon and version info. +# They can not be viewed as text or compared by diff-tools. Consider replacing them with .rc files. +#*.res +# +# Type library file (binary). In old Delphi versions it should be stored. +# Since Delphi 2009 it is produced from .ridl file and can safely be ignored. +#*.tlb +# +# Diagram Portfolio file. Used by the diagram editor up to Delphi 7. +# Uncomment this if you are not using diagrams or use newer Delphi version. +#*.ddp +# +# Visual LiveBindings file. Added in Delphi XE2. +# Uncomment this if you are not using LiveBindings Designer. +#*.vlb +# +# Deployment Manager configuration file for your project. Added in Delphi XE2. +# Uncomment this if it is not mobile development and you do not use remote debug feature. +#*.deployproj +# + +# Delphi compiler-generated binaries (safe to delete) +#*.exe +*.dll +*.bpl +*.bpi +*.dcp +*.so +*.apk +*.drc +*.map +*.dres +*.rsm +*.tds +*.dcu +*.lib + +# Delphi autogenerated files (duplicated info) +*.cfg +*Resource.rc +*.res + +# Delphi local files (user-specific info) +*.local +*.identcache +*.projdata +*.tvsconfig +*.dsk +*.dproj + +# Delphi history and backups +__history/ +*.~* +MinGW64 +devcpp.exe diff --git a/AStyle/AStyle.exe b/AStyle/AStyle.exe new file mode 100644 index 00000000..2dc842c2 Binary files /dev/null and b/AStyle/AStyle.exe differ diff --git a/AStyle/doc/LICENSE.md b/AStyle/doc/LICENSE.md new file mode 100644 index 00000000..906a35d0 --- /dev/null +++ b/AStyle/doc/LICENSE.md @@ -0,0 +1,21 @@ +### MIT License + +Copyright (c) 2018 by Jim Pattee . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/AStyle/doc/astyle.html b/AStyle/doc/astyle.html new file mode 100644 index 00000000..dbf1ad75 --- /dev/null +++ b/AStyle/doc/astyle.html @@ -0,0 +1,2479 @@ + + + + + + Artistic Style + + + + + + + + + + + + + + + + + + + + + +

Artistic Style 3.1

+ +

+ A Free, Fast, and Small Automatic Formatter
+ for C, C++, C++/CLI, Objective‑C, C#, and Java Source Code +

+ +

Contents

+ +

+ General Information

+

+ Quick Start

+

+ Usage

+

+ Options

+

+ Option Files

+

+ Disable Formatting

+

+ Basic Brace Styles

+

+ Brace Style Options

+

+ default brace style    + style=allman    + style=java    + style=kr    + style=stroustrup    + style=whitesmith    + style=vtk    + style=ratliff    + style=gnu    + style=linux    + style=horstmann    + style=1tbs    + style=google    + style=mozilla    + style=pico    + style=lisp    +

+

+ Tab Options

+

+ default indent    + indent=spaces    + indent=tab    + indent=force‑tab    + --indent=force‑tab‑x    +

+

+ Brace Modify Options

+

+ attach‑namespaces    + attach‑classes    + attach‑inlines    + attach‑extern‑c    + attach‑closing‑while    +

+

+ Indentation Options

+

+ indent‑classes    + indent‑modifiers    + indent‑switches    + indent‑cases    + indent‑namespaces    + indent‑after‑parens    + indent‑continuation    + indent‑labels    + indent‑preproc‑block    + indent‑preproc‑define    + indent‑preproc‑cond    + indent‑col1‑comments    + min‑conditional‑indent    + max‑continuation‑indent    +

+

+ Padding Options

+

+ break‑blocks    + break‑blocks=all    + pad‑oper    + pad‑comma    + pad‑paren    + pad‑paren‑out    + pad‑first‑paren‑out    + pad‑paren‑in    + pad‑header    + unpad‑paren    + delete‑empty‑lines    + fill‑empty‑lines    + align‑pointer    + align‑reference    +

+

+ Formatting Options

+

+ break‑closing‑braces    + break‑elseifs    + break‑one‑line‑headers    + add‑braces    + add‑one‑line‑braces    + remove‑braces    + break‑return‑type    + attach‑return‑type    + keep‑one‑line‑blocks    + keep‑one‑line‑statements    + convert‑tabs    + close‑templates    + remove‑comment‑prefix    + max‑code‑length    + break‑after‑logical    + mode    +

+

+ Objective‑C Options

+

+ pad‑method‑prefix    + unpad‑method‑prefix    + pad‑return‑type    + unpad‑return‑type    + pad‑param‑type    + unpad‑param‑type    + align‑method‑colon    + pad‑method‑colon    +

+

+ Other Options   

+

+ suffix    suffix=none    + recursive    + dry-run    + exclude    + ignore‑exclude‑errors    + ignore‑exclude‑errors‑x    + errors‑to‑stdout    + preserve‑date    + verbose    + formatted    + quiet    + lineend    +

+

+ Command Line Only

+

+ options    + project    + ascii    + version    + help    + html    + html=    + stdin=    + stdout=    +

+

+  

+
+ + + +

General Information

+ +

Line Endings

+ +

+ Line endings in the formatted file will be the same as the input file. If there are mixed line endings the most + frequent occurrence will be used. There is also an option to specify or change the line endings.

+ +

File Type

+ +

+ Artistic Style will determine the file type from the file extension. The extension ".java" indicates a Java file, + and ".cs" indicates a C# file. Everything else is a C type file (C, C++, C++/CLI, or Objective-C). If you are + using a non-standard file extension for Java or C#, use one of the --mode= options.

+ +

Wildcards and Recursion

+ +

+ Artistic Style can process directories recursively. Wildcards (such as "*.cpp" or "*.c??") are processed internally. + If a shell is used, it should pass the wildcards to Artistic Style instead of resolving them first. For Linux + use double quotes around paths whose file name contains wildcards. For Windows use double quotes around paths + whose file name contains spaces. The recursive option in the + Other Options section contains information on recursive processing.

+ +

File Names

+ +

+ When a file is formatted, the newly indented file retains the original file name. A copy of the original file + is created with an .orig appended to the original file name. (This can be set to + a different string by the option --suffix=, or suppressed altogether by the options -n + or --suffix=none). Thus, after indenting SourceFile.cpp the indented file will + be named SourceFile.cpp, while the original pre-indented file will be renamed to + SourceFile.cpp.orig.

+ +

Internationalization

+ +

+ Artistic Style has been internationalized to process files and directories in any language.

+

+ It has also been translated into several languages. The translation to use is determined by the User Locale + for Windows and the LANG environment variable for other systems. The translation will be done automatically from + these settings. If no translation is available it will default to English. There is an "ascii" option to use English + instead of the system language.

+

+ The source code for the translations is at the end of ASLocalizer.cpp in the form of an English‑Translation + pair. If you make corrections to a translation, send the source as a bug report and it will be included in the + next release.

+

+ To add a new language, add a new translation class to ASLocalizer.h. Add the English‑Translation pair to + the constructor in ASLocalizer.cpp. Update the WinLangCode array and add the language code to the function setTranslationClass(). + The ASLocalizer.cpp program contains comments that give web pages for obtaining the LCIDs and language codes. + Send the source code as a bug report and it will be included in the next release.

+ +

Other Considerations

+ +

+ The names of special characters used in programming vary by region. The terminology used by Artistic Style, + followed by other common names, is:

+
+ braces or curly braces { } ‑ also called brackets, or curly brackets.
+ parens or round brackets ( ) ‑ also called parentheses, brackets, circle brackets, or soft brackets.
+ square brackets [ ] ‑ also called block parens, brackets, closed brackets, or hard brackets.
+ angle brackets < > ‑ also called brackets, pointy brackets, triangular brackets, diamond brackets, tuples, + or chevrons. +
+

+ Visual Studio, and possibly other development environments, has extensions that will align assignment operators + across multiple lines. There is an extension named "Code alignment" that will align the code on other items as + well. Formatting with these options and extensions can be used with Artistic Style. The space padding will be + maintained and the alignment will be preserved.

+

+ Artistic Style can format standard class library statements such as Open GL, wxWidgets, Qt, and MFC.

+

+ Embedded assembler language is formatted correctly. This includes extended assembly and Microsoft specific assembler + lines and blocks.

+

+ Artistic Style can format embedded SQL statements. The SQL formatting will be maintained as long as the standard + hanging indent format is used. If the "exec sql" statement is indented more than the following statements, the + SQL will be aligned in a single column.

+

+ Unicode files encoded as UTF‑16, both big and little endian, will be formatted. The files must begin with + a byte order mark (BOM) to be recognized. Files encoded as UTF‑32 will be rejected. Some compilers do not + support these encodings. These files can be converted to UTF‑8 encoding with the program "iconv". There + are Linux and Windows versions available (the Windows version does not seem to work for all encodings). Visual + Studio can convert the files from the "File > Advanced Save Options" menu. There are other development environments + and text editors, such as SciTE, that can convert files to UTF‑8.

+

+ Embedded statements that are multiple-line and are NOT in a C-type format, such as Python, are usually mal-formatted + (a C-type format has blocks enclosed by braces and statements terminated by a semi-colon). Macros that define + functions may cause the following code to be mal-formatted because the macro is missing the braces and semi-colons + from the definition. If you have source code with these types of statements, exclude them with the + exclude=#### option described in the Other Options + section.

+

+  

+
+ + + +

Quick Start

+ +

+ If you have never used Artistic Style, there are several of ways to get started.

+

+ One is to run it with no options at all. This will use the default brace + style, 4 spaces per indent, and no formatting changes. This will break the braces for one + line blocks and will break one line statements. To change this, use the option keep-one-line-blocks + and/or keep-one-line-statements described in the + Formatting Options section.

+

+ Another way is to use one of the brace styles described in the Brace Style + Options section. Select one with a brace formatting style you like. If no indentation option is set, + the default option of 4 spaces will be used. These options also break one line blocks and one line statements + as described above.

+

+ A third option is to use an options file from the "file" folder. If there is a coding style you want + to duplicate, input the appropriate option file. Use the option + options=#### to specify the file to use. It must contain a path for the file, including + the file name.

+

+ Once you are familiar with the options you can customize the format to your personal preference.

+

+  

+
+ + + +

Usage

+ +

Command Line

+ +

+ Artistic style is a console program that receives information from the command line.

+
+

+ Command line format:

+
astyle  [OPTIONS]  SourceFilePath1  SourceFilePath2  SourceFilePath3  [ . . . ]
+
+

+ The square brackets [ ] indicate that more than one option or more than one file name can be entered. They are + NOT actually included in the command. For the options format refer to the following Options section.

+
+

+ Example to format a single file:

+
astyle  --style=allman  /home/project/foo.cpp
+
+

+ Example to format C# files recursively:

+
astyle  --style=allman  --recursive  /home/project/*.cs
+
+
+ +

File Extensions

+ +

+ Multiple file extensions may be used if separated by commas or semicolons. An optional space may follow if the + entire file path is enclosed in double quotes. There is no limit to the number of extensions used. +

+
+

+ Example to format C++ files recursively using multiple file extensions:

+
astyle  --style=allman  --recursive  /home/project/*.cpp,*.h
+
+
+ +

Redirection

+ +

+ The < and > characters may be used to redirect the files into standard input (stdin) and out of standard output + (stdout) - don't forget them! With this option, only one file at a time can be formatted. Wildcards are not + recognized, there are no console messages, and a backup is not created. On Windows, the output will always have + Windows line ends. The options "stdin=" and "stdout=" can be used instead of redirection.

+
+

+ Example of redirection option to format a single file and change the name:

+
astyle --style=allman < OriginalSourceFile > BeautifiedSourceFile
+
+

+ Example of redirection using "stdin=" and "stdout=" to format a single file and change the name:

+
astyle --style=allman --stdin=OriginalSourceFile --stdout=BeautifiedSourceFile
+
+
+
+

+ The redirection option may be used to display the formatted file without updating:

+
astyle --style=allman < OriginalSourceFile | less
+
+
+

+  

+
+ + + +

Options

+ +

+ Not specifying any options will result in the default brace style, + 4 spaces per indent, and no formatting changes.

+

+ This program follows the usual GNU command line syntax. Options may be written two different ways.

+ +

Long options

+ +

+ These options start with '--', and must be written one at a time.
+ (Example: '--style=allman --indent=spaces=4')

+ +

Short Options

+ +

+ These options start with a single '-', and may be concatenated together.
+ (Example: '-bps4' is the same as writing '-b -p -s4'.)

+

+  

+
+ + + +

Option Files

+ +

+ An OPTIONAL default option file and/or project option file may be used to supplement or replace the command + line options. They may use the computer's standard encoding, UTF-8 or UTF-16 unicode encoding.

+

+ Options may be set apart by new-lines, tabs, commas, or spaces. Long options in the option file may be written + without the preceding '--'. Lines within the option file that begin with '#' are considered line-comments. + The option files used in formatting and their location can be displayed by using the --verbose + option.

+
    +
  1. The command line options have precedence. If there is a conflict between a command line option + and an option in a default or project file, the command line option will be used. +
  2. +
  3. The project option file has precedence over the default option file but not the command line + options. The project option file should be in the top directory of the project being formatted. The file is identified + by a file name only. One of the command line project options must be used to indicate + a file is available, or it must be referred to by the environment variable. Artistic Style looks for the file + in the current directory or one of its parent directories in the following order. +
      +
    • the file name indicated by the --project= command line option.
    • +
    • the file named .astylerc or _ astylerc.
    • +
    • the file name identified by the environment variable ARTISTIC_STYLE_PROJECT_OPTIONS if it exists.
    • +
    • the file or environment variable can be disabled by specifying --project=none on the command line.
    • +
    + The file is expected to be in the top directory of the project being formatted. Only one file will be used per + execution and all files to be formatted are assumed to be in the same project. Artistic Style will search + backward in the directory path to find the project option file. The initial directory path for the search is obtained + from one of the following locations in the following order. +
      +
    • The first SourceFilePath entered on the command line.
    • +
    • The value of "--stdin=" if it is used for redirection.
    • +
    • The current directory if "<" is used for rediredction. If the file to be formatted is not in the current + directory, use the "--stdin=" option instead.
    • +
    +
  4. +
  5. The default option file can be used for all projects. The file is identified by a file path and + a file name. One of the command line options must be used to indicate a file is available, + or it must be referred to by the environment variable. Artistic Style looks for a file path and file name in the + following order. +
      +
    • the file path indicated by the --options= command line option.
    • +
    • the file path indicated by the environment variable ARTISTIC_STYLE_OPTIONS if it exists.
    • +
    • the file named .astylerc in the directory pointed to by the HOME environment variable + (e.g. "$HOME/.astylerc" on Linux);
    • +
    • the file named astylerc in the directory pointed to by the APPDATA environment variable + (e.g. "%APPDATA%\astylerc" on Windows).
    • +
    • the file or environment variable can be disabled by specifying --options=none on the command line.
    • +
    +
  6. +
+

+ Example of a default or project option file:

+
+
# this line is a comment
+--style=allman      # this is a line-end comment
+# long options can be written without the preceding '--'
+indent-switches     # cannot do this on the command line
+# short options must have the preceding '-'
+-t -p
+# short options can be concatenated together
+-M60Ucv
+
+

+  

+ +
+ + + +

Disable Formatting

+ +

+ Formatting and indenting can be disabled with comment tags inserted in the source code.

+ +

Disable Block

+ +

+ Blocks of code can be disabled using "off" and "on" tags. The tags are included in the source + file as comments. The comment may be a C comment (/* ... */) or a C++ line comment (//). The tag must be included + in a single line comment. If the comment exceeds one line the indent tag will be ignored. Additional information + can be included with the tag.

+

+ The beginning tag is "*INDENT-OFF*" and the ending tag is "*INDENT-ON*". + They may be used anywhere in the program with the condition that parsing is partially disabled between the + tags. Disabling partial statements may result in incorrect formatting after the ending tag. If this happens, + expand the tags to include additional code.

+
+

+ The following retains the format of a preprocessor define:

+
// *INDENT-OFF*
+#define FOO_DECLARE_int32_(name) \
+        FOO_API_ extern ::Int32 FOO_FLAG(name)
+// *INDENT-ON*
+
+ +

Disable Line

+ +

+ Artistic Style cannot always determine the usage of symbols with more than one meaning. For example an asterisk + (*) can be multiplication, a pointer, or a pointer dereference. The "&" and "&&" + symbols are a similar + problem.

+

+ If a symbol is being padded incorrectly, padding it manually may fix the problem. If it is still being + padded incorrectly, then disabling the formatting may be necessary. To avoid having to use the "disable block" + tags above, a single line disable is available.

+

+ A line-end comment tag "*NOPAD*" will disable the "pad-oper", "align-pointer", and + "align-reference" options. Parsing does NOT stop and all other formatting will be applied to the line. + The tag applies to the one line only.

+
+

+ The following prevents the operator padding from changing:

+
size_t foo = (unsigned int) -1;  // *NOPAD*
+
+

+  

+
+ + + +

Basic Brace Styles

+ +

+ There are three basic brace styles.
+ Attached – The braces are attached to the end of + the last line of the previous block. (Java).
+ Broken – The braces are broken from the previous + block. (Allman).
+ Linux – The braces are attached except for the opening brace of a function, class, or namespace (K&R, + Linux).

+ +

+ Other brace styles are variations of these. Some will use variations on the placement of class, namespace, + or other braces. (Stroustrup, Google, One True Brace, Lisp). Others will indent the braces (Whitesmith, VTK, + Banner, and GNU). Others will use run-in braces where the following statement is on the same line as the + brace (Horstmann and Pico).

+

+ There are technical arguments for selecting one style over another. But the usual reason comes down to + personal preference. Some like broken braces with vertical whitespace that makes the code easy to read. + Others like attached braces with code that is more compact. Sometimes programmers just want a change. It is + easier to select a preference if you can see an entire file formatted in a certain brace style. With Artistic + Style you can easily modify source code to suit your + preference.

+ +

+  

+
+ + + + +

Brace Style Options

+ +

+ Brace Style options define the brace style to use. All options default to 4 spaces per indent, indented with + spaces. By default, none of the styles indent namespaces. Other indentations are indicated in the individual style + description. All options will break the braces for one line blocks and will break one line statements. To change + this, use the option keep-one-line-blocks and/or + keep-one-line-statements described in the Formatting Options + section.

+

+  

+

+ default brace style
+ If no brace style is requested, the default brace style will be used. The opening braces are not changed + and the closing braces will be broken from the preceding line. There are a few exceptions to this.

+

+  

+

+ --style=allman / --style=bsd / --style=break / -A1
+ Allman style uses broken braces.

+
+
int Foo(bool isBar)
+{
+    if (isBar)
+    {
+        bar();
+        return 1;
+    }
+    else
+        return 0;
+}
+
+
+

+  

+

+ --style=java / --style=attach / -A2
+ Java style uses attached braces.

+
+
int Foo(bool isBar) {
+    if (isBar) {
+        bar();
+        return 1;
+    } else
+        return 0;
+}
+
+
+

+  

+

+ --style=kr / --style=k&r / --style=k/r / -A3
+ Kernighan & Ritchie style uses linux braces. Opening braces are broken from namespaces, classes, and function + definitions. The braces are attached to everything else, including arrays, structs, enums, and statements within + a function.

+

+ Using the k&r option may cause problems because of the &. This can be resolved by enclosing the k&r + in quotes (e.g. ‑‑style="k&r") or by using one of the alternates ‑‑style=kr or + ‑‑style=k/r.

+
+
int Foo(bool isBar)
+{
+    if (isBar) {
+        bar();
+        return 1;
+    } else
+        return 0;
+}
+
+
+

+  

+

+ --style=stroustrup / -A4
+ Stroustrup style uses linux braces with closing headers broken from closing braces + (e.g. ‑‑break‑closing‑headers). Opening braces are broken from function definitions only. + The opening braces are attached to everything else, including namespaces, classes, arrays, structs, enums, and + statements within a function. This style frequently is used with "attach‑closing‑while", + tabbed indents, and an indent of 5 spaces.

+
+
int Foo(bool isBar)
+{
+    if (isBar) {
+        bar();
+        return 1;
+    }
+    else
+        return 0;
+}
+
+
+

+  

+

+ --style=whitesmith / -A5
+ Whitesmith style uses broken, indented braces. Switch blocks and class blocks are indented to prevent a 'hanging + indent' with the following case statements and C++ class modifiers (public, private, protected). 

+
+
int Foo(bool isBar)
+    {
+    if (isBar)
+        {
+        bar();
+        return 1;
+        }
+    else
+        return 0;
+    }
+
+
+

+  

+

+ --style=vtk / -A15
+ VTK (Visualization Toolkit) style uses broken, indented braces, except for the opening brace of classes, + arrays, structs, enums, and function definitions.. Switch blocks are indented to prevent a 'hanging + indent' with following case statements.

+
+
int Foo(bool isBar)
+{
+    if (isBar)
+        {
+        bar();
+        return 1;
+        }
+    else
+        return 0;
+}
+
+
+

+  

+

+ --style=ratliff / --style=banner / -A6
+ Ratliff style uses attached, indented braces. Switch blocks and class blocks are indented to prevent a 'hanging + indent' with following case statements and C++ class modifiers (public, private, protected). 

+
+
int Foo(bool isBar) {
+    if (isBar) {
+        bar();
+        return 1;
+        }
+    else
+        return 0;
+    }
+
+
+

+  

+

+ --style=gnu / -A7
+ GNU style uses broken braces. Extra indentation is added to blocks within a function + only. The entire block is indented, not just the brace. This style frequently is used with an indent of 2 + spaces.

+
+
int Foo(bool isBar)
+{
+    if (isBar)
+        {
+            bar();
+            return 1;
+        }
+    else
+        return 0;
+}
+
+
+

+  

+

+ --style=linux / --style=knf / -A8
+ Linux style uses linux braces. Opening braces are broken from namespace, class, and function definitions. + The braces are attached to everything else, including arrays, structs, enums, and statements within a function. + The minimum conditional indent is one-half indent. If you want a different minimum conditional + indent, use the K&R style instead. This style works best with a large indent. It frequently is used with + an indent of 8 spaces.

+

+ Also known as Kernel Normal Form (KNF) style, this is the style used in the Linux + BSD kernel.

+
+
int Foo(bool isBar)
+{
+        if (isFoo) {
+                bar();
+                return 1;
+        } else
+                return 0;
+}
+
+
+

+  

+

+ --style=horstmann / --style=run-in / -A9
+ Horstmann style uses broken braces and run-in statements. Switches are indented to allow a run-in to the opening + switch block. This style frequently is used with an indent of 3 spaces.

+
+
int Foo(bool isBar)
+{   if (isBar)
+    {   bar();
+        return 1;
+    }
+    else
+        return 0;
+}
+
+
+

+  

+

+ --style=1tbs / --style=otbs / -A10
+ "One True Brace Style" uses linux braces and adds braces to unbraced one line conditional statements. Opening + braces are broken from namespaces, classes, and function definitions. The braces are attached to everything + else, including arrays, structs, enums, and statements within a function.

+

+ In the following example, braces have been added to the "return 0;" statement. The option + ‑‑add‑one‑line‑braces can also be used with this style.

+
+
int Foo(bool isBar)
+{
+    if (isFoo) {
+        bar();
+        return 1;
+    } else {
+        return 0;
+    }
+}
+
+
+

+  

+

+ --style=google / -A14
+ Google style uses attached braces and indented class access modifiers. See the indent-modifiers + option for an example of the indented modifiers format. This is not actually a unique brace style, but + is Java style with a non-brace variation. This style frequently is used with an indent of 2 spaces.

+
+
int Foo(bool isBar) {
+    if (isBar) {
+        bar();
+        return 1;
+    } else
+        return 0;
+}
+
+
+

+  

+

+ --style=mozilla / -A16
+ Mozilla style uses linux braces. Opening braces are broken from classes, structs, enums, and function + definitions. The braces are attached to everything else, including namespaces, arrays, and statements + within a function. This style frequently is used with an indent of 2 spaces and --break-return-type.

+
+
int Foo(bool isBar)
+{
+    if (isBar) {
+        bar();
+        return 1;
+    } else
+        return 0;
+}
+
+
+

+  

+

+ --style=pico / -A11
+ Pico style uses broken braces and run-in statements with attached closing braces. The closing brace is attached + to the last line in the block. Switches are indented to allow a run-in to the opening switch block. The style + implies keep-one-line-blocks and keep-one-line-statements. If add-braces is used they will be added as one-line + braces. This style frequently is used with an indent of 2 spaces.

+
+
int Foo(bool isBar)
+{   if (isBar)
+    {   bar();
+        return 1; }
+    else
+        return 0; }
+
+
+

+  

+

+ --style=lisp / --style=python / -A12
+ Lisp style uses attached opening and closing braces. The closing brace is attached to the last line in the + block. The style implies keep-one-line-statements, but NOT keep-one-line-blocks. This style does not support one-line + braces. If add-one-line-braces is used they will be added as multiple-line braces.

+
+
int Foo(bool isBar) {
+    if (isBar) {
+        bar()
+        return 1; }
+    else
+        return 0; }
+
+
+

+  

+
+ + + +

Tab Options

+ +

+ The following examples show whitespace characters. A space is indicated with a . (dot), a tab + is indicated by a > (greater than).

+

+ default indent
+ If no indentation option is set, the default option of 4 spaces will be used (e.g. -s4 + --indent=spaces=4).

+
+

+ with default values:

+
void Foo() {
+....if (isBar1
+............&& isBar2)    // indent of this line can be changed with min-conditional-indent
+........bar();
+}
+
+
+

+  

+

+ --indent=spaces / --indent=spaces=# / -s#
+ Indent using # spaces per indent (e.g. -s3 --indent=spaces=3). # must be between 2 and 20. Not specifying # will result in a default of + 4 spaces per indent.

+
+

+ with indent=spaces=3

+
void Foo() {
+...if (isBar1
+.........&& isBar2)    // indent of this line can be changed with min-conditional-indent
+......bar();
+}
+
+
+

+  

+

+ --indent=tab / --indent=tab=# / -t / -t#
+ Indent using tabs for indentation, and spaces for continuation line alignment. This ensures that + the code is displayed correctly  regardless of the viewer’s tab size. Treat each indent as # spaces + (e.g. -t6 / --indent=tab=6). + # must be between 2 and 20. If no # is set, treats indents as 4 spaces.

+
+

+ with indent=tab:

+
void Foo() {
+>   if (isBar1
+>   ........&& isBar2)    // indent of this line can be changed with min-conditional-indent
+>   >   bar();
+}
+
+

+ with style=linux, indent=tab=8:

+
void Foo()
+{
+>       if (isBar1
+>       ....&& isBar2)    // indent of this line can NOT be changed with style=linux
+>       >       bar();
+}
+
+
+

+  

+

+ --indent=force-tab / --indent=force-tab=# / -T / -T#
+ Indent using all tab characters, if possible. If a continuation line is not an even number of + tabs, spaces will be added at the end. Treat each tab as # spaces (e.g. -T6 + / --indent=force-tab=6). # must be between + 2 and 20. If no # is set, treats tabs as 4 spaces.

+
+

+ with indent=force-tab:

+
void Foo() {
+>   if (isBar1
+>   >   >   && isBar2)    // indent of this line can be changed with min-conditional-indent
+>   >   bar();
+}
+
+
+

+  

+

+ --indent=force-tab-x / --indent=force-tab-x=# / -xT / -xT# +
+ This force-tab option allows the tab length to be set to a length that is different than the indent length. This + may cause the indentation to be a mix of both tabs and spaces. Tabs will be used to indent, if + possible. If a tab indent cannot be used, spaces will be used instead.

+

+ This option sets the tab length. Treat each tab as # spaces (e.g. -xT6 + / --indent=force-tab-x=6. # must be between + 2 and 20. If no # is set, treats tabs as 8 spaces. To change the indent length from the default + of 4 spaces the option "indent=force-tab" must also be used.

+
+

+ with indent=force-tab-x (default tab length of 8 and default indent length of 4):

+
void Foo() {
+....if (isBar1
+>       ....&& isBar2)    // indent of this line can be changed with min-conditional-indent
+>       bar();
+}
+
+
+

+  

+
+ + + +

Brace Modify Options

+ +

+ --attach-namespaces / -xn
+ Attach braces to a namespace statement. This is done regardless of the brace style being used. + It will also attach braces to CORBA IDL module statements.

+
+

+ the brace is always attached to a namespace statement:

+
namespace FooName {
+...
+}
+
+
+

+  

+

+ --attach-classes / -xc
+ Attach braces to a class statement. This is done regardless of the brace style being used.

+
+

+ the brace is always attached to a class statement:

+
class FooClass {
+...
+};
+
+
+

+  

+

+ --attach-inlines / -xl
+ Attach braces to class and struct inline function definitions. This option has precedence for all + styles except Horstmann and Pico (run-in styles). It is effective for C++ files only.

+
+

+ all braces are attached to class and struct inline method definitions:

+
class FooClass
+{
+    void Foo() {
+    ...
+    }
+};
+
+
+

+  

+

+ --attach-extern-c / -xk
+ Attach braces to a braced extern "C" statement. This is done regardless of the brace style being used. + This option is effective for C++ files only.

+

+ An extern "C" statement that is part of a function definition is formatted according to the requested brace + style. Braced extern "C" statements are unaffected by the brace style and this option is the only way to + change them.

+
+

+ this option attaches braces to a braced extern "C" statement:

+
#ifdef __cplusplus
+extern "C" {
+#endif
+
+

+ but function definitions are formatted according to the requested brace style:

+
extern "C" EXPORT void STDCALL Foo()
+{}
+
+
+

+  

+

+ --attach-closing-while / -xV
+ Attach the closing 'while' of a 'do-while' statement to the closing brace. This has precedence over both + the brace style and the break closing braces option.

+
+
do
+{
+    bar();
+    ++x;
+}
+while x == 1;
+
+

+ becomes:

+
do
+{
+    bar();
+    ++x;
+} while x == 1;
+
+
+

+  

+
+ + + +

Indentation Options

+ +

+ --indent-classes / -C
+ Indent 'class' and 'struct' blocks so that the entire block is indented. The struct + blocks are indented only if an access modifier, 'public:', 'protected:' or 'private:', + is declared somewhere in the struct. This option is effective for C++ files only.

+
+
class Foo
+{
+public:
+    Foo();
+    virtual ~Foo();
+};
+
+

+ becomes:

+
class Foo
+{
+    public:
+        Foo();
+        virtual ~Foo();
+};
+
+
+

+  

+

+ --indent-modifiers / -xG
+ Indent 'class ' and 'struct' access modifiers, 'public:', 'protected:' + and 'private:', one half indent. The rest of the class is not indented. This option is effective + for C++ files only. If used with indent‑classes this option will be ignored.

+
+
class Foo
+{
+public:
+    Foo();
+    virtual ~Foo();
+};
+
+

+ becomes:

+
class Foo
+{
+  public:
+    Foo();
+    virtual ~Foo();
+};
+
+
+

+  

+

+ --indent-switches / -S
+ Indent 'switch' blocks so that the 'case X:' statements are indented in the switch block. The entire + case block is indented.

+
+
switch (foo)
+{
+case 1:
+    a += 1;
+    break;
+
+case 2:
+{
+    a += 2;
+    break;
+}
+}
+
+

+ becomes:

+
switch (foo)
+{
+    case 1:
+        a += 1;
+        break;
+
+    case 2:
+    {
+        a += 2;
+        break;
+    }
+}
+
+
+

+  

+

+ --indent-cases / -K
+ Indent 'case X:' blocks from the 'case X:' headers. Case statements not enclosed in + blocks are NOT indented.

+
+
switch (foo)
+{
+    case 1:
+        a += 1;
+        break;
+
+    case 2:
+    {
+        a += 2;
+        break;
+    }
+}
+
+

+ becomes:

+
switch (foo)
+{
+    case 1:
+        a += 1;
+        break;
+
+    case 2:
+        {
+            a += 2;
+            break;
+        }
+}
+
+
+

+  

+

+ --indent-namespaces / -N
+ Add extra indentation to namespace blocks. This option has no effect on Java files. It + will also indent CORBA IDL module statements.

+
+
namespace foospace
+{
+class Foo
+{
+    public:
+        Foo();
+        virtual ~Foo();
+};
+}
+
+

+ becomes:

+
namespace foospace
+{
+    class Foo
+    {
+        public:
+            Foo();
+            virtual ~Foo();
+    };
+}
+
+
+

+  

+

+ --indent-after-parens / -xU
+ Indent, instead of align, continuation lines following lines that contain an opening paren '(' or an assignment + '='. This includes function definitions and declarations and return statements. The indentation can be modified + by using the following indent-continuation option. This option may be preferred for editors displaying proportional + fonts.

+
+
void Foo(bool bar1,
+         bool bar2)
+{
+    isLongFunction(bar1,
+                   bar2);
+
+    isLongVariable = foo1
+                     || foo2;
+}
+
+

+ becomes:

+
void Foo(bool bar1,
+    bool bar2)
+{
+    isLongFunction(bar1,
+        bar2);
+
+    isLongVariable = foo1
+        || foo2;
+}
+
+
+

+  

+

+ --indent-continuation=# / -xt#
+ Set the continuation indent for a line that ends with an opening paren '(' or an assignment '='. This includes + function definitions and declarations. It will also modify the previous indent-after-paren option. The value for + # indicates a number of indents. The valid values are the integer + values from 0 thru 4. If this option is not used, the default value of 1 is + used.

+
+
isLongVariable =
+    foo1 ||
+    foo2;
+
+isLongFunction(
+    bar1,
+    bar2);
+
+

+ becomes (with indent-continuation=3):

+
isLongVariable =
+            foo1 ||
+            foo2;
+
+isLongFunction(
+            bar1,
+            bar2);
+
+
+

+  

+

+ --indent-labels / -L
+ Add extra indentation to labels so they appear 1 indent less than the current indentation, rather than being flushed + to the left (the default).

+
+
void Foo() {
+    while (isFoo) {
+        if (isFoo)
+            goto error;
+        ...
+error:
+        ...
+        }
+}
+
+

+ becomes (with indented 'error:'):

+
void Foo() {
+    while (isFoo) {
+        if (isFoo)
+            goto error;
+        ...
+    error:
+        ...
+        }
+}
+
+
+

+  

+ +

+ --indent-preproc-block / -xW
+ Indent preprocessor blocks at brace level zero and immediately within a namespace. There are restrictions on + what will be indented. Blocks within methods, classes, arrays, etc., will not be indented. Blocks containing braces + or multi-line define statements will not be indented. Without this option the preprocessor block is not + indented.

+
+
#ifdef _WIN32
+#include <windows.h>
+#ifndef NO_EXPORT
+#define EXPORT
+#endif
+#endif
+
+

+ becomes:

+
#ifdef _WIN32
+    #include <windows.h>
+    #ifndef NO_EXPORT
+        #define EXPORT
+    #endif
+#endif
+
+
+

+  

+

+ --indent-preproc-define / -w
+ Indent multi-line preprocessor definitions ending with a backslash. Should be used with --convert-tabs for proper + results. Does a pretty good job, but cannot perform miracles in obfuscated preprocessor definitions. Without this + option the preprocessor statements remain unchanged.

+
+
#define Is_Bar(arg,a,b) \
+(Is_Foo((arg), (a)) \
+|| Is_Foo((arg), (b)))
+
+

+ becomes:

+
#define Is_Bar(arg,a,b) \
+    (Is_Foo((arg), (a)) \
+     || Is_Foo((arg), (b)))
+
+
+

+  

+

+ --indent-preproc-cond / -xw
+ Indent preprocessor conditional statements to the same level as the source code.

+
+
        isFoo = true;
+#ifdef UNICODE
+        text = wideBuff;
+#else
+        text = buff;
+#endif
+

+ becomes:

+
        isFoo = true;
+        #ifdef UNICODE
+        text = wideBuff;
+        #else
+        text = buff;
+        #endif
+
+
+

+  

+

+ --indent-col1-comments / -Y
+ Indent C++ comments beginning in column one. By default C++ comments beginning in column one are + assumed to be commented‑out code and not indented. This option will allow the comments to be indented with + the code.

+
+
void Foo()\n"
+{
+// comment
+    if (isFoo)
+        bar();
+}
+
+

+ becomes:

+
void Foo()\n"
+{
+    // comment
+    if (isFoo)
+        bar();
+}
+
+
+

+  

+

+ --min-conditional-indent=# / -m#
+ Set the minimal indent that is added when a header is built of multiple lines. This indent helps to easily separate + the header from the command statements that follow. The value for # + indicates a number of indents and is a minimum value. The indent may be greater to align with + the data on the previous line.
+ The valid values are:
+ 0 - no minimal indent. The lines will be aligned with the paren on the preceding line.
+ 1 - indent at least one additional indent.
+ 2 - indent at least two additional indents.
+ 3 - indent at least one-half an additional indent. This is intended for large indents (e.g. 8).
+ The default value is 2, two additional indents.

+
+
// default setting makes this non-braced code clear
+if (a < b
+        || c > d)
+    foo++;
+
+// but creates an exaggerated indent in this braced code
+if (a < b
+        || c > d)
+{
+    foo++;
+}
+
+

+ becomes (when setting + --min-conditional-indent=0):

+
// setting makes this non-braced code less clear
+if (a < b
+    || c > d)
+    foo++;
+
+// but makes this braced code clearer
+if (a < b
+    || c > d)
+{
+    foo++;
+}
+
+
+

+  

+

+ --max-continuation-indent=# / -M#
+ Set the  maximum of # spaces to indent a continuation line. The + # indicates a number of columns and must not be less than 40 or + greater than 120. If no value is set, the default value of 40 will be + used. This option will prevent continuation lines from extending too far to the right. Setting a larger value + will allow the code to be extended further to the right.

+
+
fooArray[] = { red,
+         green,
+         blue };
+
+fooFunction(barArg1,
+         barArg2,
+         barArg3);
+
+

+ becomes (with larger value):

+
fooArray[] = { red,
+               green,
+               blue };
+
+fooFunction(barArg1,
+            barArg2,
+            barArg3);
+
+
+

+  

+
+ + + +

Padding Options

+ +

+ --break-blocks / -f
+ Pad empty lines around header blocks (e.g. 'if', 'for', 'while'...).

+
+
isFoo = true;
+if (isFoo) {
+    bar();
+} else {
+    anotherBar();
+}
+isBar = false;
+
+

+ becomes:

+
isFoo = true;
+
+if (isFoo) {
+    bar();
+} else {
+    anotherBar();
+}
+
+isBar = false;
+
+
+

+  

+

+ --break-blocks=all / -F
+ Pad empty lines around header blocks (e.g. 'if', 'for', 'while'...). Treat + closing header blocks (e.g. 'else', 'catch') as stand-alone blocks.

+
+
isFoo = true;
+if (isFoo) {
+    bar();
+} else {
+    anotherBar();
+}
+isBar = false;
+
+

+ becomes:

+
isFoo = true;
+
+if (isFoo) {
+    bar();
+
+} else {
+    anotherBar();
+}
+
+isBar = false;
+
+
+

+  

+

+ --pad-oper / -p
+ Insert space padding around operators. This will also pad commas. Any end of line comments will remain in the + original column, if possible. Note that there is no option to unpad. Once padded, they stay padded.

+
+
if (foo==2)
+    a=bar((b-c)*a,d--);
+
+

+ becomes:

+
if (foo == 2)
+    a = bar((b - c) * a, d--);
+
+
+

+  

+

+ --pad-comma / -xg
+ Insert space padding after commas. This is not needed if pad-oper is used. Any end of line comments will + remain in the original column, if possible. Note that there is no option to unpad. Once padded, they + stay padded.

+
+
if (isFoo(a,b))
+    bar(a,b);
+
+

+ becomes:

+
if (isFoo(a, b))
+    bar(a, b);
+
+
+

+  

+

+ --pad-paren / -P +
+ Insert space padding around parens on both the outside and the inside. + Any end of line comments will remain in the original column, if possible.

+
+
if (isFoo((a+2), b))
+    bar(a, b);
+
+

+ becomes:

+
if ( isFoo ( ( a+2 ), b ) )
+    bar ( a, b );
+
+
+

+  

+

+ --pad-paren-out / -d +
+ Insert space padding around parens on the outside only. Parens that are empty will + not be padded. Any end of line comments will remain in the original column, if possible. This can be used with + unpad-paren below to remove unwanted spaces.

+
+
if (isFoo((a+2), b))
+    bar(a, b);
+
+

+ becomes:

+
if (isFoo ( (a+2), b) )
+    bar (a, b);
+
+
+

+  

+

+ --pad-first-paren-out / -xd +
+ Insert space padding around the first paren in a series on the outside + only. Parens that are empty will not be padded. Any end of line comments will remain in the original column, + if possible. This can be used with unpad-paren below to remove unwanted spaces. If used with pad‑paren or + pad‑paren‑out, this option will be ignored. If used with pad‑paren‑in, the result will + be the pad‑paren.

+
+
if (isFoo((a+2), b))
+    bar(a, b);
+
+

+ becomes:

+
if (isFoo ((a+2), b))
+    bar (a, b);
+
+
+

+  

+

+ --pad-paren-in / -D +
+ Insert space padding around paren on the inside only. Any end of line comments will remain + in the original column, if possible. This can be used with unpad-paren below to remove unwanted spaces.

+
+
if (isFoo((a+2), b))
+    bar(a, b);
+
+

+ becomes:

+
if ( isFoo( ( a+2 ), b ) )
+    bar( a, b );
+
+
+

+  

+

+ --pad-header / -H +
+ Insert space padding between a header (e.g. 'if', 'for', 'while'...) + and the following paren. Any end of line comments will remain in the original column, if possible. This can + be used with unpad-paren to remove unwanted spaces.

+
+
if(isFoo((a+2), b))
+    bar(a, b);
+

+ becomes:

+
if (isFoo((a+2), b))
+    bar(a, b);
+
+
+

+  

+

+ --unpad-paren / -U +
+ Remove extra space padding around parens on the inside and outside. Any end of line comments will remain + in the original column, if possible. This option can be used in combination with the paren padding options + pad‑paren, pad‑paren‑out, pad‑paren‑in, + and pad‑header above. Only padding that has not been requested by other options will be + removed.

+

+ For example, if a source has parens padded on both the inside and outside, and you want inside only. You need + to use unpad-paren to remove the outside padding, and pad‑paren‑in to + retain the inside padding. Using only pad‑paren‑in> would not remove the outside + padding.

+
+
if ( isFoo( ( a+2 ), b ) )
+    bar ( a, b );
+
+

+ becomes (with no padding option requested):

+
if(isFoo((a+2), b))
+    bar(a, b);
+
+
+

+  

+

+ --delete-empty-lines / -xe
+ Delete empty lines within a function or method. Empty lines outside of functions or methods are NOT deleted. If + used with break-blocks or break-blocks=all it will delete all lines EXCEPT the lines added by the break-blocks + options.

+
+
void Foo()
+{
+
+    foo1 = 1;
+
+    foo2 = 2;
+
+}
+
+

+ becomes:

+
void Foo()
+{
+    foo1 = 1;
+    foo2 = 2;
+}
+
+
+

+  

+

+ --fill-empty-lines / -E
+ Fill empty lines with the white space of the previous line.

+

+  

+

+ --align-pointer=type   / -k1
+ --align-pointer=middle / -k2
+ --align-pointer=name   / -k3 +

+ Attach a pointer or reference operator (*, &, or ^) to either the variable type (left) or variable name (right), + or place it between the type and name (middle). The spacing between the type and name will be preserved, if possible. + This option is for C/C++, C++/CLI, and C# files. To format references separately, use the following align-reference + option.

+
+
char* foo1;
+char & foo2;
+string ^s1;
+

+ becomes (with align-pointer=type):

+
char* foo1;
+char& foo2;
+string^ s1;
+
+
+
char* foo1;
+char & foo2;
+string ^s1;
+

+ becomes (with align-pointer=middle):

+
char * foo1;
+char & foo2;
+string ^ s1;
+
+
+
char* foo1;
+char & foo2;
+string ^s1;
+

+ becomes (with align-pointer=name):

+
char *foo1;
+char &foo2;
+string ^s1;
+
+

+  

+

+ --align-reference=none   / -W0
+ --align-reference=type   / -W1
+ --align-reference=middle / -W2
+ --align-reference=name   / -W3 +

+ This option will align references separate from pointers. Pointers are not changed by this option. If pointers + and references are to be aligned the same, use the previous align-pointer option. The option align-reference=none + will not change the reference alignment. The other options are the same as for align-pointer. This option is for + C/C++, C++/CLI, and C# files.

+
+
char &foo1;
+

+ becomes (with align-reference=type):

+
char& foo1;
+
+
+
char& foo2;
+

+ becomes (with align-reference=middle):

+
char & foo2;
+
+
+
char& foo3;
+

+ becomes (with align-reference=name):

+
char &foo3;
+
+

+  

+
+ + + +

Formatting Options

+ +

+ --break-closing-braces / -y
+ When used with --style=java, --style=kr, --style=stroustrup, --style=linux, or --style=1tbs, this breaks closing + headers (e.g. 'else', 'catch', ...) from their immediately preceding closing braces. Closing header braces + are always broken with the other styles.

+
+
void Foo(bool isFoo) {
+    if (isFoo) {
+        bar();
+    } else {
+        anotherBar();
+    }
+}
+
+

+ becomes (a broken 'else'):

+
void Foo(bool isFoo) {
+    if (isFoo) {
+        bar();
+    }
+    else {
+        anotherBar();
+    }
+}
+
+
+

+  

+

+ --break-elseifs / -e
+ Break "else if" header combinations into separate lines. This option has no effect if keep-one-line-statements + is used, the "else if" statements will remain as they are.

+

+ If this option is NOT used, "else if" header combinations will be placed on a single line.

+
+
if (isFoo) {
+    bar();
+}
+else if (isFoo1()) {
+    bar1();
+}
+else if (isFoo2()) {
+    bar2;
+}
+
+

+ becomes:

+
if (isFoo) {
+    bar();
+}
+else
+    if (isFoo1()) {
+        bar1();
+    }
+    else
+        if (isFoo2()) {
+            bar2();
+        }
+
+
+

+  

+

+ --break-one-line-headers / -xb
+ Break one line headers (e.g. 'if', 'while', 'else', ...) from a statement residing + on the same line. If the statement is enclosed in braces, the braces will be formatted according to the requested + brace style.

+

+ A multi-statement line will NOT be broken if keep-one-line-statements is requested. One line blocks + will NOT be broken if keep-one-line-blocks is requested and the header is enclosed in the block.

+
+
void Foo(bool isFoo)
+{
+    if (isFoo1) bar1();
+
+    if (isFoo2) { bar2(); }
+}
+
+

+ becomes:

+
void Foo(bool isFoo)
+{
+    if (isFoo1)
+        bar1();
+
+    if (isFoo2) {
+        bar2();
+    }
+}
+
+
+

+  

+

+ --add-braces / -j
+ Add braces to unbraced one line conditional statements (e.g. 'if', 'for', 'while'...). The statement must + be on a single line. The braces will be added according to the requested brace style. If no style is requested + the braces will be attached.

+

+ Braces will NOT be added to a multi-statement line if keep-one-line-statements is requested. Braces will + NOT be added to a one line block if keep-one-line-blocks is requested. If used with --add-one-line-braces, + the result will be one line braces.

+
+
if (isFoo)
+    isFoo = false;
+
+

+ becomes:

+
if (isFoo) {
+    isFoo = false;
+}
+
+
+

+  

+

+ --add-one-line-braces / -J
+ Add one line braces to unbraced one line conditional statements (e.g. 'if', 'for', + 'while'...). The statement must be on a single line. The option implies --keep-one-line-blocks and + will not break the one line blocks.

+
+
if (isFoo)
+    isFoo = false;
+
+

+ becomes:

+
if (isFoo)
+    { isFoo = false; }
+
+
+

+  

+

+ --remove-braces / -xj
+ Remove braces from conditional statements (e.g. 'if', 'for', 'while'...). + The statement must be a single statement on a single line. If --add-braces or --add-one-line-braces is also + used the result will be to add braces. Braces will not be removed from "One True Brace Style", + --style=1tbs.

+
+
if (isFoo)
+{
+    isFoo = false;
+}
+

+ becomes:

+
if (isFoo)
+    isFoo = false;
+
+
+

+  

+

+ --break-return-type      / -xB
+ --break-return-type-decl / -xD
+ Break the return type from the function name. The two options are for the function definitions (-xB), and the + function declarations or signatures (-xD). If used with --attach-return-type, the result will be to break the + return type. This option has no effect on Objective-C functions.

+
+
void Foo(bool isFoo);
+

+ becomes:

+
void
+Foo(bool isFoo);
+
+

+  

+

+ --attach-return-type      / -xf
+ --attach-return-type-decl / -xh
+ Attach the return type to the function name. The two options are for the function definitions (-xf), and the + function declarations or signatures (-xh). They are intended to undo the --break-return-type options. If used + with --break-return-type, the result will be to break the return type. This option has no effect on + Objective-C functions.

+
+
void
+Foo(bool isFoo);
+

+ becomes:

+
void Foo(bool isFoo);
+
+

+  

+ + +

+ --keep-one-line-blocks / -O +
+ Don't break one-line blocks.

+
+
if (isFoo)
+{ isFoo = false; cout << isFoo << endl; }
+
+

+ remains unchanged.

+
+

+  

+

+ --keep-one-line-statements / -o +
+ Don't break complex statements and multiple statements residing on a single line.

+
+
if (isFoo)
+{
+    isFoo = false; cout << isFoo << endl;
+}
+
+

+ remains unchanged.

+
+

+  

+

+ --convert-tabs / -c
+ Converts tabs into spaces in the non-indentation part of the + line. The number of spaces inserted will maintain the spacing of the tab. The current setting for spaces per tab + is used. It may not produce the expected results if convert-tabs is used when changing spaces per tab. Tabs are + not replaced within quotes.

+

+  

+

+ --close-templates / -xy
+ Closes whitespace between the ending angle brackets of template definitions. Closing the ending angle brackets + is now allowed by the C++11 standard. Be sure your compiler supports this before making the changes.

+
+
Stack< int, List< int > > stack1;
+

+ becomes:

+
Stack< int, List< int >> stack1;
+
+

+  

+

+ --remove-comment-prefix / -xp
+ Remove the preceding '*' in a multi-line comment that begins a line. A trailing '*', if present, is also removed. + Text that is less than one indent is indented to one indent. Text greater than one indent is not changed. Multi-line + comments that begin a line, but without the preceding '*', are indented to one indent for consistency. This can + slightly modify the indentation of commented out blocks of code. Lines containing all '*' are left unchanged. + Extra spacing is removed from the comment close '*/'.

+
+
/*
+ * comment line 1
+ * comment line 2
+ */
+

+ becomes:

+
/*
+    comment line 1
+    comment line 2
+*/
+
+

+  

+

+ --max-code-length=#   / -xC# +
+ --break-after-logical / -xL

+ The option max‑code‑length will break a line if the code exceeds # + characters. The valid values are 50 thru 200. Lines without logical conditionals + will break on a logical conditional (||, &&, ...), comma, paren, semicolon, or space.

+

+ Some code will not be broken, such as comments, quotes, and arrays. If used with keep‑one‑line‑blocks + or add-one-line-braces the blocks will NOT be broken. If used with keep‑one‑line‑statements + the statements will be broken at a semicolon if the line goes over the maximum length. If there is no available + break point within the max code length, the line will be broken at the first available break point after the max + code length.

+

+ By default logical conditionals will be placed first in the new line. The option + break‑after‑logical will cause the logical conditionals to be placed last on the + previous line. This option has no effect without max‑code‑length.

+
+
if (thisVariable1 == thatVariable1 || thisVariable2 == thatVariable2 || thisVariable3 == thatVariable3)
+    bar();
+

+ becomes:

+
if (thisVariable1 == thatVariable1
+        || thisVariable2 == thatVariable2
+        || thisVariable3 == thatVariable3)
+    bar();
+

+ becomes (with break‑after‑logical):

+
if (thisVariable1 == thatVariable1 ||
+        thisVariable2 == thatVariable2 ||
+        thisVariable3 == thatVariable3)
+    bar();
+
+

+  

+

+ --mode=c
+ --mode=cs
+ --mode=java
+ Indent a C type, C#, or Java file. C type files are C, C++, C++/CLI, and Objective-C. The option is usually + set from the file extension for each file. You can override the setting with this entry. It will be used for all + files, regardless of the file extension. It allows the formatter to identify language specific syntax such as + C++ classes, templates, and keywords.

+

+  

+
+ + + +

Objective‑C Options

+ +

+ These options are effective for Objective‑C files only. The standard paren padding options will still apply + to the Objective-C method prefix and return type unless overridden by the following options.

+

+ Because of the longer indents sometimes needed for Objective‑C, the option "max-continuation-indent" may + need to be increased. If you are not getting the paren and square bracket alignment you want, try increasing + this value. The option is described in the "Indentation Options" section.

+

+ --pad-method-prefix / -xQ
+ Insert space padding after the '-' or '+' Objective‑C method prefix. This will add + exactly one space. Any additional spaces will be deleted.

+
+
-(void)foo1;
+-    (void)foo2;
+

+ becomes:

+
- (void)foo1;
+- (void)foo2;
+
+

+  

+

+ --unpad-method-prefix / -xR
+ Remove all space padding after the '-' or '+' Objective‑C method prefix.  + This option will be ignored if used with pad‑method‑prefix. This option takes precedence over the + pad paren outside option.

+
+
- (void) foo1;
+-     (void) foo2;
+

+ becomes:

+
-(void) foo1;
+-(void) foo2;
+
+

+  

+

+ --pad-return-type / -xq
+ Insert space padding after the Objective‑C return type. This will add exactly one + space. Any additional spaces will be deleted.

+
+
-(void)foo1;
+-(void)   foo2;
+

+ becomes:

+
-(void) foo1;
+-(void) foo2;
+
+

+  

+

+ --unpad-return-type / -xr
+ Remove all space padding after the Objective‑C return type. This option + will be ignored if used with pad‑return‑type. This option takes precedence over the pad paren + outside option.

+
+
-(void) foo1;
+-(void)    foo2;
+

+ becomes:

+
-(void)foo1;
+-(void)foo2;
+
+

+  

+

+ --pad-param-type / -xS
+ Insert space padding around an Objective‑C parameter type. This will add exactly + one space. Any additional spaces will be deleted. This has precedence over the pad method colon option and + will always cause space padding after a method colon.

+
+
-(void)foo1:(bool)barArg1;
+-(void)foo2:    (bool)   barArg2;
+

+ becomes:

+
-(void)foo1: (bool) barArg1;
+-(void)foo2: (bool) barArg2;
+
+

+  

+

+ --unpad-param-type / -xs
+ Remove all space padding around an Objective‑C parameter type. This option takes precedence over the + pad paren outside option. The pad method colon option has precedence over the opening paren. + The closing paren will always be unpadded.

+
+
-(void)foo1: (bool)    barArg1;
+-(void)foo2:     (bool)    barArg2;
+

+ becomes (with an unpadded method colon):

+
-(void)foo1:(bool)barArg1;
+-(void)foo2:(bool)barArg2;
+

+ becomes (with a padded method colon + after):

+
-(void)foo1: (bool)barArg1;
+-(void)foo2: (bool)barArg2;
+
+

+  

+

+ --align-method-colon / -xM
+ Align the colons in Objective‑C method declarations + and method calls. If this option is not declared, method definitions will be indented uniformly, and method calls + will align with the first keyword.

+
+
-(void)longKeyword: (ID)theArg1
+         keyword: (int)theArg2
+       error: (NSError*)theError
+{
+    [myObj longKeyword: arg1
+     keyword: arg2
+     error: arg3];
+}
+

+ becomes (with no option declared):

+
-(void)longKeyword: (ID)theArg1
+    keyword: (int)theArg2
+    error: (NSError*)theError
+{
+    [myObj longKeyword: arg1
+           keyword: arg2
+           error: arg3];
+}
+

+ becomes (with + align-method-colon):

+
-(void)longKeyword: (ID)theArg1
+           keyword: (int)theArg2
+             error: (NSError*)theError
+{
+    [myObj longKeyword: arg1
+               keyword: arg2
+                 error: arg3];
+}
+
+

+  

+

+ --pad-method-colon=none   / -xP0
+ --pad-method-colon=all    / -xP1
+ --pad-method-colon=after  / -xP2
+ --pad-method-colon=before / -xP3 +

+ Add or remove space padding before or after the colons in an Objective‑C method call. These options will + pad exactly one space. Any additional spaces will be deleted. The space padding after the method colon can be + overridden by pad-param-type.

+
+

+ with pad-method-colon=none:

+
-(void)insertKey:(id)key;
+

+ with pad-method-colon=all:

+
-(void)insertKey : (id)key;
+

+ with pad-method-colon=after:

+
-(void)insertKey: (id)key;
+

+ with pad-method-colon=before:

+
-(void)insertKey :(id)key;
+
+

+  

+
+ + + +

Other Options

+ +

+ These are non-formatting options available for the command-line. They can also be included in an option + file.

+ +

+ --suffix=####
+ Append the suffix #### instead of '.orig' to original file name (e.g. --suffix=.bak. + If this is to be a file extension, the dot '.' must be included. Otherwise the suffix will be appended to the + current file extension.

+

+ --suffix=none / -n
+ Do not retain a backup of the original file. The original file is purged after it is formatted.

+

+ --recursive / -r / -R
+ For each directory in the command line, process all subdirectories recursively. When using the recursive option + the file name statement should contain a wildcard. Linux users should place the file path and name in double quotes + so the shell will not resolve the wildcards (e.g. "$HOME/src/*.cpp"). Windows users should place the file path + and name in double quotes if the path or name contains spaces.

+

+ --dry-run
+ Perform a trial run with no changes made to the files. The report will be output as usual.

+

+ --exclude=####
+ Specify a file or subdirectory #### to be excluded from processing.

+

+ Excludes are matched from the end of the file path. An exclude option of "templates" will exclude ALL directories + named "templates". An exclude option of "cpp/templates" will exclude ALL "cpp/templates" directories. You may + proceed backward in the directory tree to exclude only the required directories.

+

+ Specific files may be excluded in the same manner. An exclude option of "default.cpp" will exclude ALL files + named "default.cpp". An exclude option of "python/default.cpp" will exclude ALL files named "default.cpp" + contained in a "python" subdirectory. You may proceed backward in the directory tree to exclude only the + required files.

+

+ Wildcards are NOT allowed. There may be more than one exclude statement. The file path and name may be placed + in double quotes (e.g. ‑‑exclude="foo bar.cpp").

+

+ --ignore-exclude-errors / -i
+ Allow processing to continue if there are errors in the "exclude=###" options.
+ This option lets the excludes for several projects be entered in a single option file. This option may be placed + in the same option file as the excludes. It will display the unmatched excludes. The following option will not + display the unmatched excludes.

+

+ --ignore-exclude-errors-x / -xi
+ Allow processing to continue if there are errors in the "exclude=###" options.
+ This option lets the excludes for several projects be entered in a single option file. This option may be placed + in the same option file as the excludes. It will NOT display the unmatched excludes. The preceding option will + display the unmatched excludes.

+

+ --errors-to-stdout / -X
+ Print errors to standard-output rather than to standard-error.
+ This option should be helpful for systems/shells that do not have a separate output to standard-error, such as + in Windows95.

+

+ --preserve-date / -Z
+ Preserve the original file's date and time modified. The time modified will be changed a few microseconds to + force the changed files to compile. This option is not effective if redirection is used to rename the input + file.

+

+ --verbose / -v
+ Verbose display mode. Display optional information, such as release number, date, + option file locations, and statistical data.

+

+ --formatted / -Q
+ Formatted files display mode. Display only the files that have been formatted. Do not display files that + are unchanged.

+

+ --quiet / -q
+ Quiet display mode. Suppress all output except error messages.

+

+ --lineend=windows / -z1
+ --lineend=linux   / -z2
+ --lineend=macold  / -z3 +

+ Force use of the specified line end style. Valid options are windows (CRLF), linux (LF), and macold (CR). MacOld + style is the format for Mac OS 9 and earlier. MacOS and OS X uses the Linux style. If one of + these options is not used, the line ends will be determined automatically from the input file.

+

+ When redirection is used on Windows the output will always have Windows line ends. This option + will be ignored.

+

+  

+
+ + + +

Command Line Only

+ +

These options are available for the command-line only. They are NOT available in an options file.

+ +

+ --options=####
+ --options=none
+ Specify an options file #### to read and use. It must contain a file path and a file name. This will allow + the file name to be changed from astylerc or .astylerc.

+

+ The "none" option will disable the default options file if one exists. Only command-line parameters will be used. +

+

+ Further information is available in the Option Files section.

+

+ --project
+ --project=####
+ --project=none
+ Specify a project option file to use. The option file + should have  the default name of .astylerc or _astylerc and should be in the top directory of the project + being formatted.

+

+ Specify a project options file #### to use. It must contain a file name only without a directory path. + This will allow the project file name to be changed from .astylerc or _astylerc. It should be in the top directory + of the project being formatted.

+

+ The "none" option will disable a project options file if one exists. In this case, the project option file will + not be used.

+

+ Further information is available in the Option Files section.

+

+ --ascii / -I
+ The displayed output will be ASCII characters only. The text will be displayed in English and numbers will not + be formatted. The short option must be by itself, it cannot be concatenated with other options.

+

+ --version / -V
+ Print version number and quit. The short option must be by itself, it cannot be concatenated with other + options.

+

+ --help / -h / -?
+ Print a help message and quit. The short option must be by itself, it cannot be concatenated with other + options.

+

+ --html / -!
+ Open the HTML help file "astyle.html" in the default browser and quit. The short option must be by itself, it + cannot be concatenated with other options. The documentation must be installed in the standard install path (/usr/share/doc/astyle/html + for Linux or %PROGRAMFILES%\AStyle\doc for Windows). If installed to a different path use html=###.

+

+ --html=####
+ Open an HTML help file in the default browser using the file path #### and quit. An HTML file other than "astyle.help" + may be specified. The path may include a directory path and a file name, or a file name only (e.g. html=install.html). + If only a file name is used, it is assumed to be in the standard install path (/usr/share/doc/astyle/html + for Linux or %PROGRAMFILES%\AStyle\doc for Windows). In both cases, the file name must include the html extension. + File paths containing spaces must be enclosed in quotes.

+

+ On Linux the HTML file is opened using the script "xdg-open" from the install package "xdg-utils". This should + be installed by default on most distributions.

+

+ Any HTML file can be opened by this option. The files you are likely to need are astyle.html (the default), install.html, + and index.html.

+

+ --stdin=####
+ Open a file using the file path #### as input to single file formatting. This is a replacement for redirection. + Do not use this with "<" redirection.

+

+ --stdout=####
+ Open a file using the file path #### as output from single file formatting. This is a replacement for redirection. + Do not use this with ">" redirection.

+

+  

+
+ +

+ + +

+ +

+  

+

+  

+ + + + + diff --git a/AStyle/doc/index.html b/AStyle/doc/index.html new file mode 100644 index 00000000..b6243123 --- /dev/null +++ b/AStyle/doc/index.html @@ -0,0 +1,188 @@ + + + + + + Artistic Style - Index + + + + + + + + + + +

Artistic Style 3.2

+ +

+ A Free, Fast, and Small Automatic Formatter
+ for C, C++, C++/CLI, Objective‑C, C#, and Java Source Code +

+ +
+ + + + + + + + + + + + + +
+ Project Page:http://astyle.sourceforge.net/
+ SourceForge:http://sourceforge.net/projects/astyle/
+
+ +

+  

+

+ Artistic Style is a source code indenter, formatter, and beautifier for the C, C++, C++/CLI, Objective‑C, + 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++.

+ +

Documentation

+ +

+ 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.

+ +

News and Release Notes

+ +

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

+ +

Download

+ +

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

+ +

Install

+ +

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

+ +

Subversion

+ +

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

+ +

License

+ +

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

+

+ The main points of the terms of the license are:

+ + +

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

+ +

Scripts

+ +

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

+ +

Links

+ +

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

+ +

Developer Information

+ +

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

+ +

Bug Reports, Change Requests, Update Notifications

+ +

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

+

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

+

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

+

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

+ +

Maintainers

+ +

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

+ +

Acknowledgments

+ +

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

+

+ Thanks to SourceForge for giving Artistic Style its + home.

+

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

+ + + +

+  

+ +

+ + +

+ +

+  

+ + + + + diff --git a/AStyle/doc/install.html b/AStyle/doc/install.html new file mode 100644 index 00000000..beb33015 --- /dev/null +++ b/AStyle/doc/install.html @@ -0,0 +1,581 @@ + + + + + + Artistic Style - Install Information + + + + + + + + +

Artistic Style Install Information

+ +

+  

+ +

Contents

+ +

+ Artistic Style Versions

+

+ Linux Version

+

+ CMake Linux

+

+ GCC Makefile

+

+ Clang Makefile

+

+ Intel Makefile

+

+ CodeBlocks Linux

+

+ MacOS Version

+

+ CMake MacOS

+

+ MacOS Makefile

+

+ Xcode

+

+ Windows Version

+

+ Precompiled Executable

+

+ CMake Windows

+

+ CodeBlocks Windows

+

+ Visual Studio

+

+ Other Makefile Targets

+

+ Other Development Environments

+

+ Compiler Options

+ +

Artistic Style Versions

+ +

+ astyle_x.x_linux.tar.gz is the Linux version of Artistic Style. It contains the source code, + documentation, and makefiles. The Linux Version compile instructions below give information for compiling the + source code.

+

+ astyle_x.x_macos.tar.gz is the Mac OS version of Artistic Style. It contains the source code, + documentation, Xcode project files, and a makefile. The Mac OS Version compile instructions below give information + for compiling the source code.

+

+ astyle_x.x_windows.zip is the Windows version of Artistic Style. It contains the source code, + documentation, Visual C project files, and an executable. The Windows Version compile instructions below give + information for compiling the source code.

+

+ astyle_x.x_windows_xp.zip is the Windows XP version of Artistic Style. It is identical to the + above Windows version except the executable is compiled to be compatible with Windows XP. If you are not running + Windows XP, use the above version.

+

+ Only one platform is supported in each distribution package. If you use Artistic Style on more than one platform + you will need to download packages for each platform. The main difference in platforms is the build directories + and the line endings. Most compilers and development packages will accept any type of line ending. The source + code and documentation are the same for all distributions.

+ +

Linux Version

+ +

CMake Linux

+ +

+ Artistic Style has CMake support for GCC, Clang, and Intel compilers. Other compilers will probably work if + the necessary options are set. Refer to the section on Compiler Options for + more information.

+

+ Since the different builds use the same source files an "out of source" build should be used. The + default build is a release version. A debug version must be specifically requested. The + the following options are available for building the various configurations.

+ + +
EXAMPLES
+ +

+ The following examples are assumed to be run from the astyle directory that contains + CMakeLists.txt. They show out of source builds that generate makefiles.

+

+ To build the console release version:

+
mkdir  as-gcc-exe
+cd  as-gcc-exe
+cmake  ../
+make
+
+

+ To build the shared debug version:

+
mkdir  --parents  as-gcc-so
+cd  as-gcc-so
+cmake  -DBUILD_SHARED_LIBS=1  -DCMAKE_BUILD_TYPE=Debug  ../
+make
+
+

+ To build the Java release version using the Clang compiler:

+
mkdir  as-clang-java
+cd  as-clang-java
+CXX=clang++  CC=clang  cmake  -DBUILD_JAVA_LIBS=1  ../
+make
+
+ +
INSTALL
+ +

+ The makefile install option installs the astyle executable and documentation files. The default is /usr/bin for + the executable and /usr/share/doc/astyle for the documentation. You must have the appropriate permissions to use + install.

+ +

+ There is no uninstall. The easiest way to uninstall is to use the install_manifest.txt file, for example + "xargs rm < install_manifest.txt".

+ +

GCC Makefile

+ +

+ To compile using the GCC compiler you must have GCC (3.1 or better) installed.

+

+ The build has no autoconf dependency. To build the Artistic Style configurations, use the makefile located in + the astyle/build/gcc directory. The executables will be in the astyle/build/gcc/bin directory. To build the + command line configuration, enter the following:

+
cd astyle/build/gcc
make +
+

+ To build the other astyle configurations, you can enter the file name or a symbolic name. Entering "make astyle" + or "make release" will build the command line configuration. Following are the symbolic names and file names (in + parens) of the various configurations:

+ +

+ More than one configuration can be built at the same time. For example, to build all the release configurations + enter:

+
cd astyle/build/gcc
make release shared static
+

+ The Other Makefile Targets section contains additional target + options.

+ +

Clang Makefile

+ +

+ Clang has a static analyzer that finds potential bugs in C/C++ and Objective-C 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.

+

+ The build has no autoconf dependency. To build the Artistic Style configurations use the makefile located in the + astyle/build/clang directory. The executables will be in the astyle/build/clang/bin directory. To build the command + line configuration, enter the following:

+
cd astyle/build/clang
make +
+

+ To build the other astyle configurations, you can enter the file name or a symbolic name. The configurations for + Clang are the same as for the GCC Makefile. More than one configuration can be + built at the same time. For example, to build all the release configurations enter:

+
cd astyle/build/clang
make release shared static +
+

+ The Other Makefile Targets section contains additional target + options.

+ +

Intel Makefile

+ +

+ These procedures and the makefile are for recent versions of the compiler. They may not work for earlier versions. + Instructions for your compiler are in the compiler documentation file "get_started_lc.htm".

+

+ To compile with Intel there are environment variables that must be set by running the compiler environment + script compilervars.sh (or compilervars.csh) with an argument that specifies the target architecture. This + should be done before running the make. If it is not done, "make" will display an error message + stating that the compiler environment variables are not set.

+

+ The build has no autoconf dependency. To build the Artistic Style configurations use the makefile located in the + astyle/build/intel directory. The output executables will be in the astyle/build/intel/bin directory. To build + the command line configuration, enter the following:

+
cd astyle/build/intel
make
+

+ To build the other astyle configurations, you can enter the file name or a symbolic name. The configuration names + for Intel are the same as for the GCC Makefile. More than one configuration can be + built at the same time. For example, to build the entire debug configurations enter:

+
cd astyle/build/intel
make debug shareddebug staticdebug
+

+ The Other Makefile Targets section contains additional target + options.

+ +

CodeBlocks Linux

+ +

+ There are build folders for the following compilers. All compiler folders are in the "build" directory. +

+ +

+ There are workspace and project files for each folder. All projects have at least Debug and Release + configurations. All output will be in the "bin" directory.

+

+ The workspace contains the following projects.

+ + +

+ For other Linux development environments, follow the instructions in Other + Development Environments.

+ +

MacOS Version

+ +

CMake MacOS

+ +

+ Artistic Style has CMake support for MacOS. It is used the same as CMake Linux + except the supported compilers are only GCC and Clang.

+ +

MacOS Makefile

+ +

+ The Artistic Style makefile compile uses the Mac OS "Command Line Tools". If you have Xcode 4.3 or newer + the command line tools, such as "make", are NOT installed by default. They must be downloaded and installed + separately. Once everything is successfully installed, you should see "make" and other command line + developer tools in /usr/bin.

+

+ The build has no autoconf dependency. To build the Artistic Style configurations use the makefile located in the + astyle/build/mac directory. The executables will be in the astyle/build/mac/bin directory. To build the command + line configuration, enter the following:

+
cd astyle/build/mac
make +
+

+ To build the other astyle configurations, you can enter the file name or a symbolic name. The configurations for + Mac are the same as for the GCC Makefile. More than one configuration can be + built at the same time. For example, to build all the release configurations enter:

+
cd astyle/build/mac
make release shared static +
+

+ The Other Makefile Targets section contains additional target + options.

+ +

Xcode

+ +

+ Artistic Style workspace and project files for the Xcode development environment are available in the "build/xcode" + directory. A workspace can be used to build a single project or all the projects. The project files have Debug + and Release configurations. The following projects are available.

+ + +
INSTALL
+ +

+ Only the astyle executable is installed. The library project installs are sent to UninstalledProjects in + the Build directory. The following instructions are for the astyle executable and documentation files. The default + install directory is /usr/bin for the executable and /usr/share/doc/astyle for the documentation. You must have + the appropriate permissions to use install. If sudo is not used for the install, an error will occur during the + build.

+

+ To install the astyle executable in the default directory:

+
cd astyle/build/xcode
+sudo xcodebuild install -project AStyle.xcodeproj
+
+

+ A script is used to install the documentation + from the same directory.

+
sudo bash install.sh
+
+ +
UNINSTALL
+ +

+ Uninstalls the executable and documentation. You must have the appropriate permissions to use uninstall.

+

+ A script is used to uninstall astyle and the documentation:

+
sudo bash uninstall.sh
+
+

+ NOTE: The uninstall option will NOT remove the .astylerc files from the users' home directories. The files must + be removed individually for each user.

+ +

Windows Version

+ +

Precompiled Executable

+ +

+ In addition to the source files, the Windows distribution package contains an Artistic Style Win32 executable + (AStyle.exe). If you prefer to compile the executable yourself, pursue the following instructions.

+ +

CMake Windows

+ +

+ Artistic Style has CMake support for Borland, and MinGW compilers. Other compilers will probably work if + the necessary options are set. Refer to the section on Compiler Options for + more information.

+

+ The console executable will run for both of the supported compilers. The DLL builds may not. CMake does not + fully support all Windows compilers. To build the DLLs it would be best to generate an IDE project file and + compile the DLLs with the IDE. The "build" folder contains project files for CodeBlocks and Visual Studio. +

+

+ Since the different builds use the same source files an "out of source" build should be used. The + default build for MinGW is a release version. A debug version must be specifically requested. For + Borland, a release build may need to be specifically requested, depending on the CMake release used. Borland + has been tested with the bcc32c free compiler. It may or may not work with other Borland compilers. The the following + options are available for building the various configurations.

+ + +
EXAMPLES
+ +

+ The following examples are assumed to be run from the astyle directory that contains + CMakeLists.txt. They show out of source builds that generate makefiles.

+

+ A path to the compiler executable + may need to be declared before compiling. And the Borland free compiler will need the compiler name. + To set the variables before compiling (replace the path names with the paths on your computer):

+
set PATH=C:\Program Files\CMake\bin;%PATH%
+set PATH=C:\Program Files (x86)\Embarcadero\BCC101\bin;%PATH%
+set CXX=bcc32c
+
+

+ To build the Borland console release version (the release build may need to be specified):

+
md  as-bcc32c-exe
+cd  as-bcc32c-exe
+cmake  -G "Borland Makefiles"  -DCMAKE_BUILD_TYPE=Release  ../
+make
+
+

+ To build the MinGW console release version:

+
md  as-mingw-exe
+cd  as-mingw-exe
+cmake  -G "MinGW Makefiles"  ../
+mingw32-make
+ +

As stated previously, the DLL builds may not work with the CMake generated makefiles.

+
INSTALL
+ +

+ The makefile install option installs the astyle executable and documentation files. The default is "C:\Program + Files (x86)\AStyle" for the executable and "C:\Program Files (x86)\AStyle\doc" for the documentation. + You may need to run as an administrator to install.

+ +

+ There is no uninstall. The uninstall must be done manually. Just remove the two folders indicated in the + Install.

+ +

CodeBlocks Windows

+ +

+ There are build folders for the following compilers. All compiler folders are in the "build" directory. +

+ + +

+ There are workspace and project files for each folder. All projects have at least Debug and Release configurations. + All output + will be in the "bin" directory.

+

+ The workspace contains the following projects.

+ +

+ For other Windows development environments, follow the instructions in + Other Development Environments.

+ +

Visual Studio

+ +

+ There are solution and project files for several versions of Microsoft Visual Studio. Open an Artistic Style solution + file in the appropriate "build" directory. All projects have Debug, Release and Static configurations. + Debug file output will be in the "debug" directory. Release file output will be in the "bin" + directory. Static file output will be in the "binstatic" directory. The following solution files are + available.

+ +

+ For other Windows development environments, follow the instructions in + Other Development Environments.

+ +

Other Makefile Targets

+ +

+ The following makefile targets are available for GCC, Clang, Intel, and Mac.

+ +
CLEAN
+ +

+ Removes the object and executable files for all configurations.

+

+ To remove the files for all configurations:

+
make clean
+
+ +
CLEANOBJ
+ +

+ Removes the object files for all configurations. The executables will not be removed.

+

+ To remove only the object files for all configurations:

+
make cleanobj
+
+ +
INSTALL
+ +

+ Installs the astyle executable and documentation files. The default is /usr/bin for the executable and /usr/share/doc/astyle + for the documentation. You must have the appropriate permissions to use install.

+

+ To install the astyle to the default directories:

+
sudo make install
+
+

+ To install astyle to a different bin directory set a value for the macro $(prefix). For example, to install the + executable to a user's home directory (/home/user/bin):

+
sudo make prefix=$HOME install
+
+ +
UNINSTALL
+ +

+ Uninstalls the executable and documentation. You must have the appropriate permissions to use uninstall.

+

+ To uninstall astyle from the default directories:

+
sudo make uninstall
+
+

+ To uninstall the files from a different directory set a value for the macro $(prefix). For example, to uninstall + the files from a user's home directory (/home/user):

+
 sudo make prefix=$HOME uninstall
+
+

+ NOTE: The uninstall option will NOT remove the .astylerc files from the users' home directories. The files must + be removed individually for each user.

+ +

Other Development Environments

+ +

+ To use other development environments project files usually must be built. CMake can be used if the development + environment is supported. Otherwise, use the development environment to create files.

+ + +

Compiler Options

+ +

+ No macro definitions are required to compile the executable. To compile as a static or shared (dynamic) library + define the macro ASTYLE_LIB. To compile a Java shared (dynamic) library define the macro ASTYLE_JNI. The + option ASTYLE_NO_EXPORTS is sometimes needed for static libraries to prevent compiler error and warning + messages. Use the appropriate compiler and linker options to compile the static or shared library. Add debug + options to compile the debug versions.

+

+ Artistic Style is a small program and it is best to optimize for speed. The debug configurations are not usually + optimized. To optimize for speed in the release configurations, use the macro NDEBUG to remove asserts. If + necessary, use an option to activate the C++11 standards (-std=c++11 or -std=c++0x on most compilers). Use an + 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.

+

+  

+ +

+ + +

+ +

+  

+

+  

+ + + + + diff --git a/AStyle/doc/links.html b/AStyle/doc/links.html new file mode 100644 index 00000000..20709786 --- /dev/null +++ b/AStyle/doc/links.html @@ -0,0 +1,231 @@ + + + + + + Artistic Style - Links + + + + + + + + +

Artistic Style Links

+ +

+  

+ +

Programs Using Artistic Style

+ +

+ The following development environments use Artistic Style as a contributed add-on. It is either embedded in the + application or called as a command line program.

+

+ Some of the programs are using old versions of Artistic + Style. Be sure to check the AStyle version before using.

+

+ Atom is a free and open-source + text and source code editor for OS X, Linux, and Windows. Artistic Style can be added as a plug-in. Search for + formatter-astyle and follow the instructions.

+

+ Dev-Cpp + is a new and improved fork of the original Bloodshed Dev-C++. It is a free IDE for programming in C and C++. It + is bundled with, and uses, the MinGW or TDM-GCC port of the GCC as its compiler. It is currently Windows only. + The Artistic Style interface includes a live Preview window.

+

+ CodeBlocks is + a multi-platform, open source, C++ development environment based on wxWidgets. It has support for multiple compilers and plug-ins for wxWidgets + development.

+

+ CodeLite is an + open source, free, cross platform IDE specialized in C, C++, PHP and JavaScript. It supports all major + compilers. There is support for wxWidgets and includes a class + generator and a unit test program generator. Code completion is based on Ctags. Also available at this site is wxCrafter, a RAD tool for development of wxWidgets based applications. +

+

+ jEdit is a programmer's + text editor written in Java + that runs on any operating system with Java support. A large collection of plug-ins is maintained by a world-wide + developer team. AStyle + is available as a formatter plug-in.

+

+ KDevelop is a + multi-platform, integrated development environment for building + KDE applications. It supports many programming languages and can be used to develop applications other + than KDE.

+

+ Monkey Studio + is a cross platform IDE written in C++/Qt. Its primary goal was to be a Qt only IDE, but it evolved into a way to support Qt development and any kind + of project.

+

+ Qt Creator is a + cross-platform integrated development environment tailored to the needs of Qt developers. Artistic Style is available as a + beautifier plug-in. + It can format source code within the editor or format an entire project. There is a help display available to + show the effect of each option.

+

+ SciTE + is a Scintilla based source code editor. Originally built to demonstrate Scintilla, it has grown to be a generally useful editor with facilities + for building and running programs. It is currently available for Windows, Linux, and Mac OS operating systems. + The Linux and Mac versions are based on GTK+.

+

+ Sublime Text + is a is a sophisticated text editor for code, markup and prose that includes Artistic Style as a plug-in. Nearly + everything in Sublime Text is customizable with simple JSON files. The plug-ins are Python based. + Sublime Text is available for Mac OS, Windows and Linux.

+

+ tIDE + is a full featured open source + Java based integrated development environment. It is a small, powerful, quick, efficient, easy and open + framework to create 100% Java applications.

+

+ UltraEdit is + a commercial programmer's text editor for Microsoft Windows, Linux and Mac OS. It can be evaluated for free + for 30 days. Artistic Style is included in the Tools Toolbar. It includes an options dialog. The number of indent + spaces is passed to Artistic Style is based on the Indent Spaces value defined under Word Wrap/Tab Settings in + Configuration based on the file extension of the active file.

+

+ Visual Studio, + AVR Studio and Atmel Studio are integrated development environments that use + AStyle Extension. This is an extension written in C# that formats + C/C++ and C# source code using Artistic Style. It can be installed in Visual Studio using the "Tools" + > "Extensions and Updates" menu. Search the "Online" entry for "astyle". The + source code is available on + GitHub.

+

+ Visual Studio Code + is a programmer's code editor from Microsoft. It has an AStyle Extension that will format source code using Artistic Style. + It can be installed from the Extensions panel in VS Code by searching for "astyle". Or it can be downloaded + and installed from the Visual + Studio Marketplace. Select the "Visual Studio Code" tab and search for "astyle". It + adds entries to the default settings file which must be updated in the user settings file. +

+ +

+ + WinMerge 2011 is a fork of the original WinMerge application published on SourceForge + by Thingamahoochie Software. It is a free software tool for data comparison and merging of files. It is useful + for determining what has changed between files and merging changes between versions. The ATL/MFC + dependencies have been removed  and some useful features have been added. It uses Artistic Style to format + the source code.

+ +

Graphical User Interfaces

+ +

+ Artistic Style is a command line program and, as such, does not give you a chance to review the effect of different + options before formatting the source code. The following Graphical User Interface program will allow you to review + the changes before the code is updated. They allow you to select the options you want without actually updating + the source.

+

+ Artistic + Style Wx is a GUI test program using wxWidgets. It uses an unmodified Artistic Style program + in a multi-platform environment. Everything done in the editor is undo-able, including formatting of the entire + document. Documents can be reviewed and reformatted using different options. A preview window shows the effect + of each option. The downloads contain source code, documentation, and an executable for the Windows version. +

+ +

Other Programs

+ +

+ These programs were mentioned in previous versions of the News + or other documentation. They are included here for reference.

+

+ Google Test + and Google Mock are frameworks for writing C++ tests on a variety of platforms. Based on the + xUnit architecture, it supports automatic test discovery, a rich set of assertions, user-defined assertions, death + tests, fatal and non-fatal failures, value- and type-parameterized tests, various options for running the tests, + and XML test report generation. Google Mock is a library for writing and using C++ mock methods.

+

+ Highlight + converts source code to formatted text with syntax highlighting. Output is in several formats including HTML. + It supports over 160 programming languages and includes 80 color themes. Highlight is used for the examples in + the "Developer Information" section.

+

+ Python Tools for Visual + Studio is a free, open source plug-in that turns Visual Studio into a Python IDE. It can be switched + between Python versions or different Python interpreters. It uses the Visual Studio integrated debugger that enables + you to set break points, step through functions, change the current statement, inspect local variables, and perform + other operations while debugging.

+ +

+ whatstyle + finds a code format style that fits given source files. The program looks at your source code and generates a + style definition that fits its original formatting as closely as possible. Several formatters and several programming + languages are supported.

+ +

Information

+ +

The following links contain general information on coding and coding styles.

+ +

+ Indent Style + at Wikipedia discusses the common indent styles used in programming. The basic criteria for most Artistic Style + predefined styles were taken from this discussion.

+

+ Programming + style at Wikipedia is a set of rules or guidelines used when writing the source code for a computer + program. It is often claimed that following a particular programming style will help programmers to read and understand + source code conforming to the style, and help to avoid introducing errors.

+ +

Style Guides

+ +

+ Chromium + style guide generally follows the Google Style Guide but has extensions beyond the Google style + guide. There is interesting information on common C++ Do's and Don'ts.

+

+ Google style + guides have Google's standards for several programming languages along with a python program + to verify the style and an Emacs script for using the style.

+ +

+ + Kdelibs Coding Style describes the recommended coding style for kdelibs. It follows the Qt 4 + coding style, with one main difference.

+

+ LLVM coding standards + describe a few coding standards that are being used in the LLVM source tree.

+

+ + Mozilla’s style guide explains the basic styles and patterns that are used in the + Mozilla codebase.

+

+ Qt Coding Style + is an overview of the coding conventions used when writing Qt code.

+ +

Other Links

+ +

+ These links were mentioned in previous versions of the News. They are included here for reference.

+

+ Install Instructions for .NET Framework SDK + are instructions for adding x64 platforms to Visual Studio Express 2010. Express editions after 2010 have the + x64 platforms already installed. Visual Studio 2010 is the last edition that will work on Windows XP (platform + 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.

+

+  

+ +

+ +

+ +

+  

+ + + + diff --git a/AStyle/doc/news.html b/AStyle/doc/news.html new file mode 100644 index 00000000..12f0109e --- /dev/null +++ b/AStyle/doc/news.html @@ -0,0 +1,742 @@ + + + + + + Artistic Style - News + + + + + + + + +

Artistic Style News

+ +

+  

+ +

Artistic Style 3.1  (January 2018)

+ +

+ The Windows default option file location has been changed from USERPROFILE to APPDATA. This + moves the file from the User directory and to the user's hidden AppData\Roaming directory. The + USERPROFILE location has been depreciated and will be removed in a future release. You will need to relocate the + options file manually, Artistic Style will not change it. If the options file is in both locations, the new APPDATA + location will be used.

+

+ The console build now accepts option file input encoded in UTF-16, or UTF-8 with a Byte Order Mark (BOM or signature). +

+

+ New options, "break-return-type" and "break-return-type-decl", will break the return type + from function definitions and function declarations. Additional new options, "attach-return-type" and + "attach-return-type-decl", will attach the broken return types to function definitions and function + declarations. There is more information in the "Formatting Options" section of the documentation. +

+

+ A new option, "style=ratliff", has been added as an alternate for banner style.

+

+ Several changes have been made to Objective-C which will improve formatting in certain cases.

+

+ CMake can now be used to compile the AStyle builds. It is run from the top level folder instead of the + "build" folder, and builds a Release configuration by default. The "Install Information" + contains additional information.

+

+ When formatting files from the command line, multiple file extensions may now be used. The file + extensions should be separated by commas or semicolons. For example, to format C++ files, use + "astyle /home/project/*.cpp,*.h". This will change the processing sequence to format all requested files + in a directory rather than formatting a directory once for each file extension. There is additional information + in the "Usage" section of the documentation. +

+

+ New options "project", "project=####", and "project=none"will allow the use of an + optional project option file. This may be used to supplement or replace the command line options and the default + option file. The file is identified by a file name only and resides in the top level folder of a project. The + default file names are .astylerc or _astylerc. A specific file name may also be specified. Instead of an + option, the environment variable ARTISTIC_STYLE_PROJECT_OPTION may be used. Using the environment variable + will make the project file the default for all projects. When formatting files in a project, the project option + file will be obtained from the files directory or a parent directory. The documentation has the details + in the "Option Files" section. The "project" option is described in the + "Command Line Only" section.

+

+ Allowing both option files enables them to be used for different purposes. For example, the default + options could contain the file formatting options and the project options could contain the excludes for the + given project. The order of precedence, highest to lowest, is command line options, project options, and default + options. Options with a value (e.g. style=kr, indent=spaces) may be replaced by an option with a higher precedence. + The binary options (indent-classes, pad-oper) cannot be changed. Once they are set they stay set. Both the + default and project option files may be disabled if they are present and not required. When testing the + option files, the options "verbose" and "dry-run" may be used. The option files used + will be displayed by the "verbose" option.

+

+ When making changes to more than one file in a project, it may be desirable to format an entire folder. Wildcards + may be used in a single folder without recursive. The current directory is used if a path is not given. So, + for example, to format all changed files in the current directory using the project options, use the command: + "astyle --project -A9s *.cpp,*.h". This example uses the project option file .astylerc + or _astylerc and overrides the project options with the command line -A9s options.

+

+ Language translations have been added for the new project option file. A few of the other messages were changed + as well. If there is a better translation available report the change as a bug report. Be sure to include the + new translation. Translations are in the ASLocalizer.cpp file.

+

+ A new virtual method, getPeekStart(), has been added to the pure virtual class ASSourceIterator. If you have + inherited this class to access the formatter, you will need to add a method similar to getPeekStart() in the + ASStreamIterator class in astyle_main.h.

+

+ The Artistic Style source code has been fuzz tested with American Fuzzy Lop (AFL) and libFuzzer from Clang. This + will help prevent crashes caused by invalid input. There were about 30 corrections made to the source code. Most + of the crashes were caused by asserts which would not be present in a release version. There were a couple of + corrections that required logic changes. The changes should not affect the way the code is formatted.

+

+ The documentation file, astyle.html, now has a sticky button in the lower right corner. It appears after you + have scrolled past the Contents section. It is labeled "Top" but actually takes you back to the Contents. + The purpose is to improve speed in navigating the document.

+

+ Thanks to Rian Quinn, David Haney, and Tamás Kurucsai for their contributions.

+ +

Artistic Style 3.0  (April 2017)

+ +

+ Release 3.0.1 (May 2017) is a maintenance release and no new features were added. A list of changes is in + the Release Notes. The following information is for the original 3.0 release. Thanks to Juan Alday for his + contribution.

+ +

+ In the Artistic Style documentation, in General Information, Other Considerations, there is a list of + terminology used for special characters used in programming. The terms used by Artistic Style have been + different than is used by Visual Studio, Clang, and others. In this release the terms used by Artistic Style + have been changed to the ones most commonly used in programming documentation. The following chart indicates + the changes.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NEWOLD
braces or curly braces    { }    brackets
parens or round brackets    ( )    parens
square brackets    [ ]    block parens
angle brackets   < >    angle brackets
+
+ +

+ Parens and angle brackets do not change. Brackets has been changed to braces. Block parens has been changed to + square brackets. Brackets can now collectively refer to the group containing round brackets (parens), square brackets, + and angle brackets. The documentation has been updated and the variable names in the source code have been + changed.

+

+ There are four options affected by the change, "break-closing-brackets", "add-brackets", "add-one-line-brackets", + and "remove-brackets". These have been changed to the corresponding "break-closing-braces", + "add-braces", "add-one-line-braces", and "remove-braces". Also, the option "max-instatement-indent" + has been changed to "max-continuation-indent". The old options and method names have been depreciated, + but will continue to be accepted for the next several releases.

+

+ The source code now uses the C++11 standard. Compilers that need a standard declared should use C++11. Visual + Studio 2010 is currently still currently supported. The classes were made independent of the containing + source code files (the source files contain multiple classes). The dependency on global variables in the console + build was removed.

+

+ A new option, "indent-after-parens", will indent continuation lines following lines that contain an + opening paren '(' or an assignment '='. This includes function definitions and declarations + and return statements. This option may be preferred for editors displaying proportional fonts.

+

+ A new option, "attach-closing-while", will attach the closing "while" of a + "do-while" statement to the closing brace. It has precedence over both the brace style and the break + closing braces option.

+

+ The option "break-closing-braces" has been included in "style=stroustrup". This is the + correct style according to Wikipedia. The new option "attach-closing-while" is not included in + the style but can be used if you want. If there is a problem with the new format, change to the K&R style + using the same options as for Stroustrup.

+

+ If you are using Windows XP, there is a download file available that has an XP compatible executable. Artistic + Style will still compile with Visual Studio 2010.

+

+ Thanks to Jochen Tucht and Matthew Woehlke for their contributions.

+

+ The following are additional topics.

+ +

Version 3

+ +

+ Artistic Style was written in the 1990's when personal computers were much slower and compilers were not as + sophisticated as today. It used a lot of global variables instead of class members. In previous releases, classes + were created for the astyle_main.h source code. With this release, the classes have been made independent + of the source file containing them and the shared and global data has been eliminated. The classes could now be + separated into separate source files. They have not been actually separated because it seems more convenient + to leave them combined.

+

+ As explained previously, the terminology for special characters has been changed to agree with various + development environments and compilers. The variable and method names in the source code were changed as well + as the documentation. This was a major renaming. If not for the "rename" refactoring feature in Visual + Studio, and the AStyleTest programs, it would probably not have been attempted.

+

+ Artistic Style has also started using C++11. Older compiler versions and compilers without C++11support cannot + be used. If your compiler requires a compiler directive for C++, such as -std=c++11 or -std=c++0x, it will + need to be used.

+ +

Library File Names

+ +

+ The shared library object (DLL) compile was originally intended to be a local library used by a single program. + Users could update the library at their convenience. Recently, it has started being distributed as a system library + for some distributions. In the past was not maintained for doing this. Since it is already being offered as + a distribution, the library soname on Linux has been standardized.

+

+ It can still be used as a local or a static library if you want to control the changes. Or the system library + can be used. The system library version, of course, may change at any time. With this release the system + library will be available on Debian based systems, as well as possibly others.

+

+ The Windows library name has been changed also. This Windows version is AStyle30.dll. The "30" refers + to the Artistic Style release number "3.0". The Linux library name is a soname version number, not the + Artistic Style release number.

+ +

Artistic Style Wx

+ +

+ There is a new GUI test program AStyleWx that uses wxWidgets. This replaces the old AStyleWin program. AStyleWx + is multi-platform and has more features simply because they are easier to implement with wxWidgets.

+

+ It has download files and a website in a new sub-project directory of Artistic Style. The downloads contain + source code, documentation, and scripts. The Windows download contains an executable. The needed Artistic Style + source files are included.

+

+ It is licensed under the MIT license. The source code may be used and modified for any purpose you + choose. Developers using Artistic Style in another project may use any part of AStyleWx in their project. The + modified source code does NOT need to be made available to others.

+ +

Code::Blocks Support

+ +

+ Code::Blocks is a free, open-source cross-platform IDE that supports multiple compilers. It currently gets over + 100,000 downloads per week. It is used by Artistic Style to test compilers on various systems. Code::Blocks build + files for several free compilers are now provided with the Artistic Style release. The "Install Information" + contains additional information.

+ +

Embarcadero Compiler

+ +

+ Embarcadero is offering a new, free, BCC32C C++ compiler. It includes C++11 language support, the Dinkumware + Standard Template Library, and the Embarcadero Runtime Library. Included are a linker, a + resource compiler, and a number of command line tools. It is currently for Win32 only. There is more + information at their Free Tools web page. They are also currently offering a free debugger and two + different + development environments.

+ +

Naming Conventions

+ +

+ If you use cppcheck, it has an add-on to check naming standards for functions and variables by using regular + expressions. Cppcheck must be run first to generate ".dump" files. The Python program, naming.py, + can then be run to check the names. It is basically a shell that you will probably want to modify for regular + use. The add-ons must be installed with cppcheck for naming.py to be available.

+ +

WinMerge 2011

+ +

+ WinMerge 2011 is a fork of the original WinMerge application published on SourceForge by Thingamahoochie + Software. It is has removed the ATL/MFC dependencies and added some useful features. It uses Artistic Style + to format the source code.

+ +

Whatstyle

+ +

+ Whatstyle finds a code format style that fits given source files. This program looks at your source code and + generates a style definition that fits its original formatting style as closely as possible. + Several formatters and programming languages are supported. It is written in Python and has an interesting + method for finding the style options. +

+ +

Artistic Style 2.06  (December 2016)

+ +

+ A new bracket style option, "style=mozilla", has been added. It uses linux brackets with + opening brackets broken from classes, structs, enums, and function definitions. Brackets are attached to everything + else, including namespaces, arrays, and statements within a function.

+

+ A new option, "break-one-line-headers" will break a header (if, while, else, etc...) from a following + statement on the same line. There is more information in the "Formatting Options" section + of the documentation. +

+

+ A new option, "pad-comma", will add a space following a comma. The option "pad-oper" + has not been changed and will also add a space following a comma.

+

+ A new option, "indent-continuation", will add extra indents to continuation lines following a line that + ends with an opening paren '(' or an assignment '='. This includes function definitions and declarations. + There is more information in the "Indentation Options" section of the documentation.

+

+ All spaces before a comma are now removed. Use the "disable formatting" comment tags if there are arrays + with vertical alignment where this is not wanted.

+

+ A correction has been made to the Pico style indentation of one line blocks. And there is a fix to always compute + the indentation of a one line block. If you use Pico style with an indentation greater than 2, you may have a + lot of changes made to the code.

+

+ New Objective-C options "pad-return-type" and "unpad-return-type" will add or remove space padding after + the Objective-C return type in a method definition. They are described in the "Objective-C" section of the + documentation.

+

+ New Objective-C options "pad-param-type" and "unpad-param-type" will add or remove space padding after + the Objective-C parameter type in a method definition. They are described in the "Objective-C" section of the + documentation.

+

+ The Objective-C "align-method-colon" option is now applied to Objective-C method calls in + addition to method declarations and definitions. The method call colons will be aligned, if possible. If this + option is not declared, the method calls will align on the first keyword. See the astyle documentation for an + example.

+

+ The Objective-C "align-method-colon" has been changed for long keywords. + For multi-line arguments when the first keyword is shorter than the others the colons are aligned on the + longest line instead of the first line. The alignment includes room for the indentation. This aligns all colons + after the first line for a better appearance. Arguments that do not have a short keyword in the first line will + remain the same. This style conforms to the Google Objective-C style.

+

+ Processing for C++14 single-quote digit separators has been added.

+

+ Translations have been added for Bulgarian, Estonian, Greek, Hungarian, Norwegian, and Romanian. The translations + were 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-Translation pair. If you correct + a translation, send the source as a bug report and it will be included in the next release. To add a language, + see "Internationalization" in the "General Information" section of the documentation.

+

+ The C# example, in the Developer Information has been updated. Objects for the AStyle callback functions are no + longer required. These have been removed and the delegates used instead.

+

+ There is a new C# example in the Developer Information, that loads the AStyle shared library using explicit linking. + This allows the shared library name to be dynamically changed so that a program compiled with "Any CPU" + can load + either a 32-bit or 64-bit shared library at run-time. It runs on both Windows and Linux.

+

+ Visual Studio Code, the text editor from Microsoft, has an Artistic Style extension. The extension runs from the + Visual Studio Code menu and is controlled by entries in the User Settings file. It can be installed from Visual + Studio Code. There are links to the websites on the Artistic Style Links page.

+

+ Thanks to David Faure for his contribution.

+

+ The following are additional topics.

+ +

New Software License

+ +

+ The Artistic Style software license has changed. It is now under the MIT license. This is a permissive license + which can be used in proprietary software and does NOT require modified Artistic Style source code be made available. + It is compatible with the GNU General Public License (GPL) and most other software licenses. The change was made + to remove restrictions on using the software and to make it available for any project that wants to + use it.

+ +

Visual Studio 2015 and 2017 UTF-8 Files

+ +

+ In order to be used on both Linux and Windows, the ASLocalizer.cpp UTF-8 file in Artistic Style does not + contain a Byte Order Mark (BOM).  With Visual Studio 2015 there has been a change in how UTF-8 files + without a BOM are processed. The new procedure is described + here. It affects only the language translations in the ".exe" + file. The shared libraries and static libraries are not affected. It is necessary only if you are using a translation + other than English.

+ +

+ In addition to the "auto detect" option in Tools > Options... > Text Editor > General, an + additional compiler option is required. The option "/source‑charset:utf‑8" must be added + to the project properties at C++ > Command Line > Additional Options. Since the non‑unicode files + in Artistic + Style are ASCII, the option can be applied to the entire project instead of just one file. This option has been + added in the files distributed with Artistic Style. There is also a new "/validate‑charset" option, + which gets turned on automatically with the above option. This switch enables the validation of the UTF-8 input + files.

+

+ This compiler option was not available until Update 2 of Visual Studio. If you are using an earlier version of + 2015, a BOM should be added to the file using File > "Advanced Save Options". Change the encoding + to "Unicode (UTF-8 with signature) - Codepage 65001".

+

+ In the above "Visual C++ Team Blog" Microsoft mentions that in a future major release of the compiler, + they would like to change the default handling of BOM-less files to assume UTF-8.

+ +

Assignment Operator Alignment

+ +

+ Visual Studio 2013 and 2015 have an Edit option "Align Assignments" that will align assignment operators + across multiple lines. There is also an extension named "Code alignment" that will align the code on + other items as well. Other development environments may have something similar. These will selectively align the + data and allow for customization of the format.

+

+ These options and extensions can be used with Artistic Style. If you choose to do this, the space padding will + be maintained and the alignment will be preserved.

+ +

Coding Styles

+ +

+ Coding style, or programming style, is a set of rules or guidelines used when writing the source code. It is + often claimed that following a particular programming style will help in reading and understanding source code + conforming to the style, and help to avoid introducing errors.

+

+ This Artistic Style distribution has a new "file" folder containing AStyle options files for various + coding styles. Using the option files will give approximately the indicated coding style. The files can be used + as they are, or modified as desired.

+ +

Artistic Style Wx

+ +

+ There is a new GUI test program AStyleWx that uses wxWidgets. This replaces the old AStyleWin program. AStyleWx + is multi-platform and has more features simply because they are easier to implement with wxWidgets.

+

+ It has download files and a website in a new sub-project directory of Artistic Style. The downloads contain + source code, documentation, and scripts. The Windows download contains an executable. The needed Artistic Style + source files are included.

+

+ It is licensed under the MIT license. The source code may be used and modified for any purpose you + choose. Developers using Artistic Style in another project may use any part of AStyleWx in their project. The + modified source code does NOT need to be made available to others.

+ +

Windows XP

+ +

+ The executable in the Windows distribution package is now compiled with a Visual Studio version that will no + longer work on Windows XP. Beginning with Visual Studio 2012, auto-vectorization tries to make loops run + faster by automatically vectorizing the code. Auto-vectorization is on by default, and there are no compiler + switches, #pragmas, or hints to disable it. It uses SSE instructions not available in Windows XP. Microsoft ended + support and updates for XP on April 8, 2014, and the usage share percentage continues to decrease.

+

+ To compile on a non-XP machine for use on XP, using a compiler other than Visual Studio should always + produce an XP executable. Using Visual Studio 2010 or earlier should always produce an XP executable. If + you are using Visual Studio 2012, 2013, or 2015 on a non-XP machine, do the following for the Artistic Style + configuration you want to use:

+ +

+ In newer releases of Visual Studio 2015, the "Universal CRT" files have been moved. There is a + notification here. + To compile using XP there may need to be additional include and library directories added. If the compile gets + errors add the appropriate directories to the project properties.

+ +

Artistic Style 2.05  (November 2014)

+ +

+ Release 2.05.1 (December 2014) is a maintenance release and no new features were added. A list of changes is in + the Release Notes. The following information is for the original 2.05 release.

+ +

+ A new bracket style option, "style=vtk", has been added. It uses indented brackets, like Whitesmith, + except opening brackets for classes, functions, and methods are not indented. A complete description of the VTK + style is available at the "Visualization Toolkit" website (http://www.vtk.org/).

+

+ A new preprocessor indent option "indent-preproc-block" will indent preprocessor block statements one additional + indent. The block must be top-level, or included within a namespace, and there are restrictions on what can be + indented. + The option is described in the "Indentation Options" section of the documentation.

+

+ A new option, "dry-run", will run Artistic Style without updating the files. The report will be output as + usual.

+

+ Formatting of source code may now be disabled for portions of a program by embedding special comment tags in the + program. These are described in a new "Disable Formatting" section of the documentation. They work the + same as in other formatters. There are tags to disable formatting for a block of code, and a tag to disable formatting + of a single line. This should allow any custom formatting to be retained.

+

+ The product version number has been added to the filename of shared library (DLL) compiles. This will allow multiple + versions of a shared library on the same system without conflicts.

+

+ An attribute '__attribute__ ((visibility ("default")))' has been added to exported functions + on Linux shared libraries. This allows the option "-fvisibility=hidden" to be used on dynamic library + compiles. According to the GNU documentation, "Using this feature can very substantially improve linking + and load times of shared object libraries, produce more optimized code, provide near-perfect API export and prevent + symbol clashes. It is strongly recommended that you use this in any shared objects you distribute."

+

+ Improvements have been made in the formatting of C++11 uniform initializers (enclosed by brackets). The opening + bracket will not be space padded unless it is padded initially. The closing bracket will not be broken from the + final line unless it is broken initially. And the known problems with uniform initializers in class constructors + have been fixed.

+

+ The Windows compiler definition ASTYLE_NO_VCX (no Visual Studio exports) has been changed to ASTYLE_NO_EXPORTS. + It is sometimes needed for static libraries on other compilers to prevent error and warning messages.

+

+ Qt and Boost macros foreach, forever, Q_FOREACH, and Q_FOREVER will now be recognized as headers.

+

+ The main documentation for Artistic Style is in HTML format. Until now there has not been a way to display it + from the astyle console program. A new option, "html" or "-!" will display the help documentation in the default + browser. This documentation is more complete than the astyle "help" option. It includes examples, and has an index + for easier navigation. Since astyle is typically run from a script this should allow an easy way to access the + documentation. The option is available only from the command line.

+

+ The new "html" option assumes the documentation is installed in the standard install path. This is /usr/share/doc/astyle/html + for Linux and the path %programfiles%\AStyle\doc for Windows. If it is installed to a different directory, use + the variation "html=<actual_install_path>astyle.html. This option can also be used to open other HTML files. + More information is in the "Command Line Only" section of the documentation.

+

+ The "html" option on Linux uses the script "xdg-open" from the install package "xdg-utils" to find the default + browser. This should be available on most systems.  If it is not available on your system you can file a + bug report requesting a change. It would be helpful if you could determine how it is done before filing the report. + You can also file a bug report if the documentation is not installed to the above "default" directories. The HTML + documentation takes quite a bit of effort to maintain and I would like to make it easily available.

+

+ The "help" option has been changed to send the output to stdout instead of stderr. This will allow piping and + redirection of the output. A common way to use the option on Linux is "astyle --help | less", which + will page the display. The "version" option has also been changed to stdout.

+

+ A shared library error handler argument has been changed from "char*" to "const char*". In + some cases this may cause compile errors in a user program until the references have been changed.

+

+ The "Indent Style" topic on Wikipedia states that the "ANSI" style refers to K&R style brackets + and not Allman style as used by Artistic Style. The option "style=ansi" is therefore being deprecated and will + be removed in a future release. Use one of the other long options instead (style=allman, style=bsd, or + style=break).

+

+ Some of the documentation has been removed from the distribution package. It still contains all files needed to + install and run Artistic Style. The included files can be used without an Internet connection.

+

+ There are now build files available for Xcode on Mac. The makefile is still available for those who want it. Both + now use the LLVM Clang compiler. There has been a + change to the makefile debug locations to make them similar to Xcode. The "Install Instructions" have + been updated for both.

+

+ The Python Example in the Developer Information now supports Iron Python. The + programming instructions are sometimes different since the ctypes module works differently. The example script + documents the differences. If you use Python Tools for Visual Studio, it now installs in the Express editions + (beginning with release 2.1). Node.js can also be installed in Visual Studio Express.

+

+ The executable in the Windows distribution package is now compiled with Visual Studio 2013 and will no longer + work on XP. If you are using XP, Artistic Style will need to be recompiled on the XP machine.

+

+ A new Visual + Studio Community Edition has been released. It is free, combines all of the Express editions into a single + development environment, and allows the addition of Visual Studio extensions. There is an + AStyle Extension available for installation. It has a graphic interface, adds + menu entries, and can be used from within Visual Studio. To install it search the "Extensions and Updates", + "Online" entry for "astyle".

+

+ Thanks to Peter A. Bigot, HyungKi Jeong, David Faure, and Carl Moore for their contributions.

+ +

Artistic Style 2.04  (November 2013)

+ +

+ 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.

+

+ A new programming language, Objective‑C, has been added to Artistic Style. Four new options, "align‑method‑colon", + "pad‑method‑colon=", "pad‑method‑prefix", and "unpad‑method‑prefix" have been + added to format the methods. The options are described in a new "Objective‑C" section in the documentation. + These new options affect only Objective‑C source code. They have no effect on the other programming + languages.

+

+ Because of the longer continuation indents sometimes needed for Objective‑C, 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.

+

+ A new bracket style option, "style=google", has been added. It uses attached brackets and indents the class access + modifiers one-half indent.  A complete description of the Google style is available at the google‑styleguide + website (https://code.google.com/p/google-styleguide/). The website has standards for several programming languages + along with a python program to verify the style and an emacs script for using the style.

+

+ A new indent option "indent-modifiers" will indent class access modifiers (public, protected, or 'private) one-half + indent. The rest of the class is not indented. It is described in the "Indentation Options" section of the + documentation.

+

+ Four new bracket modify options, "attach-namespaces", "attach-classes", "attach-inlines", and "attach-extern-c", + can be used to modify your selected bracket style. They are described in a new "Bracket Modify Options" section + of the documentation.

+

+ A new option, "remove-brackets", will remove brackets from conditional statements. The statement must be a single + statement on a single line. It is described in the "Formatting Options" section of the documentation.

+

+ A new option, "indent-preproc-cond", will indent preprocessor conditional statements (#if #elif, #else, #endif). + It is described in the "Indentation Options" section of the documentation. The option "indent-preprocessor" has + been deprecated and will be removed in a future release. Use "indent-preproc-define" instead. The processing of + preprocessor #define statements has not changed.

+

+ A new option, "remove-comment-prefix", will remove a leading '*' from multi-line comments. It is described in + the "Formatting Options" section of the documentation. With the syntax coloring of modern editors a leading '*' + for comment lines is not as useful as it once was. The current trend is toward code that is easier to maintain. + The idea is that a style that is hard to maintain will discourage modification and updating. The converted style + should retain most of the formatting within the comment and result in a comment that is easier to maintain. For + consistency the option also indents multi-line comments that are not preceded by the '*'. This may slightly modify + the indentation of any commented-out code.

+

+ The option "pad-first-paren-out" was fixed to not pad if the following paren is empty. This makes the option consistent + with "pad-paren-out". To fix empty parens that have been padded run with the option "unpad-paren" in addition + to "pad-first-paren-out". This needs to be done only once.

+

+ Processing of C++11 raw string literals has been added.

+

+ The compiler definition ASTYLE_NO_VCX (no Visual Studio exports) has been changed to ASTYLE_NO_EXPORTS and can + be used with any Windows compiler. The Clang compiler needs this option to avoid errors on dynamic libraries. + It removes the "__declspec(dllexport)" + definition from exported functions. Linux compilers do not use this.

+

+ A new shared object (DLL) entry point, AStyleMainUtf16, has been added for processing C# UTF-16 strings. C# does + not have built in functions for converting the UTF-16 strings to UTF-8. This entry point will accept UTF-16 strings, + format the source code, and return UTF-16 strings. The error handling function and version number still use UTF-8 + strings. The C# example program in the "Developer Information" shows the new calling procedure. Changes from the + previous release are marked in the example.

+

+ C# strings are UTF-16 on both Windows and Linux. C# does not use the UTF-32 wchar_t strings on Linux. Qt also + uses UTF-16 on both Windows and Linux, but has built in UTF-8 conversion functions. Qt strings can be converted + to UTF-8 by Qt, or the new entry point can be used. There may be other "managed code" applications on Linux that + use UTF-16.

+

+ The "Links" page has two new sections for links mentioned in previous versions of Artistic Style. It links to + free software and other information.

+

+ The "Developer Information" section has a new example and download for calling Artistic Style from an Objective‑C + 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‑C on Windows + and Linux" which has information on compiling and running the example on those systems.

+

+ The executable included in the Windows distribution was compiled with Visual Studio 2010 (platform toolset v100). + Higher releases contain dependencies on Windows API functions that exist only on Windows Vista, Windows 7, and + Windows 8. This means that applications built with a Visual Studio 2012 C++ compiler would fail to load and execute + on Windows XP.

+

+ If you are using Windows Vista or higher, and have a Visual Studio 2012 or higher compiler available, recompiling + will probably result in faster execution. If you use a compiler other than Visual Studio, you can probably get + better execution by compiling using the C++11 standards. Artistic Style uses a lot of string vectors and the new + move semantics will probably result in faster execution.

+

+ Thanks to Evmenov Georgiy, Matthew Woehlke, Jiang, Ruzzz, and beta100100 for their contributions.

+ +

Artistic Style 2.03  (April 2013)

+ +

+ 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.

+

+ A new option, "max-code-length=#" or "xC#", will limit the length of code on a line. A new option "break‑after‑logical", + or "xL", will modify a line break for conditionals. See the documentation for details.

+

+ A new option, "pad-first-paren-out" or "xd", will pad only the first paren in a series on the outside. See the + documentation for details.

+

+ A new option, "indent=force-tab-tab=#" or "xT#", will allow force tab indents with a tab length that is different + than the indent length. See the documentation for details.

+

+ The short option for delete-empty-lines has changed from "xd" to "xe".

+

+ The C++11 standard for range-based "for" loops, "enum" with a base type, and rvalue references is now supported. + The formatting of rvalue references is determined from the existing "align-pointer" and "align-reference" + options.

+

+ Closing the ending angle brackets of templates is now allowed by the C++11 standard. A new option, "close-templates" + or "xy", will close the whitespace in the angle brackets of template definitions. Be sure your compiler supports + this before making the changes.

+

+ The C/C++ keyword 'extern "C"' in a preprocessor no longer causes an extra indent.

+

+ Formatting of C++/CLI managed pointers (the '^' character) has been added to the "align-pointer" + option.

+

+  The breaking of switch "default" statements has been fixed. The "default" statements + that have been incorrectly broken will be fixed in this release.

+

+ The byte order mark (BOM) has been removed from ASLocalizer.cpp for all platforms. The encoding of the file is + UTF-8. Many Windows editors can now recognize UTF-8 encoding without the BOM. Visual Studio has an option that + needs to be set. With others, such as CodeBlocks, identification is automatic. On Linux, UTF-8 is the default + encoding.

+

+ Translations have been added for Dutch, Finnish, Italian, Japanese, Korean, Polish, Portuguese, Russian, Swedish, + and Ukrainian. The translations were 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‑Translation + pair. If you correct a translation, send the source as a bug report and it will be included in the next release. + To add a language, see "Internationalization" in the "General Information" section of the documentation. Send + the addition as a bug report and it will be included in the next release.

+

+ There is a new Linux makefile for the Clang Compiler. Clang is a free compiler can be installed as a package on + many Linux distributions. Some of its features are fast compiles, low memory use, expressive diagnostic messages, + and GCC compatibility. It includes a static analyzer tool that finds potential bugs in your source code. An experimental + version can be installed on a Windows platform. There is more information in the Install Information + documentation.

+

+ Visual Studio automatically creates an import library and an export file when you link a program that contains + exports. It will do this for even a static library if it contains a __declspec(dllexport) definition. The Artistic + Style library (ASTYLE_LIB) build contains such exports, which causes an import library and export file to be created + when they may not be needed. A new preprocessor definition, ASTYLE_NO_VCX (no Visual Studio exports) can be declared + to eliminate the files from the output. Use this only for static libraries or when the AStyle source is included + in the compile. Do NOT use this when compiled as a shared (dynamic) library. It is effective only for Visual Studio + 2012. It will NOT work with previous versions. It has no effect with other compilers since they require a separate + option to create the import library and export files.

+

+ The executable included in the Windows distribution was compiled with Visual Studio 2010 (platform toolset v100). + Visual Studio 2012 (platform toolset v110) contains dependencies on Windows API functions that exist only on Windows + Vista, Windows 7, and Windows 8. This means that applications built with a Visual Studio 2012 C++ compiler would + fail to load and execute on Windows XP. Artistic Style was therefore compiled with Visual Studio 2010 to work + on computers using Windows XP.

+

+ If you are using Windows Vista or higher, and have the Visual Studio 2012 compiler available, recompiling with + Visual Studio 2012 will probably result in faster execution. The Windows distribution has Visual Studio 2012 project + files available.

+

+ If you use a compiler other than Visual Studio, you can probably get better execution by compiling using the C++11 + standards. Artistic Style uses a lot of string vectors and the new move semantics will probably result in faster + execution. (To use C++11 on GCC and MinGW use the option --std=c++0x). This may change on future compiler + releases.

+

+ The "Developer Information" page has a new example and download for calling Artistic Style from a Python script. + It will run with both Python 2 and Python 3. Using Python 3 shows an example of formatting a Unicode string with + Artistic Style. Unicode strings must be encoded to UTF-8 before formatting and decoded back to Unicode afterward. + The example script shows the technique for doing this. It also shows how to set up the function pointers and allocate + memory in Python.

+

+ If you use Visual Studio on Windows, it can now be used for Python development. Python Tools for Visual Studio + (PTVS) is a free and open source plug-in for Visual Studio 2010 that supports Python and Iron Python. Other interpreters + such Jython can be added. It can be easily switched between Python versions or different interpreters. But the + best thing is the Visual Studio debugging support using the .NET debugger and the normal Visual Studio debugger. + It enables you to set break points, step through functions, change the current statement, inspect local variables, + and perform other operations while debugging. It is best to use it with a project file, a minor irritation for + single page scripts. And there are some minor bugs. But overall it works quite well.

+

+ Thanks to Christopher Sean Morrison, Keith OHara, louis6g, and J for their contributions.

+

+  

+

+ Previous releases are available in the + News Archives.

+

+  

+ +

+ +

+ +

+  

+ + + + + diff --git a/AStyle/doc/notes.html b/AStyle/doc/notes.html new file mode 100644 index 00000000..a87f943e --- /dev/null +++ b/AStyle/doc/notes.html @@ -0,0 +1,402 @@ + + + + + + Artistic Style - Release Notes + + + + + + + + +

Artistic Style Release Notes

+ +

+  

+ +

Artistic Style 3.1  (January 2018)

+ + + +

Artistic Style 3.0.1  (May 2017)

+ + + +

Artistic Style 3.0  (April 2017)

+ + + +

Artistic Style 2.06  (December 2016)

+ + + +

Artistic Style 2.05.1  (December 2014)

+ + + +

Artistic Style 2.05  (November 2014)

+ + + +

Artistic Style 2.04  (November 2013)

+ + + +

Artistic Style 2.03  (April 2013)

+ + + +

+  

+

+ Previous releases are available in the Release + Notes Archives.

+

+  

+ +

+ +

+ +

+  

+ + + + + diff --git a/AStyle/doc/scripts.html b/AStyle/doc/scripts.html new file mode 100644 index 00000000..b1fb3c73 --- /dev/null +++ b/AStyle/doc/scripts.html @@ -0,0 +1,85 @@ + + + + + + Artistic Style - Scripts + + + + + + + + +

Artistic Style Scripts

+ +

+  

+

+ The following are scripts to support the Artistic Style program. They are in various computer languages for multiple + platforms.

+ +

Scripts

+ +

+ + astyle-clean.py  is a Python script to clean a directory tree by + moving Artistic Style backup files to a separate directory. This allows Artistic Style to create backup files + without cluttering your source directories. There are four variables at the start of the script that need to be + set for each application. The script will move or copy backup files to a backup directory maintaining the original + directory structure. New backup files will be copied over the old so you will always have the most current + backup.

+

+ + astyle-clean.sh  is a Linux shell script to clean a directory tree + by moving Artistic Style backup files to a separate directory. This allows Artistic Style to create backup files + without cluttering your source directories. There are four variables at the start of the script that need to be + set for each application. The script will move or copy backup files to a backup directory maintaining the original + directory structure. New backup files will be copied over the old so you will always have the most current + backup.

+

+ + astyle-clean.bat  is a Windows batch file to clean a directory + tree by moving Artistic Style backup files to a separate directory. This allows Artistic Style to create backup + files without cluttering your source directories. There are four variables at the start of the script that need + to be set for each application. The script will move or copy backup files to a backup directory maintaining the + original directory structure. New backup files will be copied over the old so you will always have the most current + backup.

+

+ + astyle.pl  is a Mac Perl script to indent source files in TextWrangler + and BBEdit using Artistic Style. Selected text from the editor can be passed to Artistic Style and replaced with + the reformatted text. Save the script in the "Unix Filters" directory (you need to restart TextWrangler to see + new scripts). Then simply highlight the text you would like to indent, choose the script from the Shebang (#!) + menu, and the text will be immaculately formatted. You can add Artistic Style options to the "my $astyle" line + in the script.

+

+ + indent-commit.pl  is a Perl script to integrate Artistic Style + with a CVS repository check-in. Before code is checked in, Artistic Style is automatically called so that the + repository files have a consistent style. This script was posted on the web site several years ago and probably + needs to be updated.

+

+ + astyle-hooks.el  is an Emacs Lisp script containing hooks to convert + Emacs default styles to Artistic Style default styles. There are hooks for C++, Java, and C# files. The C# hook + requires the csharp-mode.el file from + csharpmode on Google Project Hosting. For best results Artistic Style should use the options ‑‑min‑conditional‑indent=0 + (‑m0) and ‑‑max‑continuation‑indent=50 (‑M50). Emacs does not seem to have + an option equivalent to these. The formatting for Emacs and Artistic Style will not be identical, but should be + reasonably close.

+

+  

+ +

+ +

+ +

+  

+ + + + + diff --git a/AStyle/doc/styles.css b/AStyle/doc/styles.css new file mode 100644 index 00000000..18c2fa90 --- /dev/null +++ b/AStyle/doc/styles.css @@ -0,0 +1,59 @@ + +/* h1 is a title + * h2 is a subtitle + * h3 is a hanging text title + * h4 is a non-hanging text title + * 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 + */ + +/* margin: [top] [right] [bottom] [left] */ + +body { background-color: white; margin: 0.5in 0.8in 0.5in 1.3in; } + +h1 { color: #0000A0; text-align: center; font-style: italic; margin-top: 0.4in; margin-left: -0.5in; } +/* h2.large { color: #0000A0; text-align: center; font-size: x-large; margin-top: 0.4in; margin-left: -0.5in; } */ +h2 { color: #0000A0; text-align: center; font-size: larger; margin-top: 0.4in; margin-left: -0.5in; } +h3 { color: #0000A0; margin-top: 0.4in; margin-left: -0.4in; } +h4 { color: #0000A0; margin-top: 0.3in; } + +/* paragraph classes */ +.noindent { margin-left: -0.4in; } +.contents1 { font-size: 105%; margin: 0; } +.contents2 { margin: 0 0.4in 0 0.4in; } + +a.contents:link, a.contents:visited { color: #0000A0; text-decoration: none; } +a.contents:hover { color: #F00000; text-decoration: none; } +a:link, a:visited { color: #0000A0; text-decoration: underline; } +a:hover { color: #F00000; text-decoration: underline; } + +img { border: none; } + +pre { margin-left: 0.3in; color: navy; font-weight: bold; } + +/*- the following styles are for the 'top' button + the corresponding javascript is in the html document from + https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_scroll_to_top +*/ +#topBtn { + display: none; /* Hidden by default */ + position: fixed; /* Fixed/sticky position */ + bottom: 55px; /* Place the button from the bottom */ + right: 10px; /* Place the button from the right */ + z-index: 99; /* Make sure it does not overlap */ + border: none; /* Remove borders */ + outline: none; /* Remove outline */ + background-color: #ccc; /* Set a background color */ + color: #0000C0; /* Text color */ + cursor: pointer; /* Add a mouse pointer on hover */ + padding: 10px; /* Some padding */ + border-radius: 10px; /* Rounded corners */ +} + +#topBtn:hover { + background-color: #aaa; /* Add a darker background on hover */ +} diff --git a/AStyle/doc/subversion.html b/AStyle/doc/subversion.html new file mode 100644 index 00000000..aa7427bf --- /dev/null +++ b/AStyle/doc/subversion.html @@ -0,0 +1,162 @@ + + + + + + Artistic Style - Subversion + + + + + + + + +

Artistic Style Subversion Repository

+ +

+  

+ +

Artistic Style

+ +

+ 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 + 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.

+

+ The current version is in the "trunk/AStyle" branch of the repository. The file and directory names are case + sensitive.

+

+ A sample checkout is:
+ svn  checkout  "https://svn.code.sf.net/p/astyle/code/trunk/AStyle"  + "$HOME/astyle"

+

+ You can also browse + the subversion repository. 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.

+

+  

+ +

Other Projects

+ +

+ 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 + them.

+

+ 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 + below.

+
    Projects
+        AStyle
+        AStyleDev
+        AStyleTest
+        AStyleWx
+        AStyleWxTest
+        googlemock
+        googletest
+ +

AStyleDev

+ +

+ AStyleDev contains the development files that are made available in the "Developer Information" section. Refer + to that section for more information.

+

+ These projects require the Artistic Style project to compile.

+

+ A sample checkout is:
+ svn  checkout  "https://svn.code.sf.net/p/astyle/code/trunk/AStyleDev"  "$HOME/astyledev" +

+ +

AStyleTest

+ +

+ AStyleTest contains the unit test programs and test scripts for Artistic Style. There are over 2500 tests in the + main test program.

+

+ This project requires the Artistic Style project to compile. + In addition, the test program requires Google Mock and Google Test described below.

+

+ The main test project, AStyleTest, can be run in Visual Studio using the graphical Visual Studio Test + Explorer. The procedure is described below.

+

+ A sample checkout is:
+ svn  checkout  "https://svn.code.sf.net/p/astyle/code/trunk/AStyleTest"  "$HOME/astyletest" +

+ +

AStyleWx

+ +

+ AStyleWx contains a GUI test program for Artistic Style that uses the wxWidgets C++ library.

+

+ This project requires the Artistic Style project to compile. + Files for download are made available in the + Artistic Style + Wx subproject. The download contains all files needed to compile the project. The subproject can be accessed + from the Artistic Style SourceForge pages.

+

+ A sample checkout is:
+ svn  checkout  "https://svn.code.sf.net/p/astyle/code/trunk/AStyleWx"  "$HOME/astylewx" +

+ +

AStyleWxTest

+ +

+ AStyleTest contains the unit test programs and test scripts for AStyleWx. 

+

+ This project requires the AStyleWx project to compile. In addition, the test program requires Google Mock and + Google Test described below.

+

+ A sample checkout is:
+ svn  checkout  "https://svn.code.sf.net/p/astyle/code/trunk/AStyleWxTest"  "$HOME/astylewxtest" +

+ +

Google Mock and Google Test

+ +

+ Google Test and Google Mock is the Google multi-platform framework for writing C++ unit tests. + It is available on GitHub + and can be downloaded as a zip file by pressing the green "clone or download" button and selecting + "Download ZIP". The default is to download the master development branch. The latest stable release + can be obtained by using the drop-down box labeled "Branch: master", selecting the "tags" + tab, and then selecting the latest release. The selected release can then be downloaded using the "clone + or download" button. Download the latest release for googletest and googlemock from the repository.

+

+ 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.

+ +

Visual Studio Test Explorer

+ +

+ Some of the test projects can be run in Visual Studio Community using Visual Studio Test Explorer. + If there is a .gta.runsettings file in the solution directory for a test project, + the test will run in the Test Explorer.

+

+ The "Google Test Adapter" extension must be installed from the Tools > "Extensions + and Updates" menu. After restarting Visual Studio the test window is activated from the Test + > Window > "Test Explorer" menu option. After compiling, the tests will appear in + the test window. Then they may be run from the "Test Explorer" window or from the Test menu + options.

+

+ 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.

+ +

+  

+ +

+ +

+ +

+  

+ + + + + diff --git a/AStyle/doc/vsinstall.html b/AStyle/doc/vsinstall.html new file mode 100644 index 00000000..32263a7b --- /dev/null +++ b/AStyle/doc/vsinstall.html @@ -0,0 +1,92 @@ + + + + + + .NET Framework SDK + + + + + + + + +

Visual Studio 2010 C++ Express

+ +

Install Instructions for .NET Framework SDK

+ +

+  

+ +

+ Following are instructions for installing the .NET Framework SDK in Visual Studio 2010 Express and adding x64 + platforms to an existing project in a manner similar to the more expensive Visual Studio editions.

+ +

Installing .NET Framework SDK

+ +

+ 64-bit tools are not available in the Visual Studio 2010 C++ Express Edition by default. To enable 64-bit targets, + install the .NET Framework SDK in addition to the Visual Studio 2010 Express Edition. Otherwise, the x64 solution + platform is not available and a warning will occur if you open a project containing a 64-bit target.

+

+ Install the + Windows SDK appropriate for your operating system. Use the "Install Now" link to get the SDK. You can + optionally install the Windows Performance Toolkit, Debugging Tools, and Application Verifier. The Help is also + optional.

+

+ After installing this package the x64 configurations can be created.

+

+ IMPORTANT: If Visual Studio 2010 Service Pack 1 is applied after the .NET Framework SDK install, an additional + update is required to restore the Visual C++ compilers and libraries that may have been removed. Information is + available here.

+ + +

Adding x64 to Project Files

+ +

+ Open a Win32 project. Open the Configuration Manager from the Build menu. In the Active Solution Platform select + New. For the New Platform select x64. You will need to “Copy settings from Win32” and check + “Create new project platforms”.

+

+ Open the Properties from the Project menu. There is a new configuration property that needs to be set for the + linker to find the system libraries. Be sure the x64 platform is selected and change "Configuration Properties + > General + > Platform Toolset", to Windows7.1SDK. Otherwise, you will get linker errors + such as "LINK : fatal error LNK1104: cannot open file 'kernel32.lib'". This setting can also optionally be used + for the Win32 platform.

+

+ The x64 configuration can now be compiled, but the compiler will place the files in the same directories as the + Win32 compiles. To correct this, the x64 compiles should be placed in an x64 directory using the $(Platform) + macro.

+

+ Add the $(Platform) macro to “Configuration Properties > General > Output directory” so the + entry becomes $(SolutionDir)$(Platform)\$(Configuration)\.

+

+ Leave “Configuration Properties  > General> Intermediate Directory” at the default which + should be $(Platform)\$(Configuration)\.

+

+ Check the x64 Debug configuration “Configuration Properties > Linker > Debugging > Generate Program + Database File” for $(TargetDir)$(TargetName).pdb.

+

+ Compile the project. If there are compile errors you may need to add the $(Platform) macro + to other settings as well. For example, if there are user library files the macro may need to be added to + “Configuration Properties > Linker > General > Additional Library Directories”.

+

+ You should now be able to compile both Win32 and x64 platforms in a manner similar to the more expensive Visual + Studio editions.

+

+  

+ +

+ +

+ +

+  

+ + + + + diff --git a/COPYING.txt b/COPYING.txt new file mode 100644 index 00000000..b37e160b --- /dev/null +++ b/COPYING.txt @@ -0,0 +1,372 @@ +Bloodshed Dev-C++ is distributed under the GNU General Public License. +Be sure to read it before using Dev-C++. + + GNU GENERAL PUBLIC LICENSE + + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free + +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you + +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you + +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, + +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software + +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another + +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). + +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If + +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the + +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under + +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include + +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not + +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying + +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent + +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent + +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing + +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding + +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program + +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author + +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN + +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING + +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE + +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively + +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate + +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. \ No newline at end of file diff --git a/Help/FAQ/Compiler.htm b/Help/FAQ/Compiler.htm new file mode 100644 index 00000000..832faa39 --- /dev/null +++ b/Help/FAQ/Compiler.htm @@ -0,0 +1,36 @@ + + + + + + + +
Q: What compilers does Dev-C++ support?
+
A: Currently, any port of GCC to Windows is supported. This includes MinGW, MinGW-w64 and TDM-GCC. Clang should work too, but you'll have to port that to Windows yourself or find someone else who did it for you.
+
+
Q: How do I add a compiler to Dev-C++?
+
A: All compiler settings are managed at Tools >> Compiler Options. One can add a set in the following ways: +
    +
  • Use "Add compiler set by folder" and point Dev-C++ to the folder where your compiler is installed. Dev-C++ will then attempt to configure it by asking the following program about the compiler folder layout: +
    \bin\gcc.exe
  • +
  • Use "Add an empty set" and fill out the options yourself.
  • +
+
+
Q: I want to compile for 32-bit with my TDM-GCC x64 install. How do I do that?
+
A: The simplest way to do that is to select a preconfigured compiler set that will compile for 32bit. Go to Tools >> Compiler Options and check if the list contains any. If it does, select it and click OK. Repeat this step for each project at Project >> Project Options >> Compiler.
+ To manually create such a compiler set, you need to do two things: +
    +
  • Add '-m32' to the compiler command. Use "Compiler with the following pointer width" at "Settings >> Code Generation" or type it in a custom command at "General >> Add the following commands when calling the compiler".
  • +
  • Use different libraries. Go to Directories >> Libraries and replace the "(..)lib" directories with "(..)lib32".
+
+
Q: I'm specifically compiling for 32bit or 64bit, but GCC is throwing errors at me!
+
A: If it looks like this:
+
skipping incompatible (directory)/libmingw32.a when searching for -lmingw32
+ skipping incompatible (directory)\libmingw32.a when searching for -lmingw32
+ skipping incompatible (directory)/libmoldname.a when searching for -lmoldname
+ skipping incompatible (directory)\libmoldname.a when searching for -lmoldname
+ ...
+
... then you need to change the library directory. Go to Tools >> Compiler Options >> (select the current compiler) >> Directories >> Libraries. There, use "(...)lib" folders for 64bit, or (...)lib32 for 32bit".
+
+ + \ No newline at end of file diff --git a/Help/FAQ/Editor.htm b/Help/FAQ/Editor.htm new file mode 100644 index 00000000..b7cb666a --- /dev/null +++ b/Help/FAQ/Editor.htm @@ -0,0 +1,11 @@ + + + + + + + +
Q: Can I disable these annoying mouseover popups?
+
A: Sure. You can toggle them in Tools >> Editor Options >> Show Editor Hints.
+ + \ No newline at end of file diff --git a/Help/FAQ/Environment.htm b/Help/FAQ/Environment.htm new file mode 100644 index 00000000..b700c17b --- /dev/null +++ b/Help/FAQ/Environment.htm @@ -0,0 +1,14 @@ + + + + + + + +
Q: I'm using the TDM-GCC x64 version and cache creation is taking longer than forever. What can I do?
+
A: Yes, it's taking very long, thanks to the huge amount of headers supplied by TDM-GCC x64. Of course, no single programmer will ever use them all. I suggest selecting the custom caching options or navigating to Tools >> Editor Options >> Class Browsing >> Completion. Add the headers you often use. You don't have to add everything manually fortunately. Adding windows.h for example will include the whole massive heap of Microsoft stuff referenced inside that file.
+
+
Q: Programs created with Dev-C++ show the line "Process exited with return value X". What's going on?
+
This piece of text is shown when a console program ran via Dev-C++ exits. The host that runs your console program (ConsolePauser.exe) prints this code. Dev-C++ does NOT add any code to your programs to print this. This feature is quite useful because you can see console output before closing. You can remove it by unticking "Tools >> Environment Options >> General >> Pause console programs after return".
+ + \ No newline at end of file diff --git a/Help/FAQ/Versions.htm b/Help/FAQ/Versions.htm new file mode 100644 index 00000000..04dd0f4a --- /dev/null +++ b/Help/FAQ/Versions.htm @@ -0,0 +1,18 @@ + + + + + + + + + +
Q: What are the differences between the portable and setup version?
+
A: The only difference is that the portable version ships with an executable called "devcppPortable.exe" which tells Dev-C++ to store its configuration files in ".\config\" instead of in %APPDATA%. Dev-C++ will be executed the following way: +
devcpp.exe -c .\config <parameters passed to devcppPortable>
+
As a result of this, the Dev-C++ folder can be moved around and Dev-C++ will keep working.
+
+
Q: Q: What are the differences between the 32bit and 64bit version?
+
A: The only difference is that the compiler that ships with the 64bit version can create 64bit programs. All versions work on 32bit systems. When using the 64bit version on 32bit systems, please make sure to compile for 32bit, or you won't be able to run your compiled programs. Check out the section to find out how to do that.
+ + \ No newline at end of file diff --git a/Help/Interface/Dialog Windows/Compiler Options/Directories.htm b/Help/Interface/Dialog Windows/Compiler Options/Directories.htm new file mode 100644 index 00000000..211908f3 --- /dev/null +++ b/Help/Interface/Dialog Windows/Compiler Options/Directories.htm @@ -0,0 +1,20 @@ + + + + Directories Tab + + + + +
Over here, you can tell Dev-C++ which directories to search for for purposes listed below.
+
+
Binaries
+
These directories are searched in this order when executing the compiler, makefile processor, debugger, resource compiler, DLL wrapper and profiler. At least one entry is required. The filenames of these programs can be found .
+
+
Libraries
+
These directories are passed to the linker to tell it which libraries to use, and to the debugger as a search directory using the dir command. Besides that, the first item in this list is the default directory used when adding lib files to a project. This list may be empty, in wich case default library directories of the current compiler set are used.
+
+
C(++) Includes
+
These directories are passed to the compiler when performing C(++) file compilations. They are also used by the code completion engine to find system include headers. The first item in the list is the default directory when adding header files to a cache. When these lists are empty, code completion will not work, but compiling will.
+ + \ No newline at end of file diff --git a/Help/Interface/Dialog Windows/Compiler Options/General.htm b/Help/Interface/Dialog Windows/Compiler Options/General.htm new file mode 100644 index 00000000..9c648adb --- /dev/null +++ b/Help/Interface/Dialog Windows/Compiler Options/General.htm @@ -0,0 +1,15 @@ + + + + General Tab + + + + +
Add the following commands when calling the compiler
+
Commands specified here are passed to the compiler at the end of the command. In project makefiles, they are appended at the end of CXXFLAGS, but project-specific commands are added after this.
+
+
Add the following commands when calling the linker
+
Commands specified here are passed to the linker at the end of the command. In project makefiles, they are appended at the end of LIBS, but project-specific commands are added after this.
+ + \ No newline at end of file diff --git a/Help/Interface/Dialog Windows/Compiler Options/Makefile.htm b/Help/Interface/Dialog Windows/Compiler Options/Makefile.htm new file mode 100644 index 00000000..cbbb4a78 --- /dev/null +++ b/Help/Interface/Dialog Windows/Compiler Options/Makefile.htm @@ -0,0 +1,16 @@ + + + + Makefile Tab + + + + +
Makefile generation
+
Compile delay
+
A compile delay can be used when make complains that the makefile is newer than the current system time. This feature is a leftover from ancient Dev-C++ versions. I have not been able to reproduce this bug in versions since 4.9.9.3.
+
+
Use fast but imperfect dependency generation
+
When this option is not selected, Dev-C++ will ask GCC which unmodified files need to be recompiled due to changes in their dependencies by using the -MM command of gcc (or g++ for C++ compilations). When this option is selected, only modified files will be recompiled. This feature is currently broken, so please tick this option.
+ + \ No newline at end of file diff --git a/Help/Interface/Dialog Windows/Compiler Options/Programs.htm b/Help/Interface/Dialog Windows/Compiler Options/Programs.htm new file mode 100644 index 00000000..694d32aa --- /dev/null +++ b/Help/Interface/Dialog Windows/Compiler Options/Programs.htm @@ -0,0 +1,26 @@ + + + + Programs Tab + + + + +
Shown here is a list of filenames that are used by Dev-C++ when performing specific tasks. Each filename should be present in any binary folder specified .
+
+
gcc
+
The C compiler, used for auto-configuring compiler set, performing C file compiling and linking (based on file extension) and queries about compiler set properties.
+
g++
+
The C++ compiler, used for performing C++ file compiling and linking (based on file extension).
+
make
+
The makefile processor, used for project compilations.
+
gdb
+
The debugger.
+
windres
+
The resource processor, used to process Windows GUI resource files.
+
dllwrap
+
The DLL wrapper, used to build DLL's
+
gprof
+
The profiler.
+ + \ No newline at end of file diff --git a/Help/Interface/Dialog Windows/Compiler Options/Settings.htm b/Help/Interface/Dialog Windows/Compiler Options/Settings.htm new file mode 100644 index 00000000..eade47da --- /dev/null +++ b/Help/Interface/Dialog Windows/Compiler Options/Settings.htm @@ -0,0 +1,43 @@ + + + + Settings Tab + + + + +
Some easy to use settings can be toggled here. When an option is enabled by selecting anything other than "Yes", its command between braces is appended to the compiler and linker command if applicable. These commands are added before the commands in the General tab which means the commands set here can be overriden by the commands in the General tab.
+
+
Specific Options
+
General information
+
For much more information about these options, please visit GCC's option documentation.
+
+
C Options
+
Shown here are some C related options.
+
+
Code Generation
+
Shown here are some optimization and architecture related options.
+
-march
+
Change this option to 32bit or 64bit to switch between compiling for these targets. When doing so, make sure to set the library directory correctly. The procedure that outlines is explained in the
+
+
Warnings
+
Shown here are some warning and error related options.
+
+
Profiling
+
Shown here are some profiling related options.
+
-pg
+
This flag is required to perform profiling. Default "Profiling" compiler sets enable this option by default.
+
+
Linker
+
Shown here are some linking and debugging related options.
+
-g3
+
This flag is required for breakpoints and debugging to work. Default "Debug" compiler sets enable this option by default.
+
+
Output
+
Shown here are some output related options.
+
-S
+
This flag tells the compiler to output assembler code instead of binary code. Open the output file with a text editor to view the assembler code.
+
-pipe
+
If enabled, don't use the relatively slow hard drive (or solid state drive) when compiling, but perform compilation in memory. Use this option to speed up compilation if you have enough RAM.
+ + \ No newline at end of file diff --git a/Help/Interface/Dialog Windows/Compiler Options/index.htm b/Help/Interface/Dialog Windows/Compiler Options/index.htm new file mode 100644 index 00000000..1f0dc988 --- /dev/null +++ b/Help/Interface/Dialog Windows/Compiler Options/index.htm @@ -0,0 +1,33 @@ + + + + + + + +
Compiler Options
+
This is Dev-C++'s window that allows you to configure anything compiler related.
+
+
Compiler set to configure
+
This group of options allows you to select which set to change with the tabs below. Changing the current item also changes the compiler set used for non-project compilations.
+
+
Set management buttons
+
Find and automatically configure compilers
+
This feature will automatically configure compilers located in the default compiler installation directories MinGW32 and MinGW64. Results are identical to what the first time configuration performs.
+
+
Add a blank compiler set
+
Add a new set without configuring anything
+
+
Add a compiler set by folder
+
Add a new set and automatically configure it. For configuring, folder\bin\gcc.exe will be queried for all required information.
+
+
Rename the selected compiler set
+
Renames the current compiler set. This has no effect on compilation.
+
+
Remove the current compiler set
+
Removes the current compiler set. The previous set will be the new current compiler set.
+ + + \ No newline at end of file diff --git a/Help/Interface/Dialog Windows/Profile Analysis/Call Graph.htm b/Help/Interface/Dialog Windows/Profile Analysis/Call Graph.htm new file mode 100644 index 00000000..afe94303 --- /dev/null +++ b/Help/Interface/Dialog Windows/Profile Analysis/Call Graph.htm @@ -0,0 +1,16 @@ + + + + + + + +
Function List
+
Here is where the output of GPROF gets placed. This data is generated by the following command:
+
gprof -q "executablename"
+
This tells GPROF to examine the generated workingdir\gmon.out file which contains the generated profiling data.
+
+
Explanation List
+
Here the explanation generated by gprof.exe is printed.
+ + \ No newline at end of file diff --git a/Help/Interface/Dialog Windows/Profile Analysis/Flat Output.htm b/Help/Interface/Dialog Windows/Profile Analysis/Flat Output.htm new file mode 100644 index 00000000..7a9da069 --- /dev/null +++ b/Help/Interface/Dialog Windows/Profile Analysis/Flat Output.htm @@ -0,0 +1,16 @@ + + + + + + + +
Function List
+
Here is where the output of GPROF gets placed. This data is generated by the following command:
+
gprof -p "executablename"
+
This tells GPROF to examine the generated workingdir\gmon.out file which contains the generated profiling data.
+
+
Explanation List
+
Here the explanation generated by gprof.exe is printed.
+ + \ No newline at end of file diff --git a/Help/Interface/Dialog Windows/Profile Analysis/Profiling Options.htm b/Help/Interface/Dialog Windows/Profile Analysis/Profiling Options.htm new file mode 100644 index 00000000..02e41998 --- /dev/null +++ b/Help/Interface/Dialog Windows/Profile Analysis/Profiling Options.htm @@ -0,0 +1,22 @@ + + + + + + + +
Function Hiding
+
Hide functions not called long enough.
+
Unticking this item adds '-z' to GPROF's command line. This will force GPROF to print data about every single function inside the executable.
+
+
Hide statically linked file-local functions.
+
As static functions do not belong to the globals, they are not visible outside the function or file they were defined in. Time spent in them can therefore not be attributed to these globally unknown functions. The actual time spent is added to the function called before it by GPROF. This option will exclude time spent in these functions from the generated data. This option enables the '-s' command.
+
+
Hide functions called less than x times
+
Exactly as the label tells you, function called less than X times will be omited. This options controls the '-m (value)' flag.
+
+
Custom Commands
+
Use these commands instead
+
If you check this, Dev-C++ will use the commands you enter below instead. These command will be editted to what Dev is currently using if you haven't checked this option.
+ + \ No newline at end of file diff --git a/Help/Interface/Dialog Windows/Profile Analysis/index.htm b/Help/Interface/Dialog Windows/Profile Analysis/index.htm new file mode 100644 index 00000000..b9fda729 --- /dev/null +++ b/Help/Interface/Dialog Windows/Profile Analysis/index.htm @@ -0,0 +1,14 @@ + + + + + + + +
Profile Analysis
+
This is Dev-C++'s GUI wrapper around gprof.exe. All data shown here is generated by GPROF.
+
+
Tips
+
Only functions that consume more than 0.01 second of CPU time will show up in the analysis.
+ + \ No newline at end of file diff --git a/Help/Interface/Dialog Windows/Project Options/Build Options.htm b/Help/Interface/Dialog Windows/Project Options/Build Options.htm new file mode 100644 index 00000000..4dc1aca9 --- /dev/null +++ b/Help/Interface/Dialog Windows/Project Options/Build Options.htm @@ -0,0 +1,18 @@ + + + + General Tab + + + + +
Executable Output Directory
+
Here you can change the output location of this projects' executable. This value is stored relatively.
+
+
Object file Output Directory
+
Here you can change the output location of this projects' object files. This value is stored relatively.
+
+
Override output filename
+
Here you can specify what name to give to the executable. By default, the projects' name + '.exe' is used.
+ + \ No newline at end of file diff --git a/Help/Interface/Dialog Windows/Project Options/Compiler.htm b/Help/Interface/Dialog Windows/Project Options/Compiler.htm new file mode 100644 index 00000000..3933acef --- /dev/null +++ b/Help/Interface/Dialog Windows/Project Options/Compiler.htm @@ -0,0 +1,17 @@ + + + + General Tab + + + + +
These options control which compiler set to use for this project.
+
+
Base compiler set
+
Select which compiler set to use for compilations. All set preferences except for the compiler flags will be used during compilation. The compiler flags are initially copied, but can be changed below. These changes only affect the current project and do not change the set itself.
+
+
Customize
+
Customize a compiler set for this project only using this UI.
+ + \ No newline at end of file diff --git a/Help/Interface/Dialog Windows/Project Options/Directories.htm b/Help/Interface/Dialog Windows/Project Options/Directories.htm new file mode 100644 index 00000000..282285c1 --- /dev/null +++ b/Help/Interface/Dialog Windows/Project Options/Directories.htm @@ -0,0 +1,18 @@ + + + + General Tab + + + + +
Library Directories
+
On the previous tab, separate lib files could be added. If you want to add a whole folder to the linker, specify it here. It will be added to the LIBS variable in makefiles.
+
+
Include Directories
+
Here you can add nonstandard header file folders to the compiler.
+
+
Resource Directories
+
Here you can add directories in which the compiler will search for resource files. It is added to the WINDRES variable in the makefile.
+ + \ No newline at end of file diff --git a/Help/Interface/Dialog Windows/Project Options/Files.htm b/Help/Interface/Dialog Windows/Project Options/Files.htm new file mode 100644 index 00000000..5f86f3b5 --- /dev/null +++ b/Help/Interface/Dialog Windows/Project Options/Files.htm @@ -0,0 +1,26 @@ + + + + General Tab + + + + +
Here you can edit properties and behaviour of project files per-file.
+
+
Build priority
+
Sets the Build Priority of the currently selected item. One can use this to sort Project Items and Build order.
+
+
Include in Compilation
+
Adds the file to the object file creation.
+
+
Include in linking
+
Include the generated object file in the executable creation.
+
+
Compile file as C++
+
If checked, use the CXXFLAGS line in the makefile instead of CFLAGS. This option also controls if this file is affected by global project CFLAGS/CXXFLAGS edits found in the Parameters tab.
+
+
Override build command
+
Here you can create your own build command for the current file.
+ + \ No newline at end of file diff --git a/Help/Interface/Dialog Windows/Project Options/General.htm b/Help/Interface/Dialog Windows/Project Options/General.htm new file mode 100644 index 00000000..c1a8013b --- /dev/null +++ b/Help/Interface/Dialog Windows/Project Options/General.htm @@ -0,0 +1,46 @@ + + + + General Tab + + + + +
Name (editable)
+
Views the internal name of the project, which is only used for bookkeeping and the title bar.
+
+
Filename
+
Shows the location of the project file.
+
+
Output File
+
Shows the output location of the executable. The directory can be editted by Build Options >> Executable Output Directory and the filename can be edited at Override Output Filename.
+
+
Files
+
Shows the amount of files inside the project (.cpp/.h/.rc).
+
+
Icon
+
Dev-C++ can add an icon to the executable for you by adding the following piece of code to a resource file attached to your project: +
A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "filename.ico"
+
This will be stored in a temporary resource file (projectname_private.rc) that is attached to the project at compile time.
+
Library
+
Opens up the \Icons folder which provides an antique set of ye-olde icons. One can of course add his own icons to that folder, so that they will show up here.
+
Browse
+
Opens up a File Browser to search through the file system for icon files.
+
Remove
+
Detaches the currently selected icon from the project. Does not delete the file itself.
+
+
Type
+
Selecting a type here will determine what kind of output is produced: +
    +
  • Win32 GUI will add -mwindows to the compiler command to remove the cmd window.
  • +
  • Win32 Console will effectively do nothing special.
  • +
  • Win32 Static Lib will create a .a file.
  • +
  • Win32 DLL will create a DLL file.
  • +
+
+
Support Windows XP Themes
+
If enabled, Dev-C++ will add a Common Control 6 Manifest to the project to enable visual styles. Dev-C++ will add the following piece of code to a resource file attached to your project:
+
1 24 "projectname.exe.Manifest"
+
This will be stored in a temporary resource file (projectname_private.rc) that is attached to the project at compile time.
+ + \ No newline at end of file diff --git a/Help/Interface/Dialog Windows/Project Options/Makefile.htm b/Help/Interface/Dialog Windows/Project Options/Makefile.htm new file mode 100644 index 00000000..d4e2018f --- /dev/null +++ b/Help/Interface/Dialog Windows/Project Options/Makefile.htm @@ -0,0 +1,18 @@ + + + + General Tab + + + + +
Use custom Makefile
+
By default, Dev-C++ constructs its own makefile based on the configuration on the previous tabs. Here you can point Dev to a custom replacement. Dev-C++ will not generate any more makefiles if this option is used.
+
+
Information about customizing the makefile...
+
Click!
+
+
Include the following files into the makefile
+
If your custom makefile (or Dev's one) is getting so large that it can't be properly maintained in a single file anymore, you can then include files here.
+ + \ No newline at end of file diff --git a/Help/Interface/Dialog Windows/Project Options/Parameters.htm b/Help/Interface/Dialog Windows/Project Options/Parameters.htm new file mode 100644 index 00000000..05adc422 --- /dev/null +++ b/Help/Interface/Dialog Windows/Project Options/Parameters.htm @@ -0,0 +1,21 @@ + + + + General Tab + + + + +
C Compiler
+
When compiling using a C standard, these flags will be appended at the end of every compilation command directly or via CFLAGS in a makefile.
+
+
C++ Compiler
+
When compiling using a C++ standard, these flags will be appended at the end of every compilation command directly or via CXXFLAGS in a makefile.
+
+
Linker
+
When linking using a C++ standard, these flags will be appended at the end of every linking command directly or via LIBS in a makefile.
+
+
Add Library or object
+
Opens up a file explorer. Here you can automatically add separate library files to the linker command line. Currently only GCC .a files are fully supported. In the Directories tab, one can add libraries on a per-folder basis instead of a per-file basis.
+ + \ No newline at end of file diff --git a/Help/Interface/Dialog Windows/Project Options/Version Info.htm b/Help/Interface/Dialog Windows/Project Options/Version Info.htm new file mode 100644 index 00000000..b06aab13 --- /dev/null +++ b/Help/Interface/Dialog Windows/Project Options/Version Info.htm @@ -0,0 +1,18 @@ + + + + General Tab + + + + +
Include version information in project
+
If you choose to let Dev-C++ include version information for you, Dev-C++ will add a VERSIONINFO information table to a temporary resource file coupled to the project at compile time.
+
+
Auto-increment build number on compile
+
The last number in the four-number system is often used to describe how often the project has been rebuilt. By using this, Dev will do that for you.
+
+
Sync product with file version
+
The common approach for product and file numbers is as follows: large projects can contain multiple files that can be built, and each has its own file version numbers because of that. Also, large projects may include older files not in need of updates. This leaves the project with multiple file version. Therefore, Product Version exist. This is commonly a single number to define a version for all built files as a whole. But smaller project usually have only a single File Version. In this case, File and Product versions will stay the same, simply because there's just one file avaiable. This synching will be done by this option.
+ + \ No newline at end of file diff --git a/Help/Interface/Menus/Edit.htm b/Help/Interface/Menus/Edit.htm new file mode 100644 index 00000000..9a2fc647 --- /dev/null +++ b/Help/Interface/Menus/Edit.htm @@ -0,0 +1,54 @@ + + + + + + + +
Undo
+
Undoes last performed action.
+
+
Redo
+
Redoes last performed action.
+
+
Cut
+
Cuts selected text
+
+
Copy
+
Copies selected text.
+
+
Paste
+
Pastes content currently in the clipboard.
+
+
Select All
+
Selects everything in the currently open file.
+
+
Swap header/source
+
Navigates to the file corresponding with the currently open header (.h) or source (.cpp) file. These pairs are often used in classes, and this button will make switching between declaration and definition easier.
+
+
Insert
+
Inserts templates which are added by default. One can also add items in the Tools >> Editor Options >> Code Insertion tab. More information about creating items can be found there.
+
+
Toggle Bookmarks
+
Inserts a bookmark mark to the currently focussed line, making it easier to find by sight and by Goto Bookmarks. Handy for finding class members in huge source files. When a bookmark is already inserted at the current line, it is removed.
+
+
Goto Bookmarks
+
Goes to the selected bookmark placed by Toggle Bookmarks.
+
+
Comment
+
Comments selection with single-line comments (//).
+
+
Uncomment
+
Removes first occurence of '//' from every line selected.
+
+
Toggle Comment
+
Uncomments if whole selection is commented, else comments.
+
+
Indent
+
Indents selected lines by a single tab. If nothing is selected, a tab is inserted. If only (portions of) one line are selected, the selection is replaced by a tab.
+
+
Unindent
+
Removes first occurence of 'tab' (\009) from every line selected.
+ + + \ No newline at end of file diff --git a/Help/Interface/Menus/File.htm b/Help/Interface/Menus/File.htm new file mode 100644 index 00000000..c1d01561 --- /dev/null +++ b/Help/Interface/Menus/File.htm @@ -0,0 +1,83 @@ + + + + + + + +
New
+
Source File
+
Inserts an empty file without any content or extension into the IDE. When a project is currently open, you will be asked to add it to the project.
+
+
Project...
+
Opens up the New Project window. Here you can choose from a few built-in templates you can start with, divided in categories. These templates are located in the \Templates\*.template files. One can add as much templates as one likes. Below are a few options, such as the Project Name and the language options to the right, which control certain compiler flags.
+
+
Resource File
+
This inserts an empty file into the IDE the same way as "Source File" does, but adds the extension ".rc" to it, so the IDE will recognize it as a resource file.
+
+
Project Template...
+
This option is only available when a project is open, and opens up a dialog where the user can decide to add the current project, along with a few modifications, to the "Project..." window.
+
+
Class...
+
Opens up the New Class form. More information can be found in the Class Browser\New Class menu item.
+
+
Open...
+
Opens up a file opener. Will open any file and shows it in text mode. When a .dev Project File is selected, a project is opened.
+
+
Save
+
Saves current file to disk with the current file name. When the file doens't have one yet, Save as is used.
+
+
Save As...
+
Saves current file to disk with the filename and path choses by the user.
+
+
Save Project As...
+
Saves the profile file to with the filename and path choses by the user. Paths to the other project file will be maintained, so the project can still be used by opening up the moved .dev file.
+
+
Save All
+
Iterates through all files and will save them all automatically. When a file without a name is encountered, it will prompt the user to give it a name. Also saves the project file to disk.
+
+
Close
+
Closes currently focussed file. Will ask the user if he/she want to save it.
+
+
Close All
+
Closes all opened file excluding the Project File. Will ask the user if he/she want to save them. Project will stay open.
+
+
Close Project
+
Does the same thing as Close All, but now also closes the project, of course after asking to save changes.
+
+
Properties
+
Shows various data about all files currently open in the project.
+
+
Import
+
from MS Visual C++ Project
+
Opens up a dialog which can convert MSVC++ .dsp files to Dev-C++'s .dev files.
+
+
from Code::Blocks Project
+
TODO
+
+
Export
+
to HTML
+
Exports the currently open file to HTML, preserving formatting and coloring.
+
+
to RTF
+
Exports the currently open file to RTF, preserving formatting and coloring.
+
+
Project to HTML
+
Exports the all open files to HTML in \files, preserving formatting and coloring.
+
+
Print
+
Brings up a dialog asking for various printing options, and when OK is pressed, will print the current file preserving colors and formatting
+
+
Print Setup
+
Brings up a common dialog to configure the printer driver. Here you can, for example, choose paper rotation and the printer device you want to use.
+
+
(Reopen)
+
A list of recently closed files. The maximum amount of items can be changed using Tools >> Environment options >> Recent file list length.
+
+
Clear History
+
Clears the list of history items.
+
+
Exit
+
Exits Dev-C++. Will close any open files and will ask to save any modified files.
+ + \ No newline at end of file diff --git a/Help/Interface/Menus/Project.htm b/Help/Interface/Menus/Project.htm new file mode 100644 index 00000000..98b923b6 --- /dev/null +++ b/Help/Interface/Menus/Project.htm @@ -0,0 +1,20 @@ + + + + + + + +
New File
+
Adds a file to the currently open project. Disabled if no project is opened.
+
+
Add to project
+
Opens up a file browser, asking the user to point to the file to be added to the currently open project. Disabled if no project is opened.
+
+
Remove from project
+
Removes the current file from project.
+
+
Project Options
+
Opens up the Project Options window.
+ + \ No newline at end of file diff --git a/Help/Interface/Menus/Search.htm b/Help/Interface/Menus/Search.htm new file mode 100644 index 00000000..53e95a78 --- /dev/null +++ b/Help/Interface/Menus/Search.htm @@ -0,0 +1,35 @@ + + + + + + + +
Find...
+
Opens the Find Window and its "Find" tab, with which one can search in the current file.
+
+
Find in Files...
+
Opens the Find Window and its "Find in Files" tab, with which one can search in any file and display the results in the "Find Results" near the bottom of the screen.
+
+
Replace...
+
Opens the Find Window and its "Replace" tab, with which one can replace in the current file.
+
+
Replace in Files...
+
Opens the Find Window and its "Replace in Files" tab, with which one can replace in any file.
+
+
Search Again
+
Repeats the previous Find or Find in Files command. If the previous command was a Find command, the new search is started from the cursor in the forward direction.
+
+
Search Again Backwards
+
Repeats the previous Find or Find in Files command. If the previous command was a Find command, the new search is started from the cursor in the backward direction.
+
+
Incremental Search
+
Opens up a text box that performs an search-as-you-type search, just like in browsers.
+
+
Goto Function...
+
Brings up a dialog that lists all available functions and allows you to search through them and navigate to them by clicking them.
+
+
Goto Line...
+
Brings up a dialog that allows one to enter a line number and navigate to it.
+ + \ No newline at end of file diff --git a/Help/Interface/Menus/View.htm b/Help/Interface/Menus/View.htm new file mode 100644 index 00000000..e2ddc3bb --- /dev/null +++ b/Help/Interface/Menus/View.htm @@ -0,0 +1,39 @@ + + + + + + + +
Project/Class Browser
+
Toggles the tabbed explorer which shows project, class and debug content to the left.
+
+
Statusbar
+
Toggles the statusbar below.
+
+
Compiler Output
+
Always visible
+
If enabled, close the message control below if there's nothing to show.
+
+
Only when needed
+
If disabled, close the message control below if there's nothing to show. This is the inverted version of Always visible. They cannot both be enabled at the same time of course.
+
+
Toolbars
+
Toggles the various individual toolbars.
+
+
TODO List...
+
Opens up a window that sums up all lines of code with '//TODO: something' in them. Items can be added by the 'Add To-Do Item' menu item in the editor right-click menu. One can also add items manually by just typing a comment in that format too.
+
+
Floating Project Manager
+
If enabled, the tabbed explorer which shows project, class and debug content to the left will be detached from the main window and shown in a separate window.
+
+
Floating Report Window
+
If enabled, the message control below will be detached from the main window and shown in a separate window.
+
+
Go To Project Manager
+
Places focus on the the first tab of the explorer to the left: the Project Manager.
+
+
Go To Class Browser
+
Places focus on the the second tab of the explorer to the left: the Class Browser.
+ + \ No newline at end of file diff --git a/Help/Subjects/Compiling.htm b/Help/Subjects/Compiling.htm new file mode 100644 index 00000000..6257530c --- /dev/null +++ b/Help/Subjects/Compiling.htm @@ -0,0 +1,38 @@ + + + + + + + +
Compiling a source file
+
A special feature of Dev-C++ is the ability to compile (and run) single source files. This is done via the following steps:
+
    +
  • Create (Ctrl+N) or open (Ctrl+O) a source file.
  • +
  • Click Compile (F9) to compile the currently visible file.
  • +
  • Optionally, run the created executable (F10).
  • +
+
This compilation will use the compiler set selected at Tools >> Compiler Options.
+
+
Compiling a project
+
Compiling a project largely requires the same steps:
+
    +
  • Create (Ctrl+N) or open (Ctrl+O) a project.
  • +
  • Click Compile (F9) to apply changes made in a source file.
  • +
  • Click Rebuild (F12) to apply changes made in a header file or to recompile all files.
  • +
  • Optionally, run the created executable (F10).
  • +
+
This compilation will use the compiler set selected at Tools >> Compiler Options, but unlike source file compilations, it will use the compiler settings located at Project >> Project Options >> Compiler.
+
+
Tips
+
+
    +
  • For single file compilations, make sure to use proper file extensions. When not explicitly telling the compiler which standard to use (using the -std flag), use *.c to compile as C or *.cpp to compile as C++.
  • +
  • To reduce compilation output size, especially when using C++ headers, consider passing -s to the compiler. This can be done manually or via (Settings) >> Linker >> Strip executable. This option will remove any unused data from the output. A downside of this option is that debugging and profiling will not work anymore. An alternative but much less effective approach is to reduce the amount of included files.
  • +
  • To reduce compilation time, consider including less files. For example, when using a project, don't blindly include every file in every file!
  • +
  • To save one click in the compilation process, try out Compile & Run (F11). This will, obviously, compile and run your file or project immediately afterwards.
  • +
  • When changing a header file, make sure to recompile all source files that make use of it by rebuilding. Not doing so will lead to undefined executable behaviour: the code you're seeing will not be what will be executed because some source files are making use of outdated headers.
  • +
+
+ + \ No newline at end of file diff --git a/Help/Subjects/Debugging.htm b/Help/Subjects/Debugging.htm new file mode 100644 index 00000000..f55224c9 --- /dev/null +++ b/Help/Subjects/Debugging.htm @@ -0,0 +1,36 @@ + + + + + + + +
Debugging a source file
+
Debugging a source file can be done using the following steps:
+
    +
  • Create (Ctrl+N) or open (Ctrl+O) a source file.
  • +
  • At Tools >> Compiler Options, select a compiler set that supports debugging (-g3).
  • +
  • Click Debug (F5) to compile and debug the currently visible file.
  • +
  • Place a breakpoint by clicking on a line number or use F4 to pause your program and inspect it.
  • +
+
Debugging a project
+
Debugging a project file can be done using the following steps:
+
    +
  • Create (Ctrl+N) or open (Ctrl+O) a project.
  • +
  • At Project >> Project Options >> Compiler, select a compiler set that supports debugging (-g3).
  • +
  • Click Debug (F5) to compile and debug the project.
  • +
  • Place a breakpoint by clicking on a line number or use F4 to pause your program and inspect it
  • +
+
Tips
+
+
    +
  • When changing compiler sets, make sure to rebuild before debugging. Dev-C++ will only suggest doing so if a source file is newer the executable, but not when the compiler changes!
  • +
  • Optimization (-Ox) will, among other effects, change the order of execution and can remove code that yields no net change. This can be quite annoying when walking through code line by line. Consider debugging without optimization or use -Og to fix this.
  • + http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Debugging-Optimized-Code.html +
  • Adding debug information usually more than doubles compilation time. Consider disabling it to lower compilation times.
  • +
  • The strip flag (-s) will remove debugging information added by -g3. Consider disabling it.
  • +
  • Debugging information adds considerable size (an order of magnitude isn't out of the ordinary) to created programs. Consider disabling it to reduce file size.
  • +
+
+ + \ No newline at end of file diff --git a/Help/Subjects/Editing.htm b/Help/Subjects/Editing.htm new file mode 100644 index 00000000..2468c47d --- /dev/null +++ b/Help/Subjects/Editing.htm @@ -0,0 +1,23 @@ + + + + + + + +
Editing a file
+
Editing a file is pretty straightforward. Create (Ctrl+N) or open (Ctrl+O) a file.
+
+
Tips
+
+
    +
  • Hover over a variable or include line to show information about it.
  • +
  • Click on a line number to place a breakpoint there.
  • +
  • Triple click on a line to select it.
  • +
  • Code completion can be opened using Ctrl+Space anywhere. It will show valid statements found in the current file, its included files and the cache. Preferences can be set at Tools >> Editor Options >> Completion >> Code Completion.
  • +
  • Symbol completion can be customized at Tools >> Editor Options >> Completion >> Symbol Completion.
  • +
  • Consider caching frequently included files to speed up file and project opening.
  • +
+
+ + \ No newline at end of file diff --git a/Help/Subjects/Profiling.htm b/Help/Subjects/Profiling.htm new file mode 100644 index 00000000..4f8e6d25 --- /dev/null +++ b/Help/Subjects/Profiling.htm @@ -0,0 +1,38 @@ + + + + + + + +
Profiling a source file
+
Profiling a source file can be done using the following steps:
+
    +
  • Create (Ctrl+N) or open (Ctrl+O) a source file.
  • +
  • At Tools >> Compiler Options, select a compiler set that supports profiling (-pg).
  • +
  • Click Profile Analysis (next to the Debug button) to compile and profile the currently visible file.
  • +
  • When closing the created program, a timing analysis will open.
  • +
+
Profiling a project
+
Profiling a project file can be done using the following steps:
+
    +
  • Create (Ctrl+N) or open (Ctrl+O) a source file.
  • +
  • At Tools >> Compiler Options, select a compiler set that supports profiling (-pg).
  • +
  • Click Profile Analysis (next to the Debug button) to compile and profile the project.
  • +
  • When closing the created program, a timing analysis will open.
  • +
+
Tips
+
+
    +
  • Only functions that consume more than 0.01 second of CPU time will show up in the analysis.
  • +
  • When changing compiler sets, make sure to rebuild before profiling.
  • +
  • Optimization (-Ox) can remove code that yields no net change. One should be careful when profiling these kinds of code: +
    tbefore = GetTime();
    + DoSomething();
    + tdiff = GetTime() - tbefore;
    + If the function DoSomething() does not affect output in any way and when other code is independent from it, the call to it can be removed by the compiler and tdiff will be zero! Consider printing something calculated inside DoSomething() after calculating tdiff. This way, other code will be dependent on DoSomething() because you print some result of it afterwards.
  • +
  • The strip flag (-s) will remove profiling information added by -pg. Consider disabling it.
  • +
+
+ + \ No newline at end of file diff --git a/Help/content.css b/Help/content.css new file mode 100644 index 00000000..1b572a35 --- /dev/null +++ b/Help/content.css @@ -0,0 +1,29 @@ +html { + font-family:"Segoe UI","MS Sans Serif",serif; +} +body { + margin:8px; +} +.Heading1 { + font-size:20pt; + margin-bottom:10px; +} +.Heading2 { + font-weight:bold; + font-size:14pt; +} +.Heading3 { + font-weight:bold; + font-size:12pt; +} +.Code { + margin:10px; + font-family:"Consolas","Courier New"; + background-color:#DDDDDD; +} +.Link { + display:inline-block; + text-decoration:underline; + color:rgb(0,0,238); /* webkit link */ + cursor:pointer; +} \ No newline at end of file diff --git a/Help/index.htm b/Help/index.htm new file mode 100644 index 00000000..fceec56f --- /dev/null +++ b/Help/index.htm @@ -0,0 +1,29 @@ + + + + Dev-C++ Help + + + + + + +
+ +
+ + + + + +
+
+ + \ No newline at end of file diff --git a/Help/intro.htm b/Help/intro.htm new file mode 100644 index 00000000..404e8f83 --- /dev/null +++ b/Help/intro.htm @@ -0,0 +1,22 @@ + + + + + + + +
Welcome to the Dev-C++ user manual!
+
The manual has been rewritten and greatly expanded as of Dev-C++ version 5.5.2. It is still far from complete though, so don't hesitate to contribute by creating and sending me new pages or donating me.
+
+
You can start navigating using the tree view at your left.
+
+
Compatilibity
+
This help file has been tested on the following browsers: +
    +
  • Firefox 24.0 and 25.0 (works)
  • +
  • Chrome 29.x and 30.x (works)
  • +
  • Internet Explorer 9 and 10 (works)
  • +
  • Internet Explorer 8 (functional, but has cosmetic problems)
  • +
+ + \ No newline at end of file diff --git a/Help/jquery191.min.js b/Help/jquery191.min.js new file mode 100644 index 00000000..006e9531 --- /dev/null +++ b/Help/jquery191.min.js @@ -0,0 +1,5 @@ +/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license +//@ sourceMappingURL=jquery.min.map +*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
a",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="
t
",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="
",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj; +return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="
",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&>(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l) +}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("