pax_global_header00006660000000000000000000000064124164231700014512gustar00rootroot0000000000000052 comment=99d09270c58b817ea218979d513a90099ade6277 editorconfig-core-c-0.12.0/000077500000000000000000000000001241642317000154145ustar00rootroot00000000000000editorconfig-core-c-0.12.0/.editorconfig000066400000000000000000000003101241642317000200630ustar00rootroot00000000000000 root = true [*] end_of_line = LF [*.[ch]] indent_style = space indent_size = 4 max_line_length = 80 [CMakeLists.txt] indent_style = space indent_size = 4 [*.sh] indent_style = space indent_size = 2 editorconfig-core-c-0.12.0/.gitignore000066400000000000000000000006671241642317000174150ustar00rootroot00000000000000# Generated by CMake CMakeCache.txt CMakeFiles Makefile cmake_install.cmake install_manifest.txt # conf file /cmake_uninstall.cmake # Generated by CPack /CPackConfig.cmake /CPackSourceConfig.cmake /_CPack_Packages # Generated by CTest /Testing CTestTestfile.cmake # By `make package` /editorconfig*.deb /editorconfig*.rpm /editorconfig*.sh /editorconfig*.tar.Z /editorconfig*.tar.gz /editorconfig*.zip # Generated by `make` /bin /lib editorconfig-core-c-0.12.0/.gitmodules000066400000000000000000000001421241642317000175660ustar00rootroot00000000000000[submodule "tests"] path = tests url = git://github.com/editorconfig/editorconfig-core-test.git editorconfig-core-c-0.12.0/.travis.yml000066400000000000000000000011651241642317000175300ustar00rootroot00000000000000# As CMake is not officially supported we use java language: java # Settings to try env: - OPTIONS="-DCMAKE_BUILD_TYPE=Release -DBUILD_STATICALLY_LINKED_EXE=ON" - OPTIONS="-DCMAKE_BUILD_TYPE=Release -DBUILD_STATICALLY_LINKED_EXE=OFF" # Make sure CMake and doxygen is installed install: - sudo apt-get install cmake # Run the Build script script: - mkdir _build - cd _build - cmake .. -DCMAKE_INSTALL_PREFIX=../_install $OPTIONS - cmake --build . --target install # Run Tests after_script: - ctest -VV --output-on-failure . # Notify the mailing list notifications: email: on_success: change on_failure: always editorconfig-core-c-0.12.0/CMakeLists.txt000066400000000000000000000111341241642317000201540ustar00rootroot00000000000000# # Copyright (c) 2011-2013 EditorConfig Team # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # cmake_minimum_required(VERSION 2.6) set (editorconfig_VERSION_MAJOR 0) set (editorconfig_VERSION_MINOR 12) set (editorconfig_VERSION_SUBMINOR 0) set (editorconfig_VERSION_SUFFIX "") project(editorconfig C) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake_Modules") # set default compilation directory set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin") # uninstall target configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) # package target set(HOME_URL "http://editorconfig.org") set(MAILING_LIST "editorconfig@googlegroups.com") set(CPACK_PACKAGE_VENDOR "EditorConfig Team") set(CPACK_PACKAGE_VERSION_MAJOR ${editorconfig_VERSION_MAJOR}) set(CPACK_PACKAGE_VERSION_MINOR ${editorconfig_VERSION_MINOR}) set(CPACK_PACKAGE_VERSION_PATCH ${editorconfig_VERSION_SUBMINOR}) set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md") set(CPACK_PACKAGE_INSTALL_DIRECTORY "editorconfig") if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # Mac OS X set(CPACK_GENERATOR "STGZ;TGZ;TZ") elseif(UNIX) # UNIX should be checked before WIN32 since cygwin makes UNIX and WIN32 # both true set(CPACK_GENERATOR "STGZ;TGZ;TZ;DEB;RPM") elseif(WIN32) set(CPACK_GENERATOR "ZIP;NSIS") endif() set(CPACK_MONOLITHIC_INSTALL 1) set(CPACK_SOURCE_GENERATOR "TGZ;TBZ2") set(CPACK_PACKAGE_CONTACT "EditorConfig <${MAILING_LIST}>") set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/README.md) set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") # get the architecture of Deb package. The name of the architecture is not # always the same with ${CMAKE_SYSTEM_PROCESSOR} if(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE) execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE arch OUTPUT_STRIP_TRAILING_WHITESPACE) set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${arch}") endif() set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${HOME_URL}) set(CPACK_NSIS_CONTACT ${CPACK_PACKAGE_CONTACT}) set(CPACK_NSIS_DISPLAY_NAME "EditorConfig Core") set(CPACK_NSIS_PACKAGE_HOMEPAGE ${HOME_URL}) set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "editorconfig") set(CPACK_RPM_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR}) set(CPACK_RPM_PACKAGE_LICENSE "Simplified BSD license") set(CPACK_RPM_PACKAGE_URL ${HOME_URL}) include(CPack) add_subdirectory(src) add_subdirectory(doc) add_subdirectory(include) # Testing. Type "make test" to run tests. Only if the test submodule is # checkouted should we do this if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/tests/CMakeLists.txt) enable_testing() set(EDITORCONFIG_CMD "${PROJECT_BINARY_DIR}/bin/editorconfig") add_subdirectory(tests) else() message(WARNING " Testing files are not found. Testing will not be available. If you obtained the source tree through git, please run `git submodule update --init` to update the tests submodule.") endif() editorconfig-core-c-0.12.0/CMake_Modules/000077500000000000000000000000001241642317000200645ustar00rootroot00000000000000editorconfig-core-c-0.12.0/CMake_Modules/FindPCRE.cmake000066400000000000000000000025321241642317000224220ustar00rootroot00000000000000# Copyright (C) 2007-2009 LuaDist. # Created by Peter Kapec # Redistribution and use of this file is allowed according to the terms of the MIT license. # For details see the COPYRIGHT file distributed with LuaDist. # Note: # Searching headers and libraries is very simple and is NOT as powerful as scripts # distributed with CMake, because LuaDist defines directories to search for. # Everyone is encouraged to contact the author with improvements. Maybe this file # becomes part of CMake distribution sometimes. # - Find pcre # Find the native PCRE headers and libraries. # # PCRE_INCLUDE_DIRS - where to find pcre.h, etc. # PCRE_LIBRARIES - List of libraries when using pcre. # PCRE_FOUND - True if pcre found. # Look for the header file. FIND_PATH(PCRE_INCLUDE_DIR NAMES pcre.h) # Look for the library. FIND_LIBRARY(PCRE_LIBRARY NAMES pcre) # Handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if all listed variables are TRUE. INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_LIBRARY PCRE_INCLUDE_DIR) # Copy the results to the output variables. IF(PCRE_FOUND) SET(PCRE_LIBRARIES ${PCRE_LIBRARY}) SET(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR}) ELSE(PCRE_FOUND) SET(PCRE_LIBRARIES) SET(PCRE_INCLUDE_DIRS) ENDIF(PCRE_FOUND) MARK_AS_ADVANCED(PCRE_INCLUDE_DIRS PCRE_LIBRARIES) editorconfig-core-c-0.12.0/CONTRIBUTORS000066400000000000000000000001121241642317000172660ustar00rootroot00000000000000Contributors to EditorConfig C Core: Hong Xu Trey Hunner William Swanson editorconfig-core-c-0.12.0/INSTALL.md000066400000000000000000000071741241642317000170550ustar00rootroot00000000000000Dependency ========== - [pcre](http://www.pcre.org/) (Since version 0.12.0) Installing from a binary package ================================ Binary packages can be downloaded [here](http://sourceforge.net/projects/editorconfig/files/EditorConfig-C-Core/). Windows users can also install EditorConfig core by [Chocolatey](http://chocolatey.org/packages/editorconfig.core). Debian (Jessie and later): `apt-get install editorconfig` ArchLinux: An [Arch AUR package](https://aur.archlinux.org/packages/editorconfig-core-c) is available. Mac OS X users can `brew install editorconfig` with [Homebrew](http://brew.sh). Generally Linux users can also install with [LinuxBrew](https://github.com/Homebrew/linuxbrew) by `brew install editorconfig`. Installing from source ====================== Before installing, you need to install the building tool [cmake][] and dependency [pcre][]. To install cmake and pcre with package manager: Arch Linux: `pacman -S cmake pcre` Homebrew on OS X: `brew install cmake pcre` Ubuntu/Debian: `apt-get install cmake libpcre3-dev` Make sure cmake is in your PATH environment variable. Switch to the root directory of editorconfig and execute the following command: cmake . If successful, the project file will be generated. There are various options could be used when generating the project file: -DBUILD_DOCUMENTATION=[ON|OFF] Default: ON If this option is on and doxygen is found, the html documentation and man pages will be generated. e.g. cmake -DBUILD_DOCUMENTATION=OFF . -DBUILD_STATICALLY_LINKED_EXE=[ON|OFF] Default: OFF If this option is on, the executable will be linked statically to all libraries. This option is currently only valid for gcc. e.g. cmake -DBUILD_STATICALLY_LINKED_EXE=ON . -DINSTALL_HTML_DOC=[ON|OFF] Default: OFF If this option is on and BUILD_DOCUMENTATION is on, html documentation will be installed when execute "make install" or something similar. e.g. cmake -DINSTALL_HTML_DOC=ON . -DDOXYGEN_EXECUTABLE=/path/to/doxygen If doxygen could not be found automatically and you need to generate documentation, try to set this option to the path to doxygen. e.g. cmake -DDOXYGEN_EXECUTABLE=/opt/doxygen/bin/doxygen . -DMSVC_MD=[ON|OFF] Default: OFF Use /MD instead of /MT flag when compiling with Microsoft Visual C++. This option takes no effect when using compilers other than Microsoft Visual C++. e.g. We want to use /MD instead of /MT when compiling with MSVC. cmake -DMSVC_MD=ON . On UNIX/Linux with gcc, the project file is often a Makefile, in which case you can type "make" to compile editorconfig. If you are using a different compiler or platform the compilation command may differ. For example, if you generate an NMake Makefile and you want to use Microsoft Visual C++ to build editorconfig, then the build command would be "nmake". After the compilation succeeds, use the following command to install (require root or admin privilege): make install This command will copy all the files you need to corresponding directories: editorconfig libraries will be copied to PREFIX/lib and executables will be copied to PREFIX/bin. Note that you have to use ldconfig or change LD_LIBRARY_PATH to specify the PREFIX/lib as one of the library searching directory on UNIX/Linux to make sure that source files could be linked to the libraries and executables depending on these libraries could be executed properly. On Windows, via Developer Command Prompt for Visual Studio: msbuild all_build.vcxproj /p:Configuration=Release [cmake]: http://www.cmake.org [pcre]: http://pcre.org editorconfig-core-c-0.12.0/LICENSE000066400000000000000000000033631241642317000164260ustar00rootroot00000000000000Unless otherwise stated, all files are distributed under the Simplified BSD license. The inih(`src/lib/ini.c` and `src/lib/ini.h`) library is distributed under the New BSD license. `src/lib/utarray.h` is distributed under the Revised BSD License. The See LICENSE file for details. Some code in src/lib/misc.c is idstributed under their own license (see the source file for details). Copyright (c) 2011-2013 EditorConfig Team, including Hong Xu and Trey Hunner Copyright (c) 2014 Hong Xu All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. editorconfig-core-c-0.12.0/README.md000066400000000000000000000055651241642317000167060ustar00rootroot00000000000000[EditorConfig][] ============== [![Build Status](https://secure.travis-ci.org/editorconfig/editorconfig-core-c.png?branch=master)](http://travis-ci.org/editorconfig/editorconfig-core-c) EditorConfig makes it easy to maintain the correct coding style when switching between different text editors and between different projects. The EditorConfig project maintains a file format and plugins for various text editors which allow this file format to be read and used by those editors. For information on the file format and supported text editors, see the [EditorConfig website][EditorConfig]. Contributing ------------ This is the README file for the *EditorConfig C Core* codebase. This code produces a program that accepts a filename as input and will look for `.editorconfig` files with sections applicable to the given file, outputting any properties found. When developing an editor plugin for reading EditorConfig files, the EditorConfig core code can be used to locate and parse these files. This means the file locator, INI parser, and file globbing mechanisms can all be maintained in one code base, resulting in less code repitition between plugins. Installation ------------ To install the EditorConfig core from source see the [INSTALL.md][] file. Binary installation packages for the EditorConfig core can be found on [SourceForge downloads page][downloads]. Getting Help ------------ For help with the EditorConfig C Core code, please write to our [mailing list][]. Bugs and feature requests should be submitted to our [issue tracker][]. If you are writing a plugin a language that can import C libraries, you may want to import and use the EditorConfig library directly. If you do use the EditorConfig core as a C library, check the [documentation][] for latest stable version for help. The documentation for latest development version is also available [online][dev doc]. License ------- Unless otherwise stated, all files are distributed under the Simplified BSD license. The inih(`src/lib/ini.c` and `src/lib/ini.h`) library is distributed under the New BSD license. `src/lib/utarray.h` is distributed under the Revised BSD License. The See LICENSE file for details. Some code in src/lib/misc.c is idstributed under their own license (see the source file for details). See the LICENSE file for details. [EditorConfig]: http://editorconfig.org "EditorConfig Homepage" [INSTALL.md]: https://github.com/editorconfig/editorconfig-core-c/blob/master/INSTALL.md [mailing list]: http://groups.google.com/group/editorconfig "EditorConfig mailing list" [issue tracker]: https://github.com/editorconfig/editorconfig/issues [documentation]: http://docs.editorconfig.org/ "EditorConfig C Core documentation" [downloads]: https://sourceforge.net/projects/editorconfig/files/EditorConfig-C-Core/ [dev doc]: http://docs.editorconfig.org/en/master "EditorConfig C Core latest development version documentation" editorconfig-core-c-0.12.0/cmake_uninstall.cmake.in000066400000000000000000000051261241642317000222000ustar00rootroot00000000000000# # Copyright (c) 2011-2012 EditorConfig Team # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # Suppress the warning from cmake 2.6 or higher (list command no longer ignores # empty elements) if(NOT "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.6) cmake_policy(SET CMP0007 NEW) endif(NOT "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.6) if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) string(REGEX REPLACE "\n" ";" files "${files}") list(REVERSE files) foreach(file ${files}) message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") if(EXISTS "$ENV{DESTDIR}${file}") execute_process( COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}" OUTPUT_VARIABLE rm_out RESULT_VARIABLE rm_retval) if(NOT ${rm_retval} EQUAL 0) message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") endif(NOT ${rm_retval} EQUAL 0) else(EXISTS "$ENV{DESTDIR}${file}") message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") endif(EXISTS "$ENV{DESTDIR}${file}") endforeach(file) editorconfig-core-c-0.12.0/doc/000077500000000000000000000000001241642317000161615ustar00rootroot00000000000000editorconfig-core-c-0.12.0/doc/.gitignore000066400000000000000000000000431241642317000201460ustar00rootroot00000000000000/Doxyfile /Doxyfile_cmd /html /man editorconfig-core-c-0.12.0/doc/CMakeLists.txt000066400000000000000000000106171241642317000207260ustar00rootroot00000000000000# # Copyright (c) 2011-2013 EditorConfig Team # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # option(BUILD_DOCUMENTATION "Use Doxygen to create the HTML and man page documentation" ON) # Whether to install the html documentation. Only valid when # BUILD_DOCUMENTATION is set to ON option(INSTALL_HTML_DOC "Install the generated html documentation" OFF) if(BUILD_DOCUMENTATION) find_package(Doxygen) if(DOXYGEN_FOUND) # Generating the major part of the doc. Although it generates # editorconfig.3, we discard that file configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/index.html COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile" MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in DEPENDS ${PROJECT_SOURCE_DIR}/include/editorconfig/editorconfig.h ${PROJECT_SOURCE_DIR}/include/editorconfig/editorconfig_handle.h ${PROJECT_SOURCE_DIR}/logo/logo.png WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) # Generating man page of editorconfig command. Although we have other # .1s other than editorconfig.1, we ignore them configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_cmd.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_cmd) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/man/man1/editorconfig.1 COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_cmd" MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_cmd.in DEPENDS ${PROJECT_SOURCE_DIR}/include/editorconfig/editorconfig.h WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) add_custom_target(doc ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/index.html ${CMAKE_CURRENT_BINARY_DIR}/man/man1/editorconfig.1) # install man pages set(EC_MANPAGE_DIR ${CMAKE_CURRENT_BINARY_DIR}/man) set(EC_MANPAGE3_DIR ${EC_MANPAGE_DIR}/man3) # Since we cannot avoid generating editorconfig.3 with doxygen, which # is the manpage of the command line interface with a manpage number 3, # we need to exclude it when installing man3. install(DIRECTORY ${EC_MANPAGE3_DIR} DESTINATION share/man PATTERN editorconfig.3 EXCLUDE REGEX ._include_. EXCLUDE) set(EC_MANPAGE1_DIR ${EC_MANPAGE_DIR}/man1) install(FILES ${EC_MANPAGE1_DIR}/editorconfig.1 DESTINATION share/man/man1) # "make clean" should also clean generated docs set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "html;man") if(INSTALL_HTML_DOC) install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html" DESTINATION share/doc/editorconfig) endif(INSTALL_HTML_DOC) else(DOXYGEN_FOUND) message(WARNING " Doxygen is not found. Documentation will not be generated.") endif(DOXYGEN_FOUND) endif(BUILD_DOCUMENTATION) editorconfig-core-c-0.12.0/doc/Doxyfile.in000066400000000000000000002156131241642317000203040ustar00rootroot00000000000000# Doxyfile 1.7.4 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" "). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = EditorConfig # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer # a quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = "Configuration file format for defining coding styles in shared projects." # With the PROJECT_LOGO tag one can specify an logo or icon that is # included in the documentation. The maximum height of the logo should not # exceed 55 pixels and the maximum width should not exceed 200 pixels. # Doxygen will copy the logo to the output directory. PROJECT_LOGO = @CMAKE_SOURCE_DIR@/logo/logo.png # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@ # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = @PROJECT_SOURCE_DIR@/include # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful if your file system # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for # Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given extension. # Doxygen has a built-in mapping, but you can override or extend it using this # tag. The format is ext=language, where ext is a file extension, and language # is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, # C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make # doxygen treat .inc files as Fortran files (default is PHP), and .f files as C # (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions # you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. EXTENSION_MAPPING = # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also makes the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. # Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate getter # and setter methods for a property. Setting this option to YES (the default) # will make doxygen replace the get and set methods by a property in the # documentation. This will only work if the methods are indeed getting or # setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and # unions are shown inside the group in which they are included (e.g. using # @ingroup) instead of on a separate page (for HTML and Man pages) or # section (for LaTeX and RTF). INLINE_GROUPED_CLASSES = NO # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum # is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically # be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to # determine which symbols to keep in memory and which to flush to disk. # When the cache is full, less often used symbols will be written to disk. # For small to medium size projects (<1000 input files) the default value is # probably good enough. For larger projects a too small cache size can cause # doxygen to be busy swapping symbols to and from disk most of the time # causing a significant performance penalty. # If the system has enough physical memory increasing the cache will improve the # performance by keeping more symbols in memory. Note that the value works on # a logarithmic scale so increasing the size by one will roughly double the # memory usage. The cache size is given by this formula: # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols SYMBOL_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base # name of the file that contains the anonymous namespace. By default # anonymous namespaces are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen # will list include files with double quotes in the documentation # rather than with sharp brackets. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen # will sort the (brief and detailed) documentation of class members so that # constructors and destructors are listed first. If set to NO (the default) # the constructors will appear in the respective orders defined by # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to # do proper type resolution of all parameters of a function it will reject a # match between the prototype and the implementation of a member function even # if there is only one candidate or it is obvious which candidate to choose # by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen # will still accept a match between prototype and implementation in such cases. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or macro consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and macros in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. # This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. The create the layout file # that represents doxygen's defaults, run doxygen with the -l option. # You can optionally specify a file name after the option, if omitted # DoxygenLayout.xml will be used as the name of the layout file. LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # The WARN_NO_PARAMDOC option can be enabled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = ../include/editorconfig/editorconfig.h ../include/editorconfig/editorconfig_handle.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py # *.f90 *.f *.for *.vhd *.vhdl FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. # If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. # Doxygen will compare the file name with each pattern and apply the # filter if there is a match. # The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty or if # non of the patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) # and it is also possible to disable source filtering for a specific pattern # using *.ext= (so without naming a filter). This option only has effect when # FILTER_SOURCE_FILES is enabled. FILTER_SOURCE_PATTERNS = #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. # Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. Note that when using a custom header you are responsible # for the proper inclusion of any scripts and style sheets that doxygen # needs, which is dependent on the configuration options used. # It is adviced to generate a default header using "doxygen -w html # header.html footer.html stylesheet.css YourConfigFile" and then modify # that header. Note that the header is subject to change so you typically # have to redo this when upgrading to a newer version of doxygen or when changing the value of configuration settings such as GENERATE_TREEVIEW! HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that # the files will be copied as-is; there are no commands or markers available. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. # Doxygen will adjust the colors in the stylesheet and background images # according to this color. Hue is specified as an angle on a colorwheel, # see http://en.wikipedia.org/wiki/Hue for more information. # For instance the value 0 represents red, 60 is yellow, 120 is green, # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. # The allowed range is 0 to 359. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of # the colors in the HTML output. For a value of 0 the output will use # grayscales only. A value of 255 will produce the most vivid colors. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to # the luminance component of the colors in the HTML output. Values below # 100 gradually make the output lighter, whereas values above 100 make # the output darker. The value divided by 100 is the actual gamma applied, # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, # and 100 does not change the gamma. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting # this to NO can help when comparing the output of multiple runs. HTML_TIMESTAMP = YES # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. For this to work a browser that supports # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 # integrated development environment, introduced with OSX 10.5 (Leopard). # To create a documentation set, doxygen will generate a Makefile in the # HTML output directory. Running make will produce the docset in that # directory and running "make install" will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. GENERATE_DOCSET = NO # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple # documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. CHM_INDEX_ENCODING = # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated # that can be used as input for Qt's qhelpgenerator to generate a # Qt Compressed Help (.qch) of the generated HTML documentation. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can # be used to specify the file name of the resulting .qch file. # The path specified is relative to the HTML output folder. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#namespace QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to # add. For more information please see # http://doc.trolltech.com/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see # # Qt Help Project / Custom Filters. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's # filter section matches. # # Qt Help Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can # be used to specify the location of Qt's qhelpgenerator. # If non-empty doxygen will try to run qhelpgenerator on the generated # .qhp file. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files # will be generated, which together with the HTML files, form an Eclipse help # plugin. To install this plugin and make it available under the help contents # menu in Eclipse, the contents of the directory containing the HTML and XML # files needs to be copied into the plugins directory of eclipse. The name of # the directory within the plugins directory should be the same as # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before # the help appears. GENERATE_ECLIPSEHELP = NO # A unique identifier for the eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have # this name. ECLIPSE_DOC_ID = org.doxygen.editorconfig # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values # (range [0,1..20]) that doxygen will group on one line in the generated HTML # documentation. Note that a value of 0 will completely suppress the enum # values from appearing in the overview section. ENUM_VALUES_PER_LINE = 4 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. # If the tag value is set to YES, a side panel will be generated # containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). # Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = YES # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, # and Class Hierarchy pages using a tree view instead of an ordered list. USE_INLINE_TREES = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open # links to external symbols imported via tag files in a separate window. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of Latex formulas included # as images in the HTML documentation. The default is 10. Note that # when you change the font size after a successful doxygen run you need # to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are # not supported properly for IE 6.0, but are supported on all modern browsers. # Note that when changing this option you need to delete any form_*.png files # in the HTML output before the changes have effect. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax # (see http://www.mathjax.org) which uses client side Javascript for the # rendering instead of using prerendered bitmaps. Use this if you do not # have LaTeX installed or if you want to formulas look prettier in the HTML # output. When enabled you also need to install MathJax separately and # configure the path to it using the MATHJAX_RELPATH option. USE_MATHJAX = NO # When MathJax is enabled you need to specify the location relative to the # HTML output directory using the MATHJAX_RELPATH option. The destination # directory should contain the MathJax.js script. For instance, if the mathjax # directory is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the # mathjax.org site, so you can quickly see the result without installing # MathJax, but it is strongly recommended to install a local copy of MathJax # before deployment. MATHJAX_RELPATH = http://www.mathjax.org/mathjax # When the SEARCHENGINE tag is enabled doxygen will generate a search box # for the HTML output. The underlying search engine uses javascript # and DHTML and should work on any modern browser. Note that when using # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets # (GENERATE_DOCSET) there is already a search function so this one should # typically be disabled. For large projects the javascript based search engine # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. SEARCHENGINE = YES # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a PHP enabled web server instead of at the web client # using Javascript. Doxygen will generate the search PHP script and index # file to put on the web server. The advantage of the server # based approach is that it scales better to large projects and allows # full text search. The disadvantages are that it is more difficult to setup # and does not have live searching capabilities. SERVER_BASED_SEARCH = NO #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. # Note that when enabling USE_PDFLATEX this option is only used for # generating bitmaps for formulas in the HTML output, but not in the # Makefile that is written to the output directory. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4 # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for # the generated latex document. The footer should contain everything after # the last chapter. If it is left blank doxygen will generate a # standard footer. Notice: only use this tag if you know what you are doing! LATEX_FOOTER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO # If LATEX_SOURCE_CODE is set to YES then doxygen will include # source code with syntax highlighting in the LaTeX output. # Note that which sources are shown also depends on other settings # such as SOURCE_BROWSER. LATEX_SOURCE_CODE = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = YES # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = YES #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. # This is useful # if you want to understand what is going on. # On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = YES # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # pointed to by INCLUDE_PATH will be searched when a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = EDITORCONFIG_EXPORT # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition that # overrules the definition found in the source code. EXPAND_AS_DEFINED = EDITORCONFIG_EXPORT # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all references to function-like macros # that are alone on a line, have an all uppercase name, and do not end with a # semicolon, because these will confuse the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option also works with HAVE_DOT disabled, but it is recommended to # install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is # allowed to run in parallel. When set to 0 (the default) doxygen will # base this on the number of processors available in the system. You can set it # explicitly to a value larger than 0 to get control over the balance # between CPU load and processing speed. DOT_NUM_THREADS = 0 # By default doxygen will write a font called Helvetica to the output # directory and reference it in all dot files that doxygen generates. # When you want a differently looking font you can specify the font name # using DOT_FONTNAME. You need to make sure dot is able to find the font, # which can be done by putting it in a standard location or by setting the # DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory # containing the font. DOT_FONTNAME = Helvetica # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt. DOT_FONTSIZE = 10 # By default doxygen will tell dot to use the output directory to look for the # FreeSans.ttf font (which doxygen will put there itself). If you specify a # different font using DOT_FONTNAME you can set the path where dot # can find it using this tag. DOT_FONTPATH = # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will generate a graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are svg, png, jpg, or gif. # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the # \mscfile command). MSCFILE_DIRS = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the # number of direct children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, because dot on Windows does not # seem to support this out of the box. Warning: Depending on the platform used, # enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = YES # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES editorconfig-core-c-0.12.0/doc/Doxyfile_cmd.in000066400000000000000000002157731241642317000211360ustar00rootroot00000000000000# This file is used for generating the man page of the editorconfig command # only. For the other part of the document, we are using Doxyfile.in. # Doxyfile 1.7.4 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" "). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = EditorConfig # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer # a quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = "Configuration file format for defining coding styles in shared projects." # With the PROJECT_LOGO tag one can specify an logo or icon that is # included in the documentation. The maximum height of the logo should not # exceed 55 pixels and the maximum width should not exceed 200 pixels. # Doxygen will copy the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@ # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = @PROJECT_SOURCE_DIR@/include # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful if your file system # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for # Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given extension. # Doxygen has a built-in mapping, but you can override or extend it using this # tag. The format is ext=language, where ext is a file extension, and language # is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, # C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make # doxygen treat .inc files as Fortran files (default is PHP), and .f files as C # (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions # you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. EXTENSION_MAPPING = # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also makes the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. # Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate getter # and setter methods for a property. Setting this option to YES (the default) # will make doxygen replace the get and set methods by a property in the # documentation. This will only work if the methods are indeed getting or # setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and # unions are shown inside the group in which they are included (e.g. using # @ingroup) instead of on a separate page (for HTML and Man pages) or # section (for LaTeX and RTF). INLINE_GROUPED_CLASSES = NO # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum # is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically # be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to # determine which symbols to keep in memory and which to flush to disk. # When the cache is full, less often used symbols will be written to disk. # For small to medium size projects (<1000 input files) the default value is # probably good enough. For larger projects a too small cache size can cause # doxygen to be busy swapping symbols to and from disk most of the time # causing a significant performance penalty. # If the system has enough physical memory increasing the cache will improve the # performance by keeping more symbols in memory. Note that the value works on # a logarithmic scale so increasing the size by one will roughly double the # memory usage. The cache size is given by this formula: # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols SYMBOL_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base # name of the file that contains the anonymous namespace. By default # anonymous namespaces are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen # will list include files with double quotes in the documentation # rather than with sharp brackets. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen # will sort the (brief and detailed) documentation of class members so that # constructors and destructors are listed first. If set to NO (the default) # the constructors will appear in the respective orders defined by # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to # do proper type resolution of all parameters of a function it will reject a # match between the prototype and the implementation of a member function even # if there is only one candidate or it is obvious which candidate to choose # by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen # will still accept a match between prototype and implementation in such cases. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or macro consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and macros in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. # This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. The create the layout file # that represents doxygen's defaults, run doxygen with the -l option. # You can optionally specify a file name after the option, if omitted # DoxygenLayout.xml will be used as the name of the layout file. LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # The WARN_NO_PARAMDOC option can be enabled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = ../include/editorconfig/editorconfig.h ../include/editorconfig/editorconfig_handle.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py # *.f90 *.f *.for *.vhd *.vhdl FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. # If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. # Doxygen will compare the file name with each pattern and apply the # filter if there is a match. # The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty or if # non of the patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) # and it is also possible to disable source filtering for a specific pattern # using *.ext= (so without naming a filter). This option only has effect when # FILTER_SOURCE_FILES is enabled. FILTER_SOURCE_PATTERNS = #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. # Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = NO # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. Note that when using a custom header you are responsible # for the proper inclusion of any scripts and style sheets that doxygen # needs, which is dependent on the configuration options used. # It is adviced to generate a default header using "doxygen -w html # header.html footer.html stylesheet.css YourConfigFile" and then modify # that header. Note that the header is subject to change so you typically # have to redo this when upgrading to a newer version of doxygen or when changing the value of configuration settings such as GENERATE_TREEVIEW! HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that # the files will be copied as-is; there are no commands or markers available. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. # Doxygen will adjust the colors in the stylesheet and background images # according to this color. Hue is specified as an angle on a colorwheel, # see http://en.wikipedia.org/wiki/Hue for more information. # For instance the value 0 represents red, 60 is yellow, 120 is green, # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. # The allowed range is 0 to 359. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of # the colors in the HTML output. For a value of 0 the output will use # grayscales only. A value of 255 will produce the most vivid colors. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to # the luminance component of the colors in the HTML output. Values below # 100 gradually make the output lighter, whereas values above 100 make # the output darker. The value divided by 100 is the actual gamma applied, # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, # and 100 does not change the gamma. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting # this to NO can help when comparing the output of multiple runs. HTML_TIMESTAMP = YES # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. For this to work a browser that supports # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 # integrated development environment, introduced with OSX 10.5 (Leopard). # To create a documentation set, doxygen will generate a Makefile in the # HTML output directory. Running make will produce the docset in that # directory and running "make install" will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. GENERATE_DOCSET = NO # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple # documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. CHM_INDEX_ENCODING = # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated # that can be used as input for Qt's qhelpgenerator to generate a # Qt Compressed Help (.qch) of the generated HTML documentation. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can # be used to specify the file name of the resulting .qch file. # The path specified is relative to the HTML output folder. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#namespace QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to # add. For more information please see # http://doc.trolltech.com/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see # # Qt Help Project / Custom Filters. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's # filter section matches. # # Qt Help Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can # be used to specify the location of Qt's qhelpgenerator. # If non-empty doxygen will try to run qhelpgenerator on the generated # .qhp file. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files # will be generated, which together with the HTML files, form an Eclipse help # plugin. To install this plugin and make it available under the help contents # menu in Eclipse, the contents of the directory containing the HTML and XML # files needs to be copied into the plugins directory of eclipse. The name of # the directory within the plugins directory should be the same as # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before # the help appears. GENERATE_ECLIPSEHELP = NO # A unique identifier for the eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have # this name. ECLIPSE_DOC_ID = org.doxygen.editorconfig # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values # (range [0,1..20]) that doxygen will group on one line in the generated HTML # documentation. Note that a value of 0 will completely suppress the enum # values from appearing in the overview section. ENUM_VALUES_PER_LINE = 4 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. # If the tag value is set to YES, a side panel will be generated # containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). # Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = YES # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, # and Class Hierarchy pages using a tree view instead of an ordered list. USE_INLINE_TREES = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open # links to external symbols imported via tag files in a separate window. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of Latex formulas included # as images in the HTML documentation. The default is 10. Note that # when you change the font size after a successful doxygen run you need # to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are # not supported properly for IE 6.0, but are supported on all modern browsers. # Note that when changing this option you need to delete any form_*.png files # in the HTML output before the changes have effect. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax # (see http://www.mathjax.org) which uses client side Javascript for the # rendering instead of using prerendered bitmaps. Use this if you do not # have LaTeX installed or if you want to formulas look prettier in the HTML # output. When enabled you also need to install MathJax separately and # configure the path to it using the MATHJAX_RELPATH option. USE_MATHJAX = NO # When MathJax is enabled you need to specify the location relative to the # HTML output directory using the MATHJAX_RELPATH option. The destination # directory should contain the MathJax.js script. For instance, if the mathjax # directory is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the # mathjax.org site, so you can quickly see the result without installing # MathJax, but it is strongly recommended to install a local copy of MathJax # before deployment. MATHJAX_RELPATH = http://www.mathjax.org/mathjax # When the SEARCHENGINE tag is enabled doxygen will generate a search box # for the HTML output. The underlying search engine uses javascript # and DHTML and should work on any modern browser. Note that when using # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets # (GENERATE_DOCSET) there is already a search function so this one should # typically be disabled. For large projects the javascript based search engine # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. SEARCHENGINE = YES # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a PHP enabled web server instead of at the web client # using Javascript. Doxygen will generate the search PHP script and index # file to put on the web server. The advantage of the server # based approach is that it scales better to large projects and allows # full text search. The disadvantages are that it is more difficult to setup # and does not have live searching capabilities. SERVER_BASED_SEARCH = NO #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. # Note that when enabling USE_PDFLATEX this option is only used for # generating bitmaps for formulas in the HTML output, but not in the # Makefile that is written to the output directory. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4 # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for # the generated latex document. The footer should contain everything after # the last chapter. If it is left blank doxygen will generate a # standard footer. Notice: only use this tag if you know what you are doing! LATEX_FOOTER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO # If LATEX_SOURCE_CODE is set to YES then doxygen will include # source code with syntax highlighting in the LaTeX output. # Note that which sources are shown also depends on other settings # such as SOURCE_BROWSER. LATEX_SOURCE_CODE = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = YES # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .1 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. # This is useful # if you want to understand what is going on. # On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = YES # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # pointed to by INCLUDE_PATH will be searched when a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = EDITORCONFIG_EXPORT # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition that # overrules the definition found in the source code. EXPAND_AS_DEFINED = EDITORCONFIG_EXPORT # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all references to function-like macros # that are alone on a line, have an all uppercase name, and do not end with a # semicolon, because these will confuse the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option also works with HAVE_DOT disabled, but it is recommended to # install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is # allowed to run in parallel. When set to 0 (the default) doxygen will # base this on the number of processors available in the system. You can set it # explicitly to a value larger than 0 to get control over the balance # between CPU load and processing speed. DOT_NUM_THREADS = 0 # By default doxygen will write a font called Helvetica to the output # directory and reference it in all dot files that doxygen generates. # When you want a differently looking font you can specify the font name # using DOT_FONTNAME. You need to make sure dot is able to find the font, # which can be done by putting it in a standard location or by setting the # DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory # containing the font. DOT_FONTNAME = Helvetica # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt. DOT_FONTSIZE = 10 # By default doxygen will tell dot to use the output directory to look for the # FreeSans.ttf font (which doxygen will put there itself). If you specify a # different font using DOT_FONTNAME you can set the path where dot # can find it using this tag. DOT_FONTPATH = # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will generate a graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are svg, png, jpg, or gif. # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the # \mscfile command). MSCFILE_DIRS = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the # number of direct children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, because dot on Windows does not # seem to support this out of the box. Warning: Depending on the platform used, # enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = YES # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES editorconfig-core-c-0.12.0/include/000077500000000000000000000000001241642317000170375ustar00rootroot00000000000000editorconfig-core-c-0.12.0/include/CMakeLists.txt000066400000000000000000000027131241642317000216020ustar00rootroot00000000000000# # Copyright (c) 2011-2012 EditorConfig Team # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # install(FILES editorconfig/editorconfig.h editorconfig/editorconfig_handle.h DESTINATION include/editorconfig) editorconfig-core-c-0.12.0/include/editorconfig/000077500000000000000000000000001241642317000215135ustar00rootroot00000000000000editorconfig-core-c-0.12.0/include/editorconfig/editorconfig.h000066400000000000000000000311621241642317000243430ustar00rootroot00000000000000/* * Copyright (c) 2011-2013 EditorConfig Team * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /*! * @mainpage EditorConfig C Core Documentation * * This is the documentation of EditorConfig C Core. In this documentation, you * could find the document of the @ref editorconfig and the document of * EditorConfig Core C APIs in editorconfig.h and editorconfig_handle.h. */ /*! * @page editorconfig EditorConfig Command * * @section usage Usage of the `editorconfig` command line tool * * Usage: editorconfig [OPTIONS] FILEPATH1 [FILEPATH2 FILEPATH3 ...] * * FILEPATH can be a hyphen (-) if you want to path(s) to be read from stdin. * Hyphen can also be specified with other file names. In this way, both file * paths from stdin and the paths specified on the command line will be used. * If more than one path specified on the command line, or the paths are * reading from stdin (even only one path is read from stdin), the output * format would be INI format, instead of the simple "key=value" lines. * * @htmlonly * * * * * * * * * * * * * * * * * * * * * * *
-fSpecify conf filename other than ".editorconfig".
-bSpecify version (used by devs to test compatibility).
-h OR --helpPrint this help message.
--versionDisplay version information.
* @endhtmlonly * @manonly * * -f Specify conf filename other than ".editorconfig". * * -b Specify version (used by devs to test compatibility). * * -h OR --help Print this help message. * * --version Display version information. * * @endmanonly * * @section related Related Pages * * @ref editorconfig-format */ /*! * @page editorconfig-format EditorConfig File Format * * @section format EditorConfig File Format * * EditorConfig files use an INI format that is compatible with the format used * by Python ConfigParser Library, but [ and ] are allowed in the section names. * The section names are filepath globs, similar to the format accepted by * gitignore. Forward slashes (/) are used as path separators and semicolons (;) * or octothorpes (#) are used for comments. Comments should go individual lines. * EditorConfig files should be UTF-8 encoded, with either CRLF or LF line * separators. * * Filename globs containing path separators (/) match filepaths in the same * way as the filename globs used by .gitignore files. Backslashes (\\) are * not allowed as path separators. * * A semicolon character (;) starts a line comment that terminates at the end * of the line. Line comments and blank lines are ignored when parsing. * Comments may be added to the ends of non-empty lines. An octothorpe * character (#) may be used instead of a semicolon to denote the start of a * comment. * * @section file-location Filename and Location * * When a filename is given to EditorConfig a search is performed in the * directory of the given file and all parent directories for an EditorConfig * file (named ".editorconfig" by default). All found EditorConfig files are * searched for sections with section names matching the given filename. The * search will stop if an EditorConfig file is found with the root property set * to true or when reaching the root filesystem directory. * * Files are read top to bottom and the most recent rules found take * precedence. If multiple EditorConfig files have matching sections, the rules * from the closer EditorConfig file are read last, so properties in closer * files take precedence. * * @section patterns Wildcard Patterns * * Section names in EditorConfig files are filename globs that support pattern * matching through Unix shell-style wildcards. These filename globs recognize * the following as special characters for wildcard matching: * * @htmlonly * * * * * * * * *
*Matches any string of characters, except path separators (/)
**Matches any string of characters
?Matches any single character
[seq]Matches any single character in seq
[!seq]Matches any single character not in seq
{s1,s2,s3}Matches any of the strings given (separated by commas, can be nested)
{num1..num2}Matches any integer numbers between num1 and num2, where num1 and num2 can be either positive or negative
* @endhtmlonly * @manonly * * Matches any string of characters, except path separators (/) * * ** Matches any string of characters * * ? Matches any single character * * [seq] Matches any single character in seq * * [!seq] Matches any single character not in seq * * {s1,s2,s3} Matches any of the strings given (separated by commas, can be nested) * * {num1..num2} Matches any integer numbers between num1 and num2, where num1 and num2 can be either positive or negative * * @endmanonly * * The backslash character (\) can be used to escape a character so it is not interpreted as a special character. * * @section properties Supported Properties * * EditorConfig file sections contain properties, which are name-value pairs separated by an equal sign (=). EditorConfig plugins will ignore unrecognized property names and properties with invalid values. * * Here is the list of all property names understood by EditorConfig and all valid values for these properties: * *
    *
  • indent_style: set to "tab" or "space" to use hard tabs or soft tabs respectively. The values are case insensitive.
  • *
  • indent_size: a whole number defining the number of columns used for each indentation level and the width of soft tabs (when supported). If this equals to "tab", the indent_size will be set to the tab size, which should be tab_width if tab_width is specified, or the tab size set by editor if tab_width is not specified. The values are case insensitive.
  • *
  • tab_width: a whole number defining the number of columns used to represent a tab character. This defaults to the value of indent_size and should not usually need to be specified.
  • *
  • end_of_line: set to "lf", "cr", or "crlf" to control how line breaks are represented. The values are case insensitive.
  • *
  • charset: set to "latin1", "utf-8", "utf-8-bom", "utf-16be" or "utf-16le" to control the character set. Use of "utf-8-bom" is discouraged.
  • *
  • trim_trailing_whitespace: set to "true" to remove any whitespace characters preceeding newline characters and "false" to ensure it doesn't.
  • *
  • insert_final_newline: set to "true" ensure file ends with a newline when saving and "false" to ensure it doesn't.
  • *
  • root: special property that should be specified at the top of the file outside of any sections. Set to "true" to stop .editorconfig files search on current file. The value is case insensitive.
  • *
* * Property names are case insensitive and all property names are lowercased when parsing. */ /*! * @file editorconfig/editorconfig.h * @brief Header file of EditorConfig. * * Related page: @ref editorconfig-format * * @author EditorConfig Team */ #ifndef __EDITORCONFIG_EDITORCONFIG_H__ #define __EDITORCONFIG_EDITORCONFIG_H__ /* When included from a user program, EDITORCONFIG_EXPORT may not be defined, * and we define it here*/ #ifndef EDITORCONFIG_EXPORT # define EDITORCONFIG_EXPORT #endif #include #ifdef __cplusplus extern "C" { #endif /*! * @brief Parse editorconfig files corresponding to the file path given by * full_filename, and related information is input and output in h. * * An example is available at * src/bin/main.c * in EditorConfig C Core source code. * * @param full_filename The full path of a file that is edited by the editor * for which the parsing result is. * * @param h The @ref editorconfig_handle to be used and returned from this * function (including the parsing result). The @ref editorconfig_handle should * be created by editorconfig_handle_init(). * * @retval 0 Everything is OK. * * @retval "Positive Integer" A parsing error occurs. The return value would be * the line number of parsing error. err_file obtained from h by calling * editorconfig_handle_get_err_file() will also be filled with the file path * that caused the parsing error. * * @retval "Negative Integer" Some error occured. See below for the reason of * the error for each return value. * * @retval EDITORCONFIG_PARSE_NOT_FULL_PATH The full_filename is not a full * path name. * * @retval EDITORCONFIG_PARSE_MEMORY_ERROR A memory error occurs. * * @retval EDITORCONFIG_PARSE_VERSION_TOO_NEW The required version specified in * @ref editorconfig_handle is greater than the current version. * */ EDITORCONFIG_EXPORT int editorconfig_parse(const char* full_filename, editorconfig_handle h); /*! * @brief Get the error message from the error number returned by * editorconfig_parse(). * * An example is available at * src/bin/main.c * in EditorConfig C Core source code. * * @param err_num The error number that is used to obtain the error message. * * @return The error message corresponding to err_num. */ EDITORCONFIG_EXPORT const char* editorconfig_get_error_msg(int err_num); /*! * editorconfig_parse() return value: the full_filename parameter of * editorconfig_parse() is not a full path name */ #define EDITORCONFIG_PARSE_NOT_FULL_PATH (-2) /*! * editorconfig_parse() return value: a memory error occurs. */ #define EDITORCONFIG_PARSE_MEMORY_ERROR (-3) /*! * editorconfig_parse() return value: the required version specified in @ref * editorconfig_handle is greater than the current version. */ #define EDITORCONFIG_PARSE_VERSION_TOO_NEW (-4) /*! * @brief Get the version number of EditorConfig. * * An example is available at * src/bin/main.c * in EditorConfig C Core source code. * * @param major If not null, the integer pointed by major will be filled with * the major version of EditorConfig. * * @param minor If not null, the integer pointed by minor will be filled with * the minor version of EditorConfig. * * @param subminor If not null, the integer pointed by subminor will be filled * with the subminor version of EditorConfig. * * @return None. */ EDITORCONFIG_EXPORT void editorconfig_get_version(int* major, int* minor, int* subminor); /*! * @brief Get the version suffix. * * @return The version suffix, such as "-development" for a development * version, empty string for a stable version. */ EDITORCONFIG_EXPORT const char* editorconfig_get_version_suffix(void); #ifdef __cplusplus } #endif #endif /* !__EDITORCONFIG_EDITORCONFIG_H__ */ editorconfig-core-c-0.12.0/include/editorconfig/editorconfig_handle.h000066400000000000000000000145461241642317000256650ustar00rootroot00000000000000/* * Copyright (c) 2011-2012 EditorConfig Team * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /*! * @file editorconfig/editorconfig_handle.h * @brief Header file of EditorConfig handle. * * @author EditorConfig Team */ #ifndef __EDITORCONFIG_EDITORCONFIG_HANDLE_H__ #define __EDITORCONFIG_EDITORCONFIG_HANDLE_H__ /* When included from a user program, EDITORCONFIG_EXPORT may not be defined, * and we define it here*/ #ifndef EDITORCONFIG_EXPORT # define EDITORCONFIG_EXPORT #endif #ifdef __cplusplus extern "C" { #endif /*! * @brief The editorconfig handle object type */ typedef void* editorconfig_handle; /*! * @brief Create and intialize a default editorconfig_handle object. * * @retval NULL Failed to create the editorconfig_handle object. * * @retval non-NULL The created editorconfig_handle object is returned. */ EDITORCONFIG_EXPORT editorconfig_handle editorconfig_handle_init(void); /*! * @brief Destroy an editorconfig_handle object * * @param h The editorconfig_handle object needs to be destroyed. * * @retval zero The editorconfig_handle object is destroyed successfully. * * @retval non-zero Failed to destroy the editorconfig_handle object. */ EDITORCONFIG_EXPORT int editorconfig_handle_destroy(editorconfig_handle h); /*! * @brief Get the err_file field of an editorconfig_handle object * * @param h The editorconfig_handle object whose err_file needs to be obtained. * * @retval NULL No error file exists. * * @retval non-NULL The pointer to the path of the file caused the parsing * error is returned. */ EDITORCONFIG_EXPORT const char* editorconfig_handle_get_err_file(editorconfig_handle h); /*! * @brief Get the version fields of an editorconfig_handle object. * * @param h The editorconfig_handle object whose version field need to be * obtained. * * @param major If not null, the integer pointed by major will be filled with * the major version field of the editorconfig_handle object. * * @param minor If not null, the integer pointed by minor will be filled with * the minor version field of the editorconfig_handle object. * * @param subminor If not null, the integer pointed by subminor will be filled * with the subminor version field of the editorconfig_handle object. * * @return None. */ EDITORCONFIG_EXPORT void editorconfig_handle_get_version(const editorconfig_handle h, int* major, int* minor, int* subminor); /*! * @brief Set the version fields of an editorconfig_handle object. * * @param h The editorconfig_handle object whose version fields need to be set. * * @param major If not less than 0, the major version field will be set to * major. If this parameter is less than 0, the major version field of the * editorconfig_handle object will remain unchanged. * * @param minor If not less than 0, the minor version field will be set to * minor. If this parameter is less than 0, the minor version field of the * editorconfig_handle object will remain unchanged. * * @param subminor If not less than 0, the subminor version field will be set to * subminor. If this parameter is less than 0, the subminor version field of the * editorconfig_handle object will remain unchanged. * * @return None. */ EDITORCONFIG_EXPORT void editorconfig_handle_set_version(const editorconfig_handle h, int major, int minor, int subminor); /*! * @brief Set the conf_file_name field of an editorconfig_handle object. * * @param h The editorconfig_handle object whose conf_file_name field needs to * be set. * * @param conf_file_name The new value of the conf_file_name field of the * editorconfig_handle object. * * @return None. */ EDITORCONFIG_EXPORT void editorconfig_handle_set_conf_file_name(editorconfig_handle h, const char* conf_file_name); /*! * @brief Get the conf_file_name field of an editorconfig_handle object. * * @param h The editorconfig_handle object whose conf_file_name field needs to * be obtained. * * @return The value of the conf_file_name field of the editorconfig_handle * object. */ EDITORCONFIG_EXPORT const char* editorconfig_handle_get_conf_file_name(const editorconfig_handle h); /*! * @brief Get the nth name and value fields of an editorconfig_handle object. * * @param h The editorconfig_handle object whose name and value fields need to * be obtained. * * @param n The zero-based index of the name and value fields to be obtained. * * @param name If not null, *name will be set to point to the obtained name. * * @param value If not null, *value will be set to point to the obtained value. * * @return None. */ EDITORCONFIG_EXPORT void editorconfig_handle_get_name_value(const editorconfig_handle h, int n, const char** name, const char** value); /*! * @brief Get the count of name and value fields of an editorconfig_handle * object. * * @param h The editorconfig_handle object whose count of name and value fields * need to be obtained. * * @return the count of name and value fields of the editorconfig_handle * object. */ EDITORCONFIG_EXPORT int editorconfig_handle_get_name_value_count(const editorconfig_handle h); #ifdef __cplusplus } #endif #endif /* !__EDITORCONFIG_EDITORCONFIG_HANDLE_H__ */ editorconfig-core-c-0.12.0/logo/000077500000000000000000000000001241642317000163545ustar00rootroot00000000000000editorconfig-core-c-0.12.0/logo/logo.png000066400000000000000000000155101241642317000200240ustar00rootroot00000000000000‰PNG  IHDRiZ»lx9sRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEÜ5 ) èÌÈIDATxÚí]yXUÕÞ~×>34EEÐÔìšI^}ÌõzKË!S?+µ2›®=Ú½ŸšiZ~ešC™ZÞ¨´Ì!µ,-@ÅQ‘Id8pÆõ~œ½éàˆˆ¢Åû<ûsàì½öz÷oýæuþ0è À À1iJÕ÷êQˆð,€ x™£ÀBo×›·é¸ï0 Àß4÷óóCß¾}A«Õ*222ššÊ´´4÷{<©~fUý³}ã1@>Èyóæ±°°P:ºÃjµ2??ŸsæÌ‘:NªRU àÑú)¼q°===ùâ‹/J«ÕJ»ÝÎ;wrüøñìÖ­[·nÍöíÛ³{÷îœ6m¿ÿþ{–––ràÀÒÃÃÎhU?µ¿8€½{÷–?þø£$É]»v166¶Šòôð`ÓÆÙ&<œ5">ÿüó$ÉU«Viõ^ý”Ö¦Ò"RµÒ8sæLYTTD’\ºt)6lHìÞ­gN›Æ/Ö¬aÒ¶mLùñGf$'3íÀŽ}úiàÇÌãdzY³fð[ýÌÖ|ì dbb"N'IrÆŒ4À×&Ndy~>çÏ“¥¥U²2–çå±uË–Œeqq1;wîL©õS[{x«E‹üõ×_$YVVÆ3f z='ŒKÚídi)eIÉE$É’RJ9íµ×d‡¨(šÍfvïÞ½ž¤ZăÁÀÄÄÄ’4›Í|öÙg%6 æ‚9s$¥¼,A•‡Ý.ÍŸ/½½½I’}úô!€ÃõÓ{ýh ç™gžq”$9zôh €‹“’’$Ë˯J,)!IçÓÆI___’d\\$ÖOñõc•¢(Òb±H’|ùå—%„`lL ­……’¥¥òªôI޶mÚȸ¸8æææ²]»v°´~Н}”Ìž=›$ågŸ}FNÇ>ññ¤ÕJ–•]•• ÉòrçþÄD›‡Ñ(·nÝʤ¤$*ŠB5”T @’Édbqq±ÌÈÈ`ã&Mä#>(mçÎÉê¤Òzîœã©¡Cm^^^$É7ÞxCó“zÕOuÍñN›6$Ù¥KFFD8rÒÓÕYÞª,s¥¥2qóf;9vìX:NvéÒEsz[ÔOuÍñ[“&M˜––&'O™"ýýüœiši6WWz*gq±Œ¸óN €{÷îe^^ž&E‡×OuÍÐ Ÿ~úi™™™)F#çÍše'i—%%.s5 Ò~·Zùú¤IÀ~ýúÑb±È©S§:T’0ÔOwÍ0ÁÛÛ›û÷ïwŒ5JvîÔI²¢ÂYiTw™³Z¹wûv ‡‡‡\·nsrrl^^^@€~õS]sìmÛ¶­3;;Ûn2™äÎ-[œ,/—ÕÖCêÏ’œþ­[7111$i4h]•¢Ÿxßn£ÜBKÝ=ö˜cÓw߉–Í›‹Î: 8BÁêœ@€8_R‚‚ÂB+V¬ ÎM›6)œÞP^/5 ¨Ø¶m[EÇŽ+/–•KœÙL–—ÿq˜Íee ÇŒÍÍ›7Ë}ûöÙ…šÁpàvý-2Ž» ƒµøüywÿýRøù)–‚¤gf"7/v»Š¢À××:EN§C@@‚A²R’|±ðÝw±gÏ9jÔ(AR+Ly²ž¤šÃ@!„ؼy³¾q£FrÛŽüjÒ$ËÈ@Ii)*** ¥„€Ñ`€ F£ÕQFØäææ*ÅÅÅÚ5¾p¤~Áª9b”úøøØ7n¬™Éµu8XØð6€Ö·Û‰[@’ßu¥éõz6kÖLøúúÂÇÇžžžhܸ1BBBàç燖-[ÂÃÃ(((@y¹ËÈÏÏDZcÇP\\ŒÂÂBX­VšÍfáp\²ÜîˆJØ·pÕ<Ô“t4£9—>>>xã7п„„„ÀÇÇçšO˜““ƒÌÌL#''IIIøá‡pâÄ ¨Òå~ß©>ƒ«n/¹~Q»4ÞV'NFFF299¹2E.¥¤”’N§³ò÷ꢢ¢‚'Ožä–-[8a¶lÙ’äKb.€ùõt\Œ>ÚDEGG³¨¨¨F¤TçÐÎI’‹…ï¿ÿ>ì®»¤›³^O ]á*Tä=÷Ü#O:E’7„ Ë‘E’ÇŽãˆ#Ø¢E wÂÊŒöWÖIaªÂîШQ#þðâ}ûöRBˆ›;íz‡ÆŠ+°páBÚívm‡ÌðéuX­Ý©¯µºô|N8u«†¡þW{jµ¢ÅµÌ]‹dÙl6&%%1""Bº-gU©¯.x®NŽBÕ‰v—R‡*©*AG|tµkÜlIj¨Þ¸^¯×#++ !!! YçOI(ЇÃáÇcíÚµTçg€çT_ërs`€§„Ðëõ0lݺµ¸ï¾ûàïï)%Ž=Šââbdff"''‡$…Óét9êÀ/^°O5fê ‹4EýÉ'ŸÜ=t­’¥Ád2¹K@Ô%î%Àué¦N§c§NœãÇw®_¿^–––Vžër–gvv6,XÀŽ;ÒÓÓS»ÖêJ’zØ  ÀêÕ«áááqÓõPu%jûöíxðÁiµZ€ÝêøÀÀÓ†¸î½÷ÞŠÑ£G~øaÅd2‰´´4$&&"55ÙÙÙ°Ùíp8P„€‡‡|ýüˆèèhôéÓÍš5ÃÒ¥KùÚk¯‰’’-ŒõuÙ½i$™T‚ÚµhÑ‚6l:tpFÅ­×"E‡Ï>û,–/_®½=@ €épÕHxàôéÓå /¼€   Ýž={0uêT¤¤¤ °°~¾¾²UË–Âßß_DFD@§ÓA’(:Iûö!¯ :vÄâÅ‹qüøq4‡Ã àyUªnÞ u:|ë­·n¹eîrNñºuë.ô£*   çòåË¥ftÌš5Kû?GŸ^½Îoÿæ3+*ì´XÈŠŠªé–òr×{Ròç;yw—.ôôôäçŸÎ… j×Út3 ꦚ|øá‡ëÔš»Ö£¬¬L«x­$KQùÀÈŸ~ú‰$yäÈ9jÔ(°ÆÆÄdûí·4’NZ,òJ©©¥ûU²Þ™3‡ܸq#GŒAé"nA:Û´ÌÍͽ-¤È]š¦L™¢T€|饗dYYIrîܹ²¡ÉD¢”.^° ËvîÜ9VT¥¥ZÚ¿úÅ3 ¿ùïi2™øã?J???€ñ„î“4Àë0|øp :TÔ…ÓZS½$„€Á`À矻ÝN"**J(ŠÂþýû‹µk׊ø˜¹õë¯EÜøët::ªŸ,X/´kI‰6: =-;ví’‘‘‘9ÉÉÉÞ¾¬Í£*ž<à~ÕîŒ=ZØíö*Ý þÑÕ¢wß}7¼¼¼*¬%K–`À€"++ ógÍâ†ÿþW 5’ÔiŸS?+®õZ÷õè!Îää(íÚµk Z×ZA€ïPµ-¿r‰ðòòâ}÷ÝÇ_|‘ß|ó ÓÓÓ«ø·êò§ùM111%gªU¶×RY{¥’hºj )KKeqq1Ÿþy8 °6$©1€åjT;®¶ýÇd€———xá…УG$$$ _¿~èÝ»7ÆŒƒ7BEQné¥ïᇮòú•^ÀÔW^ÊÊjÅPë0´@è¹wï^-ŒT+ˆw»@õ½ñjEvéÒ…yyy´Ûí,,,äîÝ»9bÄêõz*ŠÂÈÈH~üñÇ•’åt:o)É"É'NTJPX³f,ÉÉ©- r?S––:%%,:s¦X½ÞïükãÖj–¨™ÎFž`Ðëõbܸq†¢( D=°råJØív¬[·AAA5j‚ƒƒñÉ'ŸÀjµÞR:KJ‰-Z C×ó—}útâ !H¡ètÎí;vœSß®ÀÚ É¢þ\£þl WK?š6mŠ‘#GV¹!’R‚$ˆ;w"###GŽÄôéÓ…¥K—âÌ™3•Ë`]’¥;>>¾ò½äÔT®ÖÆ¥Y‚¼½-ÿ·dI ú§ŸØjƒ$ui;­¾n§Y–O=õÔ%'Y»q¬æÍ›ã­·ÞÂ/¿ü‚×_o¾ù&âãã1{ölW~CQê”(’6lXåëÝ{öz}mJ’Ë4ñËîÝåÛwìðSç4 €µ6H*S¥Iª¯G@PP˜4iÒUŸRmò¿ýö[Œ9§OŸÆ¯¿þŠ¡C‡bòäÉˆŽŽÆ¡C‡êÔ·"‰°°0„„„¸HÚ»ÐéjóüB‡eä3Ϩú(ÀÞÚºF\…íTýD?~|µMÜ¢¢"†††Òhô ¹dÉ’ä¡C‡ÀþóŸ´X,uj@˜Íf>Ü· ¬4¿kë%%rüرZ’°P äVfJ¯gÔLä`·ó¡‡ºª>ѤãwÞA^^>V­ú:Ü%w8­V+Û¶m‹Ñ£Gcݺu0›Íuj@xyy¡S§N€sEEµ*EÐé¸.!­\©°«R4OûŸÚ(3.Q“y‹Tý„»îºKtìØ±ª7}â›o6âÉ'Gá¾ûâpöì4oÞTJ)‹Å‚ãÇ#,, AAA•z¬&~Õõ†£„hÒ¤I퇞¼½EâÖ­üŸ „Å•»:£æªÌµ)I°N ­{µI‚ƒ«×ñ˜‘‘ÇaìØ‰ÈÉÉfAA.:wî¬èõzX­V=zÙÙÙxà°jÕ*(Š‚E‹¡U«VhР<==áéé ///x{{Ãd2¡W¯^øÇ?þÙ³gcÆ HOO‡¢(•!w]x-¨QÁæe òòÂÎmÛÿÐC(v%ûNxÈÍ«5IÒ ^œ>}999hܸ1 Cå .ô-H"==Vøû`îÜ"0° ¤ ±ÿ~:t½{÷†¢(7n¦L™«ÕŠüü|<ñĘ0a|||`6›‘••…ÜÜ\>|'NœÀ‚ ›› 0 èÙ³':wîŒÞ½{£}ûöðõõ…··7 C%iWò t×i0¸ŸùÒ¥3~¼R ¸ZsõÙÕ Ac¸ âeÓ¦MÉ–-[òå—_æ¦M›˜••ÅËáí·ß&Θ1B9þ|æääðý÷ß—3f +**H’GeÏž= €QQQ¼Ù¢EsFFFrâĉœ9s&Èèèh°[·nœ8q"wìØÁ“'O^T“paäa×®] ¦ªJ*¾y¸ZÛ¨–?*={VN}õU÷Db‚ê_ÞPôWu,XÀüü|®_¿ž>ú(M&CBBÃqãÆñ½÷ÞãÆ¹eË?~œ3gά ¹4oÞœC‡ehh(CCC¹dÉjN§“v»Ó§O'Î;÷’¹)ÍbLJJbƒ #6¬’„¼¼<îÝ»—K–,aß¾}Ù AÞqÇ5j“’’ª„¨ÜIúí·ß* )U’deH§¤Äy%rÔͨøû¯¿2îþûµ{.0 €ßÍ0~&C­˜Ñö£s:´Z­,**â·ß~Ëçž{ŽQQQU"ÉnÉ´Ê£]»v\½z5KKKép8ªDÉ- _yåàÏ?ÿ|Ù"I³gÏ8~ùe"}}ý9pàÀ‹¤Ä}Œ‹-âwÜAìÚµ+Oœ8Qåü$™œœÌ°°0¶wK튗%%7Â.}X,\»bƒ5 JÄMÜÁ²Ôm7ûöí[åÆ.,ëu/eJMMebb"?ûì3®Y³†¨Ö’³páB Õj½”I’üè£(„àæÍûùöÛ‹ €~øá%Ïë>ÆÔÔTvîÜ™z½ž^{Ï»û@ÕAmmÄÀ˜1c.é]¨”CCCzYSùJ¦»ÉdBÓ¦M¯èw-^üî¿ÿê„×^{0xðà+~†$"##ñÈ# ++ ………èÞ½;üüüЪU+DFFBQ”——‹Ò²²²â3g¼‚‚tÂh\í ®L¬¢v»ípr2>xИðõ×ørãF¨5 ;áê$¹¦®ÃÚˆµL0ß××—EEEB§»qy!RRR?ü ¨âÿ!PRRRe ×;îÛ·K¼ú꫘3gÎ}%­Þ®°°wß}7òóó±zõjœ>}›6mÂîÝ»YTT$@¯×[Ûµm«„…†êÚ¶n-|}}iµZE§caa¡8|ô¨Ì:yR9}æ H®ð9\µå™ø£Gê¦b=Ž;VÞŒ,+IöêÕ‹ 4 Íf»h ³Z­ö¶mÛ:5׳gO™——'¯åüC† ¡ŸŸÕR`Úl6–——såÊ•;€sÚù…BHõ'ÕˆÁioÅ-° ƒA·mÛvÓÒÙ¤ŸŸ‡^%¯é¤¥K—ÊîÝ»ïŸ4iRq^^ž¼œŽ»ÜùÿóŸÿÐd2]X",h04I¸®Æïd©ÄYÔ8æ“n~c£†‡‡Ë¬¬¬›’QÕ&2!!ÞÞÞ|÷Ýw/Ìê^d©8Ny-uàñññ|ôÑG«dŠív;ÿõ¯iÊß÷BU©– Lð\½W§¼ I]“ô>þøã,++»i$iºxñb !8nܸJ‡×ýÔñ\Ašõ¸mÛ¶*ç;þ¼f¢;på­o¼Ô2‚·ÕÌêfíë’$N:•Õ]Rj³¯Èf³ñßÿþ7F#M&—.]z‘žºÚƒ£áøñãìׯpäÈ‘U"ÉiÓ¦iþÍÇÕ´ŠÁÕÆB¸Êê÷pzzzV¶±ÔU¡Èš5kMÔëõ0`—-[ƃòðáÃù¤{ÍÁrÔbóV] v3………·µ$‘äÖ­[Ù¦Mw‚ÞÄm¸-õ…€mÚ´‘‡ã¶iRvï{r:´X,rÖ¬YNEQ´½„ÊáÚžæ–CMœÙèÓ§pë½- !Ìf3~ùåL™2E$%% 5Rý½šVHû³ÔºvízQ¹ï¥ o¿G'wïÞ-Þ{ï=¬_¿žjAâ/æÂ•Þ¾eQ’ ¼¼¯¾ú*Ìf3<==‹‡z¨2DS—d¹KާNâK/½$¾ûî;––– Õ×›à ¸Zwþt؃ËlñܰaCΛ7¹¹¹´Ùl• ·ºèƒµÙlÌÏÏç›o¾) ƒ¦w$\_ºx/þä8èNÌÇãÀGa»¶mµB !øøãsÆ ÌÉÉ‘$euRص±¹`EE÷ïß/gΜÉ&Mš¸[mÙþ7©Z´®ñ³öE¼¸aýz’dÖáÃ\»r%‡ì¾w  ‹ŠŠÕIc_9N§S®Y³†ƒ bàU¢Z1â]ð§8{ölúúúÒÔ°!׬XAÚl¤ÍFÛ¹sÌ?q‚+?ü:E¡Ü¸q£t¹S7dA¹páB¶hÑ‚^^^N7r²¼×¶gúÛyÂk2x+øûûcß¾}ˆÅ#Gâý%Kðôˆhd2$š5mŠaC†`åêÕBÝ8½ÆÀ¥^;9rD 6 )))Z½›WëÈ‹píÐò—Å|u#I¦¥¥1..Žâ‚â{¡( çˆ#¨m)]Óå̽šGJÉ””ùÌ3Ï\¸]:\uÆ?Û„×ÄF `1¤§§#<<ÅÅÅHLLÄÞ½{¡×ëa2™Ð¡C„‡‡#,, :®Zíø5UPXXˆC‡aíÚµLHH@nn®v²ß¬†«Û°þ›]ÜÃBä=÷ÜC­BT{Êív;ÇU˪ܥãBóàÁƒüàƒ8bÄFDDÐd2ÑÏÏÏ]ZÀõåX~¸u¾Qí–‘¤Æpm4¨í#„ÀÀ@öèÑýû÷±±±hРÁPó4îR¤‡œ={©©©HKKÃÑ£GqàÀ9räRcÒtŽ®Îì7ÔPÎ_5 ôP­¼;ª£ÿ›4i"ŒFc¥â?wîÊÊÊ®´iŸ]õkòáÚ–í$€lG-xüÙI‚êwÜ WYm+¸z>Mpõ+નNѺU5—3UËìˆJÄI¸Šß þêú¥¶‚k:Õœ×á/ÚÕ~T‰Ô¬1¨:ä¬*-N¸RÕU‚ìõj¿*þ2;¦ùm3`IEND®B`‚editorconfig-core-c-0.12.0/mk-src-archive.sh000077500000000000000000000006361241642317000205730ustar00rootroot00000000000000#!/bin/sh # Make a source archive for the current EditorConfig version. if [ $# -ne 1 ]; then echo "Usage: "$0" VERSION" echo "" echo "e.g. "$0" 0.10.0" echo exit fi curl -L https://raw.github.com/Kentzo/git-archive-all/master/git-archive-all | python - editorconfig-core-c-$*.tar.gz curl -L https://raw.github.com/Kentzo/git-archive-all/master/git-archive-all | python - editorconfig-core-c-$*.zip editorconfig-core-c-0.12.0/src/000077500000000000000000000000001241642317000162035ustar00rootroot00000000000000editorconfig-core-c-0.12.0/src/.gitignore000066400000000000000000000000061241642317000201670ustar00rootroot00000000000000/auto editorconfig-core-c-0.12.0/src/CMakeLists.txt000066400000000000000000000054731241642317000207540ustar00rootroot00000000000000# # Copyright (c) 2011-2012 EditorConfig Team # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # include(CheckFunctionExists) include(CheckTypeSize) find_package(PCRE REQUIRED) if(PCRE_FOUND) include_directories(BEFORE ${PCRE_INCLUDE_DIRS}) option(PCRE_STATIC "Turn this option ON when linking to PCRE static library" OFF) endif() # config.h will be generated in src/auto, we should include it. include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/auto) check_function_exists(strcasecmp HAVE_STRCASECMP) check_function_exists(strdup HAVE_STRDUP) check_function_exists(stricmp HAVE_STRICMP) check_function_exists(strndup HAVE_STRNDUP) check_function_exists(strlwr HAVE_STRLWR) check_type_size(_Bool HAVE__BOOL) check_type_size("const char*" HAVE_CONST) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/auto/config.h) include_directories(BEFORE "${PROJECT_SOURCE_DIR}/include") # MSVC_MD option option(MSVC_MD "Use /MD instead of /MT flag when compiling with Microsoft Visual C++. This option takes no effect when using compilers other than Microsoft Visual C++." OFF) # replace all /MD with /MT for msvc if MSVC_MD is off if(MSVC AND NOT MSVC_MD) foreach(flag_var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) if(${flag_var} MATCHES "/MD") string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") endif(${flag_var} MATCHES "/MD") endforeach(flag_var) endif() add_subdirectory(lib) add_subdirectory(bin) editorconfig-core-c-0.12.0/src/bin/000077500000000000000000000000001241642317000167535ustar00rootroot00000000000000editorconfig-core-c-0.12.0/src/bin/.gitignore000066400000000000000000000000171241642317000207410ustar00rootroot00000000000000/editorconfig* editorconfig-core-c-0.12.0/src/bin/CMakeLists.txt000066400000000000000000000046261241642317000215230ustar00rootroot00000000000000# # Copyright (c) 2011-2012 EditorConfig Team # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # link_directories(${CMAKE_ARCHIVE_OUTPUT_DIR}) # for gcc, BUILD_STATICALLY_LINKED_EXE_DEFAULT_VAL is OFF if(CMAKE_COMPILER_IS_GNUCC) set(BUILD_STATICALLY_LINKED_EXE_DEFAULT_VAL OFF) endif(CMAKE_COMPILER_IS_GNUCC) option(BUILD_STATICALLY_LINKED_EXE "Link the standard library statically when building the executable.(Only valid for gcc)" ${BUILD_STATICALLY_LINKED_EXE_DEFAULT_VAL}) if(CMAKE_COMPILER_IS_GNUCC) if(BUILD_STATICALLY_LINKED_EXE) # Add -static for linker if we want a statically linked executable set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static") endif(BUILD_STATICALLY_LINKED_EXE) endif(CMAKE_COMPILER_IS_GNUCC) set(editorconfig_BINSRCS main.c) # targets add_executable(editorconfig_bin ${editorconfig_BINSRCS}) target_link_libraries(editorconfig_bin editorconfig_static) set_target_properties(editorconfig_bin PROPERTIES OUTPUT_NAME editorconfig VERSION ${editorconfig_VERSION_MAJOR}.${editorconfig_VERSION_MINOR}.${editorconfig_VERSION_SUBMINOR}) install(TARGETS editorconfig_bin RUNTIME DESTINATION bin) editorconfig-core-c-0.12.0/src/bin/main.c000066400000000000000000000205411241642317000200450ustar00rootroot00000000000000/* * Copyright (c) 2011-2012 EditorConfig Team * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" #include #include #include #include #include #include static void version(FILE* stream) { int major; int minor; int subminor; editorconfig_get_version(&major, &minor, &subminor); fprintf(stream,"EditorConfig C Core Version %d.%d.%d%s\n", major, minor, subminor, editorconfig_get_version_suffix()); } static void usage(FILE* stream, const char* command) { fprintf(stream, "Usage: %s [OPTIONS] FILEPATH1 [FILEPATH2 FILEPATH3 ...]\n", command); fprintf(stream, "FILEPATH can be a hyphen (-) if you want to path(s) to be read from stdin.\n"); fprintf(stream, "\n"); fprintf(stream, "-f Specify conf filename other than \".editorconfig\".\n"); fprintf(stream, "-b Specify version (used by devs to test compatibility).\n"); fprintf(stream, "-h OR --help Print this help message.\n"); fprintf(stream, "-v OR --version Display version information.\n"); } int main(int argc, const char* argv[]) { char* full_filename = NULL; int err_num; int i; int name_value_count; editorconfig_handle eh; char** file_paths = NULL; int path_count; /* the count of path input*/ /* Will be a EditorConfig file name if -f is specified on command line */ const char* conf_filename = NULL; int version_major = -1; int version_minor = -1; int version_subminor = -1; /* File names read from stdin are put in this buffer temporarily */ char file_line_buffer[FILENAME_MAX + 1]; _Bool f_flag = 0; _Bool b_flag = 0; if (argc <= 1) { version(stderr); usage(stderr, argv[0]); exit(1); } for (i = 1; i < argc; ++i) { if (b_flag) { char* pos; int ver; int ver_pos = 0; char* argvi = strdup(argv[i]); b_flag = 0; /* convert the argument -b into a version number */ pos = strtok(argvi, "."); while (pos != NULL) { ver = atoi(pos); switch(ver_pos) { case 0: version_major = ver; break; case 1: version_minor = ver; break; case 2: version_subminor = ver; break; default: fprintf(stderr, "Invalid version number: %s\n", argv[i]); exit(1); } ++ ver_pos; pos = strtok(NULL, "."); } free(argvi); } else if (f_flag) { f_flag = 0; conf_filename = argv[i]; } else if (strcmp(argv[i], "--version") == 0 || strcmp(argv[i], "-v") == 0) { version(stdout); exit(0); } else if (strcmp(argv[i], "--help") == 0 || strcmp(argv[i], "-h") == 0) { version(stdout); usage(stdout, argv[0]); exit(0); } else if (strcmp(argv[i], "-b") == 0) b_flag = 1; else if (strcmp(argv[i], "-f") == 0) f_flag = 1; else if (i < argc) { /* If there are other args left, regard them as file names */ path_count = argc - i; file_paths = (char**) malloc(path_count * sizeof(char*)); for (; i < argc; ++i) { file_paths[path_count + i - argc] = strdup(argv[i]); if (file_paths[path_count - argc + i] == NULL) { fprintf(stderr, "Error: Unable to obtain the full path.\n"); exit(1); } } } else { usage(stderr, argv[0]); exit(1); } } if (!file_paths) { /* No filename is set */ usage(stderr, argv[0]); exit(1); } /* Go through all the files in the argument list */ for (i = 0; i < path_count; ++i) { int j; full_filename = file_paths[i]; /* Print the file path first, with [], if more than one file is * specified */ if (path_count > 1 && strcmp(full_filename, "-")) printf("[%s]\n", full_filename); if (!strcmp(full_filename, "-")) { int len; /* Read a line from stdin. If EOF encountered, continue */ if (!fgets(file_line_buffer, FILENAME_MAX + 1, stdin)) { if (!feof(stdin)) perror("Failed to read stdin"); free(full_filename); continue; } -- i; /* trim the trailing space characters */ len = strlen(file_line_buffer) - 1; while (len >= 0 && isspace(file_line_buffer[len])) -- len; if (len < 0) /* we meet a blank line */ continue; file_line_buffer[len + 1] = '\0'; full_filename = file_line_buffer; while (isspace(*full_filename)) ++ full_filename; full_filename = strdup(full_filename); printf("[%s]\n", full_filename); } /* Initialize the EditorConfig handle */ eh = editorconfig_handle_init(); /* Set conf file name */ if (conf_filename) editorconfig_handle_set_conf_file_name(eh, conf_filename); /* Set the version to be compatible with */ editorconfig_handle_set_version(eh, version_major, version_minor, version_subminor); /* parsing the editorconfig files */ err_num = editorconfig_parse(full_filename, eh); free(full_filename); if (err_num != 0) { /* print error message */ fputs(editorconfig_get_error_msg(err_num), stderr); if (err_num > 0) fprintf(stderr, "\"%s\"", editorconfig_handle_get_err_file(eh)); fprintf(stderr, "\n"); exit(1); } /* print the result */ name_value_count = editorconfig_handle_get_name_value_count(eh); for (j = 0; j < name_value_count; ++j) { const char* name; const char* value; editorconfig_handle_get_name_value(eh, j, &name, &value); printf("%s=%s\n", name, value); } if (editorconfig_handle_destroy(eh) != 0) { fprintf(stderr, "Failed to destroy editorconfig_handle.\n"); exit(1); } } free(file_paths); exit(0); } editorconfig-core-c-0.12.0/src/config.h.in000066400000000000000000000046401241642317000202320ustar00rootroot00000000000000/* * Copyright (c) 2011-2012 EditorConfig Team * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __CONFIG_H__ #define __CONFIG_H__ #ifndef UNIX #cmakedefine UNIX #endif #ifndef WIN32 #cmakedefine WIN32 #endif #cmakedefine HAVE_STRCASECMP #cmakedefine HAVE_STRDUP #cmakedefine HAVE_STRICMP #cmakedefine HAVE_STRNDUP #cmakedefine HAVE_STRLWR #cmakedefine HAVE__BOOL #cmakedefine HAVE_CONST #ifndef HAVE_CONST # define const #endif #cmakedefine CMAKE_COMPILER_IS_GNUCC #cmakedefine MSVC #cmakedefine PCRE_STATIC /* For gcc, we define _GNU_SOURCE to use gcc extensions */ #ifdef CMAKE_COMPILER_IS_GNUCC # ifndef _GNU_SOURCE # define _GNU_SOURCE # endif /* _GNU_SOURCE */ #endif /* CMAKE_COMPILER_IS_GNUCC */ #ifdef MSVC # define _CRT_SECURE_NO_WARNINGS 1 # pragma warning(disable: 4996) #endif /* _Bool type */ #ifndef HAVE__BOOL # define _Bool signed char #endif #define editorconfig_VERSION_MAJOR @editorconfig_VERSION_MAJOR@ #define editorconfig_VERSION_MINOR @editorconfig_VERSION_MINOR@ #define editorconfig_VERSION_SUBMINOR @editorconfig_VERSION_SUBMINOR@ #define editorconfig_VERSION_SUFFIX "@editorconfig_VERSION_SUFFIX@" #endif /* !__CONFIG_H__ */ editorconfig-core-c-0.12.0/src/lib/000077500000000000000000000000001241642317000167515ustar00rootroot00000000000000editorconfig-core-c-0.12.0/src/lib/.gitignore000066400000000000000000000001321241642317000207350ustar00rootroot00000000000000/editorconfig.dll /editorconfig_static.lib /libeditorconfig.so* /libeditorconfig_static.a editorconfig-core-c-0.12.0/src/lib/CMakeLists.txt000066400000000000000000000047361241642317000215230ustar00rootroot00000000000000# # Copyright (c) 2011-2012 EditorConfig Team # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # set(editorconfig_LIBSRCS ec_glob.c editorconfig.c editorconfig_handle.c ini.c misc.c ) add_library(editorconfig_shared SHARED ${editorconfig_LIBSRCS}) set_target_properties(editorconfig_shared PROPERTIES OUTPUT_NAME editorconfig SOVERSION 0 VERSION ${editorconfig_VERSION_MAJOR}.${editorconfig_VERSION_MINOR}.${editorconfig_VERSION_SUBMINOR}) # We need to link Shwapi since we use PathIsRelative if(WIN32) target_link_libraries(editorconfig_shared Shlwapi) endif() target_link_libraries(editorconfig_shared ${PCRE_LIBRARIES}) add_library(editorconfig_static STATIC ${editorconfig_LIBSRCS}) set_target_properties(editorconfig_static PROPERTIES OUTPUT_NAME editorconfig_static VERSION ${editorconfig_VERSION_MAJOR}.${editorconfig_VERSION_MINOR}.${editorconfig_VERSION_SUBMINOR}) # We need to link Shwapi since we use PathIsRelative if(WIN32) target_link_libraries(editorconfig_static Shlwapi) endif() target_link_libraries(editorconfig_static ${PCRE_LIBRARIES}) install(TARGETS editorconfig_shared editorconfig_static RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) editorconfig-core-c-0.12.0/src/lib/ec_glob.c000066400000000000000000000253431241642317000205160ustar00rootroot00000000000000/* * Copyright (c) 2014 Hong Xu * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "global.h" #include #include #include #include #include "utarray.h" #include "misc.h" #include "ec_glob.h" typedef struct int_pair { int num1; int num2; } int_pair; static const UT_icd ut_int_pair_icd = {sizeof(int_pair),NULL,NULL,NULL}; /* concatenate the string then move the pointer to the end */ #define STRING_CAT(p, string, end) do { \ size_t string_len = strlen(string); \ if (p + string_len >= end) \ return -1; \ strcat(p, string); \ p += string_len; \ } while(0) #define PATTERN_MAX 300 /* * Whether the string matches the given glob pattern */ EDITORCONFIG_LOCAL int ec_glob(const char *pattern, const char *string) { size_t i; int_pair * p; char * c; char pcre_str[2 * PATTERN_MAX] = "^"; char * p_pcre; char * pcre_str_end; int brace_level = 0; bool is_in_bracket = false; const char * error_msg; int erroffset; pcre * re; int rc; int * pcre_result; size_t pcre_result_len; char l_pattern[2 * PATTERN_MAX]; int pattern_length = strlen(pattern); bool are_brace_paired; UT_array * nums; /* number ranges */ int ret = 0; strcpy(l_pattern, pattern); p_pcre = pcre_str + 1; pcre_str_end = pcre_str + 2 * PATTERN_MAX; { int left_count = 0; int right_count = 0; for (c = l_pattern; *c; ++ c) { if (*c == '\\' && *(c+1) != '\0') { ++ c; continue; } if (*c == '}') ++ right_count; if (*c == '{') ++ left_count; } are_brace_paired = (right_count == left_count); } /* used to search for {num1..num2} case */ re = pcre_compile("^\\{[\\+\\-]?\\d+\\.\\.[\\+\\-]?\\d+\\}$", 0, &error_msg, &erroffset, NULL); if (!re) /* failed to compile */ return -1; utarray_new(nums, &ut_int_pair_icd); for (c = l_pattern; *c; ++ c) { switch (*c) { case '\\': /* also skip the next one */ if (*(c+1) != '\0') { *(p_pcre ++) = *(c++); *(p_pcre ++) = *c; } else STRING_CAT(p_pcre, "\\\\", pcre_str_end); break; case '?': *(p_pcre ++) = '.'; break; case '*': if (*(c+1) == '*') /* case of ** */ { STRING_CAT(p_pcre, ".*", pcre_str_end); ++ c; } else /* case of * */ STRING_CAT(p_pcre, "[^\\/]*", pcre_str_end); break; case '[': if (is_in_bracket) /* inside brackets, we really mean bracket */ { STRING_CAT(p_pcre, "\\[", pcre_str_end); break; } { /* check whether we have slash within the bracket */ bool has_slash = false; char * cc; for (cc = c; *cc && *cc != ']'; ++ cc) { if (*cc == '\\' && *(cc+1) != '\0') { ++ cc; continue; } if (*cc == '/') { has_slash = true; break; } } /* if we have slash in the brackets, just do it literally */ if (has_slash) { char * right_bracket = strchr(c, ']'); strcat(p_pcre, "\\"); strncat(p_pcre, c, right_bracket - c); strcat(p_pcre, "\\]"); p_pcre += strlen(p_pcre); c = right_bracket; break; } } is_in_bracket = true; if (*(c+1) == '!') /* case of [!...] */ { STRING_CAT(p_pcre, "[^", pcre_str_end); ++ c; } else *(p_pcre ++) = '['; break; case ']': is_in_bracket = false; *(p_pcre ++) = *c; break; case '-': if (is_in_bracket) /* in brackets, - indicates range */ *(p_pcre ++) = *c; else STRING_CAT(p_pcre, "\\-", pcre_str_end); break; case '{': if (!are_brace_paired) { STRING_CAT(p_pcre, "\\{", pcre_str_end); break; } /* Check the case of {single}, where single can be empty */ { char * cc; bool is_single = true; for (cc = c + 1; *cc != '\0' && *cc != '}'; ++ cc) { if (*cc == '\\' && *(cc+1) != '\0') { ++ cc; continue; } if (*cc == ',') { is_single = false; break; } } if (*cc == '\0') is_single = false; if (is_single) /* escape the { and the corresponding } */ { const char * double_dots; int_pair pair; int pcre_res[3]; /* Check the case of {num1..num2} */ rc = pcre_exec(re, NULL, c, (int) (cc - c + 1), 0, 0, pcre_res, 3); if (rc < 0) /* not {num1..num2} case */ { STRING_CAT(p_pcre, "\\{", pcre_str_end); memmove(cc+1, cc, strlen(cc) + 1); *cc = '\\'; break; } /* Get the range */ double_dots = strstr(c, ".."); pair.num1 = atoi(c + 1); pair.num2 = atoi(double_dots + 2); utarray_push_back(nums, &pair); STRING_CAT(p_pcre, "([\\+\\-]?\\d+)", pcre_str_end); c = cc; break; } } ++ brace_level; STRING_CAT(p_pcre, "(?:", pcre_str_end); break; case '}': if (!are_brace_paired) { STRING_CAT(p_pcre, "\\}", pcre_str_end); break; } -- brace_level; *(p_pcre ++) = ')'; break; case ',': if (brace_level > 0) /* , inside {...} */ *(p_pcre ++) = '|'; else STRING_CAT(p_pcre, "\\,", pcre_str_end); break; case '/': // /**/ case, match both single / and /anything/ if (!strncmp(c, "/**/", 4)) { STRING_CAT(p_pcre, "(\\/|\\/.*\\/)", pcre_str_end); c += 3; } else STRING_CAT(p_pcre, "\\/", pcre_str_end); break; default: if (!isalnum(*c)) *(p_pcre ++) = '\\'; *(p_pcre ++) = *c; } } *(p_pcre ++) = '$'; pcre_free(re); /* ^\\d+\\.\\.\\d+$ */ re = pcre_compile(pcre_str, 0, &error_msg, &erroffset, NULL); if (!re) /* failed to compile */ return -1; pcre_result_len = 3 * (utarray_len(nums) + 1); pcre_result = (int *) calloc(pcre_result_len, sizeof(int_pair)); rc = pcre_exec(re, NULL, string, (int) strlen(string), 0, 0, pcre_result, pcre_result_len); if (rc < 0) /* failed to match */ { int ret; if (rc == PCRE_ERROR_NOMATCH) ret = EC_GLOB_NOMATCH; else ret = rc; pcre_free(re); free(pcre_result); utarray_free(nums); return ret; } /* Whether the numbers are in the desired range? */ for(p = (int_pair *) utarray_front(nums), i = 1; p; ++ i, p = (int_pair *) utarray_next(nums, p)) { const char * substring_start = string + pcre_result[2 * i]; size_t substring_length = pcre_result[2 * i + 1] - pcre_result[2 * i]; char * num_string; int num; /* we don't consider 0digits such as 010 as matched */ if (*substring_start == '0') break; num_string = strndup(substring_start, substring_length); num = atoi(num_string); free(num_string); if (num < p->num1 || num > p->num2) /* not matched */ break; } if (p != NULL) /* numbers not matched */ ret = EC_GLOB_NOMATCH; pcre_free(re); free(pcre_result); utarray_free(nums); return ret; } editorconfig-core-c-0.12.0/src/lib/ec_glob.h000066400000000000000000000032211241642317000205120ustar00rootroot00000000000000/* * Copyright (c) 2014 Hong Xu * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __EC_GLOB_H__ #define __EC_GLOB_H__ #include "global.h" #define EC_GLOB_NOMATCH 1 /* Match failed. */ #ifdef __cplusplus extern "C" { #endif EDITORCONFIG_LOCAL int ec_glob(const char * pattern, const char * string); #ifdef __cplusplus } #endif #endif /* !__EC_GLOB_H__ */ editorconfig-core-c-0.12.0/src/lib/editorconfig.c000066400000000000000000000415021241642317000215730ustar00rootroot00000000000000/* * Copyright (c) 2011-2012 EditorConfig Team * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "global.h" #include "editorconfig.h" #include "misc.h" #include "ini.h" #include "ec_glob.h" /* could be used to fast locate these properties in an * array_editorconfig_name_value */ typedef struct { const editorconfig_name_value* indent_style; const editorconfig_name_value* indent_size; const editorconfig_name_value* tab_width; } special_property_name_value_pointers; typedef struct { editorconfig_name_value* name_values; int current_value_count; int max_value_count; special_property_name_value_pointers spnvp; } array_editorconfig_name_value; typedef struct { char* full_filename; char* editorconfig_file_dir; array_editorconfig_name_value array_name_value; } handler_first_param; /* * Set the special pointers for a name */ static void set_special_property_name_value_pointers( const editorconfig_name_value* nv, special_property_name_value_pointers* spnvp) { /* set speical pointers */ if (!strcmp(nv->name, "indent_style")) spnvp->indent_style = nv; else if (!strcmp(nv->name, "indent_size")) spnvp->indent_size = nv; else if (!strcmp(nv->name, "tab_width")) spnvp->tab_width = nv; } /* * Set the name and value of a editorconfig_name_value structure */ static void set_name_value(editorconfig_name_value* nv, const char* name, const char* value, special_property_name_value_pointers* spnvp) { if (name) nv->name = strdup(name); if (value) nv->value = strdup(value); /* lowercase the value when the name is one of the following */ if (!strcmp(nv->name, "end_of_line") || !strcmp(nv->name, "indent_style") || !strcmp(nv->name, "indent_size") || !strcmp(nv->name, "insert_final_newline") || !strcmp(nv->name, "trim_trailing_whitespace") || !strcmp(nv->name, "charset")) strlwr(nv->value); /* set speical pointers */ set_special_property_name_value_pointers(nv, spnvp); } /* * reset special property name value pointers */ static void reset_special_property_name_value_pointers( array_editorconfig_name_value* aenv) { int i; for (i = 0; i < aenv->current_value_count; ++ i) set_special_property_name_value_pointers( &aenv->name_values[i], &aenv->spnvp); } /* * Find the editorconfig_name_value from name in a editorconfig_name_value * array. */ static int find_name_value_from_name(const editorconfig_name_value* env, int count, const char* name) { int i; for (i = 0; i < count; ++i) if (!strcmp(env[i].name, name)) /* found */ return i; return -1; } /* initialize array_editorconfig_name_value */ static void array_editorconfig_name_value_init( array_editorconfig_name_value* aenv) { memset(aenv, 0, sizeof(array_editorconfig_name_value)); } static int array_editorconfig_name_value_add( array_editorconfig_name_value* aenv, const char* name, const char* value) { #define VALUE_COUNT_INITIAL 30 #define VALUE_COUNT_INCREASEMENT 10 int name_value_pos; /* always use name_lwr but not name, since property names are case * insensitive */ char name_lwr[MAX_PROPERTY_NAME]; /* For the first time we came here, aenv->name_values is NULL */ if (aenv->name_values == NULL) { aenv->name_values = (editorconfig_name_value*)malloc( sizeof(editorconfig_name_value) * VALUE_COUNT_INITIAL); if (aenv->name_values == NULL) return -1; aenv->max_value_count = VALUE_COUNT_INITIAL; aenv->current_value_count = 0; } /* name_lwr is the lowercase property name */ strlwr(strcpy(name_lwr, name)); name_value_pos = find_name_value_from_name( aenv->name_values, aenv->current_value_count, name_lwr); if (name_value_pos >= 0) { /* current name has already been used */ free(aenv->name_values[name_value_pos].value); set_name_value(&aenv->name_values[name_value_pos], (const char*)NULL, value, &aenv->spnvp); return 0; } /* if the space is not enough, allocate more before add the new name and * value */ if (aenv->current_value_count >= aenv->max_value_count) { editorconfig_name_value* new_values; int new_max_value_count; new_max_value_count = aenv->current_value_count + VALUE_COUNT_INCREASEMENT; new_values = (editorconfig_name_value*)realloc(aenv->name_values, sizeof(editorconfig_name_value) * new_max_value_count); if (new_values == NULL) /* error occured */ return -1; aenv->name_values = new_values; aenv->max_value_count = new_max_value_count; /* reset special pointers */ reset_special_property_name_value_pointers(aenv); } set_name_value(&aenv->name_values[aenv->current_value_count], name_lwr, value, &aenv->spnvp); ++ aenv->current_value_count; return 0; #undef VALUE_COUNT_INITIAL #undef VALUE_COUNT_INCREASEMENT } static void array_editorconfig_name_value_clear( array_editorconfig_name_value* aenv) { int i; for (i = 0; i < aenv->current_value_count; ++i) { free(aenv->name_values[i].name); free(aenv->name_values[i].value); } free(aenv->name_values); } /* * Accept INI property value and store known values in handler_first_param * struct. */ static int ini_handler(void* hfp, const char* section, const char* name, const char* value) { handler_first_param* hfparam = (handler_first_param*)hfp; /* prepend ** to pattern */ char* pattern; /* root = true, clear all previous values */ if (*section == '\0' && !strcasecmp(name, "root") && !strcasecmp(value, "true")) { array_editorconfig_name_value_clear(&hfparam->array_name_value); array_editorconfig_name_value_init(&hfparam->array_name_value); return 1; } /* pattern would be: /dir/of/editorconfig/file[double_star]/[section] if * section does not contain '/', or /dir/of/editorconfig/file[section] * if section starts with a '/', or /dir/of/editorconfig/file/[section] if * section contains '/' but does not start with '/' */ pattern = (char*)malloc( strlen(hfparam->editorconfig_file_dir) * sizeof(char) + sizeof("**/") + strlen(section) * sizeof(char)); if (!pattern) return 0; strcpy(pattern, hfparam->editorconfig_file_dir); if (strchr(section, '/') == NULL) /* No / is found, append '[star][star]/' */ strcat(pattern, "**/"); else if (*section != '/') /* The first char is not '/' but section contains '/', append a '/' */ strcat(pattern, "/"); strcat(pattern, section); if (ec_glob(pattern, hfparam->full_filename) == 0) { if (array_editorconfig_name_value_add(&hfparam->array_name_value, name, value)) { free(pattern); return 0; } } free(pattern); return 1; } /* * Split an absolute file path into directory and filename parts. * * If absolute_path does not contain a path separator, set directory and * filename to NULL pointers. */ static void split_file_path(char** directory, char** filename, const char* absolute_path) { char* path_char = strrchr(absolute_path, '/'); if (path_char == NULL) { if (directory) *directory = NULL; if (filename) *filename = NULL; return; } if (directory != NULL) { *directory = strndup(absolute_path, (size_t)(path_char - absolute_path)); } if (filename != NULL) { *filename = strndup(path_char+1, strlen(path_char)-1); } } /* * Return the number of slashes in given filename */ static int count_slashes(const char* filename) { int slash_count; for (slash_count = 0; *filename != '\0'; filename++) { if (*filename == '/') { slash_count++; } } return slash_count; } /* * Return an array of full filenames for files in every directory in and above * the given path with the name of the relative filename given. */ static char** get_filenames(const char* path, const char* filename) { char* currdir; char* currdir1; char** files; int slashes = count_slashes(path); int i; files = (char**) calloc(slashes+1, sizeof(char*)); currdir = strdup(path); for (i = slashes - 1; i >= 0; --i) { currdir1 = currdir; split_file_path(&currdir, NULL, currdir1); free(currdir1); files[i] = malloc(strlen(currdir) + strlen(filename) + 2); strcpy(files[i], currdir); strcat(files[i], "/"); strcat(files[i], filename); } free(currdir); files[slashes] = NULL; return files; } /* * version number comparison */ static int editorconfig_compare_version( const struct editorconfig_version* v0, const struct editorconfig_version* v1) { /* compare major */ if (v0->major > v1->major) return 1; else if (v0->major < v1->major) return -1; /* compare minor */ if (v0->minor > v1->minor) return 1; else if (v0->minor < v1->minor) return -1; /* compare subminor */ if (v0->subminor > v1->subminor) return 1; else if (v0->subminor < v1->subminor) return -1; return 0; } EDITORCONFIG_EXPORT const char* editorconfig_get_error_msg(int err_num) { if(err_num > 0) return "Failed to parse file."; switch(err_num) { case 0: return "No error occurred."; case EDITORCONFIG_PARSE_NOT_FULL_PATH: return "Input file must be a full path name."; case EDITORCONFIG_PARSE_MEMORY_ERROR: return "Memory error."; case EDITORCONFIG_PARSE_VERSION_TOO_NEW: return "Required version is greater than the current version."; } return "Unknown error."; } /* * See the header file for the use of this function */ EDITORCONFIG_EXPORT int editorconfig_parse(const char* full_filename, editorconfig_handle h) { handler_first_param hfp; char** config_file; char** config_files; int err_num; int i; struct editorconfig_handle* eh = (struct editorconfig_handle*)h; struct editorconfig_version cur_ver; struct editorconfig_version tmp_ver; /* get current version */ editorconfig_get_version(&cur_ver.major, &cur_ver.minor, &cur_ver.subminor); /* if version is set to 0.0.0, we set it to current version */ if (eh->ver.major == 0 && eh->ver.minor == 0 && eh->ver.subminor == 0) eh->ver = cur_ver; if (editorconfig_compare_version(&eh->ver, &cur_ver) > 0) return EDITORCONFIG_PARSE_VERSION_TOO_NEW; if (!eh->err_file) { free(eh->err_file); eh->err_file = NULL; } /* if eh->conf_file_name is NULL, we set ".editorconfig" as the default * conf file name */ if (!eh->conf_file_name) eh->conf_file_name = ".editorconfig"; if (eh->name_values) { /* free name_values */ for (i = 0; i < eh->name_value_count; ++i) { free(eh->name_values[i].name); free(eh->name_values[i].value); } free(eh->name_values); eh->name_values = NULL; eh->name_value_count = 0; } memset(&hfp, 0, sizeof(hfp)); hfp.full_filename = strdup(full_filename); /* return an error if file path is not absolute */ if (!is_file_path_absolute(full_filename)) { return EDITORCONFIG_PARSE_NOT_FULL_PATH; } #ifdef WIN32 /* replace all backslashes with slashes on Windows */ str_replace(hfp.full_filename, '\\', '/'); #endif array_editorconfig_name_value_init(&hfp.array_name_value); config_files = get_filenames(hfp.full_filename, eh->conf_file_name); for (config_file = config_files; *config_file != NULL; config_file++) { split_file_path(&hfp.editorconfig_file_dir, NULL, *config_file); if ((err_num = ini_parse(*config_file, ini_handler, &hfp)) != 0 && /* ignore error caused by I/O, maybe caused by non exist file */ err_num != -1) { eh->err_file = strdup(*config_file); free(*config_file); free(hfp.full_filename); free(hfp.editorconfig_file_dir); return err_num; } free(hfp.editorconfig_file_dir); free(*config_file); } /* value proprocessing */ /* For v0.9 */ SET_EDITORCONFIG_VERSION(&tmp_ver, 0, 9, 0); if (editorconfig_compare_version(&eh->ver, &tmp_ver) >= 0) { /* Set indent_size to "tab" if indent_size is not specified and * indent_style is set to "tab". Only should be done after v0.9 */ if (hfp.array_name_value.spnvp.indent_style && !hfp.array_name_value.spnvp.indent_size && !strcmp(hfp.array_name_value.spnvp.indent_style->value, "tab")) array_editorconfig_name_value_add(&hfp.array_name_value, "indent_size", "tab"); /* Set indent_size to tab_width if indent_size is "tab" and tab_width is * specified. This behavior is specified for v0.9 and up. */ if (hfp.array_name_value.spnvp.indent_size && hfp.array_name_value.spnvp.tab_width && !strcmp(hfp.array_name_value.spnvp.indent_size->value, "tab")) array_editorconfig_name_value_add(&hfp.array_name_value, "indent_size", hfp.array_name_value.spnvp.tab_width->value); } /* Set tab_width to indent_size if indent_size is specified. If version is * not less than 0.9.0, we also need to check when the indent_size is set * to "tab", we should not duplicate the value to tab_width */ if (hfp.array_name_value.spnvp.indent_size && !hfp.array_name_value.spnvp.tab_width && (editorconfig_compare_version(&eh->ver, &tmp_ver) < 0 || strcmp(hfp.array_name_value.spnvp.indent_size->value, "tab"))) array_editorconfig_name_value_add(&hfp.array_name_value, "tab_width", hfp.array_name_value.spnvp.indent_size->value); eh->name_value_count = hfp.array_name_value.current_value_count; if (eh->name_value_count == 0) { /* no value is set, just return 0. */ free(hfp.full_filename); free(config_files); return 0; } eh->name_values = hfp.array_name_value.name_values; eh->name_values = realloc( /* realloc to truncate the unused spaces */ eh->name_values, sizeof(editorconfig_name_value) * eh->name_value_count); if (eh->name_values == NULL) { free(hfp.full_filename); return EDITORCONFIG_PARSE_MEMORY_ERROR; } free(hfp.full_filename); free(config_files); return 0; } /* * See header file */ EDITORCONFIG_EXPORT void editorconfig_get_version(int* major, int* minor, int* subminor) { if (major) *major = editorconfig_VERSION_MAJOR; if (minor) *minor = editorconfig_VERSION_MINOR; if (subminor) *subminor = editorconfig_VERSION_SUBMINOR; } /* * See header file */ EDITORCONFIG_EXPORT const char* editorconfig_get_version_suffix(void) { return editorconfig_VERSION_SUFFIX; } editorconfig-core-c-0.12.0/src/lib/editorconfig.h000066400000000000000000000031151241642317000215760ustar00rootroot00000000000000/* * Copyright (c) 2011-2012 EditorConfig Team * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __EDITORCONFIG_H__ #define __EDITORCONFIG_H__ #include #include "editorconfig_handle.h" typedef struct editorconfig_name_value editorconfig_name_value; #endif /* !__EDITORCONFIG_H__ */ editorconfig-core-c-0.12.0/src/lib/editorconfig_handle.c000066400000000000000000000103231241642317000231030ustar00rootroot00000000000000/* * Copyright (c) 2011-2012 EditorConfig Team * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "editorconfig_handle.h" /* * See header file */ EDITORCONFIG_EXPORT editorconfig_handle editorconfig_handle_init(void) { editorconfig_handle h; h = (editorconfig_handle)malloc(sizeof(struct editorconfig_handle)); if (!h) return (editorconfig_handle)NULL; memset(h, 0, sizeof(struct editorconfig_handle)); return h; } /* * See header file */ EDITORCONFIG_EXPORT int editorconfig_handle_destroy(editorconfig_handle h) { int i; struct editorconfig_handle* eh = (struct editorconfig_handle*)h; if (h == NULL) return 0; /* free name_values */ for (i = 0; i < eh->name_value_count; ++i) { free(eh->name_values[i].name); free(eh->name_values[i].value); } free(eh->name_values); /* free err_file */ if (eh->err_file) free(eh->err_file); /* free eh itself */ free(eh); return 0; } /* * See header file */ EDITORCONFIG_EXPORT const char* editorconfig_handle_get_err_file(const editorconfig_handle h) { return ((const struct editorconfig_handle*)h)->err_file; } /* * See header file */ EDITORCONFIG_EXPORT void editorconfig_handle_get_version(const editorconfig_handle h, int* major, int* minor, int* subminor) { if (major) *major = ((const struct editorconfig_handle*)h)->ver.major; if (minor) *minor = ((const struct editorconfig_handle*)h)->ver.minor; if (subminor) *subminor = ((const struct editorconfig_handle*)h)->ver.subminor; } /* * See header file */ EDITORCONFIG_EXPORT void editorconfig_handle_set_version(editorconfig_handle h, int major, int minor, int subminor) { if (major >= 0) ((struct editorconfig_handle*)h)->ver.major = major; if (minor >= 0) ((struct editorconfig_handle*)h)->ver.minor = minor; if (subminor >= 0) ((struct editorconfig_handle*)h)->ver.subminor = minor; } /* * See header file */ EDITORCONFIG_EXPORT void editorconfig_handle_set_conf_file_name(editorconfig_handle h, const char* conf_file_name) { ((struct editorconfig_handle*)h)->conf_file_name = conf_file_name; } /* * See header file */ EDITORCONFIG_EXPORT const char* editorconfig_handle_get_conf_file_name(const editorconfig_handle h) { return ((const struct editorconfig_handle*)h)->conf_file_name; } EDITORCONFIG_EXPORT void editorconfig_handle_get_name_value(const editorconfig_handle h, int n, const char** name, const char** value) { struct editorconfig_name_value* name_value = &(( const struct editorconfig_handle*)h)->name_values[n]; if (name) *name = name_value->name; if (value) *value = name_value->value; } EDITORCONFIG_EXPORT int editorconfig_handle_get_name_value_count(const editorconfig_handle h) { return ((const struct editorconfig_handle*)h)->name_value_count; } editorconfig-core-c-0.12.0/src/lib/editorconfig_handle.h000066400000000000000000000057521241642317000231220ustar00rootroot00000000000000/* * Copyright (c) 2011-2012 EditorConfig Team * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __EDITORCONFIG_HANDLE_H__ #define __EDITORCONFIG_HANDLE_H__ #include "global.h" #include /*! * @brief A structure containing a name and its corresponding value. * @author EditorConfig Team */ struct editorconfig_name_value { /*! EditorConfig config item's name. */ char* name; /*! EditorConfig config item's value. */ char* value; }; /*! * @brief A structure that descripts version number. * @author EditorConfig Team */ struct editorconfig_version { /*! major version */ int major; /*! minor version */ int minor; /*! subminor version */ int subminor; }; struct editorconfig_handle { /*! * The file name of EditorConfig conf file. If this pointer is set to NULL, * the file name is set to ".editorconfig" by default. */ const char* conf_file_name; /*! * When a parsing error occured, this will point to a file that caused the * parsing error. */ char* err_file; /*! * version number it should act as. Set this to 0.0.0 to act like the * current version. */ struct editorconfig_version ver; /*! Pointer to a list of editorconfig_name_value structures containing * names and values of the parsed result */ struct editorconfig_name_value* name_values; /*! The total count of name_values structures pointed by name_values * pointer */ int name_value_count; }; #endif /* !__EDITORCONFIG_HANDLE_H__ */ editorconfig-core-c-0.12.0/src/lib/global.h000066400000000000000000000055371241642317000203740ustar00rootroot00000000000000/* * Copyright (c) 2011-2012 EditorConfig Team * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __GLOBAL_H__ #define __GLOBAL_H__ #include "config.h" #include #include #include #include /* * Microsoft Visual C++ and some other Windows C Compilers requires exported * functions in shared library to be defined with __declspec(dllexport) * declarator. Also, gcc >= 4 supports hiding symbols that do not need to be * exported. */ #ifdef editorconfig_shared_EXPORTS /* We are building shared lib if defined */ # ifdef WIN32 # ifdef __GNUC__ # define EDITORCONFIG_EXPORT __attribute__ ((dllexport)) # else /* __GNUC__ */ # define EDITORCONFIG_EXPORT __declspec(dllexport) # endif /* __GNUC__ */ # else /* WIN32 */ # if defined(__GNUC__) && __GNUC__ >= 4 # define EDITORCONFIG_EXPORT __attribute__ ((visibility ("default"))) # define EDITORCONFIG_LOCAL __attribute__ ((visibility ("hidden"))) # endif /* __GNUC__ && __GNUC >= 4 */ # endif /* WIN32 */ #endif /* editorconfig_shared_EXPORTS */ /* * For other cases, just define EDITORCONFIG_EXPORT and EDITORCONFIG_LOCAL, to * make compilation successful */ #ifndef EDITORCONFIG_EXPORT # define EDITORCONFIG_EXPORT #endif #ifndef EDITORCONFIG_LOCAL # define EDITORCONFIG_LOCAL #endif /* a macro to set editorconfig_version struct */ #define SET_EDITORCONFIG_VERSION(editorconfig_ver, maj, min, submin) \ do { \ (editorconfig_ver)->major = (maj); \ (editorconfig_ver)->minor = (min); \ (editorconfig_ver)->subminor = (submin); \ } while(0) #endif /* !__GLOBAL_H__ */ editorconfig-core-c-0.12.0/src/lib/ini.c000066400000000000000000000145231241642317000177010ustar00rootroot00000000000000/* inih -- simple .INI file parser The "inih" library is distributed under the New BSD license: Copyright (c) 2009, Brush Technology All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Brush Technology nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY BRUSH TECHNOLOGY ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRUSH TECHNOLOGY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Go to the project home page for more info: http://code.google.com/p/inih/ */ #include "global.h" #include #include #include #include "ini.h" #define MAX_LINE 200 #define MAX_SECTION MAX_SECTION_NAME #define MAX_NAME MAX_PROPERTY_NAME /* Strip whitespace chars off end of given string, in place. Return s. */ static char* rstrip(char* s) { char* p = s + strlen(s); while (p > s && isspace(*--p)) *p = '\0'; return s; } /* Return pointer to first non-whitespace char in given string. */ static char* lskip(const char* s) { while (*s && isspace(*s)) s++; return (char*)s; } /* Return pointer to first char c or ';' comment in given string, or pointer to null at end of string if neither found. ';' must be prefixed by a whitespace character to register as a comment. */ static char* find_char_or_comment(const char* s, char c) { int was_whitespace = 0; while (*s && *s != c && !(was_whitespace && (*s == ';' || *s == '#'))) { was_whitespace = isspace(*s); s++; } return (char*)s; } static char* find_last_char_or_comment(const char* s, char c) { const char* last_char = s; int was_whitespace = 0; while (*s && !(was_whitespace && (*s == ';' || *s == '#'))) { if (*s == c) last_char = s; was_whitespace = isspace(*s); s++; } return (char*)last_char; } /* Version of strncpy that ensures dest (size bytes) is null-terminated. */ static char* strncpy0(char* dest, const char* src, size_t size) { strncpy(dest, src, size); dest[size - 1] = '\0'; return dest; } /* See documentation in header file. */ EDITORCONFIG_LOCAL int ini_parse_file(FILE* file, int (*handler)(void*, const char*, const char*, const char*), void* user) { /* Uses a fair bit of stack (use heap instead if you need to) */ char line[MAX_LINE]; char section[MAX_SECTION] = ""; char prev_name[MAX_NAME] = ""; char* start; char* end; char* name; char* value; int lineno = 0; int error = 0; /* Scan through file line by line */ while (fgets(line, sizeof(line), file) != NULL) { lineno++; start = line; #if INI_ALLOW_BOM if (lineno == 1 && (unsigned char)start[0] == 0xEF && (unsigned char)start[1] == 0xBB && (unsigned char)start[2] == 0xBF) { start += 3; } #endif start = lskip(rstrip(start)); if (*start == ';' || *start == '#') { /* Per Python ConfigParser, allow '#' comments at start of line */ } #if INI_ALLOW_MULTILINE else if (*prev_name && *start && start > line) { /* Non-black line with leading whitespace, treat as continuation of previous name's value (as per Python ConfigParser). */ if (!handler(user, section, prev_name, start) && !error) error = lineno; } #endif else if (*start == '[') { /* A "[section]" line */ end = find_last_char_or_comment(start + 1, ']'); if (*end == ']') { *end = '\0'; strncpy0(section, start + 1, sizeof(section)); *prev_name = '\0'; } else if (!error) { /* No ']' found on section line */ error = lineno; } } else if (*start && (*start != ';' || *start == '#')) { /* Not a comment, must be a name[=:]value pair */ end = find_char_or_comment(start, '='); if (*end != '=') { end = find_char_or_comment(start, ':'); } if (*end == '=' || *end == ':') { *end = '\0'; name = rstrip(start); value = lskip(end + 1); end = find_char_or_comment(value, '\0'); if (*end == ';' || *end == '#') *end = '\0'; rstrip(value); /* Valid name[=:]value pair found, call handler */ strncpy0(prev_name, name, sizeof(prev_name)); if (!handler(user, section, name, value) && !error) error = lineno; } else if (!error) { /* No '=' or ':' found on name[=:]value line */ error = lineno; } } } return error; } /* See documentation in header file. */ EDITORCONFIG_LOCAL int ini_parse(const char* filename, int (*handler)(void*, const char*, const char*, const char*), void* user) { FILE* file; int error; file = fopen(filename, "r"); if (!file) return -1; error = ini_parse_file(file, handler, user); fclose(file); return error; } editorconfig-core-c-0.12.0/src/lib/ini.h000066400000000000000000000070571241642317000177120ustar00rootroot00000000000000/* inih -- simple .INI file parser The "inih" library is distributed under the New BSD license: Copyright (c) 2009, Brush Technology All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Brush Technology nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY BRUSH TECHNOLOGY ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRUSH TECHNOLOGY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Go to the project home page for more info: http://code.google.com/p/inih/ */ #ifndef __INI_H__ #define __INI_H__ #include "global.h" /* Make this header file easier to include in C++ code */ #ifdef __cplusplus extern "C" { #endif #include /* Parse given INI-style file. May have [section]s, name=value pairs (whitespace stripped), and comments starting with ';' (semicolon). Section is "" if name=value pair parsed before any section heading. name:value pairs are also supported as a concession to Python's ConfigParser. For each name=value pair parsed, call handler function with given user pointer as well as section, name, and value (data only valid for duration of handler call). Handler should return nonzero on success, zero on error. Returns 0 on success, line number of first error on parse error (doesn't stop on first error), or -1 on file open error. */ EDITORCONFIG_LOCAL int ini_parse(const char* filename, int (*handler)(void* user, const char* section, const char* name, const char* value), void* user); /* Same as ini_parse(), but takes a FILE* instead of filename. This doesn't close the file when it's finished -- the caller must do that. */ EDITORCONFIG_LOCAL int ini_parse_file(FILE* file, int (*handler)(void* user, const char* section, const char* name, const char* value), void* user); /* Nonzero to allow multi-line value parsing, in the style of Python's ConfigParser. If allowed, ini_parse() will call the handler with the same name for each subsequent line parsed. */ #ifndef INI_ALLOW_MULTILINE #define INI_ALLOW_MULTILINE 0 #endif #define MAX_SECTION_NAME 500 #define MAX_PROPERTY_NAME 500 /* Nonzero to allow a UTF-8 BOM sequence (0xEF 0xBB 0xBF) at the start of the file. See http://code.google.com/p/inih/issues/detail?id=21 */ #ifndef INI_ALLOW_BOM #define INI_ALLOW_BOM 1 #endif #ifdef __cplusplus } #endif #endif /* __INI_H__ */ editorconfig-core-c-0.12.0/src/lib/misc.c000066400000000000000000000205411241642317000200520ustar00rootroot00000000000000/* * Copyright (c) 2011-2012 EditorConfig Team * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "misc.h" #ifdef WIN32 # include #endif #if !defined(HAVE_STRCASECMP) && !defined(HAVE_STRICMP) /* * strcasecmp function from FreeBSD * * Copyright (c) 1987, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include typedef unsigned char u_char; EDITORCONFIG_LOCAL int ec_strcasecmp(const char *s1, const char *s2) { const unsigned char *us1 = (const unsigned char*)s1, *us2 = (const unsigned char*)s2; while (tolower(*us1) == tolower(*us2++)) if (*us1++ == '\0') return (0); return (tolower(*us1) - tolower(*--us2)); } #endif /* !HAVE_STRCASECMP && !HAVE_STRICMP */ #ifndef HAVE_STRDUP /* * strdup function from FreeBSD * * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include EDITORCONFIG_LOCAL char* ec_strdup(const char *str) { size_t len; char* copy; len = strlen(str) + 1; if ((copy = malloc(len)) == NULL) return (NULL); memcpy(copy, str, len); return (copy); } #endif /* !HAVE_STRDUP */ #ifndef HAVE_STRNDUP /* * strndup function from NetBSD * * $NetBSD: strndup.c,v 1.3 2007/01/14 23:41:24 cbiere Exp $ * * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "global.h" #include #include #include EDITORCONFIG_LOCAL char* ec_strndup(const char* str, size_t n) { size_t len; char* copy; for (len = 0; len < n && str[len]; len++) continue; if ((copy = malloc(len + 1)) == NULL) return (NULL); memcpy(copy, str, len); copy[len] = '\0'; return (copy); } #endif /* HAVE_STRNDUP */ /* * replace oldc with newc in the string str */ EDITORCONFIG_LOCAL char* str_replace(char* str, char oldc, char newc) { char* p; if (str == NULL) return NULL; for (p = str; *p != '\0'; p++) if (*p == oldc) *p = newc; return str; } #ifndef HAVE_STRLWR #include /* * convert the string to lowercase */ EDITORCONFIG_LOCAL char* ec_strlwr(char* str) { char* p; for (p = str; *p; ++p) *p = (char)tolower((unsigned char)*p); return str; } #endif /* !HAVE_STRLWR */ /* * is path an abosolute file path */ EDITORCONFIG_LOCAL _Bool is_file_path_absolute(const char* path) { if (!path) return 0; #if defined(UNIX) if (*path == '/') return 1; return 0; #elif defined(WIN32) return !PathIsRelative(path); #else # error "Either UNIX or WIN32 must be defined." #endif } editorconfig-core-c-0.12.0/src/lib/misc.h000066400000000000000000000042461241642317000200630ustar00rootroot00000000000000/* * Copyright (c) 2011-2012 EditorConfig Team * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __MISC_H__ #define __MISC_H__ #include "global.h" #include #ifndef HAVE_STRCASECMP # ifdef HAVE_STRICMP # define strcasecmp stricmp # else /* HAVE_STRICMP */ EDITORCONFIG_LOCAL int ec_strcasecmp(const char *s1, const char *s2); # define strcasecmp ec_strcasecmp # endif /* HAVE_STRICMP */ #endif /* !HAVE_STRCASECMP */ #ifndef HAVE_STRDUP EDITORCONFIG_LOCAL char* ec_strdup(const char *str); # define strdup ec_strdup #endif #ifndef HAVE_STRNDUP EDITORCONFIG_LOCAL char* ec_strndup(const char* str, size_t n); # define strndup ec_strndup #endif EDITORCONFIG_LOCAL char* str_replace(char* str, char oldc, char newc); #ifndef HAVE_STRLWR EDITORCONFIG_LOCAL char* ec_strlwr(char* str); # define strlwr ec_strlwr #endif EDITORCONFIG_LOCAL _Bool is_file_path_absolute(const char* path); #endif /* __MISC_H__ */ editorconfig-core-c-0.12.0/src/lib/utarray.h000066400000000000000000000303741241642317000206200ustar00rootroot00000000000000/* Copyright (c) 2008-2014, Troy D. Hanson http://troydhanson.github.com/uthash/ All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* a dynamic array implementation using macros */ #ifndef UTARRAY_H #define UTARRAY_H #define UTARRAY_VERSION 1.9.9 #ifdef __GNUC__ #define _UNUSED_ __attribute__ ((__unused__)) #else #define _UNUSED_ #endif #include /* size_t */ #include /* memset, etc */ #include /* exit */ #define oom() exit(-1) typedef void (ctor_f)(void *dst, const void *src); typedef void (dtor_f)(void *elt); typedef void (init_f)(void *elt); typedef struct { size_t sz; init_f *init; ctor_f *copy; dtor_f *dtor; } UT_icd; typedef struct { unsigned i,n;/* i: index of next available slot, n: num slots */ UT_icd icd; /* initializer, copy and destructor functions */ char *d; /* n slots of size icd->sz*/ } UT_array; #define utarray_init(a,_icd) do { \ memset(a,0,sizeof(UT_array)); \ (a)->icd=*_icd; \ } while(0) #define utarray_done(a) do { \ if ((a)->n) { \ if ((a)->icd.dtor) { \ size_t _ut_i; \ for(_ut_i=0; _ut_i < (a)->i; _ut_i++) { \ (a)->icd.dtor(utarray_eltptr(a,_ut_i)); \ } \ } \ free((a)->d); \ } \ (a)->n=0; \ } while(0) #define utarray_new(a,_icd) do { \ a=(UT_array*)malloc(sizeof(UT_array)); \ utarray_init(a,_icd); \ } while(0) #define utarray_free(a) do { \ utarray_done(a); \ free(a); \ } while(0) #define utarray_reserve(a,by) do { \ if (((a)->i+by) > ((a)->n)) { \ while(((a)->i+by) > ((a)->n)) { (a)->n = ((a)->n ? (2*(a)->n) : 8); } \ if ( ((a)->d=(char*)realloc((a)->d, (a)->n*(a)->icd.sz)) == NULL) oom(); \ } \ } while(0) #define utarray_push_back(a,p) do { \ utarray_reserve(a,1); \ if ((a)->icd.copy) { (a)->icd.copy( _utarray_eltptr(a,(a)->i++), p); } \ else { memcpy(_utarray_eltptr(a,(a)->i++), p, (a)->icd.sz); }; \ } while(0) #define utarray_pop_back(a) do { \ if ((a)->icd.dtor) { (a)->icd.dtor( _utarray_eltptr(a,--((a)->i))); } \ else { (a)->i--; } \ } while(0) #define utarray_extend_back(a) do { \ utarray_reserve(a,1); \ if ((a)->icd.init) { (a)->icd.init(_utarray_eltptr(a,(a)->i)); } \ else { memset(_utarray_eltptr(a,(a)->i),0,(a)->icd.sz); } \ (a)->i++; \ } while(0) #define utarray_len(a) ((a)->i) #define utarray_eltptr(a,j) (((j) < (a)->i) ? _utarray_eltptr(a,j) : NULL) #define _utarray_eltptr(a,j) ((char*)((a)->d + ((a)->icd.sz*(j) ))) #define utarray_insert(a,p,j) do { \ if (j > (a)->i) utarray_resize(a,j); \ utarray_reserve(a,1); \ if ((j) < (a)->i) { \ memmove( _utarray_eltptr(a,(j)+1), _utarray_eltptr(a,j), \ ((a)->i - (j))*((a)->icd.sz)); \ } \ if ((a)->icd.copy) { (a)->icd.copy( _utarray_eltptr(a,j), p); } \ else { memcpy(_utarray_eltptr(a,j), p, (a)->icd.sz); }; \ (a)->i++; \ } while(0) #define utarray_inserta(a,w,j) do { \ if (utarray_len(w) == 0) break; \ if (j > (a)->i) utarray_resize(a,j); \ utarray_reserve(a,utarray_len(w)); \ if ((j) < (a)->i) { \ memmove(_utarray_eltptr(a,(j)+utarray_len(w)), \ _utarray_eltptr(a,j), \ ((a)->i - (j))*((a)->icd.sz)); \ } \ if ((a)->icd.copy) { \ size_t _ut_i; \ for(_ut_i=0;_ut_i<(w)->i;_ut_i++) { \ (a)->icd.copy(_utarray_eltptr(a,j+_ut_i), _utarray_eltptr(w,_ut_i)); \ } \ } else { \ memcpy(_utarray_eltptr(a,j), _utarray_eltptr(w,0), \ utarray_len(w)*((a)->icd.sz)); \ } \ (a)->i += utarray_len(w); \ } while(0) #define utarray_resize(dst,num) do { \ size_t _ut_i; \ if (dst->i > (size_t)(num)) { \ if ((dst)->icd.dtor) { \ for(_ut_i=num; _ut_i < dst->i; _ut_i++) { \ (dst)->icd.dtor(utarray_eltptr(dst,_ut_i)); \ } \ } \ } else if (dst->i < (size_t)(num)) { \ utarray_reserve(dst,num-dst->i); \ if ((dst)->icd.init) { \ for(_ut_i=dst->i; _ut_i < num; _ut_i++) { \ (dst)->icd.init(utarray_eltptr(dst,_ut_i)); \ } \ } else { \ memset(_utarray_eltptr(dst,dst->i),0,(dst)->icd.sz*(num-dst->i)); \ } \ } \ dst->i = num; \ } while(0) #define utarray_concat(dst,src) do { \ utarray_inserta((dst),(src),utarray_len(dst)); \ } while(0) #define utarray_erase(a,pos,len) do { \ if ((a)->icd.dtor) { \ size_t _ut_i; \ for(_ut_i=0; _ut_i < len; _ut_i++) { \ (a)->icd.dtor(utarray_eltptr((a),pos+_ut_i)); \ } \ } \ if ((a)->i > (pos+len)) { \ memmove( _utarray_eltptr((a),pos), _utarray_eltptr((a),pos+len), \ (((a)->i)-(pos+len))*((a)->icd.sz)); \ } \ (a)->i -= (len); \ } while(0) #define utarray_renew(a,u) do { \ if (a) utarray_clear(a); \ else utarray_new((a),(u)); \ } while(0) #define utarray_clear(a) do { \ if ((a)->i > 0) { \ if ((a)->icd.dtor) { \ size_t _ut_i; \ for(_ut_i=0; _ut_i < (a)->i; _ut_i++) { \ (a)->icd.dtor(utarray_eltptr(a,_ut_i)); \ } \ } \ (a)->i = 0; \ } \ } while(0) #define utarray_sort(a,cmp) do { \ qsort((a)->d, (a)->i, (a)->icd.sz, cmp); \ } while(0) #define utarray_find(a,v,cmp) bsearch((v),(a)->d,(a)->i,(a)->icd.sz,cmp) #define utarray_front(a) (((a)->i) ? (_utarray_eltptr(a,0)) : NULL) #define utarray_next(a,e) (((e)==NULL) ? utarray_front(a) : ((((a)->i) > (utarray_eltidx(a,e)+1)) ? _utarray_eltptr(a,utarray_eltidx(a,e)+1) : NULL)) #define utarray_prev(a,e) (((e)==NULL) ? utarray_back(a) : ((utarray_eltidx(a,e) > 0) ? _utarray_eltptr(a,utarray_eltidx(a,e)-1) : NULL)) #define utarray_back(a) (((a)->i) ? (_utarray_eltptr(a,(a)->i-1)) : NULL) #define utarray_eltidx(a,e) (((char*)(e) >= (char*)((a)->d)) ? (((char*)(e) - (char*)((a)->d))/(size_t)(a)->icd.sz) : -1) /* last we pre-define a few icd for common utarrays of ints and strings */ static void utarray_str_cpy(void *dst, const void *src) { char **_src = (char**)src, **_dst = (char**)dst; *_dst = (*_src == NULL) ? NULL : strdup(*_src); } static void utarray_str_dtor(void *elt) { char **eltc = (char**)elt; if (*eltc) free(*eltc); } static const UT_icd ut_str_icd _UNUSED_ = {sizeof(char*),NULL,utarray_str_cpy,utarray_str_dtor}; static const UT_icd ut_int_icd _UNUSED_ = {sizeof(int),NULL,NULL,NULL}; static const UT_icd ut_ptr_icd _UNUSED_ = {sizeof(void*),NULL,NULL,NULL}; #endif /* UTARRAY_H */ editorconfig-core-c-0.12.0/tests/000077500000000000000000000000001241642317000165565ustar00rootroot00000000000000