diff options
59 files changed, 10409 insertions, 10409 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 64512a8..2e49704 100755 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,298 +1,298 @@ -2012-01-01 Version 1.2.0
-[add] The Linux version has a menu entry in the application development menu now.
-[add] The Linux version has a mime type association to some code files now, so that UiGUI is available as "open with".
-[add] Added support for the Visual Basic beautifier VBSBeautifier.
-[add] Added support for the SQL beautifier Pl/Sql tidy.
-[add] Updated the Artistic Style configuration to support Artistic Style version 2.02.1.
-[add] Updated the Uncrustify configuration to support Uncrustify version 0.59.
-[add] Updated the PerlTidy configuration to support PerlTidy version 1.74.
-[add] Updated the Ruby Script Beautifier to version 2.9.
-[fix] Bug ID 3021933: Updated the Artistic Style configuration to support Artistic Style version 2.01.
-[fix] Bug ID 3021931: Fixed calling of Artistic Style version 1.22 and later.
-[fix] Bug ID 3006513: Fixed compiling UiGUI using GCC 4.5 and later.
-[fix] Bug ID 2942381: When loading an indenter configuration file, the settings displayed in the docking widget were correctly updated, but the code wasn't.
-[fix] Bug ID 2135872: A zombie process kept on running if UiGUI was quit during the update check in background if no internet connection is available.
-[fix] Bug ID 3175027: Uncrustify had wrong pop-up comments for two check-boxes.
-[fix] Bug ID 2916163: The proxy settings are properly used and applied now.
-[fix] Made the JsDecoder integration be compatible with recent Qt versions.
-[change] Changed the created shell scripts indenter config file reference. Now each created shell script has a corresponding config file being created in the same dir as the shell script, with the same name but different suffix. But since the config file is referenced by "./", when calling the script the working directory must be the same as the directory containing the config file.
-[change] Using TCLAP as command line parser instead of own command line parsing.
-[change] Setting a file name as parameter on the command line without any prefix will load this file instead of the last opened one.
-[change] Rewritten and improved the internal way how settings are connected to the UI.
-[change] Refactored and cleaned up the code.
-[change] Will no longer deliver binary bundles linked against Qt statically. Instead delivering all dependent DLLs and libs.
-
-2009-07-16 Version 1.1.0
-[add] Added a logging class, that can catch debug output and make trace backs if any problems occur possible.
-[add] Added an application icon for Mac OS X.
-[change] Feature Request ID 2596302 : Updated the greatcode.ini. Thanks to adxadx who has done this work!
-[change] Feature Request ID 2793216: Updated to Uncrustify 0.53.
-[change] Updated to JsDecoder version 1.1.0
-[fix] Bug ID 2791229: If UiGUI was located in a path containing Unicode characters or such a path needed to be handed over to a called indenter, the indenter could get confused on Windows. So using the Windows 8.3 short path notation.
-[fix] On Mac OS X the used default font wasn't monospaced. Switched back to use Courier on Mac.
-
-2009-02-12 Version 1.0.2
-[add] Feature Request ID 2498654 : Added support for the Fortran indenter F90ppr. http://universalindent.sf.net/issue/feature/2498654
-[add] Made it possible to define "stdin" to be used for an indenter calling.
-[change] Made the source code be compilable with the slightly older QScintilla version 2.2.
-[change] When starting the very first time without any existing application settings, do not show the mainwindow at position 0,0. On Mac the window couldn't be moved because the window title bar was hidden under the Mac menu bar.
-[change] When using a non Windows system the default editor font type is now Monospace instead of Courier. The latter was not found properly.
-[change] For security reason using a randomly generated temporary directory name on Unix based systems.
-[change] Improved the GUI updates for the Notepad++ plugin a bit. Not what I would call "good" yet.
-[fix] Bug ID 2284777 : The Notepad++ plugin was falsely linked against Qt debug dlls, which were not included. http://universalindent.sf.net/issue/bug/2284777
-[fix] Bug ID 2594251 : The new version available check didn't work anymore since version 1.0.1. http://universalindent.sf.net/issue/bug/2594251
-[fix] Avoid a crash if an uigui ini file with faulty header info is read, where the indenter executable was empty.
-[fix] Some application settings were tried to be read from a wrong directory when running in multi user mode.
-
-2008-10-14 Version 1.0.1
-[add] Feature Request ID 2161471 : Added support for the Python indenter pindent.
-[add] Feature Request ID 1883444 : Added support for the JSP indenter JSPPP.
-[add] Feature Request ID 1867563 : Added support for the XML indenter XML Indent.
-[add] Support for French language. Thanks to Erwan "leg".
-[change] Some small translation corrections.
-[change] Improved the "new version available" check.
-[change] On Mac and Linux a one pixel frame was shown around the whole screen when about dialog is visible. Removed that.
-[change] Updated to Uncrustify version 0.49 from SVN repository.
-[change] Using a new logo icon for UniversalIndentGUI. The logo was created by Erwan "leg". Thanks!
-[fix] Bug ID 2173527 : Could not load Artistic Style config file properly if both parameters "--brackets=linux" and "--brackets=break-closing" were set. http://universalindent.sf.net/issue/2173527
-[fix] The distributed version of GNU Indent was using a misspelled configuration file, thus lieve preview didn't correctly work. Using original GNU Win32 version now.
-[fix] In version 1.0.0 the creation of batch files for indenters undet Windows always created a bash/shell script instead of batch.
-[fix] Keyboard shortcuts for enabling/disabling "Live Preview" and syntax highlighting didn't work.
-
-2008-09-30 Version 1.0.0 non public release. Only presented for Qt Centre programming contest.
-[add] Made it possible to start UiGUI in different modes via parameters: Normal (full UI), plugin (only indenter menu, server active), server only.
-[add] Added a server functionality. Future plan is to let UiGUI run also as server so plugins from other editors can send indent requests over TCP/IP to it. Very early state right now.
-[add] Created a plugin for Notepad++. This plugin shows the indenter parameter menu and lets the user indent the selected or whole text. Live preview works also. Still has some eventloop graphic update problems.
-[add] Added support for two (rather simple) Ruby beautifiers, ruby_formatter and rbeautify.
-[add] Feature Request ID 1985475 : Added the possibility to reset all indenter parameters to default values. http://universalindent.sf.net/issue/1985475
-[add] Feature Request ID 1989585 : Added a context menu in indenter parameters widget and moved all functions handling these actions from the main window to the indent handler. http://universalindent.sf.net/issue/1989585
-[add] Feature Request ID 1977033 : Now supporting the Cobol intender Cobol Beautifier. http://universalindent.sf.net/issue/1977033
-[add] Feature Request ID 2080832 : Now showing the cursors current line and column number in the statusbars down right corner. http://universalindent.sf.net/issue/2080832
-[change] Using Qt >= 4.4.x now and thereby implemented an animated 3D about dialog.
-[change] Using QScintilla >= 2.3 now and thereby added support for Cmake, Fortran[77], Pascal, PostScript, TCL, VHDL, XML and YAML.
-[change] Reformatted the about dialog to only contain one QTextEdit. Also added some more links to that text.
-[change] Limited the size of the combobox showing the indenters because with the supported programming languages in the name, the comobox was to large in width.
-[change] Prevent php file from being tried to be executed directly. That could happen if the file has the execution flag set. However that should never be the case, so this is a workaround.
-[change] Added a new class UiguiIniFileParser which will replace the currently used QSettings for reading the indenter parameters. Thus parameters appear in the menu in the same order as in the ini file and are no longer alphabetically sorted.
-[change] Redesigned the user interface and code a bit. The indenter selection combo box along with the manual button are now placed in docking widget where all indenter parameters are placed. This is done in preparation to pull out the complete indent handler, so it can be used as plugin for Notepad++ or Eclipse etc.]
-[change] Made reading the indenter config files more tolerant. If the user disobeys case sensitivity when editing the config file by hand, the values are correctly parsed anyway.
-[change] Feature Request ID 1989587 : There is no longer any need to have a current value setting in the ini files. A default value is enough. http://universalindent.sf.net/issue/1989587
-[change] Completely removed QT3Support functions.
-[change] Removed all compiler warnings.
-[change] Changed the way internal settings are handled. Using QObject propertys for connected setting name now.
-[fix] The by each indenter supported programming languages, written in braces, are removed from the created shell scripts name.
-[fix] Corrected the move/mv commands parameter in the created shell and batch script when calling recursive.
-[fix] Bug ID 1986471 : The file modification flag did not work properly. Reason was that QScintilla can not set its textedit component modified flag to true by a function call. http://universalindent.sf.net/issue/1986471
-
-2008-05-26 Version 0.8.2
-[add] Feature Request ID 1971206 : Now showing by the indenter supported programming languages next to indenter name.
-[add] Feature Request ID 1971181 : Added support for the HTML indenter HTB.
-[add] Feature Request ID 1867562 : Added support for the HTML indenter hindent.
-[add] Added support for the php indenter phpStylist version 1.0.
-[add] Added the possibility to directly setting php files as indenter. The suffix .php is recognized and php used as default interpreter.
-[add] Extended the created batch/shell script so it is able to indent only one file given as parameter or a whole directory recursively with a defined file suffix.
-[add] Feature Request ID 1885911 : Added the possibility to open a file on applications start, that is handed over as parameter on the command line.
-[add] Feature Request ID 1729429 : Added the possibility to drag'n drop in any source code file for opening it.
-[change] Created indenter shell scripts now automatically have the executable flag set to true.
-[change] Completed the support for all perl tidy parameters.
-[change] Updated to uncrustify version 0.46.
-[fix] Bug ID 1933074 : On Unix systems the user config files were stored in his home dir in the subfolder ".config". Now they are directly stored in ".universalindentgui".
-[fix] Fixed a bug where the string "<html><body>" was prepended to the output code. Occurred for example when using the shell indenter.
-
-2008-03-27 Version 0.8.1
-[add] Feature Request ID 1909450 : Added support for the PEAR PHP beautifier. Thus PHP beautifying is also possible on Linux and Mac OS X. (Needs the PEAR package "PHP_Beautifier" to be installed and a path entry pointing to the PHP dir.)
-[add] Added support and translations for Russian and Ukrainian language. Thanks to Oleksandr (http://korytskyy.lviv.ua).
-[add] Feature Request ID 1901935 : From now on files are saved with the same encoding as they were opened and no longer always UTF-8. Also it is possible to save the file with any other encoding.
-[change] The detection whether to run in portable mode now depends on where the "config" folder resides and no longer the "indenters" folder. This is needed to be able to correctly run on Windows multiuser systems.
-[change] Removed the word "beta" whereever it occurred, since UiGUI isn't that beta anymore.
-[fix] Bug ID 1910773 : On Unix systems the globally available files, like indenters, translations etc are not longer installed to /etc/universalindentgui but to /usr/share/universalindentgui.
-
-2008-01-17 Version 0.8.0 Beta
-[add] Feature Request ID 1849297 : Added support for indenters written in JavaScript using an internal interpreter. Have a look into the README.txt to get to know, what steps are needed for that.
-[add] Added support for a simple JavaScript indenter written in JavaScript itself.
-[add] Added support for a simple shell code indenter written in awk.
-[add] Feature Request ID 1736946 : It is now possible to run any indenter that is available in the global environment via a path entry.
-[add] Feature Request ID 1852483 : Indenters written in script languages, like perl, are now also supported, if they have a correct shebang.
-[add] Added support for the well known perltidy. The uigui ini file is completed up to the category and including "Line Break Control". Rest needs to be done.
-[add] Feature Request ID 1866599 : Adapted the used paths for settings, temporary files and the one containing indenter ini files to be conform with systems that use strict user rights management. Most this concerns Linux, where the binary resides inside a bin dir and user specific settings are stored in his home dir. Short: now supporting multiuser systems and also have a portable mode, where modifications are only on local media.
-[add] Feature Request ID 1730360 : Along with real support for multiuser systems, each user can have his own indenter settings. These won't be overwritten by an update, what was the case before.
-[add] Feature Request ID 1867628 : Added a button to the toolbar near the indenter selection that opens the indenters online manual.
-[add] Feature Request ID 1867660 : Created a simple man page for unix based systems.
-[add] The by the qmake projekt file resulting makefile has a directive for install on unix based systems now.
-[add] Added example files for most supported programming languages, so each indenter can be tested.
-[change] The source code archive is now in a Unix conform format and naming convention.
-[change] The used paths have changed. The "data" directory has been renamed to indenters and includes only the uigui ini files and maybe some indenter binaries. Futher a config and a temp directory are used.
-[change] In case of an error during calling the indenter, its standard output is appended to the error dialog.
-[change] Corrected some misspelling.
-[change] Renamed htmltidy to tidy because that is its official name and also the name of the binary in all Linux packages.
-[fix] Bug ID 1855460 : The parameter settings of the indenter were only saved, if preview is turned on. Now the settings are always remembered.
-[fix] Bug ID 1854156 : The syntax highlighter did not switch to perl if a file with suffix .pl or .pm was loaded.
-
-2007-11-22 Version 0.7.1 Beta
-[add] Feature Request ID 1833814 : Added support for building on MacOSX.
-[change] Feature Request ID 1836486 : Update to latest version of Uncrustify.
-[change] Update to latest version of Artistic Styler.
-
-2007-11-11 Version 0.7.0 Beta
-[add] Feature Request ID 1826733 : If the called indenter returns an error message, you can chose to not show the same error again. Helpful for HTMLtidy since it often shows a long, repeating error list.
-[add] Feature Request ID 1805974 : Added an option to clear the list of recently opened files.
-[add] Feature Request ID 1760997 : Added some code lines to example.cpp to test whether an indenter correctly handles preprocessor defines.
-[add] Feature Request ID 1752551 : If the user manually checks for updates a progress/busy dialog will be shown.
-[add] Feature Request ID 1736932 : The user gets shown a dialog if he has manually checked for an update and no new one is available.
-[change] The update check is now enabled by default.
-[change] Slighty changes made to the settings dialog; put texts in front of the changed value.
-[fix] Bug ID 1807179 : GNU Indent didn't work properly on Windows system, after the dlls libiconv-2.dll and libintl-2.dll were removed. Readded them.
-[fix] Bug ID 1805976 : The HTML export didn't produce any output. Fixed that, but still has not syntax formatting.
-[fix] Bug ID 1815023 : Mixed traditional with simplified chinese translation. Now preferring to use english text instead of mixing if no traditional translation is available.
-[fix] Bug ID 1815120 : The font of the editor component was wrong (not monospaced), if syntax highlighting was turned off.
-
-2007-06-13 Version 0.6.1 Beta
-[add] Feature Request ID 1729433 : Added a recently opened file menu.
-[add] Feature Request ID 1704290 : Added possibiltiy to integrate into an IDE, editor or other as external tool. This is donw by creating a batch/shell script which accepts a file as parameter and calls the indenter with the in UniversalIndentGUI made settings.
-[add] Feature Request ID 1673659 : The string parameter in the uigui ini files for each indenter can now also be a list of strings divided by "|" sign. As result the parameter name with value will be written to the indenter config file for each of the values.
-[add] Feature Request ID 1730180 : UniversalIndentGUI can automatically check on start, whether a new version is available. This setting is disabled by default and can be enabled in the settings.
-[add] Added support for HTML Tidy. The executable is contained in the release package.
-[add] Feature Request ID 1736432 : The width of the dock widget containing the indenter parameters is now restored on program start.
-[change] The about dialog shows now a credits scroller to say thanks to all people, who have helped me somehow.
-[fix] Bug ID 1733499 : UniversalIndentGui crashed if inside of an indenter ini file the category number of one parameter was higher than the available categories.
-[fix] Bug ID 1735586 : Some dialogs had untranslated buttons. For example yes, no, cancel were not translated.
-
-2007-06-03 Version 0.6.0 Beta
-[add] Feature Request ID 1700557 : Added a settings dialog for handling more possible settings with better usabiltiy.
-[add] Feature Request ID 1700556 : Added option to load last file or not on startup.
-[add] Feature Request ID 1684011 : Added option to set the width used to display tabs (default is four spaces).
-[add] Feature Request ID 1651718 : Added multiple choices, for the indenter configuration, with for the user readable text. Before the text inside of the combo boxes for the indenter parameters was exactly the same text as the command line parameter of the indenter. Now with "ChoicesReadable" a list with the same length as "Choices" can be used to insert readable text into the combo box. If this list is not set, the content of "Choices" will be used.
-[add] Partly Japanese translation. Thanks to Nirvash.
-[add] The language selection show the countries flag in front of its name to identify the language faster.
-[add] Feature Request ID 1657253 : If now configuration ini file for any indenter can be found, a warning will be displayed.
-[change] Feature Request ID 1723228 : The default font for all syntax highlighters is now mono spaced, Courier.
-[change] Along with the settings dialog cleaned up the user interface. Moved some not that often needed settings away to the settings dialog.
-[change] The full text of the GPL in the about dialog did slow down the program startup and translation. Now only a hint and link to the GPL is given in the about dialog.
-[fix] Bug ID 1692511 : UniversalIndentGui crashed, if a by the syntax highlighter unsupported file extension was opened.
-[fix] Bug ID 1727538 : The setting for syntax highlighting was allways enabled on startup, even if disabled on closing.
-[fix] Bug ID 1729026 : The highlighting style was not correct when changed to another highlighter than the current. Only after toggling preview for example the style was correct.
-[fix] The editors column showing the line numbers did not adapt its width to the maximum line number.
-
-2007-03-19 Version 0.5.1 Beta
-[add] Supporting syntax highlightning for the programming language D.
-[change] The live typing and indenting feature was not adapted to QScintilla. Now works again (depending on the used indenter).
-[fix] Bug ID 1678783 : Files other encoded than ascii were not displayed correctly. Now allways displaying files using UTF-8 encoding.
-[fix] Bug ID 1678783 : The new syntax highlighter selection menu was not translated.
-[fix] When file was reloaded with other encoding the file was allways set to be modified even if it wasn't.
-
-2007-03-14 Version 0.5.0 Beta
-[add/change] Using QScintilla as editing component, which is by far more mighty than the before uses QTextEdit. Have a look inside the development area for details.
-[add] Because of QScintilla, added syntax highlightning for bash, batch, cpp, csharp, css, diff, html, idl, java, javascript, lua, makefile, perl, pov, ini, python, ruby, sql and tex.
-[add] Also added code folding for previously mentioned languages.
-[add] Added support for the indenter "phpCB" phpCodeBeatufier. (Thanks to Nelson Tai) The executable is not included in the UiGui release, because I am not sure about the license of phpCB right now.
-[add] The output of an indenter can now be read from stdout, by setting "stdout" for "outputFileParameter".
-[add] Feature Request ID 1673549 : The order of the indenter call parameters for input file, output file and options[file] is now selectable in three states: pio, ipo, iop.
-[add] Feature Request ID 1675503 : The last set encoding is being remembered and used on loading last file.
-[add] Feature Request ID 1669822 : The last window position, size and maximized state is stored in the settings and restored.
-[add] Feature Request ID 1673670 : Made it possible to switch between visible and invisible white space characters, like spaces and tabs.
-[change] The "personal" configuration files of each indenter (like gc.cfg) are no longer included in a release, so these settings can be loaded into UiGui after updating.
-[fix] Bug ID 1678783: If the current opened file had no save name yet, only the path was written to the settings file, causing an error on next start.
-
-2007-02-25 Version 0.4.2 Beta
-[add] Support for the indenter CSSTidy has been added.
-[add] Support for new language: Taiwan (Chinese).
-[change] For easier translation the about dialog has been redesigned a bit.
-2007-02-11 Version 0.4.1 Beta
-[add] Support for the indenter Uncrustify has been added.
-[add] Feature Request ID 1651719: A binary release for Linux AMD64 is now available.
-[add] Feature Request ID 1657251: If only a win32 executable exists under Linux, wine will be used to call it. Now a test will be mad if wine is installed and an error message will show up if not installed.
-[change] Some changes mad to the Artistic Styler ini file as suggested by its author Jim Pattee.
-[change] Put the file open button at first position in the toolbar, because normally this is the first step one would do, if he tries to find the optimal indenter and settings for himself.
-[change] The background in the about dialog has been changed to look equal on all systems.
-[change] The error message dialogs had small optical enhancements to be more readable.
-[fix] Bug ID 1657255: If an error occurred during the try to call the indenter, a message box is being shown, but the mouse cursor still indicated that the application is being busy.
-[fix] Bug ID 1651071: Changing the file encoding did not affect the code sent to the indenter, so the code while preview turned on, had wrong encoding (still seems to have some encoding problems under Linux).
-[fix] Bug ID 1650222: On Windows systems there were two DLLs missing to run GNU Indent ("libiconv-2.dll" and "libintl-2.dll")
-[fix] Bug ID 1649918: The indenter was not called after first program start, so preview updated first after changing a setting or the code.
-
-2007-02-01 Version 0.4 Beta
-[add] All parameters of GNU Indent have been added.
-[add] From now on the indenter BCPP is included.
-[add] The loaded source file encoding is now convertable by the menu entry "Reopen File with other Encoding". This way chinese encoding etc. is possible to load. (Suggest for this submitted by Nelson, Bug ID 1643541)
-[add] A subdirectory "doc" has been added, containing the file "iniFileFormat.html" with info how to write ini files for new indenters.
-[change] Updated the astyle executable and the ini file to version 1.20.1
-[change] Restructured the gui design a little bit. Using a moveable dock widget for the indenter settings now. Using a toolbar that can also be placed at the bottom.
-[change] Made it possible to change the language without the need to restart the application.
-[change] Line numbers are now geyed out, because this is more decent and selecting the numbers is no longer possible.
-[change] The link to the homepage in the about dialog now really opens the website.
-[change] The linux version is now statically linked against Qt so there should be no problems with wrong Qt versions installed or even no Qt libraries installed.
-[fix] Bug ID 1553601: If no uigui ini file was found the application stopped with an exception.
-
-2006-09-04 Version 0.3.1 Beta
-[add] Language selector and german translation added.
-
-2006-08-25 Version 0.3 Beta
-[add] A message box will show up at opening a source file or program exit, if the source code has been changed, and ask whether to save the file or not.
-[add] The symbol "*" will be shown in the window title in front of the source file name if the source code has been changed.
-[add] By a settings menu entry the tool tips for the indenter parameter settings can be en/disabled because they can be annoying.
-[add] A settings file is from now on used to remember the last selected indenter and last opened source code file.
-[add] The source code can now be exported as a PDF or HTML document.
-[add] Some commands are now faster available by keyboard shortcuts.
-[fix] The calling name in the indenter ini file for GreatCode was written lower case while the real file name was upper case, which resulted in a program calling error.
-[fix] Corrected the tab order for the gui elements.
-[change] Optimized speed when switching between the available indenters. If the indenters ini file is large, this still takes some time.
-
-2006-08-11 Version 0.2.5 Alpha
-[add] when loading or saving either a source code or config file the load/save dialog will open in the files directory and not allways in the UniversalIndentGUI dir
-[add] currently made settings for the indenter can be saved to any file
-[add] the menue entries for loading and saving the indenter config file have now icons
-[add] the currently opened source code file name and path will be shown in the window title bar
-[add] a error dialog that will be shown once if the indenter executable for the selected indenter does not exist
-[fix] turning syntax highlight on/off did first take effect after toggle of preview
-[fix] the image in the about dialog box was not allways visible
-
-2006-08-03 Version 0.2.4 Alpha
-[change] the windows version does no longer need any dlls due to static linking and removing bind to mingwm10.dll
-[change] the windows version of the GNU Indent is replaced by a DJGPP compiled GNU Indent version, that needs no further DLLs
-[add] possibility to save the shown/indented source code
-[fix] the file extension used to call the selected indenter. It is now equal to the loaded source file extension so the indenter recognizes the source code language
-[fix] unnecessary calls of the indenter removed
-[fix] indenter was not called if preview was activated and indenter changed
-[fix] under linux the file mask for the open source file dialog did not work correctly
-
-2006-07-16 Version 0.2.3 Alpha
-[add] possibility to edit the source code while preview is active and see how it is formatted. So that is real live ;-)
-
-2006-07-14 Version 0.2.2 Alpha
-[add] ini file for GNU Indent with some first settings (if any one wants to write more in it let me know)
-[add] a menu bar for more pleasent and common use of the program (some not yet used menu items are disabled)
-[add] an about dialog
-[add] some icons for better look and feel (can you feel it ;-) )
-[fix] a bug under linux which caused an endless loop if text was edited
-
-2006-07-07 Version 0.2.1.1 Alpha (win32 only)
-- previously compiled using Visual Studio 2005 Express, whereby an additional installation of a redistributable package was needed to run UniversalIndentGUI. To avoid this and not force the user to install anything, now using mingw to compile.
-
-2006-07-04 Version 0.2.1 Alpha
-[add] function to load config file (not the uigui ini file) of every indenter (and reenabled load config file button)
-[add] use of a default value when loading a indenter config file and not all parameters are set.
-[add] all documented default parameters of GreatCode and Astyle to their ini files.
-[fix] loading of file mask for source code file after changing indenter
-[fix] call of indenter failed under win32 if a linux binary exists.
-
-2006-06-30 Version 0.2.0 Alpha
-[add] missing parameters for flexible indenter ini file format
-[add] complete Astyle ini file
-[add] multiple choice combobox for parameters
-[add] checkbox in front of numeric and string parameters to enable/disable them. If disabled indenters default value is used
-
-2006-06-28
-[add] working ini file for Astyle (right now only few boolean parameters)
-[change] ini file format for booleans to reach the planned flexibility
-
-2006-06-23
-[add] combobox in the upper left showing available indenters (found by searching for uigui_*.ini file). at the moment only GreatCode and testwise Astyle
-[add] more detailed info if the indenter call results in an error
-[add] icon for executable
-[change] style/format of the ini file. Still not all planned features implemented
-- some bugfixes, as you can say this in a preAlpha
-
-2006-06-07
-[change] unnecessary gui menu removed
-[fix] corrected ini file for great code (only in executable release)
-[add] made call of windows version of GreatCode under Linux possible by using wine
+2012-01-01 Version 1.2.0 +[add] The Linux version has a menu entry in the application development menu now. +[add] The Linux version has a mime type association to some code files now, so that UiGUI is available as "open with". +[add] Added support for the Visual Basic beautifier VBSBeautifier. +[add] Added support for the SQL beautifier Pl/Sql tidy. +[add] Updated the Artistic Style configuration to support Artistic Style version 2.02.1. +[add] Updated the Uncrustify configuration to support Uncrustify version 0.59. +[add] Updated the PerlTidy configuration to support PerlTidy version 1.74. +[add] Updated the Ruby Script Beautifier to version 2.9. +[fix] Bug ID 3021933: Updated the Artistic Style configuration to support Artistic Style version 2.01. +[fix] Bug ID 3021931: Fixed calling of Artistic Style version 1.22 and later. +[fix] Bug ID 3006513: Fixed compiling UiGUI using GCC 4.5 and later. +[fix] Bug ID 2942381: When loading an indenter configuration file, the settings displayed in the docking widget were correctly updated, but the code wasn't. +[fix] Bug ID 2135872: A zombie process kept on running if UiGUI was quit during the update check in background if no internet connection is available. +[fix] Bug ID 3175027: Uncrustify had wrong pop-up comments for two check-boxes. +[fix] Bug ID 2916163: The proxy settings are properly used and applied now. +[fix] Made the JsDecoder integration be compatible with recent Qt versions. +[change] Changed the created shell scripts indenter config file reference. Now each created shell script has a corresponding config file being created in the same dir as the shell script, with the same name but different suffix. But since the config file is referenced by "./", when calling the script the working directory must be the same as the directory containing the config file. +[change] Using TCLAP as command line parser instead of own command line parsing. +[change] Setting a file name as parameter on the command line without any prefix will load this file instead of the last opened one. +[change] Rewritten and improved the internal way how settings are connected to the UI. +[change] Refactored and cleaned up the code. +[change] Will no longer deliver binary bundles linked against Qt statically. Instead delivering all dependent DLLs and libs. + +2009-07-16 Version 1.1.0 +[add] Added a logging class, that can catch debug output and make trace backs if any problems occur possible. +[add] Added an application icon for Mac OS X. +[change] Feature Request ID 2596302 : Updated the greatcode.ini. Thanks to adxadx who has done this work! +[change] Feature Request ID 2793216: Updated to Uncrustify 0.53. +[change] Updated to JsDecoder version 1.1.0 +[fix] Bug ID 2791229: If UiGUI was located in a path containing Unicode characters or such a path needed to be handed over to a called indenter, the indenter could get confused on Windows. So using the Windows 8.3 short path notation. +[fix] On Mac OS X the used default font wasn't monospaced. Switched back to use Courier on Mac. + +2009-02-12 Version 1.0.2 +[add] Feature Request ID 2498654 : Added support for the Fortran indenter F90ppr. http://universalindent.sf.net/issue/feature/2498654 +[add] Made it possible to define "stdin" to be used for an indenter calling. +[change] Made the source code be compilable with the slightly older QScintilla version 2.2. +[change] When starting the very first time without any existing application settings, do not show the mainwindow at position 0,0. On Mac the window couldn't be moved because the window title bar was hidden under the Mac menu bar. +[change] When using a non Windows system the default editor font type is now Monospace instead of Courier. The latter was not found properly. +[change] For security reason using a randomly generated temporary directory name on Unix based systems. +[change] Improved the GUI updates for the Notepad++ plugin a bit. Not what I would call "good" yet. +[fix] Bug ID 2284777 : The Notepad++ plugin was falsely linked against Qt debug dlls, which were not included. http://universalindent.sf.net/issue/bug/2284777 +[fix] Bug ID 2594251 : The new version available check didn't work anymore since version 1.0.1. http://universalindent.sf.net/issue/bug/2594251 +[fix] Avoid a crash if an uigui ini file with faulty header info is read, where the indenter executable was empty. +[fix] Some application settings were tried to be read from a wrong directory when running in multi user mode. + +2008-10-14 Version 1.0.1 +[add] Feature Request ID 2161471 : Added support for the Python indenter pindent. +[add] Feature Request ID 1883444 : Added support for the JSP indenter JSPPP. +[add] Feature Request ID 1867563 : Added support for the XML indenter XML Indent. +[add] Support for French language. Thanks to Erwan "leg". +[change] Some small translation corrections. +[change] Improved the "new version available" check. +[change] On Mac and Linux a one pixel frame was shown around the whole screen when about dialog is visible. Removed that. +[change] Updated to Uncrustify version 0.49 from SVN repository. +[change] Using a new logo icon for UniversalIndentGUI. The logo was created by Erwan "leg". Thanks! +[fix] Bug ID 2173527 : Could not load Artistic Style config file properly if both parameters "--brackets=linux" and "--brackets=break-closing" were set. http://universalindent.sf.net/issue/2173527 +[fix] The distributed version of GNU Indent was using a misspelled configuration file, thus lieve preview didn't correctly work. Using original GNU Win32 version now. +[fix] In version 1.0.0 the creation of batch files for indenters undet Windows always created a bash/shell script instead of batch. +[fix] Keyboard shortcuts for enabling/disabling "Live Preview" and syntax highlighting didn't work. + +2008-09-30 Version 1.0.0 non public release. Only presented for Qt Centre programming contest. +[add] Made it possible to start UiGUI in different modes via parameters: Normal (full UI), plugin (only indenter menu, server active), server only. +[add] Added a server functionality. Future plan is to let UiGUI run also as server so plugins from other editors can send indent requests over TCP/IP to it. Very early state right now. +[add] Created a plugin for Notepad++. This plugin shows the indenter parameter menu and lets the user indent the selected or whole text. Live preview works also. Still has some eventloop graphic update problems. +[add] Added support for two (rather simple) Ruby beautifiers, ruby_formatter and rbeautify. +[add] Feature Request ID 1985475 : Added the possibility to reset all indenter parameters to default values. http://universalindent.sf.net/issue/1985475 +[add] Feature Request ID 1989585 : Added a context menu in indenter parameters widget and moved all functions handling these actions from the main window to the indent handler. http://universalindent.sf.net/issue/1989585 +[add] Feature Request ID 1977033 : Now supporting the Cobol intender Cobol Beautifier. http://universalindent.sf.net/issue/1977033 +[add] Feature Request ID 2080832 : Now showing the cursors current line and column number in the statusbars down right corner. http://universalindent.sf.net/issue/2080832 +[change] Using Qt >= 4.4.x now and thereby implemented an animated 3D about dialog. +[change] Using QScintilla >= 2.3 now and thereby added support for Cmake, Fortran[77], Pascal, PostScript, TCL, VHDL, XML and YAML. +[change] Reformatted the about dialog to only contain one QTextEdit. Also added some more links to that text. +[change] Limited the size of the combobox showing the indenters because with the supported programming languages in the name, the comobox was to large in width. +[change] Prevent php file from being tried to be executed directly. That could happen if the file has the execution flag set. However that should never be the case, so this is a workaround. +[change] Added a new class UiguiIniFileParser which will replace the currently used QSettings for reading the indenter parameters. Thus parameters appear in the menu in the same order as in the ini file and are no longer alphabetically sorted. +[change] Redesigned the user interface and code a bit. The indenter selection combo box along with the manual button are now placed in docking widget where all indenter parameters are placed. This is done in preparation to pull out the complete indent handler, so it can be used as plugin for Notepad++ or Eclipse etc.] +[change] Made reading the indenter config files more tolerant. If the user disobeys case sensitivity when editing the config file by hand, the values are correctly parsed anyway. +[change] Feature Request ID 1989587 : There is no longer any need to have a current value setting in the ini files. A default value is enough. http://universalindent.sf.net/issue/1989587 +[change] Completely removed QT3Support functions. +[change] Removed all compiler warnings. +[change] Changed the way internal settings are handled. Using QObject propertys for connected setting name now. +[fix] The by each indenter supported programming languages, written in braces, are removed from the created shell scripts name. +[fix] Corrected the move/mv commands parameter in the created shell and batch script when calling recursive. +[fix] Bug ID 1986471 : The file modification flag did not work properly. Reason was that QScintilla can not set its textedit component modified flag to true by a function call. http://universalindent.sf.net/issue/1986471 + +2008-05-26 Version 0.8.2 +[add] Feature Request ID 1971206 : Now showing by the indenter supported programming languages next to indenter name. +[add] Feature Request ID 1971181 : Added support for the HTML indenter HTB. +[add] Feature Request ID 1867562 : Added support for the HTML indenter hindent. +[add] Added support for the php indenter phpStylist version 1.0. +[add] Added the possibility to directly setting php files as indenter. The suffix .php is recognized and php used as default interpreter. +[add] Extended the created batch/shell script so it is able to indent only one file given as parameter or a whole directory recursively with a defined file suffix. +[add] Feature Request ID 1885911 : Added the possibility to open a file on applications start, that is handed over as parameter on the command line. +[add] Feature Request ID 1729429 : Added the possibility to drag'n drop in any source code file for opening it. +[change] Created indenter shell scripts now automatically have the executable flag set to true. +[change] Completed the support for all perl tidy parameters. +[change] Updated to uncrustify version 0.46. +[fix] Bug ID 1933074 : On Unix systems the user config files were stored in his home dir in the subfolder ".config". Now they are directly stored in ".universalindentgui". +[fix] Fixed a bug where the string "<html><body>" was prepended to the output code. Occurred for example when using the shell indenter. + +2008-03-27 Version 0.8.1 +[add] Feature Request ID 1909450 : Added support for the PEAR PHP beautifier. Thus PHP beautifying is also possible on Linux and Mac OS X. (Needs the PEAR package "PHP_Beautifier" to be installed and a path entry pointing to the PHP dir.) +[add] Added support and translations for Russian and Ukrainian language. Thanks to Oleksandr (http://korytskyy.lviv.ua). +[add] Feature Request ID 1901935 : From now on files are saved with the same encoding as they were opened and no longer always UTF-8. Also it is possible to save the file with any other encoding. +[change] The detection whether to run in portable mode now depends on where the "config" folder resides and no longer the "indenters" folder. This is needed to be able to correctly run on Windows multiuser systems. +[change] Removed the word "beta" whereever it occurred, since UiGUI isn't that beta anymore. +[fix] Bug ID 1910773 : On Unix systems the globally available files, like indenters, translations etc are not longer installed to /etc/universalindentgui but to /usr/share/universalindentgui. + +2008-01-17 Version 0.8.0 Beta +[add] Feature Request ID 1849297 : Added support for indenters written in JavaScript using an internal interpreter. Have a look into the README.txt to get to know, what steps are needed for that. +[add] Added support for a simple JavaScript indenter written in JavaScript itself. +[add] Added support for a simple shell code indenter written in awk. +[add] Feature Request ID 1736946 : It is now possible to run any indenter that is available in the global environment via a path entry. +[add] Feature Request ID 1852483 : Indenters written in script languages, like perl, are now also supported, if they have a correct shebang. +[add] Added support for the well known perltidy. The uigui ini file is completed up to the category and including "Line Break Control". Rest needs to be done. +[add] Feature Request ID 1866599 : Adapted the used paths for settings, temporary files and the one containing indenter ini files to be conform with systems that use strict user rights management. Most this concerns Linux, where the binary resides inside a bin dir and user specific settings are stored in his home dir. Short: now supporting multiuser systems and also have a portable mode, where modifications are only on local media. +[add] Feature Request ID 1730360 : Along with real support for multiuser systems, each user can have his own indenter settings. These won't be overwritten by an update, what was the case before. +[add] Feature Request ID 1867628 : Added a button to the toolbar near the indenter selection that opens the indenters online manual. +[add] Feature Request ID 1867660 : Created a simple man page for unix based systems. +[add] The by the qmake projekt file resulting makefile has a directive for install on unix based systems now. +[add] Added example files for most supported programming languages, so each indenter can be tested. +[change] The source code archive is now in a Unix conform format and naming convention. +[change] The used paths have changed. The "data" directory has been renamed to indenters and includes only the uigui ini files and maybe some indenter binaries. Futher a config and a temp directory are used. +[change] In case of an error during calling the indenter, its standard output is appended to the error dialog. +[change] Corrected some misspelling. +[change] Renamed htmltidy to tidy because that is its official name and also the name of the binary in all Linux packages. +[fix] Bug ID 1855460 : The parameter settings of the indenter were only saved, if preview is turned on. Now the settings are always remembered. +[fix] Bug ID 1854156 : The syntax highlighter did not switch to perl if a file with suffix .pl or .pm was loaded. + +2007-11-22 Version 0.7.1 Beta +[add] Feature Request ID 1833814 : Added support for building on MacOSX. +[change] Feature Request ID 1836486 : Update to latest version of Uncrustify. +[change] Update to latest version of Artistic Styler. + +2007-11-11 Version 0.7.0 Beta +[add] Feature Request ID 1826733 : If the called indenter returns an error message, you can chose to not show the same error again. Helpful for HTMLtidy since it often shows a long, repeating error list. +[add] Feature Request ID 1805974 : Added an option to clear the list of recently opened files. +[add] Feature Request ID 1760997 : Added some code lines to example.cpp to test whether an indenter correctly handles preprocessor defines. +[add] Feature Request ID 1752551 : If the user manually checks for updates a progress/busy dialog will be shown. +[add] Feature Request ID 1736932 : The user gets shown a dialog if he has manually checked for an update and no new one is available. +[change] The update check is now enabled by default. +[change] Slighty changes made to the settings dialog; put texts in front of the changed value. +[fix] Bug ID 1807179 : GNU Indent didn't work properly on Windows system, after the dlls libiconv-2.dll and libintl-2.dll were removed. Readded them. +[fix] Bug ID 1805976 : The HTML export didn't produce any output. Fixed that, but still has not syntax formatting. +[fix] Bug ID 1815023 : Mixed traditional with simplified chinese translation. Now preferring to use english text instead of mixing if no traditional translation is available. +[fix] Bug ID 1815120 : The font of the editor component was wrong (not monospaced), if syntax highlighting was turned off. + +2007-06-13 Version 0.6.1 Beta +[add] Feature Request ID 1729433 : Added a recently opened file menu. +[add] Feature Request ID 1704290 : Added possibiltiy to integrate into an IDE, editor or other as external tool. This is donw by creating a batch/shell script which accepts a file as parameter and calls the indenter with the in UniversalIndentGUI made settings. +[add] Feature Request ID 1673659 : The string parameter in the uigui ini files for each indenter can now also be a list of strings divided by "|" sign. As result the parameter name with value will be written to the indenter config file for each of the values. +[add] Feature Request ID 1730180 : UniversalIndentGUI can automatically check on start, whether a new version is available. This setting is disabled by default and can be enabled in the settings. +[add] Added support for HTML Tidy. The executable is contained in the release package. +[add] Feature Request ID 1736432 : The width of the dock widget containing the indenter parameters is now restored on program start. +[change] The about dialog shows now a credits scroller to say thanks to all people, who have helped me somehow. +[fix] Bug ID 1733499 : UniversalIndentGui crashed if inside of an indenter ini file the category number of one parameter was higher than the available categories. +[fix] Bug ID 1735586 : Some dialogs had untranslated buttons. For example yes, no, cancel were not translated. + +2007-06-03 Version 0.6.0 Beta +[add] Feature Request ID 1700557 : Added a settings dialog for handling more possible settings with better usabiltiy. +[add] Feature Request ID 1700556 : Added option to load last file or not on startup. +[add] Feature Request ID 1684011 : Added option to set the width used to display tabs (default is four spaces). +[add] Feature Request ID 1651718 : Added multiple choices, for the indenter configuration, with for the user readable text. Before the text inside of the combo boxes for the indenter parameters was exactly the same text as the command line parameter of the indenter. Now with "ChoicesReadable" a list with the same length as "Choices" can be used to insert readable text into the combo box. If this list is not set, the content of "Choices" will be used. +[add] Partly Japanese translation. Thanks to Nirvash. +[add] The language selection show the countries flag in front of its name to identify the language faster. +[add] Feature Request ID 1657253 : If now configuration ini file for any indenter can be found, a warning will be displayed. +[change] Feature Request ID 1723228 : The default font for all syntax highlighters is now mono spaced, Courier. +[change] Along with the settings dialog cleaned up the user interface. Moved some not that often needed settings away to the settings dialog. +[change] The full text of the GPL in the about dialog did slow down the program startup and translation. Now only a hint and link to the GPL is given in the about dialog. +[fix] Bug ID 1692511 : UniversalIndentGui crashed, if a by the syntax highlighter unsupported file extension was opened. +[fix] Bug ID 1727538 : The setting for syntax highlighting was allways enabled on startup, even if disabled on closing. +[fix] Bug ID 1729026 : The highlighting style was not correct when changed to another highlighter than the current. Only after toggling preview for example the style was correct. +[fix] The editors column showing the line numbers did not adapt its width to the maximum line number. + +2007-03-19 Version 0.5.1 Beta +[add] Supporting syntax highlightning for the programming language D. +[change] The live typing and indenting feature was not adapted to QScintilla. Now works again (depending on the used indenter). +[fix] Bug ID 1678783 : Files other encoded than ascii were not displayed correctly. Now allways displaying files using UTF-8 encoding. +[fix] Bug ID 1678783 : The new syntax highlighter selection menu was not translated. +[fix] When file was reloaded with other encoding the file was allways set to be modified even if it wasn't. + +2007-03-14 Version 0.5.0 Beta +[add/change] Using QScintilla as editing component, which is by far more mighty than the before uses QTextEdit. Have a look inside the development area for details. +[add] Because of QScintilla, added syntax highlightning for bash, batch, cpp, csharp, css, diff, html, idl, java, javascript, lua, makefile, perl, pov, ini, python, ruby, sql and tex. +[add] Also added code folding for previously mentioned languages. +[add] Added support for the indenter "phpCB" phpCodeBeatufier. (Thanks to Nelson Tai) The executable is not included in the UiGui release, because I am not sure about the license of phpCB right now. +[add] The output of an indenter can now be read from stdout, by setting "stdout" for "outputFileParameter". +[add] Feature Request ID 1673549 : The order of the indenter call parameters for input file, output file and options[file] is now selectable in three states: pio, ipo, iop. +[add] Feature Request ID 1675503 : The last set encoding is being remembered and used on loading last file. +[add] Feature Request ID 1669822 : The last window position, size and maximized state is stored in the settings and restored. +[add] Feature Request ID 1673670 : Made it possible to switch between visible and invisible white space characters, like spaces and tabs. +[change] The "personal" configuration files of each indenter (like gc.cfg) are no longer included in a release, so these settings can be loaded into UiGui after updating. +[fix] Bug ID 1678783: If the current opened file had no save name yet, only the path was written to the settings file, causing an error on next start. + +2007-02-25 Version 0.4.2 Beta +[add] Support for the indenter CSSTidy has been added. +[add] Support for new language: Taiwan (Chinese). +[change] For easier translation the about dialog has been redesigned a bit. +2007-02-11 Version 0.4.1 Beta +[add] Support for the indenter Uncrustify has been added. +[add] Feature Request ID 1651719: A binary release for Linux AMD64 is now available. +[add] Feature Request ID 1657251: If only a win32 executable exists under Linux, wine will be used to call it. Now a test will be mad if wine is installed and an error message will show up if not installed. +[change] Some changes mad to the Artistic Styler ini file as suggested by its author Jim Pattee. +[change] Put the file open button at first position in the toolbar, because normally this is the first step one would do, if he tries to find the optimal indenter and settings for himself. +[change] The background in the about dialog has been changed to look equal on all systems. +[change] The error message dialogs had small optical enhancements to be more readable. +[fix] Bug ID 1657255: If an error occurred during the try to call the indenter, a message box is being shown, but the mouse cursor still indicated that the application is being busy. +[fix] Bug ID 1651071: Changing the file encoding did not affect the code sent to the indenter, so the code while preview turned on, had wrong encoding (still seems to have some encoding problems under Linux). +[fix] Bug ID 1650222: On Windows systems there were two DLLs missing to run GNU Indent ("libiconv-2.dll" and "libintl-2.dll") +[fix] Bug ID 1649918: The indenter was not called after first program start, so preview updated first after changing a setting or the code. + +2007-02-01 Version 0.4 Beta +[add] All parameters of GNU Indent have been added. +[add] From now on the indenter BCPP is included. +[add] The loaded source file encoding is now convertable by the menu entry "Reopen File with other Encoding". This way chinese encoding etc. is possible to load. (Suggest for this submitted by Nelson, Bug ID 1643541) +[add] A subdirectory "doc" has been added, containing the file "iniFileFormat.html" with info how to write ini files for new indenters. +[change] Updated the astyle executable and the ini file to version 1.20.1 +[change] Restructured the gui design a little bit. Using a moveable dock widget for the indenter settings now. Using a toolbar that can also be placed at the bottom. +[change] Made it possible to change the language without the need to restart the application. +[change] Line numbers are now geyed out, because this is more decent and selecting the numbers is no longer possible. +[change] The link to the homepage in the about dialog now really opens the website. +[change] The linux version is now statically linked against Qt so there should be no problems with wrong Qt versions installed or even no Qt libraries installed. +[fix] Bug ID 1553601: If no uigui ini file was found the application stopped with an exception. + +2006-09-04 Version 0.3.1 Beta +[add] Language selector and german translation added. + +2006-08-25 Version 0.3 Beta +[add] A message box will show up at opening a source file or program exit, if the source code has been changed, and ask whether to save the file or not. +[add] The symbol "*" will be shown in the window title in front of the source file name if the source code has been changed. +[add] By a settings menu entry the tool tips for the indenter parameter settings can be en/disabled because they can be annoying. +[add] A settings file is from now on used to remember the last selected indenter and last opened source code file. +[add] The source code can now be exported as a PDF or HTML document. +[add] Some commands are now faster available by keyboard shortcuts. +[fix] The calling name in the indenter ini file for GreatCode was written lower case while the real file name was upper case, which resulted in a program calling error. +[fix] Corrected the tab order for the gui elements. +[change] Optimized speed when switching between the available indenters. If the indenters ini file is large, this still takes some time. + +2006-08-11 Version 0.2.5 Alpha +[add] when loading or saving either a source code or config file the load/save dialog will open in the files directory and not allways in the UniversalIndentGUI dir +[add] currently made settings for the indenter can be saved to any file +[add] the menue entries for loading and saving the indenter config file have now icons +[add] the currently opened source code file name and path will be shown in the window title bar +[add] a error dialog that will be shown once if the indenter executable for the selected indenter does not exist +[fix] turning syntax highlight on/off did first take effect after toggle of preview +[fix] the image in the about dialog box was not allways visible + +2006-08-03 Version 0.2.4 Alpha +[change] the windows version does no longer need any dlls due to static linking and removing bind to mingwm10.dll +[change] the windows version of the GNU Indent is replaced by a DJGPP compiled GNU Indent version, that needs no further DLLs +[add] possibility to save the shown/indented source code +[fix] the file extension used to call the selected indenter. It is now equal to the loaded source file extension so the indenter recognizes the source code language +[fix] unnecessary calls of the indenter removed +[fix] indenter was not called if preview was activated and indenter changed +[fix] under linux the file mask for the open source file dialog did not work correctly + +2006-07-16 Version 0.2.3 Alpha +[add] possibility to edit the source code while preview is active and see how it is formatted. So that is real live ;-) + +2006-07-14 Version 0.2.2 Alpha +[add] ini file for GNU Indent with some first settings (if any one wants to write more in it let me know) +[add] a menu bar for more pleasent and common use of the program (some not yet used menu items are disabled) +[add] an about dialog +[add] some icons for better look and feel (can you feel it ;-) ) +[fix] a bug under linux which caused an endless loop if text was edited + +2006-07-07 Version 0.2.1.1 Alpha (win32 only) +- previously compiled using Visual Studio 2005 Express, whereby an additional installation of a redistributable package was needed to run UniversalIndentGUI. To avoid this and not force the user to install anything, now using mingw to compile. + +2006-07-04 Version 0.2.1 Alpha +[add] function to load config file (not the uigui ini file) of every indenter (and reenabled load config file button) +[add] use of a default value when loading a indenter config file and not all parameters are set. +[add] all documented default parameters of GreatCode and Astyle to their ini files. +[fix] loading of file mask for source code file after changing indenter +[fix] call of indenter failed under win32 if a linux binary exists. + +2006-06-30 Version 0.2.0 Alpha +[add] missing parameters for flexible indenter ini file format +[add] complete Astyle ini file +[add] multiple choice combobox for parameters +[add] checkbox in front of numeric and string parameters to enable/disable them. If disabled indenters default value is used + +2006-06-28 +[add] working ini file for Astyle (right now only few boolean parameters) +[change] ini file format for booleans to reach the planned flexibility + +2006-06-23 +[add] combobox in the upper left showing available indenters (found by searching for uigui_*.ini file). at the moment only GreatCode and testwise Astyle +[add] more detailed info if the indenter call results in an error +[add] icon for executable +[change] style/format of the ini file. Still not all planned features implemented +- some bugfixes, as you can say this in a preAlpha + +2006-06-07 +[change] unnecessary gui menu removed +[fix] corrected ini file for great code (only in executable release) +[add] made call of windows version of GreatCode under Linux possible by using wine diff --git a/INSTALL.txt b/INSTALL.txt index fa264cd..39f339d 100755 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -1,12 +1,12 @@ -How to install UniversalIndentGUI
----------------------------------
-
-Well, there is no need to install this application at all. While you are reading this file,
-you obviously already have unpacked the archive and thats all you need to do. You can start
-the program by calling its executable. On Windows thats "UniversalIndentGUI.exe" and on any
-other system it is "UniversalIndentGUI".
-
-No additional libraries are needed.
-
-For information about how to build UniversalIndentGUI from source, have a look into the
+How to install UniversalIndentGUI +--------------------------------- + +Well, there is no need to install this application at all. While you are reading this file, +you obviously already have unpacked the archive and thats all you need to do. You can start +the program by calling its executable. On Windows thats "UniversalIndentGUI.exe" and on any +other system it is "UniversalIndentGUI". + +No additional libraries are needed. + +For information about how to build UniversalIndentGUI from source, have a look into the file readme.html.
\ No newline at end of file diff --git a/config/UiGuiSyntaxHighlightConfig.ini b/config/UiGuiSyntaxHighlightConfig.ini index c7e346f..3db2503 100755 --- a/config/UiGuiSyntaxHighlightConfig.ini +++ b/config/UiGuiSyntaxHighlightConfig.ini @@ -1,3407 +1,3407 @@ -[Bash]
-style0=Default
-style0\color=8421504
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Error
-style1\color=16776960
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16711680
-style10=Parameter expansion
-style10\color=0
-style10\eolfill=false
-style10\font=Courier, 10, 0, 0, 0
-style10\paper=16777184
-style11=Backticks
-style11\color=16776960
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=10518656
-style12=Here document delimiter
-style12\color=0
-style12\eolfill=false
-style12\font=Courier, 10, 0, 0, 0
-style12\paper=14536925
-style13=Single-quoted here document
-style13\color=8323199
-style13\eolfill=true
-style13\font=Courier, 10, 0, 0, 0
-style13\paper=14536925
-style2=Comment
-style2\color=32512
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=Number
-style3\color=32639
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Keyword
-style4\color=127
-style4\eolfill=false
-style4\font=Courier, 10, 1, 0, 0
-style4\paper=16777215
-style5=Double-quoted string
-style5\color=8323199
-style5\eolfill=false
-style5\font=Courier, 10, 0, 0, 0
-style5\paper=16777215
-style6=Single-quoted string
-style6\color=8323199
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=Operator
-style7\color=0
-style7\eolfill=false
-style7\font=Courier, 10, 1, 0, 0
-style7\paper=16777215
-style8=Identifier
-style8\color=0
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=16777215
-style9=Scalar
-style9\color=0
-style9\eolfill=false
-style9\font=Courier, 10, 0, 0, 0
-style9\paper=16769248
-
-[Batch]
-style0=Default
-style0\color=0
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Comment
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style2=Keyword
-style2\color=127
-style2\eolfill=false
-style2\font=Courier, 10, 1, 0, 0
-style2\paper=16777215
-style3=Label
-style3\color=8323199
-style3\eolfill=true
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=6316128
-style4=Hide command character
-style4\color=8355584
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=External command
-style5\color=127
-style5\eolfill=false
-style5\font=Courier, 10, 1, 0, 0
-style5\paper=16777215
-style6=Variable
-style6\color=8388736
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=Operator
-style7\color=0
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-
-[C%23]
-style0=Default
-style0\color=8421504
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=C comment
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style10=Operator
-style10\color=0
-style10\eolfill=false
-style10\font=Courier, 10, 1, 0, 0
-style10\paper=16777215
-style11=Identifier
-style11\color=0
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=16777215
-style12=Unclosed string
-style12\color=0
-style12\eolfill=true
-style12\font=Courier, 10, 0, 0, 0
-style12\paper=16777215
-style13=Verbatim string
-style13\color=32512
-style13\eolfill=true
-style13\font=Courier, 10, 0, 0, 0
-style13\paper=14745568
-style15=JavaDoc style C++ comment
-style15\color=4157503
-style15\eolfill=false
-style15\font=Courier, 10, 0, 0, 0
-style15\paper=16777215
-style16=Secondary keywords and identifiers
-style16\color=0
-style16\eolfill=false
-style16\font=Courier, 10, 0, 0, 0
-style16\paper=16777215
-style17=JavaDoc keyword
-style17\color=3170464
-style17\eolfill=false
-style17\font=Courier, 10, 0, 0, 0
-style17\paper=16777215
-style18=JavaDoc keyword error
-style18\color=8405024
-style18\eolfill=false
-style18\font=Courier, 10, 0, 0, 0
-style18\paper=16777215
-style19=Global classes and typedefs
-style19\color=0
-style19\eolfill=false
-style19\font=Courier, 10, 0, 0, 0
-style19\paper=16777215
-style2=C++ comment
-style2\color=32512
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=JavaDoc style C comment
-style3\color=4157503
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Number
-style4\color=32639
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Keyword
-style5\color=127
-style5\eolfill=false
-style5\font=Courier, 10, 1, 0, 0
-style5\paper=16777215
-style6=Double-quoted string
-style6\color=8323199
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=Single-quoted string
-style7\color=8323199
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-style9=Pre-processor block
-style9\color=8355584
-style9\eolfill=false
-style9\font=Courier, 10, 0, 0, 0
-style9\paper=16777215
-style8=IDL UUID
-style8\color=0
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=16777215
-
-[CSS]
-style0=Default
-style0\color=16711808
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Tag
-style1\color=127
-style1\eolfill=false
-style1\font=Courier, 10, 1, 0, 0
-style1\paper=16777215
-style10=ID selector
-style10\color=32639
-style10\eolfill=false
-style10\font=Courier, 10, 0, 1, 0
-style10\paper=16777215
-style11=Important
-style11\color=16744448
-style11\eolfill=false
-style11\font=Courier, 10, 1, 0, 0
-style11\paper=16777215
-style12=@@-rule
-style12\color=8355584
-style12\eolfill=false
-style12\font=Courier, 10, 1, 0, 0
-style12\paper=16777215
-style13=Double-quoted string
-style13\color=8323199
-style13\eolfill=false
-style13\font=Courier, 10, 0, 0, 0
-style13\paper=16777215
-style14=Single-quoted string
-style14\color=8323199
-style14\eolfill=false
-style14\font=Courier, 10, 0, 0, 0
-style14\paper=16777215
-style15=CSS2 property
-style15\color=41184
-style15\eolfill=false
-style15\font=Courier, 10, 0, 0, 0
-style15\paper=16777215
-style16=Attribute
-style16\color=8388608
-style16\eolfill=false
-style16\font=Courier, 10, 0, 0, 0
-style16\paper=16777215
-style2=Class selector
-style2\color=0
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=Pseudo-class
-style3\color=8388608
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Unknown pseudo-class
-style4\color=16711680
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Operator
-style5\color=0
-style5\eolfill=false
-style5\font=Courier, 10, 0, 0, 0
-style5\paper=16777215
-style6=CSS1 property
-style6\color=16608
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=Unknown property
-style7\color=16711680
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-style8=Value
-style8\color=8323199
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=16777215
-style17=CSS3 property
-style17\color=0
-style17\eolfill=false
-style17\font=Courier, 10, 0, 0, 0
-style17\paper=16777215
-style18=Pseudo-element
-style18\color=0
-style18\eolfill=false
-style18\font=Courier, 10, 0, 0, 0
-style18\paper=16777215
-style19=Extended CSS property
-style19\color=0
-style19\eolfill=false
-style19\font=Courier, 10, 0, 0, 0
-style19\paper=16777215
-style20=Extended pseudo-class
-style20\color=0
-style20\eolfill=false
-style20\font=Courier, 10, 0, 0, 0
-style20\paper=16777215
-style21=Extended pseudo-element
-style21\color=0
-style21\eolfill=false
-style21\font=Courier, 10, 0, 0, 0
-style21\paper=16777215
-
-[Cpp]
-style0=Default
-style0\color=8421504
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=C comment
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style10=Operator
-style10\color=0
-style10\eolfill=false
-style10\font=Courier, 10, 1, 0, 0
-style10\paper=16777215
-style11=Identifier
-style11\color=0
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=16777215
-style12=Unclosed string
-style12\color=0
-style12\eolfill=true
-style12\font=Courier, 10, 0, 0, 0
-style12\paper=14729440
-style15=JavaDoc style C++ comment
-style15\color=4157503
-style15\eolfill=false
-style15\font=Courier, 10, 0, 0, 0
-style15\paper=16777215
-style16=Secondary keywords and identifiers
-style16\color=0
-style16\eolfill=false
-style16\font=Courier, 10, 0, 0, 0
-style16\paper=16777215
-style17=JavaDoc keyword
-style17\color=3170464
-style17\eolfill=false
-style17\font=Courier, 10, 0, 0, 0
-style17\paper=16777215
-style18=JavaDoc keyword error
-style18\color=8405024
-style18\eolfill=false
-style18\font=Courier, 10, 0, 0, 0
-style18\paper=16777215
-style19=Global classes and typedefs
-style19\color=0
-style19\eolfill=false
-style19\font=Courier, 10, 0, 0, 0
-style19\paper=16777215
-style2=C++ comment
-style2\color=32512
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=JavaDoc style C comment
-style3\color=4157503
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Number
-style4\color=32639
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Keyword
-style5\color=127
-style5\eolfill=false
-style5\font=Courier, 10, 1, 0, 0
-style5\paper=16777215
-style6=Double-quoted string
-style6\color=8323199
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=Single-quoted string
-style7\color=8323199
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-style9=Pre-processor block
-style9\color=8355584
-style9\eolfill=false
-style9\font=Courier, 10, 0, 0, 0
-style9\paper=16777215
-style8=IDL UUID
-style8\color=0
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=16777215
-style20=C++ raw string
-style20\color=8323199
-style20\eolfill=false
-style20\font=Courier, 10, 0, 0, 0
-style20\paper=16774143
-style40=Inactive C++ raw string
-style40\color=11571376
-style40\eolfill=false
-style40\font=Courier, 10, 0, 0, 0
-style40\paper=16774143
-style64=Inactive default
-style64\color=12632256
-style64\eolfill=false
-style64\font=Courier, 10, 0, 0, 0
-style64\paper=16777215
-style65=Inactive C comment
-style65\color=9482384
-style65\eolfill=false
-style65\font=Courier, 10, 0, 0, 0
-style65\paper=16777215
-style66=Inactive C++ comment
-style66\color=9482384
-style66\eolfill=false
-style66\font=Courier, 10, 0, 0, 0
-style66\paper=16777215
-style67=Inactive JavaDoc style C comment
-style67\color=13684944
-style67\eolfill=false
-style67\font=Courier, 10, 0, 0, 0
-style67\paper=16777215
-style68=Inactive number
-style68\color=9482384
-style68\eolfill=false
-style68\font=Courier, 10, 0, 0, 0
-style68\paper=16777215
-style69=Inactive keyword
-style69\color=9474224
-style69\eolfill=false
-style69\font=Courier, 10, 1, 0, 0
-style69\paper=16777215
-style70=Inactive double-quoted string
-style70\color=11571376
-style70\eolfill=false
-style70\font=Courier New, 10, 0, 0, 0
-style70\paper=16777215
-style71=Inactive single-quoted string
-style71\color=11571376
-style71\eolfill=false
-style71\font=Courier New, 10, 0, 0, 0
-style71\paper=16777215
-style72=Inactive IDL UUID
-style72\color=12632256
-style72\eolfill=false
-style72\font=Courier, 10, 0, 0, 0
-style72\paper=16777215
-style73=Inactive pre-processor block
-style73\color=11579536
-style73\eolfill=false
-style73\font=Courier, 10, 0, 0, 0
-style73\paper=16777215
-style74=Inactive operator
-style74\color=11579568
-style74\eolfill=false
-style74\font=Courier, 10, 1, 0, 0
-style74\paper=16777215
-style75=Inactive identifier
-style75\color=11579568
-style75\eolfill=false
-style75\font=Courier, 10, 0, 0, 0
-style75\paper=16777215
-style76=Inactive unclosed string
-style76\color=0
-style76\eolfill=true
-style76\font=Courier New, 10, 0, 0, 0
-style76\paper=14729440
-style79=Inactive JavaDoc style C++ comment
-style79\color=12632256
-style79\eolfill=false
-style79\font=Courier, 10, 0, 0, 0
-style79\paper=16777215
-style80=Inactive secondary keywords and identifiers
-style80\color=12632256
-style80\eolfill=false
-style80\font=Courier, 10, 0, 0, 0
-style80\paper=16777215
-style81=Inactive JavaDoc keyword
-style81\color=12632256
-style81\eolfill=false
-style81\font=Courier, 10, 0, 0, 0
-style81\paper=16777215
-style82=Inactive JavaDoc keyword error
-style82\color=12632256
-style82\eolfill=false
-style82\font=Courier, 10, 0, 0, 0
-style82\paper=16777215
-style83=Inactive global classes and typedefs
-style83\color=11579568
-style83\eolfill=false
-style83\font=Courier, 10, 0, 0, 0
-style83\paper=16777215
-
-[D]
-style0=Default
-style0\color=8421504
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Block comment
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style10=String
-style10\color=8323199
-style10\eolfill=false
-style10\font=Courier, 10, 0, 0, 0
-style10\paper=16777215
-style11=Unclosed string
-style11\color=0
-style11\eolfill=true
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=14729440
-style12=Character
-style12\color=8323199
-style12\eolfill=false
-style12\font=Courier, 10, 0, 0, 0
-style12\paper=16777215
-style13=Operator
-style13\color=0
-style13\eolfill=false
-style13\font=Courier, 10, 1, 0, 0
-style13\paper=16777215
-style14=Identifier
-style14\color=0
-style14\eolfill=false
-style14\font=Courier, 10, 0, 0, 0
-style14\paper=16777215
-style15=DDoc style line comment
-style15\color=4157503
-style15\eolfill=false
-style15\font=Courier, 10, 0, 0, 0
-style15\paper=16777215
-style16=DDoc keyword
-style16\color=3170464
-style16\eolfill=false
-style16\font=Courier, 10, 0, 0, 0
-style16\paper=16777215
-style17=DDoc keyword error
-style17\color=8405024
-style17\eolfill=false
-style17\font=Courier, 10, 0, 0, 0
-style17\paper=16777215
-style2=Line comment
-style2\color=32512
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=DDoc style block comment
-style3\color=4157503
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Nesting comment
-style4\color=10535072
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Number
-style5\color=32639
-style5\eolfill=false
-style5\font=Courier, 10, 0, 0, 0
-style5\paper=16777215
-style6=Keyword
-style6\color=127
-style6\eolfill=false
-style6\font=Courier, 10, 1, 0, 0
-style6\paper=16777215
-style7=Secondary keyword
-style7\color=127
-style7\eolfill=false
-style7\font=Courier, 10, 1, 0, 0
-style7\paper=16777215
-style8=Documentation keyword
-style8\color=127
-style8\eolfill=false
-style8\font=Courier, 10, 1, 0, 0
-style8\paper=16777215
-style9=Type definition
-style9\color=127
-style9\eolfill=false
-style9\font=Courier, 10, 1, 0, 0
-style9\paper=16777215
-
-[Diff]
-style0=Default
-style0\color=0
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Comment
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style2=Command
-style2\color=8355584
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=Header
-style3\color=8323072
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Position
-style4\color=8323199
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Removed line
-style5\color=32639
-style5\eolfill=false
-style5\font=Courier, 10, 0, 0, 0
-style5\paper=16777215
-style6=Added line
-style6\color=127
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=Changed line
-style7\color=8355711
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-
-[HTML]
-style0=HTML default
-style0\color=0
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Tag
-style1\color=128
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style10=Entity
-style10\color=8388736
-style10\eolfill=false
-style10\font=Courier, 10, 0, 0, 0
-style10\paper=16777215
-style100=Python function or method name
-style100\color=32639
-style100\eolfill=true
-style100\font=Courier, 10, 1, 0, 0
-style100\paper=15728623
-style101=Python operator
-style101\color=0
-style101\eolfill=true
-style101\font=Courier, 10, 1, 0, 0
-style101\paper=15728623
-style102=Python identifier
-style102\color=0
-style102\eolfill=true
-style102\font=Courier, 10, 0, 0, 0
-style102\paper=15728623
-style105=Start of an ASP Python fragment
-style105\color=8421504
-style105\eolfill=false
-style105\font=Courier, 10, 0, 0, 0
-style105\paper=16777215
-style106=ASP Python default
-style106\color=8421504
-style106\eolfill=true
-style106\font=Courier, 10, 0, 0, 0
-style106\paper=13627343
-style107=ASP Python comment
-style107\color=32512
-style107\eolfill=true
-style107\font=Courier, 10, 0, 0, 0
-style107\paper=13627343
-style108=ASP Python number
-style108\color=32639
-style108\eolfill=true
-style108\font=Courier, 10, 0, 0, 0
-style108\paper=13627343
-style109=ASP Python double-quoted string
-style109\color=8323199
-style109\eolfill=true
-style109\font=Courier, 10, 0, 0, 0
-style109\paper=13627343
-style11=End of a tag
-style11\color=128
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=16777215
-style110=ASP Python single-quoted string
-style110\color=8323199
-style110\eolfill=true
-style110\font=Courier, 10, 0, 0, 0
-style110\paper=13627343
-style111=ASP Python keyword
-style111\color=127
-style111\eolfill=true
-style111\font=Courier, 10, 1, 0, 0
-style111\paper=13627343
-style112=ASP Python triple single-quoted string
-style112\color=8323072
-style112\eolfill=true
-style112\font=Courier, 10, 0, 0, 0
-style112\paper=13627343
-style113=ASP Python triple double-quoted string
-style113\color=8323072
-style113\eolfill=true
-style113\font=Courier, 10, 0, 0, 0
-style113\paper=13627343
-style114=ASP Python class name
-style114\color=255
-style114\eolfill=true
-style114\font=Courier, 10, 1, 0, 0
-style114\paper=13627343
-style115=ASP Python function or method name
-style115\color=32639
-style115\eolfill=true
-style115\font=Courier, 10, 1, 0, 0
-style115\paper=13627343
-style116=ASP Python operator
-style116\color=0
-style116\eolfill=true
-style116\font=Courier, 10, 1, 0, 0
-style116\paper=13627343
-style117=ASP Python identifier
-style117\color=0
-style117\eolfill=true
-style117\font=Courier, 10, 0, 0, 0
-style117\paper=13627343
-style118=PHP default
-style118\color=51
-style118\eolfill=true
-style118\font=Courier, 10, 0, 0, 0
-style118\paper=16775416
-style119=PHP double-quoted string
-style119\color=32512
-style119\eolfill=false
-style119\font=Courier, 10, 0, 0, 0
-style119\paper=16775416
-style12=Start of an XML fragment
-style12\color=255
-style12\eolfill=false
-style12\font=Courier, 10, 0, 0, 0
-style12\paper=16777215
-style120=PHP single-quoted string
-style120\color=40704
-style120\eolfill=false
-style120\font=Courier, 10, 0, 0, 0
-style120\paper=16775416
-style121=PHP keyword
-style121\color=8323199
-style121\eolfill=false
-style121\font=Courier, 10, 0, 1, 0
-style121\paper=16775416
-style122=PHP number
-style122\color=13408512
-style122\eolfill=false
-style122\font=Courier, 10, 0, 0, 0
-style122\paper=16775416
-style123=PHP variable
-style123\color=127
-style123\eolfill=false
-style123\font=Courier, 10, 0, 1, 0
-style123\paper=16775416
-style124=PHP comment
-style124\color=10066329
-style124\eolfill=false
-style124\font=Courier, 10, 0, 0, 0
-style124\paper=16775416
-style125=PHP line comment
-style125\color=6710886
-style125\eolfill=false
-style125\font=Courier, 10, 0, 1, 0
-style125\paper=16775416
-style126=PHP double-quoted variable
-style126\color=127
-style126\eolfill=false
-style126\font=Courier, 10, 0, 1, 0
-style126\paper=16775416
-style127=PHP operator
-style127\color=0
-style127\eolfill=false
-style127\font=Courier, 10, 0, 0, 0
-style127\paper=16775416
-style13=End of an XML fragment
-style13\color=255
-style13\eolfill=false
-style13\font=Courier, 10, 0, 0, 0
-style13\paper=16777215
-style14=Script tag
-style14\color=128
-style14\eolfill=false
-style14\font=Courier, 10, 0, 0, 0
-style14\paper=16777215
-style15=Start of an ASP fragment with @
-style15\color=0
-style15\eolfill=false
-style15\font=Courier, 10, 0, 0, 0
-style15\paper=16776960
-style16=Start of an ASP fragment
-style16\color=0
-style16\eolfill=false
-style16\font=Courier, 10, 0, 0, 0
-style16\paper=16768768
-style17=CDATA
-style17\color=0
-style17\eolfill=false
-style17\font=Courier, 10, 0, 0, 0
-style17\paper=16768768
-style18=Start of a PHP fragment
-style18\color=255
-style18\eolfill=false
-style18\font=Courier, 10, 0, 0, 0
-style18\paper=16773055
-style19=Unquoted HTML value
-style19\color=16711935
-style19\eolfill=false
-style19\font=Courier, 10, 0, 0, 0
-style19\paper=16773119
-style2=Unknown tag
-style2\color=16711680
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style20=ASP X-Code comment
-style20\color=0
-style20\eolfill=false
-style20\font=Courier, 10, 0, 0, 0
-style20\paper=16777215
-style21=SGML default
-style21\color=128
-style21\eolfill=false
-style21\font=Courier, 10, 0, 0, 0
-style21\paper=15724543
-style22=SGML command
-style22\color=128
-style22\eolfill=false
-style22\font=Courier, 10, 1, 0, 0
-style22\paper=15724543
-style23=First parameter of an SGML command
-style23\color=26112
-style23\eolfill=false
-style23\font=Courier, 10, 0, 0, 0
-style23\paper=15724543
-style24=SGML double-quoted string
-style24\color=8388608
-style24\eolfill=false
-style24\font=Courier, 10, 0, 0, 0
-style24\paper=15724543
-style25=SGML single-quoted string
-style25\color=10040064
-style25\eolfill=false
-style25\font=Courier, 10, 0, 0, 0
-style25\paper=15724543
-style26=SGML error
-style26\color=8388608
-style26\eolfill=false
-style26\font=Courier, 10, 0, 0, 0
-style26\paper=16737894
-style27=SGML special entity
-style27\color=3368703
-style27\eolfill=false
-style27\font=Courier, 10, 0, 0, 0
-style27\paper=15724543
-style29=SGML comment
-style29\color=8421376
-style29\eolfill=false
-style29\font=Courier, 10, 0, 0, 0
-style29\paper=15724543
-style3=Attribute
-style3\color=32896
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style30=First parameter comment of an SGML command
-style30\color=0
-style30\eolfill=false
-style30\font=Courier, 10, 0, 0, 0
-style30\paper=16777215
-style31=SGML block default
-style31\color=102
-style31\eolfill=false
-style31\font=Courier, 10, 0, 0, 0
-style31\paper=13421792
-style4=Unknown attribute
-style4\color=16711680
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style40=Start of a JavaScript fragment
-style40\color=8355584
-style40\eolfill=false
-style40\font=Courier, 10, 0, 0, 0
-style40\paper=16777215
-style41=JavaScript default
-style41\color=0
-style41\eolfill=true
-style41\font=Courier, 10, 1, 0, 0
-style41\paper=15790335
-style42=JavaScript comment
-style42\color=32512
-style42\eolfill=true
-style42\font=Courier, 10, 0, 0, 0
-style42\paper=15790335
-style43=JavaScript line comment
-style43\color=32512
-style43\eolfill=false
-style43\font=Courier, 10, 0, 0, 0
-style43\paper=15790335
-style44=JavaDoc style JavaScript comment
-style44\color=4157503
-style44\eolfill=true
-style44\font=Courier, 10, 1, 0, 0
-style44\paper=15790335
-style45=JavaScript number
-style45\color=32639
-style45\eolfill=false
-style45\font=Courier, 10, 0, 0, 0
-style45\paper=15790335
-style46=JavaScript word
-style46\color=0
-style46\eolfill=false
-style46\font=Courier, 10, 0, 0, 0
-style46\paper=15790335
-style47=JavaScript keyword
-style47\color=127
-style47\eolfill=false
-style47\font=Courier, 10, 1, 0, 0
-style47\paper=15790335
-style48=JavaScript double-quoted string
-style48\color=8323199
-style48\eolfill=false
-style48\font=Courier, 10, 0, 0, 0
-style48\paper=15790335
-style49=JavaScript single-quoted string
-style49\color=8323199
-style49\eolfill=false
-style49\font=Courier, 10, 0, 0, 0
-style49\paper=15790335
-style5=HTML number
-style5\color=32639
-style5\eolfill=false
-style5\font=Courier, 10, 0, 0, 0
-style5\paper=16777215
-style50=JavaScript symbol
-style50\color=0
-style50\eolfill=false
-style50\font=Courier, 10, 1, 0, 0
-style50\paper=15790335
-style51=JavaScript unclosed string
-style51\color=0
-style51\eolfill=true
-style51\font=Courier, 10, 0, 0, 0
-style51\paper=12565424
-style52=JavaScript regular expression
-style52\color=0
-style52\eolfill=false
-style52\font=Courier, 10, 0, 0, 0
-style52\paper=16759728
-style55=Start of an ASP JavaScript fragment
-style55\color=8355584
-style55\eolfill=false
-style55\font=Courier, 10, 0, 0, 0
-style55\paper=16777215
-style56=ASP JavaScript default
-style56\color=0
-style56\eolfill=true
-style56\font=Courier, 10, 1, 0, 0
-style56\paper=14671743
-style57=ASP JavaScript comment
-style57\color=32512
-style57\eolfill=true
-style57\font=Courier, 10, 0, 0, 0
-style57\paper=14671743
-style58=ASP JavaScript line comment
-style58\color=32512
-style58\eolfill=false
-style58\font=Courier, 10, 0, 0, 0
-style58\paper=14671743
-style59=JavaDoc style ASP JavaScript comment
-style59\color=8355711
-style59\eolfill=true
-style59\font=Courier, 10, 1, 0, 0
-style59\paper=14671743
-style6=HTML double-quoted string
-style6\color=8323199
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style60=ASP JavaScript number
-style60\color=32639
-style60\eolfill=false
-style60\font=Courier, 10, 0, 0, 0
-style60\paper=14671743
-style61=ASP JavaScript word
-style61\color=0
-style61\eolfill=false
-style61\font=Courier, 10, 0, 0, 0
-style61\paper=14671743
-style62=ASP JavaScript keyword
-style62\color=127
-style62\eolfill=false
-style62\font=Courier, 10, 1, 0, 0
-style62\paper=14671743
-style63=ASP JavaScript double-quoted string
-style63\color=8323199
-style63\eolfill=false
-style63\font=Courier, 10, 0, 0, 0
-style63\paper=14671743
-style64=ASP JavaScript single-quoted string
-style64\color=8323199
-style64\eolfill=false
-style64\font=Courier, 10, 0, 0, 0
-style64\paper=14671743
-style65=ASP JavaScript symbol
-style65\color=0
-style65\eolfill=false
-style65\font=Courier, 10, 1, 0, 0
-style65\paper=14671743
-style66=ASP JavaScript unclosed string
-style66\color=0
-style66\eolfill=true
-style66\font=Courier, 10, 0, 0, 0
-style66\paper=12565424
-style67=ASP JavaScript regular expression
-style67\color=0
-style67\eolfill=false
-style67\font=Courier, 10, 0, 0, 0
-style67\paper=16759728
-style7=HTML single-quoted string
-style7\color=8323199
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-style70=Start of a VBScript fragment
-style70\color=0
-style70\eolfill=false
-style70\font=Courier, 10, 0, 0, 0
-style70\paper=16777215
-style71=VBScript default
-style71\color=0
-style71\eolfill=true
-style71\font=Courier, 10, 0, 0, 0
-style71\paper=15724543
-style72=VBScript comment
-style72\color=32768
-style72\eolfill=true
-style72\font=Courier, 10, 0, 0, 0
-style72\paper=15724543
-style73=VBScript number
-style73\color=32896
-style73\eolfill=true
-style73\font=Courier, 10, 0, 0, 0
-style73\paper=15724543
-style74=VBScript keyword
-style74\color=128
-style74\eolfill=true
-style74\font=Courier, 10, 1, 0, 0
-style74\paper=15724543
-style75=VBScript string
-style75\color=8388736
-style75\eolfill=true
-style75\font=Courier, 10, 0, 0, 0
-style75\paper=15724543
-style76=VBScript identifier
-style76\color=128
-style76\eolfill=true
-style76\font=Courier, 10, 0, 0, 0
-style76\paper=15724543
-style77=VBScript unclosed string
-style77\color=128
-style77\eolfill=true
-style77\font=Courier, 10, 0, 0, 0
-style77\paper=8355839
-style8=Other text in a tag
-style8\color=8388736
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=16777215
-style80=Start of an ASP VBScript fragment
-style80\color=0
-style80\eolfill=false
-style80\font=Courier, 10, 0, 0, 0
-style80\paper=16777215
-style81=ASP VBScript default
-style81\color=0
-style81\eolfill=true
-style81\font=Courier, 10, 0, 0, 0
-style81\paper=13619183
-style82=ASP VBScript comment
-style82\color=32768
-style82\eolfill=true
-style82\font=Courier, 10, 0, 0, 0
-style82\paper=13619183
-style83=ASP VBScript number
-style83\color=32896
-style83\eolfill=true
-style83\font=Courier, 10, 0, 0, 0
-style83\paper=13619183
-style84=ASP VBScript keyword
-style84\color=128
-style84\eolfill=true
-style84\font=Courier, 10, 1, 0, 0
-style84\paper=13619183
-style85=ASP VBScript string
-style85\color=8388736
-style85\eolfill=true
-style85\font=Courier, 10, 0, 0, 0
-style85\paper=13619183
-style86=ASP VBScript identifier
-style86\color=128
-style86\eolfill=true
-style86\font=Courier, 10, 0, 0, 0
-style86\paper=13619183
-style87=ASP VBScript unclosed string
-style87\color=128
-style87\eolfill=true
-style87\font=Courier, 10, 0, 0, 0
-style87\paper=8355839
-style9=HTML comment
-style9\color=8421376
-style9\eolfill=false
-style9\font=Courier, 10, 0, 0, 0
-style9\paper=16777215
-style90=Start of a Python fragment
-style90\color=8421504
-style90\eolfill=false
-style90\font=Courier, 10, 0, 0, 0
-style90\paper=16777215
-style91=Python default
-style91\color=8421504
-style91\eolfill=true
-style91\font=Courier, 10, 0, 0, 0
-style91\paper=15728623
-style92=Python comment
-style92\color=32512
-style92\eolfill=true
-style92\font=Courier, 10, 0, 0, 0
-style92\paper=15728623
-style93=Python number
-style93\color=32639
-style93\eolfill=true
-style93\font=Courier, 10, 0, 0, 0
-style93\paper=15728623
-style94=Python double-quoted string
-style94\color=8323199
-style94\eolfill=true
-style94\font=Courier, 10, 0, 0, 0
-style94\paper=15728623
-style95=Python single-quoted string
-style95\color=8323199
-style95\eolfill=true
-style95\font=Courier, 10, 0, 0, 0
-style95\paper=15728623
-style96=Python keyword
-style96\color=127
-style96\eolfill=true
-style96\font=Courier, 10, 1, 0, 0
-style96\paper=15728623
-style97=Python triple single-quoted string
-style97\color=8323072
-style97\eolfill=true
-style97\font=Courier, 10, 0, 0, 0
-style97\paper=15728623
-style98=Python triple double-quoted string
-style98\color=8323072
-style98\eolfill=true
-style98\font=Courier, 10, 0, 0, 0
-style98\paper=15728623
-style99=Python class name
-style99\color=255
-style99\eolfill=true
-style99\font=Courier, 10, 1, 0, 0
-style99\paper=15728623
-
-[IDL]
-style0=Default
-style0\color=8421504
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=C comment
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style10=Operator
-style10\color=0
-style10\eolfill=false
-style10\font=Courier, 10, 1, 0, 0
-style10\paper=16777215
-style11=Identifier
-style11\color=0
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=16777215
-style12=Unclosed string
-style12\color=0
-style12\eolfill=true
-style12\font=Courier, 10, 0, 0, 0
-style12\paper=14729440
-style15=JavaDoc style C++ comment
-style15\color=4157503
-style15\eolfill=false
-style15\font=Courier, 10, 0, 0, 0
-style15\paper=16777215
-style16=Secondary keywords and identifiers
-style16\color=0
-style16\eolfill=false
-style16\font=Courier, 10, 0, 0, 0
-style16\paper=16777215
-style17=JavaDoc keyword
-style17\color=3170464
-style17\eolfill=false
-style17\font=Courier, 10, 0, 0, 0
-style17\paper=16777215
-style18=JavaDoc keyword error
-style18\color=8405024
-style18\eolfill=false
-style18\font=Courier, 10, 0, 0, 0
-style18\paper=16777215
-style19=Global classes and typedefs
-style19\color=0
-style19\eolfill=false
-style19\font=Courier, 10, 0, 0, 0
-style19\paper=16777215
-style2=C++ comment
-style2\color=32512
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=JavaDoc style C comment
-style3\color=4157503
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Number
-style4\color=32639
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Keyword
-style5\color=127
-style5\eolfill=false
-style5\font=Courier, 10, 1, 0, 0
-style5\paper=16777215
-style6=Double-quoted string
-style6\color=8323199
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=Single-quoted string
-style7\color=8323199
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-style8=UUID
-style8\color=8405120
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=16777215
-style9=Pre-processor block
-style9\color=8355584
-style9\eolfill=false
-style9\font=Courier, 10, 0, 0, 0
-style9\paper=16777215
-
-[Java]
-style0=Default
-style0\color=8421504
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=C comment
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style10=Operator
-style10\color=0
-style10\eolfill=false
-style10\font=Courier, 10, 1, 0, 0
-style10\paper=16777215
-style11=Identifier
-style11\color=0
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=16777215
-style12=Unclosed string
-style12\color=0
-style12\eolfill=true
-style12\font=Courier, 10, 0, 0, 0
-style12\paper=14729440
-style15=JavaDoc style C++ comment
-style15\color=4157503
-style15\eolfill=false
-style15\font=Courier, 10, 0, 0, 0
-style15\paper=16777215
-style16=Secondary keywords and identifiers
-style16\color=0
-style16\eolfill=false
-style16\font=Courier, 10, 0, 0, 0
-style16\paper=16777215
-style17=JavaDoc keyword
-style17\color=3170464
-style17\eolfill=false
-style17\font=Courier, 10, 0, 0, 0
-style17\paper=16777215
-style18=JavaDoc keyword error
-style18\color=8405024
-style18\eolfill=false
-style18\font=Courier, 10, 0, 0, 0
-style18\paper=16777215
-style19=Global classes and typedefs
-style19\color=0
-style19\eolfill=false
-style19\font=Courier, 10, 0, 0, 0
-style19\paper=16777215
-style2=C++ comment
-style2\color=32512
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=JavaDoc style C comment
-style3\color=4157503
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Number
-style4\color=32639
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Keyword
-style5\color=127
-style5\eolfill=false
-style5\font=Courier, 10, 1, 0, 0
-style5\paper=16777215
-style6=Double-quoted string
-style6\color=8323199
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=Single-quoted string
-style7\color=8323199
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-style9=Pre-processor block
-style9\color=8355584
-style9\eolfill=false
-style9\font=Courier, 10, 0, 0, 0
-style9\paper=16777215
-style8=IDL UUID
-style8\color=0
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=16777215
-
-[JavaScript]
-style0=Default
-style0\color=8421504
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=C comment
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style10=Operator
-style10\color=0
-style10\eolfill=false
-style10\font=Courier, 10, 1, 0, 0
-style10\paper=16777215
-style11=Identifier
-style11\color=0
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=16777215
-style12=Unclosed string
-style12\color=0
-style12\eolfill=true
-style12\font=Courier, 10, 0, 0, 0
-style12\paper=16777215
-style14=Regular expression
-style14\color=4161343
-style14\eolfill=true
-style14\font=Courier, 10, 0, 0, 0
-style14\paper=14741759
-style15=JavaDoc style C++ comment
-style15\color=4157503
-style15\eolfill=false
-style15\font=Courier, 10, 0, 0, 0
-style15\paper=16777215
-style16=Secondary keywords and identifiers
-style16\color=0
-style16\eolfill=false
-style16\font=Courier, 10, 0, 0, 0
-style16\paper=16777215
-style17=JavaDoc keyword
-style17\color=3170464
-style17\eolfill=false
-style17\font=Courier, 10, 0, 0, 0
-style17\paper=16777215
-style18=JavaDoc keyword error
-style18\color=8405024
-style18\eolfill=false
-style18\font=Courier, 10, 0, 0, 0
-style18\paper=16777215
-style19=Global classes and typedefs
-style19\color=0
-style19\eolfill=false
-style19\font=Courier, 10, 0, 0, 0
-style19\paper=16777215
-style2=C++ comment
-style2\color=32512
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=JavaDoc style C comment
-style3\color=4157503
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Number
-style4\color=32639
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Keyword
-style5\color=127
-style5\eolfill=false
-style5\font=Courier, 10, 1, 0, 0
-style5\paper=16777215
-style6=Double-quoted string
-style6\color=8323199
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=Single-quoted string
-style7\color=8323199
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-style9=Pre-processor block
-style9\color=8355584
-style9\eolfill=false
-style9\font=Courier, 10, 0, 0, 0
-style9\paper=16777215
-style8=IDL UUID
-style8\color=0
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=16777215
-
-[Lua]
-style0=Default
-style0\color=0
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Comment
-style1\color=32512
-style1\eolfill=true
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=13693168
-style10=Operator
-style10\color=0
-style10\eolfill=false
-style10\font=Courier, 10, 0, 0, 0
-style10\paper=16777215
-style11=Identifier
-style11\color=0
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=16777215
-style12=Unclosed string
-style12\color=0
-style12\eolfill=true
-style12\font=Courier, 10, 0, 0, 0
-style12\paper=14729440
-style13=Basic functions
-style13\color=127
-style13\eolfill=false
-style13\font=Courier, 10, 0, 0, 0
-style13\paper=13696976
-style14="String, table and maths functions"
-style14\color=127
-style14\eolfill=false
-style14\font=Courier, 10, 0, 0, 0
-style14\paper=13684991
-style15="Coroutines, i/o and system facilities"
-style15\color=127
-style15\eolfill=false
-style15\font=Courier, 10, 0, 0, 0
-style15\paper=16765136
-style2=Line comment
-style2\color=32512
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style4=Number
-style4\color=32639
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Keyword
-style5\color=127
-style5\eolfill=false
-style5\font=Courier, 10, 0, 0, 0
-style5\paper=16777215
-style6=String
-style6\color=8323199
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=Character
-style7\color=8323199
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-style8=Literal string
-style8\color=8323199
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=14745599
-style9=Preprocessor
-style9\color=8355584
-style9\eolfill=false
-style9\font=Courier, 10, 0, 0, 0
-style9\paper=16777215
-
-[Makefile]
-style0=Default
-style0\color=0
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Comment
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style2=Preprocessor
-style2\color=8355584
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=Variable
-style3\color=128
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Operator
-style4\color=0
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Target
-style5\color=10485760
-style5\eolfill=false
-style5\font=Courier, 10, 0, 0, 0
-style5\paper=16777215
-style9=Error
-style9\color=16776960
-style9\eolfill=true
-style9\font=Courier, 10, 0, 0, 0
-style9\paper=16711680
-
-[POV]
-style0=Default
-style0\color=16711808
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Comment
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style10="Objects, CSG and appearance"
-style10\color=127
-style10\eolfill=false
-style10\font=Courier, 10, 0, 0, 0
-style10\paper=16765136
-style11="Types, modifiers and items"
-style11\color=127
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=16777168
-style12=Predefined identifiers
-style12\color=127
-style12\eolfill=false
-style12\font=Courier, 10, 1, 0, 0
-style12\paper=16777215
-style13=Predefined functions
-style13\color=127
-style13\eolfill=false
-style13\font=Courier, 10, 0, 0, 0
-style13\paper=13684991
-style14=User defined 1
-style14\color=127
-style14\eolfill=false
-style14\font=Courier, 10, 0, 0, 0
-style14\paper=13696976
-style15=User defined 2
-style15\color=127
-style15\eolfill=false
-style15\font=Courier, 10, 0, 0, 0
-style15\paper=13684944
-style16=User defined 3
-style16\color=127
-style16\eolfill=false
-style16\font=Courier, 10, 0, 0, 0
-style16\paper=14737632
-style2=Comment line
-style2\color=32512
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=Number
-style3\color=32639
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Operator
-style4\color=0
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Identifier
-style5\color=0
-style5\eolfill=false
-style5\font=Courier, 10, 0, 0, 0
-style5\paper=16777215
-style6=String
-style6\color=8323199
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=Unclosed string
-style7\color=0
-style7\eolfill=true
-style7\font=Courier, 10, 1, 0, 0
-style7\paper=14729440
-style8=Directive
-style8\color=8355584
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=16777215
-style9=Bad directive
-style9\color=8405024
-style9\eolfill=false
-style9\font=Courier, 10, 0, 1, 0
-style9\paper=16777215
-
-[Perl]
-style0=Default
-style0\color=8421504
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Error
-style1\color=16776960
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16711680
-style10=Operator
-style10\color=0
-style10\eolfill=false
-style10\font=Courier, 10, 1, 0, 0
-style10\paper=16777215
-style11=Identifier
-style11\color=0
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=16777215
-style12=Scalar
-style12\color=0
-style12\eolfill=false
-style12\font=Courier, 10, 0, 0, 0
-style12\paper=16769248
-style13=Array
-style13\color=0
-style13\eolfill=false
-style13\font=Courier, 10, 0, 0, 0
-style13\paper=16777184
-style14=Hash
-style14\color=0
-style14\eolfill=false
-style14\font=Courier, 10, 0, 0, 0
-style14\paper=16769279
-style15=Symbol table
-style15\color=0
-style15\eolfill=false
-style15\font=Courier, 10, 0, 0, 0
-style15\paper=14737632
-style17=Regular expression
-style17\color=0
-style17\eolfill=false
-style17\font=Courier, 10, 0, 0, 0
-style17\paper=10551200
-style18=Substitution
-style18\color=0
-style18\eolfill=false
-style18\font=Courier, 10, 0, 0, 0
-style18\paper=15786112
-style2=Comment
-style2\color=32512
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style20=Backticks
-style20\color=16776960
-style20\eolfill=false
-style20\font=Courier, 10, 0, 0, 0
-style20\paper=10518656
-style21=Data section
-style21\color=6291456
-style21\eolfill=true
-style21\font=Courier, 10, 0, 0, 0
-style21\paper=16773336
-style22=Here document delimiter
-style22\color=0
-style22\eolfill=false
-style22\font=Courier, 10, 0, 0, 0
-style22\paper=14536925
-style23=Single-quoted here document
-style23\color=8323199
-style23\eolfill=true
-style23\font=Courier, 10, 0, 0, 0
-style23\paper=14536925
-style24=Double-quoted here document
-style24\color=8323199
-style24\eolfill=true
-style24\font=Courier, 10, 1, 0, 0
-style24\paper=14536925
-style25=Backtick here document
-style25\color=8323199
-style25\eolfill=true
-style25\font=Courier, 10, 0, 1, 0
-style25\paper=14536925
-style26=Quoted string (q)
-style26\color=8323199
-style26\eolfill=false
-style26\font=Courier, 10, 0, 0, 0
-style26\paper=16777215
-style27=Quoted string (qq)
-style27\color=8323199
-style27\eolfill=false
-style27\font=Courier, 10, 0, 0, 0
-style27\paper=16777215
-style28=Quoted string (qx)
-style28\color=16776960
-style28\eolfill=false
-style28\font=Courier, 10, 0, 0, 0
-style28\paper=16777215
-style29=Quoted string (qr)
-style29\color=0
-style29\eolfill=false
-style29\font=Courier, 10, 0, 0, 0
-style29\paper=16777215
-style3=POD
-style3\color=16384
-style3\eolfill=true
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=14745568
-style30=Quoted string (qw)
-style30\color=0
-style30\eolfill=false
-style30\font=Courier, 10, 0, 0, 0
-style30\paper=16777215
-style31=POD verbatim
-style31\color=16384
-style31\eolfill=true
-style31\font=Courier, 10, 0, 0, 0
-style31\paper=12648384
-style4=Number
-style4\color=32639
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style40=Subroutine prototype
-style40\color=0
-style40\eolfill=false
-style40\font=Courier, 10, 0, 1, 0
-style40\paper=16777215
-style41=Format identifier
-style41\color=12583104
-style41\eolfill=false
-style41\font=Courier, 10, 1, 0, 0
-style41\paper=16777215
-style42=Format body
-style42\color=12583104
-style42\eolfill=true
-style42\font=Courier, 10, 0, 0, 0
-style42\paper=16773375
-style5=Keyword
-style5\color=127
-style5\eolfill=false
-style5\font=Courier, 10, 1, 0, 0
-style5\paper=16777215
-style6=Double-quoted string
-style6\color=8323199
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=Single-quoted string
-style7\color=8323199
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-
-[Properties]
-style0=Default
-style0\color=0
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Comment
-style1\color=32639
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style2=Section
-style2\color=8323199
-style2\eolfill=true
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=14741744
-style3=Assignment
-style3\color=11558912
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Default value
-style4\color=8355584
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-
-[Python]
-style0=Default
-style0\color=8421504
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Comment
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style10=Operator
-style10\color=0
-style10\eolfill=false
-style10\font=Courier, 10, 1, 0, 0
-style10\paper=16777215
-style11=Identifier
-style11\color=0
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=16777215
-style12=Comment block
-style12\color=8355711
-style12\eolfill=false
-style12\font=Courier, 10, 0, 0, 0
-style12\paper=16777215
-style13=Unclosed string
-style13\color=0
-style13\eolfill=true
-style13\font=Courier, 10, 0, 0, 0
-style13\paper=14729440
-style14=Highlighted identifier
-style14\color=4223120
-style14\eolfill=false
-style14\font=Courier, 10, 0, 0, 0
-style14\paper=16777215
-style15=Decorator
-style15\color=8409088
-style15\eolfill=false
-style15\font=Courier, 10, 0, 0, 0
-style15\paper=16777215
-style2=Number
-style2\color=32639
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=Double-quoted string
-style3\color=8323199
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Single-quoted string
-style4\color=8323199
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Keyword
-style5\color=127
-style5\eolfill=false
-style5\font=Courier, 10, 1, 0, 0
-style5\paper=16777215
-style6=Triple single-quoted string
-style6\color=8323072
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=Triple double-quoted string
-style7\color=8323072
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-style8=Class name
-style8\color=255
-style8\eolfill=false
-style8\font=Courier, 10, 1, 0, 0
-style8\paper=16777215
-style9=Function or method name
-style9\color=32639
-style9\eolfill=false
-style9\font=Courier, 10, 1, 0, 0
-style9\paper=16777215
-
-[Ruby]
-style0=Default
-style0\color=8421504
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Error
-style1\color=0
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16711680
-style10=Operator
-style10\color=0
-style10\eolfill=false
-style10\font=Courier, 10, 1, 0, 0
-style10\paper=16777215
-style11=Identifier
-style11\color=0
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=16777215
-style12=Regular expression
-style12\color=0
-style12\eolfill=false
-style12\font=Courier, 10, 0, 0, 0
-style12\paper=10551200
-style13=Global
-style13\color=8388736
-style13\eolfill=false
-style13\font=Courier, 10, 0, 0, 0
-style13\paper=16777215
-style14=Symbol
-style14\color=12623920
-style14\eolfill=false
-style14\font=Courier, 10, 0, 0, 0
-style14\paper=16777215
-style15=Module name
-style15\color=10485920
-style15\eolfill=false
-style15\font=Courier, 10, 1, 0, 0
-style15\paper=16777215
-style16=Instance variable
-style16\color=11534464
-style16\eolfill=false
-style16\font=Courier, 10, 0, 0, 0
-style16\paper=16777215
-style17=Class variable
-style17\color=8388784
-style17\eolfill=false
-style17\font=Courier, 10, 0, 0, 0
-style17\paper=16777215
-style18=Backticks
-style18\color=16776960
-style18\eolfill=false
-style18\font=Courier, 10, 0, 0, 0
-style18\paper=10518656
-style19=Data section
-style19\color=6291456
-style19\eolfill=true
-style19\font=Courier, 10, 0, 0, 0
-style19\paper=16773336
-style2=Comment
-style2\color=32512
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style20=Here document delimiter
-style20\color=0
-style20\eolfill=false
-style20\font=Courier, 10, 0, 0, 0
-style20\paper=14536925
-style21=Here document
-style21\color=8323199
-style21\eolfill=true
-style21\font=Courier, 10, 0, 0, 0
-style21\paper=14536925
-style24=%q string
-style24\color=8323199
-style24\eolfill=false
-style24\font=Courier, 10, 0, 0, 0
-style24\paper=16777215
-style25=%Q string
-style25\color=8323199
-style25\eolfill=false
-style25\font=Courier, 10, 0, 0, 0
-style25\paper=16777215
-style26=%x string
-style26\color=16776960
-style26\eolfill=false
-style26\font=Courier, 10, 0, 0, 0
-style26\paper=10518656
-style27=%r string
-style27\color=0
-style27\eolfill=false
-style27\font=Courier, 10, 0, 0, 0
-style27\paper=10551200
-style28=%w string
-style28\color=0
-style28\eolfill=false
-style28\font=Courier, 10, 0, 0, 0
-style28\paper=16777184
-style29=Demoted keyword
-style29\color=127
-style29\eolfill=false
-style29\font=Courier, 10, 1, 0, 0
-style29\paper=16777215
-style3=POD
-style3\color=16384
-style3\eolfill=true
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=12648384
-style30=stdin
-style30\color=0
-style30\eolfill=false
-style30\font=Courier, 10, 0, 0, 0
-style30\paper=16744576
-style31=stdout
-style31\color=0
-style31\eolfill=false
-style31\font=Courier, 10, 0, 0, 0
-style31\paper=16744576
-style4=Number
-style4\color=32639
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style40=stderr
-style40\color=0
-style40\eolfill=false
-style40\font=Courier, 10, 0, 0, 0
-style40\paper=16744576
-style5=Keyword
-style5\color=127
-style5\eolfill=false
-style5\font=Courier, 10, 1, 0, 0
-style5\paper=16777215
-style6=Double-quoted string
-style6\color=8323199
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=Single-quoted string
-style7\color=8323199
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-style8=Class name
-style8\color=255
-style8\eolfill=false
-style8\font=Courier, 10, 1, 0, 0
-style8\paper=16777215
-style9=Function or method name
-style9\color=32639
-style9\eolfill=false
-style9\font=Courier, 10, 1, 0, 0
-style9\paper=16777215
-
-[SQL]
-style0=Default
-style0\color=8421504
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Comment
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style10=Operator
-style10\color=0
-style10\eolfill=false
-style10\font=Courier, 10, 1, 0, 0
-style10\paper=16777215
-style11=Identifier
-style11\color=0
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=16777215
-style13=SQL*Plus comment
-style13\color=32512
-style13\eolfill=false
-style13\font=Courier, 10, 0, 0, 0
-style13\paper=16777215
-style15=# comment line
-style15\color=32512
-style15\eolfill=false
-style15\font=Courier, 10, 0, 0, 0
-style15\paper=16777215
-style17=JavaDoc keyword
-style17\color=3170464
-style17\eolfill=false
-style17\font=Courier, 10, 0, 0, 0
-style17\paper=16777215
-style18=JavaDoc keyword error
-style18\color=8405024
-style18\eolfill=false
-style18\font=Courier, 10, 0, 0, 0
-style18\paper=16777215
-style19=User defined 1
-style19\color=4915330
-style19\eolfill=false
-style19\font=Courier, 10, 0, 0, 0
-style19\paper=16777215
-style2=Comment line
-style2\color=32512
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style20=User defined 2
-style20\color=11534400
-style20\eolfill=false
-style20\font=Courier, 10, 0, 0, 0
-style20\paper=16777215
-style21=User defined 3
-style21\color=9109504
-style21\eolfill=false
-style21\font=Courier, 10, 0, 0, 0
-style21\paper=16777215
-style22=User defined 4
-style22\color=8388736
-style22\eolfill=false
-style22\font=Courier, 10, 0, 0, 0
-style22\paper=16777215
-style3=JavaDoc style comment
-style3\color=8355711
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Number
-style4\color=32639
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Keyword
-style5\color=127
-style5\eolfill=false
-style5\font=Courier, 10, 1, 0, 0
-style5\paper=16777215
-style6=Double-quoted string
-style6\color=8323199
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=Single-quoted string
-style7\color=8323199
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-style8=SQL*Plus keyword
-style8\color=8355584
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=16777215
-style9=SQL*Plus prompt
-style9\color=32512
-style9\eolfill=true
-style9\font=Courier, 10, 0, 0, 0
-style9\paper=14745568
-
-[TeX]
-style0=Default
-style0\color=4144959
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Special
-style1\color=32639
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style2=Group
-style2\color=8323072
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=Symbol
-style3\color=8355584
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Command
-style4\color=32512
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Text
-style5\color=0
-style5\eolfill=false
-style5\font=Courier, 10, 0, 0, 0
-style5\paper=16777215
-
-[XML]
-style0=HTML default
-style0\color=0
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Tag
-style1\color=128
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style2=Unknown tag
-style2\color=128
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=Attribute
-style3\color=32896
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Unknown attribute
-style4\color=32896
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=HTML number
-style5\color=32639
-style5\eolfill=false
-style5\font=Courier, 10, 0, 0, 0
-style5\paper=16777215
-style6=HTML double-quoted string
-style6\color=8323199
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=HTML single-quoted string
-style7\color=8323199
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-style8=Other text in a tag
-style8\color=8388736
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=16777215
-style9=HTML comment
-style9\color=8421376
-style9\eolfill=false
-style9\font=Courier, 10, 0, 0, 0
-style9\paper=16777215
-style10=Entity
-style10\color=8388736
-style10\eolfill=false
-style10\font=Courier, 10, 0, 0, 0
-style10\paper=16777215
-style11=End of a tag
-style11\color=128
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=16777215
-style12=Start of an XML fragment
-style12\color=8388736
-style12\eolfill=false
-style12\font=Courier, 10, 1, 0, 0
-style12\paper=16777215
-style13=End of an XML fragment
-style13\color=8388736
-style13\eolfill=false
-style13\font=Courier, 10, 1, 0, 0
-style13\paper=16777215
-style14=Script tag
-style14\color=0
-style14\eolfill=false
-style14\font=Courier, 10, 0, 0, 0
-style14\paper=16777215
-style15=Start of an ASP fragment with @
-style15\color=0
-style15\eolfill=false
-style15\font=Courier, 10, 0, 0, 0
-style15\paper=16777215
-style16=Start of an ASP fragment
-style16\color=0
-style16\eolfill=false
-style16\font=Courier, 10, 0, 0, 0
-style16\paper=16777215
-style17=CDATA
-style17\color=8388608
-style17\eolfill=true
-style17\font=Courier, 10, 0, 0, 0
-style17\paper=16773360
-style18=Start of a PHP fragment
-style18\color=8388608
-style18\eolfill=false
-style18\font=Courier, 10, 0, 0, 0
-style18\paper=16777215
-style19=Unquoted HTML value
-style19\color=6324320
-style19\eolfill=false
-style19\font=Courier, 10, 0, 0, 0
-style19\paper=16777215
-style20=ASP X-Code comment
-style20\color=0
-style20\eolfill=false
-style20\font=Courier, 10, 0, 0, 0
-style20\paper=16777215
-style21=SGML default
-style21\color=128
-style21\eolfill=false
-style21\font=Courier, 10, 0, 0, 0
-style21\paper=15724543
-style22=SGML command
-style22\color=128
-style22\eolfill=false
-style22\font=Courier, 10, 1, 0, 0
-style22\paper=15724543
-style23=First parameter of an SGML command
-style23\color=26112
-style23\eolfill=false
-style23\font=Courier, 10, 0, 0, 0
-style23\paper=15724543
-style24=SGML double-quoted string
-style24\color=8388608
-style24\eolfill=false
-style24\font=Courier, 10, 0, 0, 0
-style24\paper=15724543
-style25=SGML single-quoted string
-style25\color=10040064
-style25\eolfill=false
-style25\font=Courier, 10, 0, 0, 0
-style25\paper=15724543
-style26=SGML error
-style26\color=8388608
-style26\eolfill=false
-style26\font=Courier, 10, 0, 0, 0
-style26\paper=16737894
-style27=SGML special entity
-style27\color=3368703
-style27\eolfill=false
-style27\font=Courier, 10, 0, 0, 0
-style27\paper=15724543
-style29=SGML comment
-style29\color=8421376
-style29\eolfill=false
-style29\font=Courier, 10, 0, 0, 0
-style29\paper=15724543
-style30=First parameter comment of an SGML command
-style30\color=0
-style30\eolfill=false
-style30\font=Courier, 10, 0, 0, 0
-style30\paper=16777215
-style31=SGML block default
-style31\color=102
-style31\eolfill=false
-style31\font=Courier, 10, 0, 0, 0
-style31\paper=13421792
-style40=Start of a JavaScript fragment
-style40\color=0
-style40\eolfill=false
-style40\font=Courier, 10, 0, 0, 0
-style40\paper=16777215
-style41=JavaScript default
-style41\color=0
-style41\eolfill=false
-style41\font=Courier, 10, 0, 0, 0
-style41\paper=16777215
-style42=JavaScript comment
-style42\color=0
-style42\eolfill=false
-style42\font=Courier, 10, 0, 0, 0
-style42\paper=16777215
-style43=JavaScript line comment
-style43\color=0
-style43\eolfill=false
-style43\font=Courier, 10, 0, 0, 0
-style43\paper=16777215
-style44=JavaDoc style JavaScript comment
-style44\color=0
-style44\eolfill=false
-style44\font=Courier, 10, 0, 0, 0
-style44\paper=16777215
-style45=JavaScript number
-style45\color=0
-style45\eolfill=false
-style45\font=Courier, 10, 0, 0, 0
-style45\paper=16777215
-style46=JavaScript word
-style46\color=0
-style46\eolfill=false
-style46\font=Courier, 10, 0, 0, 0
-style46\paper=16777215
-style47=JavaScript keyword
-style47\color=0
-style47\eolfill=false
-style47\font=Courier, 10, 0, 0, 0
-style47\paper=16777215
-style48=JavaScript double-quoted string
-style48\color=0
-style48\eolfill=false
-style48\font=Courier, 10, 0, 0, 0
-style48\paper=16777215
-style49=JavaScript single-quoted string
-style49\color=0
-style49\eolfill=false
-style49\font=Courier, 10, 0, 0, 0
-style49\paper=16777215
-style50=JavaScript symbol
-style50\color=0
-style50\eolfill=false
-style50\font=Courier, 10, 0, 0, 0
-style50\paper=16777215
-style51=JavaScript unclosed string
-style51\color=0
-style51\eolfill=false
-style51\font=Courier, 10, 0, 0, 0
-style51\paper=16777215
-style52=JavaScript regular expression
-style52\color=0
-style52\eolfill=false
-style52\font=Courier, 10, 0, 0, 0
-style52\paper=16777215
-style55=Start of an ASP JavaScript fragment
-style55\color=0
-style55\eolfill=false
-style55\font=Courier, 10, 0, 0, 0
-style55\paper=16777215
-style56=ASP JavaScript default
-style56\color=0
-style56\eolfill=false
-style56\font=Courier, 10, 0, 0, 0
-style56\paper=16777215
-style57=ASP JavaScript comment
-style57\color=0
-style57\eolfill=false
-style57\font=Courier, 10, 0, 0, 0
-style57\paper=16777215
-style58=ASP JavaScript line comment
-style58\color=0
-style58\eolfill=false
-style58\font=Courier, 10, 0, 0, 0
-style58\paper=16777215
-style59=JavaDoc style ASP JavaScript comment
-style59\color=0
-style59\eolfill=false
-style59\font=Courier, 10, 0, 0, 0
-style59\paper=16777215
-style60=ASP JavaScript number
-style60\color=0
-style60\eolfill=false
-style60\font=Courier, 10, 0, 0, 0
-style60\paper=16777215
-style61=ASP JavaScript word
-style61\color=0
-style61\eolfill=false
-style61\font=Courier, 10, 0, 0, 0
-style61\paper=16777215
-style62=ASP JavaScript keyword
-style62\color=0
-style62\eolfill=false
-style62\font=Courier, 10, 0, 0, 0
-style62\paper=16777215
-style63=ASP JavaScript double-quoted string
-style63\color=0
-style63\eolfill=false
-style63\font=Courier, 10, 0, 0, 0
-style63\paper=16777215
-style64=ASP JavaScript single-quoted string
-style64\color=0
-style64\eolfill=false
-style64\font=Courier, 10, 0, 0, 0
-style64\paper=16777215
-style65=ASP JavaScript symbol
-style65\color=0
-style65\eolfill=false
-style65\font=Courier, 10, 0, 0, 0
-style65\paper=16777215
-style66=ASP JavaScript unclosed string
-style66\color=0
-style66\eolfill=false
-style66\font=Courier, 10, 0, 0, 0
-style66\paper=16777215
-style67=ASP JavaScript regular expression
-style67\color=0
-style67\eolfill=false
-style67\font=Courier, 10, 0, 0, 0
-style67\paper=16777215
-style70=Start of a VBScript fragment
-style70\color=0
-style70\eolfill=false
-style70\font=Courier, 10, 0, 0, 0
-style70\paper=16777215
-style71=VBScript default
-style71\color=0
-style71\eolfill=false
-style71\font=Courier, 10, 0, 0, 0
-style71\paper=16777215
-style72=VBScript comment
-style72\color=0
-style72\eolfill=false
-style72\font=Courier, 10, 0, 0, 0
-style72\paper=16777215
-style73=VBScript number
-style73\color=0
-style73\eolfill=false
-style73\font=Courier, 10, 0, 0, 0
-style73\paper=16777215
-style74=VBScript keyword
-style74\color=0
-style74\eolfill=false
-style74\font=Courier, 10, 0, 0, 0
-style74\paper=16777215
-style75=VBScript string
-style75\color=0
-style75\eolfill=false
-style75\font=Courier, 10, 0, 0, 0
-style75\paper=16777215
-style76=VBScript identifier
-style76\color=0
-style76\eolfill=false
-style76\font=Courier, 10, 0, 0, 0
-style76\paper=16777215
-style77=VBScript unclosed string
-style77\color=0
-style77\eolfill=false
-style77\font=Courier, 10, 0, 0, 0
-style77\paper=16777215
-style80=Start of an ASP VBScript fragment
-style80\color=0
-style80\eolfill=false
-style80\font=Courier, 10, 0, 0, 0
-style80\paper=16777215
-style81=ASP VBScript default
-style81\color=0
-style81\eolfill=false
-style81\font=Courier, 10, 0, 0, 0
-style81\paper=16777215
-style82=ASP VBScript comment
-style82\color=0
-style82\eolfill=false
-style82\font=Courier, 10, 0, 0, 0
-style82\paper=16777215
-style83=ASP VBScript number
-style83\color=0
-style83\eolfill=false
-style83\font=Courier, 10, 0, 0, 0
-style83\paper=16777215
-style84=ASP VBScript keyword
-style84\color=0
-style84\eolfill=false
-style84\font=Courier, 10, 0, 0, 0
-style84\paper=16777215
-style85=ASP VBScript string
-style85\color=0
-style85\eolfill=false
-style85\font=Courier, 10, 0, 0, 0
-style85\paper=16777215
-style86=ASP VBScript identifier
-style86\color=0
-style86\eolfill=false
-style86\font=Courier, 10, 0, 0, 0
-style86\paper=16777215
-style87=ASP VBScript unclosed string
-style87\color=0
-style87\eolfill=false
-style87\font=Courier, 10, 0, 0, 0
-style87\paper=16777215
-style90=Start of a Python fragment
-style90\color=0
-style90\eolfill=false
-style90\font=Courier, 10, 0, 0, 0
-style90\paper=16777215
-style91=Python default
-style91\color=0
-style91\eolfill=false
-style91\font=Courier, 10, 0, 0, 0
-style91\paper=16777215
-style92=Python comment
-style92\color=0
-style92\eolfill=false
-style92\font=Courier, 10, 0, 0, 0
-style92\paper=16777215
-style93=Python number
-style93\color=0
-style93\eolfill=false
-style93\font=Courier, 10, 0, 0, 0
-style93\paper=16777215
-style94=Python double-quoted string
-style94\color=0
-style94\eolfill=false
-style94\font=Courier, 10, 0, 0, 0
-style94\paper=16777215
-style95=Python single-quoted string
-style95\color=0
-style95\eolfill=false
-style95\font=Courier, 10, 0, 0, 0
-style95\paper=16777215
-style96=Python keyword
-style96\color=0
-style96\eolfill=false
-style96\font=Courier, 10, 0, 0, 0
-style96\paper=16777215
-style97=Python triple single-quoted string
-style97\color=0
-style97\eolfill=false
-style97\font=Courier, 10, 0, 0, 0
-style97\paper=16777215
-style98=Python triple double-quoted string
-style98\color=0
-style98\eolfill=false
-style98\font=Courier, 10, 0, 0, 0
-style98\paper=16777215
-style99=Python class name
-style99\color=0
-style99\eolfill=false
-style99\font=Courier, 10, 0, 0, 0
-style99\paper=16777215
-style100=Python function or method name
-style100\color=0
-style100\eolfill=false
-style100\font=Courier, 10, 0, 0, 0
-style100\paper=16777215
-style101=Python operator
-style101\color=0
-style101\eolfill=false
-style101\font=Courier, 10, 0, 0, 0
-style101\paper=16777215
-style102=Python identifier
-style102\color=0
-style102\eolfill=false
-style102\font=Courier, 10, 0, 0, 0
-style102\paper=16777215
-style105=Start of an ASP Python fragment
-style105\color=0
-style105\eolfill=false
-style105\font=Courier, 10, 0, 0, 0
-style105\paper=16777215
-style106=ASP Python default
-style106\color=0
-style106\eolfill=false
-style106\font=Courier, 10, 0, 0, 0
-style106\paper=16777215
-style107=ASP Python comment
-style107\color=0
-style107\eolfill=false
-style107\font=Courier, 10, 0, 0, 0
-style107\paper=16777215
-style108=ASP Python number
-style108\color=0
-style108\eolfill=false
-style108\font=Courier, 10, 0, 0, 0
-style108\paper=16777215
-style109=ASP Python double-quoted string
-style109\color=0
-style109\eolfill=false
-style109\font=Courier, 10, 0, 0, 0
-style109\paper=16777215
-style110=ASP Python single-quoted string
-style110\color=0
-style110\eolfill=false
-style110\font=Courier, 10, 0, 0, 0
-style110\paper=16777215
-style111=ASP Python keyword
-style111\color=0
-style111\eolfill=false
-style111\font=Courier, 10, 0, 0, 0
-style111\paper=16777215
-style112=ASP Python triple single-quoted string
-style112\color=0
-style112\eolfill=false
-style112\font=Courier, 10, 0, 0, 0
-style112\paper=16777215
-style113=ASP Python triple double-quoted string
-style113\color=0
-style113\eolfill=false
-style113\font=Courier, 10, 0, 0, 0
-style113\paper=16777215
-style114=ASP Python class name
-style114\color=0
-style114\eolfill=false
-style114\font=Courier, 10, 0, 0, 0
-style114\paper=16777215
-style115=ASP Python function or method name
-style115\color=0
-style115\eolfill=false
-style115\font=Courier, 10, 0, 0, 0
-style115\paper=16777215
-style116=ASP Python operator
-style116\color=0
-style116\eolfill=false
-style116\font=Courier, 10, 0, 0, 0
-style116\paper=16777215
-style117=ASP Python identifier
-style117\color=0
-style117\eolfill=false
-style117\font=Courier, 10, 0, 0, 0
-style117\paper=16777215
-style118=PHP default
-style118\color=0
-style118\eolfill=false
-style118\font=Courier, 10, 0, 0, 0
-style118\paper=16777215
-style119=PHP double-quoted string
-style119\color=0
-style119\eolfill=false
-style119\font=Courier, 10, 0, 0, 0
-style119\paper=16777215
-style120=PHP single-quoted string
-style120\color=0
-style120\eolfill=false
-style120\font=Courier, 10, 0, 0, 0
-style120\paper=16777215
-style121=PHP keyword
-style121\color=0
-style121\eolfill=false
-style121\font=Courier, 10, 0, 0, 0
-style121\paper=16777215
-style122=PHP number
-style122\color=0
-style122\eolfill=false
-style122\font=Courier, 10, 0, 0, 0
-style122\paper=16777215
-style123=PHP variable
-style123\color=0
-style123\eolfill=false
-style123\font=Courier, 10, 0, 0, 0
-style123\paper=16777215
-style124=PHP comment
-style124\color=0
-style124\eolfill=false
-style124\font=Courier, 10, 0, 0, 0
-style124\paper=16777215
-style125=PHP line comment
-style125\color=0
-style125\eolfill=false
-style125\font=Courier, 10, 0, 0, 0
-style125\paper=16777215
-style126=PHP double-quoted variable
-style126\color=0
-style126\eolfill=false
-style126\font=Courier, 10, 0, 0, 0
-style126\paper=16777215
-style127=PHP operator
-style127\color=0
-style127\eolfill=false
-style127\font=Courier, 10, 0, 0, 0
-style127\paper=16777215
-
-[CMake]
-style0=Default
-style0\color=0
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Comment
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style2=String
-style2\color=8323199
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=15658734
-style3=Left quoted string
-style3\color=8323199
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=15658734
-style4=Right quoted string
-style4\color=8323199
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=15658734
-style5=Function
-style5\color=127
-style5\eolfill=false
-style5\font=Courier, 10, 1, 0, 0
-style5\paper=16777215
-style6=Variable
-style6\color=8388608
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=Label
-style7\color=13382400
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-style8=User defined
-style8\color=0
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=16777215
-style9=WHILE block
-style9\color=127
-style9\eolfill=false
-style9\font=Courier, 10, 1, 0, 0
-style9\paper=16777215
-style10=FOREACH block
-style10\color=127
-style10\eolfill=false
-style10\font=Courier, 10, 1, 0, 0
-style10\paper=16777215
-style11=IF block
-style11\color=127
-style11\eolfill=false
-style11\font=Courier, 10, 1, 0, 0
-style11\paper=16777215
-style12=MACRO block
-style12\color=127
-style12\eolfill=false
-style12\font=Courier, 10, 1, 0, 0
-style12\paper=16777215
-style13=Variable within a string
-style13\color=13382400
-style13\eolfill=false
-style13\font=Courier, 10, 0, 0, 0
-style13\paper=15658734
-style14=Number
-style14\color=32639
-style14\eolfill=false
-style14\font=Courier, 10, 0, 0, 0
-style14\paper=16777215
-
-[Fortran]
-style0=Default
-style0\color=8421504
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Comment
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style2=Number
-style2\color=32639
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=Single-quoted string
-style3\color=8323199
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Double-quoted string
-style4\color=8323199
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Unclosed string
-style5\color=0
-style5\eolfill=true
-style5\font=Courier, 10, 0, 0, 0
-style5\paper=14729440
-style6=Operator
-style6\color=0
-style6\eolfill=false
-style6\font=Courier, 10, 1, 0, 0
-style6\paper=16777215
-style7=Identifier
-style7\color=0
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-style8=Keyword
-style8\color=127
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=16777215
-style9=Intrinsic function
-style9\color=11534400
-style9\eolfill=false
-style9\font=Courier, 10, 0, 0, 0
-style9\paper=16777215
-style10=Extended function
-style10\color=11550848
-style10\eolfill=false
-style10\font=Courier, 10, 0, 0, 0
-style10\paper=16777215
-style11=Pre-processor block
-style11\color=8355584
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=16777215
-style12=Dotted operator
-style12\color=0
-style12\eolfill=false
-style12\font=Courier, 10, 1, 0, 0
-style12\paper=16777215
-style13=Label
-style13\color=14729440
-style13\eolfill=false
-style13\font=Courier, 10, 0, 0, 0
-style13\paper=16777215
-style14=Continuation
-style14\color=0
-style14\eolfill=false
-style14\font=Courier, 10, 0, 0, 0
-style14\paper=15786112
-
-[Fortran77]
-style0=Default
-style0\color=8421504
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Comment
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style2=Number
-style2\color=32639
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=Single-quoted string
-style3\color=8323199
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Double-quoted string
-style4\color=8323199
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Unclosed string
-style5\color=0
-style5\eolfill=true
-style5\font=Courier, 10, 0, 0, 0
-style5\paper=14729440
-style6=Operator
-style6\color=0
-style6\eolfill=false
-style6\font=Courier, 10, 1, 0, 0
-style6\paper=16777215
-style7=Identifier
-style7\color=0
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-style8=Keyword
-style8\color=127
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=16777215
-style9=Intrinsic function
-style9\color=11534400
-style9\eolfill=false
-style9\font=Courier, 10, 0, 0, 0
-style9\paper=16777215
-style10=Extended function
-style10\color=11550848
-style10\eolfill=false
-style10\font=Courier, 10, 0, 0, 0
-style10\paper=16777215
-style11=Pre-processor block
-style11\color=8355584
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=16777215
-style12=Dotted operator
-style12\color=0
-style12\eolfill=false
-style12\font=Courier, 10, 1, 0, 0
-style12\paper=16777215
-style13=Label
-style13\color=14729440
-style13\eolfill=false
-style13\font=Courier, 10, 0, 0, 0
-style13\paper=16777215
-style14=Continuation
-style14\color=0
-style14\eolfill=false
-style14\font=Courier, 10, 0, 0, 0
-style14\paper=15786112
-
-[Pascal]
-style0=Default
-style0\color=0
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Identifier
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style2='{ ... }' style comment
-style2\color=32512
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3='(* ... *)' style comment
-style3\color=8355711
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Line comment
-style4\color=32639
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5='{$ ... }' style pre-processor block
-style5\color=127
-style5\eolfill=false
-style5\font=Courier, 10, 1, 0, 0
-style5\paper=16777215
-style7=Number
-style7\color=8323199
-style7\eolfill=false
-style7\font=Courier, 10, 0, 1, 0
-style7\paper=16777215
-style9=Keyword
-style9\color=8355584
-style9\eolfill=false
-style9\font=Courier, 10, 0, 0, 0
-style9\paper=16777215
-style10=Single-quoted string
-style10\color=0
-style10\eolfill=false
-style10\font=Courier, 10, 0, 0, 0
-style10\paper=16777215
-style11=Unclosed string
-style11\color=0
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=16777215
-style14=Inline asm
-style14\color=32896
-style14\eolfill=false
-style14\font=Courier, 10, 0, 0, 0
-style14\paper=16777215
-style6='(*$ ... *)' style pre-processor block
-style6\color=8355584
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style8=Hexadecimal number
-style8\color=32639
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=16777215
-style12=Character
-style12\color=8323199
-style12\eolfill=false
-style12\font=Courier, 10, 0, 0, 0
-style12\paper=16777215
-style13=Operator
-style13\color=0
-style13\eolfill=false
-style13\font=Courier, 10, 1, 0, 0
-style13\paper=16777215
-
-[PostScript]
-style0=Default
-style0\color=0
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Comment
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style2=DSC comment
-style2\color=4157503
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=DSC comment value
-style3\color=3170464
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Number
-style4\color=32639
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Name
-style5\color=0
-style5\eolfill=false
-style5\font=Courier, 10, 0, 0, 0
-style5\paper=16777215
-style6=Keyword
-style6\color=127
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=Literal
-style7\color=8355584
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-style8=Immediately evaluated literal
-style8\color=8355584
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=16777215
-style9=Array parenthesis
-style9\color=127
-style9\eolfill=false
-style9\font=Courier, 10, 0, 0, 0
-style9\paper=16777215
-style10=Dictionary parenthesis
-style10\color=3170464
-style10\eolfill=false
-style10\font=Courier, 10, 0, 0, 0
-style10\paper=16777215
-style11=Procedure parenthesis
-style11\color=0
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=16777215
-style12=Text
-style12\color=8323199
-style12\eolfill=false
-style12\font=Courier, 10, 0, 0, 0
-style12\paper=16777215
-style13=Hexadecimal string
-style13\color=4161343
-style13\eolfill=false
-style13\font=Courier, 10, 0, 0, 0
-style13\paper=16777215
-style14=Base85 string
-style14\color=8323199
-style14\eolfill=false
-style14\font=Courier, 10, 0, 0, 0
-style14\paper=16777215
-style15=Bad string character
-style15\color=16776960
-style15\eolfill=false
-style15\font=Courier, 10, 0, 0, 0
-style15\paper=16711680
-
-[VHDL]
-style0=Default
-style0\color=8388736
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Comment
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style2=Comment line
-style2\color=4161343
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=Number
-style3\color=32639
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=String
-style4\color=8323199
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Operator
-style5\color=0
-style5\eolfill=false
-style5\font=Courier, 10, 0, 0, 0
-style5\paper=16777215
-style6=Identifier
-style6\color=0
-style6\eolfill=false
-style6\font=Courier, 10, 0, 0, 0
-style6\paper=16777215
-style7=Unclosed string
-style7\color=0
-style7\eolfill=true
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=14729440
-style8=Keyword
-style8\color=127
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=16777215
-style9=Standard operator
-style9\color=32639
-style9\eolfill=false
-style9\font=Courier, 10, 0, 0, 0
-style9\paper=16777215
-style10=Attribute
-style10\color=8405024
-style10\eolfill=false
-style10\font=Courier, 10, 0, 0, 0
-style10\paper=16777215
-style11=Standard function
-style11\color=8421408
-style11\eolfill=false
-style11\font=Courier, 10, 0, 0, 0
-style11\paper=16777215
-style12=Standard package
-style12\color=2129952
-style12\eolfill=false
-style12\font=Courier, 10, 0, 0, 0
-style12\paper=16777215
-style13=Standard type
-style13\color=2130048
-style13\eolfill=false
-style13\font=Courier, 10, 0, 0, 0
-style13\paper=16777215
-style14=User defined
-style14\color=8405024
-style14\eolfill=false
-style14\font=Courier, 10, 0, 0, 0
-style14\paper=16777215
-
-[YAML]
-style0=Default
-style0\color=0
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Comment
-style1\color=34816
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=16777215
-style2=Identifier
-style2\color=136
-style2\eolfill=false
-style2\font=Courier, 10, 1, 0, 0
-style2\paper=16777215
-style3=Keyword
-style3\color=8913032
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Number
-style4\color=8912896
-style4\eolfill=false
-style4\font=Courier, 10, 0, 0, 0
-style4\paper=16777215
-style5=Reference
-style5\color=34952
-style5\eolfill=false
-style5\font=Courier, 10, 0, 0, 0
-style5\paper=16777215
-style6=Document delimiter
-style6\color=16777215
-style6\eolfill=true
-style6\font=Courier, 10, 1, 0, 0
-style6\paper=136
-style7=Text block marker
-style7\color=3355494
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-style8=Syntax error marker
-style8\color=16777215
-style8\eolfill=true
-style8\font=Courier, 10, 1, 1, 0
-style8\paper=16711680
-style9=Operator
-style9\color=0
-style9\eolfill=false
-style9\font=Courier, 10, 0, 0, 0
-style9\paper=16777215
-
-[TCL]
-style0=Default
-style0\color=8421504
-style0\eolfill=false
-style0\font=Courier, 10, 0, 0, 0
-style0\paper=16777215
-style1=Comment
-style1\color=32512
-style1\eolfill=false
-style1\font=Courier, 10, 0, 0, 0
-style1\paper=15794144
-style2=Comment line
-style2\color=32512
-style2\eolfill=false
-style2\font=Courier, 10, 0, 0, 0
-style2\paper=16777215
-style3=Number
-style3\color=32639
-style3\eolfill=false
-style3\font=Courier, 10, 0, 0, 0
-style3\paper=16777215
-style4=Quoted keyword
-style4\color=8323199
-style4\eolfill=false
-style4\font=Courier, 10, 1, 0, 0
-style4\paper=16773360
-style5=Quoted string
-style5\color=8323199
-style5\eolfill=true
-style5\font=Courier, 10, 0, 0, 0
-style5\paper=16773360
-style6=Operator
-style6\color=0
-style6\eolfill=false
-style6\font=Courier, 10, 1, 0, 0
-style6\paper=16777215
-style7=Identifier
-style7\color=127
-style7\eolfill=false
-style7\font=Courier, 10, 0, 0, 0
-style7\paper=16777215
-style8=Substitution
-style8\color=8355584
-style8\eolfill=false
-style8\font=Courier, 10, 0, 0, 0
-style8\paper=15728624
-style9=Brace substitution
-style9\color=8355584
-style9\eolfill=false
-style9\font=Courier, 10, 0, 0, 0
-style9\paper=16777215
-style10=Modifier
-style10\color=8323199
-style10\eolfill=false
-style10\font=Courier, 10, 0, 0, 0
-style10\paper=16777215
-style11=Expand keyword
-style11\color=127
-style11\eolfill=false
-style11\font=Courier, 10, 1, 0, 0
-style11\paper=16777088
-style12=TCL keyword
-style12\color=127
-style12\eolfill=false
-style12\font=Courier, 10, 1, 0, 0
-style12\paper=16777215
-style13=Tk keyword
-style13\color=127
-style13\eolfill=false
-style13\font=Courier, 10, 1, 0, 0
-style13\paper=14745584
-style14=iTCL keyword
-style14\color=127
-style14\eolfill=false
-style14\font=Courier, 10, 1, 0, 0
-style14\paper=16773360
-style15=Tk command
-style15\color=127
-style15\eolfill=false
-style15\font=Courier, 10, 1, 0, 0
-style15\paper=16765136
-style16=User defined 1
-style16\color=127
-style16\eolfill=false
-style16\font=Courier, 10, 0, 0, 0
-style16\paper=16777215
-style17=User defined 2
-style17\color=127
-style17\eolfill=false
-style17\font=Courier, 10, 0, 0, 0
-style17\paper=16777215
-style18=User defined 3
-style18\color=127
-style18\eolfill=false
-style18\font=Courier, 10, 0, 0, 0
-style18\paper=16777215
-style19=User defined 4
-style19\color=127
-style19\eolfill=false
-style19\font=Courier, 10, 0, 0, 0
-style19\paper=16777215
-style20=Comment box
-style20\color=32512
-style20\eolfill=true
-style20\font=Courier, 10, 0, 0, 0
-style20\paper=15794160
-style21=Comment block
-style21\color=0
-style21\eolfill=false
-style21\font=Courier, 10, 0, 0, 0
-style21\paper=15794160
+[Bash] +style0=Default +style0\color=8421504 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Error +style1\color=16776960 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16711680 +style10=Parameter expansion +style10\color=0 +style10\eolfill=false +style10\font=Courier, 10, 0, 0, 0 +style10\paper=16777184 +style11=Backticks +style11\color=16776960 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=10518656 +style12=Here document delimiter +style12\color=0 +style12\eolfill=false +style12\font=Courier, 10, 0, 0, 0 +style12\paper=14536925 +style13=Single-quoted here document +style13\color=8323199 +style13\eolfill=true +style13\font=Courier, 10, 0, 0, 0 +style13\paper=14536925 +style2=Comment +style2\color=32512 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=Number +style3\color=32639 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Keyword +style4\color=127 +style4\eolfill=false +style4\font=Courier, 10, 1, 0, 0 +style4\paper=16777215 +style5=Double-quoted string +style5\color=8323199 +style5\eolfill=false +style5\font=Courier, 10, 0, 0, 0 +style5\paper=16777215 +style6=Single-quoted string +style6\color=8323199 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=Operator +style7\color=0 +style7\eolfill=false +style7\font=Courier, 10, 1, 0, 0 +style7\paper=16777215 +style8=Identifier +style8\color=0 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=16777215 +style9=Scalar +style9\color=0 +style9\eolfill=false +style9\font=Courier, 10, 0, 0, 0 +style9\paper=16769248 + +[Batch] +style0=Default +style0\color=0 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Comment +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style2=Keyword +style2\color=127 +style2\eolfill=false +style2\font=Courier, 10, 1, 0, 0 +style2\paper=16777215 +style3=Label +style3\color=8323199 +style3\eolfill=true +style3\font=Courier, 10, 0, 0, 0 +style3\paper=6316128 +style4=Hide command character +style4\color=8355584 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=External command +style5\color=127 +style5\eolfill=false +style5\font=Courier, 10, 1, 0, 0 +style5\paper=16777215 +style6=Variable +style6\color=8388736 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=Operator +style7\color=0 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 + +[C%23] +style0=Default +style0\color=8421504 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=C comment +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style10=Operator +style10\color=0 +style10\eolfill=false +style10\font=Courier, 10, 1, 0, 0 +style10\paper=16777215 +style11=Identifier +style11\color=0 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=16777215 +style12=Unclosed string +style12\color=0 +style12\eolfill=true +style12\font=Courier, 10, 0, 0, 0 +style12\paper=16777215 +style13=Verbatim string +style13\color=32512 +style13\eolfill=true +style13\font=Courier, 10, 0, 0, 0 +style13\paper=14745568 +style15=JavaDoc style C++ comment +style15\color=4157503 +style15\eolfill=false +style15\font=Courier, 10, 0, 0, 0 +style15\paper=16777215 +style16=Secondary keywords and identifiers +style16\color=0 +style16\eolfill=false +style16\font=Courier, 10, 0, 0, 0 +style16\paper=16777215 +style17=JavaDoc keyword +style17\color=3170464 +style17\eolfill=false +style17\font=Courier, 10, 0, 0, 0 +style17\paper=16777215 +style18=JavaDoc keyword error +style18\color=8405024 +style18\eolfill=false +style18\font=Courier, 10, 0, 0, 0 +style18\paper=16777215 +style19=Global classes and typedefs +style19\color=0 +style19\eolfill=false +style19\font=Courier, 10, 0, 0, 0 +style19\paper=16777215 +style2=C++ comment +style2\color=32512 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=JavaDoc style C comment +style3\color=4157503 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Number +style4\color=32639 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Keyword +style5\color=127 +style5\eolfill=false +style5\font=Courier, 10, 1, 0, 0 +style5\paper=16777215 +style6=Double-quoted string +style6\color=8323199 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=Single-quoted string +style7\color=8323199 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 +style9=Pre-processor block +style9\color=8355584 +style9\eolfill=false +style9\font=Courier, 10, 0, 0, 0 +style9\paper=16777215 +style8=IDL UUID +style8\color=0 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=16777215 + +[CSS] +style0=Default +style0\color=16711808 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Tag +style1\color=127 +style1\eolfill=false +style1\font=Courier, 10, 1, 0, 0 +style1\paper=16777215 +style10=ID selector +style10\color=32639 +style10\eolfill=false +style10\font=Courier, 10, 0, 1, 0 +style10\paper=16777215 +style11=Important +style11\color=16744448 +style11\eolfill=false +style11\font=Courier, 10, 1, 0, 0 +style11\paper=16777215 +style12=@@-rule +style12\color=8355584 +style12\eolfill=false +style12\font=Courier, 10, 1, 0, 0 +style12\paper=16777215 +style13=Double-quoted string +style13\color=8323199 +style13\eolfill=false +style13\font=Courier, 10, 0, 0, 0 +style13\paper=16777215 +style14=Single-quoted string +style14\color=8323199 +style14\eolfill=false +style14\font=Courier, 10, 0, 0, 0 +style14\paper=16777215 +style15=CSS2 property +style15\color=41184 +style15\eolfill=false +style15\font=Courier, 10, 0, 0, 0 +style15\paper=16777215 +style16=Attribute +style16\color=8388608 +style16\eolfill=false +style16\font=Courier, 10, 0, 0, 0 +style16\paper=16777215 +style2=Class selector +style2\color=0 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=Pseudo-class +style3\color=8388608 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Unknown pseudo-class +style4\color=16711680 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Operator +style5\color=0 +style5\eolfill=false +style5\font=Courier, 10, 0, 0, 0 +style5\paper=16777215 +style6=CSS1 property +style6\color=16608 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=Unknown property +style7\color=16711680 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 +style8=Value +style8\color=8323199 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=16777215 +style17=CSS3 property +style17\color=0 +style17\eolfill=false +style17\font=Courier, 10, 0, 0, 0 +style17\paper=16777215 +style18=Pseudo-element +style18\color=0 +style18\eolfill=false +style18\font=Courier, 10, 0, 0, 0 +style18\paper=16777215 +style19=Extended CSS property +style19\color=0 +style19\eolfill=false +style19\font=Courier, 10, 0, 0, 0 +style19\paper=16777215 +style20=Extended pseudo-class +style20\color=0 +style20\eolfill=false +style20\font=Courier, 10, 0, 0, 0 +style20\paper=16777215 +style21=Extended pseudo-element +style21\color=0 +style21\eolfill=false +style21\font=Courier, 10, 0, 0, 0 +style21\paper=16777215 + +[Cpp] +style0=Default +style0\color=8421504 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=C comment +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style10=Operator +style10\color=0 +style10\eolfill=false +style10\font=Courier, 10, 1, 0, 0 +style10\paper=16777215 +style11=Identifier +style11\color=0 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=16777215 +style12=Unclosed string +style12\color=0 +style12\eolfill=true +style12\font=Courier, 10, 0, 0, 0 +style12\paper=14729440 +style15=JavaDoc style C++ comment +style15\color=4157503 +style15\eolfill=false +style15\font=Courier, 10, 0, 0, 0 +style15\paper=16777215 +style16=Secondary keywords and identifiers +style16\color=0 +style16\eolfill=false +style16\font=Courier, 10, 0, 0, 0 +style16\paper=16777215 +style17=JavaDoc keyword +style17\color=3170464 +style17\eolfill=false +style17\font=Courier, 10, 0, 0, 0 +style17\paper=16777215 +style18=JavaDoc keyword error +style18\color=8405024 +style18\eolfill=false +style18\font=Courier, 10, 0, 0, 0 +style18\paper=16777215 +style19=Global classes and typedefs +style19\color=0 +style19\eolfill=false +style19\font=Courier, 10, 0, 0, 0 +style19\paper=16777215 +style2=C++ comment +style2\color=32512 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=JavaDoc style C comment +style3\color=4157503 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Number +style4\color=32639 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Keyword +style5\color=127 +style5\eolfill=false +style5\font=Courier, 10, 1, 0, 0 +style5\paper=16777215 +style6=Double-quoted string +style6\color=8323199 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=Single-quoted string +style7\color=8323199 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 +style9=Pre-processor block +style9\color=8355584 +style9\eolfill=false +style9\font=Courier, 10, 0, 0, 0 +style9\paper=16777215 +style8=IDL UUID +style8\color=0 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=16777215 +style20=C++ raw string +style20\color=8323199 +style20\eolfill=false +style20\font=Courier, 10, 0, 0, 0 +style20\paper=16774143 +style40=Inactive C++ raw string +style40\color=11571376 +style40\eolfill=false +style40\font=Courier, 10, 0, 0, 0 +style40\paper=16774143 +style64=Inactive default +style64\color=12632256 +style64\eolfill=false +style64\font=Courier, 10, 0, 0, 0 +style64\paper=16777215 +style65=Inactive C comment +style65\color=9482384 +style65\eolfill=false +style65\font=Courier, 10, 0, 0, 0 +style65\paper=16777215 +style66=Inactive C++ comment +style66\color=9482384 +style66\eolfill=false +style66\font=Courier, 10, 0, 0, 0 +style66\paper=16777215 +style67=Inactive JavaDoc style C comment +style67\color=13684944 +style67\eolfill=false +style67\font=Courier, 10, 0, 0, 0 +style67\paper=16777215 +style68=Inactive number +style68\color=9482384 +style68\eolfill=false +style68\font=Courier, 10, 0, 0, 0 +style68\paper=16777215 +style69=Inactive keyword +style69\color=9474224 +style69\eolfill=false +style69\font=Courier, 10, 1, 0, 0 +style69\paper=16777215 +style70=Inactive double-quoted string +style70\color=11571376 +style70\eolfill=false +style70\font=Courier New, 10, 0, 0, 0 +style70\paper=16777215 +style71=Inactive single-quoted string +style71\color=11571376 +style71\eolfill=false +style71\font=Courier New, 10, 0, 0, 0 +style71\paper=16777215 +style72=Inactive IDL UUID +style72\color=12632256 +style72\eolfill=false +style72\font=Courier, 10, 0, 0, 0 +style72\paper=16777215 +style73=Inactive pre-processor block +style73\color=11579536 +style73\eolfill=false +style73\font=Courier, 10, 0, 0, 0 +style73\paper=16777215 +style74=Inactive operator +style74\color=11579568 +style74\eolfill=false +style74\font=Courier, 10, 1, 0, 0 +style74\paper=16777215 +style75=Inactive identifier +style75\color=11579568 +style75\eolfill=false +style75\font=Courier, 10, 0, 0, 0 +style75\paper=16777215 +style76=Inactive unclosed string +style76\color=0 +style76\eolfill=true +style76\font=Courier New, 10, 0, 0, 0 +style76\paper=14729440 +style79=Inactive JavaDoc style C++ comment +style79\color=12632256 +style79\eolfill=false +style79\font=Courier, 10, 0, 0, 0 +style79\paper=16777215 +style80=Inactive secondary keywords and identifiers +style80\color=12632256 +style80\eolfill=false +style80\font=Courier, 10, 0, 0, 0 +style80\paper=16777215 +style81=Inactive JavaDoc keyword +style81\color=12632256 +style81\eolfill=false +style81\font=Courier, 10, 0, 0, 0 +style81\paper=16777215 +style82=Inactive JavaDoc keyword error +style82\color=12632256 +style82\eolfill=false +style82\font=Courier, 10, 0, 0, 0 +style82\paper=16777215 +style83=Inactive global classes and typedefs +style83\color=11579568 +style83\eolfill=false +style83\font=Courier, 10, 0, 0, 0 +style83\paper=16777215 + +[D] +style0=Default +style0\color=8421504 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Block comment +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style10=String +style10\color=8323199 +style10\eolfill=false +style10\font=Courier, 10, 0, 0, 0 +style10\paper=16777215 +style11=Unclosed string +style11\color=0 +style11\eolfill=true +style11\font=Courier, 10, 0, 0, 0 +style11\paper=14729440 +style12=Character +style12\color=8323199 +style12\eolfill=false +style12\font=Courier, 10, 0, 0, 0 +style12\paper=16777215 +style13=Operator +style13\color=0 +style13\eolfill=false +style13\font=Courier, 10, 1, 0, 0 +style13\paper=16777215 +style14=Identifier +style14\color=0 +style14\eolfill=false +style14\font=Courier, 10, 0, 0, 0 +style14\paper=16777215 +style15=DDoc style line comment +style15\color=4157503 +style15\eolfill=false +style15\font=Courier, 10, 0, 0, 0 +style15\paper=16777215 +style16=DDoc keyword +style16\color=3170464 +style16\eolfill=false +style16\font=Courier, 10, 0, 0, 0 +style16\paper=16777215 +style17=DDoc keyword error +style17\color=8405024 +style17\eolfill=false +style17\font=Courier, 10, 0, 0, 0 +style17\paper=16777215 +style2=Line comment +style2\color=32512 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=DDoc style block comment +style3\color=4157503 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Nesting comment +style4\color=10535072 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Number +style5\color=32639 +style5\eolfill=false +style5\font=Courier, 10, 0, 0, 0 +style5\paper=16777215 +style6=Keyword +style6\color=127 +style6\eolfill=false +style6\font=Courier, 10, 1, 0, 0 +style6\paper=16777215 +style7=Secondary keyword +style7\color=127 +style7\eolfill=false +style7\font=Courier, 10, 1, 0, 0 +style7\paper=16777215 +style8=Documentation keyword +style8\color=127 +style8\eolfill=false +style8\font=Courier, 10, 1, 0, 0 +style8\paper=16777215 +style9=Type definition +style9\color=127 +style9\eolfill=false +style9\font=Courier, 10, 1, 0, 0 +style9\paper=16777215 + +[Diff] +style0=Default +style0\color=0 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Comment +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style2=Command +style2\color=8355584 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=Header +style3\color=8323072 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Position +style4\color=8323199 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Removed line +style5\color=32639 +style5\eolfill=false +style5\font=Courier, 10, 0, 0, 0 +style5\paper=16777215 +style6=Added line +style6\color=127 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=Changed line +style7\color=8355711 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 + +[HTML] +style0=HTML default +style0\color=0 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Tag +style1\color=128 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style10=Entity +style10\color=8388736 +style10\eolfill=false +style10\font=Courier, 10, 0, 0, 0 +style10\paper=16777215 +style100=Python function or method name +style100\color=32639 +style100\eolfill=true +style100\font=Courier, 10, 1, 0, 0 +style100\paper=15728623 +style101=Python operator +style101\color=0 +style101\eolfill=true +style101\font=Courier, 10, 1, 0, 0 +style101\paper=15728623 +style102=Python identifier +style102\color=0 +style102\eolfill=true +style102\font=Courier, 10, 0, 0, 0 +style102\paper=15728623 +style105=Start of an ASP Python fragment +style105\color=8421504 +style105\eolfill=false +style105\font=Courier, 10, 0, 0, 0 +style105\paper=16777215 +style106=ASP Python default +style106\color=8421504 +style106\eolfill=true +style106\font=Courier, 10, 0, 0, 0 +style106\paper=13627343 +style107=ASP Python comment +style107\color=32512 +style107\eolfill=true +style107\font=Courier, 10, 0, 0, 0 +style107\paper=13627343 +style108=ASP Python number +style108\color=32639 +style108\eolfill=true +style108\font=Courier, 10, 0, 0, 0 +style108\paper=13627343 +style109=ASP Python double-quoted string +style109\color=8323199 +style109\eolfill=true +style109\font=Courier, 10, 0, 0, 0 +style109\paper=13627343 +style11=End of a tag +style11\color=128 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=16777215 +style110=ASP Python single-quoted string +style110\color=8323199 +style110\eolfill=true +style110\font=Courier, 10, 0, 0, 0 +style110\paper=13627343 +style111=ASP Python keyword +style111\color=127 +style111\eolfill=true +style111\font=Courier, 10, 1, 0, 0 +style111\paper=13627343 +style112=ASP Python triple single-quoted string +style112\color=8323072 +style112\eolfill=true +style112\font=Courier, 10, 0, 0, 0 +style112\paper=13627343 +style113=ASP Python triple double-quoted string +style113\color=8323072 +style113\eolfill=true +style113\font=Courier, 10, 0, 0, 0 +style113\paper=13627343 +style114=ASP Python class name +style114\color=255 +style114\eolfill=true +style114\font=Courier, 10, 1, 0, 0 +style114\paper=13627343 +style115=ASP Python function or method name +style115\color=32639 +style115\eolfill=true +style115\font=Courier, 10, 1, 0, 0 +style115\paper=13627343 +style116=ASP Python operator +style116\color=0 +style116\eolfill=true +style116\font=Courier, 10, 1, 0, 0 +style116\paper=13627343 +style117=ASP Python identifier +style117\color=0 +style117\eolfill=true +style117\font=Courier, 10, 0, 0, 0 +style117\paper=13627343 +style118=PHP default +style118\color=51 +style118\eolfill=true +style118\font=Courier, 10, 0, 0, 0 +style118\paper=16775416 +style119=PHP double-quoted string +style119\color=32512 +style119\eolfill=false +style119\font=Courier, 10, 0, 0, 0 +style119\paper=16775416 +style12=Start of an XML fragment +style12\color=255 +style12\eolfill=false +style12\font=Courier, 10, 0, 0, 0 +style12\paper=16777215 +style120=PHP single-quoted string +style120\color=40704 +style120\eolfill=false +style120\font=Courier, 10, 0, 0, 0 +style120\paper=16775416 +style121=PHP keyword +style121\color=8323199 +style121\eolfill=false +style121\font=Courier, 10, 0, 1, 0 +style121\paper=16775416 +style122=PHP number +style122\color=13408512 +style122\eolfill=false +style122\font=Courier, 10, 0, 0, 0 +style122\paper=16775416 +style123=PHP variable +style123\color=127 +style123\eolfill=false +style123\font=Courier, 10, 0, 1, 0 +style123\paper=16775416 +style124=PHP comment +style124\color=10066329 +style124\eolfill=false +style124\font=Courier, 10, 0, 0, 0 +style124\paper=16775416 +style125=PHP line comment +style125\color=6710886 +style125\eolfill=false +style125\font=Courier, 10, 0, 1, 0 +style125\paper=16775416 +style126=PHP double-quoted variable +style126\color=127 +style126\eolfill=false +style126\font=Courier, 10, 0, 1, 0 +style126\paper=16775416 +style127=PHP operator +style127\color=0 +style127\eolfill=false +style127\font=Courier, 10, 0, 0, 0 +style127\paper=16775416 +style13=End of an XML fragment +style13\color=255 +style13\eolfill=false +style13\font=Courier, 10, 0, 0, 0 +style13\paper=16777215 +style14=Script tag +style14\color=128 +style14\eolfill=false +style14\font=Courier, 10, 0, 0, 0 +style14\paper=16777215 +style15=Start of an ASP fragment with @ +style15\color=0 +style15\eolfill=false +style15\font=Courier, 10, 0, 0, 0 +style15\paper=16776960 +style16=Start of an ASP fragment +style16\color=0 +style16\eolfill=false +style16\font=Courier, 10, 0, 0, 0 +style16\paper=16768768 +style17=CDATA +style17\color=0 +style17\eolfill=false +style17\font=Courier, 10, 0, 0, 0 +style17\paper=16768768 +style18=Start of a PHP fragment +style18\color=255 +style18\eolfill=false +style18\font=Courier, 10, 0, 0, 0 +style18\paper=16773055 +style19=Unquoted HTML value +style19\color=16711935 +style19\eolfill=false +style19\font=Courier, 10, 0, 0, 0 +style19\paper=16773119 +style2=Unknown tag +style2\color=16711680 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style20=ASP X-Code comment +style20\color=0 +style20\eolfill=false +style20\font=Courier, 10, 0, 0, 0 +style20\paper=16777215 +style21=SGML default +style21\color=128 +style21\eolfill=false +style21\font=Courier, 10, 0, 0, 0 +style21\paper=15724543 +style22=SGML command +style22\color=128 +style22\eolfill=false +style22\font=Courier, 10, 1, 0, 0 +style22\paper=15724543 +style23=First parameter of an SGML command +style23\color=26112 +style23\eolfill=false +style23\font=Courier, 10, 0, 0, 0 +style23\paper=15724543 +style24=SGML double-quoted string +style24\color=8388608 +style24\eolfill=false +style24\font=Courier, 10, 0, 0, 0 +style24\paper=15724543 +style25=SGML single-quoted string +style25\color=10040064 +style25\eolfill=false +style25\font=Courier, 10, 0, 0, 0 +style25\paper=15724543 +style26=SGML error +style26\color=8388608 +style26\eolfill=false +style26\font=Courier, 10, 0, 0, 0 +style26\paper=16737894 +style27=SGML special entity +style27\color=3368703 +style27\eolfill=false +style27\font=Courier, 10, 0, 0, 0 +style27\paper=15724543 +style29=SGML comment +style29\color=8421376 +style29\eolfill=false +style29\font=Courier, 10, 0, 0, 0 +style29\paper=15724543 +style3=Attribute +style3\color=32896 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style30=First parameter comment of an SGML command +style30\color=0 +style30\eolfill=false +style30\font=Courier, 10, 0, 0, 0 +style30\paper=16777215 +style31=SGML block default +style31\color=102 +style31\eolfill=false +style31\font=Courier, 10, 0, 0, 0 +style31\paper=13421792 +style4=Unknown attribute +style4\color=16711680 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style40=Start of a JavaScript fragment +style40\color=8355584 +style40\eolfill=false +style40\font=Courier, 10, 0, 0, 0 +style40\paper=16777215 +style41=JavaScript default +style41\color=0 +style41\eolfill=true +style41\font=Courier, 10, 1, 0, 0 +style41\paper=15790335 +style42=JavaScript comment +style42\color=32512 +style42\eolfill=true +style42\font=Courier, 10, 0, 0, 0 +style42\paper=15790335 +style43=JavaScript line comment +style43\color=32512 +style43\eolfill=false +style43\font=Courier, 10, 0, 0, 0 +style43\paper=15790335 +style44=JavaDoc style JavaScript comment +style44\color=4157503 +style44\eolfill=true +style44\font=Courier, 10, 1, 0, 0 +style44\paper=15790335 +style45=JavaScript number +style45\color=32639 +style45\eolfill=false +style45\font=Courier, 10, 0, 0, 0 +style45\paper=15790335 +style46=JavaScript word +style46\color=0 +style46\eolfill=false +style46\font=Courier, 10, 0, 0, 0 +style46\paper=15790335 +style47=JavaScript keyword +style47\color=127 +style47\eolfill=false +style47\font=Courier, 10, 1, 0, 0 +style47\paper=15790335 +style48=JavaScript double-quoted string +style48\color=8323199 +style48\eolfill=false +style48\font=Courier, 10, 0, 0, 0 +style48\paper=15790335 +style49=JavaScript single-quoted string +style49\color=8323199 +style49\eolfill=false +style49\font=Courier, 10, 0, 0, 0 +style49\paper=15790335 +style5=HTML number +style5\color=32639 +style5\eolfill=false +style5\font=Courier, 10, 0, 0, 0 +style5\paper=16777215 +style50=JavaScript symbol +style50\color=0 +style50\eolfill=false +style50\font=Courier, 10, 1, 0, 0 +style50\paper=15790335 +style51=JavaScript unclosed string +style51\color=0 +style51\eolfill=true +style51\font=Courier, 10, 0, 0, 0 +style51\paper=12565424 +style52=JavaScript regular expression +style52\color=0 +style52\eolfill=false +style52\font=Courier, 10, 0, 0, 0 +style52\paper=16759728 +style55=Start of an ASP JavaScript fragment +style55\color=8355584 +style55\eolfill=false +style55\font=Courier, 10, 0, 0, 0 +style55\paper=16777215 +style56=ASP JavaScript default +style56\color=0 +style56\eolfill=true +style56\font=Courier, 10, 1, 0, 0 +style56\paper=14671743 +style57=ASP JavaScript comment +style57\color=32512 +style57\eolfill=true +style57\font=Courier, 10, 0, 0, 0 +style57\paper=14671743 +style58=ASP JavaScript line comment +style58\color=32512 +style58\eolfill=false +style58\font=Courier, 10, 0, 0, 0 +style58\paper=14671743 +style59=JavaDoc style ASP JavaScript comment +style59\color=8355711 +style59\eolfill=true +style59\font=Courier, 10, 1, 0, 0 +style59\paper=14671743 +style6=HTML double-quoted string +style6\color=8323199 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style60=ASP JavaScript number +style60\color=32639 +style60\eolfill=false +style60\font=Courier, 10, 0, 0, 0 +style60\paper=14671743 +style61=ASP JavaScript word +style61\color=0 +style61\eolfill=false +style61\font=Courier, 10, 0, 0, 0 +style61\paper=14671743 +style62=ASP JavaScript keyword +style62\color=127 +style62\eolfill=false +style62\font=Courier, 10, 1, 0, 0 +style62\paper=14671743 +style63=ASP JavaScript double-quoted string +style63\color=8323199 +style63\eolfill=false +style63\font=Courier, 10, 0, 0, 0 +style63\paper=14671743 +style64=ASP JavaScript single-quoted string +style64\color=8323199 +style64\eolfill=false +style64\font=Courier, 10, 0, 0, 0 +style64\paper=14671743 +style65=ASP JavaScript symbol +style65\color=0 +style65\eolfill=false +style65\font=Courier, 10, 1, 0, 0 +style65\paper=14671743 +style66=ASP JavaScript unclosed string +style66\color=0 +style66\eolfill=true +style66\font=Courier, 10, 0, 0, 0 +style66\paper=12565424 +style67=ASP JavaScript regular expression +style67\color=0 +style67\eolfill=false +style67\font=Courier, 10, 0, 0, 0 +style67\paper=16759728 +style7=HTML single-quoted string +style7\color=8323199 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 +style70=Start of a VBScript fragment +style70\color=0 +style70\eolfill=false +style70\font=Courier, 10, 0, 0, 0 +style70\paper=16777215 +style71=VBScript default +style71\color=0 +style71\eolfill=true +style71\font=Courier, 10, 0, 0, 0 +style71\paper=15724543 +style72=VBScript comment +style72\color=32768 +style72\eolfill=true +style72\font=Courier, 10, 0, 0, 0 +style72\paper=15724543 +style73=VBScript number +style73\color=32896 +style73\eolfill=true +style73\font=Courier, 10, 0, 0, 0 +style73\paper=15724543 +style74=VBScript keyword +style74\color=128 +style74\eolfill=true +style74\font=Courier, 10, 1, 0, 0 +style74\paper=15724543 +style75=VBScript string +style75\color=8388736 +style75\eolfill=true +style75\font=Courier, 10, 0, 0, 0 +style75\paper=15724543 +style76=VBScript identifier +style76\color=128 +style76\eolfill=true +style76\font=Courier, 10, 0, 0, 0 +style76\paper=15724543 +style77=VBScript unclosed string +style77\color=128 +style77\eolfill=true +style77\font=Courier, 10, 0, 0, 0 +style77\paper=8355839 +style8=Other text in a tag +style8\color=8388736 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=16777215 +style80=Start of an ASP VBScript fragment +style80\color=0 +style80\eolfill=false +style80\font=Courier, 10, 0, 0, 0 +style80\paper=16777215 +style81=ASP VBScript default +style81\color=0 +style81\eolfill=true +style81\font=Courier, 10, 0, 0, 0 +style81\paper=13619183 +style82=ASP VBScript comment +style82\color=32768 +style82\eolfill=true +style82\font=Courier, 10, 0, 0, 0 +style82\paper=13619183 +style83=ASP VBScript number +style83\color=32896 +style83\eolfill=true +style83\font=Courier, 10, 0, 0, 0 +style83\paper=13619183 +style84=ASP VBScript keyword +style84\color=128 +style84\eolfill=true +style84\font=Courier, 10, 1, 0, 0 +style84\paper=13619183 +style85=ASP VBScript string +style85\color=8388736 +style85\eolfill=true +style85\font=Courier, 10, 0, 0, 0 +style85\paper=13619183 +style86=ASP VBScript identifier +style86\color=128 +style86\eolfill=true +style86\font=Courier, 10, 0, 0, 0 +style86\paper=13619183 +style87=ASP VBScript unclosed string +style87\color=128 +style87\eolfill=true +style87\font=Courier, 10, 0, 0, 0 +style87\paper=8355839 +style9=HTML comment +style9\color=8421376 +style9\eolfill=false +style9\font=Courier, 10, 0, 0, 0 +style9\paper=16777215 +style90=Start of a Python fragment +style90\color=8421504 +style90\eolfill=false +style90\font=Courier, 10, 0, 0, 0 +style90\paper=16777215 +style91=Python default +style91\color=8421504 +style91\eolfill=true +style91\font=Courier, 10, 0, 0, 0 +style91\paper=15728623 +style92=Python comment +style92\color=32512 +style92\eolfill=true +style92\font=Courier, 10, 0, 0, 0 +style92\paper=15728623 +style93=Python number +style93\color=32639 +style93\eolfill=true +style93\font=Courier, 10, 0, 0, 0 +style93\paper=15728623 +style94=Python double-quoted string +style94\color=8323199 +style94\eolfill=true +style94\font=Courier, 10, 0, 0, 0 +style94\paper=15728623 +style95=Python single-quoted string +style95\color=8323199 +style95\eolfill=true +style95\font=Courier, 10, 0, 0, 0 +style95\paper=15728623 +style96=Python keyword +style96\color=127 +style96\eolfill=true +style96\font=Courier, 10, 1, 0, 0 +style96\paper=15728623 +style97=Python triple single-quoted string +style97\color=8323072 +style97\eolfill=true +style97\font=Courier, 10, 0, 0, 0 +style97\paper=15728623 +style98=Python triple double-quoted string +style98\color=8323072 +style98\eolfill=true +style98\font=Courier, 10, 0, 0, 0 +style98\paper=15728623 +style99=Python class name +style99\color=255 +style99\eolfill=true +style99\font=Courier, 10, 1, 0, 0 +style99\paper=15728623 + +[IDL] +style0=Default +style0\color=8421504 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=C comment +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style10=Operator +style10\color=0 +style10\eolfill=false +style10\font=Courier, 10, 1, 0, 0 +style10\paper=16777215 +style11=Identifier +style11\color=0 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=16777215 +style12=Unclosed string +style12\color=0 +style12\eolfill=true +style12\font=Courier, 10, 0, 0, 0 +style12\paper=14729440 +style15=JavaDoc style C++ comment +style15\color=4157503 +style15\eolfill=false +style15\font=Courier, 10, 0, 0, 0 +style15\paper=16777215 +style16=Secondary keywords and identifiers +style16\color=0 +style16\eolfill=false +style16\font=Courier, 10, 0, 0, 0 +style16\paper=16777215 +style17=JavaDoc keyword +style17\color=3170464 +style17\eolfill=false +style17\font=Courier, 10, 0, 0, 0 +style17\paper=16777215 +style18=JavaDoc keyword error +style18\color=8405024 +style18\eolfill=false +style18\font=Courier, 10, 0, 0, 0 +style18\paper=16777215 +style19=Global classes and typedefs +style19\color=0 +style19\eolfill=false +style19\font=Courier, 10, 0, 0, 0 +style19\paper=16777215 +style2=C++ comment +style2\color=32512 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=JavaDoc style C comment +style3\color=4157503 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Number +style4\color=32639 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Keyword +style5\color=127 +style5\eolfill=false +style5\font=Courier, 10, 1, 0, 0 +style5\paper=16777215 +style6=Double-quoted string +style6\color=8323199 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=Single-quoted string +style7\color=8323199 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 +style8=UUID +style8\color=8405120 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=16777215 +style9=Pre-processor block +style9\color=8355584 +style9\eolfill=false +style9\font=Courier, 10, 0, 0, 0 +style9\paper=16777215 + +[Java] +style0=Default +style0\color=8421504 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=C comment +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style10=Operator +style10\color=0 +style10\eolfill=false +style10\font=Courier, 10, 1, 0, 0 +style10\paper=16777215 +style11=Identifier +style11\color=0 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=16777215 +style12=Unclosed string +style12\color=0 +style12\eolfill=true +style12\font=Courier, 10, 0, 0, 0 +style12\paper=14729440 +style15=JavaDoc style C++ comment +style15\color=4157503 +style15\eolfill=false +style15\font=Courier, 10, 0, 0, 0 +style15\paper=16777215 +style16=Secondary keywords and identifiers +style16\color=0 +style16\eolfill=false +style16\font=Courier, 10, 0, 0, 0 +style16\paper=16777215 +style17=JavaDoc keyword +style17\color=3170464 +style17\eolfill=false +style17\font=Courier, 10, 0, 0, 0 +style17\paper=16777215 +style18=JavaDoc keyword error +style18\color=8405024 +style18\eolfill=false +style18\font=Courier, 10, 0, 0, 0 +style18\paper=16777215 +style19=Global classes and typedefs +style19\color=0 +style19\eolfill=false +style19\font=Courier, 10, 0, 0, 0 +style19\paper=16777215 +style2=C++ comment +style2\color=32512 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=JavaDoc style C comment +style3\color=4157503 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Number +style4\color=32639 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Keyword +style5\color=127 +style5\eolfill=false +style5\font=Courier, 10, 1, 0, 0 +style5\paper=16777215 +style6=Double-quoted string +style6\color=8323199 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=Single-quoted string +style7\color=8323199 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 +style9=Pre-processor block +style9\color=8355584 +style9\eolfill=false +style9\font=Courier, 10, 0, 0, 0 +style9\paper=16777215 +style8=IDL UUID +style8\color=0 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=16777215 + +[JavaScript] +style0=Default +style0\color=8421504 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=C comment +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style10=Operator +style10\color=0 +style10\eolfill=false +style10\font=Courier, 10, 1, 0, 0 +style10\paper=16777215 +style11=Identifier +style11\color=0 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=16777215 +style12=Unclosed string +style12\color=0 +style12\eolfill=true +style12\font=Courier, 10, 0, 0, 0 +style12\paper=16777215 +style14=Regular expression +style14\color=4161343 +style14\eolfill=true +style14\font=Courier, 10, 0, 0, 0 +style14\paper=14741759 +style15=JavaDoc style C++ comment +style15\color=4157503 +style15\eolfill=false +style15\font=Courier, 10, 0, 0, 0 +style15\paper=16777215 +style16=Secondary keywords and identifiers +style16\color=0 +style16\eolfill=false +style16\font=Courier, 10, 0, 0, 0 +style16\paper=16777215 +style17=JavaDoc keyword +style17\color=3170464 +style17\eolfill=false +style17\font=Courier, 10, 0, 0, 0 +style17\paper=16777215 +style18=JavaDoc keyword error +style18\color=8405024 +style18\eolfill=false +style18\font=Courier, 10, 0, 0, 0 +style18\paper=16777215 +style19=Global classes and typedefs +style19\color=0 +style19\eolfill=false +style19\font=Courier, 10, 0, 0, 0 +style19\paper=16777215 +style2=C++ comment +style2\color=32512 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=JavaDoc style C comment +style3\color=4157503 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Number +style4\color=32639 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Keyword +style5\color=127 +style5\eolfill=false +style5\font=Courier, 10, 1, 0, 0 +style5\paper=16777215 +style6=Double-quoted string +style6\color=8323199 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=Single-quoted string +style7\color=8323199 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 +style9=Pre-processor block +style9\color=8355584 +style9\eolfill=false +style9\font=Courier, 10, 0, 0, 0 +style9\paper=16777215 +style8=IDL UUID +style8\color=0 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=16777215 + +[Lua] +style0=Default +style0\color=0 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Comment +style1\color=32512 +style1\eolfill=true +style1\font=Courier, 10, 0, 0, 0 +style1\paper=13693168 +style10=Operator +style10\color=0 +style10\eolfill=false +style10\font=Courier, 10, 0, 0, 0 +style10\paper=16777215 +style11=Identifier +style11\color=0 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=16777215 +style12=Unclosed string +style12\color=0 +style12\eolfill=true +style12\font=Courier, 10, 0, 0, 0 +style12\paper=14729440 +style13=Basic functions +style13\color=127 +style13\eolfill=false +style13\font=Courier, 10, 0, 0, 0 +style13\paper=13696976 +style14="String, table and maths functions" +style14\color=127 +style14\eolfill=false +style14\font=Courier, 10, 0, 0, 0 +style14\paper=13684991 +style15="Coroutines, i/o and system facilities" +style15\color=127 +style15\eolfill=false +style15\font=Courier, 10, 0, 0, 0 +style15\paper=16765136 +style2=Line comment +style2\color=32512 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style4=Number +style4\color=32639 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Keyword +style5\color=127 +style5\eolfill=false +style5\font=Courier, 10, 0, 0, 0 +style5\paper=16777215 +style6=String +style6\color=8323199 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=Character +style7\color=8323199 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 +style8=Literal string +style8\color=8323199 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=14745599 +style9=Preprocessor +style9\color=8355584 +style9\eolfill=false +style9\font=Courier, 10, 0, 0, 0 +style9\paper=16777215 + +[Makefile] +style0=Default +style0\color=0 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Comment +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style2=Preprocessor +style2\color=8355584 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=Variable +style3\color=128 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Operator +style4\color=0 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Target +style5\color=10485760 +style5\eolfill=false +style5\font=Courier, 10, 0, 0, 0 +style5\paper=16777215 +style9=Error +style9\color=16776960 +style9\eolfill=true +style9\font=Courier, 10, 0, 0, 0 +style9\paper=16711680 + +[POV] +style0=Default +style0\color=16711808 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Comment +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style10="Objects, CSG and appearance" +style10\color=127 +style10\eolfill=false +style10\font=Courier, 10, 0, 0, 0 +style10\paper=16765136 +style11="Types, modifiers and items" +style11\color=127 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=16777168 +style12=Predefined identifiers +style12\color=127 +style12\eolfill=false +style12\font=Courier, 10, 1, 0, 0 +style12\paper=16777215 +style13=Predefined functions +style13\color=127 +style13\eolfill=false +style13\font=Courier, 10, 0, 0, 0 +style13\paper=13684991 +style14=User defined 1 +style14\color=127 +style14\eolfill=false +style14\font=Courier, 10, 0, 0, 0 +style14\paper=13696976 +style15=User defined 2 +style15\color=127 +style15\eolfill=false +style15\font=Courier, 10, 0, 0, 0 +style15\paper=13684944 +style16=User defined 3 +style16\color=127 +style16\eolfill=false +style16\font=Courier, 10, 0, 0, 0 +style16\paper=14737632 +style2=Comment line +style2\color=32512 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=Number +style3\color=32639 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Operator +style4\color=0 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Identifier +style5\color=0 +style5\eolfill=false +style5\font=Courier, 10, 0, 0, 0 +style5\paper=16777215 +style6=String +style6\color=8323199 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=Unclosed string +style7\color=0 +style7\eolfill=true +style7\font=Courier, 10, 1, 0, 0 +style7\paper=14729440 +style8=Directive +style8\color=8355584 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=16777215 +style9=Bad directive +style9\color=8405024 +style9\eolfill=false +style9\font=Courier, 10, 0, 1, 0 +style9\paper=16777215 + +[Perl] +style0=Default +style0\color=8421504 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Error +style1\color=16776960 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16711680 +style10=Operator +style10\color=0 +style10\eolfill=false +style10\font=Courier, 10, 1, 0, 0 +style10\paper=16777215 +style11=Identifier +style11\color=0 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=16777215 +style12=Scalar +style12\color=0 +style12\eolfill=false +style12\font=Courier, 10, 0, 0, 0 +style12\paper=16769248 +style13=Array +style13\color=0 +style13\eolfill=false +style13\font=Courier, 10, 0, 0, 0 +style13\paper=16777184 +style14=Hash +style14\color=0 +style14\eolfill=false +style14\font=Courier, 10, 0, 0, 0 +style14\paper=16769279 +style15=Symbol table +style15\color=0 +style15\eolfill=false +style15\font=Courier, 10, 0, 0, 0 +style15\paper=14737632 +style17=Regular expression +style17\color=0 +style17\eolfill=false +style17\font=Courier, 10, 0, 0, 0 +style17\paper=10551200 +style18=Substitution +style18\color=0 +style18\eolfill=false +style18\font=Courier, 10, 0, 0, 0 +style18\paper=15786112 +style2=Comment +style2\color=32512 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style20=Backticks +style20\color=16776960 +style20\eolfill=false +style20\font=Courier, 10, 0, 0, 0 +style20\paper=10518656 +style21=Data section +style21\color=6291456 +style21\eolfill=true +style21\font=Courier, 10, 0, 0, 0 +style21\paper=16773336 +style22=Here document delimiter +style22\color=0 +style22\eolfill=false +style22\font=Courier, 10, 0, 0, 0 +style22\paper=14536925 +style23=Single-quoted here document +style23\color=8323199 +style23\eolfill=true +style23\font=Courier, 10, 0, 0, 0 +style23\paper=14536925 +style24=Double-quoted here document +style24\color=8323199 +style24\eolfill=true +style24\font=Courier, 10, 1, 0, 0 +style24\paper=14536925 +style25=Backtick here document +style25\color=8323199 +style25\eolfill=true +style25\font=Courier, 10, 0, 1, 0 +style25\paper=14536925 +style26=Quoted string (q) +style26\color=8323199 +style26\eolfill=false +style26\font=Courier, 10, 0, 0, 0 +style26\paper=16777215 +style27=Quoted string (qq) +style27\color=8323199 +style27\eolfill=false +style27\font=Courier, 10, 0, 0, 0 +style27\paper=16777215 +style28=Quoted string (qx) +style28\color=16776960 +style28\eolfill=false +style28\font=Courier, 10, 0, 0, 0 +style28\paper=16777215 +style29=Quoted string (qr) +style29\color=0 +style29\eolfill=false +style29\font=Courier, 10, 0, 0, 0 +style29\paper=16777215 +style3=POD +style3\color=16384 +style3\eolfill=true +style3\font=Courier, 10, 0, 0, 0 +style3\paper=14745568 +style30=Quoted string (qw) +style30\color=0 +style30\eolfill=false +style30\font=Courier, 10, 0, 0, 0 +style30\paper=16777215 +style31=POD verbatim +style31\color=16384 +style31\eolfill=true +style31\font=Courier, 10, 0, 0, 0 +style31\paper=12648384 +style4=Number +style4\color=32639 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style40=Subroutine prototype +style40\color=0 +style40\eolfill=false +style40\font=Courier, 10, 0, 1, 0 +style40\paper=16777215 +style41=Format identifier +style41\color=12583104 +style41\eolfill=false +style41\font=Courier, 10, 1, 0, 0 +style41\paper=16777215 +style42=Format body +style42\color=12583104 +style42\eolfill=true +style42\font=Courier, 10, 0, 0, 0 +style42\paper=16773375 +style5=Keyword +style5\color=127 +style5\eolfill=false +style5\font=Courier, 10, 1, 0, 0 +style5\paper=16777215 +style6=Double-quoted string +style6\color=8323199 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=Single-quoted string +style7\color=8323199 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 + +[Properties] +style0=Default +style0\color=0 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Comment +style1\color=32639 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style2=Section +style2\color=8323199 +style2\eolfill=true +style2\font=Courier, 10, 0, 0, 0 +style2\paper=14741744 +style3=Assignment +style3\color=11558912 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Default value +style4\color=8355584 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 + +[Python] +style0=Default +style0\color=8421504 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Comment +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style10=Operator +style10\color=0 +style10\eolfill=false +style10\font=Courier, 10, 1, 0, 0 +style10\paper=16777215 +style11=Identifier +style11\color=0 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=16777215 +style12=Comment block +style12\color=8355711 +style12\eolfill=false +style12\font=Courier, 10, 0, 0, 0 +style12\paper=16777215 +style13=Unclosed string +style13\color=0 +style13\eolfill=true +style13\font=Courier, 10, 0, 0, 0 +style13\paper=14729440 +style14=Highlighted identifier +style14\color=4223120 +style14\eolfill=false +style14\font=Courier, 10, 0, 0, 0 +style14\paper=16777215 +style15=Decorator +style15\color=8409088 +style15\eolfill=false +style15\font=Courier, 10, 0, 0, 0 +style15\paper=16777215 +style2=Number +style2\color=32639 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=Double-quoted string +style3\color=8323199 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Single-quoted string +style4\color=8323199 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Keyword +style5\color=127 +style5\eolfill=false +style5\font=Courier, 10, 1, 0, 0 +style5\paper=16777215 +style6=Triple single-quoted string +style6\color=8323072 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=Triple double-quoted string +style7\color=8323072 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 +style8=Class name +style8\color=255 +style8\eolfill=false +style8\font=Courier, 10, 1, 0, 0 +style8\paper=16777215 +style9=Function or method name +style9\color=32639 +style9\eolfill=false +style9\font=Courier, 10, 1, 0, 0 +style9\paper=16777215 + +[Ruby] +style0=Default +style0\color=8421504 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Error +style1\color=0 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16711680 +style10=Operator +style10\color=0 +style10\eolfill=false +style10\font=Courier, 10, 1, 0, 0 +style10\paper=16777215 +style11=Identifier +style11\color=0 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=16777215 +style12=Regular expression +style12\color=0 +style12\eolfill=false +style12\font=Courier, 10, 0, 0, 0 +style12\paper=10551200 +style13=Global +style13\color=8388736 +style13\eolfill=false +style13\font=Courier, 10, 0, 0, 0 +style13\paper=16777215 +style14=Symbol +style14\color=12623920 +style14\eolfill=false +style14\font=Courier, 10, 0, 0, 0 +style14\paper=16777215 +style15=Module name +style15\color=10485920 +style15\eolfill=false +style15\font=Courier, 10, 1, 0, 0 +style15\paper=16777215 +style16=Instance variable +style16\color=11534464 +style16\eolfill=false +style16\font=Courier, 10, 0, 0, 0 +style16\paper=16777215 +style17=Class variable +style17\color=8388784 +style17\eolfill=false +style17\font=Courier, 10, 0, 0, 0 +style17\paper=16777215 +style18=Backticks +style18\color=16776960 +style18\eolfill=false +style18\font=Courier, 10, 0, 0, 0 +style18\paper=10518656 +style19=Data section +style19\color=6291456 +style19\eolfill=true +style19\font=Courier, 10, 0, 0, 0 +style19\paper=16773336 +style2=Comment +style2\color=32512 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style20=Here document delimiter +style20\color=0 +style20\eolfill=false +style20\font=Courier, 10, 0, 0, 0 +style20\paper=14536925 +style21=Here document +style21\color=8323199 +style21\eolfill=true +style21\font=Courier, 10, 0, 0, 0 +style21\paper=14536925 +style24=%q string +style24\color=8323199 +style24\eolfill=false +style24\font=Courier, 10, 0, 0, 0 +style24\paper=16777215 +style25=%Q string +style25\color=8323199 +style25\eolfill=false +style25\font=Courier, 10, 0, 0, 0 +style25\paper=16777215 +style26=%x string +style26\color=16776960 +style26\eolfill=false +style26\font=Courier, 10, 0, 0, 0 +style26\paper=10518656 +style27=%r string +style27\color=0 +style27\eolfill=false +style27\font=Courier, 10, 0, 0, 0 +style27\paper=10551200 +style28=%w string +style28\color=0 +style28\eolfill=false +style28\font=Courier, 10, 0, 0, 0 +style28\paper=16777184 +style29=Demoted keyword +style29\color=127 +style29\eolfill=false +style29\font=Courier, 10, 1, 0, 0 +style29\paper=16777215 +style3=POD +style3\color=16384 +style3\eolfill=true +style3\font=Courier, 10, 0, 0, 0 +style3\paper=12648384 +style30=stdin +style30\color=0 +style30\eolfill=false +style30\font=Courier, 10, 0, 0, 0 +style30\paper=16744576 +style31=stdout +style31\color=0 +style31\eolfill=false +style31\font=Courier, 10, 0, 0, 0 +style31\paper=16744576 +style4=Number +style4\color=32639 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style40=stderr +style40\color=0 +style40\eolfill=false +style40\font=Courier, 10, 0, 0, 0 +style40\paper=16744576 +style5=Keyword +style5\color=127 +style5\eolfill=false +style5\font=Courier, 10, 1, 0, 0 +style5\paper=16777215 +style6=Double-quoted string +style6\color=8323199 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=Single-quoted string +style7\color=8323199 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 +style8=Class name +style8\color=255 +style8\eolfill=false +style8\font=Courier, 10, 1, 0, 0 +style8\paper=16777215 +style9=Function or method name +style9\color=32639 +style9\eolfill=false +style9\font=Courier, 10, 1, 0, 0 +style9\paper=16777215 + +[SQL] +style0=Default +style0\color=8421504 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Comment +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style10=Operator +style10\color=0 +style10\eolfill=false +style10\font=Courier, 10, 1, 0, 0 +style10\paper=16777215 +style11=Identifier +style11\color=0 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=16777215 +style13=SQL*Plus comment +style13\color=32512 +style13\eolfill=false +style13\font=Courier, 10, 0, 0, 0 +style13\paper=16777215 +style15=# comment line +style15\color=32512 +style15\eolfill=false +style15\font=Courier, 10, 0, 0, 0 +style15\paper=16777215 +style17=JavaDoc keyword +style17\color=3170464 +style17\eolfill=false +style17\font=Courier, 10, 0, 0, 0 +style17\paper=16777215 +style18=JavaDoc keyword error +style18\color=8405024 +style18\eolfill=false +style18\font=Courier, 10, 0, 0, 0 +style18\paper=16777215 +style19=User defined 1 +style19\color=4915330 +style19\eolfill=false +style19\font=Courier, 10, 0, 0, 0 +style19\paper=16777215 +style2=Comment line +style2\color=32512 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style20=User defined 2 +style20\color=11534400 +style20\eolfill=false +style20\font=Courier, 10, 0, 0, 0 +style20\paper=16777215 +style21=User defined 3 +style21\color=9109504 +style21\eolfill=false +style21\font=Courier, 10, 0, 0, 0 +style21\paper=16777215 +style22=User defined 4 +style22\color=8388736 +style22\eolfill=false +style22\font=Courier, 10, 0, 0, 0 +style22\paper=16777215 +style3=JavaDoc style comment +style3\color=8355711 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Number +style4\color=32639 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Keyword +style5\color=127 +style5\eolfill=false +style5\font=Courier, 10, 1, 0, 0 +style5\paper=16777215 +style6=Double-quoted string +style6\color=8323199 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=Single-quoted string +style7\color=8323199 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 +style8=SQL*Plus keyword +style8\color=8355584 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=16777215 +style9=SQL*Plus prompt +style9\color=32512 +style9\eolfill=true +style9\font=Courier, 10, 0, 0, 0 +style9\paper=14745568 + +[TeX] +style0=Default +style0\color=4144959 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Special +style1\color=32639 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style2=Group +style2\color=8323072 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=Symbol +style3\color=8355584 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Command +style4\color=32512 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Text +style5\color=0 +style5\eolfill=false +style5\font=Courier, 10, 0, 0, 0 +style5\paper=16777215 + +[XML] +style0=HTML default +style0\color=0 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Tag +style1\color=128 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style2=Unknown tag +style2\color=128 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=Attribute +style3\color=32896 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Unknown attribute +style4\color=32896 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=HTML number +style5\color=32639 +style5\eolfill=false +style5\font=Courier, 10, 0, 0, 0 +style5\paper=16777215 +style6=HTML double-quoted string +style6\color=8323199 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=HTML single-quoted string +style7\color=8323199 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 +style8=Other text in a tag +style8\color=8388736 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=16777215 +style9=HTML comment +style9\color=8421376 +style9\eolfill=false +style9\font=Courier, 10, 0, 0, 0 +style9\paper=16777215 +style10=Entity +style10\color=8388736 +style10\eolfill=false +style10\font=Courier, 10, 0, 0, 0 +style10\paper=16777215 +style11=End of a tag +style11\color=128 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=16777215 +style12=Start of an XML fragment +style12\color=8388736 +style12\eolfill=false +style12\font=Courier, 10, 1, 0, 0 +style12\paper=16777215 +style13=End of an XML fragment +style13\color=8388736 +style13\eolfill=false +style13\font=Courier, 10, 1, 0, 0 +style13\paper=16777215 +style14=Script tag +style14\color=0 +style14\eolfill=false +style14\font=Courier, 10, 0, 0, 0 +style14\paper=16777215 +style15=Start of an ASP fragment with @ +style15\color=0 +style15\eolfill=false +style15\font=Courier, 10, 0, 0, 0 +style15\paper=16777215 +style16=Start of an ASP fragment +style16\color=0 +style16\eolfill=false +style16\font=Courier, 10, 0, 0, 0 +style16\paper=16777215 +style17=CDATA +style17\color=8388608 +style17\eolfill=true +style17\font=Courier, 10, 0, 0, 0 +style17\paper=16773360 +style18=Start of a PHP fragment +style18\color=8388608 +style18\eolfill=false +style18\font=Courier, 10, 0, 0, 0 +style18\paper=16777215 +style19=Unquoted HTML value +style19\color=6324320 +style19\eolfill=false +style19\font=Courier, 10, 0, 0, 0 +style19\paper=16777215 +style20=ASP X-Code comment +style20\color=0 +style20\eolfill=false +style20\font=Courier, 10, 0, 0, 0 +style20\paper=16777215 +style21=SGML default +style21\color=128 +style21\eolfill=false +style21\font=Courier, 10, 0, 0, 0 +style21\paper=15724543 +style22=SGML command +style22\color=128 +style22\eolfill=false +style22\font=Courier, 10, 1, 0, 0 +style22\paper=15724543 +style23=First parameter of an SGML command +style23\color=26112 +style23\eolfill=false +style23\font=Courier, 10, 0, 0, 0 +style23\paper=15724543 +style24=SGML double-quoted string +style24\color=8388608 +style24\eolfill=false +style24\font=Courier, 10, 0, 0, 0 +style24\paper=15724543 +style25=SGML single-quoted string +style25\color=10040064 +style25\eolfill=false +style25\font=Courier, 10, 0, 0, 0 +style25\paper=15724543 +style26=SGML error +style26\color=8388608 +style26\eolfill=false +style26\font=Courier, 10, 0, 0, 0 +style26\paper=16737894 +style27=SGML special entity +style27\color=3368703 +style27\eolfill=false +style27\font=Courier, 10, 0, 0, 0 +style27\paper=15724543 +style29=SGML comment +style29\color=8421376 +style29\eolfill=false +style29\font=Courier, 10, 0, 0, 0 +style29\paper=15724543 +style30=First parameter comment of an SGML command +style30\color=0 +style30\eolfill=false +style30\font=Courier, 10, 0, 0, 0 +style30\paper=16777215 +style31=SGML block default +style31\color=102 +style31\eolfill=false +style31\font=Courier, 10, 0, 0, 0 +style31\paper=13421792 +style40=Start of a JavaScript fragment +style40\color=0 +style40\eolfill=false +style40\font=Courier, 10, 0, 0, 0 +style40\paper=16777215 +style41=JavaScript default +style41\color=0 +style41\eolfill=false +style41\font=Courier, 10, 0, 0, 0 +style41\paper=16777215 +style42=JavaScript comment +style42\color=0 +style42\eolfill=false +style42\font=Courier, 10, 0, 0, 0 +style42\paper=16777215 +style43=JavaScript line comment +style43\color=0 +style43\eolfill=false +style43\font=Courier, 10, 0, 0, 0 +style43\paper=16777215 +style44=JavaDoc style JavaScript comment +style44\color=0 +style44\eolfill=false +style44\font=Courier, 10, 0, 0, 0 +style44\paper=16777215 +style45=JavaScript number +style45\color=0 +style45\eolfill=false +style45\font=Courier, 10, 0, 0, 0 +style45\paper=16777215 +style46=JavaScript word +style46\color=0 +style46\eolfill=false +style46\font=Courier, 10, 0, 0, 0 +style46\paper=16777215 +style47=JavaScript keyword +style47\color=0 +style47\eolfill=false +style47\font=Courier, 10, 0, 0, 0 +style47\paper=16777215 +style48=JavaScript double-quoted string +style48\color=0 +style48\eolfill=false +style48\font=Courier, 10, 0, 0, 0 +style48\paper=16777215 +style49=JavaScript single-quoted string +style49\color=0 +style49\eolfill=false +style49\font=Courier, 10, 0, 0, 0 +style49\paper=16777215 +style50=JavaScript symbol +style50\color=0 +style50\eolfill=false +style50\font=Courier, 10, 0, 0, 0 +style50\paper=16777215 +style51=JavaScript unclosed string +style51\color=0 +style51\eolfill=false +style51\font=Courier, 10, 0, 0, 0 +style51\paper=16777215 +style52=JavaScript regular expression +style52\color=0 +style52\eolfill=false +style52\font=Courier, 10, 0, 0, 0 +style52\paper=16777215 +style55=Start of an ASP JavaScript fragment +style55\color=0 +style55\eolfill=false +style55\font=Courier, 10, 0, 0, 0 +style55\paper=16777215 +style56=ASP JavaScript default +style56\color=0 +style56\eolfill=false +style56\font=Courier, 10, 0, 0, 0 +style56\paper=16777215 +style57=ASP JavaScript comment +style57\color=0 +style57\eolfill=false +style57\font=Courier, 10, 0, 0, 0 +style57\paper=16777215 +style58=ASP JavaScript line comment +style58\color=0 +style58\eolfill=false +style58\font=Courier, 10, 0, 0, 0 +style58\paper=16777215 +style59=JavaDoc style ASP JavaScript comment +style59\color=0 +style59\eolfill=false +style59\font=Courier, 10, 0, 0, 0 +style59\paper=16777215 +style60=ASP JavaScript number +style60\color=0 +style60\eolfill=false +style60\font=Courier, 10, 0, 0, 0 +style60\paper=16777215 +style61=ASP JavaScript word +style61\color=0 +style61\eolfill=false +style61\font=Courier, 10, 0, 0, 0 +style61\paper=16777215 +style62=ASP JavaScript keyword +style62\color=0 +style62\eolfill=false +style62\font=Courier, 10, 0, 0, 0 +style62\paper=16777215 +style63=ASP JavaScript double-quoted string +style63\color=0 +style63\eolfill=false +style63\font=Courier, 10, 0, 0, 0 +style63\paper=16777215 +style64=ASP JavaScript single-quoted string +style64\color=0 +style64\eolfill=false +style64\font=Courier, 10, 0, 0, 0 +style64\paper=16777215 +style65=ASP JavaScript symbol +style65\color=0 +style65\eolfill=false +style65\font=Courier, 10, 0, 0, 0 +style65\paper=16777215 +style66=ASP JavaScript unclosed string +style66\color=0 +style66\eolfill=false +style66\font=Courier, 10, 0, 0, 0 +style66\paper=16777215 +style67=ASP JavaScript regular expression +style67\color=0 +style67\eolfill=false +style67\font=Courier, 10, 0, 0, 0 +style67\paper=16777215 +style70=Start of a VBScript fragment +style70\color=0 +style70\eolfill=false +style70\font=Courier, 10, 0, 0, 0 +style70\paper=16777215 +style71=VBScript default +style71\color=0 +style71\eolfill=false +style71\font=Courier, 10, 0, 0, 0 +style71\paper=16777215 +style72=VBScript comment +style72\color=0 +style72\eolfill=false +style72\font=Courier, 10, 0, 0, 0 +style72\paper=16777215 +style73=VBScript number +style73\color=0 +style73\eolfill=false +style73\font=Courier, 10, 0, 0, 0 +style73\paper=16777215 +style74=VBScript keyword +style74\color=0 +style74\eolfill=false +style74\font=Courier, 10, 0, 0, 0 +style74\paper=16777215 +style75=VBScript string +style75\color=0 +style75\eolfill=false +style75\font=Courier, 10, 0, 0, 0 +style75\paper=16777215 +style76=VBScript identifier +style76\color=0 +style76\eolfill=false +style76\font=Courier, 10, 0, 0, 0 +style76\paper=16777215 +style77=VBScript unclosed string +style77\color=0 +style77\eolfill=false +style77\font=Courier, 10, 0, 0, 0 +style77\paper=16777215 +style80=Start of an ASP VBScript fragment +style80\color=0 +style80\eolfill=false +style80\font=Courier, 10, 0, 0, 0 +style80\paper=16777215 +style81=ASP VBScript default +style81\color=0 +style81\eolfill=false +style81\font=Courier, 10, 0, 0, 0 +style81\paper=16777215 +style82=ASP VBScript comment +style82\color=0 +style82\eolfill=false +style82\font=Courier, 10, 0, 0, 0 +style82\paper=16777215 +style83=ASP VBScript number +style83\color=0 +style83\eolfill=false +style83\font=Courier, 10, 0, 0, 0 +style83\paper=16777215 +style84=ASP VBScript keyword +style84\color=0 +style84\eolfill=false +style84\font=Courier, 10, 0, 0, 0 +style84\paper=16777215 +style85=ASP VBScript string +style85\color=0 +style85\eolfill=false +style85\font=Courier, 10, 0, 0, 0 +style85\paper=16777215 +style86=ASP VBScript identifier +style86\color=0 +style86\eolfill=false +style86\font=Courier, 10, 0, 0, 0 +style86\paper=16777215 +style87=ASP VBScript unclosed string +style87\color=0 +style87\eolfill=false +style87\font=Courier, 10, 0, 0, 0 +style87\paper=16777215 +style90=Start of a Python fragment +style90\color=0 +style90\eolfill=false +style90\font=Courier, 10, 0, 0, 0 +style90\paper=16777215 +style91=Python default +style91\color=0 +style91\eolfill=false +style91\font=Courier, 10, 0, 0, 0 +style91\paper=16777215 +style92=Python comment +style92\color=0 +style92\eolfill=false +style92\font=Courier, 10, 0, 0, 0 +style92\paper=16777215 +style93=Python number +style93\color=0 +style93\eolfill=false +style93\font=Courier, 10, 0, 0, 0 +style93\paper=16777215 +style94=Python double-quoted string +style94\color=0 +style94\eolfill=false +style94\font=Courier, 10, 0, 0, 0 +style94\paper=16777215 +style95=Python single-quoted string +style95\color=0 +style95\eolfill=false +style95\font=Courier, 10, 0, 0, 0 +style95\paper=16777215 +style96=Python keyword +style96\color=0 +style96\eolfill=false +style96\font=Courier, 10, 0, 0, 0 +style96\paper=16777215 +style97=Python triple single-quoted string +style97\color=0 +style97\eolfill=false +style97\font=Courier, 10, 0, 0, 0 +style97\paper=16777215 +style98=Python triple double-quoted string +style98\color=0 +style98\eolfill=false +style98\font=Courier, 10, 0, 0, 0 +style98\paper=16777215 +style99=Python class name +style99\color=0 +style99\eolfill=false +style99\font=Courier, 10, 0, 0, 0 +style99\paper=16777215 +style100=Python function or method name +style100\color=0 +style100\eolfill=false +style100\font=Courier, 10, 0, 0, 0 +style100\paper=16777215 +style101=Python operator +style101\color=0 +style101\eolfill=false +style101\font=Courier, 10, 0, 0, 0 +style101\paper=16777215 +style102=Python identifier +style102\color=0 +style102\eolfill=false +style102\font=Courier, 10, 0, 0, 0 +style102\paper=16777215 +style105=Start of an ASP Python fragment +style105\color=0 +style105\eolfill=false +style105\font=Courier, 10, 0, 0, 0 +style105\paper=16777215 +style106=ASP Python default +style106\color=0 +style106\eolfill=false +style106\font=Courier, 10, 0, 0, 0 +style106\paper=16777215 +style107=ASP Python comment +style107\color=0 +style107\eolfill=false +style107\font=Courier, 10, 0, 0, 0 +style107\paper=16777215 +style108=ASP Python number +style108\color=0 +style108\eolfill=false +style108\font=Courier, 10, 0, 0, 0 +style108\paper=16777215 +style109=ASP Python double-quoted string +style109\color=0 +style109\eolfill=false +style109\font=Courier, 10, 0, 0, 0 +style109\paper=16777215 +style110=ASP Python single-quoted string +style110\color=0 +style110\eolfill=false +style110\font=Courier, 10, 0, 0, 0 +style110\paper=16777215 +style111=ASP Python keyword +style111\color=0 +style111\eolfill=false +style111\font=Courier, 10, 0, 0, 0 +style111\paper=16777215 +style112=ASP Python triple single-quoted string +style112\color=0 +style112\eolfill=false +style112\font=Courier, 10, 0, 0, 0 +style112\paper=16777215 +style113=ASP Python triple double-quoted string +style113\color=0 +style113\eolfill=false +style113\font=Courier, 10, 0, 0, 0 +style113\paper=16777215 +style114=ASP Python class name +style114\color=0 +style114\eolfill=false +style114\font=Courier, 10, 0, 0, 0 +style114\paper=16777215 +style115=ASP Python function or method name +style115\color=0 +style115\eolfill=false +style115\font=Courier, 10, 0, 0, 0 +style115\paper=16777215 +style116=ASP Python operator +style116\color=0 +style116\eolfill=false +style116\font=Courier, 10, 0, 0, 0 +style116\paper=16777215 +style117=ASP Python identifier +style117\color=0 +style117\eolfill=false +style117\font=Courier, 10, 0, 0, 0 +style117\paper=16777215 +style118=PHP default +style118\color=0 +style118\eolfill=false +style118\font=Courier, 10, 0, 0, 0 +style118\paper=16777215 +style119=PHP double-quoted string +style119\color=0 +style119\eolfill=false +style119\font=Courier, 10, 0, 0, 0 +style119\paper=16777215 +style120=PHP single-quoted string +style120\color=0 +style120\eolfill=false +style120\font=Courier, 10, 0, 0, 0 +style120\paper=16777215 +style121=PHP keyword +style121\color=0 +style121\eolfill=false +style121\font=Courier, 10, 0, 0, 0 +style121\paper=16777215 +style122=PHP number +style122\color=0 +style122\eolfill=false +style122\font=Courier, 10, 0, 0, 0 +style122\paper=16777215 +style123=PHP variable +style123\color=0 +style123\eolfill=false +style123\font=Courier, 10, 0, 0, 0 +style123\paper=16777215 +style124=PHP comment +style124\color=0 +style124\eolfill=false +style124\font=Courier, 10, 0, 0, 0 +style124\paper=16777215 +style125=PHP line comment +style125\color=0 +style125\eolfill=false +style125\font=Courier, 10, 0, 0, 0 +style125\paper=16777215 +style126=PHP double-quoted variable +style126\color=0 +style126\eolfill=false +style126\font=Courier, 10, 0, 0, 0 +style126\paper=16777215 +style127=PHP operator +style127\color=0 +style127\eolfill=false +style127\font=Courier, 10, 0, 0, 0 +style127\paper=16777215 + +[CMake] +style0=Default +style0\color=0 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Comment +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style2=String +style2\color=8323199 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=15658734 +style3=Left quoted string +style3\color=8323199 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=15658734 +style4=Right quoted string +style4\color=8323199 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=15658734 +style5=Function +style5\color=127 +style5\eolfill=false +style5\font=Courier, 10, 1, 0, 0 +style5\paper=16777215 +style6=Variable +style6\color=8388608 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=Label +style7\color=13382400 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 +style8=User defined +style8\color=0 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=16777215 +style9=WHILE block +style9\color=127 +style9\eolfill=false +style9\font=Courier, 10, 1, 0, 0 +style9\paper=16777215 +style10=FOREACH block +style10\color=127 +style10\eolfill=false +style10\font=Courier, 10, 1, 0, 0 +style10\paper=16777215 +style11=IF block +style11\color=127 +style11\eolfill=false +style11\font=Courier, 10, 1, 0, 0 +style11\paper=16777215 +style12=MACRO block +style12\color=127 +style12\eolfill=false +style12\font=Courier, 10, 1, 0, 0 +style12\paper=16777215 +style13=Variable within a string +style13\color=13382400 +style13\eolfill=false +style13\font=Courier, 10, 0, 0, 0 +style13\paper=15658734 +style14=Number +style14\color=32639 +style14\eolfill=false +style14\font=Courier, 10, 0, 0, 0 +style14\paper=16777215 + +[Fortran] +style0=Default +style0\color=8421504 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Comment +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style2=Number +style2\color=32639 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=Single-quoted string +style3\color=8323199 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Double-quoted string +style4\color=8323199 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Unclosed string +style5\color=0 +style5\eolfill=true +style5\font=Courier, 10, 0, 0, 0 +style5\paper=14729440 +style6=Operator +style6\color=0 +style6\eolfill=false +style6\font=Courier, 10, 1, 0, 0 +style6\paper=16777215 +style7=Identifier +style7\color=0 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 +style8=Keyword +style8\color=127 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=16777215 +style9=Intrinsic function +style9\color=11534400 +style9\eolfill=false +style9\font=Courier, 10, 0, 0, 0 +style9\paper=16777215 +style10=Extended function +style10\color=11550848 +style10\eolfill=false +style10\font=Courier, 10, 0, 0, 0 +style10\paper=16777215 +style11=Pre-processor block +style11\color=8355584 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=16777215 +style12=Dotted operator +style12\color=0 +style12\eolfill=false +style12\font=Courier, 10, 1, 0, 0 +style12\paper=16777215 +style13=Label +style13\color=14729440 +style13\eolfill=false +style13\font=Courier, 10, 0, 0, 0 +style13\paper=16777215 +style14=Continuation +style14\color=0 +style14\eolfill=false +style14\font=Courier, 10, 0, 0, 0 +style14\paper=15786112 + +[Fortran77] +style0=Default +style0\color=8421504 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Comment +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style2=Number +style2\color=32639 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=Single-quoted string +style3\color=8323199 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Double-quoted string +style4\color=8323199 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Unclosed string +style5\color=0 +style5\eolfill=true +style5\font=Courier, 10, 0, 0, 0 +style5\paper=14729440 +style6=Operator +style6\color=0 +style6\eolfill=false +style6\font=Courier, 10, 1, 0, 0 +style6\paper=16777215 +style7=Identifier +style7\color=0 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 +style8=Keyword +style8\color=127 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=16777215 +style9=Intrinsic function +style9\color=11534400 +style9\eolfill=false +style9\font=Courier, 10, 0, 0, 0 +style9\paper=16777215 +style10=Extended function +style10\color=11550848 +style10\eolfill=false +style10\font=Courier, 10, 0, 0, 0 +style10\paper=16777215 +style11=Pre-processor block +style11\color=8355584 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=16777215 +style12=Dotted operator +style12\color=0 +style12\eolfill=false +style12\font=Courier, 10, 1, 0, 0 +style12\paper=16777215 +style13=Label +style13\color=14729440 +style13\eolfill=false +style13\font=Courier, 10, 0, 0, 0 +style13\paper=16777215 +style14=Continuation +style14\color=0 +style14\eolfill=false +style14\font=Courier, 10, 0, 0, 0 +style14\paper=15786112 + +[Pascal] +style0=Default +style0\color=0 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Identifier +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style2='{ ... }' style comment +style2\color=32512 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3='(* ... *)' style comment +style3\color=8355711 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Line comment +style4\color=32639 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5='{$ ... }' style pre-processor block +style5\color=127 +style5\eolfill=false +style5\font=Courier, 10, 1, 0, 0 +style5\paper=16777215 +style7=Number +style7\color=8323199 +style7\eolfill=false +style7\font=Courier, 10, 0, 1, 0 +style7\paper=16777215 +style9=Keyword +style9\color=8355584 +style9\eolfill=false +style9\font=Courier, 10, 0, 0, 0 +style9\paper=16777215 +style10=Single-quoted string +style10\color=0 +style10\eolfill=false +style10\font=Courier, 10, 0, 0, 0 +style10\paper=16777215 +style11=Unclosed string +style11\color=0 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=16777215 +style14=Inline asm +style14\color=32896 +style14\eolfill=false +style14\font=Courier, 10, 0, 0, 0 +style14\paper=16777215 +style6='(*$ ... *)' style pre-processor block +style6\color=8355584 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style8=Hexadecimal number +style8\color=32639 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=16777215 +style12=Character +style12\color=8323199 +style12\eolfill=false +style12\font=Courier, 10, 0, 0, 0 +style12\paper=16777215 +style13=Operator +style13\color=0 +style13\eolfill=false +style13\font=Courier, 10, 1, 0, 0 +style13\paper=16777215 + +[PostScript] +style0=Default +style0\color=0 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Comment +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style2=DSC comment +style2\color=4157503 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=DSC comment value +style3\color=3170464 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Number +style4\color=32639 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Name +style5\color=0 +style5\eolfill=false +style5\font=Courier, 10, 0, 0, 0 +style5\paper=16777215 +style6=Keyword +style6\color=127 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=Literal +style7\color=8355584 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 +style8=Immediately evaluated literal +style8\color=8355584 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=16777215 +style9=Array parenthesis +style9\color=127 +style9\eolfill=false +style9\font=Courier, 10, 0, 0, 0 +style9\paper=16777215 +style10=Dictionary parenthesis +style10\color=3170464 +style10\eolfill=false +style10\font=Courier, 10, 0, 0, 0 +style10\paper=16777215 +style11=Procedure parenthesis +style11\color=0 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=16777215 +style12=Text +style12\color=8323199 +style12\eolfill=false +style12\font=Courier, 10, 0, 0, 0 +style12\paper=16777215 +style13=Hexadecimal string +style13\color=4161343 +style13\eolfill=false +style13\font=Courier, 10, 0, 0, 0 +style13\paper=16777215 +style14=Base85 string +style14\color=8323199 +style14\eolfill=false +style14\font=Courier, 10, 0, 0, 0 +style14\paper=16777215 +style15=Bad string character +style15\color=16776960 +style15\eolfill=false +style15\font=Courier, 10, 0, 0, 0 +style15\paper=16711680 + +[VHDL] +style0=Default +style0\color=8388736 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Comment +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style2=Comment line +style2\color=4161343 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=Number +style3\color=32639 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=String +style4\color=8323199 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Operator +style5\color=0 +style5\eolfill=false +style5\font=Courier, 10, 0, 0, 0 +style5\paper=16777215 +style6=Identifier +style6\color=0 +style6\eolfill=false +style6\font=Courier, 10, 0, 0, 0 +style6\paper=16777215 +style7=Unclosed string +style7\color=0 +style7\eolfill=true +style7\font=Courier, 10, 0, 0, 0 +style7\paper=14729440 +style8=Keyword +style8\color=127 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=16777215 +style9=Standard operator +style9\color=32639 +style9\eolfill=false +style9\font=Courier, 10, 0, 0, 0 +style9\paper=16777215 +style10=Attribute +style10\color=8405024 +style10\eolfill=false +style10\font=Courier, 10, 0, 0, 0 +style10\paper=16777215 +style11=Standard function +style11\color=8421408 +style11\eolfill=false +style11\font=Courier, 10, 0, 0, 0 +style11\paper=16777215 +style12=Standard package +style12\color=2129952 +style12\eolfill=false +style12\font=Courier, 10, 0, 0, 0 +style12\paper=16777215 +style13=Standard type +style13\color=2130048 +style13\eolfill=false +style13\font=Courier, 10, 0, 0, 0 +style13\paper=16777215 +style14=User defined +style14\color=8405024 +style14\eolfill=false +style14\font=Courier, 10, 0, 0, 0 +style14\paper=16777215 + +[YAML] +style0=Default +style0\color=0 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Comment +style1\color=34816 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=16777215 +style2=Identifier +style2\color=136 +style2\eolfill=false +style2\font=Courier, 10, 1, 0, 0 +style2\paper=16777215 +style3=Keyword +style3\color=8913032 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Number +style4\color=8912896 +style4\eolfill=false +style4\font=Courier, 10, 0, 0, 0 +style4\paper=16777215 +style5=Reference +style5\color=34952 +style5\eolfill=false +style5\font=Courier, 10, 0, 0, 0 +style5\paper=16777215 +style6=Document delimiter +style6\color=16777215 +style6\eolfill=true +style6\font=Courier, 10, 1, 0, 0 +style6\paper=136 +style7=Text block marker +style7\color=3355494 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 +style8=Syntax error marker +style8\color=16777215 +style8\eolfill=true +style8\font=Courier, 10, 1, 1, 0 +style8\paper=16711680 +style9=Operator +style9\color=0 +style9\eolfill=false +style9\font=Courier, 10, 0, 0, 0 +style9\paper=16777215 + +[TCL] +style0=Default +style0\color=8421504 +style0\eolfill=false +style0\font=Courier, 10, 0, 0, 0 +style0\paper=16777215 +style1=Comment +style1\color=32512 +style1\eolfill=false +style1\font=Courier, 10, 0, 0, 0 +style1\paper=15794144 +style2=Comment line +style2\color=32512 +style2\eolfill=false +style2\font=Courier, 10, 0, 0, 0 +style2\paper=16777215 +style3=Number +style3\color=32639 +style3\eolfill=false +style3\font=Courier, 10, 0, 0, 0 +style3\paper=16777215 +style4=Quoted keyword +style4\color=8323199 +style4\eolfill=false +style4\font=Courier, 10, 1, 0, 0 +style4\paper=16773360 +style5=Quoted string +style5\color=8323199 +style5\eolfill=true +style5\font=Courier, 10, 0, 0, 0 +style5\paper=16773360 +style6=Operator +style6\color=0 +style6\eolfill=false +style6\font=Courier, 10, 1, 0, 0 +style6\paper=16777215 +style7=Identifier +style7\color=127 +style7\eolfill=false +style7\font=Courier, 10, 0, 0, 0 +style7\paper=16777215 +style8=Substitution +style8\color=8355584 +style8\eolfill=false +style8\font=Courier, 10, 0, 0, 0 +style8\paper=15728624 +style9=Brace substitution +style9\color=8355584 +style9\eolfill=false +style9\font=Courier, 10, 0, 0, 0 +style9\paper=16777215 +style10=Modifier +style10\color=8323199 +style10\eolfill=false +style10\font=Courier, 10, 0, 0, 0 +style10\paper=16777215 +style11=Expand keyword +style11\color=127 +style11\eolfill=false +style11\font=Courier, 10, 1, 0, 0 +style11\paper=16777088 +style12=TCL keyword +style12\color=127 +style12\eolfill=false +style12\font=Courier, 10, 1, 0, 0 +style12\paper=16777215 +style13=Tk keyword +style13\color=127 +style13\eolfill=false +style13\font=Courier, 10, 1, 0, 0 +style13\paper=14745584 +style14=iTCL keyword +style14\color=127 +style14\eolfill=false +style14\font=Courier, 10, 1, 0, 0 +style14\paper=16773360 +style15=Tk command +style15\color=127 +style15\eolfill=false +style15\font=Courier, 10, 1, 0, 0 +style15\paper=16765136 +style16=User defined 1 +style16\color=127 +style16\eolfill=false +style16\font=Courier, 10, 0, 0, 0 +style16\paper=16777215 +style17=User defined 2 +style17\color=127 +style17\eolfill=false +style17\font=Courier, 10, 0, 0, 0 +style17\paper=16777215 +style18=User defined 3 +style18\color=127 +style18\eolfill=false +style18\font=Courier, 10, 0, 0, 0 +style18\paper=16777215 +style19=User defined 4 +style19\color=127 +style19\eolfill=false +style19\font=Courier, 10, 0, 0, 0 +style19\paper=16777215 +style20=Comment box +style20\color=32512 +style20\eolfill=true +style20\font=Courier, 10, 0, 0, 0 +style20\paper=15794160 +style21=Comment block +style21\color=0 +style21\eolfill=false +style21\font=Courier, 10, 0, 0, 0 +style21\paper=15794160 diff --git a/indenters/example.cbl b/indenters/example.cbl index eb5b1aa..8b12b04 100755 --- a/indenters/example.cbl +++ b/indenters/example.cbl @@ -1,59 +1,59 @@ -000000* An example illustrating the use of a programmer defined paragraphs
- * and perform-thru
- identification division.
- program-id. level88.
- author. kik.
- environment division.
- configuration section.
- special-names.
- console is crt
- decimal-point is comma.
- data division.
- working-storage section.
- 77 transaction-kode pic 99.
- 88 valid-kode value 4, 8 thru 15.
- 88 create value 10.
- 88 destroy value 15.
-
- procedure division.
- main section.
- *
- * Some code leading to "transacion-kode" getting a value
- *
-
- move 10 to transaction-kode.
-
-
- *
- * Testing the conditions
- *
-
- if valid-kode then
- if create then
- perform p-create thru p-create-end
- else
- if destroy then
- perform p-destroy thru p-destroy-end
- else
- perform ordinary-transaction
- thru ordinary-transaction-end.
-
- *
- p-create.
- * some creation code
- p-create-end.
- exit.
-
- p-destroy.
- * some destruction code
- p-destroy-end.
- exit.
-
- ordinary-transaction.
- * some ordinary data processing code
- ord-trns-1.
-
- ord-trns-2.
-
- ordinary-transaction-end.
+000000* An example illustrating the use of a programmer defined paragraphs
+ * and perform-thru
+ identification division.
+ program-id. level88.
+ author. kik.
+ environment division.
+ configuration section.
+ special-names.
+ console is crt
+ decimal-point is comma.
+ data division.
+ working-storage section.
+ 77 transaction-kode pic 99.
+ 88 valid-kode value 4, 8 thru 15.
+ 88 create value 10.
+ 88 destroy value 15.
+
+ procedure division.
+ main section.
+ *
+ * Some code leading to "transacion-kode" getting a value
+ *
+
+ move 10 to transaction-kode.
+
+
+ *
+ * Testing the conditions
+ *
+
+ if valid-kode then
+ if create then
+ perform p-create thru p-create-end
+ else
+ if destroy then
+ perform p-destroy thru p-destroy-end
+ else
+ perform ordinary-transaction
+ thru ordinary-transaction-end.
+
+ *
+ p-create.
+ * some creation code
+ p-create-end.
+ exit.
+
+ p-destroy.
+ * some destruction code
+ p-destroy-end.
+ exit.
+
+ ordinary-transaction.
+ * some ordinary data processing code
+ ord-trns-1.
+
+ ord-trns-2.
+
+ ordinary-transaction-end.
exit.
\ No newline at end of file diff --git a/indenters/example.cpp b/indenters/example.cpp index f9b099c..44e6a80 100755 --- a/indenters/example.cpp +++ b/indenters/example.cpp @@ -1,349 +1,349 @@ -#include <a.h>
-#include <a.h>
-#include <a.h>
-
-using namespace a.b.c a;
-
-PREPROCESSOR()
-
-BEGIN_MESSAGE_MAP()
- ON_COMMAND()
-END_MESSAGE_MAP()
-
-extern struct x y;
-
-static const class Example :
- Int1, Int2, Int3
-{
-public:
- Example::~Example() :
- S1(),
- S2(),
- S3() {
- // if statements with empty braces
- if( x ) { }
- else if( x ) { }
- else { }
-
- // if statements with exactly one braced statement
- if( x ) {
- statement;
- }
- else if( x ) {
- statement;
- }
- else {
- statement;
- }
-
- // special 'if' cases
- if( x ) {
- statement;
- }
- else {
- statement;
- }
-
- if( x ) {
- statement;
-
- statement;
- }
- else {
- statement;
-
- statement;
- }
-
- // if statements with a single implicit substatement
- if( x )
- statement;
-
- else if( x )
- statement;
-
- else
- statement;
-
- // if statements with multiple statements
- if( x ) {
- statement;
-
- statement;
- }
- else if( x ) {
- statement;
-
- statement;
- }
- else {
- statement;
-
- statement;
- }
-
- // while statements with a single implicit substatement
- while( x )
- statement;
-
- // while statements with a single implicit 'if' substatement
- while( x )
- if( x )
- statement;
-
- // while with multiple statements
- while( x ) {
- statement;
-
- statement;
- }
-
- // labeled statement
- label:
- statement;
-
- // for statements with a single braced statement
- for ( x; x; x ) {
- statement;
- }
-
- // do statements with a single braced substatement
- do {
- statement;
- } while ( false );
-
- // do statement with an empty block
- do { } while ( x );
-
- // local blocks
- {
- statement;
- }
-
- /* Switch blocks:
- *
- * You can have case substatements be aligned by giving an example like:
- *
- * case 1: statement;
- *
- * statement;
- *
- * statement;
- *
- * etc...
- */
- switch( c ) {
- case 1:
- case 2:
- case 3:
- statement;
-
- statement;
-
- statement;
-
- case 4:
- break; // case with exactly one substatement
-
- default:
- break;
- }
- }
-
- void method( const myClass<item> &x, int [][][] c, ... ) {
- // try-catch-finally with empty bodies
- try { }
- catch(Throwable e) { }
- finally { }
-
- // try-catch-finally with exactly one statement
- try {
- statement;
- }
- catch( Throwable t ) {
- statement;
- }
- finally {
- statement;
- }
-
- // try-catch-finally with multiple statements
- try {
- statement;
-
- statement;
- }
- catch( Throwable e ) {
- statement;
-
- statement;
- }
- finally {
- statement;
-
- statement;
-
- statement;
- }
- }
-};
-
-// enum statement
-static typedef enum x
-{
-x,
-y,
-z,
-};
-
-// simple typedef
-typedef interface static short int x;
-
-namespace x
-{
-// template header
-template <class T>
-x y z v() const;
-
-// pure virtual function, using c-style formal parameters with double parens
-void v(()) = 0;
-
-// function with one single line statement and c-style formal parameters
-void v(( int i )) {
- statement;
-};
-
-// function with no statements
-myClass<myType>::method() { }
-};
-
-template <T> class x
-{
-public:
-
- // operator declarations
- int operator +();
-
- int operator []();
-
- // template method
- static void A<x>::method() [][][] {
- asm
- {
- - Assembler statements -
-
- The outside braces are formatted but the asm code is passed through
- unchanged.
- }
-
- asm Single line assembler statements are also just passed through
- }
-
- extern void oldStyleFunction()
- int a;
- int b;
- int c; {
- // various simple statements
- long int a, b, c;
-
- long double [] i;
-
- goto x;
-
- delete [] x;
-
- delete [][][] x;
-
- return x;
-
- continue label;
-
- throw e;
-
- // c-style function calls with double parens
- b((a, b, c));
-
- a(());
-
- // expressions
- new Object()->field.method();
-
- s = "string"
- "split across lines";
-
- method(a, B::C, 'd');
-
- z = j[0][0][0] || k * 3 >> ++i + "0" > i++ & (i) == !j;
-
- int *v;
-
- int &v;
-
- x = x * *x;
-
- (int *)x;
-
- int (*functionPointer)( x, y, z );
-
- h[0] += a ? b : ((int)c).d;
-
- new Handler();
- }
-} a, b, c; // struct instances
-
-class Class2
-{
-/* Array creation with multiple non-array elements.
- *
- * If you give this example with the elements on the same line, then
- * Polystyle will automatically vertically align them into a grid when it
- * fits your code to the page. An alternate style is to have each
- * element on its own line, like this:
- * {
- * x,
- * y
- * z
- * }
- */
-boolean *bools1 =
- {
- x, y, z
- };
-
-// array creation with a single element
-boolean bools2 = { x };
-
-// array creation with no elements
-boolean bools3 = { };
-
-// multidimensional array creation
-const int *** array =
- {
- { 1, 2, 3 },
- { 1, 2, 3 },
- { 1, 2, 3 },
- };
-};
-
-#if x
-
-#define x
-
-#elif a
-
-#define x
-
-#else
-
-#define x
-
-#define x
-
-#define x
-
-#endif
-
-// see if multi line macros are safely handled:
-#define multilinemacro do { x= x+5; } while (0); \
-printf("a multilinemacro"); \
-printf("a multilinemacro2");
+#include <a.h> +#include <a.h> +#include <a.h> + +using namespace a.b.c a; + +PREPROCESSOR() + +BEGIN_MESSAGE_MAP() + ON_COMMAND() +END_MESSAGE_MAP() + +extern struct x y; + +static const class Example : + Int1, Int2, Int3 +{ +public: + Example::~Example() : + S1(), + S2(), + S3() { + // if statements with empty braces + if( x ) { } + else if( x ) { } + else { } + + // if statements with exactly one braced statement + if( x ) { + statement; + } + else if( x ) { + statement; + } + else { + statement; + } + + // special 'if' cases + if( x ) { + statement; + } + else { + statement; + } + + if( x ) { + statement; + + statement; + } + else { + statement; + + statement; + } + + // if statements with a single implicit substatement + if( x ) + statement; + + else if( x ) + statement; + + else + statement; + + // if statements with multiple statements + if( x ) { + statement; + + statement; + } + else if( x ) { + statement; + + statement; + } + else { + statement; + + statement; + } + + // while statements with a single implicit substatement + while( x ) + statement; + + // while statements with a single implicit 'if' substatement + while( x ) + if( x ) + statement; + + // while with multiple statements + while( x ) { + statement; + + statement; + } + + // labeled statement + label: + statement; + + // for statements with a single braced statement + for ( x; x; x ) { + statement; + } + + // do statements with a single braced substatement + do { + statement; + } while ( false ); + + // do statement with an empty block + do { } while ( x ); + + // local blocks + { + statement; + } + + /* Switch blocks: + * + * You can have case substatements be aligned by giving an example like: + * + * case 1: statement; + * + * statement; + * + * statement; + * + * etc... + */ + switch( c ) { + case 1: + case 2: + case 3: + statement; + + statement; + + statement; + + case 4: + break; // case with exactly one substatement + + default: + break; + } + } + + void method( const myClass<item> &x, int [][][] c, ... ) { + // try-catch-finally with empty bodies + try { } + catch(Throwable e) { } + finally { } + + // try-catch-finally with exactly one statement + try { + statement; + } + catch( Throwable t ) { + statement; + } + finally { + statement; + } + + // try-catch-finally with multiple statements + try { + statement; + + statement; + } + catch( Throwable e ) { + statement; + + statement; + } + finally { + statement; + + statement; + + statement; + } + } +}; + +// enum statement +static typedef enum x +{ +x, +y, +z, +}; + +// simple typedef +typedef interface static short int x; + +namespace x +{ +// template header +template <class T> +x y z v() const; + +// pure virtual function, using c-style formal parameters with double parens +void v(()) = 0; + +// function with one single line statement and c-style formal parameters +void v(( int i )) { + statement; +}; + +// function with no statements +myClass<myType>::method() { } +}; + +template <T> class x +{ +public: + + // operator declarations + int operator +(); + + int operator [](); + + // template method + static void A<x>::method() [][][] { + asm + { + - Assembler statements - + + The outside braces are formatted but the asm code is passed through + unchanged. + } + + asm Single line assembler statements are also just passed through + } + + extern void oldStyleFunction() + int a; + int b; + int c; { + // various simple statements + long int a, b, c; + + long double [] i; + + goto x; + + delete [] x; + + delete [][][] x; + + return x; + + continue label; + + throw e; + + // c-style function calls with double parens + b((a, b, c)); + + a(()); + + // expressions + new Object()->field.method(); + + s = "string" + "split across lines"; + + method(a, B::C, 'd'); + + z = j[0][0][0] || k * 3 >> ++i + "0" > i++ & (i) == !j; + + int *v; + + int &v; + + x = x * *x; + + (int *)x; + + int (*functionPointer)( x, y, z ); + + h[0] += a ? b : ((int)c).d; + + new Handler(); + } +} a, b, c; // struct instances + +class Class2 +{ +/* Array creation with multiple non-array elements. + * + * If you give this example with the elements on the same line, then + * Polystyle will automatically vertically align them into a grid when it + * fits your code to the page. An alternate style is to have each + * element on its own line, like this: + * { + * x, + * y + * z + * } + */ +boolean *bools1 = + { + x, y, z + }; + +// array creation with a single element +boolean bools2 = { x }; + +// array creation with no elements +boolean bools3 = { }; + +// multidimensional array creation +const int *** array = + { + { 1, 2, 3 }, + { 1, 2, 3 }, + { 1, 2, 3 }, + }; +}; + +#if x + +#define x + +#elif a + +#define x + +#else + +#define x + +#define x + +#define x + +#endif + +// see if multi line macros are safely handled: +#define multilinemacro do { x= x+5; } while (0); \ +printf("a multilinemacro"); \ +printf("a multilinemacro2"); diff --git a/indenters/example.css b/indenters/example.css index 09b5ecf..438f8ab 100755 --- a/indenters/example.css +++ b/indenters/example.css @@ -1,272 +1,272 @@ -/* General
-/*******************************/
-body
-{
- font-size: Small;
- margin: 30px 0 20px 0;
- background: url(images/background.jpg);
-}
-
-span
-{
- font-family: Tahoma,serif;
-}
-
-/* Page
-/*******************************/
-#page
-{
- width: 808px;
- margin: 0 auto;
- position: relative;
-
-}
-
-/* Links general
-/*******************************/
-a
-{
- color: #36b;
-}
-
-a:link { text-decoration:none; }
-a:visited { text-decoration:none; }
-a:active { text-decoration:none; }
-a:focus { text-decoration:none; }
-a:hover { text-decoration:underline; }
-
-/* Links external
-/*******************************/
-a.external
-{
- background: url("images/externallinks.png") center right no-repeat;
- padding-right: 13px;
-}
-
-/* Header
-/*******************************/
-#header
-{
- float: left;
- width: 800px;
- height: 171px;
- background-image: url(images/banner.jpg);
- background-repeat: no-repeat;
- background-position: left bottom;
- padding-left: 20px;
-}
-
-/* Tabs
-/*******************************/
-#tabs
-{
-}
-
-#tabs ul
-{
- list-style: none;
- display: inline;
-}
-
-#tabs li
-{
- width: 125px;
- float: left;
- background-image: url(images/tab3.jpg);
- background-repeat: no-repeat;
- background-position: center top;
- text-align: center;
-}
-
-#tabs li a
-{
- font-family: sans-serif;
- font-size: 100%;
- font-weight: normal;
- color: black;
- height: 28px;
- padding: 21px 0 0 0;
- display: block;
-}
-
-#tabs li a:link { text-decoration:none; }
-#tabs li a:visited { text-decoration:none; }
-#tabs li a:active { text-decoration:none; }
-#tabs li a:focus { text-decoration:none; }
-#tabs li a:hover
-{
- width: 125px;
- float: left;
- background-image: url(images/tab3hover.jpg);
- background-repeat: no-repeat;
- background-position: center top;
- text-align: center;
-}
-
-#tabs #current
-{
- background-image: url(images/tab3_selected.jpg);
- background-repeat: no-repeat;
- background-position: center top;
- margin-top: -5px;
-}
-
-#tabs #current a
-{
- background-image: url(images/tab3_selected.jpg);
- background-repeat: no-repeat;
- background-position: center top;
- padding: 27px 0;
- height: 17px;
- font-weight: bold;
-}
-
-/* Main
-*******************************/
-#main
-{
- background-image: url(images/page_middle.png);
- background-repeat: repeat-y;
- float: left;
-}
-
-/* Content
-/*******************************/
-#content
-{
- padding: 22px;
- margin: 0;
- width: 541px;
- float: left;
-}
-
-#content h1, h2, h3, h4, h5, h6, h7, #content h2 a
-{
- font-family: Tahoma,serif;
- margin-bottom: 10px;
- margin-top: 10px;
-}
-
-#content h1
-{
- font-size: x-large;
-}
-
-#content h2
-{
- font-size: large;
-}
-
-#content p, #content ul, #content a, #content ol
-{
- margin-top: 10px;
- font-family: verdana, sans-serif;
-}
-
-/* Progress
-/*******************************/
-.progressframe
-{
- border: 1px black solid;
- width: 100%;
-}
-
-.progress
-{
- font-family: Tahoma,serif;
- font-weight: bold;
- /*padding-left: 10px;*/
- background-color: red;
- color: white;
-}
-
-.p0 { width: 0%; color: black; background-color: white; }
-.p5 { width: 5%; background-color: rgb(240,16,0); }
-.p10 { width: 10%; background-color: rgb(240,32,0); }
-.p15 { width: 15%; background-color: rgb(240,48,0); }
-.p20 { width: 20%; background-color: rgb(240,64,0); }
-.p25 { width: 25%; background-color: rgb(240,80,0); }
-.p30 { width: 30%; background-color: rgb(240,80,0); }
-.p35 { width: 35%; background-color: rgb(240,96,0); }
-.p40 { width: 40%; background-color: rgb(240,96,0); }
-.p45 { width: 45%; background-color: rgb(240,112,0); }
-.p50 { width: 50%; background-color: rgb(240,112,0); }
-.p55 { width: 55%; background-color: rgb(224,128,0); }
-.p60 { width: 60%; background-color: rgb(208,144,0); }
-.p65 { width: 65%; background-color: rgb(192,160,0); }
-.p70 { width: 70%; background-color: rgb(176,176,0); }
-.p75 { width: 75%; background-color: rgb(176,176,0); }
-.p80 { width: 80%; background-color: rgb(160,192,0); }
-.p85 { width: 85%; background-color: rgb(160,192,0); }
-.p90 { width: 90%; background-color: rgb(144,208,0); }
-.p95 { width: 95%; background-color: rgb(144,208,0); }
-.p100 { width: 100%; background-color: green; }
-
-/* Sidebar
-/*******************************/
-#sidebar
-{
- margin: 0;
- padding: 10px;
- width: 195px;
- font-family: verdana, sans-serif;
- float: right;
-}
-
-#sidebar a
-{
- border : none;
-}
-
-#sidebar a:link { text-decoration:none; }
-#sidebar a:visited { text-decoration:none; }
-#sidebar a:active { text-decoration:none; }
-#sidebar a:focus { text-decoration:none; }
-#sidebar a:hover { text-decoration:underline; }
-
-#sidebar a img
-{
- border : none;
-}
-
-#sidebar h1
-{
- font-size: 10pt;
- font-weight: bold;
- margin-bottom: 0;
-}
-
-#sidebar ul
-{
- vertical-align: middle;
-}
-
-#sidebar li
-{
- list-style-image: url(images/icon_page.gif);
-}
-
-
-/* Footer
-/*******************************/
-#footer
-{
- font-family: verdana, sans-serif;
- background: url(images/page_bottom.png);
- font-size: x-small;
- font-weight: bold;
- color: #CCCCCC;
- height: 44px;
- width: 800px;
- clear: both;
-}
-
-#footer p
-{
- padding: 0px 0 0 20px;
-}
-
-#footer a
-{
- color: #CCE0F5;
-}
+/* General +/*******************************/ +body +{ + font-size: Small; + margin: 30px 0 20px 0; + background: url(images/background.jpg); +} + +span +{ + font-family: Tahoma,serif; +} + +/* Page +/*******************************/ +#page +{ + width: 808px; + margin: 0 auto; + position: relative; + +} + +/* Links general +/*******************************/ +a +{ + color: #36b; +} + +a:link { text-decoration:none; } +a:visited { text-decoration:none; } +a:active { text-decoration:none; } +a:focus { text-decoration:none; } +a:hover { text-decoration:underline; } + +/* Links external +/*******************************/ +a.external +{ + background: url("images/externallinks.png") center right no-repeat; + padding-right: 13px; +} + +/* Header +/*******************************/ +#header +{ + float: left; + width: 800px; + height: 171px; + background-image: url(images/banner.jpg); + background-repeat: no-repeat; + background-position: left bottom; + padding-left: 20px; +} + +/* Tabs +/*******************************/ +#tabs +{ +} + +#tabs ul +{ + list-style: none; + display: inline; +} + +#tabs li +{ + width: 125px; + float: left; + background-image: url(images/tab3.jpg); + background-repeat: no-repeat; + background-position: center top; + text-align: center; +} + +#tabs li a +{ + font-family: sans-serif; + font-size: 100%; + font-weight: normal; + color: black; + height: 28px; + padding: 21px 0 0 0; + display: block; +} + +#tabs li a:link { text-decoration:none; } +#tabs li a:visited { text-decoration:none; } +#tabs li a:active { text-decoration:none; } +#tabs li a:focus { text-decoration:none; } +#tabs li a:hover +{ + width: 125px; + float: left; + background-image: url(images/tab3hover.jpg); + background-repeat: no-repeat; + background-position: center top; + text-align: center; +} + +#tabs #current +{ + background-image: url(images/tab3_selected.jpg); + background-repeat: no-repeat; + background-position: center top; + margin-top: -5px; +} + +#tabs #current a +{ + background-image: url(images/tab3_selected.jpg); + background-repeat: no-repeat; + background-position: center top; + padding: 27px 0; + height: 17px; + font-weight: bold; +} + +/* Main +*******************************/ +#main +{ + background-image: url(images/page_middle.png); + background-repeat: repeat-y; + float: left; +} + +/* Content +/*******************************/ +#content +{ + padding: 22px; + margin: 0; + width: 541px; + float: left; +} + +#content h1, h2, h3, h4, h5, h6, h7, #content h2 a +{ + font-family: Tahoma,serif; + margin-bottom: 10px; + margin-top: 10px; +} + +#content h1 +{ + font-size: x-large; +} + +#content h2 +{ + font-size: large; +} + +#content p, #content ul, #content a, #content ol +{ + margin-top: 10px; + font-family: verdana, sans-serif; +} + +/* Progress +/*******************************/ +.progressframe +{ + border: 1px black solid; + width: 100%; +} + +.progress +{ + font-family: Tahoma,serif; + font-weight: bold; + /*padding-left: 10px;*/ + background-color: red; + color: white; +} + +.p0 { width: 0%; color: black; background-color: white; } +.p5 { width: 5%; background-color: rgb(240,16,0); } +.p10 { width: 10%; background-color: rgb(240,32,0); } +.p15 { width: 15%; background-color: rgb(240,48,0); } +.p20 { width: 20%; background-color: rgb(240,64,0); } +.p25 { width: 25%; background-color: rgb(240,80,0); } +.p30 { width: 30%; background-color: rgb(240,80,0); } +.p35 { width: 35%; background-color: rgb(240,96,0); } +.p40 { width: 40%; background-color: rgb(240,96,0); } +.p45 { width: 45%; background-color: rgb(240,112,0); } +.p50 { width: 50%; background-color: rgb(240,112,0); } +.p55 { width: 55%; background-color: rgb(224,128,0); } +.p60 { width: 60%; background-color: rgb(208,144,0); } +.p65 { width: 65%; background-color: rgb(192,160,0); } +.p70 { width: 70%; background-color: rgb(176,176,0); } +.p75 { width: 75%; background-color: rgb(176,176,0); } +.p80 { width: 80%; background-color: rgb(160,192,0); } +.p85 { width: 85%; background-color: rgb(160,192,0); } +.p90 { width: 90%; background-color: rgb(144,208,0); } +.p95 { width: 95%; background-color: rgb(144,208,0); } +.p100 { width: 100%; background-color: green; } + +/* Sidebar +/*******************************/ +#sidebar +{ + margin: 0; + padding: 10px; + width: 195px; + font-family: verdana, sans-serif; + float: right; +} + +#sidebar a +{ + border : none; +} + +#sidebar a:link { text-decoration:none; } +#sidebar a:visited { text-decoration:none; } +#sidebar a:active { text-decoration:none; } +#sidebar a:focus { text-decoration:none; } +#sidebar a:hover { text-decoration:underline; } + +#sidebar a img +{ + border : none; +} + +#sidebar h1 +{ + font-size: 10pt; + font-weight: bold; + margin-bottom: 0; +} + +#sidebar ul +{ + vertical-align: middle; +} + +#sidebar li +{ + list-style-image: url(images/icon_page.gif); +} + + +/* Footer +/*******************************/ +#footer +{ + font-family: verdana, sans-serif; + background: url(images/page_bottom.png); + font-size: x-small; + font-weight: bold; + color: #CCCCCC; + height: 44px; + width: 800px; + clear: both; +} + +#footer p +{ + padding: 0px 0 0 20px; +} + +#footer a +{ + color: #CCE0F5; +} diff --git a/indenters/example.f90 b/indenters/example.f90 index f2aae7d..8131b8b 100755 --- a/indenters/example.f90 +++ b/indenters/example.f90 @@ -1,33 +1,33 @@ -module module1
-! Identity of a utility
-! ____________________________________________________________________
- character (len=*), parameter :: xyz = &
-"I am just a more or less long string."
- character (len=*), parameter :: zhlp = '( &
-&"This program is free software; you can redistribute it and/or modify"/&
-&"____________________________________________________________________")'
-integer:: n
-contains
-
-recursive subroutine sub1(x)
-integer,intent(inout):: x
-integer:: y
-y=0
-if (x<n) then
- x= x + 1
- y =x**2
- print *, 'x = ', x,', y = ', y
- call sub1(x)
- print *, 'x = ', x,', y = ', y
-end if
-end subroutine sub1
-
-end module module1
-
-program main
-use module1
-integer:: x = 0
-print *, 'Enter number of repeats'
-read (*,*) n
-call sub1(x)
+module module1
+! Identity of a utility +! ____________________________________________________________________
+ character (len=*), parameter :: xyz = & +"I am just a more or less long string."
+ character (len=*), parameter :: zhlp = '( &
+&"This program is free software; you can redistribute it and/or modify"/&
+&"____________________________________________________________________")'
+integer:: n +contains + +recursive subroutine sub1(x) +integer,intent(inout):: x +integer:: y +y=0 +if (x<n) then + x= x + 1 + y =x**2 + print *, 'x = ', x,', y = ', y + call sub1(x) + print *, 'x = ', x,', y = ', y +end if +end subroutine sub1 + +end module module1 + +program main +use module1 +integer:: x = 0 +print *, 'Enter number of repeats' +read (*,*) n +call sub1(x) end program main
\ No newline at end of file diff --git a/indenters/example.php b/indenters/example.php index 0aa1676..5817e49 100755 --- a/indenters/example.php +++ b/indenters/example.php @@ -1,4 +1,4 @@ -<?php
-if($code == BAD){$action = REWRITE;}else{$action = KEEP;}
-for($i=0; $i<10;$i++){while($j>0){$j++;doCall($i+$j);if($k){$k/=10;}}}
+<?php +if($code == BAD){$action = REWRITE;}else{$action = KEEP;} +for($i=0; $i<10;$i++){while($j>0){$j++;doCall($i+$j);if($k){$k/=10;}}} ?>
\ No newline at end of file diff --git a/indenters/example.pl b/indenters/example.pl index 5266ab3..1323bfc 100755 --- a/indenters/example.pl +++ b/indenters/example.pl @@ -1,55 +1,55 @@ -print "Help Desk -- What Editor do you use?";
-chomp($editor = <STDIN>);
-if ($editor =~ /emacs/i) {
- print "Why aren't you using vi?\n";
-} elsif ($editor =~ /vi/i) {
- print "Why aren't you using emacs?\n";
-} else {
- print "I think that's the problem\n";
-}
-
-{
- L9140:
- if ($msccom::obj==$msccom::food) {
- goto L8142;
- }
- if ($msccom::obj==$msccom::bird||$msccom::obj==$msccom::snake||$msccom::obj==$msccom::clam||$msccom::obj==$msccom::oyster||$msccom::obj==$msccom::dwarf||$msccom::obj==$msccom::dragon||$msccom::obj==$msccom::troll||$msccom::obj==$msccom::bear) {
- $msccom::spk=71;
- }
- goto L2011;
- #
- # DRINK. IF NO OBJECT, ASSUME WATER AND LOOK FOR IT HERE. IF WATER IS
- # THE BOTTLE, DRINK THAT, ELSE MUST BE AT A WATER LOC, SO DRINK STREAM.
- #
- L9150:
- if ($msccom::obj==0&&$liqloc->($placom::loc)!=$msccom::water&&($liq->(0)!=$msccom::water||!$here->($msccom::bottle))) {
- goto L8000;
- }
- if ($msccom::obj!=0&&$msccom::obj!=$msccom::water) {
- $msccom::spk=110;
- }
- if ($msccom::spk==110||$liq->(0)!=$msccom::water||!$here->($msccom::bottle)) {
- goto L2011;
- }
- $placom::prop->($msccom::bottle)=1;
- $placom::place->($msccom::water)=0;
- $msccom::spk=74;
- goto L2011;
- #
- # RUB. YIELDS VARIOUS SNIDE REMARKS.
- #
- L9160:
- if ($msccom::obj!=$placom::lamp) {
- $msccom::spk=76;
- }
- goto L2011;
- #
- # THROW. SAME AS DISCARD UNLESS AXE. THEN SAME AS ATTACK EXCEPT IGNOR
- # AND IF DWARF IS PRESENT THEN ONE MIGHT BE KILLED. (ONLY WAY TO DO SO
- # AXE ALSO SPECIAL FOR DRAGON, BEAR, AND TROLL. TREASURES SPECIAL FOR
- #
- L9170:
- if ($toting->($msccom::rod2)&&$msccom::obj==$msccom::rod&&!$toting->($msccom::rod)) {
- $msccom::obj=$msccom::rod2;
- }
+print "Help Desk -- What Editor do you use?";
+chomp($editor = <STDIN>);
+if ($editor =~ /emacs/i) {
+ print "Why aren't you using vi?\n";
+} elsif ($editor =~ /vi/i) {
+ print "Why aren't you using emacs?\n";
+} else {
+ print "I think that's the problem\n";
+}
+
+{ + L9140: + if ($msccom::obj==$msccom::food) { + goto L8142; + } + if ($msccom::obj==$msccom::bird||$msccom::obj==$msccom::snake||$msccom::obj==$msccom::clam||$msccom::obj==$msccom::oyster||$msccom::obj==$msccom::dwarf||$msccom::obj==$msccom::dragon||$msccom::obj==$msccom::troll||$msccom::obj==$msccom::bear) { + $msccom::spk=71; + } + goto L2011; + # + # DRINK. IF NO OBJECT, ASSUME WATER AND LOOK FOR IT HERE. IF WATER IS + # THE BOTTLE, DRINK THAT, ELSE MUST BE AT A WATER LOC, SO DRINK STREAM. + # + L9150: + if ($msccom::obj==0&&$liqloc->($placom::loc)!=$msccom::water&&($liq->(0)!=$msccom::water||!$here->($msccom::bottle))) { + goto L8000; + } + if ($msccom::obj!=0&&$msccom::obj!=$msccom::water) { + $msccom::spk=110; + } + if ($msccom::spk==110||$liq->(0)!=$msccom::water||!$here->($msccom::bottle)) { + goto L2011; + } + $placom::prop->($msccom::bottle)=1; + $placom::place->($msccom::water)=0; + $msccom::spk=74; + goto L2011; + # + # RUB. YIELDS VARIOUS SNIDE REMARKS. + # + L9160: + if ($msccom::obj!=$placom::lamp) { + $msccom::spk=76; + } + goto L2011; + # + # THROW. SAME AS DISCARD UNLESS AXE. THEN SAME AS ATTACK EXCEPT IGNOR + # AND IF DWARF IS PRESENT THEN ONE MIGHT BE KILLED. (ONLY WAY TO DO SO + # AXE ALSO SPECIAL FOR DRAGON, BEAR, AND TROLL. TREASURES SPECIAL FOR + # + L9170: + if ($toting->($msccom::rod2)&&$msccom::obj==$msccom::rod&&!$toting->($msccom::rod)) { + $msccom::obj=$msccom::rod2; + } }
\ No newline at end of file diff --git a/indenters/example.py b/indenters/example.py index d6525aa..a975cb2 100755 --- a/indenters/example.py +++ b/indenters/example.py @@ -1,23 +1,23 @@ -#! /usr/bin/env python
-"Replace CRLF with LF in argument files. Print names of changed files."
-
-import sys, os
-
-def main():
- for filename in sys.argv[1:]:
- if os.path.isdir(filename):
- print filename, "Directory!"
- continue
- data = open(filename, "rb").read()
- if '\0' in data:
- print filename, "Binary!"
- continue
- newdata = data.replace("\r\n", "\n")
- if newdata != data:
- print filename
- f = open(filename, "wb")
- f.write(newdata)
- f.close()
-
-if __name__ == '__main__':
- main()
+#! /usr/bin/env python +"Replace CRLF with LF in argument files. Print names of changed files." + +import sys, os + +def main(): + for filename in sys.argv[1:]: + if os.path.isdir(filename): + print filename, "Directory!" + continue + data = open(filename, "rb").read() + if '\0' in data: + print filename, "Binary!" + continue + newdata = data.replace("\r\n", "\n") + if newdata != data: + print filename + f = open(filename, "wb") + f.write(newdata) + f.close() + +if __name__ == '__main__': + main() diff --git a/indenters/example.sql b/indenters/example.sql index b7736b5..077eeb8 100755 --- a/indenters/example.sql +++ b/indenters/example.sql @@ -1,37 +1,37 @@ -CREATE PACKAGE BODY b IS
-
-PROCEDURE proc1 IS
-BEGIN
-IF 7 <> 5 THEN
-FOR rec IN (SELECT * FROM dual
- WHERE g = 5) LOOP
-NULL;
-END LOOP;
- END IF;
-END;
-
-PROCEDURE recurse IS
- b number:=5;
- d456 number:=456;
-BEGIN
- recurse;
- proc1;
- a := (a + 1
- +4
- + 5
- + 8);
- c := f + 4 + 34;
- total := earth +sky;
-
- --this is comment
-
- uk:=h;
- g:=l;
- exception
- when no_data then
- hello;
- END;
-
- BEGIN
- NULL;
-END;
+CREATE PACKAGE BODY b IS + +PROCEDURE proc1 IS +BEGIN +IF 7 <> 5 THEN +FOR rec IN (SELECT * FROM dual + WHERE g = 5) LOOP +NULL; +END LOOP; + END IF; +END; + +PROCEDURE recurse IS + b number:=5; + d456 number:=456; +BEGIN + recurse; + proc1; + a := (a + 1 + +4 + + 5 + + 8); + c := f + 4 + 34; + total := earth +sky; + + --this is comment + + uk:=h; + g:=l; + exception + when no_data then + hello; + END; + + BEGIN + NULL; +END; diff --git a/indenters/example.vb b/indenters/example.vb index 2ecbdc0..94adf39 100755 --- a/indenters/example.vb +++ b/indenters/example.vb @@ -1,50 +1,50 @@ -Dim docRoot As New ChilkatXml
-
-Dim success As Long
-
-docRoot.Tag = "myDoc"
-
-' To zip compress the content, set this flag to 1
-Dim zipContent As Long
-zipContent = 0
-' To 128-bit AES encrypt the content, set this flag to 1
-Dim encryptContent As Long
-encryptContent = 0
-Dim encryptPassword As String
-encryptPassword = ""
-
-Dim pdfNode As ChilkatXml
-
-Set pdfNode = docRoot.NewChild("pdf","")
-
-' Embed a PDF into XML
-success = pdfNode.SetBinaryContentFromFile("sample.pdf",zipContent,encryptContent,encryptPassword)
-If (success <> 1) Then
- MsgBox pdfNode.LastErrorText
-
- Exit Sub
-End If
-
-MsgBox pdfNode.LastErrorText
-
-' Display the entire XML document:
-Text1.Text = Text1.Text & docRoot.GetXml() & vbCrLf
-
-' Get the Base64-encoded content and display it:
-Text1.Text = Text1.Text & pdfNode.Content & vbCrLf
-
-' Extract the binary content from XML:
-Dim unzipContent As Long
-unzipContent = 0
-Dim decryptContent As Long
-decryptContent = 0
-Dim decryptPassword As String
-decryptPassword = ""
-success = pdfNode.SaveBinaryContent("out.pdf",unzipContent,decryptContent,decryptPassword)
-If (success <> 1) Then
- MsgBox pdfNode.LastErrorText
-
- Exit Sub
-End If
-
+Dim docRoot As New ChilkatXml + +Dim success As Long + +docRoot.Tag = "myDoc" + +' To zip compress the content, set this flag to 1 +Dim zipContent As Long +zipContent = 0 +' To 128-bit AES encrypt the content, set this flag to 1 +Dim encryptContent As Long +encryptContent = 0 +Dim encryptPassword As String +encryptPassword = "" + +Dim pdfNode As ChilkatXml + +Set pdfNode = docRoot.NewChild("pdf","") + +' Embed a PDF into XML +success = pdfNode.SetBinaryContentFromFile("sample.pdf",zipContent,encryptContent,encryptPassword) +If (success <> 1) Then + MsgBox pdfNode.LastErrorText + + Exit Sub +End If + +MsgBox pdfNode.LastErrorText + +' Display the entire XML document: +Text1.Text = Text1.Text & docRoot.GetXml() & vbCrLf + +' Get the Base64-encoded content and display it: +Text1.Text = Text1.Text & pdfNode.Content & vbCrLf + +' Extract the binary content from XML: +Dim unzipContent As Long +unzipContent = 0 +Dim decryptContent As Long +decryptContent = 0 +Dim decryptPassword As String +decryptPassword = "" +success = pdfNode.SaveBinaryContent("out.pdf",unzipContent,decryptContent,decryptPassword) +If (success <> 1) Then + MsgBox pdfNode.LastErrorText + + Exit Sub +End If + MsgBox "Success!"
\ No newline at end of file diff --git a/indenters/phpStylist.php b/indenters/phpStylist.php index 59099cd..4c8cbaf 100755 --- a/indenters/phpStylist.php +++ b/indenters/phpStylist.php @@ -1,1401 +1,1401 @@ -<?php
-/*****************************************************************************
- * The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
- * Version 1.1 ("License"); You may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * http://opensource.org/licenses/rpl.php. Software distributed under the
- * License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
- * either express or implied.
- *
- * @author: Mr. Milk (aka Marcelo Leite)
- * @email: mrmilk@anysoft.com.br
- * @version: 0.9 beta
- * @date: 2007-07-07
- *
- *****************************************************************************/
-if (isDownload()) {
- downloadFile();
-} elseif(isCommandLine()) {
- processBatch();
-}?>
-<html>
- <head>
- <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
- <script>
- var menus = [
- [ "Indentation and General Formatting", "", [
- [ "indent_size", " characters per indentation level" ],
- [ "indent_with_tabs", "Indent with tabs instead of spaces" ],
- [ "keep_redundant_lines", "Keep redundant lines" ],
- [ "space_inside_parentheses", "Space inside parentheses" ],
- [ "space_outside_parentheses", "Space outside parentheses" ],
- [ "space_after_comma", "Space after comma" ]
- ]],
- [ "Operators", "(=, .=, +=, -=, *=, /=, &=, |=, <<<, ==, ===, !=, !==, >, >=, <, <=, -, +, *, /, %, &&, ||, AND, OR, XOR, ?, :)", [
- [ "space_around_assignment", "Space around assignment (= .= += -= *= /= <<<)" ],
- [ "align_var_assignment", "Align block +3 assigned variables" ],
- [ "space_around_comparison", "Space around comparison (== === != !== > >= < <=)" ],
- [ "space_around_arithmetic", "Space around arithmetic (- + * / %)" ],
- [ "space_around_logical", "Space around logical (&& || AND OR XOR << >>)" ],
- [ "space_around_colon_question", "Space around question/colon (? :)" ]
- ]],
- [ "Functions, Classes and Objects", "(keywords: function, class, interface, abstract, public, protected, private, final, ->, ::)", [
- [ "line_before_function", "Blank line before keyword" ],
- [ "line_before_curly_function", "Opening bracket on next line" ],
- [ "line_after_curly_function", "Blank line below opening bracket" ],
- [ "space_around_obj_operator", "Space around object operator (->)" ],
- [ "space_around_double_colon", "Space around double colon (::)" ]
- ]],
- [ "Control Structures", "(if, elseif, else, for, foreach, while, do, switch, break)", [
- [ "space_after_if", "Space between keyword and opening parentheses" ],
- [ "else_along_curly", "Keep else/elseif along with bracket" ],
- [ "line_before_curly", "Opening bracket on next line" ],
- [ "add_missing_braces", "Add missing brackets to single line structs" ],
- [ "line_after_break", "Blank line after case \"break\"" ],
- [ "space_inside_for", "Space between \"for\" elements" ],
- [ "indent_case", "Extra indent for \"Case\" and \"Default\"" ]
- ]],
- [ "Arrays and Concatenation", "(array, dot, double arrow =>)", [
- [ "line_before_array", "Opening array parentheses on next line" ],
- [ "vertical_array", "Non-empty arrays as vertical block" ],
- [ "align_array_assignment", "Align block +3 assigned array elements" ],
- [ "space_around_double_arrow", "Space around double arrow" ],
- [ "vertical_concat", "Concatenation as vertical block" ],
- [ "space_around_concat", "Space around concat elements" ]
- ]],
- [ "Comments", "(//, #, /* */, /** */)", [
- [ "line_before_comment_multi", "Blank line before multi-line comment (/*)" ],
- [ "line_after_comment_multi", "Blank line after multi-line comment (/*)" ],
- [ "line_before_comment", "Blank line before single line comments (//)" ],
- [ "line_after_comment", "Blank line after single line comments (//)" ]
- ]]
- ];
-
- window.onload = function() {
-
- t = gEBI("g").cloneNode(true);
- r = gEBI("e").cloneNode(true);
- i = gEBI("i").cloneNode(true);
- loadFileMenu();
- for(y=0; y<(menus.length); y++) {
- h = menus[y][0];
- k = menus[y][1];
- addGroup(h, k, y+1);
- for(z=0; z<(menus[y][2].length); z++) {
- n = menus[y][2][z][0];
- d = menus[y][2][z][1];
- addItem(n, d, z, y+1);
- }
- if(getCookie("menu"+(y+1))=="on") {
- collapse(gEBN("a")[y+1]);
- }
- }
- gEBI("nowrap").checked = getCookie("nowrap")=="on" ? true : false;
- gEBI("iso8859").checked = getCookie("iso8859")=="on" ? true : false;
- gEBN("textarea")[1].checked = getCookie("textarea")!="on" ? true : false;
- gEBN("textarea")[0].checked = !gEBN("textarea")[1].checked;
- if(gEBN("textarea")[1].checked) {
- switchPanels(gEBN("textarea")[1]);
- }
-
- }
-
- function addGroup(h, k, y) {
- gEBI("m").parentNode.insertBefore(t.cloneNode(true), gEBI("m"));
- gEBN("h")[y].innerHTML = h;
- gEBN("k")[y].innerHTML = k;
- }
-
- function addItem(n, d, z, y) {
- c = n=="indent_size" ? i.cloneNode(true) : r.cloneNode(true);
- gEBTN('tbody',gEBN("g")[y])[0].appendChild(c);
- tr = gEBTN("tr",gEBN("g")[y])[z+2];
- td = gEBTN("td",tr)[0];
- gEBTN("input",td)[0].name = n;
- gEBTN("input",td)[0].id = n;
- gEBTN("span",td)[0].innerHTML = d;
- ck = getCookie(n);
- if(ck && ck=="on") {
- gEBTN("input",td)[0].checked = true;
- gEBTN("input",td)[0].value = "on";
- }
- else if(ck!=null) {
- gEBTN("input",td)[0].value = ck;
- }
- }
-
- function switchPanels(el) {
- if(el.name=="textarea") {
- if(gEBN("textarea")[0].checked) {
- sDIS(gEBI("tx"));
- sDIS(gEBI("hl"),"none");
- }
- else {
- sDIS(gEBI("tx"),"none");
- sDIS(gEBI("hl"));
- }
- }
- }
-
- function setCookie() {
-
- var cooky = "";
- var ta_index = 0;
- var elems = gEBTN("input");
- for(i=0; i<elems.length; i++) {
- switch(elems[i].type) {
- case "text":
- if(elems[i].value!="" && elems[i].name!="") {
- cooky += elems[i].name+":"+elems[i].value+"#";
- }
- break;
- case "checkbox":
- if(elems[i].checked) {
- cooky += elems[i].name+":on#";
- }
- break;
- case "radio":
- ta_index++;
- if(elems[i].checked && ta_index==1) {
- cooky += elems[i].name+":on#";
- }
- }
- }
- elems = gEBN("a");
- for(i=0; i<elems.length; i++) {
- tb = elems[i].parentNode.parentNode.parentNode;
- if(gEBTN("tr",tb)[1].style.display=="") {
- cooky += "menu"+i+":on#";
- }
- }
- document.cookie = "options="+cooky+"; expires="+(new Date(2020, 01, 01)).toGMTString();
- }
-
- function getCookie(ckn) {
- var res = document.cookie.match(ckn+':(.*?)(#|$)');
- return res ? res[1] : null;
- }
-
- function loadFileMenu() {
- gEBN("h")[0].innerHTML = "Choose Source Code";
- gEBN("k")[0].innerHTML = "(select file, paste code into text box or use sample)";
- sDIS(gEBN("k")[0].parentNode);
- gEBTN("tbody",gEBN("g")[0])[0].appendChild(gEBI("f"));
- gEBTN("tbody",gEBN("g")[0])[0].appendChild(gEBI("x"));
- gEBTN("tbody",gEBN("g")[0])[0].appendChild(gEBI("s"));
- gEBN("a")[0].style.color = "red";
- if(getCookie("menu0")=="off") {
- collapse(gEBN("a")[0]);
- }
- }
-
- function collapse(el) {
- var ai = 0;
- while(ai<gEBN("a").length && gEBN("a")[ai++]!=el);
- tb = el.parentNode.parentNode.parentNode;
- el.style.color = el.style.color=="" ? "red" : "";
- for(i=1; i<gEBTN("tr",tb).length; i++) {
- tr = gEBTN("tr",tb)[i];
- if(i==1) {
- st = tr.style.display=="none" ? "" : "none";
- }
- sDIS(tr,st);
- }
- window.focus();
- }
-
- function hideLeft(el) {
- if(el.innerHTML=="hide left panel") {
- el.innerHTML = "show left panel";
- gEBI("hide_top").appendChild(el);
- sDIS(gEBI("left"),"none");
- sDIS(gEBI("hide_top"));
- }
- else {
- el.innerHTML = "hide left panel";
- gEBI("hide_left").appendChild(el);
- sDIS(gEBI("left"));
- sDIS(gEBI("hide_top"),"none");
- }
- }
-
- function submitCode(el) {
- if(gEBI('file').value!='') {
- gEBI('ta').value = '';
- }
- if(el.name=="sc") {
- gEBI("download").value = 2;
- }
- else if(el.name=="dl") {
- gEBI("download").value = 1;
- }
- else {
- gEBI("download").value = 0;
- }
- var elems = gEBTN("input");
- for(i=0; i<elems.length; i++) {
- if(elems[i].type=="checkbox" && elems[i].checked) {
- elems[i].value = "on";
- }
- }
- document.stylist.submit();
- }
-
- var t = null;
- var r = null;
- var i = null;
- var h = null;
- var k = null;
- var n = null;
- var d = null;
-
- function gEBI(id) {
- return document.getElementById(id);
- }
- function gEBN(nm, el) {
- return el==undefined ? document.getElementsByName(nm) : el.getElementsByName(nm);
- }
- function gEBTN(tn, el) {
- return el==undefined ? document.getElementsByTagName(tn) : el.getElementsByTagName(tn);
- }
- function sDIS(el,st) {
- el.style.display = st==undefined ? "" : st;
- }
-
- </script>
-
- <style>
- body, table {
- font-family: "Lucida Grande", "trebuchet ms", verdana, Tahoma, Arial, Verdana, Helvetica, sans-serif;
- color: #444444;
- font-size: 11px;
- background-color: #ffffff;
- margin-top: 0px;
- }
- input {
- font-family: "Lucida Grande", "trebuchet ms", verdana, Tahoma, Arial, Verdana, Helvetica, sans-serif;
- border: 1px solid #888888;
- font-size: 10px;
- background-color: #ffffff;
- }
- textarea {
- font-family: Courier New, Bitstream Vera Sans Mono, Courier, sans-serif;
- border: 0px;
- font-size: 12px;
- background-color: #ffffff;
- }
- a {
- text-decoration: none;
- color: black;
- font-weight: normal;
- }
- a:hover {
- color: #0094F2;
- }
- table {
- border: 1px solid #e7e7e7;
- }
- td {
- padding: 2px 5px 2px 5px;
- }
- h1 {
- font-variant: small-caps;
- font-size: 20px;
- margin: 0px;
- }
- hr {
- height: 1px;
- margin-bottom: 5px;
- }
- .button {
- font-size: 10px;
- color: #666666;
- margin: 0px;
- }
- .check {
- border: 0px;
- vertical-align: middle;
- }
- .h {
- font-size: 11px;
- color: #666666;
- font-weight: bold;
- text-align: left;
- margin: 0px;
- border-bottom: 1px solid #e7e7e7;
- padding-bottom: 3px;
- padding-right: 0px;
- }
- .k {
- font-style: italic;
- }
- .l {
- border-bottom: 1px solid #e7e7e7;
- }
- </style>
-
- </head>
- <body>
- <table width="100%" height="98%" cellpadding=0 cellspacing=0 border=0 style="margin-top: 10px; border: 0px;">
- <form action="phpStylist.php" method="POST" name="stylist" enctype="multipart/form-data">
- <tr height=1>
- <td valign=top style="padding: 0px;">
- <table cellpadding=0 cellspacing=0 border=0 style="border: 0px;">
- <tr>
- <td style="padding: 0px;"><h1>phpStylist by Mr. Milk</h1></td>
- <td style="padding-left: 20px;"valign=bottom><i>“because your code may not work, but it must look professional!!!”</i></td>
- </tr>
- </table>
- <hr>
- </td>
- </tr>
- <tr>
- <td valign=top style="padding: 0px;">
- <table width="100%" height="100%" cellpadding=0 cellspacing=0 border=0 style="border: 0px">
- <tr>
- <td width="290" valign=top id="left">
- <table id="g" name="g" width="290" style="margin-bottom: 10px;" cellpadding=0 cellspacing=0 border=0>
- <tr>
- <td id="h" name="h" class="h" nowrap></td>
- <td align=right class="l" nowrap><a href="#" name="a" title="expand/collapse" onclick="collapse(this); setCookie(); return false;">•••</a></td>
- </tr>
- <tr style="display: none;">
- <td id="k" name="k" class="k" colspan=2></td>
- </tr>
- </table>
- <table id="m" style="display: none; margin-bottom: 10px;">
- <tr id="e" name="e" style="display: none;">
- <td colspan=2 nowrap>
- <input type="checkbox" class="check" onclick="setCookie();" value="off"><span></span>
- </td>
- </tr>
- <tr id="i" name="i" style="display: none;">
- <td colspan=2>
- <input type="text" size=2 value="2" onchange="setCookie();"><span></span>
- </td>
- </tr>
- <tr id="f" name="f">
- <td colspan=2 style="padding-top: 10px;">
- <input type="file" name="file" id="file" size=39>
- </td>
- </tr>
- <tr id="x" name="x">
- <td colspan=2 style="padding-top: 0px;">
- <input type="radio" class="check" id="textarea" name="textarea" onclick="switchPanels(this); setCookie();" value="on" checked>show editable text box<br>
- <input type="radio" class="check" id="textarea" name="textarea" onclick="switchPanels(this); setCookie();" value="off">show syntax highlighted code<br>
- <input type="checkbox" class="check" id="iso8859" name="iso8859" onclick="setCookie();" value="off">use ISO-8859-1 charset (default UTF-8)<br>
- <input type="checkbox" class="check" id="nowrap" name="nowrap" onclick="setCookie();" value="off">do not wrap lines in right panel
- </td>
- </tr>
- <tr id="s" name="s">
- <td colspan=2 style="padding-bottom: 10px;">
- <input type="button" name="pv" onclick="submitCode(this);" value=" Preview " class="button">
- <input type="button" name="dl" onclick="submitCode(this);" value=" Download " class="button">
- <input type="button" name="sc" onclick="submitCode(this);" value="Use Sample" class="button">
- <input type="hidden" name="download" id="download">
- </td>
- </tr>
- </table>
- <div id="hide_left"><a href="#" id="hide" onclick="hideLeft(this);" style="color: #0094F2" class="k">hide left panel</a></div>
- </td>
- <td valign=top style="padding-bottom: 10px;">
- <table width="100%" height="100%" cellpadding=0 cellspacing=0 border=0>
- <tr height=1>
- <td style="border-bottom: 1px solid #f5f5f5; padding: 0px; margin: 0px;">
- <div id="hide_top" style="display: none; margin-left: 5px;"></div>
- </td>
- </tr>
- <?echo parseFile();?>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </form>
- </body>
-</html>
-
-<?php
-function parseFile($download = false)
-{
- global $HTTP_POST_FILES;
- $code = "";
- $stylist = new phpStylist();
- if ((isset($_REQUEST['file']) && $_REQUEST['file']!="") || (isset($HTTP_POST_FILES['file']['tmp_name']) && $HTTP_POST_FILES['file']['tmp_name'] != "none" && $HTTP_POST_FILES['file']['tmp_name'] != "")) {
- $file = isset($_REQUEST['file']) ? $_REQUEST['file'] : $HTTP_POST_FILES['file']['tmp_name'];
- $code = loadFile($file);
- if (isset($_REQUEST["iso8859"]) && $_REQUEST["iso8859"]!="off" && !isDownload()) {
- $code = utf8_encode($code);
- }
- }
- elseif (isset($_REQUEST["download"]) && $_REQUEST["download"] == '2') {
- $code = getSampleCode();
- }
- elseif (isset($_REQUEST["ta"]) && $_REQUEST["ta"] != '') {
- $code = stripslashes($_REQUEST["ta"]);
- if (isset($_REQUEST["iso8859"]) && $_REQUEST["iso8859"]!="off" && isDownload()) {
- $code = utf8_decode($code);
- }
- }
- if (!empty($code)) {
- foreach ($_REQUEST as $k => $v) {
- if (isset($stylist->options[strtoupper($k)])) {
- $stylist->options[strtoupper($k)] = $v != "off";
- }
- }
- if (isset($_REQUEST["indent_with_tabs"]) && $_REQUEST["indent_with_tabs"] != "off") {
- $stylist->indent_char = "\t";
- }
- if (isset($_REQUEST["indent_size"]) && $_REQUEST["indent_size"] != "" && $_REQUEST["indent_size"] != "null") {
- $stylist->indent_size = $_REQUEST["indent_size"];
- }
- if (strpos($code, '<?') === false) {
- $code = '<?php ' . $code . ' ?' . '>';
- }
- $formatted = $stylist->formatCode($code);
- $highlight = highlight_string($formatted, true);
- if (isset($HTTP_POST_FILES['file']['tmp_name']) && file_exists($HTTP_POST_FILES['file']['tmp_name'])) {
- unlink($HTTP_POST_FILES['file']['tmp_name']);
- }
- $nowrap = isset($_REQUEST["nowrap"]) && $_REQUEST["nowrap"] == 'on' ? "nowrap" : "";
- $tawrap = $nowrap == "" ? "" : "wrap='off' ";
- $display = isset($_REQUEST["textarea"]) && $_REQUEST["textarea"] == 'on' ? "" : "style='display: none;'";
- $textarea = "<tr id='tx' $display><td valign=top><textarea $tawrap style='width: 100%; height: 100%;' id='ta' name='ta'>" . htmlspecialchars($formatted) . "</textarea></td></tr>";
- $display = isset($_REQUEST["textarea"]) && $_REQUEST["textarea"] == 'on' ? "style='display: none;'" : "";
- $frame = "<tr id='hl' $display><td valign=top $nowrap>$highlight</td></tr>";
- }
- else {
- $nowrap = isset($_REQUEST["nowrap"]) && $_REQUEST["nowrap"] == 'on' ? "nowrap" : "";
- $tawrap = $nowrap == "" ? "" : "wrap='off' ";
- $textarea = "<tr id='tx'><td valign=top><textarea $tawrap style='width: 100%; height=100%;' id='ta' name='ta'></textarea></td></tr>";
- $frame = "<tr id='hl' style='display: none;'><td valign=top $nowrap></td></tr>";
- }
- if ($download) {
- return isset($formatted) ? $formatted : "";
- }
- else {
- return $textarea . $frame;
- }
-}
-
-function isCommandLine() {
- global $argv;
- return ((is_array($argv) && count($argv)>0) || (is_array($_SERVER['argv']) && count($_SERVER['argv'])>0) || (is_array($GLOBALS['HTTP_SERVER_VARS']['argv']) && count($GLOBALS['HTTP_SERVER_VARS']['argv'])>0));
-}
-
-function processBatch() {
-
- global $argv;
- if (is_array($argv)) {
- $options = $argv;
- }
- elseif (is_array($_SERVER['argv'])) {
- $options = $_SERVER['argv'];
- }
- elseif (is_array($GLOBALS['HTTP_SERVER_VARS']['argv'])) {
- $options = $GLOBALS['HTTP_SERVER_VARS']['argv'];
- }
- foreach($options as $index=>$option) {
- if($option=="--help") {
- echo "phpStylist v0.8 by Mr. Milk\n";
- echo "usage: phpStylist source_file options\n\n";
- echo "Indentation and General Formatting:\n";
- echo "--indent_size n\n";
- echo "--indent_with_tabs\n";
- echo "--keep_redundant_lines\n";
- echo "--space_inside_parentheses\n";
- echo "--space_outside_parentheses\n";
- echo "--space_after_comma\n\n";
- echo "Operators:\n";
- echo "--space_around_assignment\n";
- echo "--align_var_assignment\n";
- echo "--space_around_comparison\n";
- echo "--space_around_arithmetic\n";
- echo "--space_around_logical\n";
- echo "--space_around_colon_question\n\n";
- echo "Functions, Classes and Objects:\n";
- echo "--line_before_function\n";
- echo "--line_before_curly_function\n";
- echo "--line_after_curly_function\n";
- echo "--space_around_obj_operator\n";
- echo "--space_around_double_colon\n\n";
- echo "Control Structures:\n";
- echo "--space_after_if\n";
- echo "--else_along_curly\n";
- echo "--line_before_curly\n";
- echo "--add_missing_braces\n";
- echo "--line_after_break\n";
- echo "--space_inside_for\n";
- echo "--indent_case\n\n";
- echo "Arrays and Concatenation:\n";
- echo "--line_before_array\n";
- echo "--vertical_array\n";
- echo "--align_array_assignment\n";
- echo "--space_around_double_arrow\n";
- echo "--vertical_concat\n";
- echo "--space_around_concat\n\n";
- echo "Comments:\n";
- echo "--line_before_comment_multi\n";
- echo "--line_after_comment_multi\n";
- echo "--line_before_comment\n";
- echo "--line_after_comment\n";
- exit;
- }
- if($index==1) {
- $_REQUEST["file"] = $option;
- }
- elseif($option=="--indent_size") {
- $_REQUEST["indent_size"] = $options[$index+1];
- }
- elseif($index>0 && $options[$index-1]!="indent_size") {
- $_REQUEST[substr($option, 2)] = "on";
- }
- }
- $_REQUEST["download"] = 2;
- $str = parseFile(true);
- echo $str;
- exit;
-
-}
-
-function isDownload()
-{
- return isset($_REQUEST["download"]) && $_REQUEST["download"] == '1';
-}
-
-function downloadFile()
-{
- global $HTTP_POST_FILES;
- $charset = isset($_REQUEST["iso8859"]) && $_REQUEST["iso8859"]!="off" ? "ISO-8859-1" : "UTF-8";
- $str = parseFile(true);
- if ($str != "") {
- $fn = isset($HTTP_POST_FILES['file']) && $HTTP_POST_FILES['file']['name'] != '' ? $HTTP_POST_FILES['file']['name'] : "phpStylist.php";
- header("Expires: Wed, 20 Jun 2007 00:00:00 GMT");
- header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
- header("Cache-Control: no-store, no-cache, must-revalidate");
- header("Cache-Control: post-check=0, pre-check=0", false);
- header("Pragma: no-cache");
- header("Content-Type: text/plain; charset=".$charset);
- header('Content-Disposition: attachment; filename="' . $fn . '";');
- header("Pragma: public");
- header("Expires: 0");
- header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
- header("Content-Transfer-Encoding: binary");
- }
- echo $str;
- exit;
-}
-
-function loadFile($filename)
-{
- $code = "";
- if(filesize($filename)>0) {
- $f = fopen("$filename", "rb");
- $code = fread($f, filesize($filename));
- fclose($f);
- }
- return $code;
-}
-
-function getSampleCode()
-{
- $sample = 'PD9waHANCi8qKioNCiAqIHBocFN0eWxpc3QgZGVtb25zdHJhdGlvbiBjb2RlDQogKiBieSBNci4gTWlsayAoYWthIE1hcmNlbG8gTGVpdGUpDQogKiBtcm1pbGtAYW55c29mdC5jb20uYnINCiAqLw0KDQokd29ya19ob3VycyA9IDEyOw0KJHRpbWUgPSAkd29ya19ob3VycyoyOw0KJGRldmVsb3BlciA9ICRwb29yZ3V5Ow0KJGdvZCA9ICQkbXJnYXRlczsNCiR3YWdlID0gJHdvcmtfaG91cnMvMjsNCiRib251cyA9ICR3YWdlICogMC4wMDAwMTsNCiR3YXJuZWQgPSBmYWxzZTsNCiRwcm9wZXJ0aWVzID0gYXJyYXkoImdhdGVzIj0+YXJyYXkoImV2ZXJ5dGhpbmciPT4ieWVzIiwgImFueXRoaW5nIj0+InllcyIsICJhbnl0aGluZyBlbHNlIj0+InllcyIsICJ5b3UiPT4iY29tcGxldGVseSIpLCAiZGV2ZWxvcGVyIj0+YXJyYXkoImFuIG9sZCBjYXIiPT4iMiBpbnN0YWxsbWVudHMiLCAibW9kZGVkIGNvbXB1dGVyIj0+ImFsbW9zdCIsICJiZWVyIG11ZyI9PiJzdXJlISIpKTsNCiR3YXJuaW5nID0gIk1yLiAiLiRkZXZlbG9wZXIuIiwgeW91IG1hZGUgIi4gJGdvZC4gIiB1bmhhcHB5IHRvZGF5LiI7DQovLyBkZXZlbG9wZXIncyBtaXNlcmFibGUgbGlmZQ0KZm9yKCR5b3U9JGRldmVsb3BlcjskeW91PCRnb2Q7JHlvdSsrKSB7DQogIC8vIGxldCdzIHVzZSBoaXMgcG90ZW50aWFsDQogIGlmKCR3b3JrPD0kdGltZSo0KSB7DQogICAgJHdvcmsrKzsNCiAgICAkc2xlZXAtLTsNCiAgICAkZW5yaWNoR2F0ZXMoKTsNCiAgfQ0KICAvLyBjaGlja2VuaW5nIG91dCBodWg/DQogIGVsc2UgaWYoJHRpcmVkKSB7DQogICAgaWYoISR3YXJuZWQpIHsNCiAgICAgICRzY2FyZVRvRGVhdGgoJGRldmVsb3Blciwkd2FybmluZyk7DQogICAgICAkYm9udXMvPTI7DQogICAgfQ0KICAgIGVsc2UgaWYoJGJvbnVzID4gMCkNCiAgICAgICRib251cz0wOw0KICAgIGVsc2Ugew0KICAgICAgZmlyZSgkZGV2ZWxvcGVyKTsNCiAgICAgICRyZXBsYWNlbWVudCA9IGZpbmRJZGlvdCgpOw0KICAgICAgaGlyZSgkcmVwbGFjZW1lbnQsICR3YWdlLzIpOw0KICAgIH0NCiAgfQ0KICAvLyB0aGlzIGd1eSBjYW4gdGFrZSBpdA0KICBlbHNlaWYoJHdhZ2U+MCkNCiAgICAkd2FnZS0tOw0KICAvLyBoYXZlIHdlIHJlYWxseSBmb3VuZCB3aG8gd2UndmUgYmVlbiBsb29raW5nIGZvcj8NCiAgZWxzZSB7DQogICAgJGVucmljaEdhdGVzKCk7DQogICAgJGhlYWx0aF9sZXZlbCA9IGVtZXJnZW5jeVJvb20oJGRldmVsb3Blcik7DQogICAgLyogc2FuaXR5IGNoZWNrISAqLw0KICAgIHN3aXRjaCgkaGVhbHRoX2xldmVsKSB7DQogICAgICBjYXNlICJncmVhdCI6DQogICAgICAgIGZpcmUoJGRvY3Rvcik7DQogICAgICAgIHVuc2V0KCRwcm9wZXJ0aWVzWyJkZXZlbG9wZXIiXSk7DQogICAgICAgIHVuc2V0KCRwcm9wZXJ0aWVzWyJnYXRlcyJdWyJ5b3UiXSk7DQogICAgICAgIGN1Y2tvb3NOZXN0KCRkZXZlbG9wZXIpOw0KICAgICAgICAkcmVwbGFjZW1lbnQgPSBmaW5kSWRpb3QoKTsNCiAgICAgICAgaGlyZSgkcmVwbGFjZW1lbnQsICRtaW5fd2FnZSk7DQogICAgICAgIGJyZWFrOw0KICAgICAgY2FzZSAiZ29vZCI6DQogICAgICBjYXNlICJiYWQiOg0KICAgICAgICBiYWNrVG9Xb3JrKCk7DQogICAgICBicmVhazsNCiAgICAgIGNhc2UgInRlcm1pbmFsIjoNCiAgICAgICAgZmlyZSgkZGV2ZWxvcGVyKTsNCiAgICAgICAgJHJlcGxhY2VtZW50ID0gJGhhc19icm90aGVyID8gImJyb3RoZXIiIDogImZyaWVuZCI7DQogICAgICAgIGhpcmUoJHJlcGxhY2VtZW50LCAkbWluX3dhZ2UvMik7DQogICAgICBicmVhazsNCiAgICAgIGRlZmF1bHQ6DQogICAgfQ0KICB9DQp9DQovKioqDQogKiBGdW5jdGlvbnMNCiAqLw0KDQpmdW5jdGlvbiBlbWVyZ2VuY3lSb29tKCR3aG8pIHsNCiAgJGhlYWx0aHkgPWZhbHNlOw0KICAkaW50ZXJuID0gMDsNCiAgd2hpbGUoISRoZWFsdGh5ICYmICRoZWFsdGh5IT0iZW5kIikNCiAgICAkaGVhbHRoeSA9IHNjcnVic0ludGVybk9waW5pb25zKCR3aG8sICsrJGludGVybik7DQogICRpbnRlcm4gPSAwOw0KICB3aGlsZSghJGhlYWx0aHkgJiYgJGhlYWx0aHkhPSJlbmQiKQ0KICAgICRoZWFsdGh5ID0gZXJJbnRlcm5PcGluaW9ucygkd2hvLCAkaW50ZXJuKyspOw0KICByZXR1cm4gJGhlYWx0aHk7DQp9DQoNCmZ1bmN0aW9uIGhpcmUoJHdobywgJHdhZ2UpIHsNCiAgJGRldmVsb3BlciA9IG5ldyBTbGF2ZSgpOw0KICAkZGV2ZWxvcGVyLT5wZXJzb24gPSAkd2hvOw0KICAkZGV2ZWxvcGVyLT5zZXRTYWxhcnkoJHdhZ2UpOw0KICAkY29zdCA9IGhyUm91dGluZXM6OmdldEhpcmluZ0Nvc3QoKTsNCiAgJGRldmVsb3Blci0+c2V0RGVidCgkY29zdCk7DQp9DQoNCmZ1bmN0aW9uIGZpcmUoJHdobykgew0KICBjYWxsU2VjdXJpdHkoKTsNCiAgZ2V0SGltT3V0KCR3aG8pOw0KfQ0KDQo/Pg0K';
- return base64_decode($sample);
-}
-
-class phpStylist
-{
- var $indent_size = 2;
- var $indent_char = " ";
- var $block_size = 3;
- var $options = array(
- "SPACE_INSIDE_PARENTHESES" => false,
- "SPACE_OUTSIDE_PARENTHESES" => false,
- "SPACE_INSIDE_FOR" => false,
- "SPACE_AFTER_IF" => false,
- "SPACE_AFTER_COMMA" => false,
- "SPACE_AROUND_OBJ_OPERATOR" => false,
- "SPACE_AROUND_DOUBLE_COLON" => false,
- "SPACE_AROUND_DOUBLE_ARROW" => false,
- "SPACE_AROUND_ASSIGNMENT" => false,
- "SPACE_AROUND_COMPARISON" => false,
- "SPACE_AROUND_COLON_QUESTION" => false,
- "SPACE_AROUND_LOGICAL" => false,
- "SPACE_AROUND_ARITHMETIC" => false,
- "SPACE_AROUND_CONCAT" => false,
- "LINE_BEFORE_FUNCTION" => false,
- "LINE_BEFORE_CURLY" => false,
- "LINE_BEFORE_CURLY_FUNCTION" => false,
- "LINE_AFTER_CURLY_FUNCTION" => false,
- "LINE_BEFORE_ARRAY" => false,
- "LINE_BEFORE_COMMENT" => false,
- "LINE_AFTER_COMMENT" => false,
- "LINE_BEFORE_COMMENT_MULTI" => false,
- "LINE_AFTER_COMMENT_MULTI" => false,
- "LINE_AFTER_BREAK" => false,
- "VERTICAL_CONCAT" => false,
- "VERTICAL_ARRAY" => false,
- "INDENT_CASE" => false,
- "KEEP_REDUNDANT_LINES" => false,
- "ADD_MISSING_BRACES" => false,
- "ALIGN_ARRAY_ASSIGNMENT" => false,
- "ALIGN_VAR_ASSIGNMENT" => false,
- "ELSE_ALONG_CURLY" => false,
- );
- var $_new_line = "\n";
- var $_indent = 0;
- var $_for_idx = 0;
- var $_code = "";
- var $_log = false;
- var $_pointer = 0;
- var $_tokens = 0;
-
- function phpStylist()
- {
- define("S_OPEN_CURLY", "{");
- define("S_CLOSE_CURLY", "}");
- define("S_OPEN_BRACKET", "[");
- define("S_CLOSE_BRACKET", "]");
- define("S_OPEN_PARENTH", "(");
- define("S_CLOSE_PARENTH", ")");
- define("S_SEMI_COLON", ";");
- define("S_COMMA", ",");
- define("S_CONCAT", ".");
- define("S_COLON", ":");
- define("S_QUESTION", "?");
- define("S_EQUAL", "=");
- define("S_EXCLAMATION", "!");
- define("S_IS_GREATER", ">");
- define("S_IS_SMALLER", "<");
- define("S_MINUS", "-");
- define("S_PLUS", "+");
- define("S_TIMES", "*");
- define("S_DIVIDE", "/");
- define("S_MODULUS", "%");
- define("S_REFERENCE", "&");
- define("S_QUOTE", '"');
- define("S_AT", "@");
- define("S_DOLLAR", "$");
- define("S_ABSTRACT", "abstract");
- define("S_INTERFACE", "interface");
- define("S_FINAL", "final");
- define("S_PUBLIC", "public");
- define("S_PRIVATE", "private");
- define("S_PROTECTED", "protected");
- if (defined("T_ML_COMMENT")) {
- define("T_DOC_COMMENT", T_ML_COMMENT);
- }
- elseif (defined("T_DOC_COMMENT")) {
- define("T_ML_COMMENT", T_DOC_COMMENT);
- }
- }
-
- function formatCode($source = '')
- {
- $in_for = false;
- $in_break = false;
- $in_function = false;
- $in_concat = false;
- $space_after = false;
- $curly_open = false;
- $array_level = 0;
- $arr_parenth = array();
- $switch_level = 0;
- $if_level = 0;
- $if_pending = 0;
- $else_pending = false;
- $if_parenth = array();
- $switch_arr = array();
- $halt_parser = false;
- $after = false;
- $this->_tokens = token_get_all($source);
- foreach ($this->_tokens as $index => $token) {
- list($id, $text) = $this->_get_token($token);
- $this->_pointer = $index;
- if ($halt_parser && $id != S_QUOTE) {
- $this->_append_code($text, false);
- continue;
- }
- if (substr(phpversion(), 0, 1) == "4" && $id == T_STRING) {
- switch (strtolower(trim($text))) {
- case S_ABSTRACT:
- case S_INTERFACE:
- case S_FINAL:
- case S_PUBLIC:
- case S_PRIVATE:
- case S_PROTECTED:
- $id = T_PUBLIC;
- default:
- }
- }
- switch ($id) {
- case S_OPEN_CURLY:
- $condition = $in_function ? $this->options["LINE_BEFORE_CURLY_FUNCTION"] : $this->options["LINE_BEFORE_CURLY"];
- $this->_set_indent( + 1);
- $this->_append_code((!$condition ? ' ' : $this->_get_crlf_indent(false, - 1)) . $text . $this->_get_crlf($this->options["LINE_AFTER_CURLY_FUNCTION"] && $in_function && !$this->_is_token_lf()) . $this->_get_crlf_indent());
- $in_function = false;
- break;
-
- case S_CLOSE_CURLY:
- if ($curly_open) {
- $curly_open = false;
- $this->_append_code(trim($text));
- }
- else {
- if (($in_break || $this->_is_token(S_CLOSE_CURLY)) && $switch_level > 0 && $switch_arr["l" . $switch_level] > 0 && $switch_arr["s" . $switch_level] == $this->_indent - 2) {
- if ($this->options["INDENT_CASE"]) {
- $this->_set_indent( - 1);
- }
- $switch_arr["l" . $switch_level]--;
- $switch_arr["c" . $switch_level]--;
- }
- while ($switch_level > 0 && $switch_arr["l" . $switch_level] == 0 && $this->options["INDENT_CASE"]) {
- unset($switch_arr["s" . $switch_level]);
- unset($switch_arr["c" . $switch_level]);
- unset($switch_arr["l" . $switch_level]);
- $switch_level--;
- if ($switch_level > 0) {
- $switch_arr["l" . $switch_level]--;
- }
- $this->_set_indent( - 1);
- $this->_append_code($this->_get_crlf_indent() . $text . $this->_get_crlf_indent());
- $text = '';
- }
- if ($text != '') {
- $this->_set_indent( - 1);
- $this->_append_code($this->_get_crlf_indent() . $text . $this->_get_crlf_indent());
- }
- }
- break;
-
- case S_SEMI_COLON:
- if (($in_break || $this->_is_token(S_CLOSE_CURLY)) && $switch_level > 0 && $switch_arr["l" . $switch_level] > 0 && $switch_arr["s" . $switch_level] == $this->_indent - 2) {
- if ($this->options["INDENT_CASE"]) {
- $this->_set_indent( - 1);
- }
- $switch_arr["l" . $switch_level]--;
- $switch_arr["c" . $switch_level]--;
- }
- if ($in_concat) {
- $this->_set_indent( - 1);
- $in_concat = false;
- }
- $this->_append_code($text . $this->_get_crlf($this->options["LINE_AFTER_BREAK"] && $in_break) . $this->_get_crlf_indent($in_for));
- while ($if_pending > 0) {
- $text = $this->options["ADD_MISSING_BRACES"] ? "}" : "";
- $this->_set_indent( - 1);
- if ($text != "") {
- $this->_append_code($this->_get_crlf_indent() . $text . $this->_get_crlf_indent());
- }
- else {
- $this->_append_code($this->_get_crlf_indent());
- }
- $if_pending--;
- if ($this->_is_token(array(T_ELSE, T_ELSEIF))) {
- break;
- }
- }
- if ($this->_for_idx == 0) {
- $in_for = false;
- }
- $in_break = false;
- $in_function = false;
- break;
-
- case S_OPEN_BRACKET:
- case S_CLOSE_BRACKET:
- $this->_append_code($text);
- break;
-
- case S_OPEN_PARENTH:
- if ($if_level > 0) {
- $if_parenth["i" . $if_level]++;
- }
- if ($array_level > 0) {
- $arr_parenth["i" . $array_level]++;
- if ($this->_is_token(array(T_ARRAY), true) && !$this->_is_token(S_CLOSE_PARENTH)) {
- $this->_set_indent( + 1);
- $this->_append_code((!$this->options["LINE_BEFORE_ARRAY"] ? '' : $this->_get_crlf_indent(false, - 1)) . $text . $this->_get_crlf_indent());
- break;
- }
- }
- $this->_append_code($this->_get_space($this->options["SPACE_OUTSIDE_PARENTHESES"] || $space_after) . $text . $this->_get_space($this->options["SPACE_INSIDE_PARENTHESES"]));
- $space_after = false;
- break;
-
- case S_CLOSE_PARENTH:
- if ($array_level > 0) {
- $arr_parenth["i" . $array_level]--;
- if ($arr_parenth["i" . $array_level] == 0) {
- $comma = substr(trim($this->_code), - 1) != "," && $this->options['VERTICAL_ARRAY'] ? "," : "";
- $this->_set_indent( - 1);
- $this->_append_code($comma . $this->_get_crlf_indent() . $text . $this->_get_crlf_indent());
- unset($arr_parenth["i" . $array_level]);
- $array_level--;
- break;
- }
- }
- $this->_append_code($this->_get_space($this->options["SPACE_INSIDE_PARENTHESES"]) . $text . $this->_get_space($this->options["SPACE_OUTSIDE_PARENTHESES"]));
- if ($if_level > 0) {
- $if_parenth["i" . $if_level]--;
- if ($if_parenth["i" . $if_level] == 0) {
- if (!$this->_is_token(S_OPEN_CURLY) && !$this->_is_token(S_SEMI_COLON)) {
- $text = $this->options["ADD_MISSING_BRACES"] ? "{" : "";
- $this->_set_indent( + 1);
- $this->_append_code((!$this->options["LINE_BEFORE_CURLY"] || $text == "" ? ' ' : $this->_get_crlf_indent(false, - 1)) . $text . $this->_get_crlf_indent());
- $if_pending++;
- }
- unset($if_parenth["i" . $if_level]);
- $if_level--;
- }
- }
- break;
-
- case S_COMMA:
- if ($array_level > 0) {
- $this->_append_code($text . $this->_get_crlf_indent($in_for));
- }
- else {
- $this->_append_code($text . $this->_get_space($this->options["SPACE_AFTER_COMMA"]));
- if ($this->_is_token(S_OPEN_PARENTH)) {
- $space_after = $this->options["SPACE_AFTER_COMMA"];
- }
- }
- break;
-
- case S_CONCAT:
- $condition = $this->options["SPACE_AROUND_CONCAT"];
- if ($this->_is_token(S_OPEN_PARENTH)) {
- $space_after = $condition;
- }
- if ($this->options["VERTICAL_CONCAT"]) {
- if (!$in_concat) {
- $in_concat = true;
- $this->_set_indent( + 1);
- }
- $this->_append_code($this->_get_space($condition) . $text . $this->_get_crlf_indent());
- }
- else {
- $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition));
- }
- break;
-
- case T_CONCAT_EQUAL:
- case T_DIV_EQUAL:
- case T_MINUS_EQUAL:
- case T_PLUS_EQUAL:
- case T_MOD_EQUAL:
- case T_MUL_EQUAL:
- case T_AND_EQUAL:
- case T_OR_EQUAL:
- case T_XOR_EQUAL:
- case T_SL_EQUAL:
- case T_SR_EQUAL:
- case S_EQUAL:
- $condition = $this->options["SPACE_AROUND_ASSIGNMENT"];
- if ($this->_is_token(S_OPEN_PARENTH)) {
- $space_after = $condition;
- }
- $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition));
- break;
-
- case T_IS_EQUAL:
- case S_IS_GREATER:
- case T_IS_GREATER_OR_EQUAL:
- case T_IS_SMALLER_OR_EQUAL:
- case S_IS_SMALLER:
- case T_IS_IDENTICAL:
- case T_IS_NOT_EQUAL:
- case T_IS_NOT_IDENTICAL:
- $condition = $this->options["SPACE_AROUND_COMPARISON"];
- if ($this->_is_token(S_OPEN_PARENTH)) {
- $space_after = $condition;
- }
- $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition));
- break;
-
- case T_BOOLEAN_AND:
- case T_BOOLEAN_OR:
- case T_LOGICAL_AND:
- case T_LOGICAL_OR:
- case T_LOGICAL_XOR:
- case T_SL:
- case T_SR:
- $condition = $this->options["SPACE_AROUND_LOGICAL"];
- if ($this->_is_token(S_OPEN_PARENTH)) {
- $space_after = $condition;
- }
- $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition));
- break;
-
- case T_DOUBLE_COLON:
- $condition = $this->options["SPACE_AROUND_DOUBLE_COLON"];
- $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition));
- break;
-
- case S_COLON:
- if ($switch_level > 0 && $switch_arr["l" . $switch_level] > 0 && $switch_arr["c" . $switch_level] < $switch_arr["l" . $switch_level]) {
- $switch_arr["c" . $switch_level]++;
- if ($this->options["INDENT_CASE"]) {
- $this->_set_indent( + 1);
- }
- $this->_append_code($text . $this->_get_crlf_indent());
- }
- else {
- $condition = $this->options["SPACE_AROUND_COLON_QUESTION"];
- if ($this->_is_token(S_OPEN_PARENTH)) {
- $space_after = $condition;
- }
- $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition));
- }
- if (($in_break || $this->_is_token(S_CLOSE_CURLY)) && $switch_level > 0 && $switch_arr["l" . $switch_level] > 0) {
- if ($this->options["INDENT_CASE"]) {
- $this->_set_indent( - 1);
- }
- $switch_arr["l" . $switch_level]--;
- $switch_arr["c" . $switch_level]--;
- }
- break;
-
- case S_QUESTION:
- $condition = $this->options["SPACE_AROUND_COLON_QUESTION"];
- if ($this->_is_token(S_OPEN_PARENTH)) {
- $space_after = $condition;
- }
- $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition));
- break;
-
- case T_DOUBLE_ARROW:
- $condition = $this->options["SPACE_AROUND_DOUBLE_ARROW"];
- if ($this->_is_token(S_OPEN_PARENTH)) {
- $space_after = $condition;
- }
- $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition));
- break;
-
- case S_MINUS:
- case S_PLUS:
- case S_TIMES:
- case S_DIVIDE:
- case S_MODULUS:
- $condition = $this->options["SPACE_AROUND_ARITHMETIC"];
- if ($this->_is_token(S_OPEN_PARENTH)) {
- $space_after = $condition;
- }
- $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition));
- break;
-
- case T_OBJECT_OPERATOR:
- $condition = $this->options["SPACE_AROUND_OBJ_OPERATOR"];
- $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition));
- break;
-
- case T_FOR:
- $in_for = true;
- case T_FOREACH:
- case T_WHILE:
- case T_DO:
- case T_IF:
- case T_SWITCH:
- $space_after = $this->options["SPACE_AFTER_IF"];
- $this->_append_code($text . $this->_get_space($space_after), false);
- if ($id == T_SWITCH) {
- $switch_level++;
- $switch_arr["s" . $switch_level] = $this->_indent;
- $switch_arr["l" . $switch_level] = 0;
- $switch_arr["c" . $switch_level] = 0;
- }
- $if_level++;
- $if_parenth["i" . $if_level] = 0;
- break;
-
- case T_FUNCTION:
- case T_CLASS:
- case T_INTERFACE:
- case T_FINAL:
- case T_ABSTRACT:
- case T_PUBLIC:
- case T_PROTECTED:
- case T_PRIVATE:
- if (!$in_function) {
- if ($this->options["LINE_BEFORE_FUNCTION"]) {
- $this->_append_code($this->_get_crlf($after || !$this->_is_token(array(T_COMMENT, T_ML_COMMENT, T_DOC_COMMENT), true)) . $this->_get_crlf_indent() . $text . $this->_get_space());
- $after = false;
- }
- else {
- $this->_append_code($text . $this->_get_space(), false);
- }
- $in_function = true;
- }
- else {
- $this->_append_code($this->_get_space() . $text . $this->_get_space());
- }
- break;
-
- case T_START_HEREDOC:
- $this->_append_code($this->_get_space($this->options["SPACE_AROUND_ASSIGNMENT"]) . $text);
- break;
-
- case T_END_HEREDOC:
- $this->_append_code($this->_get_crlf() . $text . $this->_get_crlf_indent());
- break;
-
- case T_COMMENT:
- case T_ML_COMMENT:
- case T_DOC_COMMENT:
- if (is_array($this->_tokens[$index - 1])) {
- $pad = $this->_tokens[$index - 1][1];
- $i = strlen($pad) - 1;
- $k = "";
- while (substr($pad, $i, 1) != "\n" && substr($pad, $i, 1) != "\r" && $i >= 0) {
- $k .= substr($pad, $i--, 1);
- }
- $text = preg_replace("/\r?\n$k/", $this->_get_crlf_indent(), $text);
- }
- $after = $id == (T_COMMENT && preg_match("/^\/\//", $text)) ? $this->options["LINE_AFTER_COMMENT"] : $this->options["LINE_AFTER_COMMENT_MULTI"];
- $before = $id == (T_COMMENT && preg_match("/^\/\//", $text)) ? $this->options["LINE_BEFORE_COMMENT"] : $this->options["LINE_BEFORE_COMMENT_MULTI"];
- if ($prev = $this->_is_token(S_OPEN_CURLY, true, $index, true)) {
- $before = $before && !$this->_is_token_lf(true, $prev);
- }
- $after = $after && (!$this->_is_token_lf() || !$this->options["KEEP_REDUNDANT_LINES"]);
- if ($before) {
- $this->_append_code($this->_get_crlf(!$this->_is_token(array(T_COMMENT), true)) . $this->_get_crlf_indent() . trim($text) . $this->_get_crlf($after) . $this->_get_crlf_indent());
- }
- else {
- $this->_append_code(trim($text) . $this->_get_crlf($after) . $this->_get_crlf_indent(), false);
- }
- break;
-
- case T_DOLLAR_OPEN_CURLY_BRACES:
- case T_CURLY_OPEN:
- $curly_open = true;
- case T_NUM_STRING:
- case T_BAD_CHARACTER:
- $this->_append_code(trim($text));
- break;
-
- case T_EXTENDS:
- case T_IMPLEMENTS:
- case T_INSTANCEOF:
- case T_AS:
- $this->_append_code($this->_get_space() . $text . $this->_get_space());
- break;
-
- case S_DOLLAR:
- case S_REFERENCE:
- case T_INC:
- case T_DEC:
- $this->_append_code(trim($text), false);
- break;
-
- case T_WHITESPACE:
- $redundant = "";
- if ($this->options["KEEP_REDUNDANT_LINES"]) {
- $lines = preg_match_all("/\r?\n/", $text, $matches);
- $lines = $lines > 0 ? $lines - 1 : 0;
- $redundant = $lines > 0 ? str_repeat($this->_new_line, $lines) : "";
- $current_indent = $this->_get_indent();
- if (substr($this->_code, strlen($current_indent) * - 1) == $current_indent && $lines > 0) {
- $redundant .= $current_indent;
- }
- }
- if($this->_is_token(array(T_OPEN_TAG), true)) {
- $this->_append_code($text, false);
- }
- else {
- $this->_append_code($redundant . trim($text), false);
- }
- break;
-
- case S_QUOTE:
- $this->_append_code($text, false);
- $halt_parser = !$halt_parser;
- break;
-
- case T_ARRAY:
- if ($this->options["VERTICAL_ARRAY"]) {
- $next = $this->_is_token(array(T_DOUBLE_ARROW), true);
- $next |= $this->_is_token(S_EQUAL, true);
- $next |= $array_level>0;
- if ($next) {
- $next = $this->_is_token(S_OPEN_PARENTH, false, $index, true);
- if ($next) {
- $next = !$this->_is_token(S_CLOSE_PARENTH, false, $next);
- }
- }
- if ($next) {
- $array_level++;
- $arr_parenth["i" . $array_level] = 0;
- }
- }
- case T_STRING:
- case T_CONSTANT_ENCAPSED_STRING:
- case T_ENCAPSED_AND_WHITESPACE:
- case T_VARIABLE:
- case T_CHARACTER:
- case T_STRING_VARNAME:
- case S_AT:
- case S_EXCLAMATION:
- case T_OPEN_TAG:
- case T_OPEN_TAG_WITH_ECHO:
- $this->_append_code($text, false);
- break;
-
- case T_CLOSE_TAG:
- $this->_append_code($text, !$this->_is_token_lf(true));
- break;
-
- case T_CASE:
- case T_DEFAULT:
- if ($switch_arr["l" . $switch_level] > 0 && $this->options["INDENT_CASE"]) {
- $switch_arr["c" . $switch_level]--;
- $this->_set_indent( - 1);
- $this->_append_code($this->_get_crlf_indent() . $text . $this->_get_space());
- }
- else {
- $switch_arr["l" . $switch_level]++;
- $this->_append_code($text . $this->_get_space(), false);
- }
- break;
-
- case T_INLINE_HTML:
- $this->_append_code($text, false);
- break;
-
- case T_BREAK:
- case T_CONTINUE:
- $in_break = true;
- case T_VAR:
- case T_GLOBAL:
- case T_STATIC:
- case T_CONST:
- case T_ECHO:
- case T_PRINT:
- case T_INCLUDE:
- case T_INCLUDE_ONCE:
- case T_REQUIRE:
- case T_REQUIRE_ONCE:
- case T_DECLARE:
- case T_EMPTY:
- case T_ISSET:
- case T_UNSET:
- case T_DNUMBER:
- case T_LNUMBER:
- case T_RETURN:
- case T_EVAL:
- case T_EXIT:
- case T_LIST:
- case T_CLONE:
- case T_NEW:
- case T_FUNC_C:
- case T_CLASS_C:
- case T_FILE:
- case T_LINE:
- $this->_append_code($text . $this->_get_space(), false);
- break;
-
- case T_ELSEIF:
- $space_after = $this->options["SPACE_AFTER_IF"];
- $added_braces = $this->_is_token(S_SEMI_COLON, true) && $this->options["ADD_MISSING_BRACES"];
- $condition = $this->options['ELSE_ALONG_CURLY'] && ($this->_is_token(S_CLOSE_CURLY, true) || $added_braces);
- $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($space_after), $condition);
- $if_level++;
- $if_parenth["i" . $if_level] = 0;
- break;
-
- case T_ELSE:
- $added_braces = $this->_is_token(S_SEMI_COLON, true) && $this->options["ADD_MISSING_BRACES"];
- $condition = $this->options['ELSE_ALONG_CURLY'] && ($this->_is_token(S_CLOSE_CURLY, true) || $added_braces);
- $this->_append_code($this->_get_space($condition) . $text, $condition);
- if (!$this->_is_token(S_OPEN_CURLY) && !$this->_is_token(array(T_IF))) {
- $text = $this->options["ADD_MISSING_BRACES"] ? "{" : "";
- $this->_set_indent( + 1);
- $this->_append_code((!$this->options["LINE_BEFORE_CURLY"] || $text == "" ? ' ' : $this->_get_crlf_indent(false, - 1)) . $text . $this->_get_crlf_indent());
- $if_pending++;
- }
- break;
-
- default:
- $this->_append_code($text . ' ', false);
- break;
- }
- }
- return $this->_align_operators();
- }
-
- function _get_token($token)
- {
- if (is_string($token)) {
- return array($token, $token);
- }
- else {
- return $token;
- }
- }
-
- function _append_code($code = "", $trim = true)
- {
- if ($trim) {
- $this->_code = rtrim($this->_code) . $code;
- }
- else {
- $this->_code .= $code;
- }
- }
-
- function _get_crlf_indent($in_for = false, $increment = 0)
- {
- if ($in_for) {
- $this->_for_idx++;
- if ($this->_for_idx > 2) {
- $this->_for_idx = 0;
- }
- }
- if ($this->_for_idx == 0 || !$in_for) {
- return $this->_get_crlf() . $this->_get_indent($increment);
- }
- else {
- return $this->_get_space($this->options["SPACE_INSIDE_FOR"]);
- }
- }
-
- function _get_crlf($true = true)
- {
- return $true ? $this->_new_line : "";
- }
-
- function _get_space($true = true)
- {
- return $true ? " " : "";
- }
-
- function _get_indent($increment = 0)
- {
- return str_repeat($this->indent_char, ($this->_indent + $increment) * $this->indent_size);
- }
-
- function _set_indent($increment)
- {
- $this->_indent += $increment;
- if ($this->_indent < 0) {
- $this->_indent = 0;
- }
- }
-
- function _is_token($token, $prev = false, $i = 99999, $idx = false)
- {
- if ($i == 99999) {
- $i = $this->_pointer;
- }
- if ($prev) {
- while (--$i >= 0 && is_array($this->_tokens[$i]) && $this->_tokens[$i][0] == T_WHITESPACE);
- }
- else {
- while (++$i < count($this->_tokens)-1 && is_array($this->_tokens[$i]) && $this->_tokens[$i][0] == T_WHITESPACE);
- }
- if (is_string($this->_tokens[$i]) && $this->_tokens[$i] == $token) {
- return $idx ? $i : true;
- }
- elseif (is_array($token) && is_array($this->_tokens[$i])) {
- if (in_array($this->_tokens[$i][0], $token)) {
- return $idx ? $i : true;
- }
- elseif ($prev && $this->_tokens[$i][0] == T_OPEN_TAG) {
- return $idx ? $i : true;
- }
- }
- return false;
- }
-
- function _is_token_lf($prev = false, $i = 99999)
- {
- if ($i == 99999) {
- $i = $this->_pointer;
- }
- if ($prev) {
- $count = 0;
- while (--$i >= 0 && is_array($this->_tokens[$i]) && $this->_tokens[$i][0] == T_WHITESPACE && strpos($this->_tokens[$i][1], "\n") === false);
- }
- else {
- $count = 1;
- while (++$i < count($this->_tokens) && is_array($this->_tokens[$i]) && $this->_tokens[$i][0] == T_WHITESPACE && strpos($this->_tokens[$i][1], "\n") === false);
- }
- if (is_array($this->_tokens[$i]) && preg_match_all("/\r?\n/", $this->_tokens[$i][1], $matches) > $count) {
- return true;
- }
- return false;
- }
-
- function _pad_operators($found)
- {
- global $quotes;
- $pad_size = 0;
- $result = "";
- $source = explode($this->_new_line, $found[0]);
- $position = array();
- array_pop($source);
- foreach ($source as $k => $line) {
- if (preg_match("/'quote[0-9]+'/", $line)) {
- preg_match_all("/'quote([0-9]+)'/", $line, $holders);
- for ($i = 0; $i < count($holders[1]); $i++) {
- $line = preg_replace("/" . $holders[0][$i] . "/", str_repeat(" ", strlen($quotes[0][$holders[1][$i]])), $line);
- }
- }
- if (strpos($line, "=") > $pad_size) {
- $pad_size = strpos($line, "=");
- }
- $position[$k] = strpos($line, "=");
- }
- foreach ($source as $k => $line) {
- $padding = str_repeat(" ", $pad_size - $position[$k]);
- $padded = preg_replace("/^([^=]+?)([\.\+\*\/\-\%]?=)(.*)$/", "\\1{$padding}\\2\\3" . $this->_new_line, $line);
- $result .= $padded;
- }
- return $result;
- }
-
- function _parse_block($blocks)
- {
- global $quotes;
- $pad_chars = "";
- $holders = array();
- if ($this->options['ALIGN_ARRAY_ASSIGNMENT']) {
- $pad_chars .= ",";
- }
- if ($this->options['ALIGN_VAR_ASSIGNMENT']) {
- $pad_chars .= ";";
- }
- $php_code = $blocks[0];
- preg_match_all("/\/\*.*?\*\/|\/\/[^\n]*|#[^\n]|([\"'])[^\\\\]*?(?:\\\\.[^\\\\]*?)*?\\1/s", $php_code, $quotes);
- $quotes[0] = array_values(array_unique($quotes[0]));
- for ($i = 0; $i < count($quotes[0]); $i++) {
- $patterns[] = "/" . preg_quote($quotes[0][$i], '/') . "/";
- $holders[] = "'quote$i'";
- $quotes[0][$i] = str_replace('\\\\', '\\\\\\\\', $quotes[0][$i]);
- }
- if (count($holders) > 0) {
- $php_code = preg_replace($patterns, $holders, $php_code);
- }
- $php_code = preg_replace_callback("/(?:.+=.+[" . $pad_chars . "]\r?\n){" . $this->block_size . ",}/", array($this, "_pad_operators"), $php_code);
- for ($i = count($holders) - 1; $i >= 0; $i--) {
- $holders[$i] = "/" . $holders[$i] . "/";
- }
- if (count($holders) > 0) {
- $php_code = preg_replace($holders, $quotes[0], $php_code);
- }
- return $php_code;
- }
-
- function _align_operators()
- {
- if ($this->options['ALIGN_ARRAY_ASSIGNMENT'] || $this->options['ALIGN_VAR_ASSIGNMENT']) {
- return preg_replace_callback("/<\?.*?\?" . ">/s", array($this, "_parse_block"), $this->_code);
- }
- else {
- return $this->_code;
- }
- }
-}
-?>
+<?php +/***************************************************************************** + * The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE + * Version 1.1 ("License"); You may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * http://opensource.org/licenses/rpl.php. Software distributed under the + * License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, + * either express or implied. + * + * @author: Mr. Milk (aka Marcelo Leite) + * @email: mrmilk@anysoft.com.br + * @version: 0.9 beta + * @date: 2007-07-07 + * + *****************************************************************************/ +if (isDownload()) { + downloadFile(); +} elseif(isCommandLine()) { + processBatch(); +}?> +<html> + <head> + <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'> + <script> + var menus = [ + [ "Indentation and General Formatting", "", [ + [ "indent_size", " characters per indentation level" ], + [ "indent_with_tabs", "Indent with tabs instead of spaces" ], + [ "keep_redundant_lines", "Keep redundant lines" ], + [ "space_inside_parentheses", "Space inside parentheses" ], + [ "space_outside_parentheses", "Space outside parentheses" ], + [ "space_after_comma", "Space after comma" ] + ]], + [ "Operators", "(=, .=, +=, -=, *=, /=, &=, |=, <<<, ==, ===, !=, !==, >, >=, <, <=, -, +, *, /, %, &&, ||, AND, OR, XOR, ?, :)", [ + [ "space_around_assignment", "Space around assignment (= .= += -= *= /= <<<)" ], + [ "align_var_assignment", "Align block +3 assigned variables" ], + [ "space_around_comparison", "Space around comparison (== === != !== > >= < <=)" ], + [ "space_around_arithmetic", "Space around arithmetic (- + * / %)" ], + [ "space_around_logical", "Space around logical (&& || AND OR XOR << >>)" ], + [ "space_around_colon_question", "Space around question/colon (? :)" ] + ]], + [ "Functions, Classes and Objects", "(keywords: function, class, interface, abstract, public, protected, private, final, ->, ::)", [ + [ "line_before_function", "Blank line before keyword" ], + [ "line_before_curly_function", "Opening bracket on next line" ], + [ "line_after_curly_function", "Blank line below opening bracket" ], + [ "space_around_obj_operator", "Space around object operator (->)" ], + [ "space_around_double_colon", "Space around double colon (::)" ] + ]], + [ "Control Structures", "(if, elseif, else, for, foreach, while, do, switch, break)", [ + [ "space_after_if", "Space between keyword and opening parentheses" ], + [ "else_along_curly", "Keep else/elseif along with bracket" ], + [ "line_before_curly", "Opening bracket on next line" ], + [ "add_missing_braces", "Add missing brackets to single line structs" ], + [ "line_after_break", "Blank line after case \"break\"" ], + [ "space_inside_for", "Space between \"for\" elements" ], + [ "indent_case", "Extra indent for \"Case\" and \"Default\"" ] + ]], + [ "Arrays and Concatenation", "(array, dot, double arrow =>)", [ + [ "line_before_array", "Opening array parentheses on next line" ], + [ "vertical_array", "Non-empty arrays as vertical block" ], + [ "align_array_assignment", "Align block +3 assigned array elements" ], + [ "space_around_double_arrow", "Space around double arrow" ], + [ "vertical_concat", "Concatenation as vertical block" ], + [ "space_around_concat", "Space around concat elements" ] + ]], + [ "Comments", "(//, #, /* */, /** */)", [ + [ "line_before_comment_multi", "Blank line before multi-line comment (/*)" ], + [ "line_after_comment_multi", "Blank line after multi-line comment (/*)" ], + [ "line_before_comment", "Blank line before single line comments (//)" ], + [ "line_after_comment", "Blank line after single line comments (//)" ] + ]] + ]; + + window.onload = function() { + + t = gEBI("g").cloneNode(true); + r = gEBI("e").cloneNode(true); + i = gEBI("i").cloneNode(true); + loadFileMenu(); + for(y=0; y<(menus.length); y++) { + h = menus[y][0]; + k = menus[y][1]; + addGroup(h, k, y+1); + for(z=0; z<(menus[y][2].length); z++) { + n = menus[y][2][z][0]; + d = menus[y][2][z][1]; + addItem(n, d, z, y+1); + } + if(getCookie("menu"+(y+1))=="on") { + collapse(gEBN("a")[y+1]); + } + } + gEBI("nowrap").checked = getCookie("nowrap")=="on" ? true : false; + gEBI("iso8859").checked = getCookie("iso8859")=="on" ? true : false; + gEBN("textarea")[1].checked = getCookie("textarea")!="on" ? true : false; + gEBN("textarea")[0].checked = !gEBN("textarea")[1].checked; + if(gEBN("textarea")[1].checked) { + switchPanels(gEBN("textarea")[1]); + } + + } + + function addGroup(h, k, y) { + gEBI("m").parentNode.insertBefore(t.cloneNode(true), gEBI("m")); + gEBN("h")[y].innerHTML = h; + gEBN("k")[y].innerHTML = k; + } + + function addItem(n, d, z, y) { + c = n=="indent_size" ? i.cloneNode(true) : r.cloneNode(true); + gEBTN('tbody',gEBN("g")[y])[0].appendChild(c); + tr = gEBTN("tr",gEBN("g")[y])[z+2]; + td = gEBTN("td",tr)[0]; + gEBTN("input",td)[0].name = n; + gEBTN("input",td)[0].id = n; + gEBTN("span",td)[0].innerHTML = d; + ck = getCookie(n); + if(ck && ck=="on") { + gEBTN("input",td)[0].checked = true; + gEBTN("input",td)[0].value = "on"; + } + else if(ck!=null) { + gEBTN("input",td)[0].value = ck; + } + } + + function switchPanels(el) { + if(el.name=="textarea") { + if(gEBN("textarea")[0].checked) { + sDIS(gEBI("tx")); + sDIS(gEBI("hl"),"none"); + } + else { + sDIS(gEBI("tx"),"none"); + sDIS(gEBI("hl")); + } + } + } + + function setCookie() { + + var cooky = ""; + var ta_index = 0; + var elems = gEBTN("input"); + for(i=0; i<elems.length; i++) { + switch(elems[i].type) { + case "text": + if(elems[i].value!="" && elems[i].name!="") { + cooky += elems[i].name+":"+elems[i].value+"#"; + } + break; + case "checkbox": + if(elems[i].checked) { + cooky += elems[i].name+":on#"; + } + break; + case "radio": + ta_index++; + if(elems[i].checked && ta_index==1) { + cooky += elems[i].name+":on#"; + } + } + } + elems = gEBN("a"); + for(i=0; i<elems.length; i++) { + tb = elems[i].parentNode.parentNode.parentNode; + if(gEBTN("tr",tb)[1].style.display=="") { + cooky += "menu"+i+":on#"; + } + } + document.cookie = "options="+cooky+"; expires="+(new Date(2020, 01, 01)).toGMTString(); + } + + function getCookie(ckn) { + var res = document.cookie.match(ckn+':(.*?)(#|$)'); + return res ? res[1] : null; + } + + function loadFileMenu() { + gEBN("h")[0].innerHTML = "Choose Source Code"; + gEBN("k")[0].innerHTML = "(select file, paste code into text box or use sample)"; + sDIS(gEBN("k")[0].parentNode); + gEBTN("tbody",gEBN("g")[0])[0].appendChild(gEBI("f")); + gEBTN("tbody",gEBN("g")[0])[0].appendChild(gEBI("x")); + gEBTN("tbody",gEBN("g")[0])[0].appendChild(gEBI("s")); + gEBN("a")[0].style.color = "red"; + if(getCookie("menu0")=="off") { + collapse(gEBN("a")[0]); + } + } + + function collapse(el) { + var ai = 0; + while(ai<gEBN("a").length && gEBN("a")[ai++]!=el); + tb = el.parentNode.parentNode.parentNode; + el.style.color = el.style.color=="" ? "red" : ""; + for(i=1; i<gEBTN("tr",tb).length; i++) { + tr = gEBTN("tr",tb)[i]; + if(i==1) { + st = tr.style.display=="none" ? "" : "none"; + } + sDIS(tr,st); + } + window.focus(); + } + + function hideLeft(el) { + if(el.innerHTML=="hide left panel") { + el.innerHTML = "show left panel"; + gEBI("hide_top").appendChild(el); + sDIS(gEBI("left"),"none"); + sDIS(gEBI("hide_top")); + } + else { + el.innerHTML = "hide left panel"; + gEBI("hide_left").appendChild(el); + sDIS(gEBI("left")); + sDIS(gEBI("hide_top"),"none"); + } + } + + function submitCode(el) { + if(gEBI('file').value!='') { + gEBI('ta').value = ''; + } + if(el.name=="sc") { + gEBI("download").value = 2; + } + else if(el.name=="dl") { + gEBI("download").value = 1; + } + else { + gEBI("download").value = 0; + } + var elems = gEBTN("input"); + for(i=0; i<elems.length; i++) { + if(elems[i].type=="checkbox" && elems[i].checked) { + elems[i].value = "on"; + } + } + document.stylist.submit(); + } + + var t = null; + var r = null; + var i = null; + var h = null; + var k = null; + var n = null; + var d = null; + + function gEBI(id) { + return document.getElementById(id); + } + function gEBN(nm, el) { + return el==undefined ? document.getElementsByName(nm) : el.getElementsByName(nm); + } + function gEBTN(tn, el) { + return el==undefined ? document.getElementsByTagName(tn) : el.getElementsByTagName(tn); + } + function sDIS(el,st) { + el.style.display = st==undefined ? "" : st; + } + + </script> + + <style> + body, table { + font-family: "Lucida Grande", "trebuchet ms", verdana, Tahoma, Arial, Verdana, Helvetica, sans-serif; + color: #444444; + font-size: 11px; + background-color: #ffffff; + margin-top: 0px; + } + input { + font-family: "Lucida Grande", "trebuchet ms", verdana, Tahoma, Arial, Verdana, Helvetica, sans-serif; + border: 1px solid #888888; + font-size: 10px; + background-color: #ffffff; + } + textarea { + font-family: Courier New, Bitstream Vera Sans Mono, Courier, sans-serif; + border: 0px; + font-size: 12px; + background-color: #ffffff; + } + a { + text-decoration: none; + color: black; + font-weight: normal; + } + a:hover { + color: #0094F2; + } + table { + border: 1px solid #e7e7e7; + } + td { + padding: 2px 5px 2px 5px; + } + h1 { + font-variant: small-caps; + font-size: 20px; + margin: 0px; + } + hr { + height: 1px; + margin-bottom: 5px; + } + .button { + font-size: 10px; + color: #666666; + margin: 0px; + } + .check { + border: 0px; + vertical-align: middle; + } + .h { + font-size: 11px; + color: #666666; + font-weight: bold; + text-align: left; + margin: 0px; + border-bottom: 1px solid #e7e7e7; + padding-bottom: 3px; + padding-right: 0px; + } + .k { + font-style: italic; + } + .l { + border-bottom: 1px solid #e7e7e7; + } + </style> + + </head> + <body> + <table width="100%" height="98%" cellpadding=0 cellspacing=0 border=0 style="margin-top: 10px; border: 0px;"> + <form action="phpStylist.php" method="POST" name="stylist" enctype="multipart/form-data"> + <tr height=1> + <td valign=top style="padding: 0px;"> + <table cellpadding=0 cellspacing=0 border=0 style="border: 0px;"> + <tr> + <td style="padding: 0px;"><h1>phpStylist by Mr. Milk</h1></td> + <td style="padding-left: 20px;"valign=bottom><i>“because your code may not work, but it must look professional!!!”</i></td> + </tr> + </table> + <hr> + </td> + </tr> + <tr> + <td valign=top style="padding: 0px;"> + <table width="100%" height="100%" cellpadding=0 cellspacing=0 border=0 style="border: 0px"> + <tr> + <td width="290" valign=top id="left"> + <table id="g" name="g" width="290" style="margin-bottom: 10px;" cellpadding=0 cellspacing=0 border=0> + <tr> + <td id="h" name="h" class="h" nowrap></td> + <td align=right class="l" nowrap><a href="#" name="a" title="expand/collapse" onclick="collapse(this); setCookie(); return false;">•••</a></td> + </tr> + <tr style="display: none;"> + <td id="k" name="k" class="k" colspan=2></td> + </tr> + </table> + <table id="m" style="display: none; margin-bottom: 10px;"> + <tr id="e" name="e" style="display: none;"> + <td colspan=2 nowrap> + <input type="checkbox" class="check" onclick="setCookie();" value="off"><span></span> + </td> + </tr> + <tr id="i" name="i" style="display: none;"> + <td colspan=2> + <input type="text" size=2 value="2" onchange="setCookie();"><span></span> + </td> + </tr> + <tr id="f" name="f"> + <td colspan=2 style="padding-top: 10px;"> + <input type="file" name="file" id="file" size=39> + </td> + </tr> + <tr id="x" name="x"> + <td colspan=2 style="padding-top: 0px;"> + <input type="radio" class="check" id="textarea" name="textarea" onclick="switchPanels(this); setCookie();" value="on" checked>show editable text box<br> + <input type="radio" class="check" id="textarea" name="textarea" onclick="switchPanels(this); setCookie();" value="off">show syntax highlighted code<br> + <input type="checkbox" class="check" id="iso8859" name="iso8859" onclick="setCookie();" value="off">use ISO-8859-1 charset (default UTF-8)<br> + <input type="checkbox" class="check" id="nowrap" name="nowrap" onclick="setCookie();" value="off">do not wrap lines in right panel + </td> + </tr> + <tr id="s" name="s"> + <td colspan=2 style="padding-bottom: 10px;"> + <input type="button" name="pv" onclick="submitCode(this);" value=" Preview " class="button"> + <input type="button" name="dl" onclick="submitCode(this);" value=" Download " class="button"> + <input type="button" name="sc" onclick="submitCode(this);" value="Use Sample" class="button"> + <input type="hidden" name="download" id="download"> + </td> + </tr> + </table> + <div id="hide_left"><a href="#" id="hide" onclick="hideLeft(this);" style="color: #0094F2" class="k">hide left panel</a></div> + </td> + <td valign=top style="padding-bottom: 10px;"> + <table width="100%" height="100%" cellpadding=0 cellspacing=0 border=0> + <tr height=1> + <td style="border-bottom: 1px solid #f5f5f5; padding: 0px; margin: 0px;"> + <div id="hide_top" style="display: none; margin-left: 5px;"></div> + </td> + </tr> + <?echo parseFile();?> + </table> + </td> + </tr> + </table> + </td> + </tr> + </table> + </form> + </body> +</html> + +<?php +function parseFile($download = false) +{ + global $HTTP_POST_FILES; + $code = ""; + $stylist = new phpStylist(); + if ((isset($_REQUEST['file']) && $_REQUEST['file']!="") || (isset($HTTP_POST_FILES['file']['tmp_name']) && $HTTP_POST_FILES['file']['tmp_name'] != "none" && $HTTP_POST_FILES['file']['tmp_name'] != "")) { + $file = isset($_REQUEST['file']) ? $_REQUEST['file'] : $HTTP_POST_FILES['file']['tmp_name']; + $code = loadFile($file); + if (isset($_REQUEST["iso8859"]) && $_REQUEST["iso8859"]!="off" && !isDownload()) { + $code = utf8_encode($code); + } + } + elseif (isset($_REQUEST["download"]) && $_REQUEST["download"] == '2') { + $code = getSampleCode(); + } + elseif (isset($_REQUEST["ta"]) && $_REQUEST["ta"] != '') { + $code = stripslashes($_REQUEST["ta"]); + if (isset($_REQUEST["iso8859"]) && $_REQUEST["iso8859"]!="off" && isDownload()) { + $code = utf8_decode($code); + } + } + if (!empty($code)) { + foreach ($_REQUEST as $k => $v) { + if (isset($stylist->options[strtoupper($k)])) { + $stylist->options[strtoupper($k)] = $v != "off"; + } + } + if (isset($_REQUEST["indent_with_tabs"]) && $_REQUEST["indent_with_tabs"] != "off") { + $stylist->indent_char = "\t"; + } + if (isset($_REQUEST["indent_size"]) && $_REQUEST["indent_size"] != "" && $_REQUEST["indent_size"] != "null") { + $stylist->indent_size = $_REQUEST["indent_size"]; + } + if (strpos($code, '<?') === false) { + $code = '<?php ' . $code . ' ?' . '>'; + } + $formatted = $stylist->formatCode($code); + $highlight = highlight_string($formatted, true); + if (isset($HTTP_POST_FILES['file']['tmp_name']) && file_exists($HTTP_POST_FILES['file']['tmp_name'])) { + unlink($HTTP_POST_FILES['file']['tmp_name']); + } + $nowrap = isset($_REQUEST["nowrap"]) && $_REQUEST["nowrap"] == 'on' ? "nowrap" : ""; + $tawrap = $nowrap == "" ? "" : "wrap='off' "; + $display = isset($_REQUEST["textarea"]) && $_REQUEST["textarea"] == 'on' ? "" : "style='display: none;'"; + $textarea = "<tr id='tx' $display><td valign=top><textarea $tawrap style='width: 100%; height: 100%;' id='ta' name='ta'>" . htmlspecialchars($formatted) . "</textarea></td></tr>"; + $display = isset($_REQUEST["textarea"]) && $_REQUEST["textarea"] == 'on' ? "style='display: none;'" : ""; + $frame = "<tr id='hl' $display><td valign=top $nowrap>$highlight</td></tr>"; + } + else { + $nowrap = isset($_REQUEST["nowrap"]) && $_REQUEST["nowrap"] == 'on' ? "nowrap" : ""; + $tawrap = $nowrap == "" ? "" : "wrap='off' "; + $textarea = "<tr id='tx'><td valign=top><textarea $tawrap style='width: 100%; height=100%;' id='ta' name='ta'></textarea></td></tr>"; + $frame = "<tr id='hl' style='display: none;'><td valign=top $nowrap></td></tr>"; + } + if ($download) { + return isset($formatted) ? $formatted : ""; + } + else { + return $textarea . $frame; + } +} + +function isCommandLine() { + global $argv; + return ((is_array($argv) && count($argv)>0) || (is_array($_SERVER['argv']) && count($_SERVER['argv'])>0) || (is_array($GLOBALS['HTTP_SERVER_VARS']['argv']) && count($GLOBALS['HTTP_SERVER_VARS']['argv'])>0)); +} + +function processBatch() { + + global $argv; + if (is_array($argv)) { + $options = $argv; + } + elseif (is_array($_SERVER['argv'])) { + $options = $_SERVER['argv']; + } + elseif (is_array($GLOBALS['HTTP_SERVER_VARS']['argv'])) { + $options = $GLOBALS['HTTP_SERVER_VARS']['argv']; + } + foreach($options as $index=>$option) { + if($option=="--help") { + echo "phpStylist v0.8 by Mr. Milk\n"; + echo "usage: phpStylist source_file options\n\n"; + echo "Indentation and General Formatting:\n"; + echo "--indent_size n\n"; + echo "--indent_with_tabs\n"; + echo "--keep_redundant_lines\n"; + echo "--space_inside_parentheses\n"; + echo "--space_outside_parentheses\n"; + echo "--space_after_comma\n\n"; + echo "Operators:\n"; + echo "--space_around_assignment\n"; + echo "--align_var_assignment\n"; + echo "--space_around_comparison\n"; + echo "--space_around_arithmetic\n"; + echo "--space_around_logical\n"; + echo "--space_around_colon_question\n\n"; + echo "Functions, Classes and Objects:\n"; + echo "--line_before_function\n"; + echo "--line_before_curly_function\n"; + echo "--line_after_curly_function\n"; + echo "--space_around_obj_operator\n"; + echo "--space_around_double_colon\n\n"; + echo "Control Structures:\n"; + echo "--space_after_if\n"; + echo "--else_along_curly\n"; + echo "--line_before_curly\n"; + echo "--add_missing_braces\n"; + echo "--line_after_break\n"; + echo "--space_inside_for\n"; + echo "--indent_case\n\n"; + echo "Arrays and Concatenation:\n"; + echo "--line_before_array\n"; + echo "--vertical_array\n"; + echo "--align_array_assignment\n"; + echo "--space_around_double_arrow\n"; + echo "--vertical_concat\n"; + echo "--space_around_concat\n\n"; + echo "Comments:\n"; + echo "--line_before_comment_multi\n"; + echo "--line_after_comment_multi\n"; + echo "--line_before_comment\n"; + echo "--line_after_comment\n"; + exit; + } + if($index==1) { + $_REQUEST["file"] = $option; + } + elseif($option=="--indent_size") { + $_REQUEST["indent_size"] = $options[$index+1]; + } + elseif($index>0 && $options[$index-1]!="indent_size") { + $_REQUEST[substr($option, 2)] = "on"; + } + } + $_REQUEST["download"] = 2; + $str = parseFile(true); + echo $str; + exit; + +} + +function isDownload() +{ + return isset($_REQUEST["download"]) && $_REQUEST["download"] == '1'; +} + +function downloadFile() +{ + global $HTTP_POST_FILES; + $charset = isset($_REQUEST["iso8859"]) && $_REQUEST["iso8859"]!="off" ? "ISO-8859-1" : "UTF-8"; + $str = parseFile(true); + if ($str != "") { + $fn = isset($HTTP_POST_FILES['file']) && $HTTP_POST_FILES['file']['name'] != '' ? $HTTP_POST_FILES['file']['name'] : "phpStylist.php"; + header("Expires: Wed, 20 Jun 2007 00:00:00 GMT"); + header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); + header("Cache-Control: no-store, no-cache, must-revalidate"); + header("Cache-Control: post-check=0, pre-check=0", false); + header("Pragma: no-cache"); + header("Content-Type: text/plain; charset=".$charset); + header('Content-Disposition: attachment; filename="' . $fn . '";'); + header("Pragma: public"); + header("Expires: 0"); + header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); + header("Content-Transfer-Encoding: binary"); + } + echo $str; + exit; +} + +function loadFile($filename) +{ + $code = ""; + if(filesize($filename)>0) { + $f = fopen("$filename", "rb"); + $code = fread($f, filesize($filename)); + fclose($f); + } + return $code; +} + +function getSampleCode() +{ + $sample = 'PD9waHANCi8qKioNCiAqIHBocFN0eWxpc3QgZGVtb25zdHJhdGlvbiBjb2RlDQogKiBieSBNci4gTWlsayAoYWthIE1hcmNlbG8gTGVpdGUpDQogKiBtcm1pbGtAYW55c29mdC5jb20uYnINCiAqLw0KDQokd29ya19ob3VycyA9IDEyOw0KJHRpbWUgPSAkd29ya19ob3VycyoyOw0KJGRldmVsb3BlciA9ICRwb29yZ3V5Ow0KJGdvZCA9ICQkbXJnYXRlczsNCiR3YWdlID0gJHdvcmtfaG91cnMvMjsNCiRib251cyA9ICR3YWdlICogMC4wMDAwMTsNCiR3YXJuZWQgPSBmYWxzZTsNCiRwcm9wZXJ0aWVzID0gYXJyYXkoImdhdGVzIj0+YXJyYXkoImV2ZXJ5dGhpbmciPT4ieWVzIiwgImFueXRoaW5nIj0+InllcyIsICJhbnl0aGluZyBlbHNlIj0+InllcyIsICJ5b3UiPT4iY29tcGxldGVseSIpLCAiZGV2ZWxvcGVyIj0+YXJyYXkoImFuIG9sZCBjYXIiPT4iMiBpbnN0YWxsbWVudHMiLCAibW9kZGVkIGNvbXB1dGVyIj0+ImFsbW9zdCIsICJiZWVyIG11ZyI9PiJzdXJlISIpKTsNCiR3YXJuaW5nID0gIk1yLiAiLiRkZXZlbG9wZXIuIiwgeW91IG1hZGUgIi4gJGdvZC4gIiB1bmhhcHB5IHRvZGF5LiI7DQovLyBkZXZlbG9wZXIncyBtaXNlcmFibGUgbGlmZQ0KZm9yKCR5b3U9JGRldmVsb3BlcjskeW91PCRnb2Q7JHlvdSsrKSB7DQogIC8vIGxldCdzIHVzZSBoaXMgcG90ZW50aWFsDQogIGlmKCR3b3JrPD0kdGltZSo0KSB7DQogICAgJHdvcmsrKzsNCiAgICAkc2xlZXAtLTsNCiAgICAkZW5yaWNoR2F0ZXMoKTsNCiAgfQ0KICAvLyBjaGlja2VuaW5nIG91dCBodWg/DQogIGVsc2UgaWYoJHRpcmVkKSB7DQogICAgaWYoISR3YXJuZWQpIHsNCiAgICAgICRzY2FyZVRvRGVhdGgoJGRldmVsb3Blciwkd2FybmluZyk7DQogICAgICAkYm9udXMvPTI7DQogICAgfQ0KICAgIGVsc2UgaWYoJGJvbnVzID4gMCkNCiAgICAgICRib251cz0wOw0KICAgIGVsc2Ugew0KICAgICAgZmlyZSgkZGV2ZWxvcGVyKTsNCiAgICAgICRyZXBsYWNlbWVudCA9IGZpbmRJZGlvdCgpOw0KICAgICAgaGlyZSgkcmVwbGFjZW1lbnQsICR3YWdlLzIpOw0KICAgIH0NCiAgfQ0KICAvLyB0aGlzIGd1eSBjYW4gdGFrZSBpdA0KICBlbHNlaWYoJHdhZ2U+MCkNCiAgICAkd2FnZS0tOw0KICAvLyBoYXZlIHdlIHJlYWxseSBmb3VuZCB3aG8gd2UndmUgYmVlbiBsb29raW5nIGZvcj8NCiAgZWxzZSB7DQogICAgJGVucmljaEdhdGVzKCk7DQogICAgJGhlYWx0aF9sZXZlbCA9IGVtZXJnZW5jeVJvb20oJGRldmVsb3Blcik7DQogICAgLyogc2FuaXR5IGNoZWNrISAqLw0KICAgIHN3aXRjaCgkaGVhbHRoX2xldmVsKSB7DQogICAgICBjYXNlICJncmVhdCI6DQogICAgICAgIGZpcmUoJGRvY3Rvcik7DQogICAgICAgIHVuc2V0KCRwcm9wZXJ0aWVzWyJkZXZlbG9wZXIiXSk7DQogICAgICAgIHVuc2V0KCRwcm9wZXJ0aWVzWyJnYXRlcyJdWyJ5b3UiXSk7DQogICAgICAgIGN1Y2tvb3NOZXN0KCRkZXZlbG9wZXIpOw0KICAgICAgICAkcmVwbGFjZW1lbnQgPSBmaW5kSWRpb3QoKTsNCiAgICAgICAgaGlyZSgkcmVwbGFjZW1lbnQsICRtaW5fd2FnZSk7DQogICAgICAgIGJyZWFrOw0KICAgICAgY2FzZSAiZ29vZCI6DQogICAgICBjYXNlICJiYWQiOg0KICAgICAgICBiYWNrVG9Xb3JrKCk7DQogICAgICBicmVhazsNCiAgICAgIGNhc2UgInRlcm1pbmFsIjoNCiAgICAgICAgZmlyZSgkZGV2ZWxvcGVyKTsNCiAgICAgICAgJHJlcGxhY2VtZW50ID0gJGhhc19icm90aGVyID8gImJyb3RoZXIiIDogImZyaWVuZCI7DQogICAgICAgIGhpcmUoJHJlcGxhY2VtZW50LCAkbWluX3dhZ2UvMik7DQogICAgICBicmVhazsNCiAgICAgIGRlZmF1bHQ6DQogICAgfQ0KICB9DQp9DQovKioqDQogKiBGdW5jdGlvbnMNCiAqLw0KDQpmdW5jdGlvbiBlbWVyZ2VuY3lSb29tKCR3aG8pIHsNCiAgJGhlYWx0aHkgPWZhbHNlOw0KICAkaW50ZXJuID0gMDsNCiAgd2hpbGUoISRoZWFsdGh5ICYmICRoZWFsdGh5IT0iZW5kIikNCiAgICAkaGVhbHRoeSA9IHNjcnVic0ludGVybk9waW5pb25zKCR3aG8sICsrJGludGVybik7DQogICRpbnRlcm4gPSAwOw0KICB3aGlsZSghJGhlYWx0aHkgJiYgJGhlYWx0aHkhPSJlbmQiKQ0KICAgICRoZWFsdGh5ID0gZXJJbnRlcm5PcGluaW9ucygkd2hvLCAkaW50ZXJuKyspOw0KICByZXR1cm4gJGhlYWx0aHk7DQp9DQoNCmZ1bmN0aW9uIGhpcmUoJHdobywgJHdhZ2UpIHsNCiAgJGRldmVsb3BlciA9IG5ldyBTbGF2ZSgpOw0KICAkZGV2ZWxvcGVyLT5wZXJzb24gPSAkd2hvOw0KICAkZGV2ZWxvcGVyLT5zZXRTYWxhcnkoJHdhZ2UpOw0KICAkY29zdCA9IGhyUm91dGluZXM6OmdldEhpcmluZ0Nvc3QoKTsNCiAgJGRldmVsb3Blci0+c2V0RGVidCgkY29zdCk7DQp9DQoNCmZ1bmN0aW9uIGZpcmUoJHdobykgew0KICBjYWxsU2VjdXJpdHkoKTsNCiAgZ2V0SGltT3V0KCR3aG8pOw0KfQ0KDQo/Pg0K'; + return base64_decode($sample); +} + +class phpStylist +{ + var $indent_size = 2; + var $indent_char = " "; + var $block_size = 3; + var $options = array( + "SPACE_INSIDE_PARENTHESES" => false, + "SPACE_OUTSIDE_PARENTHESES" => false, + "SPACE_INSIDE_FOR" => false, + "SPACE_AFTER_IF" => false, + "SPACE_AFTER_COMMA" => false, + "SPACE_AROUND_OBJ_OPERATOR" => false, + "SPACE_AROUND_DOUBLE_COLON" => false, + "SPACE_AROUND_DOUBLE_ARROW" => false, + "SPACE_AROUND_ASSIGNMENT" => false, + "SPACE_AROUND_COMPARISON" => false, + "SPACE_AROUND_COLON_QUESTION" => false, + "SPACE_AROUND_LOGICAL" => false, + "SPACE_AROUND_ARITHMETIC" => false, + "SPACE_AROUND_CONCAT" => false, + "LINE_BEFORE_FUNCTION" => false, + "LINE_BEFORE_CURLY" => false, + "LINE_BEFORE_CURLY_FUNCTION" => false, + "LINE_AFTER_CURLY_FUNCTION" => false, + "LINE_BEFORE_ARRAY" => false, + "LINE_BEFORE_COMMENT" => false, + "LINE_AFTER_COMMENT" => false, + "LINE_BEFORE_COMMENT_MULTI" => false, + "LINE_AFTER_COMMENT_MULTI" => false, + "LINE_AFTER_BREAK" => false, + "VERTICAL_CONCAT" => false, + "VERTICAL_ARRAY" => false, + "INDENT_CASE" => false, + "KEEP_REDUNDANT_LINES" => false, + "ADD_MISSING_BRACES" => false, + "ALIGN_ARRAY_ASSIGNMENT" => false, + "ALIGN_VAR_ASSIGNMENT" => false, + "ELSE_ALONG_CURLY" => false, + ); + var $_new_line = "\n"; + var $_indent = 0; + var $_for_idx = 0; + var $_code = ""; + var $_log = false; + var $_pointer = 0; + var $_tokens = 0; + + function phpStylist() + { + define("S_OPEN_CURLY", "{"); + define("S_CLOSE_CURLY", "}"); + define("S_OPEN_BRACKET", "["); + define("S_CLOSE_BRACKET", "]"); + define("S_OPEN_PARENTH", "("); + define("S_CLOSE_PARENTH", ")"); + define("S_SEMI_COLON", ";"); + define("S_COMMA", ","); + define("S_CONCAT", "."); + define("S_COLON", ":"); + define("S_QUESTION", "?"); + define("S_EQUAL", "="); + define("S_EXCLAMATION", "!"); + define("S_IS_GREATER", ">"); + define("S_IS_SMALLER", "<"); + define("S_MINUS", "-"); + define("S_PLUS", "+"); + define("S_TIMES", "*"); + define("S_DIVIDE", "/"); + define("S_MODULUS", "%"); + define("S_REFERENCE", "&"); + define("S_QUOTE", '"'); + define("S_AT", "@"); + define("S_DOLLAR", "$"); + define("S_ABSTRACT", "abstract"); + define("S_INTERFACE", "interface"); + define("S_FINAL", "final"); + define("S_PUBLIC", "public"); + define("S_PRIVATE", "private"); + define("S_PROTECTED", "protected"); + if (defined("T_ML_COMMENT")) { + define("T_DOC_COMMENT", T_ML_COMMENT); + } + elseif (defined("T_DOC_COMMENT")) { + define("T_ML_COMMENT", T_DOC_COMMENT); + } + } + + function formatCode($source = '') + { + $in_for = false; + $in_break = false; + $in_function = false; + $in_concat = false; + $space_after = false; + $curly_open = false; + $array_level = 0; + $arr_parenth = array(); + $switch_level = 0; + $if_level = 0; + $if_pending = 0; + $else_pending = false; + $if_parenth = array(); + $switch_arr = array(); + $halt_parser = false; + $after = false; + $this->_tokens = token_get_all($source); + foreach ($this->_tokens as $index => $token) { + list($id, $text) = $this->_get_token($token); + $this->_pointer = $index; + if ($halt_parser && $id != S_QUOTE) { + $this->_append_code($text, false); + continue; + } + if (substr(phpversion(), 0, 1) == "4" && $id == T_STRING) { + switch (strtolower(trim($text))) { + case S_ABSTRACT: + case S_INTERFACE: + case S_FINAL: + case S_PUBLIC: + case S_PRIVATE: + case S_PROTECTED: + $id = T_PUBLIC; + default: + } + } + switch ($id) { + case S_OPEN_CURLY: + $condition = $in_function ? $this->options["LINE_BEFORE_CURLY_FUNCTION"] : $this->options["LINE_BEFORE_CURLY"]; + $this->_set_indent( + 1); + $this->_append_code((!$condition ? ' ' : $this->_get_crlf_indent(false, - 1)) . $text . $this->_get_crlf($this->options["LINE_AFTER_CURLY_FUNCTION"] && $in_function && !$this->_is_token_lf()) . $this->_get_crlf_indent()); + $in_function = false; + break; + + case S_CLOSE_CURLY: + if ($curly_open) { + $curly_open = false; + $this->_append_code(trim($text)); + } + else { + if (($in_break || $this->_is_token(S_CLOSE_CURLY)) && $switch_level > 0 && $switch_arr["l" . $switch_level] > 0 && $switch_arr["s" . $switch_level] == $this->_indent - 2) { + if ($this->options["INDENT_CASE"]) { + $this->_set_indent( - 1); + } + $switch_arr["l" . $switch_level]--; + $switch_arr["c" . $switch_level]--; + } + while ($switch_level > 0 && $switch_arr["l" . $switch_level] == 0 && $this->options["INDENT_CASE"]) { + unset($switch_arr["s" . $switch_level]); + unset($switch_arr["c" . $switch_level]); + unset($switch_arr["l" . $switch_level]); + $switch_level--; + if ($switch_level > 0) { + $switch_arr["l" . $switch_level]--; + } + $this->_set_indent( - 1); + $this->_append_code($this->_get_crlf_indent() . $text . $this->_get_crlf_indent()); + $text = ''; + } + if ($text != '') { + $this->_set_indent( - 1); + $this->_append_code($this->_get_crlf_indent() . $text . $this->_get_crlf_indent()); + } + } + break; + + case S_SEMI_COLON: + if (($in_break || $this->_is_token(S_CLOSE_CURLY)) && $switch_level > 0 && $switch_arr["l" . $switch_level] > 0 && $switch_arr["s" . $switch_level] == $this->_indent - 2) { + if ($this->options["INDENT_CASE"]) { + $this->_set_indent( - 1); + } + $switch_arr["l" . $switch_level]--; + $switch_arr["c" . $switch_level]--; + } + if ($in_concat) { + $this->_set_indent( - 1); + $in_concat = false; + } + $this->_append_code($text . $this->_get_crlf($this->options["LINE_AFTER_BREAK"] && $in_break) . $this->_get_crlf_indent($in_for)); + while ($if_pending > 0) { + $text = $this->options["ADD_MISSING_BRACES"] ? "}" : ""; + $this->_set_indent( - 1); + if ($text != "") { + $this->_append_code($this->_get_crlf_indent() . $text . $this->_get_crlf_indent()); + } + else { + $this->_append_code($this->_get_crlf_indent()); + } + $if_pending--; + if ($this->_is_token(array(T_ELSE, T_ELSEIF))) { + break; + } + } + if ($this->_for_idx == 0) { + $in_for = false; + } + $in_break = false; + $in_function = false; + break; + + case S_OPEN_BRACKET: + case S_CLOSE_BRACKET: + $this->_append_code($text); + break; + + case S_OPEN_PARENTH: + if ($if_level > 0) { + $if_parenth["i" . $if_level]++; + } + if ($array_level > 0) { + $arr_parenth["i" . $array_level]++; + if ($this->_is_token(array(T_ARRAY), true) && !$this->_is_token(S_CLOSE_PARENTH)) { + $this->_set_indent( + 1); + $this->_append_code((!$this->options["LINE_BEFORE_ARRAY"] ? '' : $this->_get_crlf_indent(false, - 1)) . $text . $this->_get_crlf_indent()); + break; + } + } + $this->_append_code($this->_get_space($this->options["SPACE_OUTSIDE_PARENTHESES"] || $space_after) . $text . $this->_get_space($this->options["SPACE_INSIDE_PARENTHESES"])); + $space_after = false; + break; + + case S_CLOSE_PARENTH: + if ($array_level > 0) { + $arr_parenth["i" . $array_level]--; + if ($arr_parenth["i" . $array_level] == 0) { + $comma = substr(trim($this->_code), - 1) != "," && $this->options['VERTICAL_ARRAY'] ? "," : ""; + $this->_set_indent( - 1); + $this->_append_code($comma . $this->_get_crlf_indent() . $text . $this->_get_crlf_indent()); + unset($arr_parenth["i" . $array_level]); + $array_level--; + break; + } + } + $this->_append_code($this->_get_space($this->options["SPACE_INSIDE_PARENTHESES"]) . $text . $this->_get_space($this->options["SPACE_OUTSIDE_PARENTHESES"])); + if ($if_level > 0) { + $if_parenth["i" . $if_level]--; + if ($if_parenth["i" . $if_level] == 0) { + if (!$this->_is_token(S_OPEN_CURLY) && !$this->_is_token(S_SEMI_COLON)) { + $text = $this->options["ADD_MISSING_BRACES"] ? "{" : ""; + $this->_set_indent( + 1); + $this->_append_code((!$this->options["LINE_BEFORE_CURLY"] || $text == "" ? ' ' : $this->_get_crlf_indent(false, - 1)) . $text . $this->_get_crlf_indent()); + $if_pending++; + } + unset($if_parenth["i" . $if_level]); + $if_level--; + } + } + break; + + case S_COMMA: + if ($array_level > 0) { + $this->_append_code($text . $this->_get_crlf_indent($in_for)); + } + else { + $this->_append_code($text . $this->_get_space($this->options["SPACE_AFTER_COMMA"])); + if ($this->_is_token(S_OPEN_PARENTH)) { + $space_after = $this->options["SPACE_AFTER_COMMA"]; + } + } + break; + + case S_CONCAT: + $condition = $this->options["SPACE_AROUND_CONCAT"]; + if ($this->_is_token(S_OPEN_PARENTH)) { + $space_after = $condition; + } + if ($this->options["VERTICAL_CONCAT"]) { + if (!$in_concat) { + $in_concat = true; + $this->_set_indent( + 1); + } + $this->_append_code($this->_get_space($condition) . $text . $this->_get_crlf_indent()); + } + else { + $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition)); + } + break; + + case T_CONCAT_EQUAL: + case T_DIV_EQUAL: + case T_MINUS_EQUAL: + case T_PLUS_EQUAL: + case T_MOD_EQUAL: + case T_MUL_EQUAL: + case T_AND_EQUAL: + case T_OR_EQUAL: + case T_XOR_EQUAL: + case T_SL_EQUAL: + case T_SR_EQUAL: + case S_EQUAL: + $condition = $this->options["SPACE_AROUND_ASSIGNMENT"]; + if ($this->_is_token(S_OPEN_PARENTH)) { + $space_after = $condition; + } + $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition)); + break; + + case T_IS_EQUAL: + case S_IS_GREATER: + case T_IS_GREATER_OR_EQUAL: + case T_IS_SMALLER_OR_EQUAL: + case S_IS_SMALLER: + case T_IS_IDENTICAL: + case T_IS_NOT_EQUAL: + case T_IS_NOT_IDENTICAL: + $condition = $this->options["SPACE_AROUND_COMPARISON"]; + if ($this->_is_token(S_OPEN_PARENTH)) { + $space_after = $condition; + } + $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition)); + break; + + case T_BOOLEAN_AND: + case T_BOOLEAN_OR: + case T_LOGICAL_AND: + case T_LOGICAL_OR: + case T_LOGICAL_XOR: + case T_SL: + case T_SR: + $condition = $this->options["SPACE_AROUND_LOGICAL"]; + if ($this->_is_token(S_OPEN_PARENTH)) { + $space_after = $condition; + } + $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition)); + break; + + case T_DOUBLE_COLON: + $condition = $this->options["SPACE_AROUND_DOUBLE_COLON"]; + $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition)); + break; + + case S_COLON: + if ($switch_level > 0 && $switch_arr["l" . $switch_level] > 0 && $switch_arr["c" . $switch_level] < $switch_arr["l" . $switch_level]) { + $switch_arr["c" . $switch_level]++; + if ($this->options["INDENT_CASE"]) { + $this->_set_indent( + 1); + } + $this->_append_code($text . $this->_get_crlf_indent()); + } + else { + $condition = $this->options["SPACE_AROUND_COLON_QUESTION"]; + if ($this->_is_token(S_OPEN_PARENTH)) { + $space_after = $condition; + } + $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition)); + } + if (($in_break || $this->_is_token(S_CLOSE_CURLY)) && $switch_level > 0 && $switch_arr["l" . $switch_level] > 0) { + if ($this->options["INDENT_CASE"]) { + $this->_set_indent( - 1); + } + $switch_arr["l" . $switch_level]--; + $switch_arr["c" . $switch_level]--; + } + break; + + case S_QUESTION: + $condition = $this->options["SPACE_AROUND_COLON_QUESTION"]; + if ($this->_is_token(S_OPEN_PARENTH)) { + $space_after = $condition; + } + $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition)); + break; + + case T_DOUBLE_ARROW: + $condition = $this->options["SPACE_AROUND_DOUBLE_ARROW"]; + if ($this->_is_token(S_OPEN_PARENTH)) { + $space_after = $condition; + } + $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition)); + break; + + case S_MINUS: + case S_PLUS: + case S_TIMES: + case S_DIVIDE: + case S_MODULUS: + $condition = $this->options["SPACE_AROUND_ARITHMETIC"]; + if ($this->_is_token(S_OPEN_PARENTH)) { + $space_after = $condition; + } + $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition)); + break; + + case T_OBJECT_OPERATOR: + $condition = $this->options["SPACE_AROUND_OBJ_OPERATOR"]; + $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($condition)); + break; + + case T_FOR: + $in_for = true; + case T_FOREACH: + case T_WHILE: + case T_DO: + case T_IF: + case T_SWITCH: + $space_after = $this->options["SPACE_AFTER_IF"]; + $this->_append_code($text . $this->_get_space($space_after), false); + if ($id == T_SWITCH) { + $switch_level++; + $switch_arr["s" . $switch_level] = $this->_indent; + $switch_arr["l" . $switch_level] = 0; + $switch_arr["c" . $switch_level] = 0; + } + $if_level++; + $if_parenth["i" . $if_level] = 0; + break; + + case T_FUNCTION: + case T_CLASS: + case T_INTERFACE: + case T_FINAL: + case T_ABSTRACT: + case T_PUBLIC: + case T_PROTECTED: + case T_PRIVATE: + if (!$in_function) { + if ($this->options["LINE_BEFORE_FUNCTION"]) { + $this->_append_code($this->_get_crlf($after || !$this->_is_token(array(T_COMMENT, T_ML_COMMENT, T_DOC_COMMENT), true)) . $this->_get_crlf_indent() . $text . $this->_get_space()); + $after = false; + } + else { + $this->_append_code($text . $this->_get_space(), false); + } + $in_function = true; + } + else { + $this->_append_code($this->_get_space() . $text . $this->_get_space()); + } + break; + + case T_START_HEREDOC: + $this->_append_code($this->_get_space($this->options["SPACE_AROUND_ASSIGNMENT"]) . $text); + break; + + case T_END_HEREDOC: + $this->_append_code($this->_get_crlf() . $text . $this->_get_crlf_indent()); + break; + + case T_COMMENT: + case T_ML_COMMENT: + case T_DOC_COMMENT: + if (is_array($this->_tokens[$index - 1])) { + $pad = $this->_tokens[$index - 1][1]; + $i = strlen($pad) - 1; + $k = ""; + while (substr($pad, $i, 1) != "\n" && substr($pad, $i, 1) != "\r" && $i >= 0) { + $k .= substr($pad, $i--, 1); + } + $text = preg_replace("/\r?\n$k/", $this->_get_crlf_indent(), $text); + } + $after = $id == (T_COMMENT && preg_match("/^\/\//", $text)) ? $this->options["LINE_AFTER_COMMENT"] : $this->options["LINE_AFTER_COMMENT_MULTI"]; + $before = $id == (T_COMMENT && preg_match("/^\/\//", $text)) ? $this->options["LINE_BEFORE_COMMENT"] : $this->options["LINE_BEFORE_COMMENT_MULTI"]; + if ($prev = $this->_is_token(S_OPEN_CURLY, true, $index, true)) { + $before = $before && !$this->_is_token_lf(true, $prev); + } + $after = $after && (!$this->_is_token_lf() || !$this->options["KEEP_REDUNDANT_LINES"]); + if ($before) { + $this->_append_code($this->_get_crlf(!$this->_is_token(array(T_COMMENT), true)) . $this->_get_crlf_indent() . trim($text) . $this->_get_crlf($after) . $this->_get_crlf_indent()); + } + else { + $this->_append_code(trim($text) . $this->_get_crlf($after) . $this->_get_crlf_indent(), false); + } + break; + + case T_DOLLAR_OPEN_CURLY_BRACES: + case T_CURLY_OPEN: + $curly_open = true; + case T_NUM_STRING: + case T_BAD_CHARACTER: + $this->_append_code(trim($text)); + break; + + case T_EXTENDS: + case T_IMPLEMENTS: + case T_INSTANCEOF: + case T_AS: + $this->_append_code($this->_get_space() . $text . $this->_get_space()); + break; + + case S_DOLLAR: + case S_REFERENCE: + case T_INC: + case T_DEC: + $this->_append_code(trim($text), false); + break; + + case T_WHITESPACE: + $redundant = ""; + if ($this->options["KEEP_REDUNDANT_LINES"]) { + $lines = preg_match_all("/\r?\n/", $text, $matches); + $lines = $lines > 0 ? $lines - 1 : 0; + $redundant = $lines > 0 ? str_repeat($this->_new_line, $lines) : ""; + $current_indent = $this->_get_indent(); + if (substr($this->_code, strlen($current_indent) * - 1) == $current_indent && $lines > 0) { + $redundant .= $current_indent; + } + } + if($this->_is_token(array(T_OPEN_TAG), true)) { + $this->_append_code($text, false); + } + else { + $this->_append_code($redundant . trim($text), false); + } + break; + + case S_QUOTE: + $this->_append_code($text, false); + $halt_parser = !$halt_parser; + break; + + case T_ARRAY: + if ($this->options["VERTICAL_ARRAY"]) { + $next = $this->_is_token(array(T_DOUBLE_ARROW), true); + $next |= $this->_is_token(S_EQUAL, true); + $next |= $array_level>0; + if ($next) { + $next = $this->_is_token(S_OPEN_PARENTH, false, $index, true); + if ($next) { + $next = !$this->_is_token(S_CLOSE_PARENTH, false, $next); + } + } + if ($next) { + $array_level++; + $arr_parenth["i" . $array_level] = 0; + } + } + case T_STRING: + case T_CONSTANT_ENCAPSED_STRING: + case T_ENCAPSED_AND_WHITESPACE: + case T_VARIABLE: + case T_CHARACTER: + case T_STRING_VARNAME: + case S_AT: + case S_EXCLAMATION: + case T_OPEN_TAG: + case T_OPEN_TAG_WITH_ECHO: + $this->_append_code($text, false); + break; + + case T_CLOSE_TAG: + $this->_append_code($text, !$this->_is_token_lf(true)); + break; + + case T_CASE: + case T_DEFAULT: + if ($switch_arr["l" . $switch_level] > 0 && $this->options["INDENT_CASE"]) { + $switch_arr["c" . $switch_level]--; + $this->_set_indent( - 1); + $this->_append_code($this->_get_crlf_indent() . $text . $this->_get_space()); + } + else { + $switch_arr["l" . $switch_level]++; + $this->_append_code($text . $this->_get_space(), false); + } + break; + + case T_INLINE_HTML: + $this->_append_code($text, false); + break; + + case T_BREAK: + case T_CONTINUE: + $in_break = true; + case T_VAR: + case T_GLOBAL: + case T_STATIC: + case T_CONST: + case T_ECHO: + case T_PRINT: + case T_INCLUDE: + case T_INCLUDE_ONCE: + case T_REQUIRE: + case T_REQUIRE_ONCE: + case T_DECLARE: + case T_EMPTY: + case T_ISSET: + case T_UNSET: + case T_DNUMBER: + case T_LNUMBER: + case T_RETURN: + case T_EVAL: + case T_EXIT: + case T_LIST: + case T_CLONE: + case T_NEW: + case T_FUNC_C: + case T_CLASS_C: + case T_FILE: + case T_LINE: + $this->_append_code($text . $this->_get_space(), false); + break; + + case T_ELSEIF: + $space_after = $this->options["SPACE_AFTER_IF"]; + $added_braces = $this->_is_token(S_SEMI_COLON, true) && $this->options["ADD_MISSING_BRACES"]; + $condition = $this->options['ELSE_ALONG_CURLY'] && ($this->_is_token(S_CLOSE_CURLY, true) || $added_braces); + $this->_append_code($this->_get_space($condition) . $text . $this->_get_space($space_after), $condition); + $if_level++; + $if_parenth["i" . $if_level] = 0; + break; + + case T_ELSE: + $added_braces = $this->_is_token(S_SEMI_COLON, true) && $this->options["ADD_MISSING_BRACES"]; + $condition = $this->options['ELSE_ALONG_CURLY'] && ($this->_is_token(S_CLOSE_CURLY, true) || $added_braces); + $this->_append_code($this->_get_space($condition) . $text, $condition); + if (!$this->_is_token(S_OPEN_CURLY) && !$this->_is_token(array(T_IF))) { + $text = $this->options["ADD_MISSING_BRACES"] ? "{" : ""; + $this->_set_indent( + 1); + $this->_append_code((!$this->options["LINE_BEFORE_CURLY"] || $text == "" ? ' ' : $this->_get_crlf_indent(false, - 1)) . $text . $this->_get_crlf_indent()); + $if_pending++; + } + break; + + default: + $this->_append_code($text . ' ', false); + break; + } + } + return $this->_align_operators(); + } + + function _get_token($token) + { + if (is_string($token)) { + return array($token, $token); + } + else { + return $token; + } + } + + function _append_code($code = "", $trim = true) + { + if ($trim) { + $this->_code = rtrim($this->_code) . $code; + } + else { + $this->_code .= $code; + } + } + + function _get_crlf_indent($in_for = false, $increment = 0) + { + if ($in_for) { + $this->_for_idx++; + if ($this->_for_idx > 2) { + $this->_for_idx = 0; + } + } + if ($this->_for_idx == 0 || !$in_for) { + return $this->_get_crlf() . $this->_get_indent($increment); + } + else { + return $this->_get_space($this->options["SPACE_INSIDE_FOR"]); + } + } + + function _get_crlf($true = true) + { + return $true ? $this->_new_line : ""; + } + + function _get_space($true = true) + { + return $true ? " " : ""; + } + + function _get_indent($increment = 0) + { + return str_repeat($this->indent_char, ($this->_indent + $increment) * $this->indent_size); + } + + function _set_indent($increment) + { + $this->_indent += $increment; + if ($this->_indent < 0) { + $this->_indent = 0; + } + } + + function _is_token($token, $prev = false, $i = 99999, $idx = false) + { + if ($i == 99999) { + $i = $this->_pointer; + } + if ($prev) { + while (--$i >= 0 && is_array($this->_tokens[$i]) && $this->_tokens[$i][0] == T_WHITESPACE); + } + else { + while (++$i < count($this->_tokens)-1 && is_array($this->_tokens[$i]) && $this->_tokens[$i][0] == T_WHITESPACE); + } + if (is_string($this->_tokens[$i]) && $this->_tokens[$i] == $token) { + return $idx ? $i : true; + } + elseif (is_array($token) && is_array($this->_tokens[$i])) { + if (in_array($this->_tokens[$i][0], $token)) { + return $idx ? $i : true; + } + elseif ($prev && $this->_tokens[$i][0] == T_OPEN_TAG) { + return $idx ? $i : true; + } + } + return false; + } + + function _is_token_lf($prev = false, $i = 99999) + { + if ($i == 99999) { + $i = $this->_pointer; + } + if ($prev) { + $count = 0; + while (--$i >= 0 && is_array($this->_tokens[$i]) && $this->_tokens[$i][0] == T_WHITESPACE && strpos($this->_tokens[$i][1], "\n") === false); + } + else { + $count = 1; + while (++$i < count($this->_tokens) && is_array($this->_tokens[$i]) && $this->_tokens[$i][0] == T_WHITESPACE && strpos($this->_tokens[$i][1], "\n") === false); + } + if (is_array($this->_tokens[$i]) && preg_match_all("/\r?\n/", $this->_tokens[$i][1], $matches) > $count) { + return true; + } + return false; + } + + function _pad_operators($found) + { + global $quotes; + $pad_size = 0; + $result = ""; + $source = explode($this->_new_line, $found[0]); + $position = array(); + array_pop($source); + foreach ($source as $k => $line) { + if (preg_match("/'quote[0-9]+'/", $line)) { + preg_match_all("/'quote([0-9]+)'/", $line, $holders); + for ($i = 0; $i < count($holders[1]); $i++) { + $line = preg_replace("/" . $holders[0][$i] . "/", str_repeat(" ", strlen($quotes[0][$holders[1][$i]])), $line); + } + } + if (strpos($line, "=") > $pad_size) { + $pad_size = strpos($line, "="); + } + $position[$k] = strpos($line, "="); + } + foreach ($source as $k => $line) { + $padding = str_repeat(" ", $pad_size - $position[$k]); + $padded = preg_replace("/^([^=]+?)([\.\+\*\/\-\%]?=)(.*)$/", "\\1{$padding}\\2\\3" . $this->_new_line, $line); + $result .= $padded; + } + return $result; + } + + function _parse_block($blocks) + { + global $quotes; + $pad_chars = ""; + $holders = array(); + if ($this->options['ALIGN_ARRAY_ASSIGNMENT']) { + $pad_chars .= ","; + } + if ($this->options['ALIGN_VAR_ASSIGNMENT']) { + $pad_chars .= ";"; + } + $php_code = $blocks[0]; + preg_match_all("/\/\*.*?\*\/|\/\/[^\n]*|#[^\n]|([\"'])[^\\\\]*?(?:\\\\.[^\\\\]*?)*?\\1/s", $php_code, $quotes); + $quotes[0] = array_values(array_unique($quotes[0])); + for ($i = 0; $i < count($quotes[0]); $i++) { + $patterns[] = "/" . preg_quote($quotes[0][$i], '/') . "/"; + $holders[] = "'quote$i'"; + $quotes[0][$i] = str_replace('\\\\', '\\\\\\\\', $quotes[0][$i]); + } + if (count($holders) > 0) { + $php_code = preg_replace($patterns, $holders, $php_code); + } + $php_code = preg_replace_callback("/(?:.+=.+[" . $pad_chars . "]\r?\n){" . $this->block_size . ",}/", array($this, "_pad_operators"), $php_code); + for ($i = count($holders) - 1; $i >= 0; $i--) { + $holders[$i] = "/" . $holders[$i] . "/"; + } + if (count($holders) > 0) { + $php_code = preg_replace($holders, $quotes[0], $php_code); + } + return $php_code; + } + + function _align_operators() + { + if ($this->options['ALIGN_ARRAY_ASSIGNMENT'] || $this->options['ALIGN_VAR_ASSIGNMENT']) { + return preg_replace_callback("/<\?.*?\?" . ">/s", array($this, "_parse_block"), $this->_code); + } + else { + return $this->_code; + } + } +} +?> diff --git a/indenters/phpStylist.txt b/indenters/phpStylist.txt index ee3f7a2..55b3cc5 100755 --- a/indenters/phpStylist.txt +++ b/indenters/phpStylist.txt @@ -1,161 +1,161 @@ -/*****************************************************************************
- * The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
- * Version 1.1 ("License"); You may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * http://opensource.org/licenses/rpl.php. Software distributed under the
- * License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
- * either express or implied.
- *
- * @product: phpStylist
- * @author: Mr. Milk (aka Marcelo Leite)
- * @email: mrmilk@anysoft.com.br
- * @version: 1.0
- * @date: 2007-11-22
- *
- *****************************************************************************/
-
-CONTENTS
---------
-Below you will find instructions on how to use phpStylist:
-
-- Web Server Usage
-- Command Line Mode
-- PSPad Integration
-- Command Line Options
-
-==============================================================================
-
-WEB SERVER USAGE
-----------------
-
-phpStylist runs as a single file on you web server. You don't need any special
-module or library. It has been tested with php from 4.4.2 to 5.2.2.
-
-Save phpStylist.php to your web server folder and start it from the browser.
-For example, http://localhost/phpStylist.php.
-
-On the left menu, you will see more than 30 options that you can use to adjust
-the application to your coding style. All options are sticky based on cookies.
-Select one of your files or click on the button "Use Sample" and try each
-option to see what it is all about.
-
-If you want to type in or paste code directly into the app, first click on the
-option "SHOW EDITABLE TEXT BOX". The right panel will then become editable.
-
-COMMAND LINE MODE
------------------
-
-You can also use phpStylist through the command line to automatically format
-local files. You will still need php installed.
-
-First, find the exact location of you php.exe and the exact location where you
-placed phpStylist. Let's say they are in
-"C:\Program Files\PHP\php.exe" and "C:\Program Files\Apache\htdocs\phpStylist.php"
-
-You then must run php passing phpStylist.php along with the -f argument. At
-this point the command line would be like this:
-"C:\Program Files\PHP\php.exe" -f "C:\Program Files\Apache\htdocs\phpStylist.php"
-
-But that's not all. You also need to add the full path of the source file you
-want to format and the options you want to be used. For each of those 34 options
-you see on the web server usage, there will be an option on the command line.
-You can use the "--help" option to see a list of options.
-
-Use the --help switch to see all options (full list at the end of this file):
-"C:\Program Files\PHP\php.exe" -f "C:\Program Files\Apache\htdocs\phpStylist.php" --help
-
-The first phpStylist paramenter MUST be the source file name you want to
-format. After the file name, you can add as many options as you want, in any
-order. It can get pretty big, but it works. Another example:
-"C:\Program Files\PHP\php.exe" -f "C:\Program Files\Apache\htdocs\phpStylist.php"
-"C:\Program Files\Apache\htdocs\source_file_to_format.php" --space_after_if
---indent_case --indent_size 4 --space_after_comma --line_before_function
-
-Output will be to STDOUT, so if you want to send it to a file, append "> filename"
-at the end of the command line. In our above example:
-"C:\Program Files\PHP\php.exe" -f "C:\Program Files\Apache\htdocs\phpStylist.php"
-"C:\Program Files\Apache\htdocs\source_file_to_format.php" --space_after_if
---indent_case --indent_size 4 --line_before_comment_multi --vertical_array
---line_before_function > "C:\Code Library\Formatted Code\destination_file.php"
-
-Don't forget the quotes around long file names.
-
-PSPAD INTEGRATION
------------------
-PSPad is a popular, powerful and free code editor. It can be extended through
-scripting. I have also created a script that will automatically format php code
-from inside the editor. In fact, the script runs phpStylist in command line
-mode, sending the current editor file name. It then get the results and replace
-the code in the editor.
-
-Save the file phpStylist.js to your PSPad javascript folder, usually
-C:\Program Files\PSPad\Script\JScript.
-
-Open the phpStylist.js file and edit the first two variables:
- php_path = "C:\\Program Files\\xampp\\php\\php.exe";
- stylist_path = "C:\\Program Files\\xampp\\htdocs\\phpStylist.php";
-
-Replace the paths with the appropriate for your system. Don't forget to double
-backslashes.
-
-You will also see all the options, some are commented out, some are active (the
-current setup is the one I use). Simply comment out or uncomment the options
-you want to use and save the file. Restart PSPad or use the the option Scripts,
-Recompile Scripts.
-
-Now, just open a php file on the editor and select phpStylist from the menu.
-That's all. You can also select some block of code before using the option so
-you can reformat only that portion. Of course, try to select a full block such
-as a function.
-
-If you don't use PSPad or don't want the integration you don't need the file
-phpStylist.js.
-
-FULL LIST OF OPTIONS
---------------------
-
-Indentation and General Formatting:
---indent_size n n characters per indentation level
---indent_with_tabs Indent with tabs instead of spaces
---keep_redundant_lines Keep redundant lines
---space_inside_parentheses Space inside parentheses
---space_outside_parentheses Space outside parentheses
---space_after_comma Space after comma
-
-Operators:
---space_around_assignment Space around = .= += -= *= /= <<<
---align_var_assignment Align block +3 assigned variables
---space_around_comparison Space around == === != !== > >= < <=
---space_around_arithmetic Space around - + * / %
---space_around_logical Space around && || AND OR XOR << >>
---space_around_colon_question Space around ? :
-
-Functions, Classes and Objects:
---line_before_function Blank line before keyword
---line_before_curly_function Opening bracket on next line
---line_after_curly_function Blank line below opening bracket
---space_around_obj_operator Space around ->
---space_around_double_colon Space around ::
-
-Control Structures:
---space_after_if Space between keyword and opening parentheses
---else_along_curly Keep else/elseif along with bracket
---line_before_curly Opening bracket on next line
---add_missing_braces Add missing brackets to single line structs
---line_after_break Blank line after case "break"
---space_inside_for Space between "for" elements
---indent_case Extra indent for "Case" and "Default"
-
-Arrays and Concatenation:
---line_before_array Opening array parentheses on next line
---vertical_array Non-empty arrays as vertical block
---align_array_assignment Align block +3 assigned array elements
---space_around_double_arrow Space around double arrow
---vertical_concat Concatenation as vertical block
---space_around_concat Space around concat elements
-
-Comments:
---line_before_comment_multi Blank line before multi-line comment (/*)
---line_after_comment_multi Blank line after multi-line comment (/*)
---line_before_comment Blank line before single line comments (//)
---line_after_comment Blank line after single line comments (//)
+/***************************************************************************** + * The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE + * Version 1.1 ("License"); You may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * http://opensource.org/licenses/rpl.php. Software distributed under the + * License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, + * either express or implied. + * + * @product: phpStylist + * @author: Mr. Milk (aka Marcelo Leite) + * @email: mrmilk@anysoft.com.br + * @version: 1.0 + * @date: 2007-11-22 + * + *****************************************************************************/ + +CONTENTS +-------- +Below you will find instructions on how to use phpStylist: + +- Web Server Usage +- Command Line Mode +- PSPad Integration +- Command Line Options + +============================================================================== + +WEB SERVER USAGE +---------------- + +phpStylist runs as a single file on you web server. You don't need any special +module or library. It has been tested with php from 4.4.2 to 5.2.2. + +Save phpStylist.php to your web server folder and start it from the browser. +For example, http://localhost/phpStylist.php. + +On the left menu, you will see more than 30 options that you can use to adjust +the application to your coding style. All options are sticky based on cookies. +Select one of your files or click on the button "Use Sample" and try each +option to see what it is all about. + +If you want to type in or paste code directly into the app, first click on the +option "SHOW EDITABLE TEXT BOX". The right panel will then become editable. + +COMMAND LINE MODE +----------------- + +You can also use phpStylist through the command line to automatically format +local files. You will still need php installed. + +First, find the exact location of you php.exe and the exact location where you +placed phpStylist. Let's say they are in +"C:\Program Files\PHP\php.exe" and "C:\Program Files\Apache\htdocs\phpStylist.php" + +You then must run php passing phpStylist.php along with the -f argument. At +this point the command line would be like this: +"C:\Program Files\PHP\php.exe" -f "C:\Program Files\Apache\htdocs\phpStylist.php" + +But that's not all. You also need to add the full path of the source file you +want to format and the options you want to be used. For each of those 34 options +you see on the web server usage, there will be an option on the command line. +You can use the "--help" option to see a list of options. + +Use the --help switch to see all options (full list at the end of this file): +"C:\Program Files\PHP\php.exe" -f "C:\Program Files\Apache\htdocs\phpStylist.php" --help + +The first phpStylist paramenter MUST be the source file name you want to +format. After the file name, you can add as many options as you want, in any +order. It can get pretty big, but it works. Another example: +"C:\Program Files\PHP\php.exe" -f "C:\Program Files\Apache\htdocs\phpStylist.php" +"C:\Program Files\Apache\htdocs\source_file_to_format.php" --space_after_if +--indent_case --indent_size 4 --space_after_comma --line_before_function + +Output will be to STDOUT, so if you want to send it to a file, append "> filename" +at the end of the command line. In our above example: +"C:\Program Files\PHP\php.exe" -f "C:\Program Files\Apache\htdocs\phpStylist.php" +"C:\Program Files\Apache\htdocs\source_file_to_format.php" --space_after_if +--indent_case --indent_size 4 --line_before_comment_multi --vertical_array +--line_before_function > "C:\Code Library\Formatted Code\destination_file.php" + +Don't forget the quotes around long file names. + +PSPAD INTEGRATION +----------------- +PSPad is a popular, powerful and free code editor. It can be extended through +scripting. I have also created a script that will automatically format php code +from inside the editor. In fact, the script runs phpStylist in command line +mode, sending the current editor file name. It then get the results and replace +the code in the editor. + +Save the file phpStylist.js to your PSPad javascript folder, usually +C:\Program Files\PSPad\Script\JScript. + +Open the phpStylist.js file and edit the first two variables: + php_path = "C:\\Program Files\\xampp\\php\\php.exe"; + stylist_path = "C:\\Program Files\\xampp\\htdocs\\phpStylist.php"; + +Replace the paths with the appropriate for your system. Don't forget to double +backslashes. + +You will also see all the options, some are commented out, some are active (the +current setup is the one I use). Simply comment out or uncomment the options +you want to use and save the file. Restart PSPad or use the the option Scripts, +Recompile Scripts. + +Now, just open a php file on the editor and select phpStylist from the menu. +That's all. You can also select some block of code before using the option so +you can reformat only that portion. Of course, try to select a full block such +as a function. + +If you don't use PSPad or don't want the integration you don't need the file +phpStylist.js. + +FULL LIST OF OPTIONS +-------------------- + +Indentation and General Formatting: +--indent_size n n characters per indentation level +--indent_with_tabs Indent with tabs instead of spaces +--keep_redundant_lines Keep redundant lines +--space_inside_parentheses Space inside parentheses +--space_outside_parentheses Space outside parentheses +--space_after_comma Space after comma + +Operators: +--space_around_assignment Space around = .= += -= *= /= <<< +--align_var_assignment Align block +3 assigned variables +--space_around_comparison Space around == === != !== > >= < <= +--space_around_arithmetic Space around - + * / % +--space_around_logical Space around && || AND OR XOR << >> +--space_around_colon_question Space around ? : + +Functions, Classes and Objects: +--line_before_function Blank line before keyword +--line_before_curly_function Opening bracket on next line +--line_after_curly_function Blank line below opening bracket +--space_around_obj_operator Space around -> +--space_around_double_colon Space around :: + +Control Structures: +--space_after_if Space between keyword and opening parentheses +--else_along_curly Keep else/elseif along with bracket +--line_before_curly Opening bracket on next line +--add_missing_braces Add missing brackets to single line structs +--line_after_break Blank line after case "break" +--space_inside_for Space between "for" elements +--indent_case Extra indent for "Case" and "Default" + +Arrays and Concatenation: +--line_before_array Opening array parentheses on next line +--vertical_array Non-empty arrays as vertical block +--align_array_assignment Align block +3 assigned array elements +--space_around_double_arrow Space around double arrow +--vertical_concat Concatenation as vertical block +--space_around_concat Space around concat elements + +Comments: +--line_before_comment_multi Blank line before multi-line comment (/*) +--line_after_comment_multi Blank line after multi-line comment (/*) +--line_before_comment Blank line before single line comments (//) +--line_after_comment Blank line after single line comments (//) diff --git a/indenters/pindent.txt b/indenters/pindent.txt index 1a04ba6..55ddefb 100755 --- a/indenters/pindent.txt +++ b/indenters/pindent.txt @@ -1,75 +1,75 @@ -# This file contains a class and a main program that perform three
-# related (though complimentary) formatting operations on Python
-# programs. When called as "pindent -c", it takes a valid Python
-# program as input and outputs a version augmented with block-closing
-# comments. When called as "pindent -d", it assumes its input is a
-# Python program with block-closing comments and outputs a commentless
-# version. When called as "pindent -r" it assumes its input is a
-# Python program with block-closing comments but with its indentation
-# messed up, and outputs a properly indented version.
-
-# A "block-closing comment" is a comment of the form '# end <keyword>'
-# where <keyword> is the keyword that opened the block. If the
-# opening keyword is 'def' or 'class', the function or class name may
-# be repeated in the block-closing comment as well. Here is an
-# example of a program fully augmented with block-closing comments:
-
-# def foobar(a, b):
-# if a == b:
-# a = a+1
-# elif a < b:
-# b = b-1
-# if b > a: a = a-1
-# # end if
-# else:
-# print 'oops!'
-# # end if
-# # end def foobar
-
-# Note that only the last part of an if...elif...else... block needs a
-# block-closing comment; the same is true for other compound
-# statements (e.g. try...except). Also note that "short-form" blocks
-# like the second 'if' in the example must be closed as well;
-# otherwise the 'else' in the example would be ambiguous (remember
-# that indentation is not significant when interpreting block-closing
-# comments).
-
-# The operations are idempotent (i.e. applied to their own output
-# they yield an identical result). Running first "pindent -c" and
-# then "pindent -r" on a valid Python program produces a program that
-# is semantically identical to the input (though its indentation may
-# be different). Running "pindent -e" on that output produces a
-# program that only differs from the original in indentation.
-
-# Other options:
-# -s stepsize: set the indentation step size (default 8)
-# -t tabsize : set the number of spaces a tab character is worth (default 8)
-# -e : expand TABs into spaces
-# file ... : input file(s) (default standard input)
-# The results always go to standard output
-
-# Caveats:
-# - comments ending in a backslash will be mistaken for continued lines
-# - continuations using backslash are always left unchanged
-# - continuations inside parentheses are not extra indented by -r
-# but must be indented for -c to work correctly (this breaks
-# idempotency!)
-# - continued lines inside triple-quoted strings are totally garbled
-
-# Secret feature:
-# - On input, a block may also be closed with an "end statement" --
-# this is a block-closing comment without the '#' sign.
-
-# Possible improvements:
-# - check syntax based on transitions in 'next' table
-# - better error reporting
-# - better error recovery
-# - check identifier after class/def
-
-# The following wishes need a more complete tokenization of the source:
-# - Don't get fooled by comments ending in backslash
-# - reindent continuation lines indicated by backslash
-# - handle continuation lines inside parentheses/braces/brackets
-# - handle triple quoted strings spanning lines
-# - realign comments
-# - optionally do much more thorough reformatting, a la C indent
+# This file contains a class and a main program that perform three +# related (though complimentary) formatting operations on Python +# programs. When called as "pindent -c", it takes a valid Python +# program as input and outputs a version augmented with block-closing +# comments. When called as "pindent -d", it assumes its input is a +# Python program with block-closing comments and outputs a commentless +# version. When called as "pindent -r" it assumes its input is a +# Python program with block-closing comments but with its indentation +# messed up, and outputs a properly indented version. + +# A "block-closing comment" is a comment of the form '# end <keyword>' +# where <keyword> is the keyword that opened the block. If the +# opening keyword is 'def' or 'class', the function or class name may +# be repeated in the block-closing comment as well. Here is an +# example of a program fully augmented with block-closing comments: + +# def foobar(a, b): +# if a == b: +# a = a+1 +# elif a < b: +# b = b-1 +# if b > a: a = a-1 +# # end if +# else: +# print 'oops!' +# # end if +# # end def foobar + +# Note that only the last part of an if...elif...else... block needs a +# block-closing comment; the same is true for other compound +# statements (e.g. try...except). Also note that "short-form" blocks +# like the second 'if' in the example must be closed as well; +# otherwise the 'else' in the example would be ambiguous (remember +# that indentation is not significant when interpreting block-closing +# comments). + +# The operations are idempotent (i.e. applied to their own output +# they yield an identical result). Running first "pindent -c" and +# then "pindent -r" on a valid Python program produces a program that +# is semantically identical to the input (though its indentation may +# be different). Running "pindent -e" on that output produces a +# program that only differs from the original in indentation. + +# Other options: +# -s stepsize: set the indentation step size (default 8) +# -t tabsize : set the number of spaces a tab character is worth (default 8) +# -e : expand TABs into spaces +# file ... : input file(s) (default standard input) +# The results always go to standard output + +# Caveats: +# - comments ending in a backslash will be mistaken for continued lines +# - continuations using backslash are always left unchanged +# - continuations inside parentheses are not extra indented by -r +# but must be indented for -c to work correctly (this breaks +# idempotency!) +# - continued lines inside triple-quoted strings are totally garbled + +# Secret feature: +# - On input, a block may also be closed with an "end statement" -- +# this is a block-closing comment without the '#' sign. + +# Possible improvements: +# - check syntax based on transitions in 'next' table +# - better error reporting +# - better error recovery +# - check identifier after class/def + +# The following wishes need a more complete tokenization of the source: +# - Don't get fooled by comments ending in backslash +# - reindent continuation lines indicated by backslash +# - handle continuation lines inside parentheses/braces/brackets +# - handle triple quoted strings spanning lines +# - realign comments +# - optionally do much more thorough reformatting, a la C indent diff --git a/indenters/uigui_CblBeau.ini b/indenters/uigui_CblBeau.ini index 03b82f1..069f429 100755 --- a/indenters/uigui_CblBeau.ini +++ b/indenters/uigui_CblBeau.ini @@ -1,543 +1,543 @@ -[header]
-categories="Cobol Beautifier|Renumbering|Generic Reporting|Cobol Dialects|Extra Features|Copy Libraries|Parser Messages|Length and Offset|PrettyPrint Basics|PrettyPrint Indentation|Output Comments|Line Identification"
-cfgFileParameterEnding=" "
-configFilename=
-fileTypes=*.cbl|*.cob
-indenterFileName=cbl-beau.exe
-indenterName=Cobol Beautifier (Cobol)
-inputFileName=indentinput
-inputFileParameter=" "
-manual=http://www.siber.com/sct/tools/cbl-beau.html
-outputFileName=indentoutput
-outputFileParameter="-gen-file="
-parameterOrder=ipo
-showHelpParameter="-help"
-stringparaminquotes=false
-useCfgFileParameter=
-version=1.0
-
-
-[Add value clause]
-Category=0
-Description="<html>Add VALUE clauses to WS data items that have no VALUE clause</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-add-value-clause|"
-
-[Norm dd levels]
-Category=0
-Description="<html>Normalize data item level numbers</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-norm-dd-levels|"
-
-[Add end stmts]
-Category=0
-Description="<html>Add END-IF, END-SEARCH, END-EVALUATE, END-PERFORM closing statements</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-add-end-stmts|"
-
-[Section name fmt]
-CallName="-section-name-fmt="
-Category=1
-Description="<html>Section name format, smth like T1%dT2%sT3</html>"
-EditorType=string
-Enabled=false
-ValueDefault="T1%dT2%sT3"
-
-[Section name start]
-CallName="-section-name-start="
-Category=1
-Description="<html>Start value for number in section name</html>"
-EditorType=numeric
-Enabled=false
-MaxVal=9999
-MinVal=0
-ValueDefault=1
-
-[Section name step]
-CallName="-section-name-step="
-Category=1
-Description="<html>Step for number in section name</html>"
-EditorType=numeric
-Enabled=false
-MaxVal=9999
-MinVal=0
-ValueDefault=1
-
-[Para name fmt]
-CallName="-para-name-fmt="
-Category=1
-Description="<html>Paragraph name format, smth like T1%dT2%sT3</html>"
-EditorType=string
-Enabled=false
-ValueDefault="T1%dT2%sT3"
-
-[Para name start]
-CallName="-para-name-start="
-Category=1
-Description="<html>Start value for counter in paragraph name</html>"
-EditorType=numeric
-Enabled=false
-MaxVal=9999
-MinVal=0
-ValueDefault=1
-
-[Para name step]
-CallName="-para-name-step="
-Category=1
-Description="<html>Step for counter in paragraph name</html>"
-EditorType=numeric
-Enabled=false
-MaxVal=9999
-MinVal=0
-ValueDefault=1
-
-[Data name fmt]
-CallName="-data-name-fmt="
-Category=1
-Description="<html>Data name format, smth like T1%dT2%sT3</html>"
-EditorType=string
-Enabled=false
-ValueDefault="T1%dT2%sT3"
-
-[Data name start]
-CallName="-data-name-start="
-Category=1
-Description="<html>Start value for number in data name</html>"
-EditorType=numeric
-Enabled=false
-MaxVal=9999
-MinVal=0
-ValueDefault=1
-
-[Data name step]
-CallName="-data-name-step="
-Category=1
-Description="<html>Step for number in data name</html>"
-EditorType=numeric
-Enabled=false
-MaxVal=9999
-MinVal=0
-ValueDefault=1
-
-[Conv warn]
-Category=2
-Description="<html>Warn about transformation problems</html>"
-ValueDefault=1
-Enabled=true
-EditorType=boolean
-TrueFalse="-conv-warn|-no-conv-warn"
-
-[Conv info]
-Category=2
-Description="<html>Inform about every transformation performed</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-conv-info|-no-conv-info"
-
-[Conv list]
-Category=2
-Description="<html>List all transformations applied</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-conv-list|-no-conv-list"
-
-[Find only]
-Category=2
-Description="<html>Only list potential transformations, do not execute them</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-find-only|-no-find-only"
-
-[Silent]
-Category=2
-Description="<html>Do not print short summary of the conversion</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-silent|-no-silent"
-
-[Primary Cobol dialect]
-Category=3
-Description="<html>Set the primary Cobol dialect</html>"
-ValueDefault=1
-Enabled=false
-EditorType=multiple
-Choices="-lang=ansi74|-lang=ansi85|-lang=osvs|-lang=vsii|-lang=saa|-lang=xopen|-lang=mf|-lang=ms|-lang=rm|-lang=rm85|-lang=dosvs|-lang=univac|-lang=wang|-lang=fsc|-lang=net|-lang=fscnet|-lang=icobol|-lang=acu|-lang=dml|-lang=idms"
-ChoicesReadable="Ansi 74|Ansi 85|OSVS|VSII|SAA|XOpen|MF|MS|RM|RM 85|DOSVS|UniVAC|Wang|FSC|Net|FSCnet|iCobol|ACU|DML|IDMS"
-
-[Secondary Cobol dialect]
-Category=3
-Description="<html>Set the secondary Cobol dialect</html>"
-ValueDefault=0
-Enabled=false
-EditorType=multiple
-Choices="-lang2=ansi74|-lang2=ansi85|-lang2=osvs|-lang2=vsii|-lang2=saa|-lang2=xopen|-lang2=mf|-lang2=ms|-lang2=rm|-lang2=rm85|-lang2=dosvs|-lang2=univac|-lang2=wang|-lang2=fsc|-lang2=net|-lang2=fscnet|-lang2=icobol|-lang2=acu|-lang2=dml|-lang2=idms"
-ChoicesReadable="Ansi 74|Ansi 85|OSVS|VSII|SAA|XOpen|MF|MS|RM|RM 85|DOSVS|UniVAC|Wang|FSC|Net|FSCnet|iCobol|ACU|DML|IDMS"
-
-[Line format]
-Category=3
-Description="<html>Set the secondary Cobol dialect</html>"
-ValueDefault=0
-Enabled=false
-EditorType=multiple
-Choices="-line-format=dial|-line-format=fixed|-line-format=free|-line-format=fsc-free|-line-format=var"
-ChoicesReadable="Dial|fixed|free|FSC free|var"
-
-[Progid comments]
-Category=3
-Description="<html>Allow Program-Id line comments</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-progid-comments|-no-progid-comments"
-
-[Separators follow spaces]
-Category=3
-Description="<html>Separators must be followed by spaces</html>"
-ValueDefault=0
-Enabled=false
-EditorType=multiple
-Choices="-sep-space-reqd=dial|-sep-space-reqd=no|-sep-space-reqd=yes"
-ChoicesReadable="Dial|No|Yes"
-
-[Exclude keywords]
-CallName="-exclude-keywords="
-Category=3
-Description="<html>Excluded keywords (separated by spaces?)</html>"
-EditorType=string
-Enabled=false
-ValueDefault=""
-
-[Set constants]
-CallName="-set-constants="
-Category=4
-Description="<html>78 constant settings, strings: name'value', numbers: name(value)</html>"
-EditorType=string
-Enabled=false
-ValueDefault=""
-
-[Assign external]
-Category=4
-Description="<html>Assume that undefined data items in ASSIGN TO are external</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-assign-external|-no-assign-external"
-
-[SQL]
-Category=4
-Description="<html>Parse SQL in EXEC SQL</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-sql|-no-sql"
-
-[CICS]
-Category=4
-Description="<html>Parse CICS statements embedded in EXEC CICS ... END-EXEC</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-cics|-no-cics"
-
-[CICS EIB]
-Category=4
-Description="<html>Add CICS EIB data block to LINKAGE SECTION</html>"
-ValueDefault=0
-Enabled=false
-EditorType=multiple
-Choices="-cics-eib=auto|-cics-eib=no|-cics-eib=yes"
-ChoicesReadable="Auto|No|Yes"
-
-[Copylib dir]
-CallName="-copylib-dir="
-Category=5
-Description="<html>Copylib directories path</html>"
-EditorType=string
-Enabled=false
-ValueDefault="."
-
-[Copylib suffix]
-CallName="-copylib-sfx="
-Category=5
-Description="<html>Copylib files default suffix(es)</html>"
-EditorType=string
-Enabled=false
-ValueDefault=".cpy"
-
-[Copylib names]
-Category=5
-Description="<html>Add CICS EIB data block to LINKAGE SECTION</html>"
-ValueDefault=0
-Enabled=false
-EditorType=multiple
-Choices="-copynames-case=exact|-copynames-case=lower|-copynames-case=upper"
-ChoicesReadable="Exact|Lower|Upper"
-
-[Copylib old]
-Category=5
-Description="<html>Allow old 1968 Copy statements</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-old-copy|-no-old-copy"
-
-[Copylib irreversibly]
-Category=5
-Description="<html>Inline copybooks irreversibly</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-irrev-inline|-no-irrev-inline"
-
-[Warnings]
-Category=6
-Description="<html>Display Warnings</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-warnings|-no-warnings"
-
-[Muli undef errors]
-Category=6
-Description="<html>Error message for every (OFF: only first) use of undefined name</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-multi-undefd-errs|-no-multi-undefd-errs"
-
-[Same para data name]
-Category=6
-Description="<html>One name can be used both as paragraph-name and data-name</html>"
-ValueDefault=0
-Enabled=false
-EditorType=multiple
-Choices="-same-para-data-name=dial|-same-para-data-name=no|-same-para-data-name=yes"
-ChoicesReadable="Dial|No|Yes"
-
-[Lengths and offsets]
-Category=7
-Description="<html>Compute data item lengths and offsets</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-leng-offs|-no-leng-offs"
-
-[Storage mode]
-Category=7
-Description="<html>Is Numeric Sign a Trailing Separate Character</html>"
-ValueDefault=0
-Enabled=false
-EditorType=multiple
-Choices="-lo-stor-mode=dial|-lo-stor-mode=no|-lo-stor-mode=yes"
-ChoicesReadable="Dial|No|Yes"
-
-[Numeric sign trailing separate]
-Category=7
-Description="<html>Is Numeric Sign a Trailing Separate Character</html>"
-ValueDefault=0
-Enabled=false
-EditorType=multiple
-Choices="-num-sign-trail-sep=dial|-num-sign-trail-sep=no|-num-sign-trail-sep=yes"
-ChoicesReadable="Dial|No|Yes"
-
-[Num sign EBCDIC]
-Category=7
-Description="<html>Is Numeric Sign an EBCDIC character</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-num-sign-ebcdic|-no-num-sign-ebcdic"
-
-[Lo pointer size]
-CallName="-lo-pointer-size="
-Category=7
-Description="<html>Memory model: Pointer size</html>"
-EditorType=numeric
-Enabled=true
-MaxVal=99
-MinVal=1
-ValueDefault=4
-
-[Lo proc pointer size]
-CallName="-lo-proc-pointer-size="
-Category=7
-Description="<html>Memory model: Procedure-Pointer size</html>"
-EditorType=numeric
-Enabled=true
-MaxVal=99
-MinVal=1
-ValueDefault=4
-
-[Lo index size]
-CallName="-lo-index-size="
-Category=7
-Description="<html>Memory model: Index size</html>"
-EditorType=numeric
-Enabled=true
-MaxVal=99
-MinVal=1
-ValueDefault=4
-
-[Lo unfold flex arrays]
-Category=7
-Description="<html>Compute length of table with OCCURS DEPENDING ON based on upper bounds</html>"
-ValueDefault=1
-Enabled=true
-EditorType=boolean
-TrueFalse="-lo-unfold-flex-arrays|-no-lo-unfold-flex-arrays"
-
-[Progress]
-Category=7
-Description="<html>Display Parsing Progress Indicator</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-progress|-no-progress"
-
-[Bailout level]
-Category=7
-Description="<html>Level of parser messages that cause bailout</html>"
-ValueDefault=2
-Enabled=false
-EditorType=multiple
-Choices="-bailout-level=warnings|-bailout-level=errors|-bailout-level=severe"
-ChoicesReadable="Warnings|Errors|Severe"
-
-[Stats]
-Category=7
-Description="<html>Print short source program statistics</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-stat|-no-stat"
-
-[Genereate SourcePrint]
-Category=8
-Description="<html>Generate Cobol in SourcePrint (ON) / PrettyPrint(OFF) mode</html>"
-ValueDefault=0
-Enabled=false
-EditorType=boolean
-TrueFalse="-gen-src|-no-gen-src"
-
-[Copybook dir]
-CallName="-gen-copy-dir="
-Category=8
-Description="<html>Write copybooks to this directory</html>"
-EditorType=string
-Enabled=false
-ValueDefault=""
-
-[Indent size]
-CallName="-gen-indent-step="
-Category=9
-Description="<html>Indentation step</html>"
-EditorType=numeric
-Enabled=true
-MaxVal=99
-MinVal=1
-ValueDefault=2
-
-[Indent max]
-CallName="-gen-max-indent="
-Category=9
-Description="<html>Maximum starting position for indented text</html>"
-EditorType=numeric
-Enabled=true
-MaxVal=99
-MinVal=1
-ValueDefault=40
-
-[Tabs]
-CallName="-gen-tabs="
-Category=9
-Description="<html>Tabulation Positions</html>"
-EditorType=string
-Enabled=false
-ValueDefault="12,24,32,42,44,54"
-
-[Line format]
-Category=9
-Description="<html>Generated line format</html>"
-ValueDefault=1
-Enabled=false
-EditorType=multiple
-Choices="-gen-line-format=na|-gen-line-format=fixed|-gen-line-format=free|-gen-line-format=fsc-free|-gen-line-format=var"
-ChoicesReadable="Na|Fixed|Free|FSC-free|Var"
-
-[Observe rules]
-Category=9
-Description="<html>Observe Area A/B rules in generated code</html>"
-ValueDefault=1
-Enabled=true
-EditorType=boolean
-TrueFalse="-gen-observe-ab-rules |-no-gen-observe-ab-rules "
-
-[Preserve comments]
-Category=10
-Description="<html>Preserve comments</html>"
-ValueDefault=1
-Enabled=true
-EditorType=boolean
-TrueFalse="-gen-print-comments |-no-gen-print-comments "
-
-[Enter Exit comments]
-Category=10
-Description="<html>Generate Enter/Exit comments around inlined copybooks</html>"
-ValueDefault=1
-Enabled=true
-EditorType=boolean
-TrueFalse="-gen-enter-exit-copy-comments|-no-gen-enter-exit-copy-comments"
-
-[Preserve line IDs]
-Category=11
-Description="<html>Preserve original Line IDs (cols 1-6, 73-80)</html>"
-ValueDefault=1
-Enabled=true
-EditorType=boolean
-TrueFalse="-gen-line-id-comments|-no-gen-line-id-comments"
-
-[Put text 73-80]
-CallName="-gen-73to80-fmt="
-Category=11
-Description="<html>Put text of this format into columns 73 to 80</html>"
-EditorType=string
-Enabled=false
-ValueDefault=""
-
-[Start number 73-80]
-CallName="-gen-73to80-start="
-Category=11
-Description="<html>Start value for number put into columns 73 to 80</html>"
-EditorType=numeric
-Enabled=true
-MaxVal=99
-MinVal=1
-ValueDefault=1
-
-[Step number 73-80]
-CallName="-gen-73to80-step="
-Category=11
-Description="<html>Step for number put into columns 73 to 80</html>"
-EditorType=numeric
-Enabled=true
-MaxVal=99
-MinVal=1
-ValueDefault=1
-
-[Convert comments]
-CallName="-gen-mark-conv="
-Category=11
-Description="<html>Add comment in columns 73 and up that show that line was changed or generated</html>"
-EditorType=string
-Enabled=false
-ValueDefault=""
+[header] +categories="Cobol Beautifier|Renumbering|Generic Reporting|Cobol Dialects|Extra Features|Copy Libraries|Parser Messages|Length and Offset|PrettyPrint Basics|PrettyPrint Indentation|Output Comments|Line Identification" +cfgFileParameterEnding=" " +configFilename= +fileTypes=*.cbl|*.cob +indenterFileName=cbl-beau.exe +indenterName=Cobol Beautifier (Cobol) +inputFileName=indentinput +inputFileParameter=" " +manual=http://www.siber.com/sct/tools/cbl-beau.html +outputFileName=indentoutput +outputFileParameter="-gen-file=" +parameterOrder=ipo +showHelpParameter="-help" +stringparaminquotes=false +useCfgFileParameter= +version=1.0 + + +[Add value clause] +Category=0 +Description="<html>Add VALUE clauses to WS data items that have no VALUE clause</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-add-value-clause|" + +[Norm dd levels] +Category=0 +Description="<html>Normalize data item level numbers</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-norm-dd-levels|" + +[Add end stmts] +Category=0 +Description="<html>Add END-IF, END-SEARCH, END-EVALUATE, END-PERFORM closing statements</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-add-end-stmts|" + +[Section name fmt] +CallName="-section-name-fmt=" +Category=1 +Description="<html>Section name format, smth like T1%dT2%sT3</html>" +EditorType=string +Enabled=false +ValueDefault="T1%dT2%sT3" + +[Section name start] +CallName="-section-name-start=" +Category=1 +Description="<html>Start value for number in section name</html>" +EditorType=numeric +Enabled=false +MaxVal=9999 +MinVal=0 +ValueDefault=1 + +[Section name step] +CallName="-section-name-step=" +Category=1 +Description="<html>Step for number in section name</html>" +EditorType=numeric +Enabled=false +MaxVal=9999 +MinVal=0 +ValueDefault=1 + +[Para name fmt] +CallName="-para-name-fmt=" +Category=1 +Description="<html>Paragraph name format, smth like T1%dT2%sT3</html>" +EditorType=string +Enabled=false +ValueDefault="T1%dT2%sT3" + +[Para name start] +CallName="-para-name-start=" +Category=1 +Description="<html>Start value for counter in paragraph name</html>" +EditorType=numeric +Enabled=false +MaxVal=9999 +MinVal=0 +ValueDefault=1 + +[Para name step] +CallName="-para-name-step=" +Category=1 +Description="<html>Step for counter in paragraph name</html>" +EditorType=numeric +Enabled=false +MaxVal=9999 +MinVal=0 +ValueDefault=1 + +[Data name fmt] +CallName="-data-name-fmt=" +Category=1 +Description="<html>Data name format, smth like T1%dT2%sT3</html>" +EditorType=string +Enabled=false +ValueDefault="T1%dT2%sT3" + +[Data name start] +CallName="-data-name-start=" +Category=1 +Description="<html>Start value for number in data name</html>" +EditorType=numeric +Enabled=false +MaxVal=9999 +MinVal=0 +ValueDefault=1 + +[Data name step] +CallName="-data-name-step=" +Category=1 +Description="<html>Step for number in data name</html>" +EditorType=numeric +Enabled=false +MaxVal=9999 +MinVal=0 +ValueDefault=1 + +[Conv warn] +Category=2 +Description="<html>Warn about transformation problems</html>" +ValueDefault=1 +Enabled=true +EditorType=boolean +TrueFalse="-conv-warn|-no-conv-warn" + +[Conv info] +Category=2 +Description="<html>Inform about every transformation performed</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-conv-info|-no-conv-info" + +[Conv list] +Category=2 +Description="<html>List all transformations applied</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-conv-list|-no-conv-list" + +[Find only] +Category=2 +Description="<html>Only list potential transformations, do not execute them</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-find-only|-no-find-only" + +[Silent] +Category=2 +Description="<html>Do not print short summary of the conversion</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-silent|-no-silent" + +[Primary Cobol dialect] +Category=3 +Description="<html>Set the primary Cobol dialect</html>" +ValueDefault=1 +Enabled=false +EditorType=multiple +Choices="-lang=ansi74|-lang=ansi85|-lang=osvs|-lang=vsii|-lang=saa|-lang=xopen|-lang=mf|-lang=ms|-lang=rm|-lang=rm85|-lang=dosvs|-lang=univac|-lang=wang|-lang=fsc|-lang=net|-lang=fscnet|-lang=icobol|-lang=acu|-lang=dml|-lang=idms" +ChoicesReadable="Ansi 74|Ansi 85|OSVS|VSII|SAA|XOpen|MF|MS|RM|RM 85|DOSVS|UniVAC|Wang|FSC|Net|FSCnet|iCobol|ACU|DML|IDMS" + +[Secondary Cobol dialect] +Category=3 +Description="<html>Set the secondary Cobol dialect</html>" +ValueDefault=0 +Enabled=false +EditorType=multiple +Choices="-lang2=ansi74|-lang2=ansi85|-lang2=osvs|-lang2=vsii|-lang2=saa|-lang2=xopen|-lang2=mf|-lang2=ms|-lang2=rm|-lang2=rm85|-lang2=dosvs|-lang2=univac|-lang2=wang|-lang2=fsc|-lang2=net|-lang2=fscnet|-lang2=icobol|-lang2=acu|-lang2=dml|-lang2=idms" +ChoicesReadable="Ansi 74|Ansi 85|OSVS|VSII|SAA|XOpen|MF|MS|RM|RM 85|DOSVS|UniVAC|Wang|FSC|Net|FSCnet|iCobol|ACU|DML|IDMS" + +[Line format] +Category=3 +Description="<html>Set the secondary Cobol dialect</html>" +ValueDefault=0 +Enabled=false +EditorType=multiple +Choices="-line-format=dial|-line-format=fixed|-line-format=free|-line-format=fsc-free|-line-format=var" +ChoicesReadable="Dial|fixed|free|FSC free|var" + +[Progid comments] +Category=3 +Description="<html>Allow Program-Id line comments</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-progid-comments|-no-progid-comments" + +[Separators follow spaces] +Category=3 +Description="<html>Separators must be followed by spaces</html>" +ValueDefault=0 +Enabled=false +EditorType=multiple +Choices="-sep-space-reqd=dial|-sep-space-reqd=no|-sep-space-reqd=yes" +ChoicesReadable="Dial|No|Yes" + +[Exclude keywords] +CallName="-exclude-keywords=" +Category=3 +Description="<html>Excluded keywords (separated by spaces?)</html>" +EditorType=string +Enabled=false +ValueDefault="" + +[Set constants] +CallName="-set-constants=" +Category=4 +Description="<html>78 constant settings, strings: name'value', numbers: name(value)</html>" +EditorType=string +Enabled=false +ValueDefault="" + +[Assign external] +Category=4 +Description="<html>Assume that undefined data items in ASSIGN TO are external</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-assign-external|-no-assign-external" + +[SQL] +Category=4 +Description="<html>Parse SQL in EXEC SQL</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-sql|-no-sql" + +[CICS] +Category=4 +Description="<html>Parse CICS statements embedded in EXEC CICS ... END-EXEC</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-cics|-no-cics" + +[CICS EIB] +Category=4 +Description="<html>Add CICS EIB data block to LINKAGE SECTION</html>" +ValueDefault=0 +Enabled=false +EditorType=multiple +Choices="-cics-eib=auto|-cics-eib=no|-cics-eib=yes" +ChoicesReadable="Auto|No|Yes" + +[Copylib dir] +CallName="-copylib-dir=" +Category=5 +Description="<html>Copylib directories path</html>" +EditorType=string +Enabled=false +ValueDefault="." + +[Copylib suffix] +CallName="-copylib-sfx=" +Category=5 +Description="<html>Copylib files default suffix(es)</html>" +EditorType=string +Enabled=false +ValueDefault=".cpy" + +[Copylib names] +Category=5 +Description="<html>Add CICS EIB data block to LINKAGE SECTION</html>" +ValueDefault=0 +Enabled=false +EditorType=multiple +Choices="-copynames-case=exact|-copynames-case=lower|-copynames-case=upper" +ChoicesReadable="Exact|Lower|Upper" + +[Copylib old] +Category=5 +Description="<html>Allow old 1968 Copy statements</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-old-copy|-no-old-copy" + +[Copylib irreversibly] +Category=5 +Description="<html>Inline copybooks irreversibly</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-irrev-inline|-no-irrev-inline" + +[Warnings] +Category=6 +Description="<html>Display Warnings</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-warnings|-no-warnings" + +[Muli undef errors] +Category=6 +Description="<html>Error message for every (OFF: only first) use of undefined name</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-multi-undefd-errs|-no-multi-undefd-errs" + +[Same para data name] +Category=6 +Description="<html>One name can be used both as paragraph-name and data-name</html>" +ValueDefault=0 +Enabled=false +EditorType=multiple +Choices="-same-para-data-name=dial|-same-para-data-name=no|-same-para-data-name=yes" +ChoicesReadable="Dial|No|Yes" + +[Lengths and offsets] +Category=7 +Description="<html>Compute data item lengths and offsets</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-leng-offs|-no-leng-offs" + +[Storage mode] +Category=7 +Description="<html>Is Numeric Sign a Trailing Separate Character</html>" +ValueDefault=0 +Enabled=false +EditorType=multiple +Choices="-lo-stor-mode=dial|-lo-stor-mode=no|-lo-stor-mode=yes" +ChoicesReadable="Dial|No|Yes" + +[Numeric sign trailing separate] +Category=7 +Description="<html>Is Numeric Sign a Trailing Separate Character</html>" +ValueDefault=0 +Enabled=false +EditorType=multiple +Choices="-num-sign-trail-sep=dial|-num-sign-trail-sep=no|-num-sign-trail-sep=yes" +ChoicesReadable="Dial|No|Yes" + +[Num sign EBCDIC] +Category=7 +Description="<html>Is Numeric Sign an EBCDIC character</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-num-sign-ebcdic|-no-num-sign-ebcdic" + +[Lo pointer size] +CallName="-lo-pointer-size=" +Category=7 +Description="<html>Memory model: Pointer size</html>" +EditorType=numeric +Enabled=true +MaxVal=99 +MinVal=1 +ValueDefault=4 + +[Lo proc pointer size] +CallName="-lo-proc-pointer-size=" +Category=7 +Description="<html>Memory model: Procedure-Pointer size</html>" +EditorType=numeric +Enabled=true +MaxVal=99 +MinVal=1 +ValueDefault=4 + +[Lo index size] +CallName="-lo-index-size=" +Category=7 +Description="<html>Memory model: Index size</html>" +EditorType=numeric +Enabled=true +MaxVal=99 +MinVal=1 +ValueDefault=4 + +[Lo unfold flex arrays] +Category=7 +Description="<html>Compute length of table with OCCURS DEPENDING ON based on upper bounds</html>" +ValueDefault=1 +Enabled=true +EditorType=boolean +TrueFalse="-lo-unfold-flex-arrays|-no-lo-unfold-flex-arrays" + +[Progress] +Category=7 +Description="<html>Display Parsing Progress Indicator</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-progress|-no-progress" + +[Bailout level] +Category=7 +Description="<html>Level of parser messages that cause bailout</html>" +ValueDefault=2 +Enabled=false +EditorType=multiple +Choices="-bailout-level=warnings|-bailout-level=errors|-bailout-level=severe" +ChoicesReadable="Warnings|Errors|Severe" + +[Stats] +Category=7 +Description="<html>Print short source program statistics</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-stat|-no-stat" + +[Genereate SourcePrint] +Category=8 +Description="<html>Generate Cobol in SourcePrint (ON) / PrettyPrint(OFF) mode</html>" +ValueDefault=0 +Enabled=false +EditorType=boolean +TrueFalse="-gen-src|-no-gen-src" + +[Copybook dir] +CallName="-gen-copy-dir=" +Category=8 +Description="<html>Write copybooks to this directory</html>" +EditorType=string +Enabled=false +ValueDefault="" + +[Indent size] +CallName="-gen-indent-step=" +Category=9 +Description="<html>Indentation step</html>" +EditorType=numeric +Enabled=true +MaxVal=99 +MinVal=1 +ValueDefault=2 + +[Indent max] +CallName="-gen-max-indent=" +Category=9 +Description="<html>Maximum starting position for indented text</html>" +EditorType=numeric +Enabled=true +MaxVal=99 +MinVal=1 +ValueDefault=40 + +[Tabs] +CallName="-gen-tabs=" +Category=9 +Description="<html>Tabulation Positions</html>" +EditorType=string +Enabled=false +ValueDefault="12,24,32,42,44,54" + +[Line format] +Category=9 +Description="<html>Generated line format</html>" +ValueDefault=1 +Enabled=false +EditorType=multiple +Choices="-gen-line-format=na|-gen-line-format=fixed|-gen-line-format=free|-gen-line-format=fsc-free|-gen-line-format=var" +ChoicesReadable="Na|Fixed|Free|FSC-free|Var" + +[Observe rules] +Category=9 +Description="<html>Observe Area A/B rules in generated code</html>" +ValueDefault=1 +Enabled=true +EditorType=boolean +TrueFalse="-gen-observe-ab-rules |-no-gen-observe-ab-rules " + +[Preserve comments] +Category=10 +Description="<html>Preserve comments</html>" +ValueDefault=1 +Enabled=true +EditorType=boolean +TrueFalse="-gen-print-comments |-no-gen-print-comments " + +[Enter Exit comments] +Category=10 +Description="<html>Generate Enter/Exit comments around inlined copybooks</html>" +ValueDefault=1 +Enabled=true +EditorType=boolean +TrueFalse="-gen-enter-exit-copy-comments|-no-gen-enter-exit-copy-comments" + +[Preserve line IDs] +Category=11 +Description="<html>Preserve original Line IDs (cols 1-6, 73-80)</html>" +ValueDefault=1 +Enabled=true +EditorType=boolean +TrueFalse="-gen-line-id-comments|-no-gen-line-id-comments" + +[Put text 73-80] +CallName="-gen-73to80-fmt=" +Category=11 +Description="<html>Put text of this format into columns 73 to 80</html>" +EditorType=string +Enabled=false +ValueDefault="" + +[Start number 73-80] +CallName="-gen-73to80-start=" +Category=11 +Description="<html>Start value for number put into columns 73 to 80</html>" +EditorType=numeric +Enabled=true +MaxVal=99 +MinVal=1 +ValueDefault=1 + +[Step number 73-80] +CallName="-gen-73to80-step=" +Category=11 +Description="<html>Step for number put into columns 73 to 80</html>" +EditorType=numeric +Enabled=true +MaxVal=99 +MinVal=1 +ValueDefault=1 + +[Convert comments] +CallName="-gen-mark-conv=" +Category=11 +Description="<html>Add comment in columns 73 and up that show that line was changed or generated</html>" +EditorType=string +Enabled=false +ValueDefault="" diff --git a/indenters/uigui_jsppp.ini b/indenters/uigui_jsppp.ini index 0af1f6b..53c886c 100755 --- a/indenters/uigui_jsppp.ini +++ b/indenters/uigui_jsppp.ini @@ -1,81 +1,81 @@ -[header]
-categories=General options
-cfgFileParameterEnding=" "
-configFilename=
-fileTypes=*.jsp|*.html|*.xml
-indenterFileName=jsppp
-indenterName=JSPPP (JSP)
-inputFileName=indentinput
-inputFileParameter=
-manual=http://jsppp.sourceforge.net/
-outputFileName=indentinput
-outputFileParameter=none
-stringparaminquotes=false
-parameterOrder=pio
-showHelpParameter=-h
-stringparaminquotes=false
-useCfgFileParameter=
-version=0.5.2a
-
-[Spaces]
-Category=0
-Description="<html>If spaces is true, spaces, not tabs, will be used to indent the lines.</html>"
-EditorType=boolean
-TrueFalse=|--tabs
-ValueDefault=1
-
-[Number of spaces]
-Category=0
-Description="<html>If spaces are used for indenting, NUMSPACES is the number of spaces to use per indent level.</html>"
-Enabled=true
-EditorType=numeric
-CallName="--spaces="
-MinVal=0
-MaxVal=999
-ValueDefault=2
-
-[Line length]
-Category=0
-Description="<html>The length, in bytes (JSPPP does not yet support Unicode input, no one has asked for it yet) of the soft line length limit. JavaScript, long element names, attributes, etc., that cannot be broken up will end up over the limit if they have already been indented too far.</html>"
-Enabled=false
-EditorType=numeric
-CallName="--length="
-MinVal=1
-MaxVal=9999
-ValueDefault=120
-
-[Tabsize]
-Category=0
-Description="<html>The default number of spaces per tab is 8. This number is used to determine how much of the line has been used by a tab.</html>"
-Enabled=false
-EditorType=numeric
-CallName="--tab-size="
-MinVal=0
-MaxVal=999
-ValueDefault=8
-
-[Punctuation]
-Category=0
-Description="<html>PUNCTUATION is a list of characters which should be handled specially after an anchor tag. If there is whitespace after a link tag but before one of these characters then the whitespace is removed. To have no special characters, use the line "PUNCTUATION=".</html>"
-Enabled=false
-CallName=PUNCTUATION=
-EditorType=string
-ValueDefault=",.!?"
-
-[Loose or tight spacing]
-Category=0
-Description="<html>Use loose or tight spacing.</html>"
-Enabled=true
-EditorType=multiple
-Choices="--loose-spacing|--tight-spacing"
-ChoicesReadable="Loose spacing|Tight spacing"
-ValueDefault=0
-
-[Backup file]
-Category=0
-Description="<html>Leave a backup file, which will be overwritten on a second run, or leave no backup file at all.</html>"
-Enabled=true
-EditorType=multiple
-Choices="--engage-safety|--disengage-safety"
-ChoicesReadable="Leave backup file|Leave NO backup file"
-ValueDefault=1
+[header] +categories=General options +cfgFileParameterEnding=" " +configFilename= +fileTypes=*.jsp|*.html|*.xml +indenterFileName=jsppp +indenterName=JSPPP (JSP) +inputFileName=indentinput +inputFileParameter= +manual=http://jsppp.sourceforge.net/ +outputFileName=indentinput +outputFileParameter=none +stringparaminquotes=false +parameterOrder=pio +showHelpParameter=-h +stringparaminquotes=false +useCfgFileParameter= +version=0.5.2a + +[Spaces] +Category=0 +Description="<html>If spaces is true, spaces, not tabs, will be used to indent the lines.</html>" +EditorType=boolean +TrueFalse=|--tabs +ValueDefault=1 + +[Number of spaces] +Category=0 +Description="<html>If spaces are used for indenting, NUMSPACES is the number of spaces to use per indent level.</html>" +Enabled=true +EditorType=numeric +CallName="--spaces=" +MinVal=0 +MaxVal=999 +ValueDefault=2 + +[Line length] +Category=0 +Description="<html>The length, in bytes (JSPPP does not yet support Unicode input, no one has asked for it yet) of the soft line length limit. JavaScript, long element names, attributes, etc., that cannot be broken up will end up over the limit if they have already been indented too far.</html>" +Enabled=false +EditorType=numeric +CallName="--length=" +MinVal=1 +MaxVal=9999 +ValueDefault=120 + +[Tabsize] +Category=0 +Description="<html>The default number of spaces per tab is 8. This number is used to determine how much of the line has been used by a tab.</html>" +Enabled=false +EditorType=numeric +CallName="--tab-size=" +MinVal=0 +MaxVal=999 +ValueDefault=8 + +[Punctuation] +Category=0 +Description="<html>PUNCTUATION is a list of characters which should be handled specially after an anchor tag. If there is whitespace after a link tag but before one of these characters then the whitespace is removed. To have no special characters, use the line "PUNCTUATION=".</html>" +Enabled=false +CallName=PUNCTUATION= +EditorType=string +ValueDefault=",.!?" + +[Loose or tight spacing] +Category=0 +Description="<html>Use loose or tight spacing.</html>" +Enabled=true +EditorType=multiple +Choices="--loose-spacing|--tight-spacing" +ChoicesReadable="Loose spacing|Tight spacing" +ValueDefault=0 + +[Backup file] +Category=0 +Description="<html>Leave a backup file, which will be overwritten on a second run, or leave no backup file at all.</html>" +Enabled=true +EditorType=multiple +Choices="--engage-safety|--disengage-safety" +ChoicesReadable="Leave backup file|Leave NO backup file" +ValueDefault=1 diff --git a/indenters/uigui_phpStylist.ini b/indenters/uigui_phpStylist.ini index e5f5b54..6374906 100755 --- a/indenters/uigui_phpStylist.ini +++ b/indenters/uigui_phpStylist.ini @@ -1,258 +1,258 @@ -[header]
-categories="General|Operators|Functions, Classes and Objects|Control Structures|Arrays and Concatenation|Comments"
-cfgFileParameterEnding=" "
-configFilename=
-fileTypes=*.php|*.phpt|*.phps
-indenterFileName=phpStylist.php
-indenterName=phpStylist (PHP)
-inputFileName=indentinput
-inputFileParameter=" "
-manual=http://sourceforge.net/projects/phpstylist/
-outputFileName=
-outputFileParameter=stdout
-parameterOrder=ipo
-showHelpParameter="-- --help"
-stringparaminquotes=false
-useCfgFileParameter=
-version=1.0
-
-[Indent size]
-CallName="--indent_size "
-Category=0
-Description="<html>Indent the code with the set number of spaces.</html>"
-EditorType=numeric
-Enabled=true
-MaxVal=99
-MinVal=0
-ValueDefault=4
-
-[Indent with tabs]
-Category=0
-Description="<html>Indent with tabs instead of spaces</html>"
-EditorType=boolean
-TrueFalse="--indent_with_tabs|"
-ValueDefault=0
-
-[Keep redundant lines]
-Category=0
-Description="<html>Keep redundant lines</html>"
-EditorType=boolean
-TrueFalse="--keep_redundant_lines|"
-ValueDefault=0
-
-[Space inside parentheses]
-Category=0
-Description="<html>Space inside parentheses</html>"
-EditorType=boolean
-TrueFalse="--space_inside_parentheses|"
-ValueDefault=0
-
-[Space outside parentheses]
-Category=0
-Description="<html>Space outside parentheses</html>"
-EditorType=boolean
-TrueFalse="--space_outside_parentheses|"
-ValueDefault=0
-
-[Space after comma]
-Category=0
-Description="<html>Space after comma</html>"
-EditorType=boolean
-TrueFalse="--space_after_comma|"
-ValueDefault=0
-
-[Space around assignment]
-Category=1
-Description="<html>Space around = .= += -= *= /= <<<</html>"
-EditorType=boolean
-TrueFalse="--space_around_assignment|"
-ValueDefault=0
-
-[Align block +3 assigned variables]
-Category=1
-Description="<html>Align block +3 assigned variables</html>"
-EditorType=boolean
-TrueFalse="--align_var_assignment|"
-ValueDefault=0
-
-[Space around comparison]
-Category=1
-Description="<html>Space around == === != !== > >= < <=</html>"
-EditorType=boolean
-TrueFalse="--space_around_comparison|"
-ValueDefault=0
-
-[Space around arithmetic]
-Category=1
-Description="<html>Space around - + * / %</html>"
-EditorType=boolean
-TrueFalse="--space_around_arithmetic|"
-ValueDefault=0
-
-[Space around logical]
-Category=1
-Description="<html>Space around && || AND OR XOR << >></html>"
-EditorType=boolean
-TrueFalse="--space_around_logical|"
-ValueDefault=0
-
-[Space around colon and question]
-Category=1
-Description="<html>Space around ? :</html>"
-EditorType=boolean
-TrueFalse="--space_around_colon_question|"
-ValueDefault=0
-
-[Blank line before keyword]
-Category=2
-Description="<html>Blank line before keyword</html>"
-EditorType=boolean
-TrueFalse="--line_before_function|"
-ValueDefault=0
-
-[Opening bracket on next line]
-Category=2
-Description="<html>Opening bracket on next line</html>"
-EditorType=boolean
-TrueFalse="--line_before_curly_function|"
-ValueDefault=0
-
-[Blank line below opening bracket]
-Category=2
-Description="<html>Blank line below opening bracket</html>"
-EditorType=boolean
-TrueFalse="--line_after_curly_function|"
-ValueDefault=0
-
-[Space around ->]
-Category=2
-Description="<html>Space around -></html>"
-EditorType=boolean
-TrueFalse="--space_around_obj_operator|"
-ValueDefault=0
-
-[Space around ::]
-Category=2
-Description="<html>Space around ::</html>"
-EditorType=boolean
-TrueFalse="--space_around_double_colon|"
-ValueDefault=0
-
-[Space before parentheses]
-Category=3
-Description="<html>Space between keyword and opening parentheses</html>"
-EditorType=boolean
-TrueFalse="--space_after_if|"
-ValueDefault=0
-
-[Keep else/elseif along with bracket]
-Category=3
-Description="<html>Keep else/elseif along with bracket</html>"
-EditorType=boolean
-TrueFalse="--else_along_curly|"
-ValueDefault=0
-
-[Opening bracket on next line]
-Category=3
-Description="<html>Opening bracket on next line</html>"
-EditorType=boolean
-TrueFalse="--line_before_curly|"
-ValueDefault=0
-
-[Add missing brackets]
-Category=3
-Description="<html>Add missing brackets to single line structs</html>"
-EditorType=boolean
-TrueFalse="--add_missing_braces|"
-ValueDefault=0
-
-[Blank line after case "break"]
-Category=3
-Description="<html>Blank line after case 'break'</html>"
-EditorType=boolean
-TrueFalse="--line_after_break|"
-ValueDefault=0
-
-[Space between "for" elements]
-Category=3
-Description="<html>Space between 'for' elements</html>"
-EditorType=boolean
-TrueFalse="--space_inside_for|"
-ValueDefault=0
-
-[Extra indent for "Case" and "Default"]
-Category=3
-Description="<html>Extra indent for 'Case' and 'Default'</html>"
-EditorType=boolean
-TrueFalse="--indent_case|"
-ValueDefault=0
-
-[Opening array parentheses on next line]
-Category=4
-Description="<html>Opening array parentheses on next line</html>"
-EditorType=boolean
-TrueFalse="--line_before_array|"
-ValueDefault=0
-
-[Non-empty arrays as vertical block]
-Category=4
-Description="<html>Non-empty arrays as vertical block</html>"
-EditorType=boolean
-TrueFalse="--vertical_array|"
-ValueDefault=0
-
-[Align block +3 assigned array elements]
-Category=4
-Description="<html>Align block +3 assigned array elements</html>"
-EditorType=boolean
-TrueFalse="--align_array_assignment|"
-ValueDefault=0
-
-[Space around double arrow]
-Category=4
-Description="<html>Space around double arrow</html>"
-EditorType=boolean
-TrueFalse="--space_around_double_arrow|"
-ValueDefault=0
-
-[Concatenation as vertical block]
-Category=4
-Description="<html>Concatenation as vertical block</html>"
-EditorType=boolean
-TrueFalse="--vertical_concat|"
-ValueDefault=0
-
-[Space around concat elements]
-Category=4
-Description="<html>Space around concat elements</html>"
-EditorType=boolean
-TrueFalse="--space_around_concat|"
-ValueDefault=0
-
-[Blank line before multi-line comment]
-Category=5
-Description="<html>Blank line before multi-line comment (/*)</html>"
-EditorType=boolean
-TrueFalse="--line_before_comment_multi|"
-ValueDefault=0
-
-[Blank line after multi-line comment]
-Category=5
-Description="<html>Blank line after multi-line comment (/*)</html>"
-EditorType=boolean
-TrueFalse="--line_after_comment_multi|"
-ValueDefault=0
-
-[Blank line before single line comments]
-Category=5
-Description="<html>Blank line before single line comments (//)</html>"
-EditorType=boolean
-TrueFalse="--line_before_comment|"
-ValueDefault=0
-
-[Blank line after single line comments]
-Category=5
-Description="<html>Blank line after single line comments (//)</html>"
-EditorType=boolean
-TrueFalse="--line_after_comment|"
-ValueDefault=0
+[header] +categories="General|Operators|Functions, Classes and Objects|Control Structures|Arrays and Concatenation|Comments" +cfgFileParameterEnding=" " +configFilename= +fileTypes=*.php|*.phpt|*.phps +indenterFileName=phpStylist.php +indenterName=phpStylist (PHP) +inputFileName=indentinput +inputFileParameter=" " +manual=http://sourceforge.net/projects/phpstylist/ +outputFileName= +outputFileParameter=stdout +parameterOrder=ipo +showHelpParameter="-- --help" +stringparaminquotes=false +useCfgFileParameter= +version=1.0 + +[Indent size] +CallName="--indent_size " +Category=0 +Description="<html>Indent the code with the set number of spaces.</html>" +EditorType=numeric +Enabled=true +MaxVal=99 +MinVal=0 +ValueDefault=4 + +[Indent with tabs] +Category=0 +Description="<html>Indent with tabs instead of spaces</html>" +EditorType=boolean +TrueFalse="--indent_with_tabs|" +ValueDefault=0 + +[Keep redundant lines] +Category=0 +Description="<html>Keep redundant lines</html>" +EditorType=boolean +TrueFalse="--keep_redundant_lines|" +ValueDefault=0 + +[Space inside parentheses] +Category=0 +Description="<html>Space inside parentheses</html>" +EditorType=boolean +TrueFalse="--space_inside_parentheses|" +ValueDefault=0 + +[Space outside parentheses] +Category=0 +Description="<html>Space outside parentheses</html>" +EditorType=boolean +TrueFalse="--space_outside_parentheses|" +ValueDefault=0 + +[Space after comma] +Category=0 +Description="<html>Space after comma</html>" +EditorType=boolean +TrueFalse="--space_after_comma|" +ValueDefault=0 + +[Space around assignment] +Category=1 +Description="<html>Space around = .= += -= *= /= <<<</html>" +EditorType=boolean +TrueFalse="--space_around_assignment|" +ValueDefault=0 + +[Align block +3 assigned variables] +Category=1 +Description="<html>Align block +3 assigned variables</html>" +EditorType=boolean +TrueFalse="--align_var_assignment|" +ValueDefault=0 + +[Space around comparison] +Category=1 +Description="<html>Space around == === != !== > >= < <=</html>" +EditorType=boolean +TrueFalse="--space_around_comparison|" +ValueDefault=0 + +[Space around arithmetic] +Category=1 +Description="<html>Space around - + * / %</html>" +EditorType=boolean +TrueFalse="--space_around_arithmetic|" +ValueDefault=0 + +[Space around logical] +Category=1 +Description="<html>Space around && || AND OR XOR << >></html>" +EditorType=boolean +TrueFalse="--space_around_logical|" +ValueDefault=0 + +[Space around colon and question] +Category=1 +Description="<html>Space around ? :</html>" +EditorType=boolean +TrueFalse="--space_around_colon_question|" +ValueDefault=0 + +[Blank line before keyword] +Category=2 +Description="<html>Blank line before keyword</html>" +EditorType=boolean +TrueFalse="--line_before_function|" +ValueDefault=0 + +[Opening bracket on next line] +Category=2 +Description="<html>Opening bracket on next line</html>" +EditorType=boolean +TrueFalse="--line_before_curly_function|" +ValueDefault=0 + +[Blank line below opening bracket] +Category=2 +Description="<html>Blank line below opening bracket</html>" +EditorType=boolean +TrueFalse="--line_after_curly_function|" +ValueDefault=0 + +[Space around ->] +Category=2 +Description="<html>Space around -></html>" +EditorType=boolean +TrueFalse="--space_around_obj_operator|" +ValueDefault=0 + +[Space around ::] +Category=2 +Description="<html>Space around ::</html>" +EditorType=boolean +TrueFalse="--space_around_double_colon|" +ValueDefault=0 + +[Space before parentheses] +Category=3 +Description="<html>Space between keyword and opening parentheses</html>" +EditorType=boolean +TrueFalse="--space_after_if|" +ValueDefault=0 + +[Keep else/elseif along with bracket] +Category=3 +Description="<html>Keep else/elseif along with bracket</html>" +EditorType=boolean +TrueFalse="--else_along_curly|" +ValueDefault=0 + +[Opening bracket on next line] +Category=3 +Description="<html>Opening bracket on next line</html>" +EditorType=boolean +TrueFalse="--line_before_curly|" +ValueDefault=0 + +[Add missing brackets] +Category=3 +Description="<html>Add missing brackets to single line structs</html>" +EditorType=boolean +TrueFalse="--add_missing_braces|" +ValueDefault=0 + +[Blank line after case "break"] +Category=3 +Description="<html>Blank line after case 'break'</html>" +EditorType=boolean +TrueFalse="--line_after_break|" +ValueDefault=0 + +[Space between "for" elements] +Category=3 +Description="<html>Space between 'for' elements</html>" +EditorType=boolean +TrueFalse="--space_inside_for|" +ValueDefault=0 + +[Extra indent for "Case" and "Default"] +Category=3 +Description="<html>Extra indent for 'Case' and 'Default'</html>" +EditorType=boolean +TrueFalse="--indent_case|" +ValueDefault=0 + +[Opening array parentheses on next line] +Category=4 +Description="<html>Opening array parentheses on next line</html>" +EditorType=boolean +TrueFalse="--line_before_array|" +ValueDefault=0 + +[Non-empty arrays as vertical block] +Category=4 +Description="<html>Non-empty arrays as vertical block</html>" +EditorType=boolean +TrueFalse="--vertical_array|" +ValueDefault=0 + +[Align block +3 assigned array elements] +Category=4 +Description="<html>Align block +3 assigned array elements</html>" +EditorType=boolean +TrueFalse="--align_array_assignment|" +ValueDefault=0 + +[Space around double arrow] +Category=4 +Description="<html>Space around double arrow</html>" +EditorType=boolean +TrueFalse="--space_around_double_arrow|" +ValueDefault=0 + +[Concatenation as vertical block] +Category=4 +Description="<html>Concatenation as vertical block</html>" +EditorType=boolean +TrueFalse="--vertical_concat|" +ValueDefault=0 + +[Space around concat elements] +Category=4 +Description="<html>Space around concat elements</html>" +EditorType=boolean +TrueFalse="--space_around_concat|" +ValueDefault=0 + +[Blank line before multi-line comment] +Category=5 +Description="<html>Blank line before multi-line comment (/*)</html>" +EditorType=boolean +TrueFalse="--line_before_comment_multi|" +ValueDefault=0 + +[Blank line after multi-line comment] +Category=5 +Description="<html>Blank line after multi-line comment (/*)</html>" +EditorType=boolean +TrueFalse="--line_after_comment_multi|" +ValueDefault=0 + +[Blank line before single line comments] +Category=5 +Description="<html>Blank line before single line comments (//)</html>" +EditorType=boolean +TrueFalse="--line_before_comment|" +ValueDefault=0 + +[Blank line after single line comments] +Category=5 +Description="<html>Blank line after single line comments (//)</html>" +EditorType=boolean +TrueFalse="--line_after_comment|" +ValueDefault=0 diff --git a/indenters/uigui_php_Beautifier.ini b/indenters/uigui_php_Beautifier.ini index fc03fc6..ab5364d 100755 --- a/indenters/uigui_php_Beautifier.ini +++ b/indenters/uigui_php_Beautifier.ini @@ -1,108 +1,108 @@ -[header]
-categories=General
-cfgFileParameterEnding=" "
-configFilename=
-fileTypes=*.php|*.phpt|*.phps
-indenterFileName=php_beautifier
-indenterName=PHP_Beautifier (PHP)
-inputFileName=indentinput
-inputFileParameter="-f "
-manual=http://beautifyphp.sourceforge.net/docs/PHP_Beautifier/tutorial_PHP_Beautifier.howtouse.commandline.pkg.html
-outputFileName=indentoutput
-outputFileParameter="-o "
-parameterOrder=iop
-showHelpParameter=--help
-stringparaminquotes=false
-useCfgFileParameter=
-version=0.1.13
-
-[Indent With Spaces]
-CallName="-s"
-Category=1
-Description=<html>Indent the code with the set number of spaces.</html>
-EditorType=numeric
-Enabled=true
-MaxVal=99
-MinVal=0
-ValueDefault=4
-
-[Indent With Tabs]
-CallName="-t"
-Category=1
-Description=<html>Indent the code with the set number of tabs.</html>
-EditorType=numeric
-Enabled=false
-MaxVal=99
-MinVal=0
-ValueDefault=1
-
-[Add Header]
-Category=0
-Choices="-l \"Pear(add_header=php)\"|-l \"Pear(add_header=bsd)\"|-l \"Pear(add_header=apache)\"|-l \"Pear(add_header=lgpl)\"|-l \"Pear(add_header=pear)\""
-ChoicesReadable="PHP|BSD|Apache|LGPL|PEAR"
-Description="<html>Adds header information to a file. These can be Php, BSD, Apache, LGPL or Pear license info.</html>"
-EditorType=multiple
-Enabled=true
-ValueDefault=0
-
-[Newline Class]
-Category=0
-Description=<html>Add a new line after class before opening brace.</html>
-EditorType=boolean
-TrueFalse="-l \"Pear(newline_class=true)\"|-l \"Pear(newline_class=false)\""
-ValueDefault=1
-
-[Newline Function]
-Category=0
-Description=<html>Add a new line after function before opening brace.</html>
-EditorType=boolean
-TrueFalse="-l \"Pear(newline_function=true)\"|-l \"Pear(newline_function=false)\""
-ValueDefault=1
-
-[New Lines Before]
-CallName="-l \"NewLines(before="
-Category=0
-Description="<html>Add new lines before specific keywords. Keywords are separated by a single colon. Example: if:switch:T_CLASS<br />The string MUST end with a closing brace and an escaped double quote.</html>"
-EditorType=string
-Enabled=false
-ValueDefault="if:switch:T_CLASS)\""
-
-[New Lines After]
-CallName="-l \"NewLines(after="
-Category=0
-Description="<html>Add new lines after specific keywords. Keywords are separated by a single colon. Example: T_COMMENT:function<br />The string MUST end with a closing brace and an escaped double quote.</html>"
-EditorType=string
-Enabled=false
-ValueDefault="T_COMMENT:function)\""
-
-[Arrays Nested]
-Category=0
-Description=<html></html>
-EditorType=boolean
-TrueFalse="-l \"ArrayNested()\"|"
-ValueDefault=0
-
-[Lowercase]
-Category=0
-Description=<html>Lowercases all control structures.</html>
-EditorType=boolean
-TrueFalse="-l \"Lowercase()\"|"
-ValueDefault=0
-
-[List Class And Functions]
-Category=0
-Choices="-l \"ListClassFunction(list_classes=true)\"|-l \"ListClassFunction(list_functions=true)\"|-l \"ListClassFunction()\""
-ChoicesReadable="List Classes|List Functions|List Classes And Functions"
-Description=<html>Create a list of functions and classes in the script By default, this Filter puts the list at the beggining of the script. If you want it in another position, put a comment like that <pre> // Class and Function List </pre> The script lookup for the string 'Class and Function List' in a comment and replace the entire comment with the list.</html>
-EditorType=multiple
-Enabled=false
-ValueDefault=0
-
-[Indent Styles]
-Category=0
-Choices="-l \"IndentStyles(style=k&r)\"|-l \"IndentStyles(style=allman)\"|-l \"IndentStyles(style=whitesmiths)\"|-l \"IndentStyles(style=gnu)\""
-ChoicesReadable="K&R|Allman|Whitesmiths|GNU"
-Description=<html></html>
-EditorType=multiple
-Enabled=false
-ValueDefault=0
+[header] +categories=General +cfgFileParameterEnding=" " +configFilename= +fileTypes=*.php|*.phpt|*.phps +indenterFileName=php_beautifier +indenterName=PHP_Beautifier (PHP) +inputFileName=indentinput +inputFileParameter="-f " +manual=http://beautifyphp.sourceforge.net/docs/PHP_Beautifier/tutorial_PHP_Beautifier.howtouse.commandline.pkg.html +outputFileName=indentoutput +outputFileParameter="-o " +parameterOrder=iop +showHelpParameter=--help +stringparaminquotes=false +useCfgFileParameter= +version=0.1.13 + +[Indent With Spaces] +CallName="-s" +Category=1 +Description=<html>Indent the code with the set number of spaces.</html> +EditorType=numeric +Enabled=true +MaxVal=99 +MinVal=0 +ValueDefault=4 + +[Indent With Tabs] +CallName="-t" +Category=1 +Description=<html>Indent the code with the set number of tabs.</html> +EditorType=numeric +Enabled=false +MaxVal=99 +MinVal=0 +ValueDefault=1 + +[Add Header] +Category=0 +Choices="-l \"Pear(add_header=php)\"|-l \"Pear(add_header=bsd)\"|-l \"Pear(add_header=apache)\"|-l \"Pear(add_header=lgpl)\"|-l \"Pear(add_header=pear)\"" +ChoicesReadable="PHP|BSD|Apache|LGPL|PEAR" +Description="<html>Adds header information to a file. These can be Php, BSD, Apache, LGPL or Pear license info.</html>" +EditorType=multiple +Enabled=true +ValueDefault=0 + +[Newline Class] +Category=0 +Description=<html>Add a new line after class before opening brace.</html> +EditorType=boolean +TrueFalse="-l \"Pear(newline_class=true)\"|-l \"Pear(newline_class=false)\"" +ValueDefault=1 + +[Newline Function] +Category=0 +Description=<html>Add a new line after function before opening brace.</html> +EditorType=boolean +TrueFalse="-l \"Pear(newline_function=true)\"|-l \"Pear(newline_function=false)\"" +ValueDefault=1 + +[New Lines Before] +CallName="-l \"NewLines(before=" +Category=0 +Description="<html>Add new lines before specific keywords. Keywords are separated by a single colon. Example: if:switch:T_CLASS<br />The string MUST end with a closing brace and an escaped double quote.</html>" +EditorType=string +Enabled=false +ValueDefault="if:switch:T_CLASS)\"" + +[New Lines After] +CallName="-l \"NewLines(after=" +Category=0 +Description="<html>Add new lines after specific keywords. Keywords are separated by a single colon. Example: T_COMMENT:function<br />The string MUST end with a closing brace and an escaped double quote.</html>" +EditorType=string +Enabled=false +ValueDefault="T_COMMENT:function)\"" + +[Arrays Nested] +Category=0 +Description=<html></html> +EditorType=boolean +TrueFalse="-l \"ArrayNested()\"|" +ValueDefault=0 + +[Lowercase] +Category=0 +Description=<html>Lowercases all control structures.</html> +EditorType=boolean +TrueFalse="-l \"Lowercase()\"|" +ValueDefault=0 + +[List Class And Functions] +Category=0 +Choices="-l \"ListClassFunction(list_classes=true)\"|-l \"ListClassFunction(list_functions=true)\"|-l \"ListClassFunction()\"" +ChoicesReadable="List Classes|List Functions|List Classes And Functions" +Description=<html>Create a list of functions and classes in the script By default, this Filter puts the list at the beggining of the script. If you want it in another position, put a comment like that <pre> // Class and Function List </pre> The script lookup for the string 'Class and Function List' in a comment and replace the entire comment with the list.</html> +EditorType=multiple +Enabled=false +ValueDefault=0 + +[Indent Styles] +Category=0 +Choices="-l \"IndentStyles(style=k&r)\"|-l \"IndentStyles(style=allman)\"|-l \"IndentStyles(style=whitesmiths)\"|-l \"IndentStyles(style=gnu)\"" +ChoicesReadable="K&R|Allman|Whitesmiths|GNU" +Description=<html></html> +EditorType=multiple +Enabled=false +ValueDefault=0 diff --git a/indenters/uigui_pindent.ini b/indenters/uigui_pindent.ini index ee41fb3..ae17620 100755 --- a/indenters/uigui_pindent.ini +++ b/indenters/uigui_pindent.ini @@ -1,54 +1,54 @@ -[header]
-categories=General options
-cfgFileParameterEnding=" "
-configFilename=
-fileTypes=*.py
-indenterFileName=pindent.py
-indenterName=PIndent (Python)
-inputFileName=indentinput
-inputFileParameter=
-manual=http://coverage.livinglogic.de/Tools/scripts/pindent.py.html
-outputFileName=indentinput
-outputFileParameter=none
-stringparaminquotes=false
-parameterOrder=pio
-showHelpParameter=
-stringparaminquotes=false
-useCfgFileParameter=
-version="from Python 2.5.1 package"
-
-[End directives]
-Category=0
-Description="<html>Complete takes a valid Python program as input and outputs a version augmented with block-closing comments (add #end directives).<br />Or Delete assumes its input is a Python program with block-closing comments and outputs a commentless version(delete #end directives).<br />Or Reformat assumes its input is a Python program with block-closing comments but with its indentation messed up, and outputs a properly indented version (use #end directives).</html>"
-Enabled=true
-EditorType=multiple
-Choices="-c|-d|-r"
-ChoicesReadable="Complete|Delete|Reformat"
-ValueDefault=0
-
-[Step size]
-Category=0
-Description="<html>Sets the indentation step size.</html>"
-Enabled=true
-EditorType=numeric
-CallName="-s "
-MinVal=0
-MaxVal=999
-ValueDefault=8
-
-[Tab size]
-Category=0
-Description="<html>Sets the number of spaces a tab character is worth.</html>"
-Enabled=true
-EditorType=numeric
-CallName="-t "
-MinVal=0
-MaxVal=999
-ValueDefault=8
-
-[Convert Tabs]
-Category=0
-Description="<html>Expand TABs into spaces.</html>"
-EditorType=boolean
-TrueFalse=-e|
-ValueDefault=0
+[header] +categories=General options +cfgFileParameterEnding=" " +configFilename= +fileTypes=*.py +indenterFileName=pindent.py +indenterName=PIndent (Python) +inputFileName=indentinput +inputFileParameter= +manual=http://coverage.livinglogic.de/Tools/scripts/pindent.py.html +outputFileName=indentinput +outputFileParameter=none +stringparaminquotes=false +parameterOrder=pio +showHelpParameter= +stringparaminquotes=false +useCfgFileParameter= +version="from Python 2.5.1 package" + +[End directives] +Category=0 +Description="<html>Complete takes a valid Python program as input and outputs a version augmented with block-closing comments (add #end directives).<br />Or Delete assumes its input is a Python program with block-closing comments and outputs a commentless version(delete #end directives).<br />Or Reformat assumes its input is a Python program with block-closing comments but with its indentation messed up, and outputs a properly indented version (use #end directives).</html>" +Enabled=true +EditorType=multiple +Choices="-c|-d|-r" +ChoicesReadable="Complete|Delete|Reformat" +ValueDefault=0 + +[Step size] +Category=0 +Description="<html>Sets the indentation step size.</html>" +Enabled=true +EditorType=numeric +CallName="-s " +MinVal=0 +MaxVal=999 +ValueDefault=8 + +[Tab size] +Category=0 +Description="<html>Sets the number of spaces a tab character is worth.</html>" +Enabled=true +EditorType=numeric +CallName="-t " +MinVal=0 +MaxVal=999 +ValueDefault=8 + +[Convert Tabs] +Category=0 +Description="<html>Expand TABs into spaces.</html>" +EditorType=boolean +TrueFalse=-e| +ValueDefault=0 diff --git a/indenters/uigui_psti.ini b/indenters/uigui_psti.ini index a1a82b0..9a1acb7 100755 --- a/indenters/uigui_psti.ini +++ b/indenters/uigui_psti.ini @@ -1,196 +1,196 @@ -[header]
-categories=General options|Spaces|Indentation|Alignments
-cfgFileParameterEnding=cr
-configFilename=psti.cfg
-fileTypes=*.sql
-indenterFileName=psti.exe
-indenterName=Pl/Sql tidy (Pl/Sql)
-inputFileName=indentinput
-inputFileParameter="-i "
-manual=http://psti.equinoxbase.com/manual.html
-outputFileName=indentoutput
-outputFileParameter="-o "
-stringparaminquotes=false
-parameterOrder=iop
-showHelpParameter=-h
-stringparaminquotes=false
-useCfgFileParameter="-ls "
-version=1.2
-
-[Disable all switches]
-Category=0
-Description="<html>Sets all switches to off.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-0|
-ValueDefault=0
-
-[Uppercase Keywords]
-Category=0
-Description="<html>Uppercase Keywords.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-uk+|-uk-
-ValueDefault=0
-
-[Capitalized Keywords]
-Category=0
-Description="<html>Capitalized Keywords.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-ck+|-ck-
-ValueDefault=0
-
-[Lowercase Keywords]
-Category=0
-Description="<html>Lowercase Keywords.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-lk+|-lk-
-ValueDefault=0
-
-[Uppercase Identifiers]
-Category=0
-Description="<html>Uppercase Identifiers.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-ui+|-ui-
-ValueDefault=0
-
-[Lowercase Identifiers]
-Category=0
-Description="<html>Lowercase Identifiers.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-li+|-li-
-ValueDefault=0
-
-[Capitalized Identifiers]
-Category=0
-Description="<html>Capitalized Identifiers.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-ci+|-ci-
-ValueDefault=0
-
-[Compactify]
-Category=1
-Description="<html>Compactify, remove redundant spaces/keep.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-c+|-c-
-ValueDefault=0
-
-[Remove Operation Spaces]
-Category=1
-Description="<html>Remove spaces around operations (+,- etcdo nothing/).</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-co+|-co-
-ValueDefault=0
-
-[Add Operation Spaces]
-Category=1
-Description="<html>Add space around operations/do nothing.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-sao+|-sao-
-ValueDefault=0
-
-[Remove Space Open Bracket]
-Category=1
-Description="<html>Remove spaces after opening brackets/keep.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-rsaob+|-rsaob-
-ValueDefault=0
-
-[Don't Remove Bracket Space]
-Category=1
-Description="<html>Don't remove spaces around brackets/do nothing.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-ncb+|-ncb-
-ValueDefault=0
-
-[Indent Size]
-Category=2
-Description="<html>Indent size in spaces or in tabs (generally).</html>"
-Enabled=true
-EditorType=numeric
-CallName="-is "
-MinVal=0
-MaxVal=1024
-ValueDefault=4
-
-[Indent Lines]
-Category=2
-Description="<html>Whether to indent strings lines.</html>"
-Enabled=true
-EditorType=boolean
-TrueFalse=-in+|-in-
-ValueDefault=1
-
-[Keep relative indentation]
-Category=2
-Description="<html>Keep the relative identation of an allowed sql/do nothing.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-rs+|-rs-
-ValueDefault=0
-
-[Indent after exception]
-Category=2
-Description="<html>Extra indentation after exception when yes/no.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-iaew+|-iaew-
-ValueDefault=0
-
-[Indent after case]
-Category=2
-Description="<html>Extra indentation after case when yes/no.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-iacw+|-iacw-
-ValueDefault=0
-
-[Indent after cursor]
-Category=2
-Description="<html>Extra indentation after cursor yes/no.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-iac+|-iac-
-ValueDefault=0
-
-[Indent comments]
-Category=2
-Description="<html>Indent standalone comments.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-isc+|-isc-
-ValueDefault=0
-
-[Indent comments special]
-Category=2
-Description="<html>Indent standalone comments in some special cases too.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-isc2+|-isc2-
-ValueDefault=0
-
-[Indent inside comments]
-Category=2
-Description="<html>Indent inside comments/do nothing.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-iic+|-iic-
-ValueDefault=0
-
-[Column alignment]
-Category=3
-Description="<html>Column like lists inside brackets.</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=-clb+|-clb-
-ValueDefault=0
+[header] +categories=General options|Spaces|Indentation|Alignments +cfgFileParameterEnding=cr +configFilename=psti.cfg +fileTypes=*.sql +indenterFileName=psti.exe +indenterName=Pl/Sql tidy (Pl/Sql) +inputFileName=indentinput +inputFileParameter="-i " +manual=http://psti.equinoxbase.com/manual.html +outputFileName=indentoutput +outputFileParameter="-o " +stringparaminquotes=false +parameterOrder=iop +showHelpParameter=-h +stringparaminquotes=false +useCfgFileParameter="-ls " +version=1.2 + +[Disable all switches] +Category=0 +Description="<html>Sets all switches to off.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-0| +ValueDefault=0 + +[Uppercase Keywords] +Category=0 +Description="<html>Uppercase Keywords.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-uk+|-uk- +ValueDefault=0 + +[Capitalized Keywords] +Category=0 +Description="<html>Capitalized Keywords.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-ck+|-ck- +ValueDefault=0 + +[Lowercase Keywords] +Category=0 +Description="<html>Lowercase Keywords.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-lk+|-lk- +ValueDefault=0 + +[Uppercase Identifiers] +Category=0 +Description="<html>Uppercase Identifiers.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-ui+|-ui- +ValueDefault=0 + +[Lowercase Identifiers] +Category=0 +Description="<html>Lowercase Identifiers.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-li+|-li- +ValueDefault=0 + +[Capitalized Identifiers] +Category=0 +Description="<html>Capitalized Identifiers.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-ci+|-ci- +ValueDefault=0 + +[Compactify] +Category=1 +Description="<html>Compactify, remove redundant spaces/keep.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-c+|-c- +ValueDefault=0 + +[Remove Operation Spaces] +Category=1 +Description="<html>Remove spaces around operations (+,- etcdo nothing/).</html>" +Enabled=false +EditorType=boolean +TrueFalse=-co+|-co- +ValueDefault=0 + +[Add Operation Spaces] +Category=1 +Description="<html>Add space around operations/do nothing.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-sao+|-sao- +ValueDefault=0 + +[Remove Space Open Bracket] +Category=1 +Description="<html>Remove spaces after opening brackets/keep.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-rsaob+|-rsaob- +ValueDefault=0 + +[Don't Remove Bracket Space] +Category=1 +Description="<html>Don't remove spaces around brackets/do nothing.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-ncb+|-ncb- +ValueDefault=0 + +[Indent Size] +Category=2 +Description="<html>Indent size in spaces or in tabs (generally).</html>" +Enabled=true +EditorType=numeric +CallName="-is " +MinVal=0 +MaxVal=1024 +ValueDefault=4 + +[Indent Lines] +Category=2 +Description="<html>Whether to indent strings lines.</html>" +Enabled=true +EditorType=boolean +TrueFalse=-in+|-in- +ValueDefault=1 + +[Keep relative indentation] +Category=2 +Description="<html>Keep the relative identation of an allowed sql/do nothing.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-rs+|-rs- +ValueDefault=0 + +[Indent after exception] +Category=2 +Description="<html>Extra indentation after exception when yes/no.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-iaew+|-iaew- +ValueDefault=0 + +[Indent after case] +Category=2 +Description="<html>Extra indentation after case when yes/no.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-iacw+|-iacw- +ValueDefault=0 + +[Indent after cursor] +Category=2 +Description="<html>Extra indentation after cursor yes/no.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-iac+|-iac- +ValueDefault=0 + +[Indent comments] +Category=2 +Description="<html>Indent standalone comments.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-isc+|-isc- +ValueDefault=0 + +[Indent comments special] +Category=2 +Description="<html>Indent standalone comments in some special cases too.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-isc2+|-isc2- +ValueDefault=0 + +[Indent inside comments] +Category=2 +Description="<html>Indent inside comments/do nothing.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-iic+|-iic- +ValueDefault=0 + +[Column alignment] +Category=3 +Description="<html>Column like lists inside brackets.</html>" +Enabled=false +EditorType=boolean +TrueFalse=-clb+|-clb- +ValueDefault=0 diff --git a/indenters/uigui_rubyformatter.ini b/indenters/uigui_rubyformatter.ini index 58ff452..1afba10 100755 --- a/indenters/uigui_rubyformatter.ini +++ b/indenters/uigui_rubyformatter.ini @@ -1,27 +1,27 @@ -[header]
-categories=General
-cfgFileParameterEnding=" "
-configFilename=
-fileTypes=*.rb
-indenterFileName=ruby_formatter.rb
-indenterName=Simple Ruby Formatter (Ruby)
-inputFileName=indentinput
-inputFileParameter=
-manual=http://raa.ruby-lang.org/project/ruby_formatter/
-outputFileName=indentinput
-outputFileParameter=none
-parameterOrder=pio
-showHelpParameter=
-stringparaminquotes=false
-useCfgFileParameter=
-version=Rev 0.6.1
-
-[indent spaces]
-CallName="-s "
-Category=0
-Description=<html>Indent using # spaces per indent</html>
-EditorType=numeric
-Enabled=false
-MaxVal=20
-MinVal=2
+[header] +categories=General +cfgFileParameterEnding=" " +configFilename= +fileTypes=*.rb +indenterFileName=ruby_formatter.rb +indenterName=Simple Ruby Formatter (Ruby) +inputFileName=indentinput +inputFileParameter= +manual=http://raa.ruby-lang.org/project/ruby_formatter/ +outputFileName=indentinput +outputFileParameter=none +parameterOrder=pio +showHelpParameter= +stringparaminquotes=false +useCfgFileParameter= +version=Rev 0.6.1 + +[indent spaces] +CallName="-s " +Category=0 +Description=<html>Indent using # spaces per indent</html> +EditorType=numeric +Enabled=false +MaxVal=20 +MinVal=2 ValueDefault=4
\ No newline at end of file diff --git a/indenters/uigui_shellindent.ini b/indenters/uigui_shellindent.ini index 283f90b..2c36958 100755 --- a/indenters/uigui_shellindent.ini +++ b/indenters/uigui_shellindent.ini @@ -1,17 +1,17 @@ -[header]
-categories=
-cfgFileParameterEnding=" "
-configFilename=
-fileTypes=*.sh
-indenterFileName=shellindent.awk
-indenterName=Shell Code Indent (sh)
-inputFileName=indentinput
-inputFileParameter=
-manual=http://www.bolthole.com/AWK.html
-outputFileName=
-outputFileParameter=stdout
-parameterOrder=pio
-showHelpParameter=
-stringparaminquotes=false
-useCfgFileParameter=
-version=2008-01-10
+[header] +categories= +cfgFileParameterEnding=" " +configFilename= +fileTypes=*.sh +indenterFileName=shellindent.awk +indenterName=Shell Code Indent (sh) +inputFileName=indentinput +inputFileParameter= +manual=http://www.bolthole.com/AWK.html +outputFileName= +outputFileParameter=stdout +parameterOrder=pio +showHelpParameter= +stringparaminquotes=false +useCfgFileParameter= +version=2008-01-10 diff --git a/indenters/uigui_tidy.ini b/indenters/uigui_tidy.ini index 61b9b0a..1341d45 100755 --- a/indenters/uigui_tidy.ini +++ b/indenters/uigui_tidy.ini @@ -1,612 +1,612 @@ -[header]
-categories="HTML, XHTML, XML|Diagnostics|Pretty Print|Character Encoding|Miscellaneous"
-cfgFileParameterEnding=cr
-configFilename=htmltidy.cfg
-fileTypes=*.html|*.htm
-indenterFileName=tidy
-indenterName=(HTML) Tidy
-inputFileName=indentinput
-inputFileParameter=
-manual=http://tidy.sourceforge.net/docs/tidy_man.html
-outputFileName=indentoutput
-outputFileParameter="-o "
-parameterOrder=poi
-showHelpParameter=-h
-stringparaminquotes=false
-useCfgFileParameter="-q -config "
-version=2007-05-24
-
-[Quiet]
-Category=4
-Description="<html>This option specifies if Tidy should output the summary of the numbers of errors and warnings, or the welcome or informational messages.</html>"
-EditorType=boolean
-Enabled=true
-TrueFalse=quiet:yes|quiet:no
-ValueDefault=1
-
-[Uppercase tags]
-Category=0
-Description=<html>This option specifies if Tidy should output tag names in upper case. The default is no, which results in lower case tag names, except for XML input, where the original case is preserved.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=uppercase-tags:yes|uppercase-tags:no
-ValueDefault=0
-
-[accessibility-check]
-CallName=accessibility-check:
-Category=1
-Description="<html>This option specifies what level of accessibility checking, if any, that Tidy should do. Level 0 is equivalent to Tidy Classic's accessibility checking. For more information on Tidy's accessibility checking, visit the Adaptive Technology Resource Centre at the University of Toronto.</html>"
-EditorType=numeric
-Enabled=true
-MaxVal=3
-MinVal=0
-ValueDefault=0
-
-[add-xml-decl]
-Category=0
-Description="<html>This option specifies if Tidy should add the XML declaration when outputting XML or XHTML. Note that if the input already includes an <?xml ... ?> declaration then this option will be ignored. If the encoding for the output is different from 'ascii', one of the utf encodings or 'raw', the declaration is always added as required by the XML standard.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=add-xml-decl:yes|add-xml-decl:no
-ValueDefault=0
-
-[add-xml-space]
-Category=0
-Description="<html>This option specifies if Tidy should add xml:space='preserve' to elements such as <PRE>, <STYLE> and <SCRIPT> when generating XML. This is needed if the whitespace in such elements is to be parsed appropriately without having access to the DTD.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=add-xml-space:yes|add-xml-space:no
-ValueDefault=0
-
-[alt-text]
-CallName=alt-text:
-Category=0
-Description="<html>-This option specifies the default 'alt=' text Tidy uses for <IMG> attributes. This feature is dangerous as it suppresses further accessibility warnings. You are responsible for making your documents accessible to people who can not see the images!</html>"
-EditorType=string
-Enabled=false
-ValueDefault=
-
-[ascii-chars]
-Category=3
-Description="<html>Can be used to modify behavior of -c (--clean yes) option. If set to 'yes' when using -c, &emdash;, ”, and other named character entities are downgraded to their closest ascii equivalents.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=ascii-chars:yes|ascii-chars:no
-ValueDefault=0
-
-[assume-xml-procins]
-Category=0
-Description=<html>This option specifies if Tidy should change the parsing of processing instructions to require ?> as the terminator rather than >. This option is automatically set if the input is in XML.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=assume-xml-procins:yes|assume-xml-procins:no
-ValueDefault=0
-
-[bare]
-Category=0
-Description="<html>This option specifies if Tidy should strip Microsoft specific HTML from Word 2000 documents, and output spaces rather than non-breaking spaces where they exist in the input.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=bare:yes|bare:no
-ValueDefault=0
-
-[break-before-br]
-Category=2
-Description=<html>This option specifies if Tidy should output a line break before each <BR> element.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=break-before-br:yes|break-before-br:no
-ValueDefault=0
-
-[char-encoding]
-Category=3
-Choices=char-encoding:raw|char-encoding:ascii|char-encoding:latin0|char-encoding:latin1|char-encoding:utf8|char-encoding:iso2022|char-encoding:mac|char-encoding:win1252|char-encoding:ibm858|char-encoding:utf16le|char-encoding:utf16be|char-encoding:utf16|char-encoding:big5|char-encoding:shiftjis
-Description="<html>This option specifies the character encoding Tidy uses for both the input and output. For ascii, Tidy will accept Latin-1 (ISO-8859-1) character values, but will use entities for all characters whose value > 127. For raw, Tidy will output values above 127 without translating them into entities. For latin1, characters above 255 will be written as entities. For utf8, Tidy assumes that both input and output is encoded as UTF-8. You can use iso2022 for files encoded using the ISO-2022 family of encodings e.g. ISO-2022-JP. For mac and win1252, Tidy will accept vendor specific character values, but will use entities for all characters whose value > 127.</html>"
-EditorType=multiple
-Enabled=false
-ValueDefault=1
-
-[clean]
-Category=0
-Description=<html>This option specifies if Tidy should strip out surplus presentational tags and attributes replacing them by style rules and structural markup as appropriate. It works well on the HTML saved by Microsoft Office products.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=clean:yes|clean:no
-ValueDefault=0
-
-[css-prefix]
-CallName=css-prefix
-Category=0
-Description="<html>-This option specifies the prefix that Tidy uses for styles rules. By default, 'c' will be used.</html>"
-EditorType=string
-Enabled=false
-ValueDefault=
-
-[decorate-inferred-ul]
-Category=0
-Description=<html>This option specifies if Tidy should decorate inferred UL elements with some CSS markup to avoid indentation to the right.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=decorate-inferred-ul:yes|decorate-inferred-ul:no
-ValueDefault=0
-
-[doctype]
-Category=0
-Choices=doctype:omit|doctype:auto|doctype:strict|doctype:transitional|doctype:user
-Description=<html>This option specifies the DOCTYPE declaration generated by Tidy. If set to 'omit' the output won't contain a DOCTYPE declaration. If set to 'auto' (the default) Tidy will use an educated guess based upon the contents of the document. If set to 'strict', Tidy will set the DOCTYPE to the strict DTD. If set to 'loose', the DOCTYPE is set to the loose (transitional) DTD. Alternatively, you can supply a string for the formal public identifier (FPI). For example: doctype: '-//ACME//DTD HTML 3.14159//EN' If you specify the FPI for an XHTML document, Tidy will set the system identifier to an empty string. For an HTML document, Tidy adds a system identifier only if one was already present in order to preserve the processing mode of some browsers. Tidy leaves the DOCTYPE for generic XML documents unchanged. --doctype omit implies --numeric-entities yes. This option does not offer a validation of the document conformance.</html>
-EditorType=multiple
-Enabled=false
-ValueDefault=1
-
-[drop-empty-paras]
-Category=0
-Description=<html>This option specifies if Tidy should discard empty paragraphs.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=drop-empty-paras:yes|drop-empty-paras:no
-ValueDefault=1
-
-[drop-font-tags]
-Category=0
-Description=<html>This option specifies if Tidy should discard <FONT> and <CENTER> tags without creating the corresponding style rules. This option can be set independently of the clean option.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=drop-font-tags:yes|drop-font-tags:no
-ValueDefault=0
-
-[drop-proprietary-attributes]
-Category=0
-Description="<html>This option specifies if Tidy should strip out proprietary attributes, such as MS data binding attributes. </html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=drop-proprietary-attributes:yes|drop-proprietary-attributes:no
-ValueDefault=0
-
-[enclose-block-text]
-Category=0
-Description=<html>This option specifies if Tidy should insert a <P> element to enclose any text it finds in any element that allows mixed content for HTML transitional but not HTML strict.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=enclose-block-text:yes|enclose-block-text:no
-ValueDefault=0
-
-[enclose-text]
-Category=0
-Description=<html>This option specifies if Tidy should enclose any text it finds in the body element within a <P> element. This is useful when you want to take existing HTML and use it with a style sheet.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=enclose-text:yes|enclose-text:no
-ValueDefault=0
-
-[escape-cdata]
-Category=0
-Description=<html>This option specifies if Tidy should convert <![CDATA[]]> sections to normal text.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=escape-cdata:yes|escape-cdata:no
-ValueDefault=0
-
-[fix-backslash]
-Category=0
-Description=<html>This option specifies if Tidy should replace backslash characters '' in URLs by forward slashes '/'.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=fix-backslash:yes|fix-backslash:no
-ValueDefault=1
-
-[fix-bad-comments]
-Category=0
-Description="<html>This option specifies if Tidy should replace unexpected hyphens with '=' characters when it comes across adjacent hyphens. The default is yes. This option is provided for users of Cold Fusion which uses the comment syntax: <!--- ---></html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=fix-bad-comments:yes|fix-bad-comments:no
-ValueDefault=1
-
-[fix-uri]
-Category=0
-Description="<html>This option specifies if Tidy should check attribute values that carry URIs for illegal characters and if such are found, escape them as HTML 4 recommends.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=fix-uri:yes|fix-uri:no
-ValueDefault=1
-
-[hide-comments]
-Category=0
-Description=<html>This option specifies if Tidy should print out comments.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=hide-comments:yes|hide-comments:no
-ValueDefault=0
-
-[hide-endtags]
-Category=0
-Description=<html>This option specifies if Tidy should omit optional end-tags when generating the pretty printed markup. This option is ignored if you are outputting to XML.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=hide-endtags:yes|hide-endtags:no
-ValueDefault=0
-
-[indent]
-Category=2
-Description="<html>This option specifies if Tidy should indent block-level tags. If set to 'auto', this option causes Tidy to decide whether or not to indent the content of tags such as TITLE, H1-H6, LI, TD, TD, or P depending on whether or not the content includes a block-level element. You are advised to avoid setting indent to yes as this can expose layout bugs in some browsers.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=indent:yes|indent:no
-ValueDefault=0
-
-[indent-attributes]
-Category=2
-Description=<html>This option specifies if Tidy should begin each attribute on a new line.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=indent-attributes:yes|indent-attributes:no
-ValueDefault=0
-
-[indent-cdata]
-Category=0
-Description=<html>This option specifies if Tidy should indent <![CDATA[]]> sections.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=indent-cdata:yes|indent-cdata:no
-ValueDefault=0
-
-[indent-spaces]
-CallName=indent-spaces:
-Category=2
-Description="<html>This option specifies the number of spaces Tidy uses to indent content, when indentation is enabled.</html>"
-EditorType=numeric
-Enabled=true
-MaxVal=5000
-MinVal=0
-ValueDefault=2
-
-[input-encoding]
-Category=3
-Choices=input-encoding:raw|input-encoding:ascii|input-encoding:latin0|input-encoding:latin1|input-encoding:utf8|input-encoding:iso2022|input-encoding:mac|input-encoding:win1252|input-encoding:ibm858|input-encoding:utf16le|input-encoding:utf16be|input-encoding:utf16|input-encoding:big5|input-encoding:shiftjis
-Description=<html>This option specifies the character encoding Tidy uses for the input. See char-encoding for more info.</html>
-EditorType=multiple
-Enabled=false
-ValueDefault=4
-
-[input-xml]
-Category=0
-Description=<html>This option specifies if Tidy should use the XML parser rather than the error correcting HTML parser.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=input-xml:yes|input-xml:no
-ValueDefault=0
-
-[join-classes]
-Category=0
-Description="<html>This option specifies if Tidy should combine class names to generate a single new class name, if multiple class assignments are detected on an element.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=join-classes:yes|join-classes:no
-ValueDefault=0
-
-[join-styles]
-Category=0
-Description="<html>This option specifies if Tidy should combine styles to generate a single new style, if multiple style values are detected on an element.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=join-styles:yes|join-styles:no
-ValueDefault=1
-
-[literal-attributes]
-Category=0
-Description=<html>This option specifies if Tidy should ensure that whitespace characters within attribute values are passed through unchanged.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=literal-attributes:yes|literal-attributes:no
-ValueDefault=0
-
-[logical-emphasis]
-Category=0
-Description="<html>This option specifies if Tidy should replace any occurrence of <I> by <EM> and any occurrence of <B> by <STRONG>. In both cases, the attributes are preserved unchanged. This option can be set independently of the clean and drop-font-tags options.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=logical-emphasis:yes|logical-emphasis:no
-ValueDefault=0
-
-[lower-literals]
-Category=0
-Description=<html>This option specifies if Tidy should convert the value of an attribute that takes a list of predefined values to lower case. This is required for XHTML documents.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=lower-literals:yes|lower-literals:no
-ValueDefault=1
-
-[markup]
-Category=2
-Description=<html>This option specifies if Tidy should generate a pretty printed version of the markup. Note that Tidy won't generate a pretty printed version if it finds significant errors (see force-output).</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=markup:yes|markup:no
-ValueDefault=1
-
-[merge-divs]
-Category=0
-Choices=merge-divs:auto|merge-divs:yes|merge-divs:no
-ChoicesReadable=Merge Divs Auto|Do Merge Divs|Do Not Merge Divs
-Description="<html>Can be used to modify behavior of -c (--clean yes) option. This option specifies if Tidy should merge nested <div> such as '<div><div>...</div></div>'. If set to 'auto', the attributes of the inner <div> are moved to the outer one. As well, nested <div> with ID attributes are not merged. If set to 'yes', the attributes of the inner <div> are discarded with the exception of 'class' and 'style'.</html>"
-EditorType=multiple
-Enabled=false
-ValueDefault=0
-
-[ncr]
-Category=0
-Description=<html>This option specifies if Tidy should allow numeric character references.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=ncr:yes|ncr:no
-ValueDefault=1
-
-[new-blocklevel-tags]
-CallName=new-blocklevel-tags:
-Category=0
-Description="<html>This option specifies new block-level tags. This option takes a space or comma separated list of tag names. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. Note you can't change the content model for elements such as <TABLE>, <UL>, <OL> and <DL>. This option is ignored in XML mode.</html>"
-EditorType=string
-Enabled=false
-ValueDefault=
-
-[new-empty-tags]
-CallName=new-empty-tags:
-Category=0
-Description="<html>This option specifies new empty inline tags. This option takes a space or comma separated list of tag names. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. Remember to also declare empty tags as either inline or blocklevel. This option is ignored in XML mode.</html>"
-EditorType=string
-Enabled=false
-ValueDefault=
-
-[new-inline-tags]
-CallName=new-inline-tags:
-Category=0
-Description="<html>This option specifies new non-empty inline tags. This option takes a space or comma separated list of tag names. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. This option is ignored in XML mode.</html>"
-EditorType=string
-Enabled=false
-ValueDefault=
-
-[new-pre-tags]
-CallName=new-pre-tags:
-Category=0
-Description="<html>This option specifies new tags that are to be processed in exactly the same way as HTML's <PRE> element. This option takes a space or comma separated list of tag names. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. Note you can not as yet add new CDATA elements (similar to <SCRIPT>). This option is ignored in XML mode.</html>"
-EditorType=string
-Enabled=false
-ValueDefault=
-
-[newline]
-Category=3
-Choices=newline:LF|newline:CRLF|newline:CR
-Description="<html>The default is appropriate to the current platform: CRLF on PC-DOS, MS-Windows and OS/2, CR on Classic Mac OS, and LF everywhere else (Unix and Linux).</html>"
-EditorType=multiple
-Enabled=false
-ValueDefault=1
-
-[numeric-entities]
-Category=0
-Description="<html>This option specifies if Tidy should output entities other than the built-in HTML entities (&, <, > and ") in the numeric rather than the named entity form. Only entities compatible with the DOCTYPE declaration generated are used. Entities that can be represented in the output encoding are translated correspondingly.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=numeric-entities:yes|numeric-entities:no
-ValueDefault=0
-
-[output-bom]
-Category=3
-Choices=output-bom:auto|output-bom:yes|output-bom:no
-Description="<html>This option specifies if Tidy should write a Unicode Byte Order Mark character (BOM; also known as Zero Width No-Break Space; has value of U+FEFF) to the beginning of the output; only for UTF-8 and UTF-16 output encodings. If set to 'auto', this option causes Tidy to write a BOM to the output only if a BOM was present at the beginning of the input. A BOM is always written for XML/XHTML output using UTF-16 output encodings.</html>"
-EditorType=multiple
-Enabled=false
-ValueDefault=0
-
-[output-encoding]
-Category=3
-Choices=output-encoding:raw|output-encoding:ascii|output-encoding:latin0|output-encoding:latin1|output-encoding:utf8|output-encoding:iso2022|output-encoding:mac|output-encoding:win1252|output-encoding:ibm858|output-encoding:utf16le|output-encoding:utf16be|output-encoding:utf16|output-encoding:big5|output-encoding:shiftjis
-Description="<html>This option specifies the character encoding Tidy uses for the output. See char-encoding for more info. May only be different from input-encoding for Latin encodings (ascii, latin0, latin1, mac, win1252, ibm858).</html>"
-EditorType=multiple
-Enabled=false
-ValueDefault=1
-
-[output-html]
-Category=0
-Description="<html>This option specifies if Tidy should generate pretty printed output, writing it as HTML.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=output-html:yes|output-html:no
-ValueDefault=0
-
-[output-xhtml]
-Category=0
-Description="<html>This option specifies if Tidy should generate pretty printed output, writing it as extensible HTML. This option causes Tidy to set the DOCTYPE and default namespace as appropriate to XHTML. If a DOCTYPE or namespace is given they will checked for consistency with the content of the document. In the case of an inconsistency, the corrected values will appear in the output. For XHTML, entities can be written as named or numeric entities according to the setting of the 'numeric-entities' option. The original case of tags and attributes will be preserved, regardless of other options.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=output-xhtml:yes|output-xhtml:no
-ValueDefault=0
-
-[output-xml]
-Category=0
-Description="<html>This option specifies if Tidy should pretty print output, writing it as well-formed XML. Any entities not defined in XML 1.0 will be written as numeric entities to allow them to be parsed by a XML parser. The original case of tags and attributes will be preserved, regardless of other options.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=output-xml:yes|output-xml:no
-ValueDefault=0
-
-[preserve-entities]
-Category=0
-Description=<html>This option specifies if Tidy should preserve the well-formed entitites as found in the input.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=preserve-entities:yes|preserve-entities:no
-ValueDefault=0
-
-[punctuation-wrap]
-Category=2
-Description=<html>This option specifies if Tidy should line wrap after some Unicode or Chinese punctuation characters.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=punctuation-wrap:yes|punctuation-wrap:no
-ValueDefault=0
-
-[quote-ampersand]
-Category=0
-Description="<html>This option specifies if Tidy should output unadorned & characters as &.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=quote-ampersand:yes|quote-ampersand:no
-ValueDefault=1
-
-[quote-marks]
-Category=0
-Description="<html>This option specifies if Tidy should output ' characters as " as is preferred by some editing environments. The apostrophe character ' is written out as ' since many web browsers don't yet support '.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=quote-marks:yes|quote-marks:no
-ValueDefault=0
-
-[quote-nbsp]
-Category=0
-Description="<html>This option specifies if Tidy should output non-breaking space characters as entities, rather than as the Unicode character value 160 (decimal).</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=quote-nbsp:yes|quote-nbsp:no
-ValueDefault=1
-
-[repeated-attributes]
-Category=0
-Choices=repeated-attributes:keep-first|repeated-attributes:keep-last
-Description="<html>This option specifies if Tidy should keep the first or last attribute, if an attribute is repeated, e.g. has two align attributes.</html>"
-EditorType=multiple
-Enabled=false
-ValueDefault=1
-
-[replace-color]
-Category=0
-Description="<html>This option specifies if Tidy should replace numeric values in color attributes by HTML/XHTML color names where defined, e.g. replace '#ffffff' with 'white'.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=replace-color:yes|replace-color:no
-ValueDefault=0
-
-[show-body-only]
-Category=0
-Description=<html>This option specifies if Tidy should print only the contents of the body tag as an HTML fragment. Useful for incorporating existing whole pages as a portion of another page.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=show-body-only:yes|show-body-only:no
-ValueDefault=0
-
-[show-errors]
-CallName=show-errors:
-Category=1
-Description="<html>This option specifies what level of accessibility checking, if any, that Tidy should do. Level 0 is equivalent to Tidy Classic's accessibility checking. For more information on Tidy's accessibility checking, visit the Adaptive Technology Resource Centre at the University of Toronto.</html>"
-EditorType=numeric
-Enabled=true
-MaxVal=5000
-MinVal=0
-ValueDefault=6
-
-[show-warnings]
-Category=1
-Description=<html>This option specifies if Tidy should suppress warnings. This can be useful when a few errors are hidden in a flurry of warnings.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=show-warnings:yes|show-warnings:no
-ValueDefault=1
-
-[split]
-Category=2
-Description=<html>Currently not used. Tidy Classic only.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=split:yes|split:no
-ValueDefault=0
-
-[tab-size]
-CallName=tab-size:
-Category=2
-Description=<html>This option specifies the number of columns that Tidy uses between successive tab stops. It is used to map tabs to spaces when reading the input. Tidy never outputs tabs.</html>
-EditorType=numeric
-Enabled=true
-MaxVal=5000
-MinVal=0
-ValueDefault=8
-
-[uppercase-attributes]
-Category=0
-Description="<html>This option specifies if Tidy should output attribute names in upper case. The default is no, which results in lower case attribute names, except for XML input, where the original case is preserved.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=uppercase-attributes:yes|uppercase-attributes:no
-ValueDefault=0
-
-[vertical-space]
-Category=2
-Description=<html>This option specifies if Tidy should add some empty lines for readability.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=vertical-space:yes|vertical-space:no
-ValueDefault=0
-
-[word-2000]
-Category=0
-Description="<html>This option specifies if Tidy should go to great pains to strip out all the surplus stuff Microsoft Word 2000 inserts when you save Word documents as 'Web pages'. Doesn't handle embedded images or VML. You should consider using Word's 'Save As: Web Page, Filtered'.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=word-2000:yes|word-2000:no
-ValueDefault=0
-
-[wrap]
-CallName=wrap:
-Category=2
-Description=<html>This option specifies the right margin Tidy uses for line wrapping. Tidy tries to wrap lines so that they do not exceed this length. Set wrap to zero if you want to disable line wrapping.</html>
-EditorType=numeric
-Enabled=true
-MaxVal=5000
-MinVal=0
-ValueDefault=68
-
-[wrap-asp]
-Category=2
-Description="<html>This option specifies if Tidy should line wrap text contained within ASP pseudo elements, which look like: <% ... %>.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=wrap-asp:yes|wrap-asp:no
-ValueDefault=1
-
-[wrap-attributes]
-Category=2
-Description="<html>This option specifies if Tidy should line wrap attribute values, for easier editing. This option can be set independently of wrap-script-literals.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=wrap-attributes:yes|wrap-attributes:no
-ValueDefault=0
-
-[wrap-jste]
-Category=2
-Description="<html>This option specifies if Tidy should line wrap text contained within JSTE pseudo elements, which look like: <# ... #>.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=wrap-jste:yes|wrap-jste:no
-ValueDefault=1
-
-[wrap-php]
-Category=2
-Description="<html>This option specifies if Tidy should line wrap text contained within PHP pseudo elements, which look like: <?php ... ?>.</html>"
-EditorType=boolean
-Enabled=false
-TrueFalse=wrap-php:yes|wrap-php:no
-ValueDefault=1
-
-[wrap-script-literals]
-Category=2
-Description=<html>This option specifies if Tidy should line wrap string literals that appear in script attributes. Tidy wraps long script string literals by inserting a backslash character before the line break.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=wrap-script-literals:yes|wrap-script-literals:no
-ValueDefault=0
-
-[wrap-sections]
-Category=2
-Description=<html>This option specifies if Tidy should line wrap text contained within <![ ... ]> section tags.</html>
-EditorType=boolean
-Enabled=false
-TrueFalse=wrap-sections:yes|wrap-sections:no
-ValueDefault=0
+[header] +categories="HTML, XHTML, XML|Diagnostics|Pretty Print|Character Encoding|Miscellaneous" +cfgFileParameterEnding=cr +configFilename=htmltidy.cfg +fileTypes=*.html|*.htm +indenterFileName=tidy +indenterName=(HTML) Tidy +inputFileName=indentinput +inputFileParameter= +manual=http://tidy.sourceforge.net/docs/tidy_man.html +outputFileName=indentoutput +outputFileParameter="-o " +parameterOrder=poi +showHelpParameter=-h +stringparaminquotes=false +useCfgFileParameter="-q -config " +version=2007-05-24 + +[Quiet] +Category=4 +Description="<html>This option specifies if Tidy should output the summary of the numbers of errors and warnings, or the welcome or informational messages.</html>" +EditorType=boolean +Enabled=true +TrueFalse=quiet:yes|quiet:no +ValueDefault=1 + +[Uppercase tags] +Category=0 +Description=<html>This option specifies if Tidy should output tag names in upper case. The default is no, which results in lower case tag names, except for XML input, where the original case is preserved.</html> +EditorType=boolean +Enabled=false +TrueFalse=uppercase-tags:yes|uppercase-tags:no +ValueDefault=0 + +[accessibility-check] +CallName=accessibility-check: +Category=1 +Description="<html>This option specifies what level of accessibility checking, if any, that Tidy should do. Level 0 is equivalent to Tidy Classic's accessibility checking. For more information on Tidy's accessibility checking, visit the Adaptive Technology Resource Centre at the University of Toronto.</html>" +EditorType=numeric +Enabled=true +MaxVal=3 +MinVal=0 +ValueDefault=0 + +[add-xml-decl] +Category=0 +Description="<html>This option specifies if Tidy should add the XML declaration when outputting XML or XHTML. Note that if the input already includes an <?xml ... ?> declaration then this option will be ignored. If the encoding for the output is different from 'ascii', one of the utf encodings or 'raw', the declaration is always added as required by the XML standard.</html>" +EditorType=boolean +Enabled=false +TrueFalse=add-xml-decl:yes|add-xml-decl:no +ValueDefault=0 + +[add-xml-space] +Category=0 +Description="<html>This option specifies if Tidy should add xml:space='preserve' to elements such as <PRE>, <STYLE> and <SCRIPT> when generating XML. This is needed if the whitespace in such elements is to be parsed appropriately without having access to the DTD.</html>" +EditorType=boolean +Enabled=false +TrueFalse=add-xml-space:yes|add-xml-space:no +ValueDefault=0 + +[alt-text] +CallName=alt-text: +Category=0 +Description="<html>-This option specifies the default 'alt=' text Tidy uses for <IMG> attributes. This feature is dangerous as it suppresses further accessibility warnings. You are responsible for making your documents accessible to people who can not see the images!</html>" +EditorType=string +Enabled=false +ValueDefault= + +[ascii-chars] +Category=3 +Description="<html>Can be used to modify behavior of -c (--clean yes) option. If set to 'yes' when using -c, &emdash;, ”, and other named character entities are downgraded to their closest ascii equivalents.</html>" +EditorType=boolean +Enabled=false +TrueFalse=ascii-chars:yes|ascii-chars:no +ValueDefault=0 + +[assume-xml-procins] +Category=0 +Description=<html>This option specifies if Tidy should change the parsing of processing instructions to require ?> as the terminator rather than >. This option is automatically set if the input is in XML.</html> +EditorType=boolean +Enabled=false +TrueFalse=assume-xml-procins:yes|assume-xml-procins:no +ValueDefault=0 + +[bare] +Category=0 +Description="<html>This option specifies if Tidy should strip Microsoft specific HTML from Word 2000 documents, and output spaces rather than non-breaking spaces where they exist in the input.</html>" +EditorType=boolean +Enabled=false +TrueFalse=bare:yes|bare:no +ValueDefault=0 + +[break-before-br] +Category=2 +Description=<html>This option specifies if Tidy should output a line break before each <BR> element.</html> +EditorType=boolean +Enabled=false +TrueFalse=break-before-br:yes|break-before-br:no +ValueDefault=0 + +[char-encoding] +Category=3 +Choices=char-encoding:raw|char-encoding:ascii|char-encoding:latin0|char-encoding:latin1|char-encoding:utf8|char-encoding:iso2022|char-encoding:mac|char-encoding:win1252|char-encoding:ibm858|char-encoding:utf16le|char-encoding:utf16be|char-encoding:utf16|char-encoding:big5|char-encoding:shiftjis +Description="<html>This option specifies the character encoding Tidy uses for both the input and output. For ascii, Tidy will accept Latin-1 (ISO-8859-1) character values, but will use entities for all characters whose value > 127. For raw, Tidy will output values above 127 without translating them into entities. For latin1, characters above 255 will be written as entities. For utf8, Tidy assumes that both input and output is encoded as UTF-8. You can use iso2022 for files encoded using the ISO-2022 family of encodings e.g. ISO-2022-JP. For mac and win1252, Tidy will accept vendor specific character values, but will use entities for all characters whose value > 127.</html>" +EditorType=multiple +Enabled=false +ValueDefault=1 + +[clean] +Category=0 +Description=<html>This option specifies if Tidy should strip out surplus presentational tags and attributes replacing them by style rules and structural markup as appropriate. It works well on the HTML saved by Microsoft Office products.</html> +EditorType=boolean +Enabled=false +TrueFalse=clean:yes|clean:no +ValueDefault=0 + +[css-prefix] +CallName=css-prefix +Category=0 +Description="<html>-This option specifies the prefix that Tidy uses for styles rules. By default, 'c' will be used.</html>" +EditorType=string +Enabled=false +ValueDefault= + +[decorate-inferred-ul] +Category=0 +Description=<html>This option specifies if Tidy should decorate inferred UL elements with some CSS markup to avoid indentation to the right.</html> +EditorType=boolean +Enabled=false +TrueFalse=decorate-inferred-ul:yes|decorate-inferred-ul:no +ValueDefault=0 + +[doctype] +Category=0 +Choices=doctype:omit|doctype:auto|doctype:strict|doctype:transitional|doctype:user +Description=<html>This option specifies the DOCTYPE declaration generated by Tidy. If set to 'omit' the output won't contain a DOCTYPE declaration. If set to 'auto' (the default) Tidy will use an educated guess based upon the contents of the document. If set to 'strict', Tidy will set the DOCTYPE to the strict DTD. If set to 'loose', the DOCTYPE is set to the loose (transitional) DTD. Alternatively, you can supply a string for the formal public identifier (FPI). For example: doctype: '-//ACME//DTD HTML 3.14159//EN' If you specify the FPI for an XHTML document, Tidy will set the system identifier to an empty string. For an HTML document, Tidy adds a system identifier only if one was already present in order to preserve the processing mode of some browsers. Tidy leaves the DOCTYPE for generic XML documents unchanged. --doctype omit implies --numeric-entities yes. This option does not offer a validation of the document conformance.</html> +EditorType=multiple +Enabled=false +ValueDefault=1 + +[drop-empty-paras] +Category=0 +Description=<html>This option specifies if Tidy should discard empty paragraphs.</html> +EditorType=boolean +Enabled=false +TrueFalse=drop-empty-paras:yes|drop-empty-paras:no +ValueDefault=1 + +[drop-font-tags] +Category=0 +Description=<html>This option specifies if Tidy should discard <FONT> and <CENTER> tags without creating the corresponding style rules. This option can be set independently of the clean option.</html> +EditorType=boolean +Enabled=false +TrueFalse=drop-font-tags:yes|drop-font-tags:no +ValueDefault=0 + +[drop-proprietary-attributes] +Category=0 +Description="<html>This option specifies if Tidy should strip out proprietary attributes, such as MS data binding attributes. </html>" +EditorType=boolean +Enabled=false +TrueFalse=drop-proprietary-attributes:yes|drop-proprietary-attributes:no +ValueDefault=0 + +[enclose-block-text] +Category=0 +Description=<html>This option specifies if Tidy should insert a <P> element to enclose any text it finds in any element that allows mixed content for HTML transitional but not HTML strict.</html> +EditorType=boolean +Enabled=false +TrueFalse=enclose-block-text:yes|enclose-block-text:no +ValueDefault=0 + +[enclose-text] +Category=0 +Description=<html>This option specifies if Tidy should enclose any text it finds in the body element within a <P> element. This is useful when you want to take existing HTML and use it with a style sheet.</html> +EditorType=boolean +Enabled=false +TrueFalse=enclose-text:yes|enclose-text:no +ValueDefault=0 + +[escape-cdata] +Category=0 +Description=<html>This option specifies if Tidy should convert <![CDATA[]]> sections to normal text.</html> +EditorType=boolean +Enabled=false +TrueFalse=escape-cdata:yes|escape-cdata:no +ValueDefault=0 + +[fix-backslash] +Category=0 +Description=<html>This option specifies if Tidy should replace backslash characters '' in URLs by forward slashes '/'.</html> +EditorType=boolean +Enabled=false +TrueFalse=fix-backslash:yes|fix-backslash:no +ValueDefault=1 + +[fix-bad-comments] +Category=0 +Description="<html>This option specifies if Tidy should replace unexpected hyphens with '=' characters when it comes across adjacent hyphens. The default is yes. This option is provided for users of Cold Fusion which uses the comment syntax: <!--- ---></html>" +EditorType=boolean +Enabled=false +TrueFalse=fix-bad-comments:yes|fix-bad-comments:no +ValueDefault=1 + +[fix-uri] +Category=0 +Description="<html>This option specifies if Tidy should check attribute values that carry URIs for illegal characters and if such are found, escape them as HTML 4 recommends.</html>" +EditorType=boolean +Enabled=false +TrueFalse=fix-uri:yes|fix-uri:no +ValueDefault=1 + +[hide-comments] +Category=0 +Description=<html>This option specifies if Tidy should print out comments.</html> +EditorType=boolean +Enabled=false +TrueFalse=hide-comments:yes|hide-comments:no +ValueDefault=0 + +[hide-endtags] +Category=0 +Description=<html>This option specifies if Tidy should omit optional end-tags when generating the pretty printed markup. This option is ignored if you are outputting to XML.</html> +EditorType=boolean +Enabled=false +TrueFalse=hide-endtags:yes|hide-endtags:no +ValueDefault=0 + +[indent] +Category=2 +Description="<html>This option specifies if Tidy should indent block-level tags. If set to 'auto', this option causes Tidy to decide whether or not to indent the content of tags such as TITLE, H1-H6, LI, TD, TD, or P depending on whether or not the content includes a block-level element. You are advised to avoid setting indent to yes as this can expose layout bugs in some browsers.</html>" +EditorType=boolean +Enabled=false +TrueFalse=indent:yes|indent:no +ValueDefault=0 + +[indent-attributes] +Category=2 +Description=<html>This option specifies if Tidy should begin each attribute on a new line.</html> +EditorType=boolean +Enabled=false +TrueFalse=indent-attributes:yes|indent-attributes:no +ValueDefault=0 + +[indent-cdata] +Category=0 +Description=<html>This option specifies if Tidy should indent <![CDATA[]]> sections.</html> +EditorType=boolean +Enabled=false +TrueFalse=indent-cdata:yes|indent-cdata:no +ValueDefault=0 + +[indent-spaces] +CallName=indent-spaces: +Category=2 +Description="<html>This option specifies the number of spaces Tidy uses to indent content, when indentation is enabled.</html>" +EditorType=numeric +Enabled=true +MaxVal=5000 +MinVal=0 +ValueDefault=2 + +[input-encoding] +Category=3 +Choices=input-encoding:raw|input-encoding:ascii|input-encoding:latin0|input-encoding:latin1|input-encoding:utf8|input-encoding:iso2022|input-encoding:mac|input-encoding:win1252|input-encoding:ibm858|input-encoding:utf16le|input-encoding:utf16be|input-encoding:utf16|input-encoding:big5|input-encoding:shiftjis +Description=<html>This option specifies the character encoding Tidy uses for the input. See char-encoding for more info.</html> +EditorType=multiple +Enabled=false +ValueDefault=4 + +[input-xml] +Category=0 +Description=<html>This option specifies if Tidy should use the XML parser rather than the error correcting HTML parser.</html> +EditorType=boolean +Enabled=false +TrueFalse=input-xml:yes|input-xml:no +ValueDefault=0 + +[join-classes] +Category=0 +Description="<html>This option specifies if Tidy should combine class names to generate a single new class name, if multiple class assignments are detected on an element.</html>" +EditorType=boolean +Enabled=false +TrueFalse=join-classes:yes|join-classes:no +ValueDefault=0 + +[join-styles] +Category=0 +Description="<html>This option specifies if Tidy should combine styles to generate a single new style, if multiple style values are detected on an element.</html>" +EditorType=boolean +Enabled=false +TrueFalse=join-styles:yes|join-styles:no +ValueDefault=1 + +[literal-attributes] +Category=0 +Description=<html>This option specifies if Tidy should ensure that whitespace characters within attribute values are passed through unchanged.</html> +EditorType=boolean +Enabled=false +TrueFalse=literal-attributes:yes|literal-attributes:no +ValueDefault=0 + +[logical-emphasis] +Category=0 +Description="<html>This option specifies if Tidy should replace any occurrence of <I> by <EM> and any occurrence of <B> by <STRONG>. In both cases, the attributes are preserved unchanged. This option can be set independently of the clean and drop-font-tags options.</html>" +EditorType=boolean +Enabled=false +TrueFalse=logical-emphasis:yes|logical-emphasis:no +ValueDefault=0 + +[lower-literals] +Category=0 +Description=<html>This option specifies if Tidy should convert the value of an attribute that takes a list of predefined values to lower case. This is required for XHTML documents.</html> +EditorType=boolean +Enabled=false +TrueFalse=lower-literals:yes|lower-literals:no +ValueDefault=1 + +[markup] +Category=2 +Description=<html>This option specifies if Tidy should generate a pretty printed version of the markup. Note that Tidy won't generate a pretty printed version if it finds significant errors (see force-output).</html> +EditorType=boolean +Enabled=false +TrueFalse=markup:yes|markup:no +ValueDefault=1 + +[merge-divs] +Category=0 +Choices=merge-divs:auto|merge-divs:yes|merge-divs:no +ChoicesReadable=Merge Divs Auto|Do Merge Divs|Do Not Merge Divs +Description="<html>Can be used to modify behavior of -c (--clean yes) option. This option specifies if Tidy should merge nested <div> such as '<div><div>...</div></div>'. If set to 'auto', the attributes of the inner <div> are moved to the outer one. As well, nested <div> with ID attributes are not merged. If set to 'yes', the attributes of the inner <div> are discarded with the exception of 'class' and 'style'.</html>" +EditorType=multiple +Enabled=false +ValueDefault=0 + +[ncr] +Category=0 +Description=<html>This option specifies if Tidy should allow numeric character references.</html> +EditorType=boolean +Enabled=false +TrueFalse=ncr:yes|ncr:no +ValueDefault=1 + +[new-blocklevel-tags] +CallName=new-blocklevel-tags: +Category=0 +Description="<html>This option specifies new block-level tags. This option takes a space or comma separated list of tag names. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. Note you can't change the content model for elements such as <TABLE>, <UL>, <OL> and <DL>. This option is ignored in XML mode.</html>" +EditorType=string +Enabled=false +ValueDefault= + +[new-empty-tags] +CallName=new-empty-tags: +Category=0 +Description="<html>This option specifies new empty inline tags. This option takes a space or comma separated list of tag names. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. Remember to also declare empty tags as either inline or blocklevel. This option is ignored in XML mode.</html>" +EditorType=string +Enabled=false +ValueDefault= + +[new-inline-tags] +CallName=new-inline-tags: +Category=0 +Description="<html>This option specifies new non-empty inline tags. This option takes a space or comma separated list of tag names. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. This option is ignored in XML mode.</html>" +EditorType=string +Enabled=false +ValueDefault= + +[new-pre-tags] +CallName=new-pre-tags: +Category=0 +Description="<html>This option specifies new tags that are to be processed in exactly the same way as HTML's <PRE> element. This option takes a space or comma separated list of tag names. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. Note you can not as yet add new CDATA elements (similar to <SCRIPT>). This option is ignored in XML mode.</html>" +EditorType=string +Enabled=false +ValueDefault= + +[newline] +Category=3 +Choices=newline:LF|newline:CRLF|newline:CR +Description="<html>The default is appropriate to the current platform: CRLF on PC-DOS, MS-Windows and OS/2, CR on Classic Mac OS, and LF everywhere else (Unix and Linux).</html>" +EditorType=multiple +Enabled=false +ValueDefault=1 + +[numeric-entities] +Category=0 +Description="<html>This option specifies if Tidy should output entities other than the built-in HTML entities (&, <, > and ") in the numeric rather than the named entity form. Only entities compatible with the DOCTYPE declaration generated are used. Entities that can be represented in the output encoding are translated correspondingly.</html>" +EditorType=boolean +Enabled=false +TrueFalse=numeric-entities:yes|numeric-entities:no +ValueDefault=0 + +[output-bom] +Category=3 +Choices=output-bom:auto|output-bom:yes|output-bom:no +Description="<html>This option specifies if Tidy should write a Unicode Byte Order Mark character (BOM; also known as Zero Width No-Break Space; has value of U+FEFF) to the beginning of the output; only for UTF-8 and UTF-16 output encodings. If set to 'auto', this option causes Tidy to write a BOM to the output only if a BOM was present at the beginning of the input. A BOM is always written for XML/XHTML output using UTF-16 output encodings.</html>" +EditorType=multiple +Enabled=false +ValueDefault=0 + +[output-encoding] +Category=3 +Choices=output-encoding:raw|output-encoding:ascii|output-encoding:latin0|output-encoding:latin1|output-encoding:utf8|output-encoding:iso2022|output-encoding:mac|output-encoding:win1252|output-encoding:ibm858|output-encoding:utf16le|output-encoding:utf16be|output-encoding:utf16|output-encoding:big5|output-encoding:shiftjis +Description="<html>This option specifies the character encoding Tidy uses for the output. See char-encoding for more info. May only be different from input-encoding for Latin encodings (ascii, latin0, latin1, mac, win1252, ibm858).</html>" +EditorType=multiple +Enabled=false +ValueDefault=1 + +[output-html] +Category=0 +Description="<html>This option specifies if Tidy should generate pretty printed output, writing it as HTML.</html>" +EditorType=boolean +Enabled=false +TrueFalse=output-html:yes|output-html:no +ValueDefault=0 + +[output-xhtml] +Category=0 +Description="<html>This option specifies if Tidy should generate pretty printed output, writing it as extensible HTML. This option causes Tidy to set the DOCTYPE and default namespace as appropriate to XHTML. If a DOCTYPE or namespace is given they will checked for consistency with the content of the document. In the case of an inconsistency, the corrected values will appear in the output. For XHTML, entities can be written as named or numeric entities according to the setting of the 'numeric-entities' option. The original case of tags and attributes will be preserved, regardless of other options.</html>" +EditorType=boolean +Enabled=false +TrueFalse=output-xhtml:yes|output-xhtml:no +ValueDefault=0 + +[output-xml] +Category=0 +Description="<html>This option specifies if Tidy should pretty print output, writing it as well-formed XML. Any entities not defined in XML 1.0 will be written as numeric entities to allow them to be parsed by a XML parser. The original case of tags and attributes will be preserved, regardless of other options.</html>" +EditorType=boolean +Enabled=false +TrueFalse=output-xml:yes|output-xml:no +ValueDefault=0 + +[preserve-entities] +Category=0 +Description=<html>This option specifies if Tidy should preserve the well-formed entitites as found in the input.</html> +EditorType=boolean +Enabled=false +TrueFalse=preserve-entities:yes|preserve-entities:no +ValueDefault=0 + +[punctuation-wrap] +Category=2 +Description=<html>This option specifies if Tidy should line wrap after some Unicode or Chinese punctuation characters.</html> +EditorType=boolean +Enabled=false +TrueFalse=punctuation-wrap:yes|punctuation-wrap:no +ValueDefault=0 + +[quote-ampersand] +Category=0 +Description="<html>This option specifies if Tidy should output unadorned & characters as &.</html>" +EditorType=boolean +Enabled=false +TrueFalse=quote-ampersand:yes|quote-ampersand:no +ValueDefault=1 + +[quote-marks] +Category=0 +Description="<html>This option specifies if Tidy should output ' characters as " as is preferred by some editing environments. The apostrophe character ' is written out as ' since many web browsers don't yet support '.</html>" +EditorType=boolean +Enabled=false +TrueFalse=quote-marks:yes|quote-marks:no +ValueDefault=0 + +[quote-nbsp] +Category=0 +Description="<html>This option specifies if Tidy should output non-breaking space characters as entities, rather than as the Unicode character value 160 (decimal).</html>" +EditorType=boolean +Enabled=false +TrueFalse=quote-nbsp:yes|quote-nbsp:no +ValueDefault=1 + +[repeated-attributes] +Category=0 +Choices=repeated-attributes:keep-first|repeated-attributes:keep-last +Description="<html>This option specifies if Tidy should keep the first or last attribute, if an attribute is repeated, e.g. has two align attributes.</html>" +EditorType=multiple +Enabled=false +ValueDefault=1 + +[replace-color] +Category=0 +Description="<html>This option specifies if Tidy should replace numeric values in color attributes by HTML/XHTML color names where defined, e.g. replace '#ffffff' with 'white'.</html>" +EditorType=boolean +Enabled=false +TrueFalse=replace-color:yes|replace-color:no +ValueDefault=0 + +[show-body-only] +Category=0 +Description=<html>This option specifies if Tidy should print only the contents of the body tag as an HTML fragment. Useful for incorporating existing whole pages as a portion of another page.</html> +EditorType=boolean +Enabled=false +TrueFalse=show-body-only:yes|show-body-only:no +ValueDefault=0 + +[show-errors] +CallName=show-errors: +Category=1 +Description="<html>This option specifies what level of accessibility checking, if any, that Tidy should do. Level 0 is equivalent to Tidy Classic's accessibility checking. For more information on Tidy's accessibility checking, visit the Adaptive Technology Resource Centre at the University of Toronto.</html>" +EditorType=numeric +Enabled=true +MaxVal=5000 +MinVal=0 +ValueDefault=6 + +[show-warnings] +Category=1 +Description=<html>This option specifies if Tidy should suppress warnings. This can be useful when a few errors are hidden in a flurry of warnings.</html> +EditorType=boolean +Enabled=false +TrueFalse=show-warnings:yes|show-warnings:no +ValueDefault=1 + +[split] +Category=2 +Description=<html>Currently not used. Tidy Classic only.</html> +EditorType=boolean +Enabled=false +TrueFalse=split:yes|split:no +ValueDefault=0 + +[tab-size] +CallName=tab-size: +Category=2 +Description=<html>This option specifies the number of columns that Tidy uses between successive tab stops. It is used to map tabs to spaces when reading the input. Tidy never outputs tabs.</html> +EditorType=numeric +Enabled=true +MaxVal=5000 +MinVal=0 +ValueDefault=8 + +[uppercase-attributes] +Category=0 +Description="<html>This option specifies if Tidy should output attribute names in upper case. The default is no, which results in lower case attribute names, except for XML input, where the original case is preserved.</html>" +EditorType=boolean +Enabled=false +TrueFalse=uppercase-attributes:yes|uppercase-attributes:no +ValueDefault=0 + +[vertical-space] +Category=2 +Description=<html>This option specifies if Tidy should add some empty lines for readability.</html> +EditorType=boolean +Enabled=false +TrueFalse=vertical-space:yes|vertical-space:no +ValueDefault=0 + +[word-2000] +Category=0 +Description="<html>This option specifies if Tidy should go to great pains to strip out all the surplus stuff Microsoft Word 2000 inserts when you save Word documents as 'Web pages'. Doesn't handle embedded images or VML. You should consider using Word's 'Save As: Web Page, Filtered'.</html>" +EditorType=boolean +Enabled=false +TrueFalse=word-2000:yes|word-2000:no +ValueDefault=0 + +[wrap] +CallName=wrap: +Category=2 +Description=<html>This option specifies the right margin Tidy uses for line wrapping. Tidy tries to wrap lines so that they do not exceed this length. Set wrap to zero if you want to disable line wrapping.</html> +EditorType=numeric +Enabled=true +MaxVal=5000 +MinVal=0 +ValueDefault=68 + +[wrap-asp] +Category=2 +Description="<html>This option specifies if Tidy should line wrap text contained within ASP pseudo elements, which look like: <% ... %>.</html>" +EditorType=boolean +Enabled=false +TrueFalse=wrap-asp:yes|wrap-asp:no +ValueDefault=1 + +[wrap-attributes] +Category=2 +Description="<html>This option specifies if Tidy should line wrap attribute values, for easier editing. This option can be set independently of wrap-script-literals.</html>" +EditorType=boolean +Enabled=false +TrueFalse=wrap-attributes:yes|wrap-attributes:no +ValueDefault=0 + +[wrap-jste] +Category=2 +Description="<html>This option specifies if Tidy should line wrap text contained within JSTE pseudo elements, which look like: <# ... #>.</html>" +EditorType=boolean +Enabled=false +TrueFalse=wrap-jste:yes|wrap-jste:no +ValueDefault=1 + +[wrap-php] +Category=2 +Description="<html>This option specifies if Tidy should line wrap text contained within PHP pseudo elements, which look like: <?php ... ?>.</html>" +EditorType=boolean +Enabled=false +TrueFalse=wrap-php:yes|wrap-php:no +ValueDefault=1 + +[wrap-script-literals] +Category=2 +Description=<html>This option specifies if Tidy should line wrap string literals that appear in script attributes. Tidy wraps long script string literals by inserting a backslash character before the line break.</html> +EditorType=boolean +Enabled=false +TrueFalse=wrap-script-literals:yes|wrap-script-literals:no +ValueDefault=0 + +[wrap-sections] +Category=2 +Description=<html>This option specifies if Tidy should line wrap text contained within <![ ... ]> section tags.</html> +EditorType=boolean +Enabled=false +TrueFalse=wrap-sections:yes|wrap-sections:no +ValueDefault=0 diff --git a/indenters/uigui_vbsbeaut.ini b/indenters/uigui_vbsbeaut.ini index 46cbc76..0168a92 100755 --- a/indenters/uigui_vbsbeaut.ini +++ b/indenters/uigui_vbsbeaut.ini @@ -1,45 +1,45 @@ -[header]
-categories=General
-cfgFileParameterEnding=cr
-configFilename=
-fileTypes=*.vb
-indenterFileName=vbsbeaut.bat
-indenterName=VBSBeautifier (VB)
-inputFileName=indentinput
-inputFileParameter=" "
-manual=http://www.daansystems.com/vbsbeaut/
-outputFileName=indentinput
-outputFileParameter=none
-parameterOrder=pio
-showHelpParameter=
-stringparaminquotes=false
-useCfgFileParameter=
-version=1.10
-
-
-[Spaces]
-Category=0
-Description="<html>Replace tabs by this number of spaces</html>"
-Enabled=false
-EditorType=numeric
-CallName="-s"
-MinVal=0
-MaxVal=1024
-ValueDefault=4
-
-[Keywords]
-Category=0
-Description="<html>Change keywords</html>"
-Enabled=false
-EditorType=multiple
-Choices="|-u|-l|-n"
-ChoicesReadable="Properize keywords|Make keywords uppercase|Make keywords lowercase|Don't change keywords"
-ValueDefault=0
-
-[Split Dim]
-Category=0
-Description="<html>Split Dim statements</html>"
-Enabled=false
-EditorType=boolean
-TrueFalse=|-d
-ValueDefault=0
+[header] +categories=General +cfgFileParameterEnding=cr +configFilename= +fileTypes=*.vb +indenterFileName=vbsbeaut.bat +indenterName=VBSBeautifier (VB) +inputFileName=indentinput +inputFileParameter=" " +manual=http://www.daansystems.com/vbsbeaut/ +outputFileName=indentinput +outputFileParameter=none +parameterOrder=pio +showHelpParameter= +stringparaminquotes=false +useCfgFileParameter= +version=1.10 + + +[Spaces] +Category=0 +Description="<html>Replace tabs by this number of spaces</html>" +Enabled=false +EditorType=numeric +CallName="-s" +MinVal=0 +MaxVal=1024 +ValueDefault=4 + +[Keywords] +Category=0 +Description="<html>Change keywords</html>" +Enabled=false +EditorType=multiple +Choices="|-u|-l|-n" +ChoicesReadable="Properize keywords|Make keywords uppercase|Make keywords lowercase|Don't change keywords" +ValueDefault=0 + +[Split Dim] +Category=0 +Description="<html>Split Dim statements</html>" +Enabled=false +EditorType=boolean +TrueFalse=|-d +ValueDefault=0 diff --git a/indenters/uigui_xmlindent.ini b/indenters/uigui_xmlindent.ini index fcdd576..3717510 100755 --- a/indenters/uigui_xmlindent.ini +++ b/indenters/uigui_xmlindent.ini @@ -1,61 +1,61 @@ -[header]
-categories=General
-cfgFileParameterEnding=cr
-configFilename=
-fileTypes=*.xml|*.xslt
-indenterFileName=xmlindent
-indenterName=XML Indent (XML, XSL)
-inputFileName=indentinput
-inputFileParameter=
-manual=http://universalindent.sf.net/indentermanuals/xmlindent.txt
-outputFileName=indentoutput
-outputFileParameter="-o "
-parameterOrder=poi
-showHelpParameter=-h
-stringparaminquotes=false
-useCfgFileParameter=none
-version=0.2.17
-
-[Indent level]
-CallName="-i "
-Category=0
-Description=<html>Indent using n spaces or tabs.</html>
-EditorType=numeric
-Enabled=false
-MaxVal=120
-MinVal=0
-ValueDefault=4
-
-[Use tabs]
-Category=0
-Description=<html>Use tabs instead of spaces for indent.</html>
-EditorType=boolean
-TrueFalse=-t|
-ValueDefault=0
-
-[Maximum wrap columns]
-CallName="-l "
-Category=0
-Description=<html>Maximum columns for line wrapping.</html>
-EditorType=numeric
-Enabled=false
-MaxVal=120
-MinVal=0
-ValueDefault=80
-
-[Suppress newline at pos]
-CallName="-n "
-Category=0
-Description=<html>Suppress newline at position.</html>
-EditorType=numeric
-Enabled=false
-MaxVal=120
-MinVal=0
-ValueDefault=80
-
-[Force newline]
-Category=0
-Description=<html>Force newline on elements without children.</html>
-EditorType=boolean
-TrueFalse=-f|
-ValueDefault=0
+[header] +categories=General +cfgFileParameterEnding=cr +configFilename= +fileTypes=*.xml|*.xslt +indenterFileName=xmlindent +indenterName=XML Indent (XML, XSL) +inputFileName=indentinput +inputFileParameter= +manual=http://universalindent.sf.net/indentermanuals/xmlindent.txt +outputFileName=indentoutput +outputFileParameter="-o " +parameterOrder=poi +showHelpParameter=-h +stringparaminquotes=false +useCfgFileParameter=none +version=0.2.17 + +[Indent level] +CallName="-i " +Category=0 +Description=<html>Indent using n spaces or tabs.</html> +EditorType=numeric +Enabled=false +MaxVal=120 +MinVal=0 +ValueDefault=4 + +[Use tabs] +Category=0 +Description=<html>Use tabs instead of spaces for indent.</html> +EditorType=boolean +TrueFalse=-t| +ValueDefault=0 + +[Maximum wrap columns] +CallName="-l " +Category=0 +Description=<html>Maximum columns for line wrapping.</html> +EditorType=numeric +Enabled=false +MaxVal=120 +MinVal=0 +ValueDefault=80 + +[Suppress newline at pos] +CallName="-n " +Category=0 +Description=<html>Suppress newline at position.</html> +EditorType=numeric +Enabled=false +MaxVal=120 +MinVal=0 +ValueDefault=80 + +[Force newline] +Category=0 +Description=<html>Force newline on elements without children.</html> +EditorType=boolean +TrueFalse=-f| +ValueDefault=0 diff --git a/src/AboutDialog.cpp b/src/AboutDialog.cpp index aa4953a..13957ed 100755 --- a/src/AboutDialog.cpp +++ b/src/AboutDialog.cpp @@ -22,11 +22,11 @@ #include "UiGuiVersion.h" -#include <QUrl> -#include <QDesktopServices> -#include <QScrollBar> -#include <QTimer> -#include <QLocale> +#include <tqurl.h> +#include <tqdesktopservices.h> +#include <tqscrollbar.h> +#include <tqtimer.h> +#include <tqlocale.h> /*! \class AboutDialog diff --git a/src/AboutDialog.h b/src/AboutDialog.h index f713d71..adbdf13 100755 --- a/src/AboutDialog.h +++ b/src/AboutDialog.h @@ -20,7 +20,7 @@ #ifndef ABOUTDIALOG_H #define ABOUTDIALOG_H -#include <QDialog> +#include <tqdialog.h> namespace Ui { class AboutDialog; diff --git a/src/AboutDialogGraphicsView.cpp b/src/AboutDialogGraphicsView.cpp index d97cc70..52cb6e1 100755 --- a/src/AboutDialogGraphicsView.cpp +++ b/src/AboutDialogGraphicsView.cpp @@ -21,11 +21,11 @@ #include "AboutDialog.h" -#include <QtGui> -#include <QDesktopWidget> -#include <QDate> -#include <QTimeLine> -#include <QSplashScreen> +#include <tqtgui.h> +#include <tqdesktopwidget.h> +#include <tqdate.h> +#include <tqtimeline.h> +#include <tqsplashscreen.h> /*! \class AboutDialogGraphicsView diff --git a/src/AboutDialogGraphicsView.h b/src/AboutDialogGraphicsView.h index ba22c0e..c673149 100755 --- a/src/AboutDialogGraphicsView.h +++ b/src/AboutDialogGraphicsView.h @@ -19,7 +19,7 @@ #ifndef ABOUTDIALOGGRAPHICSVIEW_H #define ABOUTDIALOGGRAPHICSVIEW_H -#include <QGraphicsView> +#include <tqgraphicsview.h> class AboutDialog; diff --git a/src/FindDialog.ui b/src/FindDialog.ui index 943f5a5..f22f574 100755 --- a/src/FindDialog.ui +++ b/src/FindDialog.ui @@ -1,121 +1,121 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>FindDialog</class>
- <widget class="QDialog" name="FindDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>347</width>
- <height>227</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Find</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QLabel" name="label">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Find what:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="comboBox">
- <property name="editable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title">
- <string>Find options</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QCheckBox" name="checkBox">
- <property name="text">
- <string>Match case</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="checkBox_2">
- <property name="text">
- <string>Match whole word</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="checkBox_3">
- <property name="text">
- <string>Search forward</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="checkBox_4">
- <property name="text">
- <string>Use Regular Expressions</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <property name="sizeConstraint">
- <enum>QLayout::SetMaximumSize</enum>
- </property>
- <item>
- <widget class="QPushButton" name="pushButton">
- <property name="text">
- <string>Find Next</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="pushButton_2">
- <property name="text">
- <string>Close</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
+<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>FindDialog</class> + <widget class="QDialog" name="FindDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>347</width> + <height>227</height> + </rect> + </property> + <property name="windowTitle"> + <string>Find</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QLabel" name="label"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Find what:</string> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="comboBox"> + <property name="editable"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="title"> + <string>Find options</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QCheckBox" name="checkBox"> + <property name="text"> + <string>Match case</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="checkBox_2"> + <property name="text"> + <string>Match whole word</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="checkBox_3"> + <property name="text"> + <string>Search forward</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="checkBox_4"> + <property name="text"> + <string>Use Regular Expressions</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="sizeConstraint"> + <enum>QLayout::SetMaximumSize</enum> + </property> + <item> + <widget class="QPushButton" name="pushButton"> + <property name="text"> + <string>Find Next</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="pushButton_2"> + <property name="text"> + <string>Close</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/src/IndentHandler.cpp b/src/IndentHandler.cpp index a1109c4..2446fa3 100755 --- a/src/IndentHandler.cpp +++ b/src/IndentHandler.cpp @@ -25,32 +25,32 @@ #include "UiGuiIniFileParser.h" #include "SettingsPaths.h" -#include <QToolBox> -#include <QVBoxLayout> -#include <QApplication> -#include <QCheckBox> -#include <QComboBox> -#include <QToolButton> -#include <QFile> -#include <QProcess> -#include <QSettings> -#include <QStringList> -#include <QLineEdit> -#include <QSpinBox> -#include <QLabel> -#include <QByteArray> -#include <QDir> -#include <QMessageBox> -#include <QMainWindow> -#include <QTextStream> -#include <QTextCodec> -#include <QtScript> -#include <QDesktopServices> -#include <QMenu> -#include <QAction> -#include <QContextMenuEvent> -#include <QFileDialog> -#include <QtDebug> +#include <tqtoolbox.h> +#include <tqvboxlayout.h> +#include <tqapplication.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqtoolbutton.h> +#include <tqfile.h> +#include <tqprocess.h> +#include <tqsettings.h> +#include <tqstringlist.h> +#include <tqlineedit.h> +#include <tqspinbox.h> +#include <tqlabel.h> +#include <tqbytearray.h> +#include <tqdir.h> +#include <tqmessagebox.h> +#include <tqmainwindow.h> +#include <tqtextstream.h> +#include <tqtextcodec.h> +#include <tqtscript.h> +#include <tqdesktopservices.h> +#include <tqmenu.h> +#include <tqaction.h> +#include <tqcontextmenuevent.h> +#include <tqfiledialog.h> +#include <tqtdebug.h> #ifdef Q_OS_WIN32 #include <Windows.h> diff --git a/src/IndentHandler.h b/src/IndentHandler.h index 3ccb553..3f20d82 100755 --- a/src/IndentHandler.h +++ b/src/IndentHandler.h @@ -20,7 +20,7 @@ #ifndef INDENTHANDLER_H #define INDENTHANDLER_H -#include <QWidget> +#include <tqwidget.h> class UiGuiErrorMessage; class UiGuiIniFileParser; diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index f7b6185..3c12f81 100755 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -33,26 +33,26 @@ #include "IndentHandler.h" #include "UpdateCheckDialog.h" -#include <QWidget> -#include <QLabel> -#include <QString> -#include <QScrollBar> -#include <QTextCursor> -#include <QFileDialog> -#include <QTextStream> -#include <QTextDocument> -#include <QPrinter> -#include <QPrintDialog> -#include <QCloseEvent> -#include <QHelpEvent> -#include <QToolTip> -#include <QTranslator> -#include <QLocale> -#include <QTextCodec> -#include <QDate> -#include <QUrl> -#include <QMessageBox> -#include <QtDebug> +#include <tqwidget.h> +#include <tqlabel.h> +#include <tqstring.h> +#include <tqscrollbar.h> +#include <tqtextcursor.h> +#include <tqfiledialog.h> +#include <tqtextstream.h> +#include <tqtextdocument.h> +#include <tqprinter.h> +#include <tqprintdialog.h> +#include <tqcloseevent.h> +#include <tqhelpevent.h> +#include <tqtooltip.h> +#include <tqtranslator.h> +#include <tqlocale.h> +#include <tqtextcodec.h> +#include <tqdate.h> +#include <tqurl.h> +#include <tqmessagebox.h> +#include <tqtdebug.h> #include <Qsci/qsciscintilla.h> #include <Qsci/qsciprinter.h> diff --git a/src/MainWindow.h b/src/MainWindow.h index 1205a46..4de1450 100755 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -20,7 +20,7 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include <QMainWindow> +#include <tqmainwindow.h> #include "UiGuiSettings.h" diff --git a/src/SettingsPaths.cpp b/src/SettingsPaths.cpp index f556491..27f9fca 100755 --- a/src/SettingsPaths.cpp +++ b/src/SettingsPaths.cpp @@ -1,275 +1,275 @@ -/***************************************************************************
- * Copyright (C) 2006-2012 by Thomas Schweitzer *
- * thomas-schweitzer(at)arcor.de *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License version 2.0 as *
- * published by the Free Software Foundation. *
- * *
- * 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 in the file LICENSE.GPL; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#include "SettingsPaths.h"
-
-#include <QCoreApplication>
-#include <QFile>
-#include <QDir>
-#include <QDirIterator>
-#include <QStack>
-#include <QtDebug>
-
-#include <stdlib.h>
-
-//! \defgroup grp_Settings All concerning applications settings.
-
-/*!
- \class SettingsPaths
- \ingroup grp_Settings
- \brief SettingsPaths is a pure static functions class from which info about the
- paths needed for settings can be retrieved.
-*/
-
-bool SettingsPaths::_alreadyInitialized = false;
-QString SettingsPaths::_applicationBinaryPath = "";
-QString SettingsPaths::_settingsPath = "";
-QString SettingsPaths::_globalFilesPath = "";
-QString SettingsPaths::_indenterPath = "";
-QString SettingsPaths::_tempPath = "";
-bool SettingsPaths::_portableMode = false;
-
-
-/*!
- \brief Initializes all available information about the paths.
-
- Mainly during this init it is detected whether to start in portable mode or not. This is
- done by testing whether the directory "config" is in the same directory as this
- applications executable file.
- In portable mode all data is ONLY written to subdirectories of the applications executable file.
- Means also that the directory "indenters" has to be there.
- In not portable mode (multiuser mode) only users home directory is used for writing config data.
- */
-void SettingsPaths::init() {
- _alreadyInitialized = true;
-
- qDebug() << __LINE__ << " " << __FUNCTION__ << ": Initializing application paths.";
-
- // Get the applications binary path, with respect to MacOSXs use of the .app folder.
- _applicationBinaryPath = QCoreApplication::applicationDirPath();
- // Remove any trailing slashes
- while ( _applicationBinaryPath.right(1) == "/" ) {
- _applicationBinaryPath.chop(1);
- }
-
-#ifdef UNIVERSALINDENTGUI_NPP_EXPORTS
- _applicationBinaryPath += "/plugins/uigui";
-#endif
-
-#ifdef Q_OS_MAC
- // Because on Mac universal binaries are used, the binary path is not equal
- // to the applications (.app) path. So get the .apps path here.
- int indexOfDotApp = _applicationBinaryPath.indexOf(".app");
- if ( indexOfDotApp != -1 ) {
- // Cut off after the dot of ".app".
- _applicationBinaryPath = _applicationBinaryPath.left( indexOfDotApp-1 );
- // Cut off after the first slash that was in front of ".app" (normally this is the word "UniversalIndentGUI")
- _applicationBinaryPath = _applicationBinaryPath.left( _applicationBinaryPath.lastIndexOf("/") );
- }
-#endif
-
- // If the "config" directory is a subdir of the applications binary path, use this one (portable mode)
- _settingsPath = _applicationBinaryPath + "/config";
- if ( QFile::exists( _settingsPath ) ) {
- _portableMode = true;
- QDir dirCreator;
- _globalFilesPath = _applicationBinaryPath;
- _indenterPath = _applicationBinaryPath + "/indenters";
- dirCreator.mkpath( _settingsPath );
- _tempPath = _applicationBinaryPath + "/temp";
- //TODO: If the portable drive has write protection, use local temp path and clean it up on exit.
- dirCreator.mkpath( _tempPath );
- }
- // ... otherwise use the system specific global application data path.
- else {
- _portableMode = false;
- QDir dirCreator;
-#ifdef Q_OS_WIN
- // Get the local users application settings directory.
- // Remove any trailing slashes.
- _settingsPath = QDir::fromNativeSeparators( qgetenv("APPDATA") );
- while ( _settingsPath.right(1) == "/" ) {
- _settingsPath.chop(1);
- }
- _settingsPath = _settingsPath + "/UniversalIndentGUI";
-
- // On windows systems the directories "indenters", "translations" are subdirs of the _applicationBinaryPath.
- _globalFilesPath = _applicationBinaryPath;
-#else
- // Remove any trailing slashes.
- _settingsPath = QDir::homePath();
- while ( _settingsPath.right(1) == "/" ) {
- _settingsPath.chop(1);
- }
- _settingsPath = _settingsPath + "/.universalindentgui";
- _globalFilesPath = "/usr/share/universalindentgui";
-#endif
- dirCreator.mkpath( _settingsPath );
- // If a highlighter config file does not exist in the users home config dir
- // copy the default config file over there.
- if ( !QFile::exists(_settingsPath+"/UiGuiSyntaxHighlightConfig.ini") ) {
- QFile::copy( _globalFilesPath+"/config/UiGuiSyntaxHighlightConfig.ini", _settingsPath+"/UiGuiSyntaxHighlightConfig.ini" );
- }
- _indenterPath = _globalFilesPath + "/indenters";
-
- // On different systems it may be that "QDir::tempPath()" ends with a "/" or not. So check this.
- // Remove any trailing slashes.
- _tempPath = QDir::tempPath();
- while ( _tempPath.right(1) == "/" ) {
- _tempPath.chop(1);
- }
- _tempPath = _tempPath + "/UniversalIndentGUI";
-
-#if defined(Q_OS_WIN32)
- dirCreator.mkpath( _tempPath );
-#else
- // On Unix based systems create a random temporary directory for security
- // reasons. Otherwise an evil human being could create a symbolic link
- // to an important existing file which gets overwritten when UiGUI writes
- // into this normally temporary but linked file.
- char *pathTemplate = new char[_tempPath.length()+8];
- QByteArray pathTemplateQBA = QString(_tempPath + "-XXXXXX").toAscii();
- delete [] pathTemplate;
- pathTemplate = pathTemplateQBA.data();
- pathTemplate = mkdtemp( pathTemplate );
- _tempPath = pathTemplate;
-#endif
- }
-
- qDebug() << __LINE__ << " " << __FUNCTION__ << ": Paths are:" \
- "<ul><li>_applicationBinaryPath=" << _applicationBinaryPath \
- << "</li><li>_settingsPath=" << _settingsPath \
- << "</li><li>_globalFilesPath=" << _globalFilesPath \
- << "</li><li>_indenterPath=" << _indenterPath \
- << "</li><li>_tempPath=" << _tempPath \
- << "</li><li>Running in portable mode=" << _portableMode << "</li></ul>";
-}
-
-
-/*!
- \brief Returns the path of the applications executable.
- */
-const QString SettingsPaths::getApplicationBinaryPath() {
- if ( !_alreadyInitialized ) {
- SettingsPaths::init();
- }
- return _applicationBinaryPath;
-}
-
-
-/*!
- \brief Returns the path where all settings are being/should be written to.
- */
-const QString SettingsPaths::getSettingsPath() {
- if ( !_alreadyInitialized ) {
- SettingsPaths::init();
- }
- return _settingsPath;
-}
-
-
-/*!
- \brief Returns the path where the files concerning all users reside. For example translations.
- */
-const QString SettingsPaths::getGlobalFilesPath() {
- if ( !_alreadyInitialized ) {
- SettingsPaths::init();
- }
- return _globalFilesPath;
-}
-
-
-/*!
- \brief Returns the path where the indenter executables reside.
- */
-const QString SettingsPaths::getIndenterPath() {
- if ( !_alreadyInitialized ) {
- SettingsPaths::init();
- }
- return _indenterPath;
-}
-
-
-/*!
- \brief Returns the path where the where all temporary data should be written to.
- */
-const QString SettingsPaths::getTempPath() {
- if ( !_alreadyInitialized ) {
- SettingsPaths::init();
- }
- return _tempPath;
-}
-
-
-/*!
- \brief Returns true if portable mode shall be used.
- */
-bool SettingsPaths::getPortableMode() {
- if ( !_alreadyInitialized ) {
- SettingsPaths::init();
- }
- return _portableMode;
-}
-
-
-/*!
- \brief Completely deletes the created temporary directory with all of its content.
- */
-void SettingsPaths::cleanAndRemoveTempDir() {
- QDirIterator dirIterator(_tempPath, QDirIterator::Subdirectories);
- QStack<QString> directoryStack;
- bool noErrorsOccurred = true;
-
- while ( dirIterator.hasNext() ) {
- QString currentDirOrFile = dirIterator.next();
- // If this dummy call isn't done here, calling "dirIterator.fileInfo().isDir()" later somehow fails.
- dirIterator.fileInfo();
-
- if ( !currentDirOrFile.isEmpty() && dirIterator.fileName() != "." && dirIterator.fileName() != ".." ) {
- // There is a path on the stack but the current path doesn't start with that path.
- // So we changed into another parent directory and the one on the stack can be deleted
- // since it must be empty.
- if ( !directoryStack.isEmpty() && !currentDirOrFile.startsWith(directoryStack.top()) ) {
- QString dirToBeRemoved = directoryStack.pop();
- bool couldRemoveDir = QDir(dirToBeRemoved).rmdir(dirToBeRemoved);
- noErrorsOccurred &= couldRemoveDir;
- if ( couldRemoveDir == false )
- qWarning() << __LINE__ << " " << __FUNCTION__ << "Could not remove the directory: " << dirToBeRemoved;
- //qDebug() << "Removing Dir " << directoryStack.pop();
- }
-
- // If the iterator currently points to a directory push it onto the stack.
- if ( dirIterator.fileInfo().isDir() ) {
- directoryStack.push( currentDirOrFile );
- //qDebug() << "Pushing onto Stack " << currentDirOrFile;
- }
- // otherwise it must be a file, so delete it.
- else {
- bool couldRemoveFile = QFile::remove( currentDirOrFile );
- noErrorsOccurred &= couldRemoveFile;
- if ( couldRemoveFile == false )
- qWarning() << __LINE__ << " " << __FUNCTION__ << "Could not remove the file: " << currentDirOrFile;
- //qDebug() << "Removing File " << currentDirOrFile;
- }
- }
- }
- noErrorsOccurred &= QDir(_tempPath).rmdir(_tempPath);
- if ( noErrorsOccurred == false )
- qWarning() << __LINE__ << " " << __FUNCTION__ << "While cleaning up the temp dir an error occurred.";
-}
+/*************************************************************************** + * Copyright (C) 2006-2012 by Thomas Schweitzer * + * thomas-schweitzer(at)arcor.de * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License version 2.0 as * + * published by the Free Software Foundation. * + * * + * 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 in the file LICENSE.GPL; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "SettingsPaths.h" + +#include <tqcoreapplication.h> +#include <tqfile.h> +#include <tqdir.h> +#include <tqdiriterator.h> +#include <tqstack.h> +#include <tqtdebug.h> + +#include <stdlib.h> + +//! \defgroup grp_Settings All concerning applications settings. + +/*! + \class SettingsPaths + \ingroup grp_Settings + \brief SettingsPaths is a pure static functions class from which info about the + paths needed for settings can be retrieved. +*/ + +bool SettingsPaths::_alreadyInitialized = false; +QString SettingsPaths::_applicationBinaryPath = ""; +QString SettingsPaths::_settingsPath = ""; +QString SettingsPaths::_globalFilesPath = ""; +QString SettingsPaths::_indenterPath = ""; +QString SettingsPaths::_tempPath = ""; +bool SettingsPaths::_portableMode = false; + + +/*! + \brief Initializes all available information about the paths. + + Mainly during this init it is detected whether to start in portable mode or not. This is + done by testing whether the directory "config" is in the same directory as this + applications executable file. + In portable mode all data is ONLY written to subdirectories of the applications executable file. + Means also that the directory "indenters" has to be there. + In not portable mode (multiuser mode) only users home directory is used for writing config data. + */ +void SettingsPaths::init() { + _alreadyInitialized = true; + + qDebug() << __LINE__ << " " << __FUNCTION__ << ": Initializing application paths."; + + // Get the applications binary path, with respect to MacOSXs use of the .app folder. + _applicationBinaryPath = QCoreApplication::applicationDirPath(); + // Remove any trailing slashes + while ( _applicationBinaryPath.right(1) == "/" ) { + _applicationBinaryPath.chop(1); + } + +#ifdef UNIVERSALINDENTGUI_NPP_EXPORTS + _applicationBinaryPath += "/plugins/uigui"; +#endif + +#ifdef Q_OS_MAC + // Because on Mac universal binaries are used, the binary path is not equal + // to the applications (.app) path. So get the .apps path here. + int indexOfDotApp = _applicationBinaryPath.indexOf(".app"); + if ( indexOfDotApp != -1 ) { + // Cut off after the dot of ".app". + _applicationBinaryPath = _applicationBinaryPath.left( indexOfDotApp-1 ); + // Cut off after the first slash that was in front of ".app" (normally this is the word "UniversalIndentGUI") + _applicationBinaryPath = _applicationBinaryPath.left( _applicationBinaryPath.lastIndexOf("/") ); + } +#endif + + // If the "config" directory is a subdir of the applications binary path, use this one (portable mode) + _settingsPath = _applicationBinaryPath + "/config"; + if ( QFile::exists( _settingsPath ) ) { + _portableMode = true; + QDir dirCreator; + _globalFilesPath = _applicationBinaryPath; + _indenterPath = _applicationBinaryPath + "/indenters"; + dirCreator.mkpath( _settingsPath ); + _tempPath = _applicationBinaryPath + "/temp"; + //TODO: If the portable drive has write protection, use local temp path and clean it up on exit. + dirCreator.mkpath( _tempPath ); + } + // ... otherwise use the system specific global application data path. + else { + _portableMode = false; + QDir dirCreator; +#ifdef Q_OS_WIN + // Get the local users application settings directory. + // Remove any trailing slashes. + _settingsPath = QDir::fromNativeSeparators( qgetenv("APPDATA") ); + while ( _settingsPath.right(1) == "/" ) { + _settingsPath.chop(1); + } + _settingsPath = _settingsPath + "/UniversalIndentGUI"; + + // On windows systems the directories "indenters", "translations" are subdirs of the _applicationBinaryPath. + _globalFilesPath = _applicationBinaryPath; +#else + // Remove any trailing slashes. + _settingsPath = QDir::homePath(); + while ( _settingsPath.right(1) == "/" ) { + _settingsPath.chop(1); + } + _settingsPath = _settingsPath + "/.universalindentgui"; + _globalFilesPath = "/usr/share/universalindentgui"; +#endif + dirCreator.mkpath( _settingsPath ); + // If a highlighter config file does not exist in the users home config dir + // copy the default config file over there. + if ( !QFile::exists(_settingsPath+"/UiGuiSyntaxHighlightConfig.ini") ) { + QFile::copy( _globalFilesPath+"/config/UiGuiSyntaxHighlightConfig.ini", _settingsPath+"/UiGuiSyntaxHighlightConfig.ini" ); + } + _indenterPath = _globalFilesPath + "/indenters"; + + // On different systems it may be that "QDir::tempPath()" ends with a "/" or not. So check this. + // Remove any trailing slashes. + _tempPath = QDir::tempPath(); + while ( _tempPath.right(1) == "/" ) { + _tempPath.chop(1); + } + _tempPath = _tempPath + "/UniversalIndentGUI"; + +#if defined(Q_OS_WIN32) + dirCreator.mkpath( _tempPath ); +#else + // On Unix based systems create a random temporary directory for security + // reasons. Otherwise an evil human being could create a symbolic link + // to an important existing file which gets overwritten when UiGUI writes + // into this normally temporary but linked file. + char *pathTemplate = new char[_tempPath.length()+8]; + QByteArray pathTemplateQBA = QString(_tempPath + "-XXXXXX").toAscii(); + delete [] pathTemplate; + pathTemplate = pathTemplateQBA.data(); + pathTemplate = mkdtemp( pathTemplate ); + _tempPath = pathTemplate; +#endif + } + + qDebug() << __LINE__ << " " << __FUNCTION__ << ": Paths are:" \ + "<ul><li>_applicationBinaryPath=" << _applicationBinaryPath \ + << "</li><li>_settingsPath=" << _settingsPath \ + << "</li><li>_globalFilesPath=" << _globalFilesPath \ + << "</li><li>_indenterPath=" << _indenterPath \ + << "</li><li>_tempPath=" << _tempPath \ + << "</li><li>Running in portable mode=" << _portableMode << "</li></ul>"; +} + + +/*! + \brief Returns the path of the applications executable. + */ +const QString SettingsPaths::getApplicationBinaryPath() { + if ( !_alreadyInitialized ) { + SettingsPaths::init(); + } + return _applicationBinaryPath; +} + + +/*! + \brief Returns the path where all settings are being/should be written to. + */ +const QString SettingsPaths::getSettingsPath() { + if ( !_alreadyInitialized ) { + SettingsPaths::init(); + } + return _settingsPath; +} + + +/*! + \brief Returns the path where the files concerning all users reside. For example translations. + */ +const QString SettingsPaths::getGlobalFilesPath() { + if ( !_alreadyInitialized ) { + SettingsPaths::init(); + } + return _globalFilesPath; +} + + +/*! + \brief Returns the path where the indenter executables reside. + */ +const QString SettingsPaths::getIndenterPath() { + if ( !_alreadyInitialized ) { + SettingsPaths::init(); + } + return _indenterPath; +} + + +/*! + \brief Returns the path where the where all temporary data should be written to. + */ +const QString SettingsPaths::getTempPath() { + if ( !_alreadyInitialized ) { + SettingsPaths::init(); + } + return _tempPath; +} + + +/*! + \brief Returns true if portable mode shall be used. + */ +bool SettingsPaths::getPortableMode() { + if ( !_alreadyInitialized ) { + SettingsPaths::init(); + } + return _portableMode; +} + + +/*! + \brief Completely deletes the created temporary directory with all of its content. + */ +void SettingsPaths::cleanAndRemoveTempDir() { + QDirIterator dirIterator(_tempPath, QDirIterator::Subdirectories); + QStack<QString> directoryStack; + bool noErrorsOccurred = true; + + while ( dirIterator.hasNext() ) { + QString currentDirOrFile = dirIterator.next(); + // If this dummy call isn't done here, calling "dirIterator.fileInfo().isDir()" later somehow fails. + dirIterator.fileInfo(); + + if ( !currentDirOrFile.isEmpty() && dirIterator.fileName() != "." && dirIterator.fileName() != ".." ) { + // There is a path on the stack but the current path doesn't start with that path. + // So we changed into another parent directory and the one on the stack can be deleted + // since it must be empty. + if ( !directoryStack.isEmpty() && !currentDirOrFile.startsWith(directoryStack.top()) ) { + QString dirToBeRemoved = directoryStack.pop(); + bool couldRemoveDir = QDir(dirToBeRemoved).rmdir(dirToBeRemoved); + noErrorsOccurred &= couldRemoveDir; + if ( couldRemoveDir == false ) + qWarning() << __LINE__ << " " << __FUNCTION__ << "Could not remove the directory: " << dirToBeRemoved; + //qDebug() << "Removing Dir " << directoryStack.pop(); + } + + // If the iterator currently points to a directory push it onto the stack. + if ( dirIterator.fileInfo().isDir() ) { + directoryStack.push( currentDirOrFile ); + //qDebug() << "Pushing onto Stack " << currentDirOrFile; + } + // otherwise it must be a file, so delete it. + else { + bool couldRemoveFile = QFile::remove( currentDirOrFile ); + noErrorsOccurred &= couldRemoveFile; + if ( couldRemoveFile == false ) + qWarning() << __LINE__ << " " << __FUNCTION__ << "Could not remove the file: " << currentDirOrFile; + //qDebug() << "Removing File " << currentDirOrFile; + } + } + } + noErrorsOccurred &= QDir(_tempPath).rmdir(_tempPath); + if ( noErrorsOccurred == false ) + qWarning() << __LINE__ << " " << __FUNCTION__ << "While cleaning up the temp dir an error occurred."; +} diff --git a/src/SettingsPaths.h b/src/SettingsPaths.h index 71f17e3..3442216 100755 --- a/src/SettingsPaths.h +++ b/src/SettingsPaths.h @@ -1,50 +1,50 @@ -/***************************************************************************
- * Copyright (C) 2006-2012 by Thomas Schweitzer *
- * thomas-schweitzer(at)arcor.de *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License version 2.0 as *
- * published by the Free Software Foundation. *
- * *
- * 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 in the file LICENSE.GPL; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#ifndef SETTINGSPATHS_H
-#define SETTINGSPATHS_H
-
-class QString;
-
-
-class SettingsPaths
-{
-public:
- static void init();
- static const QString getApplicationBinaryPath();
- static const QString getSettingsPath();
- static const QString getGlobalFilesPath();
- static const QString getIndenterPath();
- static const QString getTempPath();
- static bool getPortableMode();
- static void cleanAndRemoveTempDir();
-
-private:
- SettingsPaths();
-
- static bool _alreadyInitialized;
- static QString _applicationBinaryPath;
- static QString _settingsPath;
- static QString _globalFilesPath;
- static QString _indenterPath;
- static QString _tempPath;
- static bool _portableMode;
-};
-
-#endif // SETTINGSPATHS_H
+/*************************************************************************** + * Copyright (C) 2006-2012 by Thomas Schweitzer * + * thomas-schweitzer(at)arcor.de * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License version 2.0 as * + * published by the Free Software Foundation. * + * * + * 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 in the file LICENSE.GPL; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef SETTINGSPATHS_H +#define SETTINGSPATHS_H + +class QString; + + +class SettingsPaths +{ +public: + static void init(); + static const QString getApplicationBinaryPath(); + static const QString getSettingsPath(); + static const QString getGlobalFilesPath(); + static const QString getIndenterPath(); + static const QString getTempPath(); + static bool getPortableMode(); + static void cleanAndRemoveTempDir(); + +private: + SettingsPaths(); + + static bool _alreadyInitialized; + static QString _applicationBinaryPath; + static QString _settingsPath; + static QString _globalFilesPath; + static QString _indenterPath; + static QString _tempPath; + static bool _portableMode; +}; + +#endif // SETTINGSPATHS_H diff --git a/src/TemplateBatchScript.cpp b/src/TemplateBatchScript.cpp index 00c96ce..e8a91e8 100755 --- a/src/TemplateBatchScript.cpp +++ b/src/TemplateBatchScript.cpp @@ -20,7 +20,7 @@ #include "TemplateBatchScript.h" // Need to include QObject here so that platform specific defines like Q_OS_WIN32 are set. -#include <QObject> +#include <tqobject.h> /*! \brief The only and static function of this class returns a batch or shell script diff --git a/src/TemplateBatchScript.h b/src/TemplateBatchScript.h index ff14ade..4a71a11 100755 --- a/src/TemplateBatchScript.h +++ b/src/TemplateBatchScript.h @@ -1,31 +1,31 @@ -/***************************************************************************
- * Copyright (C) 2006-2012 by Thomas Schweitzer *
- * thomas-schweitzer(at)arcor.de *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License version 2.0 as *
- * published by the Free Software Foundation. *
- * *
- * 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 in the file LICENSE.GPL; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#ifndef TEMPLATEBATCHSCRIPT_H
-#define TEMPLATEBATCHSCRIPT_H
-
-class TemplateBatchScript
-{
-private:
- TemplateBatchScript();
-public:
- static const char* getTemplateBatchScript();
-};
-
-#endif // TEMPLATEBATCHSCRIPT_H
+/*************************************************************************** + * Copyright (C) 2006-2012 by Thomas Schweitzer * + * thomas-schweitzer(at)arcor.de * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License version 2.0 as * + * published by the Free Software Foundation. * + * * + * 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 in the file LICENSE.GPL; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef TEMPLATEBATCHSCRIPT_H +#define TEMPLATEBATCHSCRIPT_H + +class TemplateBatchScript +{ +private: + TemplateBatchScript(); +public: + static const char* getTemplateBatchScript(); +}; + +#endif // TEMPLATEBATCHSCRIPT_H diff --git a/src/UiGuiErrorMessage.cpp b/src/UiGuiErrorMessage.cpp index 424a709..63aed21 100755 --- a/src/UiGuiErrorMessage.cpp +++ b/src/UiGuiErrorMessage.cpp @@ -19,7 +19,7 @@ #include "UiGuiErrorMessage.h" -#include <QCheckBox> +#include <tqcheckbox.h> /*! \class UiGuiErrorMessage diff --git a/src/UiGuiErrorMessage.h b/src/UiGuiErrorMessage.h index f520795..ce5b405 100755 --- a/src/UiGuiErrorMessage.h +++ b/src/UiGuiErrorMessage.h @@ -1,43 +1,43 @@ -/***************************************************************************
- * Copyright (C) 2006-2012 by Thomas Schweitzer *
- * thomas-schweitzer(at)arcor.de *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License version 2.0 as *
- * published by the Free Software Foundation. *
- * *
- * 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 in the file LICENSE.GPL; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#ifndef UIGUIERRORMESSAGE_H
-#define UIGUIERRORMESSAGE_H
-
-#include <QErrorMessage>
-
-class QCheckBox;
-
-
-class UiGuiErrorMessage : public QErrorMessage
-{
- Q_OBJECT
-
-public:
- UiGuiErrorMessage(QWidget *parent = 0);
- ~UiGuiErrorMessage(void);
- void showMessage( const QString &message );
- void showMessage( const QString &title, const QString &message );
-
-private:
- QCheckBox *_showAgainCheckBox;
- QStringList _errorMessageList;
-};
-
-#endif // UIGUIERRORMESSAGE_H
+/*************************************************************************** + * Copyright (C) 2006-2012 by Thomas Schweitzer * + * thomas-schweitzer(at)arcor.de * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License version 2.0 as * + * published by the Free Software Foundation. * + * * + * 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 in the file LICENSE.GPL; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef UIGUIERRORMESSAGE_H +#define UIGUIERRORMESSAGE_H + +#include <tqerrormessage.h> + +class QCheckBox; + + +class UiGuiErrorMessage : public QErrorMessage +{ + Q_OBJECT + +public: + UiGuiErrorMessage(QWidget *parent = 0); + ~UiGuiErrorMessage(void); + void showMessage( const QString &message ); + void showMessage( const QString &title, const QString &message ); + +private: + QCheckBox *_showAgainCheckBox; + QStringList _errorMessageList; +}; + +#endif // UIGUIERRORMESSAGE_H diff --git a/src/UiGuiHighlighter.cpp b/src/UiGuiHighlighter.cpp index ac74909..e35a8ec 100755 --- a/src/UiGuiHighlighter.cpp +++ b/src/UiGuiHighlighter.cpp @@ -21,10 +21,10 @@ #include "SettingsPaths.h" -#include <QSettings> -#include <QMenu> -#include <QScrollBar> -#include <QCoreApplication> +#include <tqsettings.h> +#include <tqmenu.h> +#include <tqscrollbar.h> +#include <tqcoreapplication.h> #include <Qsci/qsciscintilla.h> #include <Qsci/qscilexer.h> diff --git a/src/UiGuiHighlighter.h b/src/UiGuiHighlighter.h index d0d60d4..4ac0f35 100755 --- a/src/UiGuiHighlighter.h +++ b/src/UiGuiHighlighter.h @@ -20,10 +20,10 @@ #ifndef UIGUIHIGHLIGHTER_H #define UIGUIHIGHLIGHTER_H -#include <QObject> -#include <QMap> -#include <QFont> -#include <QColor> +#include <tqobject.h> +#include <tqmap.h> +#include <tqfont.h> +#include <tqcolor.h> class QAction; class QSettings; diff --git a/src/UiGuiIndentServer.cpp b/src/UiGuiIndentServer.cpp index 0dfc93f..8a93094 100755 --- a/src/UiGuiIndentServer.cpp +++ b/src/UiGuiIndentServer.cpp @@ -19,10 +19,10 @@ #include "UiGuiIndentServer.h" -#include <QTcpServer> -#include <QTcpSocket> -#include <QMessageBox> -#include <QtDebug> +#include <tqtcpserver.h> +#include <tqtcpsocket.h> +#include <tqmessagebox.h> +#include <tqtdebug.h> //! \defgroup grp_Server All concerning the server component. diff --git a/src/UiGuiIndentServer.h b/src/UiGuiIndentServer.h index 837693a..79f4606 100755 --- a/src/UiGuiIndentServer.h +++ b/src/UiGuiIndentServer.h @@ -1,55 +1,55 @@ -/***************************************************************************
- * Copyright (C) 2006-2012 by Thomas Schweitzer *
- * thomas-schweitzer(at)arcor.de *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License version 2.0 as *
- * published by the Free Software Foundation. *
- * *
- * 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 in the file LICENSE.GPL; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#ifndef UIGUIINDENTSERVER_H
-#define UIGUIINDENTSERVER_H
-
-#include <QObject>
-
-class QTcpServer;
-class QTcpSocket;
-
-
-class UiGuiIndentServer : public QObject
-{
- Q_OBJECT
-
-public:
- UiGuiIndentServer(void);
- ~UiGuiIndentServer(void);
-
-public slots:
- void startServer();
- void stopServer();
-
-private slots:
- void handleNewConnection();
- void handleReceivedData();
- void sendMessage(const QString &message);
- void checkIfReadyForHandleRequest();
-
-private:
- QTcpServer *_tcpServer;
- QByteArray _dataToSend;
- bool _readyForHandleRequest;
- QTcpSocket *_currentClientConnection;
- quint32 _blockSize;
-};
-
-#endif // UIGUIINDENTSERVER_H
+/*************************************************************************** + * Copyright (C) 2006-2012 by Thomas Schweitzer * + * thomas-schweitzer(at)arcor.de * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License version 2.0 as * + * published by the Free Software Foundation. * + * * + * 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 in the file LICENSE.GPL; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef UIGUIINDENTSERVER_H +#define UIGUIINDENTSERVER_H + +#include <tqobject.h> + +class QTcpServer; +class QTcpSocket; + + +class UiGuiIndentServer : public QObject +{ + Q_OBJECT + +public: + UiGuiIndentServer(void); + ~UiGuiIndentServer(void); + +public slots: + void startServer(); + void stopServer(); + +private slots: + void handleNewConnection(); + void handleReceivedData(); + void sendMessage(const QString &message); + void checkIfReadyForHandleRequest(); + +private: + QTcpServer *_tcpServer; + QByteArray _dataToSend; + bool _readyForHandleRequest; + QTcpSocket *_currentClientConnection; + quint32 _blockSize; +}; + +#endif // UIGUIINDENTSERVER_H diff --git a/src/UiGuiIniFileParser.cpp b/src/UiGuiIniFileParser.cpp index 84542e0..9e1a023 100755 --- a/src/UiGuiIniFileParser.cpp +++ b/src/UiGuiIniFileParser.cpp @@ -19,10 +19,10 @@ #include "UiGuiIniFileParser.h" -#include <QFile> -#include <QStringList> -#include <QVariant> -#include <QTextStream> +#include <tqfile.h> +#include <tqstringlist.h> +#include <tqvariant.h> +#include <tqtextstream.h> //! \defgroup grp_Settings All concerning applications settings. diff --git a/src/UiGuiIniFileParser.h b/src/UiGuiIniFileParser.h index cbbc3c9..84c19a7 100755 --- a/src/UiGuiIniFileParser.h +++ b/src/UiGuiIniFileParser.h @@ -1,52 +1,52 @@ -/***************************************************************************
- * Copyright (C) 2006-2012 by Thomas Schweitzer *
- * thomas-schweitzer(at)arcor.de *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License version 2.0 as *
- * published by the Free Software Foundation. *
- * *
- * 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 in the file LICENSE.GPL; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#ifndef UIGUIINIFILEPARSER_H
-#define UIGUIINIFILEPARSER_H
-
-#include <QMap>
-#include <QString>
-
-#include <vector>
-
-class QStringList;
-class QVariant;
-
-
-class UiGuiIniFileParser
-{
-public:
- UiGuiIniFileParser(void);
- UiGuiIniFileParser(const QString &iniFileName);
- ~UiGuiIniFileParser(void);
- QVariant value(const QString &keyName, const QString &defaultValue = "");
- QStringList childGroups();
-
-protected:
- void init();
-
-private:
- void parseIniFile();
-
- QString _iniFileName;
- std::vector<QString> _sections;
- QMap<QString, QVariant> _keyValueMap;
-};
-
-#endif // UIGUIINIFILEPARSER_H
+/*************************************************************************** + * Copyright (C) 2006-2012 by Thomas Schweitzer * + * thomas-schweitzer(at)arcor.de * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License version 2.0 as * + * published by the Free Software Foundation. * + * * + * 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 in the file LICENSE.GPL; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef UIGUIINIFILEPARSER_H +#define UIGUIINIFILEPARSER_H + +#include <tqmap.h> +#include <tqstring.h> + +#include <vector> + +class QStringList; +class QVariant; + + +class UiGuiIniFileParser +{ +public: + UiGuiIniFileParser(void); + UiGuiIniFileParser(const QString &iniFileName); + ~UiGuiIniFileParser(void); + QVariant value(const QString &keyName, const QString &defaultValue = ""); + QStringList childGroups(); + +protected: + void init(); + +private: + void parseIniFile(); + + QString _iniFileName; + std::vector<QString> _sections; + QMap<QString, QVariant> _keyValueMap; +}; + +#endif // UIGUIINIFILEPARSER_H diff --git a/src/UiGuiSettings.cpp b/src/UiGuiSettings.cpp index f997ec3..5d8349b 100755 --- a/src/UiGuiSettings.cpp +++ b/src/UiGuiSettings.cpp @@ -1,688 +1,688 @@ -/***************************************************************************
-* Copyright (C) 2006-2012 by Thomas Schweitzer *
-* thomas-schweitzer(at)arcor.de *
-* *
-* This program is free software; you can redistribute it and/or modify *
-* it under the terms of the GNU General Public License version 2.0 as *
-* published by the Free Software Foundation. *
-* *
-* 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 in the file LICENSE.GPL; if not, write to the *
-* Free Software Foundation, Inc., *
-* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
-***************************************************************************/
-
-#include "UiGuiSettings.h"
-
-#include "SettingsPaths.h"
-
-#include <QSettings>
-#include <QPoint>
-#include <QSize>
-#include <QDir>
-#include <QDate>
-#include <QStringList>
-#include <QCoreApplication>
-#include <QMetaMethod>
-#include <QMetaProperty>
-#include <QWidget>
-
-//! \defgroup grp_Settings All concerning the settings.
-
-/*!
- \class UiGuiSettings
- \ingroup grp_Settings
- \brief Handles the settings of the program. Reads them on startup and saves them on exit.
- Is a singleton class and can only be accessed via getInstance().
-*/
-
-// Inits the single class instance pointer.
-QWeakPointer<UiGuiSettings> UiGuiSettings::_instance;
-
-
-/*!
- \brief The constructor for the settings.
-*/
-UiGuiSettings::UiGuiSettings() : QObject() {
- // Create the main application settings object from the UniversalIndentGUI.ini file.
- _qsettings = new QSettings(SettingsPaths::getSettingsPath() + "/UniversalIndentGUI.ini", QSettings::IniFormat, this);
-
- _indenterDirctoryStr = SettingsPaths::getGlobalFilesPath() + "/indenters";
- readAvailableTranslations();
- initSettings();
-}
-
-
-/*!
- \brief Returns the instance of the settings class. If no instance exists, ONE will be created.
- */
-QSharedPointer<UiGuiSettings> UiGuiSettings::getInstance() {
- QSharedPointer<UiGuiSettings> sharedInstance = _instance.toStrongRef();
- if ( sharedInstance.isNull() ) {
- // Create the settings object, which loads all UiGui settings from a file.
- sharedInstance = QSharedPointer<UiGuiSettings>(new UiGuiSettings());
- _instance = sharedInstance.toWeakRef();
- }
-
- return sharedInstance;
-}
-
-
-/*!
- \brief The destructor saves the settings to a file.
- */
-UiGuiSettings::~UiGuiSettings() {
- // Convert the language setting from an integer index to a string.
- int index = _qsettings->value("UniversalIndentGUI/language", 0).toInt();
- if ( index < 0 || index >= _availableTranslations.size() )
- index = 0;
-
- _qsettings->setValue( "UniversalIndentGUI/language", _availableTranslations.at(index) );
-}
-
-
-/*!
- \brief Scans the translations directory for available translation files and
- stores them in the QList \a _availableTranslations.
- */
-void UiGuiSettings::readAvailableTranslations() {
- QString languageShort;
- QStringList languageFileList;
-
- // English is the default language. A translation file does not exist but to have a menu entry, added here.
- languageFileList << "universalindent_en.qm";
-
- // Find all translation files in the "translations" directory.
- QDir translationDirectory = QDir( SettingsPaths::getGlobalFilesPath() + "/translations" );
- languageFileList << translationDirectory.entryList( QStringList("universalindent_*.qm") );
-
- // Loop for each found translation file
- foreach ( languageShort, languageFileList ) {
- // Remove the leading string "universalindent_" from the filename.
- languageShort.remove(0,16);
- // Remove trailing file extension ".qm".
- languageShort.chop(3);
-
- _availableTranslations.append(languageShort);
- }
-}
-
-
-/*!
- \brief Returns a list of the mnemonics of the available translations.
- */
-QStringList UiGuiSettings::getAvailableTranslations() {
- return _availableTranslations;
-}
-
-
-/*!
- \brief Returns the value of the by \a settingsName defined setting as QVariant.
-
- If the named setting does not exist, 0 is being returned.
-*/
-QVariant UiGuiSettings::getValueByName(QString settingName) {
- return _qsettings->value("UniversalIndentGUI/" + settingName);
-}
-
-
-/*!
- \brief Loads the settings for the main application.
-
- Settings are for example last selected indenter, last loaded source code file and so on.
-*/
-bool UiGuiSettings::initSettings()
-{
- // Read the version string saved in the settings file.
- _qsettings->setValue( "UniversalIndentGUI/version", _qsettings->value("UniversalIndentGUI/version", "") );
-
- // Read windows last size and position from the settings file.
- _qsettings->setValue( "UniversalIndentGUI/maximized", _qsettings->value("UniversalIndentGUI/maximized", false) );
- _qsettings->setValue( "UniversalIndentGUI/position", _qsettings->value("UniversalIndentGUI/position", QPoint(50, 50)) );
- _qsettings->setValue( "UniversalIndentGUI/size", _qsettings->value("UniversalIndentGUI/size", QSize(800, 600)) );
-
- // Read last selected encoding for the opened source code file.
- _qsettings->setValue( "UniversalIndentGUI/encoding", _qsettings->value("UniversalIndentGUI/encoding", "UTF-8") );
-
- // Read maximum length of list for recently opened files.
- _qsettings->setValue( "UniversalIndentGUI/recentlyOpenedListSize", _qsettings->value("UniversalIndentGUI/recentlyOpenedListSize", 5) );
-
- // Read if last opened source code file should be loaded on startup.
- _qsettings->setValue( "UniversalIndentGUI/loadLastSourceCodeFileOnStartup", _qsettings->value("UniversalIndentGUI/loadLastSourceCodeFileOnStartup", true) );
-
- // Read last opened source code file from the settings file.
- _qsettings->setValue( "UniversalIndentGUI/lastSourceCodeFile", _qsettings->value("UniversalIndentGUI/lastSourceCodeFile", _indenterDirctoryStr+"/example.cpp") );
-
- // Read last selected indenter from the settings file.
- int selectedIndenter = _qsettings->value("UniversalIndentGUI/selectedIndenter", 0).toInt();
- if ( selectedIndenter < 0 ) {
- selectedIndenter = 0;
- }
- _qsettings->setValue( "UniversalIndentGUI/selectedIndenter", selectedIndenter );
-
- // Read if syntax highlighting is enabled.
- _qsettings->setValue( "UniversalIndentGUI/SyntaxHighlightingEnabled", _qsettings->value("UniversalIndentGUI/SyntaxHighlightingEnabled", true) );
-
- // Read if white space characters should be displayed.
- _qsettings->setValue( "UniversalIndentGUI/whiteSpaceIsVisible", _qsettings->value("UniversalIndentGUI/whiteSpaceIsVisible", false) );
-
- // Read if indenter parameter tool tips are enabled.
- _qsettings->setValue( "UniversalIndentGUI/indenterParameterTooltipsEnabled", _qsettings->value("UniversalIndentGUI/indenterParameterTooltipsEnabled", true) );
-
- // Read the tab width from the settings file.
- _qsettings->setValue( "UniversalIndentGUI/tabWidth", _qsettings->value("UniversalIndentGUI/tabWidth", 4) );
-
- // Read the last selected language and stores the index it has in the list of available translations.
- _qsettings->setValue( "UniversalIndentGUI/language", _availableTranslations.indexOf( _qsettings->value("UniversalIndentGUI/language", "").toString() ) );
-
- // Read the update check settings from the settings file.
- _qsettings->setValue( "UniversalIndentGUI/CheckForUpdate", _qsettings->value("UniversalIndentGUI/CheckForUpdate", false) );
- _qsettings->setValue( "UniversalIndentGUI/LastUpdateCheck", _qsettings->value("UniversalIndentGUI/LastUpdateCheck", QDate(1900,1,1)) );
-
- // Read the main window state.
- _qsettings->setValue( "UniversalIndentGUI/MainWindowState", _qsettings->value("UniversalIndentGUI/MainWindowState", QByteArray()) );
-
- return true;
-}
-
-
-/*!
- \brief Register the by \a propertyName defined property of \a obj to be connected to the setting defined by \a settingName.
-
- The \a propertyName must be one of those that are listed in the Qt "Properties" documentation section of a Qt Object.
- All further needed info is retrieved via the \a obj's MetaObject, like the to the property bound signal.
- */
-bool UiGuiSettings::registerObjectProperty( QObject *obj, const QString &propertyName, const QString &settingName )
-{
- const QMetaObject *metaObject = obj->metaObject();
- bool connectSuccess = false;
-
- // Connect to the objects destroyed signal, so that it will be correctly unregistered.
- connectSuccess = connect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterObjectProperty(QObject*)));
-
- int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) );
- if ( connectSuccess && indexOfProp > -1 ) {
- QMetaProperty mProp = metaObject->property(indexOfProp);
-
- // Connect to the property's value changed signal.
- if ( mProp.hasNotifySignal() ) {
- QMetaMethod signal = mProp.notifySignal();
- //QString teststr = qPrintable(SIGNAL() + QString(signal.signature()));
- // The command "SIGNAL() + QString(signal.signature())" assembles the signal methods signature to a valid Qt SIGNAL.
- connectSuccess = connect(obj, qPrintable(SIGNAL() + QString(signal.signature())), this, SLOT(handleObjectPropertyChange()));
- }
-
- if ( connectSuccess ) {
- _registeredObjectProperties[obj] = QStringList() << propertyName << settingName;
- }
- else {
- //TODO: Write a debug warning to the log.
- disconnect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterObjectProperty(QObject*)));
- return false;
- }
-
- // If setting already exists, set the objects property to the setting value.
- if ( _qsettings->contains("UniversalIndentGUI/" + settingName) ) {
- mProp.write(obj, _qsettings->value("UniversalIndentGUI/" + settingName));
- }
- // Otherwise add the setting and set it to the value of the objects property.
- else {
- _qsettings->setValue("UniversalIndentGUI/" + settingName, mProp.read(obj));
- }
- }
- else {
- //TODO: Write a debug warning to the log.
- disconnect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterObjectProperty(QObject*)));
- return false;
- }
-
- return true;
-}
-
-
-/*!
- \brief Searches the child QObjects of \a obj for a property name and setting name definition within
- their custom properties and registers this property name to that setting name if both were found.
-
- The custom properties, for which are searched, are "connectedPropertyName" and "connectedSettingName",
- where "connectedPropertyName" is the name of a QObject property as it is documented in the QtDocs, and
- "connectedSettingName" is the name of a setting here within UiGuiSettings. If the mentioned setting
- name doesn't exist, it will be created.
-
- Returns true, if all found property and setting definitions could be successfully registered.
- Returns false, if any of those registrations fails.
- */
-bool UiGuiSettings::registerObjectPropertyRecursive(QObject *obj) {
- return checkCustomPropertiesAndCallFunction(obj, &UiGuiSettings::registerObjectProperty);
-}
-
-
-/*!
- \brief Assigns the by \a settingName defined setting value to the by \a propertyName defined property of \a obj.
-
- Returns true, if the value could be assigned, otherwise returns false, which is the case if settingName doesn't exist
- within the settings or if the mentioned propertyName wasn't found for the \a obj.
- */
-bool UiGuiSettings::setObjectPropertyToSettingValue( QObject *obj, const QString &propertyName, const QString &settingName )
-{
- const QMetaObject *metaObject = obj->metaObject();
-
- int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) );
- if ( indexOfProp > -1 ) {
- QMetaProperty mProp = metaObject->property(indexOfProp);
-
- // If setting already exists, set the objects property to the setting value.
- if ( _qsettings->contains("UniversalIndentGUI/" + settingName) ) {
- mProp.write(obj, _qsettings->value("UniversalIndentGUI/" + settingName));
- }
- // The setting didn't exist so return that setting the objects property failed.
- else {
- //TODO: Write a debug warning to the log.
- return false;
- }
- }
- else {
- //TODO: Write a debug warning to the log.
- return false;
- }
-
- return true;
-}
-
-
-/*!
- \brief Searches the child QObjects of \a obj for a property name and setting name definition within
- their custom properties and sets each property to settings value.
-
- The custom properties, for which are searched, are "connectedPropertyName" and "connectedSettingName",
- where "connectedPropertyName" is the name of a QObject property as it is documented in the QtDocs, and
- "connectedSettingName" is the name of a setting here within UiGuiSettings.
-
- Returns true, if all found property and setting definitions could be successfully registered.
- Returns false, if any of those registrations fails.
- */
-bool UiGuiSettings::setObjectPropertyToSettingValueRecursive(QObject *obj) {
- return checkCustomPropertiesAndCallFunction(obj, &UiGuiSettings::setObjectPropertyToSettingValue);
-}
-
-
-/*!
- \brief Assigns the by \a propertyName defined property's value of \a obj to the by \a settingName defined setting.
-
- If the \a settingName didn't exist yet, it will be created.
-
- Returns true, if the value could be assigned, otherwise returns false, which is the case if the mentioned
- propertyName wasn't found for the \a obj.
- */
-bool UiGuiSettings::setSettingToObjectPropertyValue( QObject *obj, const QString &propertyName, const QString &settingName )
-{
- const QMetaObject *metaObject = obj->metaObject();
-
- int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) );
- if ( indexOfProp > -1 ) {
- QMetaProperty mProp = metaObject->property(indexOfProp);
-
- setValueByName(settingName, mProp.read(obj));
- }
- else {
- //TODO: Write a debug warning to the log.
- return false;
- }
-
- return true;
-}
-
-
-/*!
- \brief Searches the child QObjects of \a obj for a property name and setting name definition within
- their custom properties and sets each setting to the property value.
-
- The custom properties, for which are searched, are "connectedPropertyName" and "connectedSettingName",
- where "connectedPropertyName" is the name of a QObject property as it is documented in the QtDocs, and
- "connectedSettingName" is the name of a setting here within UiGuiSettings. If the settingName
- didn't exist yet, it will be created.
-
- Returns true, if all found property and setting definitions could be successfully registered.
- Returns false, if any of those registrations fails.
- */
-bool UiGuiSettings::setSettingToObjectPropertyValueRecursive(QObject *obj) {
- return checkCustomPropertiesAndCallFunction(obj, &UiGuiSettings::setSettingToObjectPropertyValue);
-}
-
-
-/*!
- \brief Iterates over all \a objs child QObjects and checks whether they have the custom properties
- "connectedPropertyName" and "connectedSettingName" set. If both are set, it invokes the \a callBackFunc
- with both.
- */
-bool UiGuiSettings::checkCustomPropertiesAndCallFunction(QObject *obj, bool (UiGuiSettings::*callBackFunc)(QObject *obj, const QString &propertyName, const QString &settingName)) {
- bool success = true;
-
- // Find all widgets that have PropertyName and SettingName defined in their style sheet.
- QList<QObject *> allObjects = obj->findChildren<QObject *>();
- foreach (QObject *object, allObjects) {
- QString propertyName = object->property("connectedPropertyName").toString();
- QString settingName = object->property("connectedSettingName").toString();
-
- // If property and setting name were found, register that widget with the settings.
- if ( !propertyName.isEmpty() && !settingName.isEmpty() ) {
- success &= (this->*callBackFunc)( object, propertyName, settingName );
- }
- }
-
- return success;
-}
-
-
-/*!
- \brief The with a certain property registered \a obj gets unregistered.
- */
-void UiGuiSettings::unregisterObjectProperty(QObject *obj) {
- if ( _registeredObjectProperties.contains(obj) ) {
- const QMetaObject *metaObject = obj->metaObject();
- QString propertyName = _registeredObjectProperties[obj].first();
- QString settingName = _registeredObjectProperties[obj].last();
-
- bool connectSuccess = false;
- int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) );
- if ( indexOfProp > -1 ) {
- QMetaProperty mProp = metaObject->property(indexOfProp);
-
- // Disconnect to the property's value changed signal.
- if ( mProp.hasNotifySignal() ) {
- QMetaMethod signal = mProp.notifySignal();
- // The command "SIGNAL() + QString(signal.signature())" assembles the signal methods signature to a valid Qt SIGNAL.
- connectSuccess = disconnect(obj, qPrintable(SIGNAL() + QString(signal.signature())), this, SLOT(handleObjectPropertyChange()));
- }
- }
- _registeredObjectProperties.remove(obj);
- }
-}
-
-
-/*!
- \brief Registers a slot form the \a obj by its \a slotName to be invoked, if the by \a settingName defined
- setting changes.
-
- The registered slot may have no parameters or exactly one. If it accepts one parameter, whenever the setting
- \a settingName changes the slot gets tried to be invoked with the settings value as parameter. This only works,
- if the slot parameter is of the same type as the setting.
- */
-bool UiGuiSettings::registerObjectSlot(QObject *obj, const QString &slotName, const QString &settingName) {
-
- const QMetaObject *metaObject = obj->metaObject();
-
- bool connectSuccess = false;
- // Connect to the objects destroyed signal, so that it will be correctly unregistered.
- connectSuccess = connect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterObjectSlot(QObject*)));
-
- QString normalizedSlotName = QMetaObject::normalizedSignature( qPrintable(slotName) );
- int indexOfMethod = metaObject->indexOfMethod( qPrintable(normalizedSlotName) );
- if ( connectSuccess && indexOfMethod > -1 ) {
- QMetaMethod mMethod = metaObject->method(indexOfMethod);
- //QMetaMethod::Access access = mMethod.access();
- //QMetaMethod::MethodType methType = mMethod.methodType();
-
- // Since the method can at maximum be invoked with the setting value as argument,
- // only methods taking max one argument are allowed.
- if ( mMethod.parameterTypes().size() <= 1 ) {
- _registeredObjectSlots.insert(obj, QStringList() << normalizedSlotName << settingName);
- }
- else {
- //TODO: Write a debug warning to the log.
- disconnect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterObjectSlot(QObject*)));
- return false;
- }
- }
- else {
- //TODO: Write a debug warning to the log.
- disconnect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterObjectSlot(QObject*)));
- return false;
- }
-
- return true;
-}
-
-
-/*!
- \brief If \a obj, \a slotName and \a settingName are given, that certain connection is unregistered.
- If only \a obj is given, all to this object registered slot-setting connections are unregistered.
- */
-void UiGuiSettings::unregisterObjectSlot(QObject *obj, const QString &slotName, const QString &settingName) {
- //const QMetaObject *metaObject = obj->metaObject();
- QString normalizedSlotName = QMetaObject::normalizedSignature( qPrintable(slotName) );
- QMutableMapIterator<QObject*, QStringList> it(_registeredObjectSlots);
- while (it.hasNext()) {
- it.next();
- if (it.key() == obj && slotName.isEmpty() && settingName.isEmpty())
- it.remove();
- else if (it.key() == obj && it.value().first() == slotName && it.value().last() == settingName)
- it.remove();
- }
-}
-
-
-/*!
- \brief This private slot gets invoked whenever a registered objects property changes
- and distributes the new value to all other to the same settingName registered objects.
- */
-void UiGuiSettings::handleObjectPropertyChange() {
- QObject *obj = QObject::sender();
- QString className = obj->metaObject()->className();
- const QMetaObject *metaObject = obj->metaObject();
- QString propertyName = _registeredObjectProperties[obj].first();
- QString settingName = _registeredObjectProperties[obj].last();
-
- int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) );
- if ( indexOfProp > -1 ) {
- QMetaProperty mProp = metaObject->property(indexOfProp);
- setValueByName(settingName, mProp.read(obj));
- }
-}
-
-
-/*!
- \brief Sets the setting defined by \a settingName to \a value.
-
- When setting a changed value, all to this settingName registered objects get
- the changed value set too.
- If the \a settingName didn't exist yet, it will be created.
- */
-void UiGuiSettings::setValueByName(const QString &settingName, const QVariant &value) {
- // Do the updating only, if the setting was really changed.
- if ( _qsettings->value("UniversalIndentGUI/" + settingName) != value ) {
- _qsettings->setValue("UniversalIndentGUI/" + settingName, value);
-
- // Set the new value for all registered object properties for settingName.
- for ( QMap<QObject*, QStringList>::ConstIterator it = _registeredObjectProperties.begin(); it != _registeredObjectProperties.end(); ++it ) {
- if ( it.value().last() == settingName ) {
- QObject *obj = it.key();
- const QMetaObject *metaObject = obj->metaObject();
- QString propertyName = it.value().first();
-
- int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) );
- if ( indexOfProp > -1 ) {
- QMetaProperty mProp = metaObject->property(indexOfProp);
- mProp.write(obj, value);
- }
- }
- }
-
- // Invoke all registered object methods for settingName.
- for ( QMap<QObject*, QStringList>::ConstIterator it = _registeredObjectSlots.begin(); it != _registeredObjectSlots.end(); ++it ) {
- if ( it.value().last() == settingName ) {
- QObject *obj = it.key();
- const QMetaObject *metaObject = obj->metaObject();
- QString slotName = it.value().first();
-
- int indexOfMethod = metaObject->indexOfMethod( qPrintable(slotName) );
- if ( indexOfMethod > -1 ) {
- QMetaMethod mMethod = metaObject->method(indexOfMethod);
- //QMetaMethod::Access access = mMethod.access();
- //QMetaMethod::MethodType methType = mMethod.methodType();
-
- bool success = false;
-
- // Handle registered slots taking one parameter.
- if ( mMethod.parameterTypes().size() == 1 ) {
- if ( mMethod.parameterTypes().first() == value.typeName() ) {
- success = invokeMethodWithValue(obj, mMethod, value);
- }
- }
- // Handle registered slots taking zero parameters.
- else {
- success = mMethod.invoke( obj, Qt::DirectConnection );
- }
-
- if ( success == false ) {
- // TODO: Write a warning to the log if no success.
- }
- }
- }
- }
- }
-}
-
-
-#include <QBitArray>
-#include <QBitmap>
-#include <QBrush>
-#include <QCursor>
-#include <QDateTime>
-#include <QFont>
-#include <QIcon>
-#include <QKeySequence>
-#include <QLocale>
-#include <QPalette>
-#include <QPen>
-#include <QSizePolicy>
-#include <QTextFormat>
-#include <QTextLength>
-#include <QUrl>
-#if QT_VERSION >= 0x040600
-#include <QMatrix4x4>
-#include <QVector2D>
-#endif
-
-bool UiGuiSettings::invokeMethodWithValue( QObject *obj, QMetaMethod mMethod, QVariant value )
-{
- switch (value.type()) {
- case QVariant::BitArray :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QBitArray, value.toBitArray()) );
- case QVariant::Bitmap :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QBitmap, value.value<QBitmap>()) );
- case QVariant::Bool :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(bool, value.toBool()) );
- case QVariant::Brush :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QBrush, value.value<QBrush>()) );
- case QVariant::ByteArray :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QByteArray, value.toByteArray()) );
- case QVariant::Char :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QChar, value.toChar()) );
- case QVariant::Color :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QColor, value.value<QColor>()) );
- case QVariant::Cursor :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QCursor, value.value<QCursor>()) );
- case QVariant::Date :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QDate, value.toDate()) );
- case QVariant::DateTime :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QDateTime, value.toDateTime()) );
- case QVariant::Double :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(double, value.toDouble()) );
- case QVariant::Font :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QFont, value.value<QFont>()) );
- case QVariant::Hash :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QVariantHash, value.toHash()) );
- case QVariant::Icon :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QIcon, value.value<QIcon>()) );
- case QVariant::Image :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QImage, value.value<QImage>()) );
- case QVariant::Int :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(int, value.toInt()) );
- case QVariant::KeySequence :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QKeySequence, value.value<QKeySequence>()) );
- case QVariant::Line :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QLine, value.toLine()) );
- case QVariant::LineF :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QLineF, value.toLineF()) );
- case QVariant::List :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QVariantList, value.toList()) );
- case QVariant::Locale :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QLocale, value.toLocale()) );
- case QVariant::LongLong :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(qlonglong, value.toLongLong()) );
- case QVariant::Map :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QVariantMap, value.toMap()) );
- case QVariant::Matrix :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QMatrix, value.value<QMatrix>()) );
- case QVariant::Transform :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QTransform, value.value<QTransform>()) );
-#if QT_VERSION >= 0x040600
- case QVariant::Matrix4x4 :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QMatrix4x4, value.value<QMatrix4x4>()) );
-#endif
- case QVariant::Palette :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QPalette, value.value<QPalette>()) );
- case QVariant::Pen :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QPen, value.value<QPen>()) );
- case QVariant::Pixmap :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QPixmap, value.value<QPixmap>()) );
- case QVariant::Point :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QPoint, value.toPoint()) );
- // case QVariant::PointArray :
- // return Q_ARG(QPointArray, value.value<QPointArray>()) );
- case QVariant::PointF :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QPointF, value.toPointF()) );
- case QVariant::Polygon :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QPolygon, value.value<QPolygon>()) );
-#if QT_VERSION >= 0x040600
- case QVariant::Quaternion :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QQuaternion, value.value<QQuaternion>()) );
-#endif
- case QVariant::Rect :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QRect, value.toRect()) );
- case QVariant::RectF :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QRectF, value.toRectF()) );
- case QVariant::RegExp :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QRegExp, value.toRegExp()) );
- case QVariant::Region :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QRegion, value.value<QRegion>()) );
- case QVariant::Size :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QSize, value.toSize()) );
- case QVariant::SizeF :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QSizeF, value.toSizeF()) );
- case QVariant::SizePolicy :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QSizePolicy, value.value<QSizePolicy>()) );
- case QVariant::String :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QString, value.toString()) );
- case QVariant::StringList :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QStringList, value.toStringList()) );
- case QVariant::TextFormat :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QTextFormat, value.value<QTextFormat>()) );
- case QVariant::TextLength :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QTextLength, value.value<QTextLength>()) );
- case QVariant::Time :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QTime, value.toTime()) );
- case QVariant::UInt :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(uint, value.toUInt()) );
- case QVariant::ULongLong :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(qulonglong, value.toULongLong()) );
- case QVariant::Url :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QUrl, value.toUrl()) );
-#if QT_VERSION >= 0x040600
- case QVariant::Vector2D :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QVector2D, value.value<QVector2D>()) );
- case QVariant::Vector3D :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QVector3D, value.value<QVector3D>()) );
- case QVariant::Vector4D :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QVector4D, value.value<QVector4D>()) );
-#endif
- default:
- return false;
- }
-}
+/*************************************************************************** +* Copyright (C) 2006-2012 by Thomas Schweitzer * +* thomas-schweitzer(at)arcor.de * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License version 2.0 as * +* published by the Free Software Foundation. * +* * +* 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 in the file LICENSE.GPL; if not, write to the * +* Free Software Foundation, Inc., * +* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +***************************************************************************/ + +#include "UiGuiSettings.h" + +#include "SettingsPaths.h" + +#include <tqsettings.h> +#include <tqpoint.h> +#include <tqsize.h> +#include <tqdir.h> +#include <tqdate.h> +#include <tqstringlist.h> +#include <tqcoreapplication.h> +#include <tqmetamethod.h> +#include <tqmetaproperty.h> +#include <tqwidget.h> + +//! \defgroup grp_Settings All concerning the settings. + +/*! + \class UiGuiSettings + \ingroup grp_Settings + \brief Handles the settings of the program. Reads them on startup and saves them on exit. + Is a singleton class and can only be accessed via getInstance(). +*/ + +// Inits the single class instance pointer. +QWeakPointer<UiGuiSettings> UiGuiSettings::_instance; + + +/*! + \brief The constructor for the settings. +*/ +UiGuiSettings::UiGuiSettings() : QObject() { + // Create the main application settings object from the UniversalIndentGUI.ini file. + _qsettings = new QSettings(SettingsPaths::getSettingsPath() + "/UniversalIndentGUI.ini", QSettings::IniFormat, this); + + _indenterDirctoryStr = SettingsPaths::getGlobalFilesPath() + "/indenters"; + readAvailableTranslations(); + initSettings(); +} + + +/*! + \brief Returns the instance of the settings class. If no instance exists, ONE will be created. + */ +QSharedPointer<UiGuiSettings> UiGuiSettings::getInstance() { + QSharedPointer<UiGuiSettings> sharedInstance = _instance.toStrongRef(); + if ( sharedInstance.isNull() ) { + // Create the settings object, which loads all UiGui settings from a file. + sharedInstance = QSharedPointer<UiGuiSettings>(new UiGuiSettings()); + _instance = sharedInstance.toWeakRef(); + } + + return sharedInstance; +} + + +/*! + \brief The destructor saves the settings to a file. + */ +UiGuiSettings::~UiGuiSettings() { + // Convert the language setting from an integer index to a string. + int index = _qsettings->value("UniversalIndentGUI/language", 0).toInt(); + if ( index < 0 || index >= _availableTranslations.size() ) + index = 0; + + _qsettings->setValue( "UniversalIndentGUI/language", _availableTranslations.at(index) ); +} + + +/*! + \brief Scans the translations directory for available translation files and + stores them in the QList \a _availableTranslations. + */ +void UiGuiSettings::readAvailableTranslations() { + QString languageShort; + QStringList languageFileList; + + // English is the default language. A translation file does not exist but to have a menu entry, added here. + languageFileList << "universalindent_en.qm"; + + // Find all translation files in the "translations" directory. + QDir translationDirectory = QDir( SettingsPaths::getGlobalFilesPath() + "/translations" ); + languageFileList << translationDirectory.entryList( QStringList("universalindent_*.qm") ); + + // Loop for each found translation file + foreach ( languageShort, languageFileList ) { + // Remove the leading string "universalindent_" from the filename. + languageShort.remove(0,16); + // Remove trailing file extension ".qm". + languageShort.chop(3); + + _availableTranslations.append(languageShort); + } +} + + +/*! + \brief Returns a list of the mnemonics of the available translations. + */ +QStringList UiGuiSettings::getAvailableTranslations() { + return _availableTranslations; +} + + +/*! + \brief Returns the value of the by \a settingsName defined setting as QVariant. + + If the named setting does not exist, 0 is being returned. +*/ +QVariant UiGuiSettings::getValueByName(QString settingName) { + return _qsettings->value("UniversalIndentGUI/" + settingName); +} + + +/*! + \brief Loads the settings for the main application. + + Settings are for example last selected indenter, last loaded source code file and so on. +*/ +bool UiGuiSettings::initSettings() +{ + // Read the version string saved in the settings file. + _qsettings->setValue( "UniversalIndentGUI/version", _qsettings->value("UniversalIndentGUI/version", "") ); + + // Read windows last size and position from the settings file. + _qsettings->setValue( "UniversalIndentGUI/maximized", _qsettings->value("UniversalIndentGUI/maximized", false) ); + _qsettings->setValue( "UniversalIndentGUI/position", _qsettings->value("UniversalIndentGUI/position", QPoint(50, 50)) ); + _qsettings->setValue( "UniversalIndentGUI/size", _qsettings->value("UniversalIndentGUI/size", QSize(800, 600)) ); + + // Read last selected encoding for the opened source code file. + _qsettings->setValue( "UniversalIndentGUI/encoding", _qsettings->value("UniversalIndentGUI/encoding", "UTF-8") ); + + // Read maximum length of list for recently opened files. + _qsettings->setValue( "UniversalIndentGUI/recentlyOpenedListSize", _qsettings->value("UniversalIndentGUI/recentlyOpenedListSize", 5) ); + + // Read if last opened source code file should be loaded on startup. + _qsettings->setValue( "UniversalIndentGUI/loadLastSourceCodeFileOnStartup", _qsettings->value("UniversalIndentGUI/loadLastSourceCodeFileOnStartup", true) ); + + // Read last opened source code file from the settings file. + _qsettings->setValue( "UniversalIndentGUI/lastSourceCodeFile", _qsettings->value("UniversalIndentGUI/lastSourceCodeFile", _indenterDirctoryStr+"/example.cpp") ); + + // Read last selected indenter from the settings file. + int selectedIndenter = _qsettings->value("UniversalIndentGUI/selectedIndenter", 0).toInt(); + if ( selectedIndenter < 0 ) { + selectedIndenter = 0; + } + _qsettings->setValue( "UniversalIndentGUI/selectedIndenter", selectedIndenter ); + + // Read if syntax highlighting is enabled. + _qsettings->setValue( "UniversalIndentGUI/SyntaxHighlightingEnabled", _qsettings->value("UniversalIndentGUI/SyntaxHighlightingEnabled", true) ); + + // Read if white space characters should be displayed. + _qsettings->setValue( "UniversalIndentGUI/whiteSpaceIsVisible", _qsettings->value("UniversalIndentGUI/whiteSpaceIsVisible", false) ); + + // Read if indenter parameter tool tips are enabled. + _qsettings->setValue( "UniversalIndentGUI/indenterParameterTooltipsEnabled", _qsettings->value("UniversalIndentGUI/indenterParameterTooltipsEnabled", true) ); + + // Read the tab width from the settings file. + _qsettings->setValue( "UniversalIndentGUI/tabWidth", _qsettings->value("UniversalIndentGUI/tabWidth", 4) ); + + // Read the last selected language and stores the index it has in the list of available translations. + _qsettings->setValue( "UniversalIndentGUI/language", _availableTranslations.indexOf( _qsettings->value("UniversalIndentGUI/language", "").toString() ) ); + + // Read the update check settings from the settings file. + _qsettings->setValue( "UniversalIndentGUI/CheckForUpdate", _qsettings->value("UniversalIndentGUI/CheckForUpdate", false) ); + _qsettings->setValue( "UniversalIndentGUI/LastUpdateCheck", _qsettings->value("UniversalIndentGUI/LastUpdateCheck", QDate(1900,1,1)) ); + + // Read the main window state. + _qsettings->setValue( "UniversalIndentGUI/MainWindowState", _qsettings->value("UniversalIndentGUI/MainWindowState", QByteArray()) ); + + return true; +} + + +/*! + \brief Register the by \a propertyName defined property of \a obj to be connected to the setting defined by \a settingName. + + The \a propertyName must be one of those that are listed in the Qt "Properties" documentation section of a Qt Object. + All further needed info is retrieved via the \a obj's MetaObject, like the to the property bound signal. + */ +bool UiGuiSettings::registerObjectProperty( QObject *obj, const QString &propertyName, const QString &settingName ) +{ + const QMetaObject *metaObject = obj->metaObject(); + bool connectSuccess = false; + + // Connect to the objects destroyed signal, so that it will be correctly unregistered. + connectSuccess = connect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterObjectProperty(QObject*))); + + int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) ); + if ( connectSuccess && indexOfProp > -1 ) { + QMetaProperty mProp = metaObject->property(indexOfProp); + + // Connect to the property's value changed signal. + if ( mProp.hasNotifySignal() ) { + QMetaMethod signal = mProp.notifySignal(); + //QString teststr = qPrintable(SIGNAL() + QString(signal.signature())); + // The command "SIGNAL() + QString(signal.signature())" assembles the signal methods signature to a valid Qt SIGNAL. + connectSuccess = connect(obj, qPrintable(SIGNAL() + QString(signal.signature())), this, SLOT(handleObjectPropertyChange())); + } + + if ( connectSuccess ) { + _registeredObjectProperties[obj] = QStringList() << propertyName << settingName; + } + else { + //TODO: Write a debug warning to the log. + disconnect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterObjectProperty(QObject*))); + return false; + } + + // If setting already exists, set the objects property to the setting value. + if ( _qsettings->contains("UniversalIndentGUI/" + settingName) ) { + mProp.write(obj, _qsettings->value("UniversalIndentGUI/" + settingName)); + } + // Otherwise add the setting and set it to the value of the objects property. + else { + _qsettings->setValue("UniversalIndentGUI/" + settingName, mProp.read(obj)); + } + } + else { + //TODO: Write a debug warning to the log. + disconnect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterObjectProperty(QObject*))); + return false; + } + + return true; +} + + +/*! + \brief Searches the child QObjects of \a obj for a property name and setting name definition within + their custom properties and registers this property name to that setting name if both were found. + + The custom properties, for which are searched, are "connectedPropertyName" and "connectedSettingName", + where "connectedPropertyName" is the name of a QObject property as it is documented in the QtDocs, and + "connectedSettingName" is the name of a setting here within UiGuiSettings. If the mentioned setting + name doesn't exist, it will be created. + + Returns true, if all found property and setting definitions could be successfully registered. + Returns false, if any of those registrations fails. + */ +bool UiGuiSettings::registerObjectPropertyRecursive(QObject *obj) { + return checkCustomPropertiesAndCallFunction(obj, &UiGuiSettings::registerObjectProperty); +} + + +/*! + \brief Assigns the by \a settingName defined setting value to the by \a propertyName defined property of \a obj. + + Returns true, if the value could be assigned, otherwise returns false, which is the case if settingName doesn't exist + within the settings or if the mentioned propertyName wasn't found for the \a obj. + */ +bool UiGuiSettings::setObjectPropertyToSettingValue( QObject *obj, const QString &propertyName, const QString &settingName ) +{ + const QMetaObject *metaObject = obj->metaObject(); + + int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) ); + if ( indexOfProp > -1 ) { + QMetaProperty mProp = metaObject->property(indexOfProp); + + // If setting already exists, set the objects property to the setting value. + if ( _qsettings->contains("UniversalIndentGUI/" + settingName) ) { + mProp.write(obj, _qsettings->value("UniversalIndentGUI/" + settingName)); + } + // The setting didn't exist so return that setting the objects property failed. + else { + //TODO: Write a debug warning to the log. + return false; + } + } + else { + //TODO: Write a debug warning to the log. + return false; + } + + return true; +} + + +/*! + \brief Searches the child QObjects of \a obj for a property name and setting name definition within + their custom properties and sets each property to settings value. + + The custom properties, for which are searched, are "connectedPropertyName" and "connectedSettingName", + where "connectedPropertyName" is the name of a QObject property as it is documented in the QtDocs, and + "connectedSettingName" is the name of a setting here within UiGuiSettings. + + Returns true, if all found property and setting definitions could be successfully registered. + Returns false, if any of those registrations fails. + */ +bool UiGuiSettings::setObjectPropertyToSettingValueRecursive(QObject *obj) { + return checkCustomPropertiesAndCallFunction(obj, &UiGuiSettings::setObjectPropertyToSettingValue); +} + + +/*! + \brief Assigns the by \a propertyName defined property's value of \a obj to the by \a settingName defined setting. + + If the \a settingName didn't exist yet, it will be created. + + Returns true, if the value could be assigned, otherwise returns false, which is the case if the mentioned + propertyName wasn't found for the \a obj. + */ +bool UiGuiSettings::setSettingToObjectPropertyValue( QObject *obj, const QString &propertyName, const QString &settingName ) +{ + const QMetaObject *metaObject = obj->metaObject(); + + int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) ); + if ( indexOfProp > -1 ) { + QMetaProperty mProp = metaObject->property(indexOfProp); + + setValueByName(settingName, mProp.read(obj)); + } + else { + //TODO: Write a debug warning to the log. + return false; + } + + return true; +} + + +/*! + \brief Searches the child QObjects of \a obj for a property name and setting name definition within + their custom properties and sets each setting to the property value. + + The custom properties, for which are searched, are "connectedPropertyName" and "connectedSettingName", + where "connectedPropertyName" is the name of a QObject property as it is documented in the QtDocs, and + "connectedSettingName" is the name of a setting here within UiGuiSettings. If the settingName + didn't exist yet, it will be created. + + Returns true, if all found property and setting definitions could be successfully registered. + Returns false, if any of those registrations fails. + */ +bool UiGuiSettings::setSettingToObjectPropertyValueRecursive(QObject *obj) { + return checkCustomPropertiesAndCallFunction(obj, &UiGuiSettings::setSettingToObjectPropertyValue); +} + + +/*! + \brief Iterates over all \a objs child QObjects and checks whether they have the custom properties + "connectedPropertyName" and "connectedSettingName" set. If both are set, it invokes the \a callBackFunc + with both. + */ +bool UiGuiSettings::checkCustomPropertiesAndCallFunction(QObject *obj, bool (UiGuiSettings::*callBackFunc)(QObject *obj, const QString &propertyName, const QString &settingName)) { + bool success = true; + + // Find all widgets that have PropertyName and SettingName defined in their style sheet. + QList<QObject *> allObjects = obj->findChildren<QObject *>(); + foreach (QObject *object, allObjects) { + QString propertyName = object->property("connectedPropertyName").toString(); + QString settingName = object->property("connectedSettingName").toString(); + + // If property and setting name were found, register that widget with the settings. + if ( !propertyName.isEmpty() && !settingName.isEmpty() ) { + success &= (this->*callBackFunc)( object, propertyName, settingName ); + } + } + + return success; +} + + +/*! + \brief The with a certain property registered \a obj gets unregistered. + */ +void UiGuiSettings::unregisterObjectProperty(QObject *obj) { + if ( _registeredObjectProperties.contains(obj) ) { + const QMetaObject *metaObject = obj->metaObject(); + QString propertyName = _registeredObjectProperties[obj].first(); + QString settingName = _registeredObjectProperties[obj].last(); + + bool connectSuccess = false; + int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) ); + if ( indexOfProp > -1 ) { + QMetaProperty mProp = metaObject->property(indexOfProp); + + // Disconnect to the property's value changed signal. + if ( mProp.hasNotifySignal() ) { + QMetaMethod signal = mProp.notifySignal(); + // The command "SIGNAL() + QString(signal.signature())" assembles the signal methods signature to a valid Qt SIGNAL. + connectSuccess = disconnect(obj, qPrintable(SIGNAL() + QString(signal.signature())), this, SLOT(handleObjectPropertyChange())); + } + } + _registeredObjectProperties.remove(obj); + } +} + + +/*! + \brief Registers a slot form the \a obj by its \a slotName to be invoked, if the by \a settingName defined + setting changes. + + The registered slot may have no parameters or exactly one. If it accepts one parameter, whenever the setting + \a settingName changes the slot gets tried to be invoked with the settings value as parameter. This only works, + if the slot parameter is of the same type as the setting. + */ +bool UiGuiSettings::registerObjectSlot(QObject *obj, const QString &slotName, const QString &settingName) { + + const QMetaObject *metaObject = obj->metaObject(); + + bool connectSuccess = false; + // Connect to the objects destroyed signal, so that it will be correctly unregistered. + connectSuccess = connect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterObjectSlot(QObject*))); + + QString normalizedSlotName = QMetaObject::normalizedSignature( qPrintable(slotName) ); + int indexOfMethod = metaObject->indexOfMethod( qPrintable(normalizedSlotName) ); + if ( connectSuccess && indexOfMethod > -1 ) { + QMetaMethod mMethod = metaObject->method(indexOfMethod); + //QMetaMethod::Access access = mMethod.access(); + //QMetaMethod::MethodType methType = mMethod.methodType(); + + // Since the method can at maximum be invoked with the setting value as argument, + // only methods taking max one argument are allowed. + if ( mMethod.parameterTypes().size() <= 1 ) { + _registeredObjectSlots.insert(obj, QStringList() << normalizedSlotName << settingName); + } + else { + //TODO: Write a debug warning to the log. + disconnect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterObjectSlot(QObject*))); + return false; + } + } + else { + //TODO: Write a debug warning to the log. + disconnect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterObjectSlot(QObject*))); + return false; + } + + return true; +} + + +/*! + \brief If \a obj, \a slotName and \a settingName are given, that certain connection is unregistered. + If only \a obj is given, all to this object registered slot-setting connections are unregistered. + */ +void UiGuiSettings::unregisterObjectSlot(QObject *obj, const QString &slotName, const QString &settingName) { + //const QMetaObject *metaObject = obj->metaObject(); + QString normalizedSlotName = QMetaObject::normalizedSignature( qPrintable(slotName) ); + QMutableMapIterator<QObject*, QStringList> it(_registeredObjectSlots); + while (it.hasNext()) { + it.next(); + if (it.key() == obj && slotName.isEmpty() && settingName.isEmpty()) + it.remove(); + else if (it.key() == obj && it.value().first() == slotName && it.value().last() == settingName) + it.remove(); + } +} + + +/*! + \brief This private slot gets invoked whenever a registered objects property changes + and distributes the new value to all other to the same settingName registered objects. + */ +void UiGuiSettings::handleObjectPropertyChange() { + QObject *obj = QObject::sender(); + QString className = obj->metaObject()->className(); + const QMetaObject *metaObject = obj->metaObject(); + QString propertyName = _registeredObjectProperties[obj].first(); + QString settingName = _registeredObjectProperties[obj].last(); + + int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) ); + if ( indexOfProp > -1 ) { + QMetaProperty mProp = metaObject->property(indexOfProp); + setValueByName(settingName, mProp.read(obj)); + } +} + + +/*! + \brief Sets the setting defined by \a settingName to \a value. + + When setting a changed value, all to this settingName registered objects get + the changed value set too. + If the \a settingName didn't exist yet, it will be created. + */ +void UiGuiSettings::setValueByName(const QString &settingName, const QVariant &value) { + // Do the updating only, if the setting was really changed. + if ( _qsettings->value("UniversalIndentGUI/" + settingName) != value ) { + _qsettings->setValue("UniversalIndentGUI/" + settingName, value); + + // Set the new value for all registered object properties for settingName. + for ( QMap<QObject*, QStringList>::ConstIterator it = _registeredObjectProperties.begin(); it != _registeredObjectProperties.end(); ++it ) { + if ( it.value().last() == settingName ) { + QObject *obj = it.key(); + const QMetaObject *metaObject = obj->metaObject(); + QString propertyName = it.value().first(); + + int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) ); + if ( indexOfProp > -1 ) { + QMetaProperty mProp = metaObject->property(indexOfProp); + mProp.write(obj, value); + } + } + } + + // Invoke all registered object methods for settingName. + for ( QMap<QObject*, QStringList>::ConstIterator it = _registeredObjectSlots.begin(); it != _registeredObjectSlots.end(); ++it ) { + if ( it.value().last() == settingName ) { + QObject *obj = it.key(); + const QMetaObject *metaObject = obj->metaObject(); + QString slotName = it.value().first(); + + int indexOfMethod = metaObject->indexOfMethod( qPrintable(slotName) ); + if ( indexOfMethod > -1 ) { + QMetaMethod mMethod = metaObject->method(indexOfMethod); + //QMetaMethod::Access access = mMethod.access(); + //QMetaMethod::MethodType methType = mMethod.methodType(); + + bool success = false; + + // Handle registered slots taking one parameter. + if ( mMethod.parameterTypes().size() == 1 ) { + if ( mMethod.parameterTypes().first() == value.typeName() ) { + success = invokeMethodWithValue(obj, mMethod, value); + } + } + // Handle registered slots taking zero parameters. + else { + success = mMethod.invoke( obj, Qt::DirectConnection ); + } + + if ( success == false ) { + // TODO: Write a warning to the log if no success. + } + } + } + } + } +} + + +#include <tqbitarray.h> +#include <tqbitmap.h> +#include <tqbrush.h> +#include <tqcursor.h> +#include <tqdatetime.h> +#include <tqfont.h> +#include <tqicon.h> +#include <tqkeysequence.h> +#include <tqlocale.h> +#include <tqpalette.h> +#include <tqpen.h> +#include <tqsizepolicy.h> +#include <tqtextformat.h> +#include <tqtextlength.h> +#include <tqurl.h> +#if QT_VERSION >= 0x040600 +#include <tqmatrix4x4.h> +#include <tqvector2d.h> +#endif + +bool UiGuiSettings::invokeMethodWithValue( QObject *obj, QMetaMethod mMethod, QVariant value ) +{ + switch (value.type()) { + case QVariant::BitArray : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QBitArray, value.toBitArray()) ); + case QVariant::Bitmap : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QBitmap, value.value<QBitmap>()) ); + case QVariant::Bool : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(bool, value.toBool()) ); + case QVariant::Brush : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QBrush, value.value<QBrush>()) ); + case QVariant::ByteArray : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QByteArray, value.toByteArray()) ); + case QVariant::Char : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QChar, value.toChar()) ); + case QVariant::Color : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QColor, value.value<QColor>()) ); + case QVariant::Cursor : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QCursor, value.value<QCursor>()) ); + case QVariant::Date : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QDate, value.toDate()) ); + case QVariant::DateTime : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QDateTime, value.toDateTime()) ); + case QVariant::Double : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(double, value.toDouble()) ); + case QVariant::Font : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QFont, value.value<QFont>()) ); + case QVariant::Hash : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QVariantHash, value.toHash()) ); + case QVariant::Icon : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QIcon, value.value<QIcon>()) ); + case QVariant::Image : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QImage, value.value<QImage>()) ); + case QVariant::Int : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(int, value.toInt()) ); + case QVariant::KeySequence : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QKeySequence, value.value<QKeySequence>()) ); + case QVariant::Line : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QLine, value.toLine()) ); + case QVariant::LineF : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QLineF, value.toLineF()) ); + case QVariant::List : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QVariantList, value.toList()) ); + case QVariant::Locale : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QLocale, value.toLocale()) ); + case QVariant::LongLong : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(qlonglong, value.toLongLong()) ); + case QVariant::Map : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QVariantMap, value.toMap()) ); + case QVariant::Matrix : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QMatrix, value.value<QMatrix>()) ); + case QVariant::Transform : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QTransform, value.value<QTransform>()) ); +#if QT_VERSION >= 0x040600 + case QVariant::Matrix4x4 : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QMatrix4x4, value.value<QMatrix4x4>()) ); +#endif + case QVariant::Palette : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QPalette, value.value<QPalette>()) ); + case QVariant::Pen : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QPen, value.value<QPen>()) ); + case QVariant::Pixmap : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QPixmap, value.value<QPixmap>()) ); + case QVariant::Point : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QPoint, value.toPoint()) ); + // case QVariant::PointArray : + // return Q_ARG(QPointArray, value.value<QPointArray>()) ); + case QVariant::PointF : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QPointF, value.toPointF()) ); + case QVariant::Polygon : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QPolygon, value.value<QPolygon>()) ); +#if QT_VERSION >= 0x040600 + case QVariant::Quaternion : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QQuaternion, value.value<QQuaternion>()) ); +#endif + case QVariant::Rect : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QRect, value.toRect()) ); + case QVariant::RectF : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QRectF, value.toRectF()) ); + case QVariant::RegExp : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QRegExp, value.toRegExp()) ); + case QVariant::Region : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QRegion, value.value<QRegion>()) ); + case QVariant::Size : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QSize, value.toSize()) ); + case QVariant::SizeF : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QSizeF, value.toSizeF()) ); + case QVariant::SizePolicy : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QSizePolicy, value.value<QSizePolicy>()) ); + case QVariant::String : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QString, value.toString()) ); + case QVariant::StringList : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QStringList, value.toStringList()) ); + case QVariant::TextFormat : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QTextFormat, value.value<QTextFormat>()) ); + case QVariant::TextLength : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QTextLength, value.value<QTextLength>()) ); + case QVariant::Time : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QTime, value.toTime()) ); + case QVariant::UInt : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(uint, value.toUInt()) ); + case QVariant::ULongLong : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(qulonglong, value.toULongLong()) ); + case QVariant::Url : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QUrl, value.toUrl()) ); +#if QT_VERSION >= 0x040600 + case QVariant::Vector2D : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QVector2D, value.value<QVector2D>()) ); + case QVariant::Vector3D : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QVector3D, value.value<QVector3D>()) ); + case QVariant::Vector4D : + return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QVector4D, value.value<QVector4D>()) ); +#endif + default: + return false; + } +} diff --git a/src/UiGuiSettings.h b/src/UiGuiSettings.h index 54f4dca..c818199 100755 --- a/src/UiGuiSettings.h +++ b/src/UiGuiSettings.h @@ -1,83 +1,83 @@ -/***************************************************************************
-* Copyright (C) 2006-2012 by Thomas Schweitzer *
-* thomas-schweitzer(at)arcor.de *
-* *
-* This program is free software; you can redistribute it and/or modify *
-* it under the terms of the GNU General Public License version 2.0 as *
-* published by the Free Software Foundation. *
-* *
-* 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 in the file LICENSE.GPL; if not, write to the *
-* Free Software Foundation, Inc., *
-* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
-***************************************************************************/
-
-#ifndef UIGUISETTINGS_H
-#define UIGUISETTINGS_H
-
-#include <QObject>
-#include <QStringList>
-#include <QMultiMap>
-#include <QSharedPointer>
-
-class QSettings;
-
-
-class UiGuiSettings : public QObject
-{
- Q_OBJECT
-private:
- UiGuiSettings();
- static QWeakPointer<UiGuiSettings> _instance;
-
-public:
- static QSharedPointer<UiGuiSettings> getInstance();
- ~UiGuiSettings();
-
- bool registerObjectProperty(QObject *obj, const QString &propertyName, const QString &settingName);
- bool registerObjectPropertyRecursive(QObject *obj);
- bool setObjectPropertyToSettingValue(QObject *obj, const QString &propertyName, const QString &settingName);
- bool setObjectPropertyToSettingValueRecursive(QObject *obj);
- bool setSettingToObjectPropertyValue(QObject *obj, const QString &propertyName, const QString &settingName);
- bool setSettingToObjectPropertyValueRecursive(QObject *obj);
- bool registerObjectSlot(QObject *obj, const QString &slotName, const QString &settingName);
- QVariant getValueByName(QString settingName);
- QStringList getAvailableTranslations();
-
-public slots:
- void setValueByName(const QString &settingName, const QVariant &value);
- void unregisterObjectProperty(QObject *obj);
- void unregisterObjectSlot(QObject *obj, const QString &slotName = "", const QString &settingName = "");
-
-protected:
- bool initSettings();
- bool invokeMethodWithValue(QObject *obj, QMetaMethod mMethod, QVariant value);
- bool checkCustomPropertiesAndCallFunction(QObject *obj, bool (UiGuiSettings::*callBackFunc)(QObject *obj, const QString &propertyName, const QString &settingName));
-
-private slots:
- void handleObjectPropertyChange();
-
-private:
- void readAvailableTranslations();
-
- //! Stores the mnemonics of the available translations.
- QStringList _availableTranslations;
-
- //! The settings file.
- QSettings *_qsettings;
-
- //! Maps an QObject to a string list containing the property name and the associated setting name.
- QMap<QObject*, QStringList> _registeredObjectProperties;
-
- //! Maps QObjects to a string list containing the method name and the associated setting name.
- QMultiMap<QObject*, QStringList> _registeredObjectSlots;
-
- QString _indenterDirctoryStr;
-};
-
-#endif // UIGUISETTINGS_H
+/*************************************************************************** +* Copyright (C) 2006-2012 by Thomas Schweitzer * +* thomas-schweitzer(at)arcor.de * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License version 2.0 as * +* published by the Free Software Foundation. * +* * +* 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 in the file LICENSE.GPL; if not, write to the * +* Free Software Foundation, Inc., * +* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +***************************************************************************/ + +#ifndef UIGUISETTINGS_H +#define UIGUISETTINGS_H + +#include <tqobject.h> +#include <tqstringlist.h> +#include <tqmultimap.h> +#include <tqsharedpointer.h> + +class QSettings; + + +class UiGuiSettings : public QObject +{ + Q_OBJECT +private: + UiGuiSettings(); + static QWeakPointer<UiGuiSettings> _instance; + +public: + static QSharedPointer<UiGuiSettings> getInstance(); + ~UiGuiSettings(); + + bool registerObjectProperty(QObject *obj, const QString &propertyName, const QString &settingName); + bool registerObjectPropertyRecursive(QObject *obj); + bool setObjectPropertyToSettingValue(QObject *obj, const QString &propertyName, const QString &settingName); + bool setObjectPropertyToSettingValueRecursive(QObject *obj); + bool setSettingToObjectPropertyValue(QObject *obj, const QString &propertyName, const QString &settingName); + bool setSettingToObjectPropertyValueRecursive(QObject *obj); + bool registerObjectSlot(QObject *obj, const QString &slotName, const QString &settingName); + QVariant getValueByName(QString settingName); + QStringList getAvailableTranslations(); + +public slots: + void setValueByName(const QString &settingName, const QVariant &value); + void unregisterObjectProperty(QObject *obj); + void unregisterObjectSlot(QObject *obj, const QString &slotName = "", const QString &settingName = ""); + +protected: + bool initSettings(); + bool invokeMethodWithValue(QObject *obj, QMetaMethod mMethod, QVariant value); + bool checkCustomPropertiesAndCallFunction(QObject *obj, bool (UiGuiSettings::*callBackFunc)(QObject *obj, const QString &propertyName, const QString &settingName)); + +private slots: + void handleObjectPropertyChange(); + +private: + void readAvailableTranslations(); + + //! Stores the mnemonics of the available translations. + QStringList _availableTranslations; + + //! The settings file. + QSettings *_qsettings; + + //! Maps an QObject to a string list containing the property name and the associated setting name. + QMap<QObject*, QStringList> _registeredObjectProperties; + + //! Maps QObjects to a string list containing the method name and the associated setting name. + QMultiMap<QObject*, QStringList> _registeredObjectSlots; + + QString _indenterDirctoryStr; +}; + +#endif // UIGUISETTINGS_H diff --git a/src/UiGuiSettingsDialog.h b/src/UiGuiSettingsDialog.h index 582d436..9f53262 100755 --- a/src/UiGuiSettingsDialog.h +++ b/src/UiGuiSettingsDialog.h @@ -20,7 +20,7 @@ #ifndef UIGUISETTINGSDIALOG_H #define UIGUISETTINGSDIALOG_H -#include <QDialog> +#include <tqdialog.h> #include "UiGuiSettings.h" diff --git a/src/UiGuiSystemInfo.cpp b/src/UiGuiSystemInfo.cpp index 6763bf8..b83a636 100755 --- a/src/UiGuiSystemInfo.cpp +++ b/src/UiGuiSystemInfo.cpp @@ -1,227 +1,227 @@ -/***************************************************************************
- * Copyright (C) 2006-2012 by Thomas Schweitzer *
- * thomas-schweitzer(at)arcor.de *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License version 2.0 as *
- * published by the Free Software Foundation. *
- * *
- * 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 in the file LICENSE.GPL; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#include "UiGuiSystemInfo.h"
-
-#include <QString>
-#include <QSysInfo>
-#include <QProcess>
-#include <QFile>
-
-UiGuiSystemInfo::UiGuiSystemInfo() {
-}
-
-
-/*!
- \brief Returns the operating system UiGUI is currently running on as one string.
-
- The String contains name and version of the os. E.g. Linux Ubuntu 9.04.
- */
-QString UiGuiSystemInfo::getOperatingSystem() {
- QString operatingSystemString = "";
-
-#if defined(Q_WS_WIN)
- switch ( QSysInfo::WindowsVersion ) {
- case QSysInfo::WV_32s :
- operatingSystemString = "Windows 3.1 with Win 32s";
- break;
- case QSysInfo::WV_95 :
- operatingSystemString = "Windows 95";
- break;
- case QSysInfo::WV_98 :
- operatingSystemString = "Windows 98";
- break;
- case QSysInfo::WV_Me :
- operatingSystemString = "Windows Me";
- break;
- case QSysInfo::WV_NT :
- operatingSystemString = "Windows NT (operating system version 4.0)";
- break;
- case QSysInfo::WV_2000 :
- operatingSystemString = "Windows 2000 (operating system version 5.0)";
- break;
- case QSysInfo::WV_XP :
- operatingSystemString = "Windows XP (operating system version 5.1)";
- break;
- case QSysInfo::WV_2003 :
- operatingSystemString = "Windows Server 2003, Windows Server 2003 R2, Windows Home Server, Windows XP Professional x64 Edition (operating system version 5.2)";
- break;
- case QSysInfo::WV_VISTA :
- operatingSystemString = "Windows Vista, Windows Server 2008 (operating system version 6.0)";
- break;
- case QSysInfo::WV_WINDOWS7 :
- operatingSystemString = "Windows 7 (operating system version 6.1)";
- break;
- case QSysInfo::WV_CE :
- operatingSystemString = "Windows CE";
- break;
- case QSysInfo::WV_CENET :
- operatingSystemString = "Windows CE .NET";
- break;
- case QSysInfo::WV_CE_5 :
- operatingSystemString = "Windows CE 5.x";
- break;
- case QSysInfo::WV_CE_6 :
- operatingSystemString = "Windows CE 6.x";
- break;
- default :
- operatingSystemString = "Unknown Windows operating system.";
- break;
- }
-#elif defined(Q_WS_MAC)
- switch ( QSysInfo::MacintoshVersion ) {
- case QSysInfo::MV_9 :
- operatingSystemString = "Mac OS 9 (unsupported)";
- break;
- case QSysInfo::MV_10_0 :
- operatingSystemString = "Mac OS X 10.0 Cheetah (unsupported)";
- break;
- case QSysInfo::MV_10_1 :
- operatingSystemString = "Mac OS X 10.1 Puma (unsupported)";
- break;
- case QSysInfo::MV_10_2 :
- operatingSystemString = "Mac OS X 10.2 Jaguar (unsupported)";
- break;
- case QSysInfo::MV_10_3 :
- operatingSystemString = "Mac OS X 10.3 Panther";
- break;
- case QSysInfo::MV_10_4 :
- operatingSystemString = "Mac OS X 10.4 Tiger";
- break;
- case QSysInfo::MV_10_5 :
- operatingSystemString = "Mac OS X 10.5 Leopard";
- break;
- case QSysInfo::MV_10_6 :
- operatingSystemString = "Mac OS X 10.6 Snow Leopard";
- break;
- case QSysInfo::MV_Unknown :
- operatingSystemString = "An unknown and currently unsupported platform";
- break;
- default :
- operatingSystemString = "Unknown Mac operating system.";
- break;
- }
-#else
- //TODO: Detect Unix, Linux etc. distro as described on http://www.novell.com/coolsolutions/feature/11251.html
- operatingSystemString = "Linux";
- QProcess process;
-
- process.start("uname -s");
- bool result = process.waitForFinished(1000);
- QString os = process.readAllStandardOutput().trimmed();
-
- process.start("uname -r");
- result = process.waitForFinished(1000);
- QString rev = process.readAllStandardOutput().trimmed();
-
- process.start("uname -m");
- result = process.waitForFinished(1000);
- QString mach = process.readAllStandardOutput().trimmed();
-
- if ( os == "SunOS" ) {
- os = "Solaris";
-
- process.start("uname -p");
- result = process.waitForFinished(1000);
- QString arch = process.readAllStandardOutput().trimmed();
-
- process.start("uname -v");
- result = process.waitForFinished(1000);
- QString timestamp = process.readAllStandardOutput().trimmed();
-
- operatingSystemString = os + " " + rev + " (" + arch + " " + timestamp + ")";
- }
- else if ( os == "AIX" ) {
- process.start("oslevel -r");
- result = process.waitForFinished(1000);
- QString oslevel = process.readAllStandardOutput().trimmed();
-
- operatingSystemString = os + "oslevel " + oslevel;
- }
- else if ( os == "Linux" ) {
- QString dist;
- QString pseudoname;
- QString kernel = rev;
-
- if ( QFile::exists("/etc/redhat-release") ) {
- dist = "RedHat";
-
- process.start("sh -c \"cat /etc/redhat-release | sed s/.*\\(// | sed s/\\)//\"");
- result = process.waitForFinished(1000);
- pseudoname = process.readAllStandardOutput().trimmed();
-
- process.start("sh -c \"cat /etc/redhat-release | sed s/.*release\\ // | sed s/\\ .*//\"");
- result = process.waitForFinished(1000);
- rev = process.readAllStandardOutput().trimmed();
- }
- else if ( QFile::exists("/etc/SUSE-release") ) {
- process.start("sh -c \"cat /etc/SUSE-release | tr '\\n' ' '| sed s/VERSION.*//\"");
- result = process.waitForFinished(1000);
- dist = process.readAllStandardOutput().trimmed();
-
- process.start("sh -c \"cat /etc/SUSE-release | tr '\\n' ' ' | sed s/.*=\\ //\"");
- result = process.waitForFinished(1000);
- rev = process.readAllStandardOutput().trimmed();
- }
- else if ( QFile::exists("/etc/mandrake-release") ) {
- dist = "Mandrake";
-
- process.start("sh -c \"cat /etc/mandrake-release | sed s/.*\\(// | sed s/\\)//\"");
- result = process.waitForFinished(1000);
- pseudoname = process.readAllStandardOutput().trimmed();
-
- process.start("sh -c \"cat /etc/mandrake-release | sed s/.*release\\ // | sed s/\\ .*//\"");
- result = process.waitForFinished(1000);
- rev = process.readAllStandardOutput().trimmed();
- }
- else if ( QFile::exists("/etc/lsb-release") ) {
- dist = "Ubuntu";
-
- QString processCall = "sh -c \"cat /etc/lsb-release | tr '\\n' ' ' | sed s/.*DISTRIB_RELEASE=// | sed s/\\ .*//\"";
- process.start( processCall );
- result = process.waitForFinished(1000);
- rev = process.readAllStandardOutput().trimmed();
- QString errorStr = process.readAllStandardError();
-
- process.start("sh -c \"cat /etc/lsb-release | tr '\\n' ' ' | sed s/.*DISTRIB_CODENAME=// | sed s/\\ .*//\"");
- result = process.waitForFinished(1000);
- pseudoname = process.readAllStandardOutput().trimmed();
- }
- else if ( QFile::exists("/etc/debian_version") ) {
- dist = "Debian";
-
- process.start("cat /etc/debian_version");
- result = process.waitForFinished(1000);
- dist += process.readAllStandardOutput().trimmed();
-
- rev = "";
- }
-
- if ( QFile::exists("/etc/UnitedLinux-release") ) {
- process.start("sh -c \"cat /etc/UnitedLinux-release | tr '\\n' ' ' | sed s/VERSION.*//\"");
- result = process.waitForFinished(1000);
- dist += process.readAllStandardOutput().trimmed();
- }
-
- operatingSystemString = os + " " + dist + " " + rev + " (" + pseudoname + " " + kernel + " " + mach + ")";
- }
-#endif
-
- return operatingSystemString;
-}
+/*************************************************************************** + * Copyright (C) 2006-2012 by Thomas Schweitzer * + * thomas-schweitzer(at)arcor.de * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License version 2.0 as * + * published by the Free Software Foundation. * + * * + * 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 in the file LICENSE.GPL; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "UiGuiSystemInfo.h" + +#include <tqstring.h> +#include <tqsysinfo.h> +#include <tqprocess.h> +#include <tqfile.h> + +UiGuiSystemInfo::UiGuiSystemInfo() { +} + + +/*! + \brief Returns the operating system UiGUI is currently running on as one string. + + The String contains name and version of the os. E.g. Linux Ubuntu 9.04. + */ +QString UiGuiSystemInfo::getOperatingSystem() { + QString operatingSystemString = ""; + +#if defined(Q_WS_WIN) + switch ( QSysInfo::WindowsVersion ) { + case QSysInfo::WV_32s : + operatingSystemString = "Windows 3.1 with Win 32s"; + break; + case QSysInfo::WV_95 : + operatingSystemString = "Windows 95"; + break; + case QSysInfo::WV_98 : + operatingSystemString = "Windows 98"; + break; + case QSysInfo::WV_Me : + operatingSystemString = "Windows Me"; + break; + case QSysInfo::WV_NT : + operatingSystemString = "Windows NT (operating system version 4.0)"; + break; + case QSysInfo::WV_2000 : + operatingSystemString = "Windows 2000 (operating system version 5.0)"; + break; + case QSysInfo::WV_XP : + operatingSystemString = "Windows XP (operating system version 5.1)"; + break; + case QSysInfo::WV_2003 : + operatingSystemString = "Windows Server 2003, Windows Server 2003 R2, Windows Home Server, Windows XP Professional x64 Edition (operating system version 5.2)"; + break; + case QSysInfo::WV_VISTA : + operatingSystemString = "Windows Vista, Windows Server 2008 (operating system version 6.0)"; + break; + case QSysInfo::WV_WINDOWS7 : + operatingSystemString = "Windows 7 (operating system version 6.1)"; + break; + case QSysInfo::WV_CE : + operatingSystemString = "Windows CE"; + break; + case QSysInfo::WV_CENET : + operatingSystemString = "Windows CE .NET"; + break; + case QSysInfo::WV_CE_5 : + operatingSystemString = "Windows CE 5.x"; + break; + case QSysInfo::WV_CE_6 : + operatingSystemString = "Windows CE 6.x"; + break; + default : + operatingSystemString = "Unknown Windows operating system."; + break; + } +#elif defined(Q_WS_MAC) + switch ( QSysInfo::MacintoshVersion ) { + case QSysInfo::MV_9 : + operatingSystemString = "Mac OS 9 (unsupported)"; + break; + case QSysInfo::MV_10_0 : + operatingSystemString = "Mac OS X 10.0 Cheetah (unsupported)"; + break; + case QSysInfo::MV_10_1 : + operatingSystemString = "Mac OS X 10.1 Puma (unsupported)"; + break; + case QSysInfo::MV_10_2 : + operatingSystemString = "Mac OS X 10.2 Jaguar (unsupported)"; + break; + case QSysInfo::MV_10_3 : + operatingSystemString = "Mac OS X 10.3 Panther"; + break; + case QSysInfo::MV_10_4 : + operatingSystemString = "Mac OS X 10.4 Tiger"; + break; + case QSysInfo::MV_10_5 : + operatingSystemString = "Mac OS X 10.5 Leopard"; + break; + case QSysInfo::MV_10_6 : + operatingSystemString = "Mac OS X 10.6 Snow Leopard"; + break; + case QSysInfo::MV_Unknown : + operatingSystemString = "An unknown and currently unsupported platform"; + break; + default : + operatingSystemString = "Unknown Mac operating system."; + break; + } +#else + //TODO: Detect Unix, Linux etc. distro as described on http://www.novell.com/coolsolutions/feature/11251.html + operatingSystemString = "Linux"; + QProcess process; + + process.start("uname -s"); + bool result = process.waitForFinished(1000); + QString os = process.readAllStandardOutput().trimmed(); + + process.start("uname -r"); + result = process.waitForFinished(1000); + QString rev = process.readAllStandardOutput().trimmed(); + + process.start("uname -m"); + result = process.waitForFinished(1000); + QString mach = process.readAllStandardOutput().trimmed(); + + if ( os == "SunOS" ) { + os = "Solaris"; + + process.start("uname -p"); + result = process.waitForFinished(1000); + QString arch = process.readAllStandardOutput().trimmed(); + + process.start("uname -v"); + result = process.waitForFinished(1000); + QString timestamp = process.readAllStandardOutput().trimmed(); + + operatingSystemString = os + " " + rev + " (" + arch + " " + timestamp + ")"; + } + else if ( os == "AIX" ) { + process.start("oslevel -r"); + result = process.waitForFinished(1000); + QString oslevel = process.readAllStandardOutput().trimmed(); + + operatingSystemString = os + "oslevel " + oslevel; + } + else if ( os == "Linux" ) { + QString dist; + QString pseudoname; + QString kernel = rev; + + if ( QFile::exists("/etc/redhat-release") ) { + dist = "RedHat"; + + process.start("sh -c \"cat /etc/redhat-release | sed s/.*\\(// | sed s/\\)//\""); + result = process.waitForFinished(1000); + pseudoname = process.readAllStandardOutput().trimmed(); + + process.start("sh -c \"cat /etc/redhat-release | sed s/.*release\\ // | sed s/\\ .*//\""); + result = process.waitForFinished(1000); + rev = process.readAllStandardOutput().trimmed(); + } + else if ( QFile::exists("/etc/SUSE-release") ) { + process.start("sh -c \"cat /etc/SUSE-release | tr '\\n' ' '| sed s/VERSION.*//\""); + result = process.waitForFinished(1000); + dist = process.readAllStandardOutput().trimmed(); + + process.start("sh -c \"cat /etc/SUSE-release | tr '\\n' ' ' | sed s/.*=\\ //\""); + result = process.waitForFinished(1000); + rev = process.readAllStandardOutput().trimmed(); + } + else if ( QFile::exists("/etc/mandrake-release") ) { + dist = "Mandrake"; + + process.start("sh -c \"cat /etc/mandrake-release | sed s/.*\\(// | sed s/\\)//\""); + result = process.waitForFinished(1000); + pseudoname = process.readAllStandardOutput().trimmed(); + + process.start("sh -c \"cat /etc/mandrake-release | sed s/.*release\\ // | sed s/\\ .*//\""); + result = process.waitForFinished(1000); + rev = process.readAllStandardOutput().trimmed(); + } + else if ( QFile::exists("/etc/lsb-release") ) { + dist = "Ubuntu"; + + QString processCall = "sh -c \"cat /etc/lsb-release | tr '\\n' ' ' | sed s/.*DISTRIB_RELEASE=// | sed s/\\ .*//\""; + process.start( processCall ); + result = process.waitForFinished(1000); + rev = process.readAllStandardOutput().trimmed(); + QString errorStr = process.readAllStandardError(); + + process.start("sh -c \"cat /etc/lsb-release | tr '\\n' ' ' | sed s/.*DISTRIB_CODENAME=// | sed s/\\ .*//\""); + result = process.waitForFinished(1000); + pseudoname = process.readAllStandardOutput().trimmed(); + } + else if ( QFile::exists("/etc/debian_version") ) { + dist = "Debian"; + + process.start("cat /etc/debian_version"); + result = process.waitForFinished(1000); + dist += process.readAllStandardOutput().trimmed(); + + rev = ""; + } + + if ( QFile::exists("/etc/UnitedLinux-release") ) { + process.start("sh -c \"cat /etc/UnitedLinux-release | tr '\\n' ' ' | sed s/VERSION.*//\""); + result = process.waitForFinished(1000); + dist += process.readAllStandardOutput().trimmed(); + } + + operatingSystemString = os + " " + dist + " " + rev + " (" + pseudoname + " " + kernel + " " + mach + ")"; + } +#endif + + return operatingSystemString; +} diff --git a/src/UiGuiSystemInfo.h b/src/UiGuiSystemInfo.h index 08dca5b..3ed56ca 100755 --- a/src/UiGuiSystemInfo.h +++ b/src/UiGuiSystemInfo.h @@ -1,35 +1,35 @@ -/***************************************************************************
- * Copyright (C) 2006-2012 by Thomas Schweitzer *
- * thomas-schweitzer(at)arcor.de *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License version 2.0 as *
- * published by the Free Software Foundation. *
- * *
- * 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 in the file LICENSE.GPL; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#ifndef UIGUISYSTEMINFO_H
-#define UIGUISYSTEMINFO_H
-
-class QString;
-
-
-class UiGuiSystemInfo
-{
-public:
- static QString getOperatingSystem();
-
-private:
- UiGuiSystemInfo();
-};
-
-#endif // UIGUISYSTEMINFO_H
+/*************************************************************************** + * Copyright (C) 2006-2012 by Thomas Schweitzer * + * thomas-schweitzer(at)arcor.de * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License version 2.0 as * + * published by the Free Software Foundation. * + * * + * 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 in the file LICENSE.GPL; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef UIGUISYSTEMINFO_H +#define UIGUISYSTEMINFO_H + +class QString; + + +class UiGuiSystemInfo +{ +public: + static QString getOperatingSystem(); + +private: + UiGuiSystemInfo(); +}; + +#endif // UIGUISYSTEMINFO_H diff --git a/src/UiGuiVersion.cpp b/src/UiGuiVersion.cpp index 375df0e..8ddcdd8 100755 --- a/src/UiGuiVersion.cpp +++ b/src/UiGuiVersion.cpp @@ -1,61 +1,61 @@ -/***************************************************************************
- * Copyright (C) 2006-2012 by Thomas Schweitzer *
- * thomas-schweitzer(at)arcor.de *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License version 2.0 as *
- * published by the Free Software Foundation. *
- * *
- * 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 in the file LICENSE.GPL; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#include "UiGuiVersion.h"
-
-#include <QString>
-#include <QStringList>
-#include <QDate>
-
-namespace UiGuiVersion {
-/*!
- \brief Returns the build date as a localized string, e.g. "9. Februar 2009". If
- there was some kind of error, the returned string is empty.
- */
-QString getBuildDate() {
- QStringList monthNames;
- QString buildDateString = "";
-
- monthNames << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun" << "Jul" << "Aug" << "Sep" << "Oct" << "Nov" << "Dez";
- QStringList buildDateStringList = QString(__DATE__).simplified().split(' '); // __DATE__ returns eg "Feb 4 2009"
-
- if ( buildDateStringList.count() == 3 ) {
- QDate buildDate(buildDateStringList.last().toInt(), monthNames.indexOf( buildDateStringList.first() )+1, buildDateStringList.at(1).toInt());
- buildDateString = buildDate.toString("d. MMMM yyyy");
- }
-
- return buildDateString;
-}
-
-
-/*!
- \brief Returns the revision number, that the current build is based on, as string. If
- there was some kind of error, the returned string is empty.
- */
-QString getBuildRevision() {
- QString buildRevision = "";
- QStringList buildRevisionStringList = QString(PROGRAM_REVISION).simplified().split(' ');
-
- if ( buildRevisionStringList.count() == 3 ) {
- buildRevision = buildRevisionStringList.at(1); // PROGRAM_REVISION is eg "$Revision: 907 $"
- }
-
- return buildRevision;
-}
-} // namespace UiGuiVersion
+/*************************************************************************** + * Copyright (C) 2006-2012 by Thomas Schweitzer * + * thomas-schweitzer(at)arcor.de * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License version 2.0 as * + * published by the Free Software Foundation. * + * * + * 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 in the file LICENSE.GPL; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "UiGuiVersion.h" + +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqdate.h> + +namespace UiGuiVersion { +/*! + \brief Returns the build date as a localized string, e.g. "9. Februar 2009". If + there was some kind of error, the returned string is empty. + */ +QString getBuildDate() { + QStringList monthNames; + QString buildDateString = ""; + + monthNames << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun" << "Jul" << "Aug" << "Sep" << "Oct" << "Nov" << "Dez"; + QStringList buildDateStringList = QString(__DATE__).simplified().split(' '); // __DATE__ returns eg "Feb 4 2009" + + if ( buildDateStringList.count() == 3 ) { + QDate buildDate(buildDateStringList.last().toInt(), monthNames.indexOf( buildDateStringList.first() )+1, buildDateStringList.at(1).toInt()); + buildDateString = buildDate.toString("d. MMMM yyyy"); + } + + return buildDateString; +} + + +/*! + \brief Returns the revision number, that the current build is based on, as string. If + there was some kind of error, the returned string is empty. + */ +QString getBuildRevision() { + QString buildRevision = ""; + QStringList buildRevisionStringList = QString(PROGRAM_REVISION).simplified().split(' '); + + if ( buildRevisionStringList.count() == 3 ) { + buildRevision = buildRevisionStringList.at(1); // PROGRAM_REVISION is eg "$Revision: 907 $" + } + + return buildRevision; +} +} // namespace UiGuiVersion diff --git a/src/UiGuiVersion.h b/src/UiGuiVersion.h index 41aff77..696313f 100755 --- a/src/UiGuiVersion.h +++ b/src/UiGuiVersion.h @@ -1,39 +1,39 @@ -/***************************************************************************
- * Copyright (C) 2006-2012 by Thomas Schweitzer *
- * thomas-schweitzer(at)arcor.de *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License version 2.0 as *
- * published by the Free Software Foundation. *
- * *
- * 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 in the file LICENSE.GPL; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#ifndef UIGUIVERSION_H
-#define UIGUIVERSION_H
-
-class QString;
-
-// Define the version number here. Update this as the last file before a release.
-#define PROGRAM_VERSION 1.2.0
-#define PROGRAM_VERSION_STRING "1.2.0"
-#define RESOURCE_VERSION 1,2,0,0
-#define RESOURCE_VERSION_STRING "1,2,0,0\0"
-#define PROGRAM_REVISION "$Revision: 1070 $"
-
-namespace UiGuiVersion {
-
- QString getBuildDate();
- QString getBuildRevision();
-
-}
-
-#endif // UIGUIVERSION_H
+/*************************************************************************** + * Copyright (C) 2006-2012 by Thomas Schweitzer * + * thomas-schweitzer(at)arcor.de * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License version 2.0 as * + * published by the Free Software Foundation. * + * * + * 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 in the file LICENSE.GPL; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef UIGUIVERSION_H +#define UIGUIVERSION_H + +class QString; + +// Define the version number here. Update this as the last file before a release. +#define PROGRAM_VERSION 1.2.0 +#define PROGRAM_VERSION_STRING "1.2.0" +#define RESOURCE_VERSION 1,2,0,0 +#define RESOURCE_VERSION_STRING "1,2,0,0\0" +#define PROGRAM_REVISION "$Revision: 1070 $" + +namespace UiGuiVersion { + + QString getBuildDate(); + QString getBuildRevision(); + +} + +#endif // UIGUIVERSION_H diff --git a/src/UpdateCheckDialog.cpp b/src/UpdateCheckDialog.cpp index a5a58d8..9a352a7 100755 --- a/src/UpdateCheckDialog.cpp +++ b/src/UpdateCheckDialog.cpp @@ -23,16 +23,16 @@ #include "UiGuiSettings.h" #include "UiGuiVersion.h" -#include <QMessageBox> -#include <QDesktopServices> -#include <QNetworkAccessManager> -#include <QTimer> -#include <QDate> -#include <QUrl> -#include <QRegExpValidator> -#include <QNetworkRequest> -#include <QNetworkReply> -#include <QNetworkProxy> +#include <tqmessagebox.h> +#include <tqdesktopservices.h> +#include <tqnetworkaccessmanager.h> +#include <tqtimer.h> +#include <tqdate.h> +#include <tqurl.h> +#include <tqregexpvalidator.h> +#include <tqnetworkrequest.h> +#include <tqnetworkreply.h> +#include <tqnetworkproxy.h> /*! \class UpdateCheckDialog diff --git a/src/UpdateCheckDialog.h b/src/UpdateCheckDialog.h index f0dfe81..85082cd 100755 --- a/src/UpdateCheckDialog.h +++ b/src/UpdateCheckDialog.h @@ -1,73 +1,73 @@ -/***************************************************************************
- * Copyright (C) 2006-2012 by Thomas Schweitzer *
- * thomas-schweitzer(at)arcor.de *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License version 2.0 as *
- * published by the Free Software Foundation. *
- * *
- * 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 in the file LICENSE.GPL; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#ifndef UPDATECHECKDIALOG_H
-#define UPDATECHECKDIALOG_H
-
-#include <QDialog>
-#include <QDialogButtonBox>
-
-class UiGuiSettings;
-namespace Ui {
- class UpdateCheckDialog;
-}
-
-class QTimer;
-class QDesktopServices;
-class QNetworkAccessManager;
-class QNetworkReply;
-
-
-class UpdateCheckDialog : public QDialog
-{
- Q_OBJECT
-
-public:
- UpdateCheckDialog(QSharedPointer<UiGuiSettings> settings, QWidget *parent = NULL);
- ~UpdateCheckDialog();
-
-public slots:
- void checkForUpdateAndShowDialog();
- void checkForUpdate();
-
-private slots:
- void checkResultsOfFetchedPadXMLFile(QNetworkReply *networkReply);
- void handleUpdateCheckDialogButtonClicked(QAbstractButton *clickedButton);
- void updateUpdateCheckProgressBar();
- void initProxySettings();
-
-private:
- Ui::UpdateCheckDialog *_updateCheckDialogForm;
-
- void getPadXMLFile();
- void showCheckingForUpdateDialog();
- void showNewVersionAvailableDialog(QString newVersion);
- void showNoNewVersionAvailableDialog();
- int convertVersionStringToNumber(QString versionString);
-
- QSharedPointer<UiGuiSettings> _settings;
- bool _manualUpdateRequested;
- QNetworkAccessManager *_networkAccessManager;
- QNetworkReply *_currentNetworkReply;
- QDialogButtonBox::ButtonRole _roleOfClickedButton;
- QTimer *_updateCheckProgressTimer;
- int _updateCheckProgressCounter;
-};
-
-#endif // UPDATECHECKDIALOG_H
+/*************************************************************************** + * Copyright (C) 2006-2012 by Thomas Schweitzer * + * thomas-schweitzer(at)arcor.de * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License version 2.0 as * + * published by the Free Software Foundation. * + * * + * 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 in the file LICENSE.GPL; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef UPDATECHECKDIALOG_H +#define UPDATECHECKDIALOG_H + +#include <tqdialog.h> +#include <tqdialogbuttonbox.h> + +class UiGuiSettings; +namespace Ui { + class UpdateCheckDialog; +} + +class QTimer; +class QDesktopServices; +class QNetworkAccessManager; +class QNetworkReply; + + +class UpdateCheckDialog : public QDialog +{ + Q_OBJECT + +public: + UpdateCheckDialog(QSharedPointer<UiGuiSettings> settings, QWidget *parent = NULL); + ~UpdateCheckDialog(); + +public slots: + void checkForUpdateAndShowDialog(); + void checkForUpdate(); + +private slots: + void checkResultsOfFetchedPadXMLFile(QNetworkReply *networkReply); + void handleUpdateCheckDialogButtonClicked(QAbstractButton *clickedButton); + void updateUpdateCheckProgressBar(); + void initProxySettings(); + +private: + Ui::UpdateCheckDialog *_updateCheckDialogForm; + + void getPadXMLFile(); + void showCheckingForUpdateDialog(); + void showNewVersionAvailableDialog(QString newVersion); + void showNoNewVersionAvailableDialog(); + int convertVersionStringToNumber(QString versionString); + + QSharedPointer<UiGuiSettings> _settings; + bool _manualUpdateRequested; + QNetworkAccessManager *_networkAccessManager; + QNetworkReply *_currentNetworkReply; + QDialogButtonBox::ButtonRole _roleOfClickedButton; + QTimer *_updateCheckProgressTimer; + int _updateCheckProgressCounter; +}; + +#endif // UPDATECHECKDIALOG_H diff --git a/src/debugging/TSLogger.cpp b/src/debugging/TSLogger.cpp index e7a912b..a13113e 100755 --- a/src/debugging/TSLogger.cpp +++ b/src/debugging/TSLogger.cpp @@ -1,251 +1,251 @@ -/***************************************************************************
- * Copyright (C) 2006-2012 by Thomas Schweitzer *
- * thomas-schweitzer(at)arcor.de *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License version 2.0 as *
- * published by the Free Software Foundation. *
- * *
- * 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 in the file LICENSE.GPL; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#include "TSLogger.h"
-#include "ui_TSLoggerDialog.h"
-
-#include "SettingsPaths.h"
-
-#include <QDateTime>
-#include <QFile>
-#include <QFileInfo>
-#include <QUrl>
-#include <QTextStream>
-#include <QDesktopServices>
-#include <QMessageBox>
-
-#include <ctime>
-
-using namespace tschweitzer;
-using namespace tschweitzer::debugging;
-
-TSLogger* TSLogger::_instance = NULL;
-
-/*!
- \class TSLogger
- \brief This class handles any kind of data logging, for debugging and whatever purpose.
-
- Beneath being able of displaying a dialog window containing all log messages of the
- current session, a log file in the systems temporary directory is used. Its name
- is "UiGUI_log.html".
-
- Setting a verbose level allows to only write messages that have the selected minimum
- priority to the log.
- */
-
-/*!
- \brief Returns the only existing instance of TSLogger. If the instance doesn't exist, it will be created.
- */
-TSLogger* TSLogger::getInstance(int verboseLevel) {
- if ( _instance == NULL )
- _instance = new TSLogger(verboseLevel);
-
- return _instance;
-}
-
-
-/*!
- \brief Returns the only existing instance of TSLogger. If the instance doesn't exist, it will be created.
- */
-TSLogger* TSLogger::getInstance() {
-#ifdef _DEBUG
- return TSLogger::getInstance(QtDebugMsg);
-#else
- return TSLogger::getInstance(QtWarningMsg);
-#endif
-}
-
-
-/*!
- \brief Initializes the dialog and sets the path to the log file in the systems temporary directory.
- Sets the default verbose level to warning level.
- */
-TSLogger::TSLogger(int verboseLevel) : QDialog() {
- _TSLoggerDialogForm = new Ui::TSLoggerDialog();
- _TSLoggerDialogForm->setupUi(this);
-#ifdef _DEBUG
- _verboseLevel = QtDebugMsg;
-#else
- _verboseLevel = QtMsgType(verboseLevel);
-#endif
-
- _logFileInitState = NOTINITIALZED;
-
- connect( _TSLoggerDialogForm->openLogFileFolderToolButton, SIGNAL(clicked()), this, SLOT(openLogFileFolder()) );
-
- // Make the main application not to wait for the logging window to close.
- setAttribute(Qt::WA_QuitOnClose, false);
-}
-
-
-/*!
- \brief Logs all incoming messages \a msg to the dialogs text edit and to the log file.
-
- Only messages whos \a type have a higher priority than the set verbose level are logged.
- */
-void TSLogger::messageHandler(QtMsgType type, const char *msg) {
- if ( _instance == NULL )
- _instance = TSLogger::getInstance();
-
-/*
- QMessageBox messageBox;
- QString messageBoxText = QString::fromUtf8( msg );
- messageBox.setText( messageBoxText );
- messageBox.setWindowModality( Qt::ApplicationModal );
- messageBox.exec();
-*/
-
- // Only log messages that have a higher or equal priority than set with the verbose level.
- if ( type < _instance->_verboseLevel )
- return;
-
- // Init log message with prepended date and time.
- QString message = QDateTime::currentDateTime().toString();
-
- // Depending on the QtMsgType prepend a different colored Debug, Warning, Critical or Fatal.
- switch (type) {
- case QtDebugMsg :
- message += " <span style=\"font-weight:bold; color:black;\">Debug:</span> ";
- break;
- case QtWarningMsg :
- message += " <span style=\"font-weight:bold; color:gold;\">Warning:</span> ";
- break;
- case QtCriticalMsg :
- message += "<span style=\"font-weight:bold; color:red;\">Critical:</span> ";
- break;
- case QtFatalMsg :
- message += " <span style=\"font-weight:bold; color:#D60000;\">Fatal:</span> ";
- // This one is no Qt message type, but can be used to send info messages to the log
- // by calling TSLogger::messageHandler() directly.
- case TSLoggerInfoMsg :
- message += " <span style=\"font-weight:bold; color:darkgray;\">Info:</span> ";
- break;
- }
-
- // Append the to UTF-8 back converted message parameter.
- message += QString::fromUtf8( msg ) + "<br/>\n";
-
- // Write the message to the log windows text edit.
- _instance->_TSLoggerDialogForm->logTextEdit->append( message );
-
- // Write/append the log message to the log file.
- _instance->writeToLogFile( message );
-
- // In case of a fatal error abort the application.
- if ( type == QtFatalMsg )
- abort();
-}
-
-
-/*!
- \brief Calling this the verbose level can be set in a range from 0 to 3
- which is equal to debug, warning, critical and fatal priority.
- */
-void TSLogger::setVerboseLevel(int level) {
- if ( level < 0 )
- _verboseLevel = QtDebugMsg;
- if ( level > 3 )
- _verboseLevel = QtFatalMsg;
- else
- _verboseLevel = QtMsgType(level);
-}
-
-
-/*!
- \brief Deletes the existing _instance of TSLogger.
- */
-void TSLogger::deleteInstance() {
- if ( _instance != NULL ) {
- delete _instance;
- _instance = NULL;
- }
-}
-
-
-/*!
- \brief Opens the folder that contains the created log file with the name "UiGUI_log.html".
- */
-void TSLogger::openLogFileFolder() {
- QDesktopServices::openUrl( QFileInfo( _logFile ).absolutePath() );
-}
-
-
-/*!
- \brief Writes the \a message to the used log file.
- */
-void TSLogger::writeToLogFile(const QString &message) {
- // If the file where all logging messages should go to isn't initilized yet, do that now.
- if ( _logFileInitState == NOTINITIALZED ) {
- _logFileInitState = INITIALIZING;
-
- // On different systems it may be that "QDir::tempPath()" ends with a "/" or not. So check this.
- // Remove any trailing slashes.
- QString tempPath = QFileInfo( SettingsPaths::getTempPath() ).absolutePath();
- while ( tempPath.right(1) == "/" ) {
- tempPath.chop(1);
- }
-
- // To make the temporary log file invulnerable against file symbolic link hacks
- // append the current date and time up to milliseconds to its name and a random character.
- QString logFileName = "UiGUI_log_" + QDateTime::currentDateTime().toString("yyyyMMdd");
- logFileName += "-" + QDateTime::currentDateTime().toString("hhmmsszzz");
- // By random decide whether to append a number or an upper or lower case character.
- qsrand( time(NULL) );
- unsigned char randomChar;
- switch ( qrand() % 3 ) {
- // Append a number from 0 to 9.
- case 0 :
- randomChar = qrand() % 10 + '0';
- break;
- // Append a upper case characer between A and Z.
- case 1 :
- randomChar = qrand() % 26 + 'A';
- break;
- // Append a lower case characer between a and z.
- default :
- randomChar = qrand() % 26 + 'a';
- break;
- }
- logFileName += "_" + QString(randomChar) + ".html";
-
- _logFile.setFileName( tempPath + "/" + logFileName );
-
- // Set the tooltip of the open log file folder button to show the unique name of the log file.
- _TSLoggerDialogForm->openLogFileFolderToolButton->setToolTip( _TSLoggerDialogForm->openLogFileFolderToolButton->toolTip() + " (" + logFileName + ")" );
-
- _logFileInitState = INITIALZED;
- }
-
- // Add the message to the message queue.
- _messageQueue << message;
-
- // If the logging file is initialzed, write all messages contained in the message queue into the file.
- if ( _logFileInitState == INITIALZED ) {
- // Write/append the log message to the log file.
- if ( _logFile.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append) ) {
- QTextStream out(&_logFile);
-
- while ( !_messageQueue.isEmpty() ) {
- out << _messageQueue.takeFirst() << "\n";
- }
-
- _logFile.close();
- }
- }
-}
+/*************************************************************************** + * Copyright (C) 2006-2012 by Thomas Schweitzer * + * thomas-schweitzer(at)arcor.de * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License version 2.0 as * + * published by the Free Software Foundation. * + * * + * 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 in the file LICENSE.GPL; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "TSLogger.h" +#include "ui_TSLoggerDialog.h" + +#include "SettingsPaths.h" + +#include <tqdatetime.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqurl.h> +#include <tqtextstream.h> +#include <tqdesktopservices.h> +#include <tqmessagebox.h> + +#include <ctime> + +using namespace tschweitzer; +using namespace tschweitzer::debugging; + +TSLogger* TSLogger::_instance = NULL; + +/*! + \class TSLogger + \brief This class handles any kind of data logging, for debugging and whatever purpose. + + Beneath being able of displaying a dialog window containing all log messages of the + current session, a log file in the systems temporary directory is used. Its name + is "UiGUI_log.html". + + Setting a verbose level allows to only write messages that have the selected minimum + priority to the log. + */ + +/*! + \brief Returns the only existing instance of TSLogger. If the instance doesn't exist, it will be created. + */ +TSLogger* TSLogger::getInstance(int verboseLevel) { + if ( _instance == NULL ) + _instance = new TSLogger(verboseLevel); + + return _instance; +} + + +/*! + \brief Returns the only existing instance of TSLogger. If the instance doesn't exist, it will be created. + */ +TSLogger* TSLogger::getInstance() { +#ifdef _DEBUG + return TSLogger::getInstance(QtDebugMsg); +#else + return TSLogger::getInstance(QtWarningMsg); +#endif +} + + +/*! + \brief Initializes the dialog and sets the path to the log file in the systems temporary directory. + Sets the default verbose level to warning level. + */ +TSLogger::TSLogger(int verboseLevel) : QDialog() { + _TSLoggerDialogForm = new Ui::TSLoggerDialog(); + _TSLoggerDialogForm->setupUi(this); +#ifdef _DEBUG + _verboseLevel = QtDebugMsg; +#else + _verboseLevel = QtMsgType(verboseLevel); +#endif + + _logFileInitState = NOTINITIALZED; + + connect( _TSLoggerDialogForm->openLogFileFolderToolButton, SIGNAL(clicked()), this, SLOT(openLogFileFolder()) ); + + // Make the main application not to wait for the logging window to close. + setAttribute(Qt::WA_QuitOnClose, false); +} + + +/*! + \brief Logs all incoming messages \a msg to the dialogs text edit and to the log file. + + Only messages whos \a type have a higher priority than the set verbose level are logged. + */ +void TSLogger::messageHandler(QtMsgType type, const char *msg) { + if ( _instance == NULL ) + _instance = TSLogger::getInstance(); + +/* + QMessageBox messageBox; + QString messageBoxText = QString::fromUtf8( msg ); + messageBox.setText( messageBoxText ); + messageBox.setWindowModality( Qt::ApplicationModal ); + messageBox.exec(); +*/ + + // Only log messages that have a higher or equal priority than set with the verbose level. + if ( type < _instance->_verboseLevel ) + return; + + // Init log message with prepended date and time. + QString message = QDateTime::currentDateTime().toString(); + + // Depending on the QtMsgType prepend a different colored Debug, Warning, Critical or Fatal. + switch (type) { + case QtDebugMsg : + message += " <span style=\"font-weight:bold; color:black;\">Debug:</span> "; + break; + case QtWarningMsg : + message += " <span style=\"font-weight:bold; color:gold;\">Warning:</span> "; + break; + case QtCriticalMsg : + message += "<span style=\"font-weight:bold; color:red;\">Critical:</span> "; + break; + case QtFatalMsg : + message += " <span style=\"font-weight:bold; color:#D60000;\">Fatal:</span> "; + // This one is no Qt message type, but can be used to send info messages to the log + // by calling TSLogger::messageHandler() directly. + case TSLoggerInfoMsg : + message += " <span style=\"font-weight:bold; color:darkgray;\">Info:</span> "; + break; + } + + // Append the to UTF-8 back converted message parameter. + message += QString::fromUtf8( msg ) + "<br/>\n"; + + // Write the message to the log windows text edit. + _instance->_TSLoggerDialogForm->logTextEdit->append( message ); + + // Write/append the log message to the log file. + _instance->writeToLogFile( message ); + + // In case of a fatal error abort the application. + if ( type == QtFatalMsg ) + abort(); +} + + +/*! + \brief Calling this the verbose level can be set in a range from 0 to 3 + which is equal to debug, warning, critical and fatal priority. + */ +void TSLogger::setVerboseLevel(int level) { + if ( level < 0 ) + _verboseLevel = QtDebugMsg; + if ( level > 3 ) + _verboseLevel = QtFatalMsg; + else + _verboseLevel = QtMsgType(level); +} + + +/*! + \brief Deletes the existing _instance of TSLogger. + */ +void TSLogger::deleteInstance() { + if ( _instance != NULL ) { + delete _instance; + _instance = NULL; + } +} + + +/*! + \brief Opens the folder that contains the created log file with the name "UiGUI_log.html". + */ +void TSLogger::openLogFileFolder() { + QDesktopServices::openUrl( QFileInfo( _logFile ).absolutePath() ); +} + + +/*! + \brief Writes the \a message to the used log file. + */ +void TSLogger::writeToLogFile(const QString &message) { + // If the file where all logging messages should go to isn't initilized yet, do that now. + if ( _logFileInitState == NOTINITIALZED ) { + _logFileInitState = INITIALIZING; + + // On different systems it may be that "QDir::tempPath()" ends with a "/" or not. So check this. + // Remove any trailing slashes. + QString tempPath = QFileInfo( SettingsPaths::getTempPath() ).absolutePath(); + while ( tempPath.right(1) == "/" ) { + tempPath.chop(1); + } + + // To make the temporary log file invulnerable against file symbolic link hacks + // append the current date and time up to milliseconds to its name and a random character. + QString logFileName = "UiGUI_log_" + QDateTime::currentDateTime().toString("yyyyMMdd"); + logFileName += "-" + QDateTime::currentDateTime().toString("hhmmsszzz"); + // By random decide whether to append a number or an upper or lower case character. + qsrand( time(NULL) ); + unsigned char randomChar; + switch ( qrand() % 3 ) { + // Append a number from 0 to 9. + case 0 : + randomChar = qrand() % 10 + '0'; + break; + // Append a upper case characer between A and Z. + case 1 : + randomChar = qrand() % 26 + 'A'; + break; + // Append a lower case characer between a and z. + default : + randomChar = qrand() % 26 + 'a'; + break; + } + logFileName += "_" + QString(randomChar) + ".html"; + + _logFile.setFileName( tempPath + "/" + logFileName ); + + // Set the tooltip of the open log file folder button to show the unique name of the log file. + _TSLoggerDialogForm->openLogFileFolderToolButton->setToolTip( _TSLoggerDialogForm->openLogFileFolderToolButton->toolTip() + " (" + logFileName + ")" ); + + _logFileInitState = INITIALZED; + } + + // Add the message to the message queue. + _messageQueue << message; + + // If the logging file is initialzed, write all messages contained in the message queue into the file. + if ( _logFileInitState == INITIALZED ) { + // Write/append the log message to the log file. + if ( _logFile.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append) ) { + QTextStream out(&_logFile); + + while ( !_messageQueue.isEmpty() ) { + out << _messageQueue.takeFirst() << "\n"; + } + + _logFile.close(); + } + } +} diff --git a/src/debugging/TSLogger.h b/src/debugging/TSLogger.h index c7e7e62..97268f7 100755 --- a/src/debugging/TSLogger.h +++ b/src/debugging/TSLogger.h @@ -20,8 +20,8 @@ #ifndef TSLogger_H #define TSLogger_H -#include <QDialog> -#include <QFile> +#include <tqdialog.h> +#include <tqfile.h> namespace Ui { class TSLoggerDialog; diff --git a/src/main.cpp b/src/main.cpp index 6e09f3e..77e3444 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,9 +28,9 @@ #include "IndentHandler.h" #include "SettingsPaths.h" -#include <QApplication> -#include <QTextCodec> -#include <QDebug> +#include <tqapplication.h> +#include <tqtextcodec.h> +#include <tqdebug.h> #include <string> #include <iostream> |