diff --git a/libdap/.gitignore b/libdap/.gitignore new file mode 100755 index 0000000000000000000000000000000000000000..ef34ab163699ede25ec1b4a8717e6f4a33bce0a9 --- /dev/null +++ b/libdap/.gitignore @@ -0,0 +1,60 @@ +# Prerequisites +build/* +test/build +*.d +*.txt.user +*.txt.user.* +*.autosave +# Object files +*.o +*.ko +*.obj +*.elf + +# Linker output +*.ilk +*.map +*.exp + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb +*.pdb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf +/.project +/.cproject +/kelvin-node_logs.txt +/build/ diff --git a/libdap/.gitmodules b/libdap/.gitmodules new file mode 100755 index 0000000000000000000000000000000000000000..75fe6109d4f7c35433dee24cc24b9b798ef28f1a --- /dev/null +++ b/libdap/.gitmodules @@ -0,0 +1,4 @@ +[submodule "test/libdap-test"] + path = test/libdap-test + url = https://gitlab.demlabs.net/cellframe/libdap-test.git + branch = master diff --git a/libdap/.travis.yml b/libdap/.travis.yml new file mode 100755 index 0000000000000000000000000000000000000000..d09034d2bf073b6f7ea4384f99c4665df5c6b77a --- /dev/null +++ b/libdap/.travis.yml @@ -0,0 +1,26 @@ +sudo: required +language: cpp +compiler: gcc +dist: xenial +notifications: + email: false + +before_install: + - git submodule init + - git submodule update --recursive + +script: + - sudo service network-manager start + - mkdir build + - cd build + - cmake -DBUILD_DAP_TESTS=ON ../ + - make + - ctest --verbose + +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - network-manager + diff --git a/libdap/CMakeLists.txt b/libdap/CMakeLists.txt new file mode 100755 index 0000000000000000000000000000000000000000..31c0eea678deae9981cbe572f79b2145150b5bc3 --- /dev/null +++ b/libdap/CMakeLists.txt @@ -0,0 +1,114 @@ +cmake_minimum_required(VERSION 3.0) +project (dap_core) + +# fix implicit declaration warnings +add_definitions ("-D_GNU_SOURCE") + +if(UNIX) + file(GLOB CORE_SRCS + src/*.c + src/etc/*.c + src/rpmalloc/*.c + ) + file(GLOB CORE_HEADERS + include/*.h + include/unix/*.h + include/unix/linux/*.h + ) +endif() + +if(WIN32) + file(GLOB CORE_SRCS + src/*.c + src/etc/*.c + src/rpmalloc/*.c + ) + file(GLOB CORE_HEADERS + include/*.h + ) +endif() + +if(NOT SUBMODULES_NO_BUILD) + + # Check whether we're on a 32-bit or 64-bit system + if(CMAKE_SIZEOF_VOID_P EQUAL "8") + set(DEFAULT_BUILD_64 ON) + else() + set(DEFAULT_BUILD_64 OFF) + endif() + option(BUILD_64 "Build for 64-bit? 'OFF' builds for 32-bit." ${DEFAULT_BUILD_64}) + + + if(WIN32) + + add_definitions ("-DUNDEBUG") + add_definitions ("-DNDEBUG") + add_definitions ("-DWIN32") + add_definitions ("-D_WINDOWS") + add_definitions ("-D__WINDOWS__") + add_definitions ("-D_CRT_SECURE_NO_WARNINGS") + +# if(DAP_RELEASE) + set(_CCOPT "-mwindows -static -Wall -O3 -fno-ident -ffast-math -ftree-vectorize -mfpmath=sse -mmmx -msse2 -fno-asynchronous-unwind-tables -ffunction-sections -Wl,--gc-sections -Wl,--strip-all") +# else() +# set(_CCOPT "-mconsole -static -Wall -pg") +# set(_LOPT "-mconsole -static -pg") +# endif() + + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_CCOPT}") + set(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} ${_LOPT}") + endif() + + if(UNIX) + add_definitions ("-DDAP_OS_LINUX") + + if(DAP_RELEASE) + set(_CCOPT "-Wall -O3 -fPIC -fno-pie -no-pie -fno-ident -ffast-math -ftree-vectorize -mfpmath=sse -mmmx -msse2 -fno-asynchronous-unwind-tables -ffunction-sections -Wl,--gc-sections -Wl,--strip-all") + else() + set(_CCOPT "-Wall -pg -fPIC -fno-pie -no-pie") + set(_LOPT "-pg") + SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pg") + endif() + + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_CCOPT}") + set(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} ${_LOPT}") + endif() +endif() + +add_library(${PROJECT_NAME} STATIC ${CORE_SRCS} ${CORE_HEADERS}) + +#This paths will be used by project-dependent project libraries +target_include_directories(${PROJECT_NAME} INTERFACE include/ src/rpmalloc/) + +if(WIN32) + include_directories(include/) +endif() + +if ( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" ) + set(LINUX "Linux") +endif() + +if(UNIX) + add_subdirectory(src/unix) + target_link_libraries(${PROJECT_NAME} dap_core_unix rt) +endif() + +if(DARWIN) + add_subdirectory(src/darwin) + target_link_libraries(${PROJECT_NAME} dap_core_darwin) +endif() + +if(ANDROID) + add_subdirectory(src/android) + target_link_libraries(${PROJECT_NAME} dap_core_android) +endif() + +if (WIN32) + add_subdirectory(src/win32) + target_link_libraries(${PROJECT_NAME} dap_core_win32) +endif() + +if(BUILD_DAP_TESTS) + enable_testing() + add_subdirectory(test) +endif() diff --git a/libdap/Doxyfile b/libdap/Doxyfile new file mode 100755 index 0000000000000000000000000000000000000000..82a4deead3ae50ffcef8103c99b9237d7615da23 --- /dev/null +++ b/libdap/Doxyfile @@ -0,0 +1,2428 @@ +# Doxyfile 1.8.11 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single 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. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "LibDap" + +# 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 = "This library contains the basic modules that are used in the products of the family DAP" + +# With the PROJECT_LOGO tag one can specify a logo or an 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) path +# into which the generated documentation will be written. 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 = ./docs/ + +# 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 causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = 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. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, 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. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, 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. +# The default value is: YES. + +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 and 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. +# The default value is: NO. + +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. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, 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 +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# 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. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +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 list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +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-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +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 Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +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 behavior. 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 behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +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. +# The default value is: NO. + +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. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act 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 = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# 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. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +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. +# The default value is: NO. + +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, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. 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: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# 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); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) 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. +# The default value is: NO. + +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 will make +# doxygen to 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. +# The default value is: YES. + +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. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES 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. +# The default value is: YES. + +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). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag 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. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_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 respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = YES + +# 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. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If 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, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = YES + +# 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 namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO 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. +# The default value is: NO. + +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, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +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, these declarations will be +# included in the documentation. +# The default value is: NO. + +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, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +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 then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +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. +# The default value is: system dependent. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# 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. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES 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. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +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 constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: 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 group names will +# appear in their defined order. +# The default value is: NO. + +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 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. +# The default value is: NO. + +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. +# The default value is: NO. + +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. +# The default value is: YES. + +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. +# The default value is: YES. + +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. +# The default value is: YES. + +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. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if <section_label> ... \endif and \cond <section_label> +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have 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 value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +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. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# 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 value 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 value 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 command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +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. To 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. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag 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. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag 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. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This 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, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = 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) +# The default value is: $file:$line: $text. + +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 standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is 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. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = ./core/dap_config.c ./core/dap_config.h ./core/dap_common.c ./core/dap_common.h ./core/unix/ ./crypto/dap_enc_base64.c ./crypto/dap_enc_base64.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. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +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 patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl, +# *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js. + +FILE_PATTERNS = *.c *.h + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# 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. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +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 +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */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. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be 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: +# +# <filter> <input-file> +# +# where <filter> is the value of the INPUT_FILTER tag, and <input-file> 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. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +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 information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +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 tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# 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 that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +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. +# The default value is: NO. + +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. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES 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. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = 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. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES 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. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse-libclang=ON option for CMake. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# 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. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +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 a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +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. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = ./ + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +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 left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_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. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet 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. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +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. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +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. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +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 YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = NO + +# 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. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# 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 (see: http://developer.apple.com/tools/xcode/), 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. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset 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. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# 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. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_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. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# 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. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# 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. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# 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). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# 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. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +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. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +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. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +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 Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +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 (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# 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. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they 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. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +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. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# 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. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values 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. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# 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. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If 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. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. 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. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +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 directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +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 pre-rendered 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 may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# 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 +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# 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. It is possible to +# search using the keyboard; to jump to the search box use <access key> + S +# (what the <access key> is depends on the OS and browser, but it is typically +# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down +# key> to jump into the search results window, the results can be navigated +# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel +# the search. The filter options can be selected when the cursor is inside the +# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys> +# to select a filter and <Enter> or <escape> to activate or cancel the filter +# option. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a web server instead of a web client using Javascript. There +# are two flavors of web server based searching depending on the EXTERNAL_SEARCH +# setting. When disabled, doxygen will generate a PHP script for searching and +# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing +# and searching needs to be provided by external tools. See the section +# "External Indexing and Searching" for details. +# The default value is: NO. +# This tag requires that the tag SEARCHENGINE is set to YES. + +SERVER_BASED_SEARCH = NO + +# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP +# script for searching. Instead the search results are written to an XML file +# which needs to be processed by an external indexer. Doxygen will invoke an +# external search engine pointed to by the SEARCHENGINE_URL option to obtain the +# search results. +# +# Doxygen ships with an example indexer (doxyindexer) and search engine +# (doxysearch.cgi) which are based on the open source search engine library +# Xapian (see: http://xapian.org/). +# +# See the section "External Indexing and Searching" for details. +# The default value is: NO. +# This tag requires that the tag SEARCHENGINE is set to YES. + +EXTERNAL_SEARCH = NO + +# The SEARCHENGINE_URL should point to a search engine hosted by a web server +# which will return the search results when EXTERNAL_SEARCH is enabled. +# +# Doxygen ships with an example indexer (doxyindexer) and search engine +# (doxysearch.cgi) which are based on the open source search engine library +# Xapian (see: http://xapian.org/). See the section "External Indexing and +# Searching" for details. +# This tag requires that the tag SEARCHENGINE is set to YES. + +SEARCHENGINE_URL = + +# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed +# search data is written to a file for indexing by an external tool. With the +# SEARCHDATA_FILE tag the name of this file can be specified. +# The default file is: searchdata.xml. +# This tag requires that the tag SEARCHENGINE is set to YES. + +SEARCHDATA_FILE = searchdata.xml + +# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the +# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is +# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple +# projects and redirect the results back to the right project. +# This tag requires that the tag SEARCHENGINE is set to YES. + +EXTERNAL_SEARCH_ID = + +# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen +# projects other than the one defined by this configuration file, but that are +# all added to the same external search index. Each project needs to have a +# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of +# to a relative location where the documentation can be found. The format is: +# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... +# This tag requires that the tag SEARCHENGINE is set to YES. + +EXTRA_SEARCH_MAPPINGS = + +#--------------------------------------------------------------------------- +# Configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. +# The default value is: YES. + +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. +# The default directory is: latex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. +# +# 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. +# The default file is: latex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate +# index for LaTeX. +# The default file is: makeindex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +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. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +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 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x +# 14 inches) and executive (7.25 x 10.5 inches). +# The default value is: a4. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +PAPER_TYPE = a4 + +# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names +# that should be included in the LaTeX output. The package can be specified just +# by its name or with the correct syntax as to be used with the LaTeX +# \usepackage command. To get the times font for instance you can specify : +# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times} +# To use the option intlimits with the amsmath package you can specify: +# EXTRA_PACKAGES=[intlimits]{amsmath} +# If left blank no extra packages will be included. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +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. See +# section "Doxygen usage" for information on how to let doxygen write the +# default header to a separate file. +# +# Note: Only use a user-defined header if you know what you are doing! The +# following commands have a special meaning inside the header: $title, +# $datetime, $date, $doxygenversion, $projectname, $projectnumber, +# $projectbrief, $projectlogo. Doxygen will replace $title with the empty +# string, for the replacement values of the other commands the user is referred +# to HTML_HEADER. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +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. See +# LATEX_HEADER for more information on how to generate a default footer and what +# special commands can be used inside the footer. +# +# Note: Only use a user-defined footer if you know what you are doing! +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_FOOTER = + +# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# LaTeX style sheets that are included after the standard style sheets created +# by doxygen. Using this option one can overrule certain style aspects. Doxygen +# will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_STYLESHEET = + +# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the LATEX_OUTPUT output +# directory. Note that the files will be copied as-is; there are no commands or +# markers available. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_FILES = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is +# prepared for conversion to PDF (using ps2pdf or pdflatex). 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. +# The default value is: YES. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate +# the PDF file directly from the LaTeX files. Set this option to YES, to get a +# higher quality PDF documentation. +# The default value is: YES. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +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. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_BATCHMODE = NO + +# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the +# index chapters (such as File Index, Compound Index, etc.) in the output. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_HIDE_INDICES = NO + +# If the LATEX_SOURCE_CODE tag 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. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_SOURCE_CODE = NO + +# The LATEX_BIB_STYLE tag can be used to specify the style to use for the +# bibliography, e.g. plainnat, or ieeetr. See +# http://en.wikipedia.org/wiki/BibTeX and \cite for more info. +# The default value is: plain. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_BIB_STYLE = plain + +# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated +# 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. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_TIMESTAMP = 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 too pretty with other RTF +# readers/editors. +# The default value is: NO. + +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. +# The default directory is: rtf. +# This tag requires that the tag GENERATE_RTF is set to YES. + +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. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +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 some other Word compatible readers that support those +# fields. +# +# Note: WordPad (write) and others do not support links. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +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. +# +# See also section "Doxygen usage" for information on how to generate the +# default style sheet that doxygen normally uses. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an RTF document. Syntax is +# similar to doxygen's config file. A template extensions file can be generated +# using doxygen -e rtf extensionFile. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_EXTENSIONS_FILE = + +# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code +# with syntax highlighting in the RTF output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for +# classes and files. +# The default value is: NO. + +GENERATE_MAN = NO + +# 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. A directory man3 will be created inside the directory specified by +# MAN_OUTPUT. +# The default directory is: man. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to the generated +# man pages. In case the manual section does not start with a number, the number +# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is +# optional. +# The default value is: .3. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_EXTENSION = .3 + +# The MAN_SUBDIR tag determines the name of the directory created within +# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by +# MAN_EXTENSION with the initial . removed. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_SUBDIR = + +# 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 value is: NO. +# This tag requires that the tag GENERATE_MAN is set to YES. + +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. +# The default value is: NO. + +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. +# The default directory is: xml. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_OUTPUT = xml + +# 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. +# The default value is: YES. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the DOCBOOK output +#--------------------------------------------------------------------------- + +# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files +# that can be used to generate PDF. +# The default value is: NO. + +GENERATE_DOCBOOK = NO + +# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in +# front of it. +# The default directory is: docbook. +# This tag requires that the tag GENERATE_DOCBOOK is set to YES. + +DOCBOOK_OUTPUT = docbook + +# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the +# program listings (including syntax highlighting and cross-referencing +# information) to the DOCBOOK output. Note that enabling this will significantly +# increase the size of the DOCBOOK output. +# The default value is: NO. +# This tag requires that the tag GENERATE_DOCBOOK is set to YES. + +DOCBOOK_PROGRAMLISTING = NO + +#--------------------------------------------------------------------------- +# Configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an +# AutoGen Definitions (see http://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. +# The default value is: NO. + +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. +# The default value is: NO. + +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. +# The default value is: NO. +# This tag requires that the tag GENERATE_PERLMOD is set to YES. + +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. +# The default value is: YES. +# This tag requires that the tag GENERATE_PERLMOD is set to YES. + +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. +# This tag requires that the tag GENERATE_PERLMOD is set to YES. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all +# C-preprocessor directives found in the sources and include files. +# The default value is: YES. + +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, only conditional compilation will be +# performed. Macro expansion can be done in a controlled way by setting +# EXPAND_ONLY_PREDEF to YES. +# The default value is: NO. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +MACRO_EXPANSION = NO + +# 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. +# The default value is: NO. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES, the include files in the +# INCLUDE_PATH will be searched if a #include is found. +# The default value is: YES. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +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. +# This tag requires that the tag SEARCH_INCLUDES is set to YES. + +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. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +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 e.g. +# 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. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +PREDEFINED = + +# 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. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES 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. Such function macros +# are typically used for boiler-plate code, and will confuse the parser if not +# removed. +# The default value is: YES. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES tag can be used to specify one or more tag files. For each tag +# file the location of the external documentation should be added. 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. See the +# section "Linking to external documentation" for more information about the use +# of tag files. +# Note: 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. See section "Linking to +# external documentation" for more information about the usage of tag files. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES, all external class will be listed in +# the class index. If set to NO, only the inherited external classes will be +# listed. +# The default value is: NO. + +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. +# The default value is: YES. + +EXTERNAL_GROUPS = YES + +# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in +# the related pages index. If set to NO, only the current project's pages will +# be listed. +# The default value is: YES. + +EXTERNAL_PAGES = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of 'which perl'). +# The default file (with absolute path) is: /usr/bin/perl. + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram +# (in HTML 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. +# The default value is: YES. + +CLASS_DIAGRAMS = NO + +# 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 = + +# You can include diagrams made with dia in doxygen documentation. Doxygen will +# then run dia to produce the diagram and insert it in the documentation. The +# DIA_PATH tag allows you to specify the directory where the dia binary resides. +# If left empty dia is assumed to be found in the default search path. + +DIA_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. +# The default value is: YES. + +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 (see: +# http://www.graphviz.org/), 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 value is: YES. + +HAVE_DOT = NO + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed +# to run in parallel. When set to 0 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. +# Minimum value: 0, maximum value: 32, default value: 0. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_NUM_THREADS = 0 + +# When you want a differently looking font in the dot files that doxygen +# generates 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. +# The default value is: Helvetica. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of +# dot graphs. +# Minimum value: 4, maximum value: 24, default value: 10. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the default font as specified with +# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set +# the path where dot can find it using this tag. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_FONTPATH = + +# If the CLASS_GRAPH tag is 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 CLASS_DIAGRAMS tag to NO. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +CLASS_GRAPH = NO + +# If the COLLABORATION_GRAPH tag is 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. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for +# groups, showing the direct groups dependencies. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +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. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +UML_LOOK = NO + +# If the UML_LOOK tag is enabled, the fields and methods are shown inside the +# class node. If there are many fields or methods and many nodes the graph may +# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the +# number of items for each type to make the size more manageable. Set this to 0 +# for no limit. Note that the threshold may be exceeded by 50% before the limit +# is enforced. So when you set the threshold to 10, up to 15 fields may appear, +# but if the number exceeds 15, the total amount of fields shown is limited to +# 10. +# Minimum value: 0, maximum value: 100, default value: 10. +# This tag requires that the tag HAVE_DOT is set to YES. + +UML_LIMIT_NUM_FIELDS = 10 + +# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and +# collaboration graphs will show the relations between templates and their +# instances. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +TEMPLATE_RELATIONS = NO + +# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES 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. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +INCLUDE_GRAPH = YES + +# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES 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. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH tag is 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. Disabling a call graph can be +# accomplished by means of the command \hidecallgraph. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH tag is 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. Disabling a caller graph can be +# accomplished by means of the command \hidecallergraph. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical +# hierarchy of all classes instead of a textual one. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH tag is 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. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. For an explanation of the image formats see the section +# output formats in the documentation of the dot tool (Graphviz (see: +# http://www.graphviz.org/)). +# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order +# to make the SVG files visible in IE 9+ (other browsers do not have this +# requirement). +# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd, +# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo, +# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo, +# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and +# png:gdiplus:gdiplus. +# The default value is: png. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_IMAGE_FORMAT = png + +# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to +# enable generation of interactive SVG images that allow zooming and panning. +# +# Note that this requires a modern browser other than Internet Explorer. Tested +# and working are Firefox, Chrome, Safari, and Opera. +# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make +# the SVG files visible. Older versions of IE do not have SVG support. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +INTERACTIVE_SVG = NO + +# The DOT_PATH tag 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. +# This tag requires that the tag HAVE_DOT is set to YES. + +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). +# This tag requires that the tag HAVE_DOT is set to YES. + +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 DIAFILE_DIRS tag can be used to specify one or more directories that +# contain dia files that are included in the documentation (see the \diafile +# command). + +DIAFILE_DIRS = + +# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the +# path where java can find the plantuml.jar file. If left blank, it is assumed +# PlantUML is not used or called during a preprocessing step. Doxygen will +# generate a warning when it encounters a \startuml command in this case and +# will not generate output for the diagram. + +PLANTUML_JAR_PATH = + +# When using plantuml, the specified paths are searched for files specified by +# the !include statement in a plantuml block. + +PLANTUML_INCLUDE_PATH = + +# 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. +# Minimum value: 0, maximum value: 10000, default value: 50. +# This tag requires that the tag HAVE_DOT is set to YES. + +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. +# Minimum value: 0, maximum value: 1000, default value: 0. +# This tag requires that the tag HAVE_DOT is set to YES. + +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). +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES to 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. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page +# explaining the meaning of the various boxes and arrows in the dot generated +# graphs. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot +# files that are used to generate the various graphs. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_CLEANUP = YES diff --git a/libdap/LICENSE b/libdap/LICENSE new file mode 100755 index 0000000000000000000000000000000000000000..65c5ca88a67c30becee01c5a8816d964b03862f9 --- /dev/null +++ b/libdap/LICENSE @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/libdap/README.md b/libdap/README.md new file mode 100755 index 0000000000000000000000000000000000000000..c25194558d83883254ed20f723f59fa689697a29 --- /dev/null +++ b/libdap/README.md @@ -0,0 +1,14 @@ +# libdap +Deus Applications Prototypes: core library + +[](https://travis-ci.com/kelvinblockchain/libdap) + +## Build and Run tests: +``` +mkdir build +cd build +cmake -DBUILD_DAP_TESTS=ON ../ +make +ctest --verbose +``` + diff --git a/libdap/docs/annotated.html b/libdap/docs/annotated.html new file mode 100755 index 0000000000000000000000000000000000000000..77a6630072e4902be83416d6df00486ba6c00b2e --- /dev/null +++ b/libdap/docs/annotated.html @@ -0,0 +1,108 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: Data Structures</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="classes.html"><span>Data Structure Index</span></a></li> + <li><a href="functions.html"><span>Data Fields</span></a></li> + </ul> + </div> +</div><!-- top --> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div class="header"> + <div class="headertitle"> +<div class="title">Data Structures</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock">Here are the data structures with brief descriptions:</div><div class="directory"> +<table class="directory"> +<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structdap__config.html" target="_self">dap_config</a></td><td class="desc"></td></tr> +<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structdap__config__internal.html" target="_self">dap_config_internal</a></td><td class="desc"></td></tr> +<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structdap__config__item.html" target="_self">dap_config_item</a></td><td class="desc">The <a class="el" href="structdap__config__item.html" title="The dap_config_item struct. ">dap_config_item</a> struct </td></tr> +<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structdap__cpu.html" target="_self">dap_cpu</a></td><td class="desc"></td></tr> +<tr id="row_4_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structdap__cpu__stats.html" target="_self">dap_cpu_stats</a></td><td class="desc"></td></tr> +<tr id="row_5_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structdap__process__memory.html" target="_self">dap_process_memory</a></td><td class="desc"></td></tr> +<tr id="row_6_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structproc__stat__line.html" target="_self">proc_stat_line</a></td><td class="desc"></td></tr> +</table> +</div><!-- directory --> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/arrowdown.png b/libdap/docs/arrowdown.png new file mode 100755 index 0000000000000000000000000000000000000000..0b63f6d38c4b9ec907b820192ebe9724ed6eca22 Binary files /dev/null and b/libdap/docs/arrowdown.png differ diff --git a/libdap/docs/arrowright.png b/libdap/docs/arrowright.png new file mode 100755 index 0000000000000000000000000000000000000000..c6ee22f937a07d1dbfc27c669d11f8ed13e2f152 Binary files /dev/null and b/libdap/docs/arrowright.png differ diff --git a/libdap/docs/bc_s.png b/libdap/docs/bc_s.png new file mode 100755 index 0000000000000000000000000000000000000000..224b29aa9847d5a4b3902efd602b7ddf7d33e6c2 Binary files /dev/null and b/libdap/docs/bc_s.png differ diff --git a/libdap/docs/bdwn.png b/libdap/docs/bdwn.png new file mode 100755 index 0000000000000000000000000000000000000000..940a0b950443a0bb1b216ac03c45b8a16c955452 Binary files /dev/null and b/libdap/docs/bdwn.png differ diff --git a/libdap/docs/classes.html b/libdap/docs/classes.html new file mode 100755 index 0000000000000000000000000000000000000000..563461a377ba375bd88bf04f760a19d4c4ec6bf4 --- /dev/null +++ b/libdap/docs/classes.html @@ -0,0 +1,109 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: Data Structure Index</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="classes.html"><span>Data Structure Index</span></a></li> + <li><a href="functions.html"><span>Data Fields</span></a></li> + </ul> + </div> +</div><!-- top --> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div class="header"> + <div class="headertitle"> +<div class="title">Data Structure Index</div> </div> +</div><!--header--> +<div class="contents"> +<div class="qindex"><a class="qindex" href="#letter_D">D</a> | <a class="qindex" href="#letter_P">P</a></div> +<table class="classindex"> +<tr><td rowspan="2" valign="bottom"><a name="letter_d"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  d  </div></td></tr></table> +</td><td valign="top"><a class="el" href="structdap__config__internal.html">dap_config_internal</a>   </td><td valign="top"><a class="el" href="structdap__cpu__stats.html">dap_cpu_stats</a>   </td><td></td></tr> +<tr><td valign="top"><a class="el" href="structdap__config__item.html">dap_config_item</a>   </td><td valign="top"><a class="el" href="structdap__process__memory.html">dap_process_memory</a>   </td><td></td></tr> +<tr><td valign="top"><a class="el" href="structdap__config.html">dap_config</a>   </td><td valign="top"><a class="el" href="structdap__cpu.html">dap_cpu</a>   </td><td rowspan="2" valign="bottom"><a name="letter_p"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  p  </div></td></tr></table> +</td><td></td></tr> +<tr><td></td><td></td><td></td></tr> +<tr><td></td><td></td><td valign="top"><a class="el" href="structproc__stat__line.html">proc_stat_line</a>   </td><td></td></tr> +<tr><td></td><td></td><td></td><td></td></tr> +</table> +<div class="qindex"><a class="qindex" href="#letter_D">D</a> | <a class="qindex" href="#letter_P">P</a></div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/closed.png b/libdap/docs/closed.png new file mode 100755 index 0000000000000000000000000000000000000000..98cc2c909da37a6df914fbf67780eebd99c597f5 Binary files /dev/null and b/libdap/docs/closed.png differ diff --git a/libdap/docs/dap__common_8c.html b/libdap/docs/dap__common_8c.html new file mode 100755 index 0000000000000000000000000000000000000000..9eb20ec1a44de827c49d91edf85ca2119081f200 --- /dev/null +++ b/libdap/docs/dap__common_8c.html @@ -0,0 +1,791 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: core/dap_common.c File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_4270bfced15e0e73154b13468c7c9ad9.html">core</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#define-members">Macros</a> | +<a href="#func-members">Functions</a> | +<a href="#var-members">Variables</a> </div> + <div class="headertitle"> +<div class="title">dap_common.c File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include <unistd.h></code><br /> +<code>#include <pthread.h></code><br /> +<code>#include <syslog.h></code><br /> +<code>#include <time.h></code><br /> +<code>#include <string.h></code><br /> +<code>#include <stdarg.h></code><br /> +<code>#include <stdio.h></code><br /> +<code>#include "<a class="el" href="dap__common_8h_source.html">dap_common.h</a>"</code><br /> +</div><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> +Macros</h2></td></tr> +<tr class="memitem:aaa5fc6c48a65650511f1b50caa1c6672"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#aaa5fc6c48a65650511f1b50caa1c6672">LAST_ERROR_MAX</a>   255</td></tr> +<tr class="separator:aaa5fc6c48a65650511f1b50caa1c6672"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a7ce0df38eb467e59f209470c8f5ac4e6"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">LOG_TAG</a>   "dap_common"</td></tr> +<tr class="separator:a7ce0df38eb467e59f209470c8f5ac4e6"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a6b293a3f1ddf0b2dd42c5ed279e245ca"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#a6b293a3f1ddf0b2dd42c5ed279e245ca">INT_DIGITS</a>   19 /* enough for 64 bit integer */</td></tr> +<tr class="separator:a6b293a3f1ddf0b2dd42c5ed279e245ca"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +Functions</h2></td></tr> +<tr class="memitem:a98de0fce0a8fb5c3b0cfe80bebe8f691"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#a98de0fce0a8fb5c3b0cfe80bebe8f691">set_log_level</a> (enum <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a> ll)</td></tr> +<tr class="memdesc:a98de0fce0a8fb5c3b0cfe80bebe8f691"><td class="mdescLeft"> </td><td class="mdescRight">set_log_level Sets the logging level <a href="#a98de0fce0a8fb5c3b0cfe80bebe8f691">More...</a><br /></td></tr> +<tr class="separator:a98de0fce0a8fb5c3b0cfe80bebe8f691"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ac8d0df7015664c720b27ee4f6e660479"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#ac8d0df7015664c720b27ee4f6e660479">dap_set_log_tag_width</a> (size_t width)</td></tr> +<tr class="memdesc:ac8d0df7015664c720b27ee4f6e660479"><td class="mdescLeft"> </td><td class="mdescRight">dap_set_log_tag_width Sets the length of the label <a href="#ac8d0df7015664c720b27ee4f6e660479">More...</a><br /></td></tr> +<tr class="separator:ac8d0df7015664c720b27ee4f6e660479"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aff6dc9e558a255f56618643f5be92b08"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#aff6dc9e558a255f56618643f5be92b08">dap_common_init</a> (const char *a_log_file)</td></tr> +<tr class="memdesc:aff6dc9e558a255f56618643f5be92b08"><td class="mdescLeft"> </td><td class="mdescRight">dap_common_init initialise <a href="#aff6dc9e558a255f56618643f5be92b08">More...</a><br /></td></tr> +<tr class="separator:aff6dc9e558a255f56618643f5be92b08"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:adf17f0c9b75afc0078ab0fc56c0eec98"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#adf17f0c9b75afc0078ab0fc56c0eec98">dap_common_deinit</a> ()</td></tr> +<tr class="memdesc:adf17f0c9b75afc0078ab0fc56c0eec98"><td class="mdescLeft"> </td><td class="mdescRight">dap_common_deinit Deinitialise <a href="#adf17f0c9b75afc0078ab0fc56c0eec98">More...</a><br /></td></tr> +<tr class="separator:adf17f0c9b75afc0078ab0fc56c0eec98"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a56adb48b934d8b79d98f2be87d3a5df3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#a56adb48b934d8b79d98f2be87d3a5df3">_log_it</a> (const char *log_tag, enum <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a> ll, const char *format,...)</td></tr> +<tr class="memdesc:a56adb48b934d8b79d98f2be87d3a5df3"><td class="mdescLeft"> </td><td class="mdescRight">_log_it Writes information to the log <a href="#a56adb48b934d8b79d98f2be87d3a5df3">More...</a><br /></td></tr> +<tr class="separator:a56adb48b934d8b79d98f2be87d3a5df3"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ac7f5cf32897e09c2eacfcf163787ccef"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#ac7f5cf32897e09c2eacfcf163787ccef">_vlog_it</a> (const char *log_tag, enum <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a> ll, const char *format, va_list ap)</td></tr> +<tr class="separator:ac7f5cf32897e09c2eacfcf163787ccef"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a67850cb8c80403ee351125726b8c416b"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#a67850cb8c80403ee351125726b8c416b">log_error</a> ()</td></tr> +<tr class="memdesc:a67850cb8c80403ee351125726b8c416b"><td class="mdescLeft"> </td><td class="mdescRight">log_error Error log <a href="#a67850cb8c80403ee351125726b8c416b">More...</a><br /></td></tr> +<tr class="separator:a67850cb8c80403ee351125726b8c416b"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a9c7174a7bbe81eedbd86ded2e247eee7"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#a9c7174a7bbe81eedbd86ded2e247eee7">itoa</a> (int i)</td></tr> +<tr class="memdesc:a9c7174a7bbe81eedbd86ded2e247eee7"><td class="mdescLeft"> </td><td class="mdescRight">itoa The function converts an integer num to a string equivalent and places the result in a string <a href="#a9c7174a7bbe81eedbd86ded2e247eee7">More...</a><br /></td></tr> +<tr class="separator:a9c7174a7bbe81eedbd86ded2e247eee7"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a6ab10606e8ac33dd93a0526933b192c8"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#a6ab10606e8ac33dd93a0526933b192c8">time_to_rfc822</a> (char *out, size_t out_size_max, time_t t)</td></tr> +<tr class="memdesc:a6ab10606e8ac33dd93a0526933b192c8"><td class="mdescLeft"> </td><td class="mdescRight">time_to_rfc822 Convert time_t to string with RFC822 formatted date and time <a href="#a6ab10606e8ac33dd93a0526933b192c8">More...</a><br /></td></tr> +<tr class="separator:a6ab10606e8ac33dd93a0526933b192c8"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a770a25cd7afda213e944f715a27f1e7c"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#a770a25cd7afda213e944f715a27f1e7c">get_select_breaker</a> ()</td></tr> +<tr class="separator:a770a25cd7afda213e944f715a27f1e7c"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a2e61ddaeeeb7e2ec14e002e7af8fadf6"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#a2e61ddaeeeb7e2ec14e002e7af8fadf6">send_select_break</a> ()</td></tr> +<tr class="separator:a2e61ddaeeeb7e2ec14e002e7af8fadf6"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a00992fd7732b0ff40ce020728f84bc3a"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#a00992fd7732b0ff40ce020728f84bc3a">exec_with_ret</a> (const char *a_cmd)</td></tr> +<tr class="memdesc:a00992fd7732b0ff40ce020728f84bc3a"><td class="mdescLeft"> </td><td class="mdescRight">exec_with_ret Executes a command with result return <a href="#a00992fd7732b0ff40ce020728f84bc3a">More...</a><br /></td></tr> +<tr class="separator:a00992fd7732b0ff40ce020728f84bc3a"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aa4a4c13332f14e44630f5e269048249a"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#aa4a4c13332f14e44630f5e269048249a">exec_with_ret_multistring</a> (const char *a_cmd)</td></tr> +<tr class="memdesc:aa4a4c13332f14e44630f5e269048249a"><td class="mdescLeft"> </td><td class="mdescRight">exec_with_ret_multistring performs a command with a result return in the form of a multistring <a href="#aa4a4c13332f14e44630f5e269048249a">More...</a><br /></td></tr> +<tr class="separator:aa4a4c13332f14e44630f5e269048249a"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a3fa34950395c0139c5c95510de7119a8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#a3fa34950395c0139c5c95510de7119a8">dap_random_string_fill</a> (char *str, size_t length)</td></tr> +<tr class="memdesc:a3fa34950395c0139c5c95510de7119a8"><td class="mdescLeft"> </td><td class="mdescRight">random_string_fill Filling a string with random characters <a href="#a3fa34950395c0139c5c95510de7119a8">More...</a><br /></td></tr> +<tr class="separator:a3fa34950395c0139c5c95510de7119a8"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aabbc0306fee1c3a56540b1604bbb516c"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#aabbc0306fee1c3a56540b1604bbb516c">dap_random_string_create_alloc</a> (size_t a_length)</td></tr> +<tr class="memdesc:aabbc0306fee1c3a56540b1604bbb516c"><td class="mdescLeft"> </td><td class="mdescRight">random_string_create Generates a random string <a href="#aabbc0306fee1c3a56540b1604bbb516c">More...</a><br /></td></tr> +<tr class="separator:aabbc0306fee1c3a56540b1604bbb516c"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a> +Variables</h2></td></tr> +<tr class="memitem:ad817aedf213484c84d15adbe5f785333"><td class="memItemLeft" align="right" valign="top">static char </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#ad817aedf213484c84d15adbe5f785333">last_error</a> [<a class="el" href="dap__common_8c.html#aaa5fc6c48a65650511f1b50caa1c6672">LAST_ERROR_MAX</a>] = {0}</td></tr> +<tr class="separator:ad817aedf213484c84d15adbe5f785333"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ad2da3ac425bc17356fa089cd52c099bc"><td class="memItemLeft" align="right" valign="top">static enum <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#ad2da3ac425bc17356fa089cd52c099bc">log_level</a> = <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748eabef96148470abb1ed19980e5b5c40ad4">L_DEBUG</a></td></tr> +<tr class="separator:ad2da3ac425bc17356fa089cd52c099bc"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a50021147b626e80a4756b326379832e9"><td class="memItemLeft" align="right" valign="top">static FILE * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#a50021147b626e80a4756b326379832e9">s_log_file</a> = NULL</td></tr> +<tr class="separator:a50021147b626e80a4756b326379832e9"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a27810c0f123878383572ea6e7ab714aa"><td class="memItemLeft" align="right" valign="top">static char </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#a27810c0f123878383572ea6e7ab714aa">log_tag_fmt_str</a> [10]</td></tr> +<tr class="separator:a27810c0f123878383572ea6e7ab714aa"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:abd3c99eacca06234a6e4411a5ff0ae22"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#abd3c99eacca06234a6e4411a5ff0ae22">breaker_set</a> [2] = { -1, -1 }</td></tr> +<tr class="separator:abd3c99eacca06234a6e4411a5ff0ae22"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ad06983e7f6e71b233ea7ff3dee1952f2"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#ad06983e7f6e71b233ea7ff3dee1952f2">initialized</a> = 0</td></tr> +<tr class="separator:ad06983e7f6e71b233ea7ff3dee1952f2"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:af4baddcad4576299c1c44f1822c799fc"><td class="memItemLeft" align="right" valign="top">static struct timespec </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#af4baddcad4576299c1c44f1822c799fc">break_latency</a> = {0, 1 * 1000 * 1000 }</td></tr> +<tr class="separator:af4baddcad4576299c1c44f1822c799fc"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a38aacebea4dcb4a58907594acf07d45f"><td class="memItemLeft" align="right" valign="top">static const char </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html#a38aacebea4dcb4a58907594acf07d45f">l_possible_chars</a> [] ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"</td></tr> +<tr class="separator:a38aacebea4dcb4a58907594acf07d45f"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Macro Definition Documentation</h2> +<a class="anchor" id="a6b293a3f1ddf0b2dd42c5ed279e245ca"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define INT_DIGITS   19 /* enough for 64 bit integer */</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="aaa5fc6c48a65650511f1b50caa1c6672"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define LAST_ERROR_MAX   255</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a7ce0df38eb467e59f209470c8f5ac4e6"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define LOG_TAG   "dap_common"</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<h2 class="groupheader">Function Documentation</h2> +<a class="anchor" id="a56adb48b934d8b79d98f2be87d3a5df3"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void _log_it </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>log_tag</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">enum <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a> </td> + <td class="paramname"><em>ll</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>format</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname"><em>...</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>_log_it Writes information to the log </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">log_tag</td><td>Tag </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">ll</td><td>Log level </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td></td></tr> + </table> + </dd> +</dl> + +</div> +</div> +<a class="anchor" id="ac7f5cf32897e09c2eacfcf163787ccef"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void _vlog_it </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>log_tag</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">enum <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a> </td> + <td class="paramname"><em>ll</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>format</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">va_list </td> + <td class="paramname"><em>ap</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="adf17f0c9b75afc0078ab0fc56c0eec98"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void dap_common_deinit </td> + <td>(</td> + <td class="paramtype">void </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_common_deinit Deinitialise </p> + +</div> +</div> +<a class="anchor" id="aff6dc9e558a255f56618643f5be92b08"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int dap_common_init </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_log_file</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_common_init initialise </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_log_file</td><td></td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="aabbc0306fee1c3a56540b1604bbb516c"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">char* dap_random_string_create_alloc </td> + <td>(</td> + <td class="paramtype">size_t </td> + <td class="paramname"><em>a_length</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>random_string_create Generates a random string </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_length</td><td>lenght </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>a pointer to an array </dd></dl> + +</div> +</div> +<a class="anchor" id="a3fa34950395c0139c5c95510de7119a8"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void dap_random_string_fill </td> + <td>(</td> + <td class="paramtype">char * </td> + <td class="paramname"><em>str</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">size_t </td> + <td class="paramname"><em>length</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>random_string_fill Filling a string with random characters </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[out]</td><td class="paramname">str</td><td>A pointer to a char array </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">length</td><td>The length of the array or string </td></tr> + </table> + </dd> +</dl> + +</div> +</div> +<a class="anchor" id="ac8d0df7015664c720b27ee4f6e660479"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void dap_set_log_tag_width </td> + <td>(</td> + <td class="paramtype">size_t </td> + <td class="paramname"><em>width</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_set_log_tag_width Sets the length of the label </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">width</td><td>Length not more than 99 </td></tr> + </table> + </dd> +</dl> + +</div> +</div> +<a class="anchor" id="a00992fd7732b0ff40ce020728f84bc3a"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">char* exec_with_ret </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_cmd</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>exec_with_ret Executes a command with result return </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_cmd</td><td>Command </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>Result </dd></dl> + +</div> +</div> +<a class="anchor" id="aa4a4c13332f14e44630f5e269048249a"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">char* exec_with_ret_multistring </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_cmd</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>exec_with_ret_multistring performs a command with a result return in the form of a multistring </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_cmd</td><td>Coomand </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>Return </dd></dl> + +</div> +</div> +<a class="anchor" id="a770a25cd7afda213e944f715a27f1e7c"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int get_select_breaker </td> + <td>(</td> + <td class="paramtype">void </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a9c7174a7bbe81eedbd86ded2e247eee7"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">char* itoa </td> + <td>(</td> + <td class="paramtype">int </td> + <td class="paramname"><em>i</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>itoa The function converts an integer num to a string equivalent and places the result in a string </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">i</td><td>number </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="a67850cb8c80403ee351125726b8c416b"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">const char* log_error </td> + <td>(</td> + <td class="paramtype">void </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>log_error Error log </p> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="a2e61ddaeeeb7e2ec14e002e7af8fadf6"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int send_select_break </td> + <td>(</td> + <td class="paramtype">void </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a98de0fce0a8fb5c3b0cfe80bebe8f691"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void set_log_level </td> + <td>(</td> + <td class="paramtype">enum <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a> </td> + <td class="paramname"><em>ll</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>set_log_level Sets the logging level </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">ll</td><td>logging level </td></tr> + </table> + </dd> +</dl> + +</div> +</div> +<a class="anchor" id="a6ab10606e8ac33dd93a0526933b192c8"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int time_to_rfc822 </td> + <td>(</td> + <td class="paramtype">char * </td> + <td class="paramname"><em>out</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">size_t </td> + <td class="paramname"><em>out_size_max</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">time_t </td> + <td class="paramname"><em>t</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>time_to_rfc822 Convert time_t to string with RFC822 formatted date and time </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Output buffer </td></tr> + <tr><td class="paramdir">[out]</td><td class="paramname">out_size_mac</td><td>Maximum size of output buffer </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">t</td><td>UNIX time </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>Length of resulting string if ok or lesser than zero if not </dd></dl> + +</div> +</div> +<h2 class="groupheader">Variable Documentation</h2> +<a class="anchor" id="af4baddcad4576299c1c44f1822c799fc"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">struct timespec break_latency = {0, 1 * 1000 * 1000 }</td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="abd3c99eacca06234a6e4411a5ff0ae22"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">int breaker_set[2] = { -1, -1 }</td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="ad06983e7f6e71b233ea7ff3dee1952f2"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">int initialized = 0</td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a38aacebea4dcb4a58907594acf07d45f"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">const char l_possible_chars[] ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"</td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="ad817aedf213484c84d15adbe5f785333"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">char last_error[<a class="el" href="dap__common_8c.html#aaa5fc6c48a65650511f1b50caa1c6672">LAST_ERROR_MAX</a>] = {0}</td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="ad2da3ac425bc17356fa089cd52c099bc"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">enum <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a> <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a> = <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748eabef96148470abb1ed19980e5b5c40ad4">L_DEBUG</a></td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a27810c0f123878383572ea6e7ab714aa"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">char log_tag_fmt_str[10]</td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a50021147b626e80a4756b326379832e9"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">FILE* s_log_file = NULL</td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dap__common_8h.html b/libdap/docs/dap__common_8h.html new file mode 100755 index 0000000000000000000000000000000000000000..b68e516d6405b9f74f06009ddd9f09f43a1576af --- /dev/null +++ b/libdap/docs/dap__common_8h.html @@ -0,0 +1,787 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: core/dap_common.h File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_4270bfced15e0e73154b13468c7c9ad9.html">core</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#define-members">Macros</a> | +<a href="#enum-members">Enumerations</a> | +<a href="#func-members">Functions</a> </div> + <div class="headertitle"> +<div class="title">dap_common.h File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include <stdarg.h></code><br /> +<code>#include <stddef.h></code><br /> +<code>#include <stdlib.h></code><br /> +<code>#include <time.h></code><br /> +</div> +<p><a href="dap__common_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> +Macros</h2></td></tr> +<tr class="memitem:a74a9d9e85c7cc12c155f147d9a971cad"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#a74a9d9e85c7cc12c155f147d9a971cad">DAP_NEW</a>(a)   ( (a*) malloc(sizeof(a)))</td></tr> +<tr class="separator:a74a9d9e85c7cc12c155f147d9a971cad"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a80373ba28489011c16cd76f6d0ba5b53"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#a80373ba28489011c16cd76f6d0ba5b53">DAP_NEW_SIZE</a>(a, b)   ( (a*) malloc(b))</td></tr> +<tr class="separator:a80373ba28489011c16cd76f6d0ba5b53"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a9270d1341aa00be475591ecfa8985c08"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#a9270d1341aa00be475591ecfa8985c08">DAP_NEW_Z</a>(a)   ( (a*) calloc(1,sizeof(a)))</td></tr> +<tr class="separator:a9270d1341aa00be475591ecfa8985c08"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ad0f1f3c74154c73a5dfd33598dfd375b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#ad0f1f3c74154c73a5dfd33598dfd375b">DAP_NEW_Z_SIZE</a>(a, b)   ( (a*) calloc(1,b))</td></tr> +<tr class="separator:ad0f1f3c74154c73a5dfd33598dfd375b"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:abc94d3603906f97d0ce7368f44eebf8b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#abc94d3603906f97d0ce7368f44eebf8b">DAP_DELETE</a>(a)   free(a)</td></tr> +<tr class="separator:abc94d3603906f97d0ce7368f44eebf8b"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a7303c16a9766b284e07bd6790d65b59e"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#a7303c16a9766b284e07bd6790d65b59e">DAP_DUP</a>(a)   (__typeof(a) ret = memcpy(ret,a,sizeof(*a)) )</td></tr> +<tr class="separator:a7303c16a9766b284e07bd6790d65b59e"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a9757f0cc77df1fd0759b1b91a9f63ff0"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#a9757f0cc77df1fd0759b1b91a9f63ff0">DAP_PROTOCOL_VERSION</a>   21</td></tr> +<tr class="separator:a9757f0cc77df1fd0759b1b91a9f63ff0"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:acd8f4f3ce595157ca36ce6b61ca4195e"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#acd8f4f3ce595157ca36ce6b61ca4195e">log_it</a>(_log_level, ...)   <a class="el" href="dap__common_8h.html#acbe3239b788dc1105a094596354a7e42">_log_it</a>(<a class="el" href="dap__process__memory_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">LOG_TAG</a>,_log_level,##__VA_ARGS__)</td></tr> +<tr class="separator:acd8f4f3ce595157ca36ce6b61ca4195e"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ab53061ef6723b1e4a233022ef9f33c76"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#ab53061ef6723b1e4a233022ef9f33c76">vlog_it</a>(a_log_level, a_format, a_ap)   <a class="el" href="dap__common_8h.html#ab3ae03011f7dfbbf40dce01f7bdd4157">_vlog_it</a>(<a class="el" href="dap__process__memory_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">LOG_TAG</a>,a_log_level,a_format,a_ap)</td></tr> +<tr class="separator:ab53061ef6723b1e4a233022ef9f33c76"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a> +Enumerations</h2></td></tr> +<tr class="memitem:ac91d55174d383848b976a34de843748e"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a> { <br /> +  <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748ead95cd234638314479dea217167c37e4a">L_CRITICAL</a> =5, +<a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748ea5aa6d01f59e4b628af96f650fc5ecc15">L_ERROR</a> =4, +<a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748ea83e54d43eb3fd145052377ecd43932a1">L_WARNING</a> =3, +<a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748eac0e398e95a19b2d3e23eb0620e91a515">L_NOTICE</a> =2, +<br /> +  <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748eae580867d0ddde34905fea2f8669839b7">L_INFO</a> =1, +<a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748eabef96148470abb1ed19980e5b5c40ad4">L_DEBUG</a> =0 +<br /> + }<tr class="memdesc:ac91d55174d383848b976a34de843748e"><td class="mdescLeft"> </td><td class="mdescRight">The log_level enum. <a href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">More...</a><br /></td></tr> +</td></tr> +<tr class="separator:ac91d55174d383848b976a34de843748e"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +Functions</h2></td></tr> +<tr class="memitem:aff6dc9e558a255f56618643f5be92b08"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#aff6dc9e558a255f56618643f5be92b08">dap_common_init</a> (const char *a_log_file)</td></tr> +<tr class="memdesc:aff6dc9e558a255f56618643f5be92b08"><td class="mdescLeft"> </td><td class="mdescRight">dap_common_init initialise <a href="#aff6dc9e558a255f56618643f5be92b08">More...</a><br /></td></tr> +<tr class="separator:aff6dc9e558a255f56618643f5be92b08"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ab96d7e843bc09468220a7d264295cf69"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#ab96d7e843bc09468220a7d264295cf69">dap_common_deinit</a> (void)</td></tr> +<tr class="memdesc:ab96d7e843bc09468220a7d264295cf69"><td class="mdescLeft"> </td><td class="mdescRight">dap_common_deinit Deinitialise <a href="#ab96d7e843bc09468220a7d264295cf69">More...</a><br /></td></tr> +<tr class="separator:ab96d7e843bc09468220a7d264295cf69"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:acbe3239b788dc1105a094596354a7e42"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#acbe3239b788dc1105a094596354a7e42">_log_it</a> (const char *log_tag, enum <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a>, const char *format,...)</td></tr> +<tr class="memdesc:acbe3239b788dc1105a094596354a7e42"><td class="mdescLeft"> </td><td class="mdescRight">_log_it Writes information to the log <a href="#acbe3239b788dc1105a094596354a7e42">More...</a><br /></td></tr> +<tr class="separator:acbe3239b788dc1105a094596354a7e42"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ab3ae03011f7dfbbf40dce01f7bdd4157"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#ab3ae03011f7dfbbf40dce01f7bdd4157">_vlog_it</a> (const char *log_tag, enum <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a>, const char *format, va_list ap)</td></tr> +<tr class="separator:ab3ae03011f7dfbbf40dce01f7bdd4157"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aa76592df3b155b21f4d05cbd042db5f7"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#aa76592df3b155b21f4d05cbd042db5f7">log_error</a> (void)</td></tr> +<tr class="memdesc:aa76592df3b155b21f4d05cbd042db5f7"><td class="mdescLeft"> </td><td class="mdescRight">log_error Error log <a href="#aa76592df3b155b21f4d05cbd042db5f7">More...</a><br /></td></tr> +<tr class="separator:aa76592df3b155b21f4d05cbd042db5f7"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a98de0fce0a8fb5c3b0cfe80bebe8f691"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#a98de0fce0a8fb5c3b0cfe80bebe8f691">set_log_level</a> (enum <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a> ll)</td></tr> +<tr class="memdesc:a98de0fce0a8fb5c3b0cfe80bebe8f691"><td class="mdescLeft"> </td><td class="mdescRight">set_log_level Sets the logging level <a href="#a98de0fce0a8fb5c3b0cfe80bebe8f691">More...</a><br /></td></tr> +<tr class="separator:a98de0fce0a8fb5c3b0cfe80bebe8f691"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ac8d0df7015664c720b27ee4f6e660479"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#ac8d0df7015664c720b27ee4f6e660479">dap_set_log_tag_width</a> (size_t width)</td></tr> +<tr class="memdesc:ac8d0df7015664c720b27ee4f6e660479"><td class="mdescLeft"> </td><td class="mdescRight">dap_set_log_tag_width Sets the length of the label <a href="#ac8d0df7015664c720b27ee4f6e660479">More...</a><br /></td></tr> +<tr class="separator:ac8d0df7015664c720b27ee4f6e660479"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a6ab10606e8ac33dd93a0526933b192c8"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#a6ab10606e8ac33dd93a0526933b192c8">time_to_rfc822</a> (char *out, size_t out_size_max, time_t t)</td></tr> +<tr class="memdesc:a6ab10606e8ac33dd93a0526933b192c8"><td class="mdescLeft"> </td><td class="mdescRight">time_to_rfc822 Convert time_t to string with RFC822 formatted date and time <a href="#a6ab10606e8ac33dd93a0526933b192c8">More...</a><br /></td></tr> +<tr class="separator:a6ab10606e8ac33dd93a0526933b192c8"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ab027eeb728bcf25f75bc592fc627e4fe"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#ab027eeb728bcf25f75bc592fc627e4fe">get_select_breaker</a> (void)</td></tr> +<tr class="separator:ab027eeb728bcf25f75bc592fc627e4fe"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aa3c5a3515672b9ecc8d114af678cb0a4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#aa3c5a3515672b9ecc8d114af678cb0a4">send_select_break</a> (void)</td></tr> +<tr class="separator:aa3c5a3515672b9ecc8d114af678cb0a4"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a00992fd7732b0ff40ce020728f84bc3a"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#a00992fd7732b0ff40ce020728f84bc3a">exec_with_ret</a> (const char *a_cmd)</td></tr> +<tr class="memdesc:a00992fd7732b0ff40ce020728f84bc3a"><td class="mdescLeft"> </td><td class="mdescRight">exec_with_ret Executes a command with result return <a href="#a00992fd7732b0ff40ce020728f84bc3a">More...</a><br /></td></tr> +<tr class="separator:a00992fd7732b0ff40ce020728f84bc3a"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aa4a4c13332f14e44630f5e269048249a"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#aa4a4c13332f14e44630f5e269048249a">exec_with_ret_multistring</a> (const char *a_cmd)</td></tr> +<tr class="memdesc:aa4a4c13332f14e44630f5e269048249a"><td class="mdescLeft"> </td><td class="mdescRight">exec_with_ret_multistring performs a command with a result return in the form of a multistring <a href="#aa4a4c13332f14e44630f5e269048249a">More...</a><br /></td></tr> +<tr class="separator:aa4a4c13332f14e44630f5e269048249a"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aabbc0306fee1c3a56540b1604bbb516c"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#aabbc0306fee1c3a56540b1604bbb516c">dap_random_string_create_alloc</a> (size_t a_length)</td></tr> +<tr class="memdesc:aabbc0306fee1c3a56540b1604bbb516c"><td class="mdescLeft"> </td><td class="mdescRight">random_string_create Generates a random string <a href="#aabbc0306fee1c3a56540b1604bbb516c">More...</a><br /></td></tr> +<tr class="separator:aabbc0306fee1c3a56540b1604bbb516c"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a3fa34950395c0139c5c95510de7119a8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html#a3fa34950395c0139c5c95510de7119a8">dap_random_string_fill</a> (char *str, size_t length)</td></tr> +<tr class="memdesc:a3fa34950395c0139c5c95510de7119a8"><td class="mdescLeft"> </td><td class="mdescRight">random_string_fill Filling a string with random characters <a href="#a3fa34950395c0139c5c95510de7119a8">More...</a><br /></td></tr> +<tr class="separator:a3fa34950395c0139c5c95510de7119a8"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Macro Definition Documentation</h2> +<a class="anchor" id="abc94d3603906f97d0ce7368f44eebf8b"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define DAP_DELETE</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">a</td><td>)</td> + <td>   free(a)</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a7303c16a9766b284e07bd6790d65b59e"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define DAP_DUP</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">a</td><td>)</td> + <td>   (__typeof(a) ret = memcpy(ret,a,sizeof(*a)) )</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a74a9d9e85c7cc12c155f147d9a971cad"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define DAP_NEW</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">a</td><td>)</td> + <td>   ( (a*) malloc(sizeof(a)))</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a80373ba28489011c16cd76f6d0ba5b53"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define DAP_NEW_SIZE</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">a, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname">b </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td>   ( (a*) malloc(b))</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a9270d1341aa00be475591ecfa8985c08"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define DAP_NEW_Z</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">a</td><td>)</td> + <td>   ( (a*) calloc(1,sizeof(a)))</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="ad0f1f3c74154c73a5dfd33598dfd375b"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define DAP_NEW_Z_SIZE</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">a, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname">b </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td>   ( (a*) calloc(1,b))</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a9757f0cc77df1fd0759b1b91a9f63ff0"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define DAP_PROTOCOL_VERSION   21</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="acd8f4f3ce595157ca36ce6b61ca4195e"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define log_it</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">_log_level, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname"><em>...</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td>   <a class="el" href="dap__common_8h.html#acbe3239b788dc1105a094596354a7e42">_log_it</a>(<a class="el" href="dap__process__memory_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">LOG_TAG</a>,_log_level,##__VA_ARGS__)</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="ab53061ef6723b1e4a233022ef9f33c76"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define vlog_it</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">a_log_level, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname">a_format, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname">a_ap </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td>   <a class="el" href="dap__common_8h.html#ab3ae03011f7dfbbf40dce01f7bdd4157">_vlog_it</a>(<a class="el" href="dap__process__memory_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">LOG_TAG</a>,a_log_level,a_format,a_ap)</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<h2 class="groupheader">Enumeration Type Documentation</h2> +<a class="anchor" id="ac91d55174d383848b976a34de843748e"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">enum <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>The log_level enum. </p> +<table class="fieldtable"> +<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="ac91d55174d383848b976a34de843748ead95cd234638314479dea217167c37e4a"></a>L_CRITICAL </td><td class="fielddoc"> +</td></tr> +<tr><td class="fieldname"><a class="anchor" id="ac91d55174d383848b976a34de843748ea5aa6d01f59e4b628af96f650fc5ecc15"></a>L_ERROR </td><td class="fielddoc"> +</td></tr> +<tr><td class="fieldname"><a class="anchor" id="ac91d55174d383848b976a34de843748ea83e54d43eb3fd145052377ecd43932a1"></a>L_WARNING </td><td class="fielddoc"> +</td></tr> +<tr><td class="fieldname"><a class="anchor" id="ac91d55174d383848b976a34de843748eac0e398e95a19b2d3e23eb0620e91a515"></a>L_NOTICE </td><td class="fielddoc"> +</td></tr> +<tr><td class="fieldname"><a class="anchor" id="ac91d55174d383848b976a34de843748eae580867d0ddde34905fea2f8669839b7"></a>L_INFO </td><td class="fielddoc"> +</td></tr> +<tr><td class="fieldname"><a class="anchor" id="ac91d55174d383848b976a34de843748eabef96148470abb1ed19980e5b5c40ad4"></a>L_DEBUG </td><td class="fielddoc"> +</td></tr> +</table> + +</div> +</div> +<h2 class="groupheader">Function Documentation</h2> +<a class="anchor" id="acbe3239b788dc1105a094596354a7e42"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void _log_it </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>log_tag</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">enum <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a> </td> + <td class="paramname"><em>ll</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>format</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname"><em>...</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>_log_it Writes information to the log </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">log_tag</td><td>Tag </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">ll</td><td>Log level </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td></td></tr> + </table> + </dd> +</dl> + +</div> +</div> +<a class="anchor" id="ab3ae03011f7dfbbf40dce01f7bdd4157"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void _vlog_it </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>log_tag</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">enum </td> + <td class="paramname"><em>log_level</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>format</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">va_list </td> + <td class="paramname"><em>ap</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="ab96d7e843bc09468220a7d264295cf69"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void dap_common_deinit </td> + <td>(</td> + <td class="paramtype">void </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_common_deinit Deinitialise </p> + +</div> +</div> +<a class="anchor" id="aff6dc9e558a255f56618643f5be92b08"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int dap_common_init </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_log_file</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_common_init initialise </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_log_file</td><td></td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="aabbc0306fee1c3a56540b1604bbb516c"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">char* dap_random_string_create_alloc </td> + <td>(</td> + <td class="paramtype">size_t </td> + <td class="paramname"><em>a_length</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>random_string_create Generates a random string </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_length</td><td>lenght </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>a pointer to an array </dd></dl> + +</div> +</div> +<a class="anchor" id="a3fa34950395c0139c5c95510de7119a8"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void dap_random_string_fill </td> + <td>(</td> + <td class="paramtype">char * </td> + <td class="paramname"><em>str</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">size_t </td> + <td class="paramname"><em>length</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>random_string_fill Filling a string with random characters </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[out]</td><td class="paramname">str</td><td>A pointer to a char array </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">length</td><td>The length of the array or string </td></tr> + </table> + </dd> +</dl> + +</div> +</div> +<a class="anchor" id="ac8d0df7015664c720b27ee4f6e660479"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void dap_set_log_tag_width </td> + <td>(</td> + <td class="paramtype">size_t </td> + <td class="paramname"><em>width</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_set_log_tag_width Sets the length of the label </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">width</td><td>Length not more than 99 </td></tr> + </table> + </dd> +</dl> + +</div> +</div> +<a class="anchor" id="a00992fd7732b0ff40ce020728f84bc3a"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">char* exec_with_ret </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_cmd</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>exec_with_ret Executes a command with result return </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_cmd</td><td>Command </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>Result </dd></dl> + +</div> +</div> +<a class="anchor" id="aa4a4c13332f14e44630f5e269048249a"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">char* exec_with_ret_multistring </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_cmd</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>exec_with_ret_multistring performs a command with a result return in the form of a multistring </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_cmd</td><td>Coomand </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>Return </dd></dl> + +</div> +</div> +<a class="anchor" id="ab027eeb728bcf25f75bc592fc627e4fe"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int get_select_breaker </td> + <td>(</td> + <td class="paramtype">void </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="aa76592df3b155b21f4d05cbd042db5f7"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">const char* log_error </td> + <td>(</td> + <td class="paramtype">void </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>log_error Error log </p> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="aa3c5a3515672b9ecc8d114af678cb0a4"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int send_select_break </td> + <td>(</td> + <td class="paramtype">void </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a98de0fce0a8fb5c3b0cfe80bebe8f691"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void set_log_level </td> + <td>(</td> + <td class="paramtype">enum <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a> </td> + <td class="paramname"><em>ll</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>set_log_level Sets the logging level </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">ll</td><td>logging level </td></tr> + </table> + </dd> +</dl> + +</div> +</div> +<a class="anchor" id="a6ab10606e8ac33dd93a0526933b192c8"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int time_to_rfc822 </td> + <td>(</td> + <td class="paramtype">char * </td> + <td class="paramname"><em>out</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">size_t </td> + <td class="paramname"><em>out_size_max</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">time_t </td> + <td class="paramname"><em>t</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>time_to_rfc822 Convert time_t to string with RFC822 formatted date and time </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Output buffer </td></tr> + <tr><td class="paramdir">[out]</td><td class="paramname">out_size_mac</td><td>Maximum size of output buffer </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">t</td><td>UNIX time </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>Length of resulting string if ok or lesser than zero if not </dd></dl> + +</div> +</div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dap__common_8h_source.html b/libdap/docs/dap__common_8h_source.html new file mode 100755 index 0000000000000000000000000000000000000000..540e2ae169331a7a574e238cfbc15a894a59830f --- /dev/null +++ b/libdap/docs/dap__common_8h_source.html @@ -0,0 +1,122 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: core/dap_common.h Source File</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_4270bfced15e0e73154b13468c7c9ad9.html">core</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">dap_common.h</div> </div> +</div><!--header--> +<div class="contents"> +<a href="dap__common_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Authors:</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * Dmitriy A. Gearasimov <kahovski@gmail.com></span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * DeM Labs Inc. https://demlabs.net</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * DeM Labs Open source community https://gitlab.demlabs.net/cellframe</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * Copyright (c) 2017-2018</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * All rights reserved.</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"></span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> This file is part of DAP (Deus Applications Prototypes) the open source project</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"></span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> (at your option) any later version.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"></span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> DAP is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> GNU General Public License for more details.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"></span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> along with any DAP based project. If not, see <http://www.gnu.org/licenses/>.</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment">*/</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include <stdarg.h></span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <stddef.h></span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <stdlib.h></span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <time.h></span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="dap__common_8h.html#a74a9d9e85c7cc12c155f147d9a971cad"> 30</a></span> <span class="preprocessor">#define DAP_NEW(a) ( (a*) malloc(sizeof(a)))</span></div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="dap__common_8h.html#a80373ba28489011c16cd76f6d0ba5b53"> 31</a></span> <span class="preprocessor">#define DAP_NEW_SIZE(a,b) ( (a*) malloc(b))</span></div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="dap__common_8h.html#a9270d1341aa00be475591ecfa8985c08"> 32</a></span> <span class="preprocessor">#define DAP_NEW_Z(a) ( (a*) calloc(1,sizeof(a)))</span></div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="dap__common_8h.html#ad0f1f3c74154c73a5dfd33598dfd375b"> 33</a></span> <span class="preprocessor">#define DAP_NEW_Z_SIZE(a,b) ( (a*) calloc(1,b))</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="dap__common_8h.html#abc94d3603906f97d0ce7368f44eebf8b"> 35</a></span> <span class="preprocessor">#define DAP_DELETE(a) free(a)</span></div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="dap__common_8h.html#a7303c16a9766b284e07bd6790d65b59e"> 36</a></span> <span class="preprocessor">#define DAP_DUP(a) (__typeof(a) ret = memcpy(ret,a,sizeof(*a)) )</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="dap__common_8h.html#a9757f0cc77df1fd0759b1b91a9f63ff0"> 38</a></span> <span class="preprocessor">#define DAP_PROTOCOL_VERSION 21</span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> </div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="preprocessor">#if defined(__GNUC__) ||defined (__clang__)</span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="preprocessor">#define DAP_ALIGN_PACKED __attribute__((aligned(1),packed))</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e"> 47</a></span> <span class="keyword">enum</span> <a class="code" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a>{<a class="code" href="dap__common_8h.html#ac91d55174d383848b976a34de843748ead95cd234638314479dea217167c37e4a">L_CRITICAL</a>=5,<a class="code" href="dap__common_8h.html#ac91d55174d383848b976a34de843748ea5aa6d01f59e4b628af96f650fc5ecc15">L_ERROR</a>=4, <a class="code" href="dap__common_8h.html#ac91d55174d383848b976a34de843748ea83e54d43eb3fd145052377ecd43932a1">L_WARNING</a>=3,<a class="code" href="dap__common_8h.html#ac91d55174d383848b976a34de843748eac0e398e95a19b2d3e23eb0620e91a515">L_NOTICE</a>=2,<a class="code" href="dap__common_8h.html#ac91d55174d383848b976a34de843748eae580867d0ddde34905fea2f8669839b7">L_INFO</a>=1,<a class="code" href="dap__common_8h.html#ac91d55174d383848b976a34de843748eabef96148470abb1ed19980e5b5c40ad4">L_DEBUG</a>=0};</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="keywordtype">int</span> <a class="code" href="dap__common_8h.html#aff6dc9e558a255f56618643f5be92b08">dap_common_init</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * a_log_file );</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="keywordtype">void</span> <a class="code" href="dap__common_8h.html#ab96d7e843bc09468220a7d264295cf69">dap_common_deinit</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="keywordtype">void</span> <a class="code" href="dap__common_8h.html#acbe3239b788dc1105a094596354a7e42">_log_it</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * log_tag, <span class="keyword">enum</span> <a class="code" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a>, <span class="keyword">const</span> <span class="keywordtype">char</span> * format,...);</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="keywordtype">void</span> <a class="code" href="dap__common_8h.html#ab3ae03011f7dfbbf40dce01f7bdd4157">_vlog_it</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * log_tag, <span class="keyword">enum</span> <a class="code" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a>, <span class="keyword">const</span> <span class="keywordtype">char</span> * format, va_list ap );</div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="dap__common_8h.html#acd8f4f3ce595157ca36ce6b61ca4195e"> 58</a></span> <span class="preprocessor">#define log_it(_log_level,...) _log_it(LOG_TAG,_log_level,##__VA_ARGS__)</span></div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="dap__common_8h.html#ab53061ef6723b1e4a233022ef9f33c76"> 59</a></span> <span class="preprocessor">#define vlog_it(a_log_level,a_format,a_ap) _vlog_it(LOG_TAG,a_log_level,a_format,a_ap)</span></div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="dap__common_8h.html#aa76592df3b155b21f4d05cbd042db5f7">log_error</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="keywordtype">void</span> <a class="code" href="dap__common_8h.html#a98de0fce0a8fb5c3b0cfe80bebe8f691">set_log_level</a>(<span class="keyword">enum</span> <a class="code" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a> ll);</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="keywordtype">void</span> <a class="code" href="dap__common_8h.html#ac8d0df7015664c720b27ee4f6e660479">dap_set_log_tag_width</a>(<span class="keywordtype">size_t</span> width);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> </div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="preprocessor">#ifdef __GNUC__</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="keywordtype">char</span> *<a class="code" href="dap__common_8c.html#a9c7174a7bbe81eedbd86ded2e247eee7">itoa</a>(<span class="keywordtype">int</span> i);</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> </div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="preprocessor">#elif _MSC_VER</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="keywordtype">char</span> *strndup(<span class="keyword">const</span> <span class="keywordtype">char</span> *s, <span class="keywordtype">size_t</span> n);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="keywordtype">int</span> <a class="code" href="dap__common_8h.html#a6ab10606e8ac33dd93a0526933b192c8">time_to_rfc822</a>(<span class="keywordtype">char</span> * out, <span class="keywordtype">size_t</span> out_size_max, time_t t);</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> </div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="keywordtype">int</span> <a class="code" href="dap__common_8h.html#ab027eeb728bcf25f75bc592fc627e4fe">get_select_breaker</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="keywordtype">int</span> <a class="code" href="dap__common_8h.html#aa3c5a3515672b9ecc8d114af678cb0a4">send_select_break</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="keywordtype">char</span> * <a class="code" href="dap__common_8h.html#a00992fd7732b0ff40ce020728f84bc3a">exec_with_ret</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * a_cmd);</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="keywordtype">char</span> * <a class="code" href="dap__common_8h.html#aa4a4c13332f14e44630f5e269048249a">exec_with_ret_multistring</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * a_cmd);</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="keywordtype">char</span> * <a class="code" href="dap__common_8h.html#aabbc0306fee1c3a56540b1604bbb516c">dap_random_string_create_alloc</a>(<span class="keywordtype">size_t</span> a_length);</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="keywordtype">void</span> <a class="code" href="dap__common_8h.html#a3fa34950395c0139c5c95510de7119a8">dap_random_string_fill</a>(<span class="keywordtype">char</span> *str, <span class="keywordtype">size_t</span> length);</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> </div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> }</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="preprocessor">#endif</span></div><div class="ttc" id="dap__common_8h_html_ac91d55174d383848b976a34de843748eabef96148470abb1ed19980e5b5c40ad4"><div class="ttname"><a href="dap__common_8h.html#ac91d55174d383848b976a34de843748eabef96148470abb1ed19980e5b5c40ad4">L_DEBUG</a></div><div class="ttdef"><b>Definition:</b> dap_common.h:47</div></div> +<div class="ttc" id="dap__common_8h_html_ac8d0df7015664c720b27ee4f6e660479"><div class="ttname"><a href="dap__common_8h.html#ac8d0df7015664c720b27ee4f6e660479">dap_set_log_tag_width</a></div><div class="ttdeci">void dap_set_log_tag_width(size_t width)</div><div class="ttdoc">dap_set_log_tag_width Sets the length of the label </div><div class="ttdef"><b>Definition:</b> dap_common.c:77</div></div> +<div class="ttc" id="dap__common_8h_html_ac91d55174d383848b976a34de843748ea5aa6d01f59e4b628af96f650fc5ecc15"><div class="ttname"><a href="dap__common_8h.html#ac91d55174d383848b976a34de843748ea5aa6d01f59e4b628af96f650fc5ecc15">L_ERROR</a></div><div class="ttdef"><b>Definition:</b> dap_common.h:47</div></div> +<div class="ttc" id="dap__common_8h_html_ac91d55174d383848b976a34de843748e"><div class="ttname"><a href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">log_level</a></div><div class="ttdeci">log_level</div><div class="ttdoc">The log_level enum. </div><div class="ttdef"><b>Definition:</b> dap_common.h:47</div></div> +<div class="ttc" id="dap__common_8h_html_ac91d55174d383848b976a34de843748eac0e398e95a19b2d3e23eb0620e91a515"><div class="ttname"><a href="dap__common_8h.html#ac91d55174d383848b976a34de843748eac0e398e95a19b2d3e23eb0620e91a515">L_NOTICE</a></div><div class="ttdef"><b>Definition:</b> dap_common.h:47</div></div> +<div class="ttc" id="dap__common_8h_html_aa4a4c13332f14e44630f5e269048249a"><div class="ttname"><a href="dap__common_8h.html#aa4a4c13332f14e44630f5e269048249a">exec_with_ret_multistring</a></div><div class="ttdeci">char * exec_with_ret_multistring(const char *a_cmd)</div><div class="ttdoc">exec_with_ret_multistring performs a command with a result return in the form of a multistring ...</div><div class="ttdef"><b>Definition:</b> dap_common.c:362</div></div> +<div class="ttc" id="dap__common_8h_html_ac91d55174d383848b976a34de843748eae580867d0ddde34905fea2f8669839b7"><div class="ttname"><a href="dap__common_8h.html#ac91d55174d383848b976a34de843748eae580867d0ddde34905fea2f8669839b7">L_INFO</a></div><div class="ttdef"><b>Definition:</b> dap_common.h:47</div></div> +<div class="ttc" id="dap__common_8c_html_a9c7174a7bbe81eedbd86ded2e247eee7"><div class="ttname"><a href="dap__common_8c.html#a9c7174a7bbe81eedbd86ded2e247eee7">itoa</a></div><div class="ttdeci">char * itoa(int i)</div><div class="ttdoc">itoa The function converts an integer num to a string equivalent and places the result in a string ...</div><div class="ttdef"><b>Definition:</b> dap_common.c:228</div></div> +<div class="ttc" id="dap__common_8h_html_ab96d7e843bc09468220a7d264295cf69"><div class="ttname"><a href="dap__common_8h.html#ab96d7e843bc09468220a7d264295cf69">dap_common_deinit</a></div><div class="ttdeci">void dap_common_deinit(void)</div><div class="ttdoc">dap_common_deinit Deinitialise </div><div class="ttdef"><b>Definition:</b> dap_common.c:114</div></div> +<div class="ttc" id="dap__common_8h_html_a98de0fce0a8fb5c3b0cfe80bebe8f691"><div class="ttname"><a href="dap__common_8h.html#a98de0fce0a8fb5c3b0cfe80bebe8f691">set_log_level</a></div><div class="ttdeci">void set_log_level(enum log_level ll)</div><div class="ttdoc">set_log_level Sets the logging level </div><div class="ttdef"><b>Definition:</b> dap_common.c:69</div></div> +<div class="ttc" id="dap__common_8h_html_aabbc0306fee1c3a56540b1604bbb516c"><div class="ttname"><a href="dap__common_8h.html#aabbc0306fee1c3a56540b1604bbb516c">dap_random_string_create_alloc</a></div><div class="ttdeci">char * dap_random_string_create_alloc(size_t a_length)</div><div class="ttdoc">random_string_create Generates a random string </div><div class="ttdef"><b>Definition:</b> dap_common.c:401</div></div> +<div class="ttc" id="dap__common_8h_html_ab3ae03011f7dfbbf40dce01f7bdd4157"><div class="ttname"><a href="dap__common_8h.html#ab3ae03011f7dfbbf40dce01f7bdd4157">_vlog_it</a></div><div class="ttdeci">void _vlog_it(const char *log_tag, enum log_level, const char *format, va_list ap)</div><div class="ttdef"><b>Definition:</b> dap_common.c:137</div></div> +<div class="ttc" id="dap__common_8h_html_aff6dc9e558a255f56618643f5be92b08"><div class="ttname"><a href="dap__common_8h.html#aff6dc9e558a255f56618643f5be92b08">dap_common_init</a></div><div class="ttdeci">int dap_common_init(const char *a_log_file)</div><div class="ttdoc">dap_common_init initialise </div><div class="ttdef"><b>Definition:</b> dap_common.c:94</div></div> +<div class="ttc" id="dap__common_8h_html_ac91d55174d383848b976a34de843748ea83e54d43eb3fd145052377ecd43932a1"><div class="ttname"><a href="dap__common_8h.html#ac91d55174d383848b976a34de843748ea83e54d43eb3fd145052377ecd43932a1">L_WARNING</a></div><div class="ttdef"><b>Definition:</b> dap_common.h:47</div></div> +<div class="ttc" id="dap__common_8h_html_aa3c5a3515672b9ecc8d114af678cb0a4"><div class="ttname"><a href="dap__common_8h.html#aa3c5a3515672b9ecc8d114af678cb0a4">send_select_break</a></div><div class="ttdeci">int send_select_break(void)</div><div class="ttdef"><b>Definition:</b> dap_common.c:293</div></div> +<div class="ttc" id="dap__common_8h_html_a6ab10606e8ac33dd93a0526933b192c8"><div class="ttname"><a href="dap__common_8h.html#a6ab10606e8ac33dd93a0526933b192c8">time_to_rfc822</a></div><div class="ttdeci">int time_to_rfc822(char *out, size_t out_size_max, time_t t)</div><div class="ttdoc">time_to_rfc822 Convert time_t to string with RFC822 formatted date and time </div><div class="ttdef"><b>Definition:</b> dap_common.c:257</div></div> +<div class="ttc" id="dap__common_8h_html_aa76592df3b155b21f4d05cbd042db5f7"><div class="ttname"><a href="dap__common_8h.html#aa76592df3b155b21f4d05cbd042db5f7">log_error</a></div><div class="ttdeci">const char * log_error(void)</div><div class="ttdoc">log_error Error log </div><div class="ttdef"><b>Definition:</b> dap_common.c:215</div></div> +<div class="ttc" id="dap__common_8h_html_ab027eeb728bcf25f75bc592fc627e4fe"><div class="ttname"><a href="dap__common_8h.html#ab027eeb728bcf25f75bc592fc627e4fe">get_select_breaker</a></div><div class="ttdeci">int get_select_breaker(void)</div><div class="ttdef"><b>Definition:</b> dap_common.c:283</div></div> +<div class="ttc" id="dap__common_8h_html_a3fa34950395c0139c5c95510de7119a8"><div class="ttname"><a href="dap__common_8h.html#a3fa34950395c0139c5c95510de7119a8">dap_random_string_fill</a></div><div class="ttdeci">void dap_random_string_fill(char *str, size_t length)</div><div class="ttdoc">random_string_fill Filling a string with random characters </div><div class="ttdef"><b>Definition:</b> dap_common.c:390</div></div> +<div class="ttc" id="dap__common_8h_html_acbe3239b788dc1105a094596354a7e42"><div class="ttname"><a href="dap__common_8h.html#acbe3239b788dc1105a094596354a7e42">_log_it</a></div><div class="ttdeci">void _log_it(const char *log_tag, enum log_level, const char *format,...)</div><div class="ttdoc">_log_it Writes information to the log </div><div class="ttdef"><b>Definition:</b> dap_common.c:125</div></div> +<div class="ttc" id="dap__common_8h_html_a00992fd7732b0ff40ce020728f84bc3a"><div class="ttname"><a href="dap__common_8h.html#a00992fd7732b0ff40ce020728f84bc3a">exec_with_ret</a></div><div class="ttdeci">char * exec_with_ret(const char *a_cmd)</div><div class="ttdoc">exec_with_ret Executes a command with result return </div><div class="ttdef"><b>Definition:</b> dap_common.c:339</div></div> +<div class="ttc" id="dap__common_8h_html_ac91d55174d383848b976a34de843748ead95cd234638314479dea217167c37e4a"><div class="ttname"><a href="dap__common_8h.html#ac91d55174d383848b976a34de843748ead95cd234638314479dea217167c37e4a">L_CRITICAL</a></div><div class="ttdef"><b>Definition:</b> dap_common.h:47</div></div> +</div><!-- fragment --></div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dap__config_8c.html b/libdap/docs/dap__config_8c.html new file mode 100755 index 0000000000000000000000000000000000000000..844a1e4cd0457590e5b72a21c2b6cdfc68742d69 --- /dev/null +++ b/libdap/docs/dap__config_8c.html @@ -0,0 +1,811 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: core/dap_config.c File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_4270bfced15e0e73154b13468c7c9ad9.html">core</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Data Structures</a> | +<a href="#define-members">Macros</a> | +<a href="#typedef-members">Typedefs</a> | +<a href="#func-members">Functions</a> | +<a href="#var-members">Variables</a> </div> + <div class="headertitle"> +<div class="title">dap_config.c File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include <stdio.h></code><br /> +<code>#include <string.h></code><br /> +<code>#include <errno.h></code><br /> +<code>#include <ctype.h></code><br /> +<code>#include "uthash.h"</code><br /> +<code>#include "<a class="el" href="dap__common_8h_source.html">dap_common.h</a>"</code><br /> +<code>#include "<a class="el" href="dap__config_8h_source.html">dap_config.h</a>"</code><br /> +</div><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> +Data Structures</h2></td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__config__item.html">dap_config_item</a></td></tr> +<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">The <a class="el" href="structdap__config__item.html" title="The dap_config_item struct. ">dap_config_item</a> struct. <a href="structdap__config__item.html#details">More...</a><br /></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__config__internal.html">dap_config_internal</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> +Macros</h2></td></tr> +<tr class="memitem:a7ce0df38eb467e59f209470c8f5ac4e6"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">LOG_TAG</a>   "dap_config"</td></tr> +<tr class="separator:a7ce0df38eb467e59f209470c8f5ac4e6"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:afd640ddb34b9b70d1bdde0498e135b28"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#afd640ddb34b9b70d1bdde0498e135b28">DAP_CONFIG_INTERNAL</a>(a)   ( (<a class="el" href="dap__config_8c.html#a0d4df0d8066c51ebc87edddaca70c813">dap_config_internal_t</a>* ) a->_internal )</td></tr> +<tr class="separator:afd640ddb34b9b70d1bdde0498e135b28"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> +Typedefs</h2></td></tr> +<tr class="memitem:a68fb401f4e3f45764f501c080845750d"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structdap__config__item.html">dap_config_item</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#a68fb401f4e3f45764f501c080845750d">dap_config_item_t</a></td></tr> +<tr class="memdesc:a68fb401f4e3f45764f501c080845750d"><td class="mdescLeft"> </td><td class="mdescRight">The <a class="el" href="structdap__config__item.html" title="The dap_config_item struct. ">dap_config_item</a> struct. <a href="#a68fb401f4e3f45764f501c080845750d">More...</a><br /></td></tr> +<tr class="separator:a68fb401f4e3f45764f501c080845750d"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a0d4df0d8066c51ebc87edddaca70c813"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structdap__config__internal.html">dap_config_internal</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#a0d4df0d8066c51ebc87edddaca70c813">dap_config_internal_t</a></td></tr> +<tr class="separator:a0d4df0d8066c51ebc87edddaca70c813"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +Functions</h2></td></tr> +<tr class="memitem:a3843f4acdf67f2499f2437d69097cba1"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#a3843f4acdf67f2499f2437d69097cba1">dap_config_init</a> (const char *a_configs_path)</td></tr> +<tr class="memdesc:a3843f4acdf67f2499f2437d69097cba1"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_init Initialization settings <a href="#a3843f4acdf67f2499f2437d69097cba1">More...</a><br /></td></tr> +<tr class="separator:a3843f4acdf67f2499f2437d69097cba1"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a009960bd1586e17ec29cc646a2a5939c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#a009960bd1586e17ec29cc646a2a5939c">dap_config_deinit</a> ()</td></tr> +<tr class="memdesc:a009960bd1586e17ec29cc646a2a5939c"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_deinit Deinitialize settings <a href="#a009960bd1586e17ec29cc646a2a5939c">More...</a><br /></td></tr> +<tr class="separator:a009960bd1586e17ec29cc646a2a5939c"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:af8c517b0bd6ca2b9ab2e3fbf2dbdf707"><td class="memItemLeft" align="right" valign="top">static uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#af8c517b0bd6ca2b9ab2e3fbf2dbdf707">get_array_length</a> (const char *str)</td></tr> +<tr class="memdesc:af8c517b0bd6ca2b9ab2e3fbf2dbdf707"><td class="mdescLeft"> </td><td class="mdescRight">get_array_length Function parse string and return array length <a href="#af8c517b0bd6ca2b9ab2e3fbf2dbdf707">More...</a><br /></td></tr> +<tr class="separator:af8c517b0bd6ca2b9ab2e3fbf2dbdf707"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a67254031cc34dcf6f7635f35d3dd22d1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#a67254031cc34dcf6f7635f35d3dd22d1">dap_config_open</a> (const char *a_name)</td></tr> +<tr class="memdesc:a67254031cc34dcf6f7635f35d3dd22d1"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_open Open the configuration settings <a href="#a67254031cc34dcf6f7635f35d3dd22d1">More...</a><br /></td></tr> +<tr class="separator:a67254031cc34dcf6f7635f35d3dd22d1"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ac40f9a095d00df268967293c5ea3f9df"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#ac40f9a095d00df268967293c5ea3f9df">dap_config_close</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config)</td></tr> +<tr class="memdesc:ac40f9a095d00df268967293c5ea3f9df"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_close Closing the configuration <a href="#ac40f9a095d00df268967293c5ea3f9df">More...</a><br /></td></tr> +<tr class="separator:ac40f9a095d00df268967293c5ea3f9df"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:add7283ed9237378bb38f2bd8f891efa3"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#add7283ed9237378bb38f2bd8f891efa3">dap_config_get_item_int32</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config, const char *a_section_path, const char *a_item_name)</td></tr> +<tr class="memdesc:add7283ed9237378bb38f2bd8f891efa3"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_get_item_int32 Getting a configuration item as a int32 <a href="#add7283ed9237378bb38f2bd8f891efa3">More...</a><br /></td></tr> +<tr class="separator:add7283ed9237378bb38f2bd8f891efa3"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a5965237dd87b494bbe2367e104c3b8f0"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#a5965237dd87b494bbe2367e104c3b8f0">dap_config_get_item_int32_default</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config, const char *a_section_path, const char *a_item_name, int32_t a_default)</td></tr> +<tr class="memdesc:a5965237dd87b494bbe2367e104c3b8f0"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_get_item_int32_default Getting a configuration item as a int32 <a href="#a5965237dd87b494bbe2367e104c3b8f0">More...</a><br /></td></tr> +<tr class="separator:a5965237dd87b494bbe2367e104c3b8f0"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a5d825008b72bc795b56abc39957bbdd2"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="dap__config_8c.html#a68fb401f4e3f45764f501c080845750d">dap_config_item_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#a5d825008b72bc795b56abc39957bbdd2">dap_config_get_item</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config, const char *a_section_path, const char *a_item_name)</td></tr> +<tr class="memdesc:a5d825008b72bc795b56abc39957bbdd2"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_get_item Get the configuration as a item <a href="#a5d825008b72bc795b56abc39957bbdd2">More...</a><br /></td></tr> +<tr class="separator:a5d825008b72bc795b56abc39957bbdd2"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:affddb2eeef241ec37560794b2c90d0ec"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#affddb2eeef241ec37560794b2c90d0ec">dap_config_get_item_str</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config, const char *a_section_path, const char *a_item_name)</td></tr> +<tr class="memdesc:affddb2eeef241ec37560794b2c90d0ec"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_get_item_str Getting a configuration item as a string <a href="#affddb2eeef241ec37560794b2c90d0ec">More...</a><br /></td></tr> +<tr class="separator:affddb2eeef241ec37560794b2c90d0ec"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a1785c0169c29d415206b02e1c4e9adb8"><td class="memItemLeft" align="right" valign="top">char ** </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#a1785c0169c29d415206b02e1c4e9adb8">dap_config_get_array_str</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config, const char *a_section_path, const char *a_item_name, uint16_t *array_length)</td></tr> +<tr class="memdesc:a1785c0169c29d415206b02e1c4e9adb8"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_get_array_str Getting an array of configuration items as a string <a href="#a1785c0169c29d415206b02e1c4e9adb8">More...</a><br /></td></tr> +<tr class="separator:a1785c0169c29d415206b02e1c4e9adb8"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ae341b2585e28b4b72ae91a00d86532d9"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#ae341b2585e28b4b72ae91a00d86532d9">dap_config_get_item_str_default</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config, const char *a_section_path, const char *a_item_name, const char *a_value_default)</td></tr> +<tr class="memdesc:ae341b2585e28b4b72ae91a00d86532d9"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_get_item_str_default Getting an array of configuration items as a string <a href="#ae341b2585e28b4b72ae91a00d86532d9">More...</a><br /></td></tr> +<tr class="separator:ae341b2585e28b4b72ae91a00d86532d9"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a7e4ce808bc4be2312b4e051bc9210d45"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#a7e4ce808bc4be2312b4e051bc9210d45">dap_config_get_item_bool</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config, const char *a_section_path, const char *a_item_name)</td></tr> +<tr class="memdesc:a7e4ce808bc4be2312b4e051bc9210d45"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_get_item_bool Getting a configuration item as a boolean <a href="#a7e4ce808bc4be2312b4e051bc9210d45">More...</a><br /></td></tr> +<tr class="separator:a7e4ce808bc4be2312b4e051bc9210d45"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a4ce7c5465324c6f6e3c9d490d1fc4e1f"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#a4ce7c5465324c6f6e3c9d490d1fc4e1f">dap_config_get_item_bool_default</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config, const char *a_section_path, const char *a_item_name, bool a_default)</td></tr> +<tr class="memdesc:a4ce7c5465324c6f6e3c9d490d1fc4e1f"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_get_item_bool_default Getting a configuration item as a boolean <a href="#a4ce7c5465324c6f6e3c9d490d1fc4e1f">More...</a><br /></td></tr> +<tr class="separator:a4ce7c5465324c6f6e3c9d490d1fc4e1f"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ad19c0ac2fc89b73589b32754750dc0c2"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#ad19c0ac2fc89b73589b32754750dc0c2">dap_config_get_item_double</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config, const char *a_section_path, const char *a_item_name)</td></tr> +<tr class="memdesc:ad19c0ac2fc89b73589b32754750dc0c2"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_get_item_double Getting a configuration item as a floating-point value <a href="#ad19c0ac2fc89b73589b32754750dc0c2">More...</a><br /></td></tr> +<tr class="separator:ad19c0ac2fc89b73589b32754750dc0c2"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a> +Variables</h2></td></tr> +<tr class="memitem:aed6b1193ba38243186cfb5171c5db794"><td class="memItemLeft" align="right" valign="top">static char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html#aed6b1193ba38243186cfb5171c5db794">s_configs_path</a> = "/opt/dap/etc"</td></tr> +<tr class="separator:aed6b1193ba38243186cfb5171c5db794"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Macro Definition Documentation</h2> +<a class="anchor" id="afd640ddb34b9b70d1bdde0498e135b28"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define DAP_CONFIG_INTERNAL</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">a</td><td>)</td> + <td>   ( (<a class="el" href="dap__config_8c.html#a0d4df0d8066c51ebc87edddaca70c813">dap_config_internal_t</a>* ) a->_internal )</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a7ce0df38eb467e59f209470c8f5ac4e6"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define LOG_TAG   "dap_config"</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<h2 class="groupheader">Typedef Documentation</h2> +<a class="anchor" id="a0d4df0d8066c51ebc87edddaca70c813"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">typedef struct <a class="el" href="structdap__config__internal.html">dap_config_internal</a> <a class="el" href="dap__config_8c.html#a0d4df0d8066c51ebc87edddaca70c813">dap_config_internal_t</a></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a68fb401f4e3f45764f501c080845750d"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">typedef struct <a class="el" href="structdap__config__item.html">dap_config_item</a> <a class="el" href="dap__config_8c.html#a68fb401f4e3f45764f501c080845750d">dap_config_item_t</a></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>The <a class="el" href="structdap__config__item.html" title="The dap_config_item struct. ">dap_config_item</a> struct. </p> + +</div> +</div> +<h2 class="groupheader">Function Documentation</h2> +<a class="anchor" id="ac40f9a095d00df268967293c5ea3f9df"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void dap_config_close </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_close Closing the configuration </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td>Configuration </td></tr> + </table> + </dd> +</dl> + +</div> +</div> +<a class="anchor" id="a009960bd1586e17ec29cc646a2a5939c"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void dap_config_deinit </td> + <td>(</td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_deinit Deinitialize settings </p> + +</div> +</div> +<a class="anchor" id="a1785c0169c29d415206b02e1c4e9adb8"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">char** dap_config_get_array_str </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_section_path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_item_name</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">uint16_t * </td> + <td class="paramname"><em>array_length</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_get_array_str Getting an array of configuration items as a string </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td>Configuration </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_section_path</td><td>Path </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_item_name</td><td>setting </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="a5d825008b72bc795b56abc39957bbdd2"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">static <a class="el" href="dap__config_8c.html#a68fb401f4e3f45764f501c080845750d">dap_config_item_t</a>* dap_config_get_item </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_section_path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_item_name</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +<p>dap_config_get_item Get the configuration as a item </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td>Configuration </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_section_path</td><td>Path </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_item_name</td><td>setting </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="a7e4ce808bc4be2312b4e051bc9210d45"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">bool dap_config_get_item_bool </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_section_path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_item_name</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_get_item_bool Getting a configuration item as a boolean </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td>Configuration </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_section_path</td><td>Path </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_item_name</td><td>Setting </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="a4ce7c5465324c6f6e3c9d490d1fc4e1f"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">bool dap_config_get_item_bool_default </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_section_path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_item_name</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">bool </td> + <td class="paramname"><em>a_default</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_get_item_bool_default Getting a configuration item as a boolean </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td>Configuration </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_section_path</td><td>Path </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_item_name</td><td>Setting </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_default</td><td>Default </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="ad19c0ac2fc89b73589b32754750dc0c2"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">double dap_config_get_item_double </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_section_path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_item_name</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_get_item_double Getting a configuration item as a floating-point value </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td>Configuration </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_section_path</td><td>Path </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_item_name</td><td>Setting </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="add7283ed9237378bb38f2bd8f891efa3"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int32_t dap_config_get_item_int32 </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_section_path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_item_name</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_get_item_int32 Getting a configuration item as a int32 </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td></td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_section_path</td><td></td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_item_name</td><td></td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="a5965237dd87b494bbe2367e104c3b8f0"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int32_t dap_config_get_item_int32_default </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_section_path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_item_name</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">int32_t </td> + <td class="paramname"><em>a_default</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_get_item_int32_default Getting a configuration item as a int32 </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td>Configuration </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_section_path</td><td>Path </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_item_name</td><td>setting </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_default</td><td></td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="affddb2eeef241ec37560794b2c90d0ec"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">const char* dap_config_get_item_str </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_section_path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_item_name</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_get_item_str Getting a configuration item as a string </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td>Configuration </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_section_path</td><td>Path </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_item_name</td><td>setting </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="ae341b2585e28b4b72ae91a00d86532d9"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">const char* dap_config_get_item_str_default </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_section_path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_item_name</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_value_default</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_get_item_str_default Getting an array of configuration items as a string </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td>Configuration </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_section_path</td><td>Path </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_item_name</td><td>setting </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_value_default</td><td>Default </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="a3843f4acdf67f2499f2437d69097cba1"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int dap_config_init </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_configs_path</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_init Initialization settings </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_configs_path</td><td>If NULL path is set to default </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="a67254031cc34dcf6f7635f35d3dd22d1"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a>* dap_config_open </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_name</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_open Open the configuration settings </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_name</td><td>Configuration name </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>dap_config_t Configuration </dd></dl> + +</div> +</div> +<a class="anchor" id="af8c517b0bd6ca2b9ab2e3fbf2dbdf707"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">static uint16_t get_array_length </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>str</em></td><td>)</td> + <td></td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +<p>get_array_length Function parse string and return array length </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td></td></tr> + </table> + </dd> +</dl> +<p>internal function parse string and return array length </p><dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<h2 class="groupheader">Variable Documentation</h2> +<a class="anchor" id="aed6b1193ba38243186cfb5171c5db794"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">char* s_configs_path = "/opt/dap/etc"</td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dap__config_8h.html b/libdap/docs/dap__config_8h.html new file mode 100755 index 0000000000000000000000000000000000000000..b7a5ae70dc467624adf28b7bf873d2906f14d0b3 --- /dev/null +++ b/libdap/docs/dap__config_8h.html @@ -0,0 +1,634 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: core/dap_config.h File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_4270bfced15e0e73154b13468c7c9ad9.html">core</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Data Structures</a> | +<a href="#typedef-members">Typedefs</a> | +<a href="#func-members">Functions</a> </div> + <div class="headertitle"> +<div class="title">dap_config.h File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include <stdbool.h></code><br /> +<code>#include <stdint.h></code><br /> +</div> +<p><a href="dap__config_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> +Data Structures</h2></td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__config.html">dap_config</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> +Typedefs</h2></td></tr> +<tr class="memitem:a041ba6d4b0f96f433117582d3960d701"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structdap__config.html">dap_config</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a></td></tr> +<tr class="separator:a041ba6d4b0f96f433117582d3960d701"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +Functions</h2></td></tr> +<tr class="memitem:a3843f4acdf67f2499f2437d69097cba1"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8h.html#a3843f4acdf67f2499f2437d69097cba1">dap_config_init</a> (const char *a_configs_path)</td></tr> +<tr class="memdesc:a3843f4acdf67f2499f2437d69097cba1"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_init Initialization settings <a href="#a3843f4acdf67f2499f2437d69097cba1">More...</a><br /></td></tr> +<tr class="separator:a3843f4acdf67f2499f2437d69097cba1"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a009960bd1586e17ec29cc646a2a5939c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8h.html#a009960bd1586e17ec29cc646a2a5939c">dap_config_deinit</a> ()</td></tr> +<tr class="memdesc:a009960bd1586e17ec29cc646a2a5939c"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_deinit Deinitialize settings <a href="#a009960bd1586e17ec29cc646a2a5939c">More...</a><br /></td></tr> +<tr class="separator:a009960bd1586e17ec29cc646a2a5939c"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a67254031cc34dcf6f7635f35d3dd22d1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8h.html#a67254031cc34dcf6f7635f35d3dd22d1">dap_config_open</a> (const char *a_name)</td></tr> +<tr class="memdesc:a67254031cc34dcf6f7635f35d3dd22d1"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_open Open the configuration settings <a href="#a67254031cc34dcf6f7635f35d3dd22d1">More...</a><br /></td></tr> +<tr class="separator:a67254031cc34dcf6f7635f35d3dd22d1"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ac40f9a095d00df268967293c5ea3f9df"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8h.html#ac40f9a095d00df268967293c5ea3f9df">dap_config_close</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config)</td></tr> +<tr class="memdesc:ac40f9a095d00df268967293c5ea3f9df"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_close Closing the configuration <a href="#ac40f9a095d00df268967293c5ea3f9df">More...</a><br /></td></tr> +<tr class="separator:ac40f9a095d00df268967293c5ea3f9df"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:add7283ed9237378bb38f2bd8f891efa3"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8h.html#add7283ed9237378bb38f2bd8f891efa3">dap_config_get_item_int32</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config, const char *a_section_path, const char *a_item_name)</td></tr> +<tr class="memdesc:add7283ed9237378bb38f2bd8f891efa3"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_get_item_int32 Getting a configuration item as a int32 <a href="#add7283ed9237378bb38f2bd8f891efa3">More...</a><br /></td></tr> +<tr class="separator:add7283ed9237378bb38f2bd8f891efa3"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a5965237dd87b494bbe2367e104c3b8f0"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8h.html#a5965237dd87b494bbe2367e104c3b8f0">dap_config_get_item_int32_default</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config, const char *a_section_path, const char *a_item_name, int32_t a_default)</td></tr> +<tr class="memdesc:a5965237dd87b494bbe2367e104c3b8f0"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_get_item_int32_default Getting a configuration item as a int32 <a href="#a5965237dd87b494bbe2367e104c3b8f0">More...</a><br /></td></tr> +<tr class="separator:a5965237dd87b494bbe2367e104c3b8f0"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:affddb2eeef241ec37560794b2c90d0ec"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8h.html#affddb2eeef241ec37560794b2c90d0ec">dap_config_get_item_str</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config, const char *a_section_path, const char *a_item_name)</td></tr> +<tr class="memdesc:affddb2eeef241ec37560794b2c90d0ec"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_get_item_str Getting a configuration item as a string <a href="#affddb2eeef241ec37560794b2c90d0ec">More...</a><br /></td></tr> +<tr class="separator:affddb2eeef241ec37560794b2c90d0ec"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ae341b2585e28b4b72ae91a00d86532d9"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8h.html#ae341b2585e28b4b72ae91a00d86532d9">dap_config_get_item_str_default</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config, const char *a_section_path, const char *a_item_name, const char *a_value_default)</td></tr> +<tr class="memdesc:ae341b2585e28b4b72ae91a00d86532d9"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_get_item_str_default Getting an array of configuration items as a string <a href="#ae341b2585e28b4b72ae91a00d86532d9">More...</a><br /></td></tr> +<tr class="separator:ae341b2585e28b4b72ae91a00d86532d9"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a1785c0169c29d415206b02e1c4e9adb8"><td class="memItemLeft" align="right" valign="top">char ** </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8h.html#a1785c0169c29d415206b02e1c4e9adb8">dap_config_get_array_str</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config, const char *a_section_path, const char *a_item_name, uint16_t *array_length)</td></tr> +<tr class="memdesc:a1785c0169c29d415206b02e1c4e9adb8"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_get_array_str Getting an array of configuration items as a string <a href="#a1785c0169c29d415206b02e1c4e9adb8">More...</a><br /></td></tr> +<tr class="separator:a1785c0169c29d415206b02e1c4e9adb8"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a7e4ce808bc4be2312b4e051bc9210d45"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8h.html#a7e4ce808bc4be2312b4e051bc9210d45">dap_config_get_item_bool</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config, const char *a_section_path, const char *a_item_name)</td></tr> +<tr class="memdesc:a7e4ce808bc4be2312b4e051bc9210d45"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_get_item_bool Getting a configuration item as a boolean <a href="#a7e4ce808bc4be2312b4e051bc9210d45">More...</a><br /></td></tr> +<tr class="separator:a7e4ce808bc4be2312b4e051bc9210d45"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a4ce7c5465324c6f6e3c9d490d1fc4e1f"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8h.html#a4ce7c5465324c6f6e3c9d490d1fc4e1f">dap_config_get_item_bool_default</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config, const char *a_section_path, const char *a_item_name, bool a_default)</td></tr> +<tr class="memdesc:a4ce7c5465324c6f6e3c9d490d1fc4e1f"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_get_item_bool_default Getting a configuration item as a boolean <a href="#a4ce7c5465324c6f6e3c9d490d1fc4e1f">More...</a><br /></td></tr> +<tr class="separator:a4ce7c5465324c6f6e3c9d490d1fc4e1f"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ad19c0ac2fc89b73589b32754750dc0c2"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8h.html#ad19c0ac2fc89b73589b32754750dc0c2">dap_config_get_item_double</a> (<a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> *a_config, const char *a_section_path, const char *a_item_name)</td></tr> +<tr class="memdesc:ad19c0ac2fc89b73589b32754750dc0c2"><td class="mdescLeft"> </td><td class="mdescRight">dap_config_get_item_double Getting a configuration item as a floating-point value <a href="#ad19c0ac2fc89b73589b32754750dc0c2">More...</a><br /></td></tr> +<tr class="separator:ad19c0ac2fc89b73589b32754750dc0c2"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Typedef Documentation</h2> +<a class="anchor" id="a041ba6d4b0f96f433117582d3960d701"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">typedef struct <a class="el" href="structdap__config.html">dap_config</a> <a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<h2 class="groupheader">Function Documentation</h2> +<a class="anchor" id="ac40f9a095d00df268967293c5ea3f9df"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void dap_config_close </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_close Closing the configuration </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td>Configuration </td></tr> + </table> + </dd> +</dl> + +</div> +</div> +<a class="anchor" id="a009960bd1586e17ec29cc646a2a5939c"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void dap_config_deinit </td> + <td>(</td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_deinit Deinitialize settings </p> + +</div> +</div> +<a class="anchor" id="a1785c0169c29d415206b02e1c4e9adb8"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">char** dap_config_get_array_str </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_section_path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_item_name</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">uint16_t * </td> + <td class="paramname"><em>array_length</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_get_array_str Getting an array of configuration items as a string </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td>Configuration </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_section_path</td><td>Path </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_item_name</td><td>setting </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="a7e4ce808bc4be2312b4e051bc9210d45"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">bool dap_config_get_item_bool </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_section_path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_item_name</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_get_item_bool Getting a configuration item as a boolean </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td>Configuration </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_section_path</td><td>Path </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_item_name</td><td>Setting </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="a4ce7c5465324c6f6e3c9d490d1fc4e1f"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">bool dap_config_get_item_bool_default </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_section_path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_item_name</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">bool </td> + <td class="paramname"><em>a_default</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_get_item_bool_default Getting a configuration item as a boolean </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td>Configuration </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_section_path</td><td>Path </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_item_name</td><td>Setting </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_default</td><td>Default </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="ad19c0ac2fc89b73589b32754750dc0c2"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">double dap_config_get_item_double </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_section_path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_item_name</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_get_item_double Getting a configuration item as a floating-point value </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td>Configuration </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_section_path</td><td>Path </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_item_name</td><td>Setting </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="add7283ed9237378bb38f2bd8f891efa3"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int32_t dap_config_get_item_int32 </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_section_path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_item_name</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_get_item_int32 Getting a configuration item as a int32 </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td></td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_section_path</td><td></td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_item_name</td><td></td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="a5965237dd87b494bbe2367e104c3b8f0"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int32_t dap_config_get_item_int32_default </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_section_path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_item_name</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">int32_t </td> + <td class="paramname"><em>a_default</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_get_item_int32_default Getting a configuration item as a int32 </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td>Configuration </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_section_path</td><td>Path </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_item_name</td><td>setting </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_default</td><td></td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="affddb2eeef241ec37560794b2c90d0ec"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">const char* dap_config_get_item_str </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_section_path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_item_name</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_get_item_str Getting a configuration item as a string </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td>Configuration </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_section_path</td><td>Path </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_item_name</td><td>setting </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="ae341b2585e28b4b72ae91a00d86532d9"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">const char* dap_config_get_item_str_default </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a> * </td> + <td class="paramname"><em>a_config</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_section_path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_item_name</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_value_default</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_get_item_str_default Getting an array of configuration items as a string </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_config</td><td>Configuration </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_section_path</td><td>Path </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_item_name</td><td>setting </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_value_default</td><td>Default </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="a3843f4acdf67f2499f2437d69097cba1"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int dap_config_init </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_configs_path</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_init Initialization settings </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_configs_path</td><td>If NULL path is set to default </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="a67254031cc34dcf6f7635f35d3dd22d1"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a>* dap_config_open </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>a_name</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_config_open Open the configuration settings </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_name</td><td>Configuration name </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>dap_config_t Configuration </dd></dl> + +</div> +</div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dap__config_8h_source.html b/libdap/docs/dap__config_8h_source.html new file mode 100755 index 0000000000000000000000000000000000000000..11e61d6afad256e5b08744a0847df579838cfd20 --- /dev/null +++ b/libdap/docs/dap__config_8h_source.html @@ -0,0 +1,115 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: core/dap_config.h Source File</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_4270bfced15e0e73154b13468c7c9ad9.html">core</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">dap_config.h</div> </div> +</div><!--header--> +<div class="contents"> +<a href="dap__config_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#ifndef _DAP_CONFIG_H_</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor">#define _DAP_CONFIG_H_</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> </div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="preprocessor">#include <stdbool.h></span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#include <stdint.h></span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> </div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> </div><div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="structdap__config.html"> 12</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structdap__config.html">dap_config</a>{</div><div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="structdap__config.html#a1fddb1b8266f833975a1843cc0a97f89"> 13</a></span>  <span class="keywordtype">void</span> * <a class="code" href="structdap__config.html#a1fddb1b8266f833975a1843cc0a97f89">_internal</a>;</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> } <a class="code" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a>;</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> </div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="keywordtype">int</span> <a class="code" href="dap__config_8h.html#a3843f4acdf67f2499f2437d69097cba1">dap_config_init</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * a_configs_path);</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="keywordtype">void</span> <a class="code" href="dap__config_8h.html#a009960bd1586e17ec29cc646a2a5939c">dap_config_deinit</a>();</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <a class="code" href="structdap__config.html">dap_config_t</a> * <a class="code" href="dap__config_8h.html#a67254031cc34dcf6f7635f35d3dd22d1">dap_config_open</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * a_name);</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="keywordtype">void</span> <a class="code" href="dap__config_8h.html#ac40f9a095d00df268967293c5ea3f9df">dap_config_close</a>(<a class="code" href="structdap__config.html">dap_config_t</a> * a_config);</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> </div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> int32_t <a class="code" href="dap__config_8h.html#add7283ed9237378bb38f2bd8f891efa3">dap_config_get_item_int32</a>(<a class="code" href="structdap__config.html">dap_config_t</a> * a_config, <span class="keyword">const</span> <span class="keywordtype">char</span> * a_section_path, <span class="keyword">const</span> <span class="keywordtype">char</span> * a_item_name);</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> int32_t <a class="code" href="dap__config_8h.html#a5965237dd87b494bbe2367e104c3b8f0">dap_config_get_item_int32_default</a>(<a class="code" href="structdap__config.html">dap_config_t</a> * a_config, <span class="keyword">const</span> <span class="keywordtype">char</span> * a_section_path, <span class="keyword">const</span> <span class="keywordtype">char</span> * a_item_name, int32_t a_default);</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="dap__config_8h.html#affddb2eeef241ec37560794b2c90d0ec">dap_config_get_item_str</a>(<a class="code" href="structdap__config.html">dap_config_t</a> * a_config, <span class="keyword">const</span> <span class="keywordtype">char</span> * a_section_path, <span class="keyword">const</span> <span class="keywordtype">char</span> * a_item_name);</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="dap__config_8h.html#ae341b2585e28b4b72ae91a00d86532d9">dap_config_get_item_str_default</a>(<a class="code" href="structdap__config.html">dap_config_t</a> * a_config, <span class="keyword">const</span> <span class="keywordtype">char</span> * a_section_path, <span class="keyword">const</span> <span class="keywordtype">char</span> * a_item_name, <span class="keyword">const</span> <span class="keywordtype">char</span> * a_value_default);</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="keywordtype">char</span>** <a class="code" href="dap__config_8h.html#a1785c0169c29d415206b02e1c4e9adb8">dap_config_get_array_str</a>(<a class="code" href="structdap__config.html">dap_config_t</a> * a_config, <span class="keyword">const</span> <span class="keywordtype">char</span> * a_section_path,</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> * a_item_name, uint16_t * array_length);</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="keywordtype">bool</span> <a class="code" href="dap__config_8h.html#a7e4ce808bc4be2312b4e051bc9210d45">dap_config_get_item_bool</a>(<a class="code" href="structdap__config.html">dap_config_t</a> * a_config, <span class="keyword">const</span> <span class="keywordtype">char</span> * a_section_path, <span class="keyword">const</span> <span class="keywordtype">char</span> * a_item_name);</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="keywordtype">bool</span> <a class="code" href="dap__config_8h.html#a4ce7c5465324c6f6e3c9d490d1fc4e1f">dap_config_get_item_bool_default</a>(<a class="code" href="structdap__config.html">dap_config_t</a> * a_config, <span class="keyword">const</span> <span class="keywordtype">char</span> * a_section_path, <span class="keyword">const</span> <span class="keywordtype">char</span> * a_item_name, <span class="keywordtype">bool</span> a_default);</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="keywordtype">double</span> <a class="code" href="dap__config_8h.html#ad19c0ac2fc89b73589b32754750dc0c2">dap_config_get_item_double</a>(<a class="code" href="structdap__config.html">dap_config_t</a> * a_config, <span class="keyword">const</span> <span class="keywordtype">char</span> * a_section_path, <span class="keyword">const</span> <span class="keywordtype">char</span> * a_item_name);</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> }</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor">#endif</span></div><div class="ttc" id="dap__config_8h_html_a4ce7c5465324c6f6e3c9d490d1fc4e1f"><div class="ttname"><a href="dap__config_8h.html#a4ce7c5465324c6f6e3c9d490d1fc4e1f">dap_config_get_item_bool_default</a></div><div class="ttdeci">bool dap_config_get_item_bool_default(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, bool a_default)</div><div class="ttdoc">dap_config_get_item_bool_default Getting a configuration item as a boolean </div><div class="ttdef"><b>Definition:</b> dap_config.c:447</div></div> +<div class="ttc" id="dap__config_8h_html_a1785c0169c29d415206b02e1c4e9adb8"><div class="ttname"><a href="dap__config_8h.html#a1785c0169c29d415206b02e1c4e9adb8">dap_config_get_array_str</a></div><div class="ttdeci">char ** dap_config_get_array_str(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, uint16_t *array_length)</div><div class="ttdoc">dap_config_get_array_str Getting an array of configuration items as a string </div><div class="ttdef"><b>Definition:</b> dap_config.c:389</div></div> +<div class="ttc" id="dap__config_8h_html_a3843f4acdf67f2499f2437d69097cba1"><div class="ttname"><a href="dap__config_8h.html#a3843f4acdf67f2499f2437d69097cba1">dap_config_init</a></div><div class="ttdeci">int dap_config_init(const char *a_configs_path)</div><div class="ttdoc">dap_config_init Initialization settings </div><div class="ttdef"><b>Definition:</b> dap_config.c:48</div></div> +<div class="ttc" id="dap__config_8h_html_ae341b2585e28b4b72ae91a00d86532d9"><div class="ttname"><a href="dap__config_8h.html#ae341b2585e28b4b72ae91a00d86532d9">dap_config_get_item_str_default</a></div><div class="ttdeci">const char * dap_config_get_item_str_default(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, const char *a_value_default)</div><div class="ttdoc">dap_config_get_item_str_default Getting an array of configuration items as a string ...</div><div class="ttdef"><b>Definition:</b> dap_config.c:408</div></div> +<div class="ttc" id="structdap__config_html"><div class="ttname"><a href="structdap__config.html">dap_config</a></div><div class="ttdef"><b>Definition:</b> dap_config.h:12</div></div> +<div class="ttc" id="dap__config_8h_html_a67254031cc34dcf6f7635f35d3dd22d1"><div class="ttname"><a href="dap__config_8h.html#a67254031cc34dcf6f7635f35d3dd22d1">dap_config_open</a></div><div class="ttdeci">dap_config_t * dap_config_open(const char *a_name)</div><div class="ttdoc">dap_config_open Open the configuration settings </div><div class="ttdef"><b>Definition:</b> dap_config.c:89</div></div> +<div class="ttc" id="dap__config_8h_html_ad19c0ac2fc89b73589b32754750dc0c2"><div class="ttname"><a href="dap__config_8h.html#ad19c0ac2fc89b73589b32754750dc0c2">dap_config_get_item_double</a></div><div class="ttdeci">double dap_config_get_item_double(dap_config_t *a_config, const char *a_section_path, const char *a_item_name)</div><div class="ttdoc">dap_config_get_item_double Getting a configuration item as a floating-point value ...</div><div class="ttdef"><b>Definition:</b> dap_config.c:461</div></div> +<div class="ttc" id="dap__config_8h_html_a7e4ce808bc4be2312b4e051bc9210d45"><div class="ttname"><a href="dap__config_8h.html#a7e4ce808bc4be2312b4e051bc9210d45">dap_config_get_item_bool</a></div><div class="ttdeci">bool dap_config_get_item_bool(dap_config_t *a_config, const char *a_section_path, const char *a_item_name)</div><div class="ttdoc">dap_config_get_item_bool Getting a configuration item as a boolean </div><div class="ttdef"><b>Definition:</b> dap_config.c:433</div></div> +<div class="ttc" id="dap__config_8h_html_ac40f9a095d00df268967293c5ea3f9df"><div class="ttname"><a href="dap__config_8h.html#ac40f9a095d00df268967293c5ea3f9df">dap_config_close</a></div><div class="ttdeci">void dap_config_close(dap_config_t *a_config)</div><div class="ttdoc">dap_config_close Closing the configuration </div><div class="ttdef"><b>Definition:</b> dap_config.c:281</div></div> +<div class="ttc" id="dap__config_8h_html_a041ba6d4b0f96f433117582d3960d701"><div class="ttname"><a href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config_t</a></div><div class="ttdeci">struct dap_config dap_config_t</div></div> +<div class="ttc" id="structdap__config_html_a1fddb1b8266f833975a1843cc0a97f89"><div class="ttname"><a href="structdap__config.html#a1fddb1b8266f833975a1843cc0a97f89">dap_config::_internal</a></div><div class="ttdeci">void * _internal</div><div class="ttdef"><b>Definition:</b> dap_config.h:13</div></div> +<div class="ttc" id="dap__config_8h_html_a5965237dd87b494bbe2367e104c3b8f0"><div class="ttname"><a href="dap__config_8h.html#a5965237dd87b494bbe2367e104c3b8f0">dap_config_get_item_int32_default</a></div><div class="ttdeci">int32_t dap_config_get_item_int32_default(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, int32_t a_default)</div><div class="ttdoc">dap_config_get_item_int32_default Getting a configuration item as a int32 </div><div class="ttdef"><b>Definition:</b> dap_config.c:333</div></div> +<div class="ttc" id="dap__config_8h_html_a009960bd1586e17ec29cc646a2a5939c"><div class="ttname"><a href="dap__config_8h.html#a009960bd1586e17ec29cc646a2a5939c">dap_config_deinit</a></div><div class="ttdeci">void dap_config_deinit()</div><div class="ttdoc">dap_config_deinit Deinitialize settings </div><div class="ttdef"><b>Definition:</b> dap_config.c:63</div></div> +<div class="ttc" id="dap__config_8h_html_add7283ed9237378bb38f2bd8f891efa3"><div class="ttname"><a href="dap__config_8h.html#add7283ed9237378bb38f2bd8f891efa3">dap_config_get_item_int32</a></div><div class="ttdeci">int32_t dap_config_get_item_int32(dap_config_t *a_config, const char *a_section_path, const char *a_item_name)</div><div class="ttdoc">dap_config_get_item_int32 Getting a configuration item as a int32 </div><div class="ttdef"><b>Definition:</b> dap_config.c:320</div></div> +<div class="ttc" id="dap__config_8h_html_affddb2eeef241ec37560794b2c90d0ec"><div class="ttname"><a href="dap__config_8h.html#affddb2eeef241ec37560794b2c90d0ec">dap_config_get_item_str</a></div><div class="ttdeci">const char * dap_config_get_item_str(dap_config_t *a_config, const char *a_section_path, const char *a_item_name)</div><div class="ttdoc">dap_config_get_item_str Getting a configuration item as a string </div><div class="ttdef"><b>Definition:</b> dap_config.c:373</div></div> +</div><!-- fragment --></div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dap__cpu__monitor_8c.html b/libdap/docs/dap__cpu__monitor_8c.html new file mode 100755 index 0000000000000000000000000000000000000000..7b94b896413c6d31dad658194695e67ca544409b --- /dev/null +++ b/libdap/docs/dap__cpu__monitor_8c.html @@ -0,0 +1,399 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: core/unix/dap_cpu_monitor.c File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_4270bfced15e0e73154b13468c7c9ad9.html">core</a></li><li class="navelem"><a class="el" href="dir_cc9d4db7f92a2e77b53bedbbcfe214a0.html">unix</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Data Structures</a> | +<a href="#define-members">Macros</a> | +<a href="#typedef-members">Typedefs</a> | +<a href="#func-members">Functions</a> | +<a href="#var-members">Variables</a> </div> + <div class="headertitle"> +<div class="title">dap_cpu_monitor.c File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include "<a class="el" href="dap__cpu__monitor_8h_source.html">dap_cpu_monitor.h</a>"</code><br /> +<code>#include "<a class="el" href="dap__common_8h_source.html">../dap_common.h</a>"</code><br /> +<code>#include <stdio.h></code><br /> +<code>#include <unistd.h></code><br /> +<code>#include <string.h></code><br /> +</div><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> +Data Structures</h2></td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structproc__stat__line.html">proc_stat_line</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> +Macros</h2></td></tr> +<tr class="memitem:a7ce0df38eb467e59f209470c8f5ac4e6"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">LOG_TAG</a>   "dap_cpu_monitor"</td></tr> +<tr class="separator:a7ce0df38eb467e59f209470c8f5ac4e6"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> +Typedefs</h2></td></tr> +<tr class="memitem:ab88a496964045c6ffffcc65683cdb871"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structproc__stat__line.html">proc_stat_line</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8c.html#ab88a496964045c6ffffcc65683cdb871">proc_stat_line_t</a></td></tr> +<tr class="separator:ab88a496964045c6ffffcc65683cdb871"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +Functions</h2></td></tr> +<tr class="memitem:a41c2f779847e3d67124dfde1fe0640b7"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8c.html#a41c2f779847e3d67124dfde1fe0640b7">dap_cpu_monitor_init</a> ()</td></tr> +<tr class="memdesc:a41c2f779847e3d67124dfde1fe0640b7"><td class="mdescLeft"> </td><td class="mdescRight">dap_cpu_monitor_init Monitor CPU initialization <a href="#a41c2f779847e3d67124dfde1fe0640b7">More...</a><br /></td></tr> +<tr class="separator:a41c2f779847e3d67124dfde1fe0640b7"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ac18ced28d70e9117fae3759db759e2fb"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8c.html#ac18ced28d70e9117fae3759db759e2fb">dap_cpu_monitor_deinit</a> ()</td></tr> +<tr class="memdesc:ac18ced28d70e9117fae3759db759e2fb"><td class="mdescLeft"> </td><td class="mdescRight">dap_cpu_monitor_deinit Monitor CPU deinitialization <a href="#ac18ced28d70e9117fae3759db759e2fb">More...</a><br /></td></tr> +<tr class="separator:ac18ced28d70e9117fae3759db759e2fb"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a51b82e6ec3267ae57ef002e96e620151"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8c.html#a51b82e6ec3267ae57ef002e96e620151">_deserealize_proc_stat</a> (char *line, <a class="el" href="dap__cpu__monitor_8c.html#ab88a496964045c6ffffcc65683cdb871">proc_stat_line_t</a> *stat)</td></tr> +<tr class="separator:a51b82e6ec3267ae57ef002e96e620151"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aa50e51d75d2dcdcbddb1cf40b1df2f3c"><td class="memItemLeft" align="right" valign="top">static float </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8c.html#aa50e51d75d2dcdcbddb1cf40b1df2f3c">_calculate_load</a> (size_t idle_time, size_t prev_idle_time, size_t total_time, size_t prev_total_time)</td></tr> +<tr class="separator:aa50e51d75d2dcdcbddb1cf40b1df2f3c"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:af97c8ce690c4a7e1a6d9177f76200862"><td class="memItemLeft" align="right" valign="top"><a class="el" href="dap__cpu__monitor_8h.html#a71734313dfad90003700e30dbbd5dbe4">dap_cpu_stats_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8c.html#af97c8ce690c4a7e1a6d9177f76200862">dap_cpu_get_stats</a> ()</td></tr> +<tr class="memdesc:af97c8ce690c4a7e1a6d9177f76200862"><td class="mdescLeft"> </td><td class="mdescRight">dap_cpu_get_stats Getting processor information <a href="#af97c8ce690c4a7e1a6d9177f76200862">More...</a><br /></td></tr> +<tr class="separator:af97c8ce690c4a7e1a6d9177f76200862"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a> +Variables</h2></td></tr> +<tr class="memitem:a857f823e882aa77331ba7dfdd7d5d1ce"><td class="memItemLeft" align="right" valign="top">static FILE * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8c.html#a857f823e882aa77331ba7dfdd7d5d1ce">_proc_stat</a> = NULL</td></tr> +<tr class="separator:a857f823e882aa77331ba7dfdd7d5d1ce"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a44d7b6d3df547ba454b836b65ec25611"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="dap__cpu__monitor_8h.html#a71734313dfad90003700e30dbbd5dbe4">dap_cpu_stats_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8c.html#a44d7b6d3df547ba454b836b65ec25611">_cpu_stats</a> = {0}</td></tr> +<tr class="separator:a44d7b6d3df547ba454b836b65ec25611"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a01fc76df94fc3adf860bc4f7bbe23abb"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="dap__cpu__monitor_8h.html#a07c777b976f756102607b683d5969c7d">dap_cpu_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8c.html#a01fc76df94fc3adf860bc4f7bbe23abb">_cpu_old_stats</a> [<a class="el" href="dap__cpu__monitor_8h.html#add08506024a2c5399f9f9f6a797392ef">MAX_CPU_COUNT</a>] = {0}</td></tr> +<tr class="separator:a01fc76df94fc3adf860bc4f7bbe23abb"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a98ed3bdb3fed3d87f29f0bf84b51ba95"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="dap__cpu__monitor_8h.html#a07c777b976f756102607b683d5969c7d">dap_cpu_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8c.html#a98ed3bdb3fed3d87f29f0bf84b51ba95">_cpu_summary_old</a> = {0}</td></tr> +<tr class="separator:a98ed3bdb3fed3d87f29f0bf84b51ba95"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Macro Definition Documentation</h2> +<a class="anchor" id="a7ce0df38eb467e59f209470c8f5ac4e6"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define LOG_TAG   "dap_cpu_monitor"</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<h2 class="groupheader">Typedef Documentation</h2> +<a class="anchor" id="ab88a496964045c6ffffcc65683cdb871"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">typedef struct <a class="el" href="structproc__stat__line.html">proc_stat_line</a> <a class="el" href="dap__cpu__monitor_8c.html#ab88a496964045c6ffffcc65683cdb871">proc_stat_line_t</a></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<h2 class="groupheader">Function Documentation</h2> +<a class="anchor" id="aa50e51d75d2dcdcbddb1cf40b1df2f3c"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">static float _calculate_load </td> + <td>(</td> + <td class="paramtype">size_t </td> + <td class="paramname"><em>idle_time</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">size_t </td> + <td class="paramname"><em>prev_idle_time</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">size_t </td> + <td class="paramname"><em>total_time</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">size_t </td> + <td class="paramname"><em>prev_total_time</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a51b82e6ec3267ae57ef002e96e620151"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">static void _deserealize_proc_stat </td> + <td>(</td> + <td class="paramtype">char * </td> + <td class="paramname"><em>line</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"><a class="el" href="dap__cpu__monitor_8c.html#ab88a496964045c6ffffcc65683cdb871">proc_stat_line_t</a> * </td> + <td class="paramname"><em>stat</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="af97c8ce690c4a7e1a6d9177f76200862"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="dap__cpu__monitor_8h.html#a71734313dfad90003700e30dbbd5dbe4">dap_cpu_stats_t</a> dap_cpu_get_stats </td> + <td>(</td> + <td class="paramtype">void </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_cpu_get_stats Getting processor information </p> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> +<p>get summary cpu stat </p> + +</div> +</div> +<a class="anchor" id="ac18ced28d70e9117fae3759db759e2fb"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void dap_cpu_monitor_deinit </td> + <td>(</td> + <td class="paramtype">void </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_cpu_monitor_deinit Monitor CPU deinitialization </p> + +</div> +</div> +<a class="anchor" id="a41c2f779847e3d67124dfde1fe0640b7"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int dap_cpu_monitor_init </td> + <td>(</td> + <td class="paramtype">void </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_cpu_monitor_init Monitor CPU initialization </p> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<h2 class="groupheader">Variable Documentation</h2> +<a class="anchor" id="a01fc76df94fc3adf860bc4f7bbe23abb"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="dap__cpu__monitor_8h.html#a07c777b976f756102607b683d5969c7d">dap_cpu_t</a> _cpu_old_stats[<a class="el" href="dap__cpu__monitor_8h.html#add08506024a2c5399f9f9f6a797392ef">MAX_CPU_COUNT</a>] = {0}</td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a44d7b6d3df547ba454b836b65ec25611"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="dap__cpu__monitor_8h.html#a71734313dfad90003700e30dbbd5dbe4">dap_cpu_stats_t</a> _cpu_stats = {0}</td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a98ed3bdb3fed3d87f29f0bf84b51ba95"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="dap__cpu__monitor_8h.html#a07c777b976f756102607b683d5969c7d">dap_cpu_t</a> _cpu_summary_old = {0}</td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a857f823e882aa77331ba7dfdd7d5d1ce"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">FILE* _proc_stat = NULL</td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dap__cpu__monitor_8h.html b/libdap/docs/dap__cpu__monitor_8h.html new file mode 100755 index 0000000000000000000000000000000000000000..08d891bc4e8971d63973f490540c05e524972625 --- /dev/null +++ b/libdap/docs/dap__cpu__monitor_8h.html @@ -0,0 +1,236 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: core/unix/dap_cpu_monitor.h File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_4270bfced15e0e73154b13468c7c9ad9.html">core</a></li><li class="navelem"><a class="el" href="dir_cc9d4db7f92a2e77b53bedbbcfe214a0.html">unix</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Data Structures</a> | +<a href="#define-members">Macros</a> | +<a href="#typedef-members">Typedefs</a> | +<a href="#func-members">Functions</a> </div> + <div class="headertitle"> +<div class="title">dap_cpu_monitor.h File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include <stdlib.h></code><br /> +</div> +<p><a href="dap__cpu__monitor_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> +Data Structures</h2></td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__cpu.html">dap_cpu</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__cpu__stats.html">dap_cpu_stats</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> +Macros</h2></td></tr> +<tr class="memitem:add08506024a2c5399f9f9f6a797392ef"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8h.html#add08506024a2c5399f9f9f6a797392ef">MAX_CPU_COUNT</a>   64</td></tr> +<tr class="separator:add08506024a2c5399f9f9f6a797392ef"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> +Typedefs</h2></td></tr> +<tr class="memitem:a07c777b976f756102607b683d5969c7d"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structdap__cpu.html">dap_cpu</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8h.html#a07c777b976f756102607b683d5969c7d">dap_cpu_t</a></td></tr> +<tr class="separator:a07c777b976f756102607b683d5969c7d"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a71734313dfad90003700e30dbbd5dbe4"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structdap__cpu__stats.html">dap_cpu_stats</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8h.html#a71734313dfad90003700e30dbbd5dbe4">dap_cpu_stats_t</a></td></tr> +<tr class="separator:a71734313dfad90003700e30dbbd5dbe4"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +Functions</h2></td></tr> +<tr class="memitem:a74565d8e36cf559a22aefa4a070a4e52"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8h.html#a74565d8e36cf559a22aefa4a070a4e52">dap_cpu_monitor_init</a> (void)</td></tr> +<tr class="memdesc:a74565d8e36cf559a22aefa4a070a4e52"><td class="mdescLeft"> </td><td class="mdescRight">dap_cpu_monitor_init Monitor CPU initialization <a href="#a74565d8e36cf559a22aefa4a070a4e52">More...</a><br /></td></tr> +<tr class="separator:a74565d8e36cf559a22aefa4a070a4e52"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a8644f85c62710685c7c5c3624e4aadc8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8h.html#a8644f85c62710685c7c5c3624e4aadc8">dap_cpu_monitor_deinit</a> (void)</td></tr> +<tr class="memdesc:a8644f85c62710685c7c5c3624e4aadc8"><td class="mdescLeft"> </td><td class="mdescRight">dap_cpu_monitor_deinit Monitor CPU deinitialization <a href="#a8644f85c62710685c7c5c3624e4aadc8">More...</a><br /></td></tr> +<tr class="separator:a8644f85c62710685c7c5c3624e4aadc8"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ac8909ba058fd37e5465b7c64e9b3681e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="dap__cpu__monitor_8h.html#a71734313dfad90003700e30dbbd5dbe4">dap_cpu_stats_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8h.html#ac8909ba058fd37e5465b7c64e9b3681e">dap_cpu_get_stats</a> (void)</td></tr> +<tr class="memdesc:ac8909ba058fd37e5465b7c64e9b3681e"><td class="mdescLeft"> </td><td class="mdescRight">dap_cpu_get_stats Getting processor information <a href="#ac8909ba058fd37e5465b7c64e9b3681e">More...</a><br /></td></tr> +<tr class="separator:ac8909ba058fd37e5465b7c64e9b3681e"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Macro Definition Documentation</h2> +<a class="anchor" id="add08506024a2c5399f9f9f6a797392ef"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define MAX_CPU_COUNT   64</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<h2 class="groupheader">Typedef Documentation</h2> +<a class="anchor" id="a71734313dfad90003700e30dbbd5dbe4"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">typedef struct <a class="el" href="structdap__cpu__stats.html">dap_cpu_stats</a> <a class="el" href="dap__cpu__monitor_8h.html#a71734313dfad90003700e30dbbd5dbe4">dap_cpu_stats_t</a></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a07c777b976f756102607b683d5969c7d"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">typedef struct <a class="el" href="structdap__cpu.html">dap_cpu</a> <a class="el" href="dap__cpu__monitor_8h.html#a07c777b976f756102607b683d5969c7d">dap_cpu_t</a></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<h2 class="groupheader">Function Documentation</h2> +<a class="anchor" id="ac8909ba058fd37e5465b7c64e9b3681e"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="dap__cpu__monitor_8h.html#a71734313dfad90003700e30dbbd5dbe4">dap_cpu_stats_t</a> dap_cpu_get_stats </td> + <td>(</td> + <td class="paramtype">void </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_cpu_get_stats Getting processor information </p> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> +<p>get summary cpu stat </p> + +</div> +</div> +<a class="anchor" id="a8644f85c62710685c7c5c3624e4aadc8"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void dap_cpu_monitor_deinit </td> + <td>(</td> + <td class="paramtype">void </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_cpu_monitor_deinit Monitor CPU deinitialization </p> + +</div> +</div> +<a class="anchor" id="a74565d8e36cf559a22aefa4a070a4e52"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int dap_cpu_monitor_init </td> + <td>(</td> + <td class="paramtype">void </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_cpu_monitor_init Monitor CPU initialization </p> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dap__cpu__monitor_8h_source.html b/libdap/docs/dap__cpu__monitor_8h_source.html new file mode 100755 index 0000000000000000000000000000000000000000..93469ff1ab42020d78a33c0741ffc381658fecac --- /dev/null +++ b/libdap/docs/dap__cpu__monitor_8h_source.html @@ -0,0 +1,114 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: core/unix/dap_cpu_monitor.h Source File</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_4270bfced15e0e73154b13468c7c9ad9.html">core</a></li><li class="navelem"><a class="el" href="dir_cc9d4db7f92a2e77b53bedbbcfe214a0.html">unix</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">dap_cpu_monitor.h</div> </div> +</div><!--header--> +<div class="contents"> +<a href="dap__cpu__monitor_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> </div><div class="line"><a name="l00003"></a><span class="lineno"><a class="line" href="dap__cpu__monitor_8h.html#add08506024a2c5399f9f9f6a797392ef"> 3</a></span> <span class="preprocessor">#define MAX_CPU_COUNT 64</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> </div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#include <stdlib.h></span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> </div><div class="line"><a name="l00007"></a><span class="lineno"><a class="line" href="structdap__cpu.html"> 7</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structdap__cpu.html">dap_cpu</a> {</div><div class="line"><a name="l00008"></a><span class="lineno"><a class="line" href="structdap__cpu.html#a1a555a9a00eddc0c10b401d601462441"> 8</a></span>  <span class="keywordtype">unsigned</span> <a class="code" href="structdap__cpu.html#a1a555a9a00eddc0c10b401d601462441">ncpu</a>; <span class="comment">// number of cpu core</span></div><div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="structdap__cpu.html#a34954f614e249658e1fe9103c95333c6"> 9</a></span>  <span class="keywordtype">float</span> <a class="code" href="structdap__cpu.html#a34954f614e249658e1fe9103c95333c6">load</a>; <span class="comment">// percent of load</span></div><div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="structdap__cpu.html#a0c983a38d28e1a302edbbd7c7f0817ab"> 10</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="structdap__cpu.html#a0c983a38d28e1a302edbbd7c7f0817ab">total_time</a>;</div><div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="structdap__cpu.html#a8eb9a71e68def6d6087e5ae87b8b8ab1"> 11</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="structdap__cpu.html#a8eb9a71e68def6d6087e5ae87b8b8ab1">idle_time</a>;</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> } <a class="code" href="dap__cpu__monitor_8h.html#a07c777b976f756102607b683d5969c7d">dap_cpu_t</a>;</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> </div><div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="structdap__cpu__stats.html"> 14</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structdap__cpu__stats.html">dap_cpu_stats</a></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> {</div><div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="structdap__cpu__stats.html#a2a4a244c6c716b5e25483ca67a69f7c9"> 16</a></span>  <span class="keywordtype">unsigned</span> <a class="code" href="structdap__cpu__stats.html#a2a4a244c6c716b5e25483ca67a69f7c9">cpu_cores_count</a>;</div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="structdap__cpu__stats.html#a173285c53062dc49c248d7048c944a6a"> 17</a></span>  <a class="code" href="structdap__cpu.html">dap_cpu_t</a> <a class="code" href="structdap__cpu__stats.html#a173285c53062dc49c248d7048c944a6a">cpu_summary</a>; <span class="comment">// average statistic for all cpu</span></div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="structdap__cpu__stats.html#ad6e495ab156770ce147fe1f20bfe6562"> 18</a></span>  <a class="code" href="structdap__cpu.html">dap_cpu_t</a> cpus[<a class="code" href="dap__cpu__monitor_8h.html#add08506024a2c5399f9f9f6a797392ef">MAX_CPU_COUNT</a>]; <span class="comment">// list of cpu with stat</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> } <a class="code" href="dap__cpu__monitor_8h.html#a71734313dfad90003700e30dbbd5dbe4">dap_cpu_stats_t</a>;</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> </div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="keywordtype">int</span> <a class="code" href="dap__cpu__monitor_8h.html#a74565d8e36cf559a22aefa4a070a4e52">dap_cpu_monitor_init</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> </div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="keywordtype">void</span> <a class="code" href="dap__cpu__monitor_8h.html#a8644f85c62710685c7c5c3624e4aadc8">dap_cpu_monitor_deinit</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <a class="code" href="structdap__cpu__stats.html">dap_cpu_stats_t</a> <a class="code" href="dap__cpu__monitor_8h.html#ac8909ba058fd37e5465b7c64e9b3681e">dap_cpu_get_stats</a>(<span class="keywordtype">void</span>);</div><div class="ttc" id="structdap__cpu_html"><div class="ttname"><a href="structdap__cpu.html">dap_cpu</a></div><div class="ttdef"><b>Definition:</b> dap_cpu_monitor.h:7</div></div> +<div class="ttc" id="dap__cpu__monitor_8h_html_a8644f85c62710685c7c5c3624e4aadc8"><div class="ttname"><a href="dap__cpu__monitor_8h.html#a8644f85c62710685c7c5c3624e4aadc8">dap_cpu_monitor_deinit</a></div><div class="ttdeci">void dap_cpu_monitor_deinit(void)</div><div class="ttdoc">dap_cpu_monitor_deinit Monitor CPU deinitialization </div><div class="ttdef"><b>Definition:</b> dap_cpu_monitor.c:43</div></div> +<div class="ttc" id="dap__cpu__monitor_8h_html_a74565d8e36cf559a22aefa4a070a4e52"><div class="ttname"><a href="dap__cpu__monitor_8h.html#a74565d8e36cf559a22aefa4a070a4e52">dap_cpu_monitor_init</a></div><div class="ttdeci">int dap_cpu_monitor_init(void)</div><div class="ttdoc">dap_cpu_monitor_init Monitor CPU initialization </div><div class="ttdef"><b>Definition:</b> dap_cpu_monitor.c:32</div></div> +<div class="ttc" id="structdap__cpu_html_a0c983a38d28e1a302edbbd7c7f0817ab"><div class="ttname"><a href="structdap__cpu.html#a0c983a38d28e1a302edbbd7c7f0817ab">dap_cpu::total_time</a></div><div class="ttdeci">size_t total_time</div><div class="ttdef"><b>Definition:</b> dap_cpu_monitor.h:10</div></div> +<div class="ttc" id="structdap__cpu_html_a1a555a9a00eddc0c10b401d601462441"><div class="ttname"><a href="structdap__cpu.html#a1a555a9a00eddc0c10b401d601462441">dap_cpu::ncpu</a></div><div class="ttdeci">unsigned ncpu</div><div class="ttdef"><b>Definition:</b> dap_cpu_monitor.h:8</div></div> +<div class="ttc" id="structdap__cpu__stats_html"><div class="ttname"><a href="structdap__cpu__stats.html">dap_cpu_stats</a></div><div class="ttdef"><b>Definition:</b> dap_cpu_monitor.h:14</div></div> +<div class="ttc" id="structdap__cpu_html_a34954f614e249658e1fe9103c95333c6"><div class="ttname"><a href="structdap__cpu.html#a34954f614e249658e1fe9103c95333c6">dap_cpu::load</a></div><div class="ttdeci">float load</div><div class="ttdef"><b>Definition:</b> dap_cpu_monitor.h:9</div></div> +<div class="ttc" id="dap__cpu__monitor_8h_html_ac8909ba058fd37e5465b7c64e9b3681e"><div class="ttname"><a href="dap__cpu__monitor_8h.html#ac8909ba058fd37e5465b7c64e9b3681e">dap_cpu_get_stats</a></div><div class="ttdeci">dap_cpu_stats_t dap_cpu_get_stats(void)</div><div class="ttdoc">dap_cpu_get_stats Getting processor information </div><div class="ttdef"><b>Definition:</b> dap_cpu_monitor.c:66</div></div> +<div class="ttc" id="structdap__cpu__stats_html_a173285c53062dc49c248d7048c944a6a"><div class="ttname"><a href="structdap__cpu__stats.html#a173285c53062dc49c248d7048c944a6a">dap_cpu_stats::cpu_summary</a></div><div class="ttdeci">dap_cpu_t cpu_summary</div><div class="ttdef"><b>Definition:</b> dap_cpu_monitor.h:17</div></div> +<div class="ttc" id="dap__cpu__monitor_8h_html_a71734313dfad90003700e30dbbd5dbe4"><div class="ttname"><a href="dap__cpu__monitor_8h.html#a71734313dfad90003700e30dbbd5dbe4">dap_cpu_stats_t</a></div><div class="ttdeci">struct dap_cpu_stats dap_cpu_stats_t</div></div> +<div class="ttc" id="structdap__cpu__stats_html_a2a4a244c6c716b5e25483ca67a69f7c9"><div class="ttname"><a href="structdap__cpu__stats.html#a2a4a244c6c716b5e25483ca67a69f7c9">dap_cpu_stats::cpu_cores_count</a></div><div class="ttdeci">unsigned cpu_cores_count</div><div class="ttdef"><b>Definition:</b> dap_cpu_monitor.h:16</div></div> +<div class="ttc" id="dap__cpu__monitor_8h_html_add08506024a2c5399f9f9f6a797392ef"><div class="ttname"><a href="dap__cpu__monitor_8h.html#add08506024a2c5399f9f9f6a797392ef">MAX_CPU_COUNT</a></div><div class="ttdeci">#define MAX_CPU_COUNT</div><div class="ttdef"><b>Definition:</b> dap_cpu_monitor.h:3</div></div> +<div class="ttc" id="structdap__cpu_html_a8eb9a71e68def6d6087e5ae87b8b8ab1"><div class="ttname"><a href="structdap__cpu.html#a8eb9a71e68def6d6087e5ae87b8b8ab1">dap_cpu::idle_time</a></div><div class="ttdeci">size_t idle_time</div><div class="ttdef"><b>Definition:</b> dap_cpu_monitor.h:11</div></div> +<div class="ttc" id="dap__cpu__monitor_8h_html_a07c777b976f756102607b683d5969c7d"><div class="ttname"><a href="dap__cpu__monitor_8h.html#a07c777b976f756102607b683d5969c7d">dap_cpu_t</a></div><div class="ttdeci">struct dap_cpu dap_cpu_t</div></div> +</div><!-- fragment --></div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dap__enc__base64_8c.html b/libdap/docs/dap__enc__base64_8c.html new file mode 100755 index 0000000000000000000000000000000000000000..5499fb30c0800d2d72a7316b27c0b84a750340db --- /dev/null +++ b/libdap/docs/dap__enc__base64_8c.html @@ -0,0 +1,600 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: crypto/dap_enc_base64.c File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_53403d93963d3f5d2fcffd0698f5bddb.html">crypto</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#define-members">Macros</a> | +<a href="#typedef-members">Typedefs</a> | +<a href="#func-members">Functions</a> | +<a href="#var-members">Variables</a> </div> + <div class="headertitle"> +<div class="title">dap_enc_base64.c File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include <math.h></code><br /> +<code>#include <stdio.h></code><br /> +<code>#include <stdint.h></code><br /> +<code>#include <ctype.h></code><br /> +<code>#include <stdlib.h></code><br /> +<code>#include <string.h></code><br /> +<code>#include "<a class="el" href="dap__enc__base64_8h_source.html">dap_enc_base64.h</a>"</code><br /> +</div><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> +Macros</h2></td></tr> +<tr class="memitem:a221b9c9698df0aa156ee2a33072ff9b4"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8c.html#a221b9c9698df0aa156ee2a33072ff9b4">b64_malloc</a>(ptr)   malloc(ptr)</td></tr> +<tr class="separator:a221b9c9698df0aa156ee2a33072ff9b4"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a4750e31a6a2f09d3ef3e1962e25d8592"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8c.html#a4750e31a6a2f09d3ef3e1962e25d8592">b64_realloc</a>(ptr, size)   realloc(ptr, size)</td></tr> +<tr class="separator:a4750e31a6a2f09d3ef3e1962e25d8592"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> +Typedefs</h2></td></tr> +<tr class="memitem:a0c8186d9b9b7880309c27230bbb5e69d"><td class="memItemLeft" align="right" valign="top">typedef unsigned char </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8c.html#a0c8186d9b9b7880309c27230bbb5e69d">byte</a></td></tr> +<tr class="separator:a0c8186d9b9b7880309c27230bbb5e69d"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +Functions</h2></td></tr> +<tr class="memitem:aa785023e6318312a858628ac75c09cfc"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8c.html#aa785023e6318312a858628ac75c09cfc">B64_GetSize</a> (int sz, int isEncode)</td></tr> +<tr class="separator:aa785023e6318312a858628ac75c09cfc"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:af3bd7d29d6866e2c15040e710077bdf4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8c.html#af3bd7d29d6866e2c15040e710077bdf4">B64_Encode</a> (const <a class="el" href="dap__enc__base64_8c.html#a0c8186d9b9b7880309c27230bbb5e69d">byte</a> *srcBytes, int srcLen, char *outChars)</td></tr> +<tr class="separator:af3bd7d29d6866e2c15040e710077bdf4"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a304d3393507ac334c690719e7b66ac23"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8c.html#a304d3393507ac334c690719e7b66ac23">B64_Decode</a> (const char *srcChars, int srcLen, <a class="el" href="dap__enc__base64_8c.html#a0c8186d9b9b7880309c27230bbb5e69d">byte</a> *outBytes)</td></tr> +<tr class="separator:a304d3393507ac334c690719e7b66ac23"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a2ec720931ba76ef3cccc8e23b2e186f9"><td class="memItemLeft" align="right" valign="top">char </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8c.html#a2ec720931ba76ef3cccc8e23b2e186f9">B64_EncodeByte</a> (<a class="el" href="dap__enc__base64_8c.html#a0c8186d9b9b7880309c27230bbb5e69d">byte</a> b)</td></tr> +<tr class="separator:a2ec720931ba76ef3cccc8e23b2e186f9"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ab0f10f3342a3055e4c98fb6bcec20c96"><td class="memItemLeft" align="right" valign="top"><a class="el" href="dap__enc__base64_8c.html#a0c8186d9b9b7880309c27230bbb5e69d">byte</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8c.html#ab0f10f3342a3055e4c98fb6bcec20c96">B64_DecodeByte</a> (<a class="el" href="dap__enc__base64_8c.html#a0c8186d9b9b7880309c27230bbb5e69d">byte</a> b)</td></tr> +<tr class="separator:ab0f10f3342a3055e4c98fb6bcec20c96"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a9a9b842a784b5202e1ab4eed1c156d00"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8c.html#a9a9b842a784b5202e1ab4eed1c156d00">b64_encode</a> (const unsigned char *, size_t)</td></tr> +<tr class="separator:a9a9b842a784b5202e1ab4eed1c156d00"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a9c3b4adc7a6fcdf700700d55b2c924ed"><td class="memItemLeft" align="right" valign="top">unsigned char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8c.html#a9c3b4adc7a6fcdf700700d55b2c924ed">b64_decode</a> (const char *, size_t)</td></tr> +<tr class="separator:a9c3b4adc7a6fcdf700700d55b2c924ed"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aea8b5297189d223a48f1886e692546e4"><td class="memItemLeft" align="right" valign="top">unsigned char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8c.html#aea8b5297189d223a48f1886e692546e4">b64_decode_ex</a> (const char *, size_t, size_t *)</td></tr> +<tr class="separator:aea8b5297189d223a48f1886e692546e4"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a7f71c6f222b5b8122b2240df6c9b3fa0"><td class="memItemLeft" align="right" valign="top">static const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8c.html#a7f71c6f222b5b8122b2240df6c9b3fa0">b64_table_by_standard</a> (<a class="el" href="dap__enc__base64_8h.html#ae47fdbc3967e395dac8f30599961f45d">dap_enc_b64_standard_t</a> standard)</td></tr> +<tr class="memdesc:a7f71c6f222b5b8122b2240df6c9b3fa0"><td class="mdescLeft"> </td><td class="mdescRight">b64_table_by_standard The function returns the corresponding table of indices <a href="#a7f71c6f222b5b8122b2240df6c9b3fa0">More...</a><br /></td></tr> +<tr class="separator:a7f71c6f222b5b8122b2240df6c9b3fa0"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a09bda17a1fce52c2d9740ad9852fbb98"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8c.html#a09bda17a1fce52c2d9740ad9852fbb98">dap_enc_base64_decode</a> (const char *in, size_t in_size, void *out, <a class="el" href="dap__enc__base64_8h.html#ae47fdbc3967e395dac8f30599961f45d">dap_enc_b64_standard_t</a> standard)</td></tr> +<tr class="memdesc:a09bda17a1fce52c2d9740ad9852fbb98"><td class="mdescLeft"> </td><td class="mdescRight">dap_enc_base64_decode Function of reverse transformation of base64 algorithm <a href="#a09bda17a1fce52c2d9740ad9852fbb98">More...</a><br /></td></tr> +<tr class="separator:a09bda17a1fce52c2d9740ad9852fbb98"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a542e3fd8a5dd6116cb1e6bd48361a5cc"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8c.html#a542e3fd8a5dd6116cb1e6bd48361a5cc">dap_enc_base64_encode</a> (const void *a_in, size_t a_in_size, char *a_out, <a class="el" href="dap__enc__base64_8h.html#ae47fdbc3967e395dac8f30599961f45d">dap_enc_b64_standard_t</a> standard)</td></tr> +<tr class="memdesc:a542e3fd8a5dd6116cb1e6bd48361a5cc"><td class="mdescLeft"> </td><td class="mdescRight">dap_enc_base64_encode The function encodes the array according to the base64 algorithm <a href="#a542e3fd8a5dd6116cb1e6bd48361a5cc">More...</a><br /></td></tr> +<tr class="separator:a542e3fd8a5dd6116cb1e6bd48361a5cc"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a> +Variables</h2></td></tr> +<tr class="memitem:afb28b1f82335ab68b1a7e6dc582eefc7"><td class="memItemLeft" align="right" valign="top">static const char </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8c.html#afb28b1f82335ab68b1a7e6dc582eefc7">b64_standart_table</a> []</td></tr> +<tr class="separator:afb28b1f82335ab68b1a7e6dc582eefc7"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a9c8315f27143b78bd7dd570c8c4168a1"><td class="memItemLeft" align="right" valign="top">static const char </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8c.html#a9c8315f27143b78bd7dd570c8c4168a1">b64_table_url_safe</a> []</td></tr> +<tr class="separator:a9c8315f27143b78bd7dd570c8c4168a1"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Macro Definition Documentation</h2> +<a class="anchor" id="a221b9c9698df0aa156ee2a33072ff9b4"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define b64_malloc</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">ptr</td><td>)</td> + <td>   malloc(ptr)</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a4750e31a6a2f09d3ef3e1962e25d8592"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define b64_realloc</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">ptr, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname">size </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td>   realloc(ptr, size)</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<h2 class="groupheader">Typedef Documentation</h2> +<a class="anchor" id="a0c8186d9b9b7880309c27230bbb5e69d"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">typedef unsigned char <a class="el" href="dap__enc__base64_8c.html#a0c8186d9b9b7880309c27230bbb5e69d">byte</a></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<h2 class="groupheader">Function Documentation</h2> +<a class="anchor" id="a304d3393507ac334c690719e7b66ac23"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void B64_Decode </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>srcChars</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">int </td> + <td class="paramname"><em>srcLen</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"><a class="el" href="dap__enc__base64_8c.html#a0c8186d9b9b7880309c27230bbb5e69d">byte</a> * </td> + <td class="paramname"><em>outBytes</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a9c3b4adc7a6fcdf700700d55b2c924ed"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">unsigned char* b64_decode </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname">, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">size_t </td> + <td class="paramname"> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> +<p>Dencode `char *' source with `size_t' size. Returns a `unsigned char *' base64 decoded string. </p> + +</div> +</div> +<a class="anchor" id="aea8b5297189d223a48f1886e692546e4"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">unsigned char* b64_decode_ex </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname">, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">size_t </td> + <td class="paramname">, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">size_t * </td> + <td class="paramname"> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> +<p>Dencode `char *' source with `size_t' size. Returns a `unsigned char *' base64 decoded string + size of decoded string. </p> + +</div> +</div> +<a class="anchor" id="ab0f10f3342a3055e4c98fb6bcec20c96"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="dap__enc__base64_8c.html#a0c8186d9b9b7880309c27230bbb5e69d">byte</a> B64_DecodeByte </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__enc__base64_8c.html#a0c8186d9b9b7880309c27230bbb5e69d">byte</a> </td> + <td class="paramname"><em>b</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="af3bd7d29d6866e2c15040e710077bdf4"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void B64_Encode </td> + <td>(</td> + <td class="paramtype">const <a class="el" href="dap__enc__base64_8c.html#a0c8186d9b9b7880309c27230bbb5e69d">byte</a> * </td> + <td class="paramname"><em>srcBytes</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">int </td> + <td class="paramname"><em>srcLen</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">char * </td> + <td class="paramname"><em>outChars</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a9a9b842a784b5202e1ab4eed1c156d00"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">char* b64_encode </td> + <td>(</td> + <td class="paramtype">const unsigned char * </td> + <td class="paramname">, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">size_t </td> + <td class="paramname"> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> +<p>Encode `unsigned char *' source with `size_t' size. Returns a `char *' base64 encoded string. </p> + +</div> +</div> +<a class="anchor" id="a2ec720931ba76ef3cccc8e23b2e186f9"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">char B64_EncodeByte </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__enc__base64_8c.html#a0c8186d9b9b7880309c27230bbb5e69d">byte</a> </td> + <td class="paramname"><em>b</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="aa785023e6318312a858628ac75c09cfc"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int B64_GetSize </td> + <td>(</td> + <td class="paramtype">int </td> + <td class="paramname"><em>sz</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">int </td> + <td class="paramname"><em>isEncode</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a7f71c6f222b5b8122b2240df6c9b3fa0"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">static const char* b64_table_by_standard </td> + <td>(</td> + <td class="paramtype"><a class="el" href="dap__enc__base64_8h.html#ae47fdbc3967e395dac8f30599961f45d">dap_enc_b64_standard_t</a> </td> + <td class="paramname"><em>standard</em></td><td>)</td> + <td></td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +<p>b64_table_by_standard The function returns the corresponding table of indices </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">standard</td><td>Base64 or Base64 URLSAFE encoding </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>index table </dd></dl> + +</div> +</div> +<a class="anchor" id="a09bda17a1fce52c2d9740ad9852fbb98"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t dap_enc_base64_decode </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>in</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">size_t </td> + <td class="paramname"><em>in_size</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">void * </td> + <td class="paramname"><em>out</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"><a class="el" href="dap__enc__base64_8h.html#ae47fdbc3967e395dac8f30599961f45d">dap_enc_b64_standard_t</a> </td> + <td class="paramname"><em>standard</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_enc_base64_decode Function of reverse transformation of base64 algorithm </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>Pointer to an array with incoming data </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">in_size</td><td>Size of the array with outgoing data </td></tr> + <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Pointer to an array with outgoing data </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>Size of the array with outgoing data </dd></dl> + +</div> +</div> +<a class="anchor" id="a542e3fd8a5dd6116cb1e6bd48361a5cc"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t dap_enc_base64_encode </td> + <td>(</td> + <td class="paramtype">const void * </td> + <td class="paramname"><em>a_in</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">size_t </td> + <td class="paramname"><em>a_in_size</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">char * </td> + <td class="paramname"><em>a_out</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"><a class="el" href="dap__enc__base64_8h.html#ae47fdbc3967e395dac8f30599961f45d">dap_enc_b64_standard_t</a> </td> + <td class="paramname"><em>standard</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_enc_base64_encode The function encodes the array according to the base64 algorithm </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_in</td><td>Array with incoming data </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_in_size</td><td>The size of the deviance array in the a_in parameter </td></tr> + <tr><td class="paramdir">[out]</td><td class="paramname">a_out</td><td>A pointer to an array in which the data will be after encoding </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>Size of the array with outgoing data </dd></dl> + +</div> +</div> +<h2 class="groupheader">Variable Documentation</h2> +<a class="anchor" id="afb28b1f82335ab68b1a7e6dc582eefc7"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">const char b64_standart_table[]</td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> +<b>Initial value:</b><div class="fragment"><div class="line">= {</div><div class="line"> <span class="charliteral">'A'</span>, <span class="charliteral">'B'</span>, <span class="charliteral">'C'</span>, <span class="charliteral">'D'</span>, <span class="charliteral">'E'</span>, <span class="charliteral">'F'</span>, <span class="charliteral">'G'</span>, <span class="charliteral">'H'</span>,</div><div class="line"> <span class="charliteral">'I'</span>, <span class="charliteral">'J'</span>, <span class="charliteral">'K'</span>, <span class="charliteral">'L'</span>, <span class="charliteral">'M'</span>, <span class="charliteral">'N'</span>, <span class="charliteral">'O'</span>, <span class="charliteral">'P'</span>,</div><div class="line"> <span class="charliteral">'Q'</span>, <span class="charliteral">'R'</span>, <span class="charliteral">'S'</span>, <span class="charliteral">'T'</span>, <span class="charliteral">'U'</span>, <span class="charliteral">'V'</span>, <span class="charliteral">'W'</span>, <span class="charliteral">'X'</span>,</div><div class="line"> <span class="charliteral">'Y'</span>, <span class="charliteral">'Z'</span>, <span class="charliteral">'a'</span>, <span class="charliteral">'b'</span>, <span class="charliteral">'c'</span>, <span class="charliteral">'d'</span>, <span class="charliteral">'e'</span>, <span class="charliteral">'f'</span>,</div><div class="line"> <span class="charliteral">'g'</span>, <span class="charliteral">'h'</span>, <span class="charliteral">'i'</span>, <span class="charliteral">'j'</span>, <span class="charliteral">'k'</span>, <span class="charliteral">'l'</span>, <span class="charliteral">'m'</span>, <span class="charliteral">'n'</span>,</div><div class="line"> <span class="charliteral">'o'</span>, <span class="charliteral">'p'</span>, <span class="charliteral">'q'</span>, <span class="charliteral">'r'</span>, <span class="charliteral">'s'</span>, <span class="charliteral">'t'</span>, <span class="charliteral">'u'</span>, <span class="charliteral">'v'</span>,</div><div class="line"> <span class="charliteral">'w'</span>, <span class="charliteral">'x'</span>, <span class="charliteral">'y'</span>, <span class="charliteral">'z'</span>, <span class="charliteral">'0'</span>, <span class="charliteral">'1'</span>, <span class="charliteral">'2'</span>, <span class="charliteral">'3'</span>,</div><div class="line"> <span class="charliteral">'4'</span>, <span class="charliteral">'5'</span>, <span class="charliteral">'6'</span>, <span class="charliteral">'7'</span>, <span class="charliteral">'8'</span>, <span class="charliteral">'9'</span>, <span class="charliteral">'+'</span>, <span class="charliteral">'/'</span></div><div class="line">}</div></div><!-- fragment --><p>Base64 index table. </p> + +</div> +</div> +<a class="anchor" id="a9c8315f27143b78bd7dd570c8c4168a1"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">const char b64_table_url_safe[]</td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> +<b>Initial value:</b><div class="fragment"><div class="line">= {</div><div class="line"> <span class="charliteral">'A'</span>, <span class="charliteral">'B'</span>, <span class="charliteral">'C'</span>, <span class="charliteral">'D'</span>, <span class="charliteral">'E'</span>, <span class="charliteral">'F'</span>, <span class="charliteral">'G'</span>, <span class="charliteral">'H'</span>,</div><div class="line"> <span class="charliteral">'I'</span>, <span class="charliteral">'J'</span>, <span class="charliteral">'K'</span>, <span class="charliteral">'L'</span>, <span class="charliteral">'M'</span>, <span class="charliteral">'N'</span>, <span class="charliteral">'O'</span>, <span class="charliteral">'P'</span>,</div><div class="line"> <span class="charliteral">'Q'</span>, <span class="charliteral">'R'</span>, <span class="charliteral">'S'</span>, <span class="charliteral">'T'</span>, <span class="charliteral">'U'</span>, <span class="charliteral">'V'</span>, <span class="charliteral">'W'</span>, <span class="charliteral">'X'</span>,</div><div class="line"> <span class="charliteral">'Y'</span>, <span class="charliteral">'Z'</span>, <span class="charliteral">'a'</span>, <span class="charliteral">'b'</span>, <span class="charliteral">'c'</span>, <span class="charliteral">'d'</span>, <span class="charliteral">'e'</span>, <span class="charliteral">'f'</span>,</div><div class="line"> <span class="charliteral">'g'</span>, <span class="charliteral">'h'</span>, <span class="charliteral">'i'</span>, <span class="charliteral">'j'</span>, <span class="charliteral">'k'</span>, <span class="charliteral">'l'</span>, <span class="charliteral">'m'</span>, <span class="charliteral">'n'</span>,</div><div class="line"> <span class="charliteral">'o'</span>, <span class="charliteral">'p'</span>, <span class="charliteral">'q'</span>, <span class="charliteral">'r'</span>, <span class="charliteral">'s'</span>, <span class="charliteral">'t'</span>, <span class="charliteral">'u'</span>, <span class="charliteral">'v'</span>,</div><div class="line"> <span class="charliteral">'w'</span>, <span class="charliteral">'x'</span>, <span class="charliteral">'y'</span>, <span class="charliteral">'z'</span>, <span class="charliteral">'0'</span>, <span class="charliteral">'1'</span>, <span class="charliteral">'2'</span>, <span class="charliteral">'3'</span>,</div><div class="line"> <span class="charliteral">'4'</span>, <span class="charliteral">'5'</span>, <span class="charliteral">'6'</span>, <span class="charliteral">'7'</span>, <span class="charliteral">'8'</span>, <span class="charliteral">'9'</span>, <span class="charliteral">'-'</span>, <span class="charliteral">'_'</span></div><div class="line">}</div></div><!-- fragment --><p>Base64 url safe index table. </p> + +</div> +</div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dap__enc__base64_8h.html b/libdap/docs/dap__enc__base64_8h.html new file mode 100755 index 0000000000000000000000000000000000000000..f9a016703bd065f695a17b12aab0c493a092d701 --- /dev/null +++ b/libdap/docs/dap__enc__base64_8h.html @@ -0,0 +1,283 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: crypto/dap_enc_base64.h File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_53403d93963d3f5d2fcffd0698f5bddb.html">crypto</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#define-members">Macros</a> | +<a href="#typedef-members">Typedefs</a> | +<a href="#enum-members">Enumerations</a> | +<a href="#func-members">Functions</a> </div> + <div class="headertitle"> +<div class="title">dap_enc_base64.h File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include <stddef.h></code><br /> +</div> +<p><a href="dap__enc__base64_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> +Macros</h2></td></tr> +<tr class="memitem:a441f115386986f22872acd70d7d04736"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8h.html#a441f115386986f22872acd70d7d04736">DAP_ENC_BASE64_ENCODE_SIZE</a>(in_size)   (((4 * (size_t)in_size / 3) + 3) & ~3)</td></tr> +<tr class="separator:a441f115386986f22872acd70d7d04736"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> +Typedefs</h2></td></tr> +<tr class="memitem:ae47fdbc3967e395dac8f30599961f45d"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7">dap_enc_b64_standard</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8h.html#ae47fdbc3967e395dac8f30599961f45d">dap_enc_b64_standard_t</a></td></tr> +<tr class="separator:ae47fdbc3967e395dac8f30599961f45d"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a> +Enumerations</h2></td></tr> +<tr class="memitem:aef8f66eb8b66128e3881e784fa5630f7"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7">dap_enc_b64_standard</a> { <a class="el" href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7a684c2e012891c1ffc99a50250aa9e03b">DAP_ENC_STANDARD_B64</a>, +<a class="el" href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7a14e31e001657e974079cd81873eadf32">DAP_ENC_STANDARD_B64_URLSAFE</a> + }</td></tr> +<tr class="separator:aef8f66eb8b66128e3881e784fa5630f7"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +Functions</h2></td></tr> +<tr class="memitem:a09bda17a1fce52c2d9740ad9852fbb98"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8h.html#a09bda17a1fce52c2d9740ad9852fbb98">dap_enc_base64_decode</a> (const char *in, size_t in_size, void *out, <a class="el" href="dap__enc__base64_8h.html#ae47fdbc3967e395dac8f30599961f45d">dap_enc_b64_standard_t</a> standard)</td></tr> +<tr class="memdesc:a09bda17a1fce52c2d9740ad9852fbb98"><td class="mdescLeft"> </td><td class="mdescRight">dap_enc_base64_decode Function of reverse transformation of base64 algorithm <a href="#a09bda17a1fce52c2d9740ad9852fbb98">More...</a><br /></td></tr> +<tr class="separator:a09bda17a1fce52c2d9740ad9852fbb98"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ad164a1a38bbeab9485bd283c185fe557"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8h.html#ad164a1a38bbeab9485bd283c185fe557">dap_enc_base64_encode</a> (const void *in, size_t in_size, char *out, <a class="el" href="dap__enc__base64_8h.html#ae47fdbc3967e395dac8f30599961f45d">dap_enc_b64_standard_t</a> standard)</td></tr> +<tr class="memdesc:ad164a1a38bbeab9485bd283c185fe557"><td class="mdescLeft"> </td><td class="mdescRight">dap_enc_base64_encode The function encodes the array according to the base64 algorithm <a href="#ad164a1a38bbeab9485bd283c185fe557">More...</a><br /></td></tr> +<tr class="separator:ad164a1a38bbeab9485bd283c185fe557"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Macro Definition Documentation</h2> +<a class="anchor" id="a441f115386986f22872acd70d7d04736"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define DAP_ENC_BASE64_ENCODE_SIZE</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">in_size</td><td>)</td> + <td>   (((4 * (size_t)in_size / 3) + 3) & ~3)</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<h2 class="groupheader">Typedef Documentation</h2> +<a class="anchor" id="ae47fdbc3967e395dac8f30599961f45d"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">typedef enum <a class="el" href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7">dap_enc_b64_standard</a> <a class="el" href="dap__enc__base64_8h.html#ae47fdbc3967e395dac8f30599961f45d">dap_enc_b64_standard_t</a></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<h2 class="groupheader">Enumeration Type Documentation</h2> +<a class="anchor" id="aef8f66eb8b66128e3881e784fa5630f7"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">enum <a class="el" href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7">dap_enc_b64_standard</a></td> + </tr> + </table> +</div><div class="memdoc"> +<table class="fieldtable"> +<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="aef8f66eb8b66128e3881e784fa5630f7a684c2e012891c1ffc99a50250aa9e03b"></a>DAP_ENC_STANDARD_B64 </td><td class="fielddoc"> +</td></tr> +<tr><td class="fieldname"><a class="anchor" id="aef8f66eb8b66128e3881e784fa5630f7a14e31e001657e974079cd81873eadf32"></a>DAP_ENC_STANDARD_B64_URLSAFE </td><td class="fielddoc"> +</td></tr> +</table> + +</div> +</div> +<h2 class="groupheader">Function Documentation</h2> +<a class="anchor" id="a09bda17a1fce52c2d9740ad9852fbb98"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t dap_enc_base64_decode </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>in</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">size_t </td> + <td class="paramname"><em>in_size</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">void * </td> + <td class="paramname"><em>out</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"><a class="el" href="dap__enc__base64_8h.html#ae47fdbc3967e395dac8f30599961f45d">dap_enc_b64_standard_t</a> </td> + <td class="paramname"><em>standard</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_enc_base64_decode Function of reverse transformation of base64 algorithm </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>Pointer to an array with incoming data </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">in_size</td><td>Size of the array with outgoing data </td></tr> + <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Pointer to an array with outgoing data </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>Size of the array with outgoing data </dd></dl> + +</div> +</div> +<a class="anchor" id="ad164a1a38bbeab9485bd283c185fe557"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t dap_enc_base64_encode </td> + <td>(</td> + <td class="paramtype">const void * </td> + <td class="paramname"><em>a_in</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">size_t </td> + <td class="paramname"><em>a_in_size</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">char * </td> + <td class="paramname"><em>a_out</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"><a class="el" href="dap__enc__base64_8h.html#ae47fdbc3967e395dac8f30599961f45d">dap_enc_b64_standard_t</a> </td> + <td class="paramname"><em>standard</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>dap_enc_base64_encode The function encodes the array according to the base64 algorithm </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">a_in</td><td>Array with incoming data </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">a_in_size</td><td>The size of the deviance array in the a_in parameter </td></tr> + <tr><td class="paramdir">[out]</td><td class="paramname">a_out</td><td>A pointer to an array in which the data will be after encoding </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>Size of the array with outgoing data </dd></dl> + +</div> +</div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dap__enc__base64_8h_source.html b/libdap/docs/dap__enc__base64_8h_source.html new file mode 100755 index 0000000000000000000000000000000000000000..c416a4c48f84069f8d0af4dadc7f75555ef6dd6d --- /dev/null +++ b/libdap/docs/dap__enc__base64_8h_source.html @@ -0,0 +1,106 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: crypto/dap_enc_base64.h Source File</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_53403d93963d3f5d2fcffd0698f5bddb.html">crypto</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">dap_enc_base64.h</div> </div> +</div><!--header--> +<div class="contents"> +<a href="dap__enc__base64_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#ifndef _DAP_ENC_BASE64_H_</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor">#define _DAP_ENC_BASE64_H_</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="preprocessor">#include <stddef.h></span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> </div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> </div><div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7"> 9</a></span> <span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7">dap_enc_b64_standard</a> {</div><div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7a684c2e012891c1ffc99a50250aa9e03b"> 10</a></span>  <a class="code" href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7a684c2e012891c1ffc99a50250aa9e03b">DAP_ENC_STANDARD_B64</a>,</div><div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7a14e31e001657e974079cd81873eadf32"> 11</a></span>  <a class="code" href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7a14e31e001657e974079cd81873eadf32">DAP_ENC_STANDARD_B64_URLSAFE</a>,</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> } <a class="code" href="dap__enc__base64_8h.html#ae47fdbc3967e395dac8f30599961f45d">dap_enc_b64_standard_t</a>;</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> </div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">/*</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * Calculates encode size from input size</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> */</span></div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="dap__enc__base64_8h.html#a441f115386986f22872acd70d7d04736"> 17</a></span> <span class="preprocessor">#define DAP_ENC_BASE64_ENCODE_SIZE(in_size) (((4 * (size_t)in_size / 3) + 3) & ~3)</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="keywordtype">size_t</span> <a class="code" href="dap__enc__base64_8h.html#a09bda17a1fce52c2d9740ad9852fbb98">dap_enc_base64_decode</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * in, <span class="keywordtype">size_t</span> in_size, <span class="keywordtype">void</span> * out, dap_enc_b64_standard_t standard);</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="keywordtype">size_t</span> <a class="code" href="dap__enc__base64_8h.html#ad164a1a38bbeab9485bd283c185fe557">dap_enc_base64_encode</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> * in, <span class="keywordtype">size_t</span> in_size, <span class="keywordtype">char</span> * out, dap_enc_b64_standard_t standard);</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> }</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#endif</span></div><div class="ttc" id="dap__enc__base64_8h_html_ae47fdbc3967e395dac8f30599961f45d"><div class="ttname"><a href="dap__enc__base64_8h.html#ae47fdbc3967e395dac8f30599961f45d">dap_enc_b64_standard_t</a></div><div class="ttdeci">enum dap_enc_b64_standard dap_enc_b64_standard_t</div></div> +<div class="ttc" id="dap__enc__base64_8h_html_aef8f66eb8b66128e3881e784fa5630f7a14e31e001657e974079cd81873eadf32"><div class="ttname"><a href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7a14e31e001657e974079cd81873eadf32">DAP_ENC_STANDARD_B64_URLSAFE</a></div><div class="ttdef"><b>Definition:</b> dap_enc_base64.h:11</div></div> +<div class="ttc" id="dap__enc__base64_8h_html_ad164a1a38bbeab9485bd283c185fe557"><div class="ttname"><a href="dap__enc__base64_8h.html#ad164a1a38bbeab9485bd283c185fe557">dap_enc_base64_encode</a></div><div class="ttdeci">size_t dap_enc_base64_encode(const void *in, size_t in_size, char *out, dap_enc_b64_standard_t standard)</div><div class="ttdoc">dap_enc_base64_encode The function encodes the array according to the base64 algorithm ...</div><div class="ttdef"><b>Definition:</b> dap_enc_base64.c:214</div></div> +<div class="ttc" id="dap__enc__base64_8h_html_aef8f66eb8b66128e3881e784fa5630f7a684c2e012891c1ffc99a50250aa9e03b"><div class="ttname"><a href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7a684c2e012891c1ffc99a50250aa9e03b">DAP_ENC_STANDARD_B64</a></div><div class="ttdef"><b>Definition:</b> dap_enc_base64.h:10</div></div> +<div class="ttc" id="dap__enc__base64_8h_html_a09bda17a1fce52c2d9740ad9852fbb98"><div class="ttname"><a href="dap__enc__base64_8h.html#a09bda17a1fce52c2d9740ad9852fbb98">dap_enc_base64_decode</a></div><div class="ttdeci">size_t dap_enc_base64_decode(const char *in, size_t in_size, void *out, dap_enc_b64_standard_t standard)</div><div class="ttdoc">dap_enc_base64_decode Function of reverse transformation of base64 algorithm </div><div class="ttdef"><b>Definition:</b> dap_enc_base64.c:119</div></div> +<div class="ttc" id="dap__enc__base64_8h_html_aef8f66eb8b66128e3881e784fa5630f7"><div class="ttname"><a href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7">dap_enc_b64_standard</a></div><div class="ttdeci">dap_enc_b64_standard</div><div class="ttdef"><b>Definition:</b> dap_enc_base64.h:9</div></div> +</div><!-- fragment --></div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dap__process__manager_8c.html b/libdap/docs/dap__process__manager_8c.html new file mode 100755 index 0000000000000000000000000000000000000000..40311ff6a7e0ab3f1761216ed0a1b6ea3aa067b0 --- /dev/null +++ b/libdap/docs/dap__process__manager_8c.html @@ -0,0 +1,265 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: core/unix/dap_process_manager.c File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_4270bfced15e0e73154b13468c7c9ad9.html">core</a></li><li class="navelem"><a class="el" href="dir_cc9d4db7f92a2e77b53bedbbcfe214a0.html">unix</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#define-members">Macros</a> | +<a href="#func-members">Functions</a> </div> + <div class="headertitle"> +<div class="title">dap_process_manager.c File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include <stdio.h></code><br /> +<code>#include <sys/types.h></code><br /> +<code>#include <signal.h></code><br /> +<code>#include "<a class="el" href="dap__process__manager_8h_source.html">dap_process_manager.h</a>"</code><br /> +<code>#include "<a class="el" href="dap__common_8h_source.html">../dap_common.h</a>"</code><br /> +</div><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> +Macros</h2></td></tr> +<tr class="memitem:a7ce0df38eb467e59f209470c8f5ac4e6"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__manager_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">LOG_TAG</a>   "dap_process_manager"</td></tr> +<tr class="separator:a7ce0df38eb467e59f209470c8f5ac4e6"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +Functions</h2></td></tr> +<tr class="memitem:a2e370751950e83a2c633a69dfe026e07"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__manager_8c.html#a2e370751950e83a2c633a69dfe026e07">is_process_running</a> (pid_t pid)</td></tr> +<tr class="memdesc:a2e370751950e83a2c633a69dfe026e07"><td class="mdescLeft"> </td><td class="mdescRight">is_process_running Check whether the process is running <a href="#a2e370751950e83a2c633a69dfe026e07">More...</a><br /></td></tr> +<tr class="separator:a2e370751950e83a2c633a69dfe026e07"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a0183612dbd7f0b918e8e39979c9760a0"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__manager_8c.html#a0183612dbd7f0b918e8e39979c9760a0">save_process_pid_in_file</a> (const char *file_path)</td></tr> +<tr class="memdesc:a0183612dbd7f0b918e8e39979c9760a0"><td class="mdescLeft"> </td><td class="mdescRight">save_process_pid_in_file Saves process pid into file by file_path <a href="#a0183612dbd7f0b918e8e39979c9760a0">More...</a><br /></td></tr> +<tr class="separator:a0183612dbd7f0b918e8e39979c9760a0"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a3d03c30d6144592382149beaef1019b9"><td class="memItemLeft" align="right" valign="top">pid_t </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__manager_8c.html#a3d03c30d6144592382149beaef1019b9">get_pid_from_file</a> (const char *file_path)</td></tr> +<tr class="memdesc:a3d03c30d6144592382149beaef1019b9"><td class="mdescLeft"> </td><td class="mdescRight">get_pid_from_file File must consist only PID. Return 0 if file is clear. <a href="#a3d03c30d6144592382149beaef1019b9">More...</a><br /></td></tr> +<tr class="separator:a3d03c30d6144592382149beaef1019b9"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:abeda31c74acff5c32d5952efd3c534fc"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__manager_8c.html#abeda31c74acff5c32d5952efd3c534fc">daemonize_process</a> ()</td></tr> +<tr class="memdesc:abeda31c74acff5c32d5952efd3c534fc"><td class="mdescLeft"> </td><td class="mdescRight">daemonize_process Demonizes current process and exit from program <a href="#abeda31c74acff5c32d5952efd3c534fc">More...</a><br /></td></tr> +<tr class="separator:abeda31c74acff5c32d5952efd3c534fc"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a61978d909d8e1abda89ced3f1cfd38c3"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__manager_8c.html#a61978d909d8e1abda89ced3f1cfd38c3">kill_process</a> (pid_t pid)</td></tr> +<tr class="memdesc:a61978d909d8e1abda89ced3f1cfd38c3"><td class="mdescLeft"> </td><td class="mdescRight">kill_process Sends SIGKILL to process <a href="#a61978d909d8e1abda89ced3f1cfd38c3">More...</a><br /></td></tr> +<tr class="separator:a61978d909d8e1abda89ced3f1cfd38c3"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Macro Definition Documentation</h2> +<a class="anchor" id="a7ce0df38eb467e59f209470c8f5ac4e6"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define LOG_TAG   "dap_process_manager"</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<h2 class="groupheader">Function Documentation</h2> +<a class="anchor" id="abeda31c74acff5c32d5952efd3c534fc"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">bool daemonize_process </td> + <td>(</td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>daemonize_process Demonizes current process and exit from program </p> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="a3d03c30d6144592382149beaef1019b9"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">pid_t get_pid_from_file </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>file_path</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>get_pid_from_file File must consist only PID. Return 0 if file is clear. </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">file_path</td><td>File path </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>Execution result </dd></dl> + +</div> +</div> +<a class="anchor" id="a2e370751950e83a2c633a69dfe026e07"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">bool is_process_running </td> + <td>(</td> + <td class="paramtype">pid_t </td> + <td class="paramname"><em>pid</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>is_process_running Check whether the process is running </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">pid</td><td>PID </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="a61978d909d8e1abda89ced3f1cfd38c3"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">bool kill_process </td> + <td>(</td> + <td class="paramtype">pid_t </td> + <td class="paramname"><em>pid</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>kill_process Sends SIGKILL to process </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">pid</td><td></td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="a0183612dbd7f0b918e8e39979c9760a0"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">bool save_process_pid_in_file </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>file_path</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>save_process_pid_in_file Saves process pid into file by file_path </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">file_path</td><td>File path </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>Execution result</dd></dl> +<p>Saves process pid into file by file_path. If file exists he will be overwritten </p> + +</div> +</div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dap__process__manager_8h.html b/libdap/docs/dap__process__manager_8h.html new file mode 100755 index 0000000000000000000000000000000000000000..fd0cf1db9ed7941869e4e6e380d0ca2b551fb256 --- /dev/null +++ b/libdap/docs/dap__process__manager_8h.html @@ -0,0 +1,102 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: core/unix/dap_process_manager.h File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_4270bfced15e0e73154b13468c7c9ad9.html">core</a></li><li class="navelem"><a class="el" href="dir_cc9d4db7f92a2e77b53bedbbcfe214a0.html">unix</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">dap_process_manager.h File Reference</div> </div> +</div><!--header--> +<div class="contents"> + +<p><a href="dap__process__manager_8h_source.html">Go to the source code of this file.</a></p> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dap__process__manager_8h_source.html b/libdap/docs/dap__process__manager_8h_source.html new file mode 100755 index 0000000000000000000000000000000000000000..7431ea34640f4f800e14801a3662324dcc37f9a2 --- /dev/null +++ b/libdap/docs/dap__process__manager_8h_source.html @@ -0,0 +1,105 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: core/unix/dap_process_manager.h Source File</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_4270bfced15e0e73154b13468c7c9ad9.html">core</a></li><li class="navelem"><a class="el" href="dir_cc9d4db7f92a2e77b53bedbbcfe214a0.html">unix</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">dap_process_manager.h</div> </div> +</div><!--header--> +<div class="contents"> +<a href="dap__process__manager_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#ifdef __linux__</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> </div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="preprocessor">#include <stdbool.h></span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="preprocessor">#include <unistd.h></span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> </div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">/* Saves process pid into file by file_path.</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * If file exists he will be overwritten */</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="keyword">extern</span> <span class="keywordtype">bool</span> <a class="code" href="dap__process__manager_8c.html#a0183612dbd7f0b918e8e39979c9760a0">save_process_pid_in_file</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* file_path);</div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> </div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">/* File must consist only PID. Return 0 if file is clear. */</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="keyword">extern</span> pid_t <a class="code" href="dap__process__manager_8c.html#a3d03c30d6144592382149beaef1019b9">get_pid_from_file</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* file_path);</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">/* Return true if process running */</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="keyword">extern</span> <span class="keywordtype">bool</span> <a class="code" href="dap__process__manager_8c.html#a2e370751950e83a2c633a69dfe026e07">is_process_running</a>(pid_t pid);</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> </div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment">/* Demonizes current process and exit from program */</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="keyword">extern</span> <span class="keywordtype">bool</span> <a class="code" href="dap__process__manager_8c.html#abeda31c74acff5c32d5952efd3c534fc">daemonize_process</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment">/* Sends SIGKILL to process */</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="keyword">extern</span> <span class="keywordtype">bool</span> <a class="code" href="dap__process__manager_8c.html#a61978d909d8e1abda89ced3f1cfd38c3">kill_process</a>(pid_t pid);</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#endif</span></div><div class="ttc" id="dap__process__manager_8c_html_abeda31c74acff5c32d5952efd3c534fc"><div class="ttname"><a href="dap__process__manager_8c.html#abeda31c74acff5c32d5952efd3c534fc">daemonize_process</a></div><div class="ttdeci">bool daemonize_process()</div><div class="ttdoc">daemonize_process Demonizes current process and exit from program </div><div class="ttdef"><b>Definition:</b> dap_process_manager.c:63</div></div> +<div class="ttc" id="dap__process__manager_8c_html_a0183612dbd7f0b918e8e39979c9760a0"><div class="ttname"><a href="dap__process__manager_8c.html#a0183612dbd7f0b918e8e39979c9760a0">save_process_pid_in_file</a></div><div class="ttdeci">bool save_process_pid_in_file(const char *file_path)</div><div class="ttdoc">save_process_pid_in_file Saves process pid into file by file_path </div><div class="ttdef"><b>Definition:</b> dap_process_manager.c:29</div></div> +<div class="ttc" id="dap__process__manager_8c_html_a3d03c30d6144592382149beaef1019b9"><div class="ttname"><a href="dap__process__manager_8c.html#a3d03c30d6144592382149beaef1019b9">get_pid_from_file</a></div><div class="ttdeci">pid_t get_pid_from_file(const char *file_path)</div><div class="ttdoc">get_pid_from_file File must consist only PID. Return 0 if file is clear. </div><div class="ttdef"><b>Definition:</b> dap_process_manager.c:45</div></div> +<div class="ttc" id="dap__process__manager_8c_html_a2e370751950e83a2c633a69dfe026e07"><div class="ttname"><a href="dap__process__manager_8c.html#a2e370751950e83a2c633a69dfe026e07">is_process_running</a></div><div class="ttdeci">bool is_process_running(pid_t pid)</div><div class="ttdoc">is_process_running Check whether the process is running </div><div class="ttdef"><b>Definition:</b> dap_process_manager.c:17</div></div> +<div class="ttc" id="dap__process__manager_8c_html_a61978d909d8e1abda89ced3f1cfd38c3"><div class="ttname"><a href="dap__process__manager_8c.html#a61978d909d8e1abda89ced3f1cfd38c3">kill_process</a></div><div class="ttdeci">bool kill_process(pid_t pid)</div><div class="ttdoc">kill_process Sends SIGKILL to process </div><div class="ttdef"><b>Definition:</b> dap_process_manager.c:72</div></div> +</div><!-- fragment --></div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dap__process__memory_8c.html b/libdap/docs/dap__process__memory_8c.html new file mode 100755 index 0000000000000000000000000000000000000000..da545f43e29f0ef194ca63e25349c349f770d5b1 --- /dev/null +++ b/libdap/docs/dap__process__memory_8c.html @@ -0,0 +1,247 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: core/unix/dap_process_memory.c File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_4270bfced15e0e73154b13468c7c9ad9.html">core</a></li><li class="navelem"><a class="el" href="dir_cc9d4db7f92a2e77b53bedbbcfe214a0.html">unix</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#define-members">Macros</a> | +<a href="#func-members">Functions</a> </div> + <div class="headertitle"> +<div class="title">dap_process_memory.c File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include "<a class="el" href="dap__process__memory_8h_source.html">dap_process_memory.h</a>"</code><br /> +<code>#include "<a class="el" href="dap__common_8h_source.html">../dap_common.h</a>"</code><br /> +<code>#include <stdlib.h></code><br /> +<code>#include <string.h></code><br /> +<code>#include <stdio.h></code><br /> +</div><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> +Macros</h2></td></tr> +<tr class="memitem:a7ce0df38eb467e59f209470c8f5ac4e6"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__memory_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">LOG_TAG</a>   "dap_process_mem"</td></tr> +<tr class="separator:a7ce0df38eb467e59f209470c8f5ac4e6"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:af0f2173e3b202ddf5756531b4471dcb2"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__memory_8c.html#af0f2173e3b202ddf5756531b4471dcb2">MAX_LINE_LENGTH</a>   128</td></tr> +<tr class="separator:af0f2173e3b202ddf5756531b4471dcb2"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +Functions</h2></td></tr> +<tr class="memitem:a12bc84267b098d654c3a5239f2db9421"><td class="memItemLeft" align="right" valign="top">static size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__memory_8c.html#a12bc84267b098d654c3a5239f2db9421">_parse_size_line</a> (char *line)</td></tr> +<tr class="separator:a12bc84267b098d654c3a5239f2db9421"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:abd2440928361cfe4eb3e1be0f3963a99"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="dap__process__memory_8h.html#a9eb3c4be5e9b4a8738730a15bb190555">dap_process_memory_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__memory_8c.html#abd2440928361cfe4eb3e1be0f3963a99">_get_process_memory</a> (const char *proc_file_path)</td></tr> +<tr class="separator:abd2440928361cfe4eb3e1be0f3963a99"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aca5c54866cc33715a7da93bfaed39a1d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="dap__process__memory_8h.html#a9eb3c4be5e9b4a8738730a15bb190555">dap_process_memory_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__memory_8c.html#aca5c54866cc33715a7da93bfaed39a1d">get_proc_mem_current</a> (void)</td></tr> +<tr class="memdesc:aca5c54866cc33715a7da93bfaed39a1d"><td class="mdescLeft"> </td><td class="mdescRight">get_proc_mem_current Get information about the amount of RAM consumed for the current process <a href="#aca5c54866cc33715a7da93bfaed39a1d">More...</a><br /></td></tr> +<tr class="separator:aca5c54866cc33715a7da93bfaed39a1d"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a30800f14d0a84a92a23429eac85a7f5d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="dap__process__memory_8h.html#a9eb3c4be5e9b4a8738730a15bb190555">dap_process_memory_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__memory_8c.html#a30800f14d0a84a92a23429eac85a7f5d">get_proc_mem_by_pid</a> (pid_t pid)</td></tr> +<tr class="memdesc:a30800f14d0a84a92a23429eac85a7f5d"><td class="mdescLeft"> </td><td class="mdescRight">get_proc_mem_by_pid Obtain information about the amount of RAM consumed for a particular process <a href="#a30800f14d0a84a92a23429eac85a7f5d">More...</a><br /></td></tr> +<tr class="separator:a30800f14d0a84a92a23429eac85a7f5d"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Macro Definition Documentation</h2> +<a class="anchor" id="a7ce0df38eb467e59f209470c8f5ac4e6"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define LOG_TAG   "dap_process_mem"</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="af0f2173e3b202ddf5756531b4471dcb2"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define MAX_LINE_LENGTH   128</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<h2 class="groupheader">Function Documentation</h2> +<a class="anchor" id="abd2440928361cfe4eb3e1be0f3963a99"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">static <a class="el" href="dap__process__memory_8h.html#a9eb3c4be5e9b4a8738730a15bb190555">dap_process_memory_t</a> _get_process_memory </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>proc_file_path</em></td><td>)</td> + <td></td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a12bc84267b098d654c3a5239f2db9421"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">static size_t _parse_size_line </td> + <td>(</td> + <td class="paramtype">char * </td> + <td class="paramname"><em>line</em></td><td>)</td> + <td></td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">static</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a30800f14d0a84a92a23429eac85a7f5d"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="dap__process__memory_8h.html#a9eb3c4be5e9b4a8738730a15bb190555">dap_process_memory_t</a> get_proc_mem_by_pid </td> + <td>(</td> + <td class="paramtype">pid_t </td> + <td class="paramname"><em>pid</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>get_proc_mem_by_pid Obtain information about the amount of RAM consumed for a particular process </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">pid</td><td>PID </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="aca5c54866cc33715a7da93bfaed39a1d"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="dap__process__memory_8h.html#a9eb3c4be5e9b4a8738730a15bb190555">dap_process_memory_t</a> get_proc_mem_current </td> + <td>(</td> + <td class="paramtype">void </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>get_proc_mem_current Get information about the amount of RAM consumed for the current process </p> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dap__process__memory_8h.html b/libdap/docs/dap__process__memory_8h.html new file mode 100755 index 0000000000000000000000000000000000000000..81084738669bb74edfe5bfa44ace7d4c9b42251f --- /dev/null +++ b/libdap/docs/dap__process__memory_8h.html @@ -0,0 +1,186 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: core/unix/dap_process_memory.h File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_4270bfced15e0e73154b13468c7c9ad9.html">core</a></li><li class="navelem"><a class="el" href="dir_cc9d4db7f92a2e77b53bedbbcfe214a0.html">unix</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Data Structures</a> | +<a href="#typedef-members">Typedefs</a> | +<a href="#func-members">Functions</a> </div> + <div class="headertitle"> +<div class="title">dap_process_memory.h File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include <stdint.h></code><br /> +<code>#include <sys/types.h></code><br /> +</div> +<p><a href="dap__process__memory_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> +Data Structures</h2></td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__process__memory.html">dap_process_memory</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> +Typedefs</h2></td></tr> +<tr class="memitem:a9eb3c4be5e9b4a8738730a15bb190555"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structdap__process__memory.html">dap_process_memory</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__memory_8h.html#a9eb3c4be5e9b4a8738730a15bb190555">dap_process_memory_t</a></td></tr> +<tr class="separator:a9eb3c4be5e9b4a8738730a15bb190555"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +Functions</h2></td></tr> +<tr class="memitem:aca5c54866cc33715a7da93bfaed39a1d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="dap__process__memory_8h.html#a9eb3c4be5e9b4a8738730a15bb190555">dap_process_memory_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__memory_8h.html#aca5c54866cc33715a7da93bfaed39a1d">get_proc_mem_current</a> (void)</td></tr> +<tr class="memdesc:aca5c54866cc33715a7da93bfaed39a1d"><td class="mdescLeft"> </td><td class="mdescRight">get_proc_mem_current Get information about the amount of RAM consumed for the current process <a href="#aca5c54866cc33715a7da93bfaed39a1d">More...</a><br /></td></tr> +<tr class="separator:aca5c54866cc33715a7da93bfaed39a1d"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a30800f14d0a84a92a23429eac85a7f5d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="dap__process__memory_8h.html#a9eb3c4be5e9b4a8738730a15bb190555">dap_process_memory_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__memory_8h.html#a30800f14d0a84a92a23429eac85a7f5d">get_proc_mem_by_pid</a> (pid_t pid)</td></tr> +<tr class="memdesc:a30800f14d0a84a92a23429eac85a7f5d"><td class="mdescLeft"> </td><td class="mdescRight">get_proc_mem_by_pid Obtain information about the amount of RAM consumed for a particular process <a href="#a30800f14d0a84a92a23429eac85a7f5d">More...</a><br /></td></tr> +<tr class="separator:a30800f14d0a84a92a23429eac85a7f5d"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Typedef Documentation</h2> +<a class="anchor" id="a9eb3c4be5e9b4a8738730a15bb190555"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">typedef struct <a class="el" href="structdap__process__memory.html">dap_process_memory</a> <a class="el" href="dap__process__memory_8h.html#a9eb3c4be5e9b4a8738730a15bb190555">dap_process_memory_t</a></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<h2 class="groupheader">Function Documentation</h2> +<a class="anchor" id="a30800f14d0a84a92a23429eac85a7f5d"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="dap__process__memory_8h.html#a9eb3c4be5e9b4a8738730a15bb190555">dap_process_memory_t</a> get_proc_mem_by_pid </td> + <td>(</td> + <td class="paramtype">pid_t </td> + <td class="paramname"><em>pid</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>get_proc_mem_by_pid Obtain information about the amount of RAM consumed for a particular process </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">pid</td><td>PID </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +<a class="anchor" id="aca5c54866cc33715a7da93bfaed39a1d"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="dap__process__memory_8h.html#a9eb3c4be5e9b4a8738730a15bb190555">dap_process_memory_t</a> get_proc_mem_current </td> + <td>(</td> + <td class="paramtype">void </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>get_proc_mem_current Get information about the amount of RAM consumed for the current process </p> +<dl class="section return"><dt>Returns</dt><dd></dd></dl> + +</div> +</div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dap__process__memory_8h_source.html b/libdap/docs/dap__process__memory_8h_source.html new file mode 100755 index 0000000000000000000000000000000000000000..38ebec4968340fdce44e060e62311b83e8d49484 --- /dev/null +++ b/libdap/docs/dap__process__memory_8h_source.html @@ -0,0 +1,106 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: core/unix/dap_process_memory.h Source File</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_4270bfced15e0e73154b13468c7c9ad9.html">core</a></li><li class="navelem"><a class="el" href="dir_cc9d4db7f92a2e77b53bedbbcfe214a0.html">unix</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">dap_process_memory.h</div> </div> +</div><!--header--> +<div class="contents"> +<a href="dap__process__memory_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#include <stdint.h></span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor">#include <sys/types.h></span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> </div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> </div><div class="line"><a name="l00005"></a><span class="lineno"><a class="line" href="structdap__process__memory.html"> 5</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structdap__process__memory.html">dap_process_memory</a> {</div><div class="line"><a name="l00006"></a><span class="lineno"><a class="line" href="structdap__process__memory.html#a60efb3269151a8f5c8b25a4ada69835f"> 6</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="structdap__process__memory.html#a60efb3269151a8f5c8b25a4ada69835f">vsz</a>; <span class="comment">// virtual memory (kb)</span></div><div class="line"><a name="l00007"></a><span class="lineno"><a class="line" href="structdap__process__memory.html#ae68f8b935eee6f3d06adc3379ced9329"> 7</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="structdap__process__memory.html#ae68f8b935eee6f3d06adc3379ced9329">rss</a>; <span class="comment">// physical memory (kb)</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> } <a class="code" href="dap__process__memory_8h.html#a9eb3c4be5e9b4a8738730a15bb190555">dap_process_memory_t</a>;</div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> </div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> </div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <a class="code" href="structdap__process__memory.html">dap_process_memory_t</a> <a class="code" href="dap__process__memory_8h.html#aca5c54866cc33715a7da93bfaed39a1d">get_proc_mem_current</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> </div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <a class="code" href="structdap__process__memory.html">dap_process_memory_t</a> <a class="code" href="dap__process__memory_8h.html#a30800f14d0a84a92a23429eac85a7f5d">get_proc_mem_by_pid</a>(pid_t pid);</div><div class="ttc" id="dap__process__memory_8h_html_a30800f14d0a84a92a23429eac85a7f5d"><div class="ttname"><a href="dap__process__memory_8h.html#a30800f14d0a84a92a23429eac85a7f5d">get_proc_mem_by_pid</a></div><div class="ttdeci">dap_process_memory_t get_proc_mem_by_pid(pid_t pid)</div><div class="ttdoc">get_proc_mem_by_pid Obtain information about the amount of RAM consumed for a particular process ...</div><div class="ttdef"><b>Definition:</b> dap_process_memory.c:59</div></div> +<div class="ttc" id="structdap__process__memory_html"><div class="ttname"><a href="structdap__process__memory.html">dap_process_memory</a></div><div class="ttdef"><b>Definition:</b> dap_process_memory.h:5</div></div> +<div class="ttc" id="structdap__process__memory_html_a60efb3269151a8f5c8b25a4ada69835f"><div class="ttname"><a href="structdap__process__memory.html#a60efb3269151a8f5c8b25a4ada69835f">dap_process_memory::vsz</a></div><div class="ttdeci">size_t vsz</div><div class="ttdef"><b>Definition:</b> dap_process_memory.h:6</div></div> +<div class="ttc" id="dap__process__memory_8h_html_aca5c54866cc33715a7da93bfaed39a1d"><div class="ttname"><a href="dap__process__memory_8h.html#aca5c54866cc33715a7da93bfaed39a1d">get_proc_mem_current</a></div><div class="ttdeci">dap_process_memory_t get_proc_mem_current(void)</div><div class="ttdoc">get_proc_mem_current Get information about the amount of RAM consumed for the current process ...</div><div class="ttdef"><b>Definition:</b> dap_process_memory.c:54</div></div> +<div class="ttc" id="dap__process__memory_8h_html_a9eb3c4be5e9b4a8738730a15bb190555"><div class="ttname"><a href="dap__process__memory_8h.html#a9eb3c4be5e9b4a8738730a15bb190555">dap_process_memory_t</a></div><div class="ttdeci">struct dap_process_memory dap_process_memory_t</div></div> +<div class="ttc" id="structdap__process__memory_html_ae68f8b935eee6f3d06adc3379ced9329"><div class="ttname"><a href="structdap__process__memory.html#ae68f8b935eee6f3d06adc3379ced9329">dap_process_memory::rss</a></div><div class="ttdeci">size_t rss</div><div class="ttdef"><b>Definition:</b> dap_process_memory.h:7</div></div> +</div><!-- fragment --></div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dir_4270bfced15e0e73154b13468c7c9ad9.html b/libdap/docs/dir_4270bfced15e0e73154b13468c7c9ad9.html new file mode 100755 index 0000000000000000000000000000000000000000..fa59c2c5bfd1b89f2a68487b8fe8752e4f218e12 --- /dev/null +++ b/libdap/docs/dir_4270bfced15e0e73154b13468c7c9ad9.html @@ -0,0 +1,117 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: core Directory Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li class="current"><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_4270bfced15e0e73154b13468c7c9ad9.html">core</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">core Directory Reference</div> </div> +</div><!--header--> +<div class="contents"> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="subdirs"></a> +Directories</h2></td></tr> +<tr class="memitem:dir_cc9d4db7f92a2e77b53bedbbcfe214a0"><td class="memItemLeft" align="right" valign="top">directory  </td><td class="memItemRight" valign="bottom"><a class="el" href="dir_cc9d4db7f92a2e77b53bedbbcfe214a0.html">unix</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a> +Files</h2></td></tr> +<tr class="memitem:dap__common_8c"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8c.html">dap_common.c</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:dap__common_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__common_8h.html">dap_common.h</a> <a href="dap__common_8h_source.html">[code]</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:dap__config_8c"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8c.html">dap_config.c</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:dap__config_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__config_8h.html">dap_config.h</a> <a href="dap__config_8h_source.html">[code]</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dir_53403d93963d3f5d2fcffd0698f5bddb.html b/libdap/docs/dir_53403d93963d3f5d2fcffd0698f5bddb.html new file mode 100755 index 0000000000000000000000000000000000000000..c5a4638434dafa3cdfe8770de3029171fc6ad429 --- /dev/null +++ b/libdap/docs/dir_53403d93963d3f5d2fcffd0698f5bddb.html @@ -0,0 +1,108 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: crypto Directory Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li class="current"><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_53403d93963d3f5d2fcffd0698f5bddb.html">crypto</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">crypto Directory Reference</div> </div> +</div><!--header--> +<div class="contents"> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a> +Files</h2></td></tr> +<tr class="memitem:dap__enc__base64_8c"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8c.html">dap_enc_base64.c</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:dap__enc__base64_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__enc__base64_8h.html">dap_enc_base64.h</a> <a href="dap__enc__base64_8h_source.html">[code]</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/dir_cc9d4db7f92a2e77b53bedbbcfe214a0.html b/libdap/docs/dir_cc9d4db7f92a2e77b53bedbbcfe214a0.html new file mode 100755 index 0000000000000000000000000000000000000000..1071f2662d9df2d4e48a3cb550746bc34b81c4d3 --- /dev/null +++ b/libdap/docs/dir_cc9d4db7f92a2e77b53bedbbcfe214a0.html @@ -0,0 +1,116 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: core/unix Directory Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li class="current"><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_4270bfced15e0e73154b13468c7c9ad9.html">core</a></li><li class="navelem"><a class="el" href="dir_cc9d4db7f92a2e77b53bedbbcfe214a0.html">unix</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">unix Directory Reference</div> </div> +</div><!--header--> +<div class="contents"> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a> +Files</h2></td></tr> +<tr class="memitem:dap__cpu__monitor_8c"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8c.html">dap_cpu_monitor.c</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:dap__cpu__monitor_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__cpu__monitor_8h.html">dap_cpu_monitor.h</a> <a href="dap__cpu__monitor_8h_source.html">[code]</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:dap__process__manager_8c"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__manager_8c.html">dap_process_manager.c</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:dap__process__manager_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__manager_8h.html">dap_process_manager.h</a> <a href="dap__process__manager_8h_source.html">[code]</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:dap__process__memory_8c"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__memory_8c.html">dap_process_memory.c</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:dap__process__memory_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="dap__process__memory_8h.html">dap_process_memory.h</a> <a href="dap__process__memory_8h_source.html">[code]</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/doc.png b/libdap/docs/doc.png new file mode 100755 index 0000000000000000000000000000000000000000..17edabff95f7b8da13c9516a04efe05493c29501 Binary files /dev/null and b/libdap/docs/doc.png differ diff --git a/libdap/docs/doxygen.css b/libdap/docs/doxygen.css new file mode 100755 index 0000000000000000000000000000000000000000..1425ec530d3181ed8c9651987cfa9ae72df9b339 --- /dev/null +++ b/libdap/docs/doxygen.css @@ -0,0 +1,1475 @@ +/* The standard CSS for doxygen 1.8.11 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 4px 6px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +div.ah, span.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: bold; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + border-top-left-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #9CAFD4; + border-bottom: 1px solid #9CAFD4; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +.arrow { + color: #9CAFD4; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #728DC1; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + margin-left: 0px; + padding-left: 0px; +} + +dl.note +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00D000; +} + +dl.deprecated +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #505050; +} + +dl.todo +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00C0E0; +} + +dl.test +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #3030E0; +} + +dl.bug +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + diff --git a/libdap/docs/doxygen.png b/libdap/docs/doxygen.png new file mode 100755 index 0000000000000000000000000000000000000000..3ff17d807fd8aa003bed8bb2a69e8f0909592fd1 Binary files /dev/null and b/libdap/docs/doxygen.png differ diff --git a/libdap/docs/dynsections.js b/libdap/docs/dynsections.js new file mode 100755 index 0000000000000000000000000000000000000000..85e183690954af49931335b87a063b2c078d4546 --- /dev/null +++ b/libdap/docs/dynsections.js @@ -0,0 +1,97 @@ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} + +function toggleLevel(level) +{ + $('table.directory tr').each(function() { + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l<level+1) { + i.removeClass('iconfopen iconfclosed').addClass('iconfopen'); + a.html('▼'); + $(this).show(); + } else if (l==level+1) { + i.removeClass('iconfclosed iconfopen').addClass('iconfclosed'); + a.html('►'); + $(this).show(); + } else { + $(this).hide(); + } + }); + updateStripes(); +} + +function toggleFolder(id) +{ + // the clicked row + var currentRow = $('#row_'+id); + + // all rows after the clicked row + var rows = currentRow.nextAll("tr"); + + var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub + + // only match elements AFTER this one (can't hide elements before) + var childRows = rows.filter(function() { return this.id.match(re); }); + + // first row is visible we are HIDING + if (childRows.filter(':first').is(':visible')===true) { + // replace down arrow by right arrow for current row + var currentRowSpans = currentRow.find("span"); + currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed"); + currentRowSpans.filter(".arrow").html('►'); + rows.filter("[id^=row_"+id+"]").hide(); // hide all children + } else { // we are SHOWING + // replace right arrow by down arrow for current row + var currentRowSpans = currentRow.find("span"); + currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen"); + currentRowSpans.filter(".arrow").html('▼'); + // replace down arrows by right arrows for child rows + var childRowsSpans = childRows.find("span"); + childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed"); + childRowsSpans.filter(".arrow").html('►'); + childRows.show(); //show all children + } + updateStripes(); +} + + +function toggleInherit(id) +{ + var rows = $('tr.inherit.'+id); + var img = $('tr.inherit_header.'+id+' img'); + var src = $(img).attr('src'); + if (rows.filter(':first').is(':visible')===true) { + rows.css('display','none'); + $(img).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + rows.css('display','table-row'); // using show() causes jump in firefox + $(img).attr('src',src.substring(0,src.length-10)+'open.png'); + } +} + diff --git a/libdap/docs/files.html b/libdap/docs/files.html new file mode 100755 index 0000000000000000000000000000000000000000..17bb177497d9ebd13f8f74c667bcb7910c844d48 --- /dev/null +++ b/libdap/docs/files.html @@ -0,0 +1,115 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: File List</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li class="current"><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +</div><!-- top --> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div class="header"> + <div class="headertitle"> +<div class="title">File List</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock">Here is a list of all files with brief descriptions:</div><div class="directory"> +<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span><span onclick="javascript:toggleLevel(3);">3</span>]</div><table class="directory"> +<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">▼</span><span id="img_0_" class="iconfopen" onclick="toggleFolder('0_')"> </span><a class="el" href="dir_4270bfced15e0e73154b13468c7c9ad9.html" target="_self">core</a></td><td class="desc"></td></tr> +<tr id="row_0_0_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span id="arr_0_0_" class="arrow" onclick="toggleFolder('0_0_')">▼</span><span id="img_0_0_" class="iconfopen" onclick="toggleFolder('0_0_')"> </span><a class="el" href="dir_cc9d4db7f92a2e77b53bedbbcfe214a0.html" target="_self">unix</a></td><td class="desc"></td></tr> +<tr id="row_0_0_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="dap__cpu__monitor_8c.html" target="_self">dap_cpu_monitor.c</a></td><td class="desc"></td></tr> +<tr id="row_0_0_1_"><td class="entry"><span style="width:48px;display:inline-block;"> </span><a href="dap__cpu__monitor_8h_source.html"><span class="icondoc"></span></a><a class="el" href="dap__cpu__monitor_8h.html" target="_self">dap_cpu_monitor.h</a></td><td class="desc"></td></tr> +<tr id="row_0_0_2_" class="even"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="dap__process__manager_8c.html" target="_self">dap_process_manager.c</a></td><td class="desc"></td></tr> +<tr id="row_0_0_3_"><td class="entry"><span style="width:48px;display:inline-block;"> </span><a href="dap__process__manager_8h_source.html"><span class="icondoc"></span></a><a class="el" href="dap__process__manager_8h.html" target="_self">dap_process_manager.h</a></td><td class="desc"></td></tr> +<tr id="row_0_0_4_" class="even"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="dap__process__memory_8c.html" target="_self">dap_process_memory.c</a></td><td class="desc"></td></tr> +<tr id="row_0_0_5_"><td class="entry"><span style="width:48px;display:inline-block;"> </span><a href="dap__process__memory_8h_source.html"><span class="icondoc"></span></a><a class="el" href="dap__process__memory_8h.html" target="_self">dap_process_memory.h</a></td><td class="desc"></td></tr> +<tr id="row_0_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="dap__common_8c.html" target="_self">dap_common.c</a></td><td class="desc"></td></tr> +<tr id="row_0_2_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="dap__common_8h_source.html"><span class="icondoc"></span></a><a class="el" href="dap__common_8h.html" target="_self">dap_common.h</a></td><td class="desc"></td></tr> +<tr id="row_0_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="dap__config_8c.html" target="_self">dap_config.c</a></td><td class="desc"></td></tr> +<tr id="row_0_4_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="dap__config_8h_source.html"><span class="icondoc"></span></a><a class="el" href="dap__config_8h.html" target="_self">dap_config.h</a></td><td class="desc"></td></tr> +<tr id="row_1_" class="even"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_1_" class="arrow" onclick="toggleFolder('1_')">▼</span><span id="img_1_" class="iconfopen" onclick="toggleFolder('1_')"> </span><a class="el" href="dir_53403d93963d3f5d2fcffd0698f5bddb.html" target="_self">crypto</a></td><td class="desc"></td></tr> +<tr id="row_1_0_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="dap__enc__base64_8c.html" target="_self">dap_enc_base64.c</a></td><td class="desc"></td></tr> +<tr id="row_1_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="dap__enc__base64_8h_source.html"><span class="icondoc"></span></a><a class="el" href="dap__enc__base64_8h.html" target="_self">dap_enc_base64.h</a></td><td class="desc"></td></tr> +</table> +</div><!-- directory --> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/folderclosed.png b/libdap/docs/folderclosed.png new file mode 100755 index 0000000000000000000000000000000000000000..bb8ab35edce8e97554e360005ee9fc5bffb36e66 Binary files /dev/null and b/libdap/docs/folderclosed.png differ diff --git a/libdap/docs/folderopen.png b/libdap/docs/folderopen.png new file mode 100755 index 0000000000000000000000000000000000000000..d6c7f676a3b3ef8c2c307d319dff3c6a604eb227 Binary files /dev/null and b/libdap/docs/folderopen.png differ diff --git a/libdap/docs/functions.html b/libdap/docs/functions.html new file mode 100755 index 0000000000000000000000000000000000000000..440cbf9605735ce2c62310df475baff136ffe7c4 --- /dev/null +++ b/libdap/docs/functions.html @@ -0,0 +1,278 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: Data Fields</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="classes.html"><span>Data Structure Index</span></a></li> + <li class="current"><a href="functions.html"><span>Data Fields</span></a></li> + </ul> + </div> + <div id="navrow3" class="tabs2"> + <ul class="tablist"> + <li class="current"><a href="functions.html"><span>All</span></a></li> + <li><a href="functions_vars.html"><span>Variables</span></a></li> + </ul> + </div> + <div id="navrow4" class="tabs3"> + <ul class="tablist"> + <li><a href="#index__"><span>_</span></a></li> + <li><a href="#index_a"><span>a</span></a></li> + <li><a href="#index_c"><span>c</span></a></li> + <li><a href="#index_d"><span>d</span></a></li> + <li><a href="#index_g"><span>g</span></a></li> + <li><a href="#index_h"><span>h</span></a></li> + <li><a href="#index_i"><span>i</span></a></li> + <li><a href="#index_l"><span>l</span></a></li> + <li><a href="#index_n"><span>n</span></a></li> + <li><a href="#index_r"><span>r</span></a></li> + <li><a href="#index_s"><span>s</span></a></li> + <li><a href="#index_t"><span>t</span></a></li> + <li><a href="#index_u"><span>u</span></a></li> + <li class="current"><a href="#index_v"><span>v</span></a></li> + </ul> + </div> +</div><!-- top --> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div class="contents"> +<div class="textblock">Here is a list of all struct and union fields with links to the structures/unions they belong to:</div> + +<h3><a class="anchor" id="index__"></a>- _ -</h3><ul> +<li>_internal +: <a class="el" href="structdap__config.html#a1fddb1b8266f833975a1843cc0a97f89">dap_config</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_a"></a>- a -</h3><ul> +<li>array_length +: <a class="el" href="structdap__config__item.html#a1356be094234835635d452d5c2275e51">dap_config_item</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_c"></a>- c -</h3><ul> +<li>childs +: <a class="el" href="structdap__config__item.html#a0d5f05c91c5195732960516a5395e39a">dap_config_item</a> +</li> +<li>cpu +: <a class="el" href="structproc__stat__line.html#ae4a4c7a21577e98720547dc33a58f51c">proc_stat_line</a> +</li> +<li>cpu_cores_count +: <a class="el" href="structdap__cpu__stats.html#a2a4a244c6c716b5e25483ca67a69f7c9">dap_cpu_stats</a> +</li> +<li>cpu_summary +: <a class="el" href="structdap__cpu__stats.html#a173285c53062dc49c248d7048c944a6a">dap_cpu_stats</a> +</li> +<li>cpus +: <a class="el" href="structdap__cpu__stats.html#ad6e495ab156770ce147fe1f20bfe6562">dap_cpu_stats</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_d"></a>- d -</h3><ul> +<li>data_bool +: <a class="el" href="structdap__config__item.html#a968b000deb88effc230e70d0d9c66a92">dap_config_item</a> +</li> +<li>data_double +: <a class="el" href="structdap__config__item.html#ac6ac02cf0dd1be8351d88377d13a2334">dap_config_item</a> +</li> +<li>data_int32 +: <a class="el" href="structdap__config__item.html#a454d9855bc02ab4ea83ae024ea68a790">dap_config_item</a> +</li> +<li>data_str +: <a class="el" href="structdap__config__item.html#a58fbfb4c01c1129eefb20396925b4bc4">dap_config_item</a> +</li> +<li>data_str_array +: <a class="el" href="structdap__config__item.html#ac875bc711381a9cdd1422a41f8cc217d">dap_config_item</a> +</li> +<li>data_uint8 +: <a class="el" href="structdap__config__item.html#ae6bac770c57d935696cb93c6a7e60266">dap_config_item</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_g"></a>- g -</h3><ul> +<li>guest +: <a class="el" href="structproc__stat__line.html#aaf57de8eaf10ecf4cb98a95db8d15ab6">proc_stat_line</a> +</li> +<li>guest_nice +: <a class="el" href="structproc__stat__line.html#aa9149e2bf80b103cee1cd83748cdf34b">proc_stat_line</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_h"></a>- h -</h3><ul> +<li>hh +: <a class="el" href="structdap__config__item.html#ae4e3cf0c16788119e444b219bf958a80">dap_config_item</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_i"></a>- i -</h3><ul> +<li>idle +: <a class="el" href="structproc__stat__line.html#a5450aed4badc84f28992b5a171c6c24e">proc_stat_line</a> +</li> +<li>idle_time +: <a class="el" href="structdap__cpu.html#a8eb9a71e68def6d6087e5ae87b8b8ab1">dap_cpu</a> +</li> +<li>iowait +: <a class="el" href="structproc__stat__line.html#aa474930d802a9275d1688d87654962f8">proc_stat_line</a> +</li> +<li>irq +: <a class="el" href="structproc__stat__line.html#ac884edb2ab2b162a68fa30f22f0cbe34">proc_stat_line</a> +</li> +<li>is_array +: <a class="el" href="structdap__config__item.html#a4b63e29afcccdd4fcee6ef2476a7b94d">dap_config_item</a> +</li> +<li>item_next +: <a class="el" href="structdap__config__item.html#ad00ba78ddeec058fb3c32b115229f7ec">dap_config_item</a> +</li> +<li>item_root +: <a class="el" href="structdap__config__internal.html#a1b2f52e9224342c2db4875dac880bb91">dap_config_internal</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_l"></a>- l -</h3><ul> +<li>load +: <a class="el" href="structdap__cpu.html#a34954f614e249658e1fe9103c95333c6">dap_cpu</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_n"></a>- n -</h3><ul> +<li>name +: <a class="el" href="structdap__config__item.html#a569502aa96f12958efcaac38dc3864d7">dap_config_item</a> +</li> +<li>ncpu +: <a class="el" href="structdap__cpu.html#a1a555a9a00eddc0c10b401d601462441">dap_cpu</a> +</li> +<li>nice +: <a class="el" href="structproc__stat__line.html#a8e470a27c13e95e0332746511da0eefd">proc_stat_line</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_r"></a>- r -</h3><ul> +<li>rss +: <a class="el" href="structdap__process__memory.html#ae68f8b935eee6f3d06adc3379ced9329">dap_process_memory</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_s"></a>- s -</h3><ul> +<li>softirq +: <a class="el" href="structproc__stat__line.html#a2e0b270f69fe599a43bff21867e5ae03">proc_stat_line</a> +</li> +<li>steal +: <a class="el" href="structproc__stat__line.html#ae2167610040ce2a590e4aca9657301bf">proc_stat_line</a> +</li> +<li>system +: <a class="el" href="structproc__stat__line.html#afe925267a10c39272ca56786f9b4e819">proc_stat_line</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_t"></a>- t -</h3><ul> +<li>total +: <a class="el" href="structproc__stat__line.html#aaace759e4cb4ff95a881cbbdb4be8610">proc_stat_line</a> +</li> +<li>total_time +: <a class="el" href="structdap__cpu.html#a0c983a38d28e1a302edbbd7c7f0817ab">dap_cpu</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_u"></a>- u -</h3><ul> +<li>user +: <a class="el" href="structproc__stat__line.html#a402884026456bc19d3786dc06fb6c5fb">proc_stat_line</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_v"></a>- v -</h3><ul> +<li>vsz +: <a class="el" href="structdap__process__memory.html#a60efb3269151a8f5c8b25a4ada69835f">dap_process_memory</a> +</li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/functions_vars.html b/libdap/docs/functions_vars.html new file mode 100755 index 0000000000000000000000000000000000000000..d95a59a3035aa398ef90e9d4c48dc9066309ae27 --- /dev/null +++ b/libdap/docs/functions_vars.html @@ -0,0 +1,278 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: Data Fields - Variables</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="classes.html"><span>Data Structure Index</span></a></li> + <li class="current"><a href="functions.html"><span>Data Fields</span></a></li> + </ul> + </div> + <div id="navrow3" class="tabs2"> + <ul class="tablist"> + <li><a href="functions.html"><span>All</span></a></li> + <li class="current"><a href="functions_vars.html"><span>Variables</span></a></li> + </ul> + </div> + <div id="navrow4" class="tabs3"> + <ul class="tablist"> + <li><a href="#index__"><span>_</span></a></li> + <li><a href="#index_a"><span>a</span></a></li> + <li><a href="#index_c"><span>c</span></a></li> + <li><a href="#index_d"><span>d</span></a></li> + <li><a href="#index_g"><span>g</span></a></li> + <li><a href="#index_h"><span>h</span></a></li> + <li><a href="#index_i"><span>i</span></a></li> + <li><a href="#index_l"><span>l</span></a></li> + <li><a href="#index_n"><span>n</span></a></li> + <li><a href="#index_r"><span>r</span></a></li> + <li><a href="#index_s"><span>s</span></a></li> + <li><a href="#index_t"><span>t</span></a></li> + <li><a href="#index_u"><span>u</span></a></li> + <li class="current"><a href="#index_v"><span>v</span></a></li> + </ul> + </div> +</div><!-- top --> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div class="contents"> +  + +<h3><a class="anchor" id="index__"></a>- _ -</h3><ul> +<li>_internal +: <a class="el" href="structdap__config.html#a1fddb1b8266f833975a1843cc0a97f89">dap_config</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_a"></a>- a -</h3><ul> +<li>array_length +: <a class="el" href="structdap__config__item.html#a1356be094234835635d452d5c2275e51">dap_config_item</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_c"></a>- c -</h3><ul> +<li>childs +: <a class="el" href="structdap__config__item.html#a0d5f05c91c5195732960516a5395e39a">dap_config_item</a> +</li> +<li>cpu +: <a class="el" href="structproc__stat__line.html#ae4a4c7a21577e98720547dc33a58f51c">proc_stat_line</a> +</li> +<li>cpu_cores_count +: <a class="el" href="structdap__cpu__stats.html#a2a4a244c6c716b5e25483ca67a69f7c9">dap_cpu_stats</a> +</li> +<li>cpu_summary +: <a class="el" href="structdap__cpu__stats.html#a173285c53062dc49c248d7048c944a6a">dap_cpu_stats</a> +</li> +<li>cpus +: <a class="el" href="structdap__cpu__stats.html#ad6e495ab156770ce147fe1f20bfe6562">dap_cpu_stats</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_d"></a>- d -</h3><ul> +<li>data_bool +: <a class="el" href="structdap__config__item.html#a968b000deb88effc230e70d0d9c66a92">dap_config_item</a> +</li> +<li>data_double +: <a class="el" href="structdap__config__item.html#ac6ac02cf0dd1be8351d88377d13a2334">dap_config_item</a> +</li> +<li>data_int32 +: <a class="el" href="structdap__config__item.html#a454d9855bc02ab4ea83ae024ea68a790">dap_config_item</a> +</li> +<li>data_str +: <a class="el" href="structdap__config__item.html#a58fbfb4c01c1129eefb20396925b4bc4">dap_config_item</a> +</li> +<li>data_str_array +: <a class="el" href="structdap__config__item.html#ac875bc711381a9cdd1422a41f8cc217d">dap_config_item</a> +</li> +<li>data_uint8 +: <a class="el" href="structdap__config__item.html#ae6bac770c57d935696cb93c6a7e60266">dap_config_item</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_g"></a>- g -</h3><ul> +<li>guest +: <a class="el" href="structproc__stat__line.html#aaf57de8eaf10ecf4cb98a95db8d15ab6">proc_stat_line</a> +</li> +<li>guest_nice +: <a class="el" href="structproc__stat__line.html#aa9149e2bf80b103cee1cd83748cdf34b">proc_stat_line</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_h"></a>- h -</h3><ul> +<li>hh +: <a class="el" href="structdap__config__item.html#ae4e3cf0c16788119e444b219bf958a80">dap_config_item</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_i"></a>- i -</h3><ul> +<li>idle +: <a class="el" href="structproc__stat__line.html#a5450aed4badc84f28992b5a171c6c24e">proc_stat_line</a> +</li> +<li>idle_time +: <a class="el" href="structdap__cpu.html#a8eb9a71e68def6d6087e5ae87b8b8ab1">dap_cpu</a> +</li> +<li>iowait +: <a class="el" href="structproc__stat__line.html#aa474930d802a9275d1688d87654962f8">proc_stat_line</a> +</li> +<li>irq +: <a class="el" href="structproc__stat__line.html#ac884edb2ab2b162a68fa30f22f0cbe34">proc_stat_line</a> +</li> +<li>is_array +: <a class="el" href="structdap__config__item.html#a4b63e29afcccdd4fcee6ef2476a7b94d">dap_config_item</a> +</li> +<li>item_next +: <a class="el" href="structdap__config__item.html#ad00ba78ddeec058fb3c32b115229f7ec">dap_config_item</a> +</li> +<li>item_root +: <a class="el" href="structdap__config__internal.html#a1b2f52e9224342c2db4875dac880bb91">dap_config_internal</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_l"></a>- l -</h3><ul> +<li>load +: <a class="el" href="structdap__cpu.html#a34954f614e249658e1fe9103c95333c6">dap_cpu</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_n"></a>- n -</h3><ul> +<li>name +: <a class="el" href="structdap__config__item.html#a569502aa96f12958efcaac38dc3864d7">dap_config_item</a> +</li> +<li>ncpu +: <a class="el" href="structdap__cpu.html#a1a555a9a00eddc0c10b401d601462441">dap_cpu</a> +</li> +<li>nice +: <a class="el" href="structproc__stat__line.html#a8e470a27c13e95e0332746511da0eefd">proc_stat_line</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_r"></a>- r -</h3><ul> +<li>rss +: <a class="el" href="structdap__process__memory.html#ae68f8b935eee6f3d06adc3379ced9329">dap_process_memory</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_s"></a>- s -</h3><ul> +<li>softirq +: <a class="el" href="structproc__stat__line.html#a2e0b270f69fe599a43bff21867e5ae03">proc_stat_line</a> +</li> +<li>steal +: <a class="el" href="structproc__stat__line.html#ae2167610040ce2a590e4aca9657301bf">proc_stat_line</a> +</li> +<li>system +: <a class="el" href="structproc__stat__line.html#afe925267a10c39272ca56786f9b4e819">proc_stat_line</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_t"></a>- t -</h3><ul> +<li>total +: <a class="el" href="structproc__stat__line.html#aaace759e4cb4ff95a881cbbdb4be8610">proc_stat_line</a> +</li> +<li>total_time +: <a class="el" href="structdap__cpu.html#a0c983a38d28e1a302edbbd7c7f0817ab">dap_cpu</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_u"></a>- u -</h3><ul> +<li>user +: <a class="el" href="structproc__stat__line.html#a402884026456bc19d3786dc06fb6c5fb">proc_stat_line</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_v"></a>- v -</h3><ul> +<li>vsz +: <a class="el" href="structdap__process__memory.html#a60efb3269151a8f5c8b25a4ada69835f">dap_process_memory</a> +</li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/globals.html b/libdap/docs/globals.html new file mode 100755 index 0000000000000000000000000000000000000000..a95c27741eb197514d3468f29668366c134d5fe3 --- /dev/null +++ b/libdap/docs/globals.html @@ -0,0 +1,525 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: Globals</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li class="current"><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> + <div id="navrow3" class="tabs2"> + <ul class="tablist"> + <li class="current"><a href="globals.html"><span>All</span></a></li> + <li><a href="globals_func.html"><span>Functions</span></a></li> + <li><a href="globals_vars.html"><span>Variables</span></a></li> + <li><a href="globals_type.html"><span>Typedefs</span></a></li> + <li><a href="globals_enum.html"><span>Enumerations</span></a></li> + <li><a href="globals_eval.html"><span>Enumerator</span></a></li> + <li><a href="globals_defs.html"><span>Macros</span></a></li> + </ul> + </div> + <div id="navrow4" class="tabs3"> + <ul class="tablist"> + <li><a href="#index__"><span>_</span></a></li> + <li><a href="#index_b"><span>b</span></a></li> + <li><a href="#index_d"><span>d</span></a></li> + <li><a href="#index_e"><span>e</span></a></li> + <li><a href="#index_g"><span>g</span></a></li> + <li><a href="#index_i"><span>i</span></a></li> + <li><a href="#index_k"><span>k</span></a></li> + <li><a href="#index_l"><span>l</span></a></li> + <li><a href="#index_m"><span>m</span></a></li> + <li><a href="#index_p"><span>p</span></a></li> + <li><a href="#index_s"><span>s</span></a></li> + <li><a href="#index_t"><span>t</span></a></li> + <li class="current"><a href="#index_v"><span>v</span></a></li> + </ul> + </div> +</div><!-- top --> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div class="contents"> +<div class="textblock">Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:</div> + +<h3><a class="anchor" id="index__"></a>- _ -</h3><ul> +<li>_calculate_load() +: <a class="el" href="dap__cpu__monitor_8c.html#aa50e51d75d2dcdcbddb1cf40b1df2f3c">dap_cpu_monitor.c</a> +</li> +<li>_cpu_old_stats +: <a class="el" href="dap__cpu__monitor_8c.html#a01fc76df94fc3adf860bc4f7bbe23abb">dap_cpu_monitor.c</a> +</li> +<li>_cpu_stats +: <a class="el" href="dap__cpu__monitor_8c.html#a44d7b6d3df547ba454b836b65ec25611">dap_cpu_monitor.c</a> +</li> +<li>_cpu_summary_old +: <a class="el" href="dap__cpu__monitor_8c.html#a98ed3bdb3fed3d87f29f0bf84b51ba95">dap_cpu_monitor.c</a> +</li> +<li>_deserealize_proc_stat() +: <a class="el" href="dap__cpu__monitor_8c.html#a51b82e6ec3267ae57ef002e96e620151">dap_cpu_monitor.c</a> +</li> +<li>_get_process_memory() +: <a class="el" href="dap__process__memory_8c.html#abd2440928361cfe4eb3e1be0f3963a99">dap_process_memory.c</a> +</li> +<li>_log_it() +: <a class="el" href="dap__common_8h.html#acbe3239b788dc1105a094596354a7e42">dap_common.h</a> +, <a class="el" href="dap__common_8c.html#a56adb48b934d8b79d98f2be87d3a5df3">dap_common.c</a> +</li> +<li>_parse_size_line() +: <a class="el" href="dap__process__memory_8c.html#a12bc84267b098d654c3a5239f2db9421">dap_process_memory.c</a> +</li> +<li>_proc_stat +: <a class="el" href="dap__cpu__monitor_8c.html#a857f823e882aa77331ba7dfdd7d5d1ce">dap_cpu_monitor.c</a> +</li> +<li>_vlog_it() +: <a class="el" href="dap__common_8c.html#ac7f5cf32897e09c2eacfcf163787ccef">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#ab3ae03011f7dfbbf40dce01f7bdd4157">dap_common.h</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_b"></a>- b -</h3><ul> +<li>B64_Decode() +: <a class="el" href="dap__enc__base64_8c.html#a304d3393507ac334c690719e7b66ac23">dap_enc_base64.c</a> +</li> +<li>b64_decode() +: <a class="el" href="dap__enc__base64_8c.html#a9c3b4adc7a6fcdf700700d55b2c924ed">dap_enc_base64.c</a> +</li> +<li>b64_decode_ex() +: <a class="el" href="dap__enc__base64_8c.html#aea8b5297189d223a48f1886e692546e4">dap_enc_base64.c</a> +</li> +<li>B64_DecodeByte() +: <a class="el" href="dap__enc__base64_8c.html#ab0f10f3342a3055e4c98fb6bcec20c96">dap_enc_base64.c</a> +</li> +<li>b64_encode() +: <a class="el" href="dap__enc__base64_8c.html#a9a9b842a784b5202e1ab4eed1c156d00">dap_enc_base64.c</a> +</li> +<li>B64_Encode() +: <a class="el" href="dap__enc__base64_8c.html#af3bd7d29d6866e2c15040e710077bdf4">dap_enc_base64.c</a> +</li> +<li>B64_EncodeByte() +: <a class="el" href="dap__enc__base64_8c.html#a2ec720931ba76ef3cccc8e23b2e186f9">dap_enc_base64.c</a> +</li> +<li>B64_GetSize() +: <a class="el" href="dap__enc__base64_8c.html#aa785023e6318312a858628ac75c09cfc">dap_enc_base64.c</a> +</li> +<li>b64_malloc +: <a class="el" href="dap__enc__base64_8c.html#a221b9c9698df0aa156ee2a33072ff9b4">dap_enc_base64.c</a> +</li> +<li>b64_realloc +: <a class="el" href="dap__enc__base64_8c.html#a4750e31a6a2f09d3ef3e1962e25d8592">dap_enc_base64.c</a> +</li> +<li>b64_standart_table +: <a class="el" href="dap__enc__base64_8c.html#afb28b1f82335ab68b1a7e6dc582eefc7">dap_enc_base64.c</a> +</li> +<li>b64_table_by_standard() +: <a class="el" href="dap__enc__base64_8c.html#a7f71c6f222b5b8122b2240df6c9b3fa0">dap_enc_base64.c</a> +</li> +<li>b64_table_url_safe +: <a class="el" href="dap__enc__base64_8c.html#a9c8315f27143b78bd7dd570c8c4168a1">dap_enc_base64.c</a> +</li> +<li>break_latency +: <a class="el" href="dap__common_8c.html#af4baddcad4576299c1c44f1822c799fc">dap_common.c</a> +</li> +<li>breaker_set +: <a class="el" href="dap__common_8c.html#abd3c99eacca06234a6e4411a5ff0ae22">dap_common.c</a> +</li> +<li>byte +: <a class="el" href="dap__enc__base64_8c.html#a0c8186d9b9b7880309c27230bbb5e69d">dap_enc_base64.c</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_d"></a>- d -</h3><ul> +<li>daemonize_process() +: <a class="el" href="dap__process__manager_8c.html#abeda31c74acff5c32d5952efd3c534fc">dap_process_manager.c</a> +</li> +<li>dap_common_deinit() +: <a class="el" href="dap__common_8c.html#adf17f0c9b75afc0078ab0fc56c0eec98">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#ab96d7e843bc09468220a7d264295cf69">dap_common.h</a> +</li> +<li>dap_common_init() +: <a class="el" href="dap__common_8c.html#aff6dc9e558a255f56618643f5be92b08">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#aff6dc9e558a255f56618643f5be92b08">dap_common.h</a> +</li> +<li>dap_config_close() +: <a class="el" href="dap__config_8c.html#ac40f9a095d00df268967293c5ea3f9df">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#ac40f9a095d00df268967293c5ea3f9df">dap_config.h</a> +</li> +<li>dap_config_deinit() +: <a class="el" href="dap__config_8c.html#a009960bd1586e17ec29cc646a2a5939c">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#a009960bd1586e17ec29cc646a2a5939c">dap_config.h</a> +</li> +<li>dap_config_get_array_str() +: <a class="el" href="dap__config_8c.html#a1785c0169c29d415206b02e1c4e9adb8">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#a1785c0169c29d415206b02e1c4e9adb8">dap_config.h</a> +</li> +<li>dap_config_get_item() +: <a class="el" href="dap__config_8c.html#a5d825008b72bc795b56abc39957bbdd2">dap_config.c</a> +</li> +<li>dap_config_get_item_bool() +: <a class="el" href="dap__config_8c.html#a7e4ce808bc4be2312b4e051bc9210d45">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#a7e4ce808bc4be2312b4e051bc9210d45">dap_config.h</a> +</li> +<li>dap_config_get_item_bool_default() +: <a class="el" href="dap__config_8h.html#a4ce7c5465324c6f6e3c9d490d1fc4e1f">dap_config.h</a> +, <a class="el" href="dap__config_8c.html#a4ce7c5465324c6f6e3c9d490d1fc4e1f">dap_config.c</a> +</li> +<li>dap_config_get_item_double() +: <a class="el" href="dap__config_8c.html#ad19c0ac2fc89b73589b32754750dc0c2">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#ad19c0ac2fc89b73589b32754750dc0c2">dap_config.h</a> +</li> +<li>dap_config_get_item_int32() +: <a class="el" href="dap__config_8c.html#add7283ed9237378bb38f2bd8f891efa3">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#add7283ed9237378bb38f2bd8f891efa3">dap_config.h</a> +</li> +<li>dap_config_get_item_int32_default() +: <a class="el" href="dap__config_8c.html#a5965237dd87b494bbe2367e104c3b8f0">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#a5965237dd87b494bbe2367e104c3b8f0">dap_config.h</a> +</li> +<li>dap_config_get_item_str() +: <a class="el" href="dap__config_8c.html#affddb2eeef241ec37560794b2c90d0ec">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#affddb2eeef241ec37560794b2c90d0ec">dap_config.h</a> +</li> +<li>dap_config_get_item_str_default() +: <a class="el" href="dap__config_8c.html#ae341b2585e28b4b72ae91a00d86532d9">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#ae341b2585e28b4b72ae91a00d86532d9">dap_config.h</a> +</li> +<li>dap_config_init() +: <a class="el" href="dap__config_8c.html#a3843f4acdf67f2499f2437d69097cba1">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#a3843f4acdf67f2499f2437d69097cba1">dap_config.h</a> +</li> +<li>DAP_CONFIG_INTERNAL +: <a class="el" href="dap__config_8c.html#afd640ddb34b9b70d1bdde0498e135b28">dap_config.c</a> +</li> +<li>dap_config_internal_t +: <a class="el" href="dap__config_8c.html#a0d4df0d8066c51ebc87edddaca70c813">dap_config.c</a> +</li> +<li>dap_config_item_t +: <a class="el" href="dap__config_8c.html#a68fb401f4e3f45764f501c080845750d">dap_config.c</a> +</li> +<li>dap_config_open() +: <a class="el" href="dap__config_8c.html#a67254031cc34dcf6f7635f35d3dd22d1">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#a67254031cc34dcf6f7635f35d3dd22d1">dap_config.h</a> +</li> +<li>dap_config_t +: <a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config.h</a> +</li> +<li>dap_cpu_get_stats() +: <a class="el" href="dap__cpu__monitor_8c.html#af97c8ce690c4a7e1a6d9177f76200862">dap_cpu_monitor.c</a> +, <a class="el" href="dap__cpu__monitor_8h.html#ac8909ba058fd37e5465b7c64e9b3681e">dap_cpu_monitor.h</a> +</li> +<li>dap_cpu_monitor_deinit() +: <a class="el" href="dap__cpu__monitor_8c.html#ac18ced28d70e9117fae3759db759e2fb">dap_cpu_monitor.c</a> +, <a class="el" href="dap__cpu__monitor_8h.html#a8644f85c62710685c7c5c3624e4aadc8">dap_cpu_monitor.h</a> +</li> +<li>dap_cpu_monitor_init() +: <a class="el" href="dap__cpu__monitor_8h.html#a74565d8e36cf559a22aefa4a070a4e52">dap_cpu_monitor.h</a> +, <a class="el" href="dap__cpu__monitor_8c.html#a41c2f779847e3d67124dfde1fe0640b7">dap_cpu_monitor.c</a> +</li> +<li>dap_cpu_stats_t +: <a class="el" href="dap__cpu__monitor_8h.html#a71734313dfad90003700e30dbbd5dbe4">dap_cpu_monitor.h</a> +</li> +<li>dap_cpu_t +: <a class="el" href="dap__cpu__monitor_8h.html#a07c777b976f756102607b683d5969c7d">dap_cpu_monitor.h</a> +</li> +<li>DAP_DELETE +: <a class="el" href="dap__common_8h.html#abc94d3603906f97d0ce7368f44eebf8b">dap_common.h</a> +</li> +<li>DAP_DUP +: <a class="el" href="dap__common_8h.html#a7303c16a9766b284e07bd6790d65b59e">dap_common.h</a> +</li> +<li>dap_enc_b64_standard +: <a class="el" href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7">dap_enc_base64.h</a> +</li> +<li>dap_enc_b64_standard_t +: <a class="el" href="dap__enc__base64_8h.html#ae47fdbc3967e395dac8f30599961f45d">dap_enc_base64.h</a> +</li> +<li>dap_enc_base64_decode() +: <a class="el" href="dap__enc__base64_8c.html#a09bda17a1fce52c2d9740ad9852fbb98">dap_enc_base64.c</a> +, <a class="el" href="dap__enc__base64_8h.html#a09bda17a1fce52c2d9740ad9852fbb98">dap_enc_base64.h</a> +</li> +<li>dap_enc_base64_encode() +: <a class="el" href="dap__enc__base64_8h.html#ad164a1a38bbeab9485bd283c185fe557">dap_enc_base64.h</a> +, <a class="el" href="dap__enc__base64_8c.html#a542e3fd8a5dd6116cb1e6bd48361a5cc">dap_enc_base64.c</a> +</li> +<li>DAP_ENC_BASE64_ENCODE_SIZE +: <a class="el" href="dap__enc__base64_8h.html#a441f115386986f22872acd70d7d04736">dap_enc_base64.h</a> +</li> +<li>DAP_ENC_STANDARD_B64 +: <a class="el" href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7a684c2e012891c1ffc99a50250aa9e03b">dap_enc_base64.h</a> +</li> +<li>DAP_ENC_STANDARD_B64_URLSAFE +: <a class="el" href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7a14e31e001657e974079cd81873eadf32">dap_enc_base64.h</a> +</li> +<li>DAP_NEW +: <a class="el" href="dap__common_8h.html#a74a9d9e85c7cc12c155f147d9a971cad">dap_common.h</a> +</li> +<li>DAP_NEW_SIZE +: <a class="el" href="dap__common_8h.html#a80373ba28489011c16cd76f6d0ba5b53">dap_common.h</a> +</li> +<li>DAP_NEW_Z +: <a class="el" href="dap__common_8h.html#a9270d1341aa00be475591ecfa8985c08">dap_common.h</a> +</li> +<li>DAP_NEW_Z_SIZE +: <a class="el" href="dap__common_8h.html#ad0f1f3c74154c73a5dfd33598dfd375b">dap_common.h</a> +</li> +<li>dap_process_memory_t +: <a class="el" href="dap__process__memory_8h.html#a9eb3c4be5e9b4a8738730a15bb190555">dap_process_memory.h</a> +</li> +<li>DAP_PROTOCOL_VERSION +: <a class="el" href="dap__common_8h.html#a9757f0cc77df1fd0759b1b91a9f63ff0">dap_common.h</a> +</li> +<li>dap_random_string_create_alloc() +: <a class="el" href="dap__common_8h.html#aabbc0306fee1c3a56540b1604bbb516c">dap_common.h</a> +, <a class="el" href="dap__common_8c.html#aabbc0306fee1c3a56540b1604bbb516c">dap_common.c</a> +</li> +<li>dap_random_string_fill() +: <a class="el" href="dap__common_8c.html#a3fa34950395c0139c5c95510de7119a8">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#a3fa34950395c0139c5c95510de7119a8">dap_common.h</a> +</li> +<li>dap_set_log_tag_width() +: <a class="el" href="dap__common_8h.html#ac8d0df7015664c720b27ee4f6e660479">dap_common.h</a> +, <a class="el" href="dap__common_8c.html#ac8d0df7015664c720b27ee4f6e660479">dap_common.c</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_e"></a>- e -</h3><ul> +<li>exec_with_ret() +: <a class="el" href="dap__common_8c.html#a00992fd7732b0ff40ce020728f84bc3a">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#a00992fd7732b0ff40ce020728f84bc3a">dap_common.h</a> +</li> +<li>exec_with_ret_multistring() +: <a class="el" href="dap__common_8c.html#aa4a4c13332f14e44630f5e269048249a">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#aa4a4c13332f14e44630f5e269048249a">dap_common.h</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_g"></a>- g -</h3><ul> +<li>get_array_length() +: <a class="el" href="dap__config_8c.html#af8c517b0bd6ca2b9ab2e3fbf2dbdf707">dap_config.c</a> +</li> +<li>get_pid_from_file() +: <a class="el" href="dap__process__manager_8c.html#a3d03c30d6144592382149beaef1019b9">dap_process_manager.c</a> +</li> +<li>get_proc_mem_by_pid() +: <a class="el" href="dap__process__memory_8h.html#a30800f14d0a84a92a23429eac85a7f5d">dap_process_memory.h</a> +, <a class="el" href="dap__process__memory_8c.html#a30800f14d0a84a92a23429eac85a7f5d">dap_process_memory.c</a> +</li> +<li>get_proc_mem_current() +: <a class="el" href="dap__process__memory_8c.html#aca5c54866cc33715a7da93bfaed39a1d">dap_process_memory.c</a> +, <a class="el" href="dap__process__memory_8h.html#aca5c54866cc33715a7da93bfaed39a1d">dap_process_memory.h</a> +</li> +<li>get_select_breaker() +: <a class="el" href="dap__common_8h.html#ab027eeb728bcf25f75bc592fc627e4fe">dap_common.h</a> +, <a class="el" href="dap__common_8c.html#a770a25cd7afda213e944f715a27f1e7c">dap_common.c</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_i"></a>- i -</h3><ul> +<li>initialized +: <a class="el" href="dap__common_8c.html#ad06983e7f6e71b233ea7ff3dee1952f2">dap_common.c</a> +</li> +<li>INT_DIGITS +: <a class="el" href="dap__common_8c.html#a6b293a3f1ddf0b2dd42c5ed279e245ca">dap_common.c</a> +</li> +<li>is_process_running() +: <a class="el" href="dap__process__manager_8c.html#a2e370751950e83a2c633a69dfe026e07">dap_process_manager.c</a> +</li> +<li>itoa() +: <a class="el" href="dap__common_8c.html#a9c7174a7bbe81eedbd86ded2e247eee7">dap_common.c</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_k"></a>- k -</h3><ul> +<li>kill_process() +: <a class="el" href="dap__process__manager_8c.html#a61978d909d8e1abda89ced3f1cfd38c3">dap_process_manager.c</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_l"></a>- l -</h3><ul> +<li>L_CRITICAL +: <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748ead95cd234638314479dea217167c37e4a">dap_common.h</a> +</li> +<li>L_DEBUG +: <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748eabef96148470abb1ed19980e5b5c40ad4">dap_common.h</a> +</li> +<li>L_ERROR +: <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748ea5aa6d01f59e4b628af96f650fc5ecc15">dap_common.h</a> +</li> +<li>L_INFO +: <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748eae580867d0ddde34905fea2f8669839b7">dap_common.h</a> +</li> +<li>L_NOTICE +: <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748eac0e398e95a19b2d3e23eb0620e91a515">dap_common.h</a> +</li> +<li>l_possible_chars +: <a class="el" href="dap__common_8c.html#a38aacebea4dcb4a58907594acf07d45f">dap_common.c</a> +</li> +<li>L_WARNING +: <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748ea83e54d43eb3fd145052377ecd43932a1">dap_common.h</a> +</li> +<li>last_error +: <a class="el" href="dap__common_8c.html#ad817aedf213484c84d15adbe5f785333">dap_common.c</a> +</li> +<li>LAST_ERROR_MAX +: <a class="el" href="dap__common_8c.html#aaa5fc6c48a65650511f1b50caa1c6672">dap_common.c</a> +</li> +<li>log_error() +: <a class="el" href="dap__common_8c.html#a67850cb8c80403ee351125726b8c416b">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#aa76592df3b155b21f4d05cbd042db5f7">dap_common.h</a> +</li> +<li>log_it +: <a class="el" href="dap__common_8h.html#acd8f4f3ce595157ca36ce6b61ca4195e">dap_common.h</a> +</li> +<li>log_level +: <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">dap_common.h</a> +, <a class="el" href="dap__common_8c.html#ad2da3ac425bc17356fa089cd52c099bc">dap_common.c</a> +</li> +<li>LOG_TAG +: <a class="el" href="dap__process__manager_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">dap_process_manager.c</a> +, <a class="el" href="dap__process__memory_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">dap_process_memory.c</a> +, <a class="el" href="dap__common_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">dap_common.c</a> +, <a class="el" href="dap__cpu__monitor_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">dap_cpu_monitor.c</a> +, <a class="el" href="dap__config_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">dap_config.c</a> +</li> +<li>log_tag_fmt_str +: <a class="el" href="dap__common_8c.html#a27810c0f123878383572ea6e7ab714aa">dap_common.c</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_m"></a>- m -</h3><ul> +<li>MAX_CPU_COUNT +: <a class="el" href="dap__cpu__monitor_8h.html#add08506024a2c5399f9f9f6a797392ef">dap_cpu_monitor.h</a> +</li> +<li>MAX_LINE_LENGTH +: <a class="el" href="dap__process__memory_8c.html#af0f2173e3b202ddf5756531b4471dcb2">dap_process_memory.c</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_p"></a>- p -</h3><ul> +<li>proc_stat_line_t +: <a class="el" href="dap__cpu__monitor_8c.html#ab88a496964045c6ffffcc65683cdb871">dap_cpu_monitor.c</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_s"></a>- s -</h3><ul> +<li>s_configs_path +: <a class="el" href="dap__config_8c.html#aed6b1193ba38243186cfb5171c5db794">dap_config.c</a> +</li> +<li>s_log_file +: <a class="el" href="dap__common_8c.html#a50021147b626e80a4756b326379832e9">dap_common.c</a> +</li> +<li>save_process_pid_in_file() +: <a class="el" href="dap__process__manager_8c.html#a0183612dbd7f0b918e8e39979c9760a0">dap_process_manager.c</a> +</li> +<li>send_select_break() +: <a class="el" href="dap__common_8h.html#aa3c5a3515672b9ecc8d114af678cb0a4">dap_common.h</a> +, <a class="el" href="dap__common_8c.html#a2e61ddaeeeb7e2ec14e002e7af8fadf6">dap_common.c</a> +</li> +<li>set_log_level() +: <a class="el" href="dap__common_8c.html#a98de0fce0a8fb5c3b0cfe80bebe8f691">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#a98de0fce0a8fb5c3b0cfe80bebe8f691">dap_common.h</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_t"></a>- t -</h3><ul> +<li>time_to_rfc822() +: <a class="el" href="dap__common_8c.html#a6ab10606e8ac33dd93a0526933b192c8">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#a6ab10606e8ac33dd93a0526933b192c8">dap_common.h</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_v"></a>- v -</h3><ul> +<li>vlog_it +: <a class="el" href="dap__common_8h.html#ab53061ef6723b1e4a233022ef9f33c76">dap_common.h</a> +</li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/globals_defs.html b/libdap/docs/globals_defs.html new file mode 100755 index 0000000000000000000000000000000000000000..a69d064837e30650ddf501aaeb7faa6fa015f590 --- /dev/null +++ b/libdap/docs/globals_defs.html @@ -0,0 +1,163 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: Globals</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li class="current"><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> + <div id="navrow3" class="tabs2"> + <ul class="tablist"> + <li><a href="globals.html"><span>All</span></a></li> + <li><a href="globals_func.html"><span>Functions</span></a></li> + <li><a href="globals_vars.html"><span>Variables</span></a></li> + <li><a href="globals_type.html"><span>Typedefs</span></a></li> + <li><a href="globals_enum.html"><span>Enumerations</span></a></li> + <li><a href="globals_eval.html"><span>Enumerator</span></a></li> + <li class="current"><a href="globals_defs.html"><span>Macros</span></a></li> + </ul> + </div> +</div><!-- top --> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div class="contents"> + <ul> +<li>b64_malloc +: <a class="el" href="dap__enc__base64_8c.html#a221b9c9698df0aa156ee2a33072ff9b4">dap_enc_base64.c</a> +</li> +<li>b64_realloc +: <a class="el" href="dap__enc__base64_8c.html#a4750e31a6a2f09d3ef3e1962e25d8592">dap_enc_base64.c</a> +</li> +<li>DAP_CONFIG_INTERNAL +: <a class="el" href="dap__config_8c.html#afd640ddb34b9b70d1bdde0498e135b28">dap_config.c</a> +</li> +<li>DAP_DELETE +: <a class="el" href="dap__common_8h.html#abc94d3603906f97d0ce7368f44eebf8b">dap_common.h</a> +</li> +<li>DAP_DUP +: <a class="el" href="dap__common_8h.html#a7303c16a9766b284e07bd6790d65b59e">dap_common.h</a> +</li> +<li>DAP_ENC_BASE64_ENCODE_SIZE +: <a class="el" href="dap__enc__base64_8h.html#a441f115386986f22872acd70d7d04736">dap_enc_base64.h</a> +</li> +<li>DAP_NEW +: <a class="el" href="dap__common_8h.html#a74a9d9e85c7cc12c155f147d9a971cad">dap_common.h</a> +</li> +<li>DAP_NEW_SIZE +: <a class="el" href="dap__common_8h.html#a80373ba28489011c16cd76f6d0ba5b53">dap_common.h</a> +</li> +<li>DAP_NEW_Z +: <a class="el" href="dap__common_8h.html#a9270d1341aa00be475591ecfa8985c08">dap_common.h</a> +</li> +<li>DAP_NEW_Z_SIZE +: <a class="el" href="dap__common_8h.html#ad0f1f3c74154c73a5dfd33598dfd375b">dap_common.h</a> +</li> +<li>DAP_PROTOCOL_VERSION +: <a class="el" href="dap__common_8h.html#a9757f0cc77df1fd0759b1b91a9f63ff0">dap_common.h</a> +</li> +<li>INT_DIGITS +: <a class="el" href="dap__common_8c.html#a6b293a3f1ddf0b2dd42c5ed279e245ca">dap_common.c</a> +</li> +<li>LAST_ERROR_MAX +: <a class="el" href="dap__common_8c.html#aaa5fc6c48a65650511f1b50caa1c6672">dap_common.c</a> +</li> +<li>log_it +: <a class="el" href="dap__common_8h.html#acd8f4f3ce595157ca36ce6b61ca4195e">dap_common.h</a> +</li> +<li>LOG_TAG +: <a class="el" href="dap__config_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">dap_config.c</a> +, <a class="el" href="dap__common_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">dap_common.c</a> +, <a class="el" href="dap__cpu__monitor_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">dap_cpu_monitor.c</a> +, <a class="el" href="dap__process__manager_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">dap_process_manager.c</a> +, <a class="el" href="dap__process__memory_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6">dap_process_memory.c</a> +</li> +<li>MAX_CPU_COUNT +: <a class="el" href="dap__cpu__monitor_8h.html#add08506024a2c5399f9f9f6a797392ef">dap_cpu_monitor.h</a> +</li> +<li>MAX_LINE_LENGTH +: <a class="el" href="dap__process__memory_8c.html#af0f2173e3b202ddf5756531b4471dcb2">dap_process_memory.c</a> +</li> +<li>vlog_it +: <a class="el" href="dap__common_8h.html#ab53061ef6723b1e4a233022ef9f33c76">dap_common.h</a> +</li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/globals_enum.html b/libdap/docs/globals_enum.html new file mode 100755 index 0000000000000000000000000000000000000000..6391cc71b2ec42738eb6f3320cce9630f9b2612a --- /dev/null +++ b/libdap/docs/globals_enum.html @@ -0,0 +1,111 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: Globals</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li class="current"><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> + <div id="navrow3" class="tabs2"> + <ul class="tablist"> + <li><a href="globals.html"><span>All</span></a></li> + <li><a href="globals_func.html"><span>Functions</span></a></li> + <li><a href="globals_vars.html"><span>Variables</span></a></li> + <li><a href="globals_type.html"><span>Typedefs</span></a></li> + <li class="current"><a href="globals_enum.html"><span>Enumerations</span></a></li> + <li><a href="globals_eval.html"><span>Enumerator</span></a></li> + <li><a href="globals_defs.html"><span>Macros</span></a></li> + </ul> + </div> +</div><!-- top --> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div class="contents"> + <ul> +<li>dap_enc_b64_standard +: <a class="el" href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7">dap_enc_base64.h</a> +</li> +<li>log_level +: <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748e">dap_common.h</a> +</li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/globals_eval.html b/libdap/docs/globals_eval.html new file mode 100755 index 0000000000000000000000000000000000000000..f308680e6f7e761b679a790b799a6fa9c812775b --- /dev/null +++ b/libdap/docs/globals_eval.html @@ -0,0 +1,129 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: Globals</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li class="current"><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> + <div id="navrow3" class="tabs2"> + <ul class="tablist"> + <li><a href="globals.html"><span>All</span></a></li> + <li><a href="globals_func.html"><span>Functions</span></a></li> + <li><a href="globals_vars.html"><span>Variables</span></a></li> + <li><a href="globals_type.html"><span>Typedefs</span></a></li> + <li><a href="globals_enum.html"><span>Enumerations</span></a></li> + <li class="current"><a href="globals_eval.html"><span>Enumerator</span></a></li> + <li><a href="globals_defs.html"><span>Macros</span></a></li> + </ul> + </div> +</div><!-- top --> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div class="contents"> + <ul> +<li>DAP_ENC_STANDARD_B64 +: <a class="el" href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7a684c2e012891c1ffc99a50250aa9e03b">dap_enc_base64.h</a> +</li> +<li>DAP_ENC_STANDARD_B64_URLSAFE +: <a class="el" href="dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7a14e31e001657e974079cd81873eadf32">dap_enc_base64.h</a> +</li> +<li>L_CRITICAL +: <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748ead95cd234638314479dea217167c37e4a">dap_common.h</a> +</li> +<li>L_DEBUG +: <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748eabef96148470abb1ed19980e5b5c40ad4">dap_common.h</a> +</li> +<li>L_ERROR +: <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748ea5aa6d01f59e4b628af96f650fc5ecc15">dap_common.h</a> +</li> +<li>L_INFO +: <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748eae580867d0ddde34905fea2f8669839b7">dap_common.h</a> +</li> +<li>L_NOTICE +: <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748eac0e398e95a19b2d3e23eb0620e91a515">dap_common.h</a> +</li> +<li>L_WARNING +: <a class="el" href="dap__common_8h.html#ac91d55174d383848b976a34de843748ea83e54d43eb3fd145052377ecd43932a1">dap_common.h</a> +</li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/globals_func.html b/libdap/docs/globals_func.html new file mode 100755 index 0000000000000000000000000000000000000000..962a6d6846037b10a4f1c6be3f5ff852d6c1a826 --- /dev/null +++ b/libdap/docs/globals_func.html @@ -0,0 +1,352 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: Globals</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li class="current"><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> + <div id="navrow3" class="tabs2"> + <ul class="tablist"> + <li><a href="globals.html"><span>All</span></a></li> + <li class="current"><a href="globals_func.html"><span>Functions</span></a></li> + <li><a href="globals_vars.html"><span>Variables</span></a></li> + <li><a href="globals_type.html"><span>Typedefs</span></a></li> + <li><a href="globals_enum.html"><span>Enumerations</span></a></li> + <li><a href="globals_eval.html"><span>Enumerator</span></a></li> + <li><a href="globals_defs.html"><span>Macros</span></a></li> + </ul> + </div> + <div id="navrow4" class="tabs3"> + <ul class="tablist"> + <li><a href="#index__"><span>_</span></a></li> + <li><a href="#index_b"><span>b</span></a></li> + <li><a href="#index_d"><span>d</span></a></li> + <li><a href="#index_e"><span>e</span></a></li> + <li><a href="#index_g"><span>g</span></a></li> + <li><a href="#index_i"><span>i</span></a></li> + <li><a href="#index_k"><span>k</span></a></li> + <li><a href="#index_l"><span>l</span></a></li> + <li><a href="#index_s"><span>s</span></a></li> + <li class="current"><a href="#index_t"><span>t</span></a></li> + </ul> + </div> +</div><!-- top --> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div class="contents"> +  + +<h3><a class="anchor" id="index__"></a>- _ -</h3><ul> +<li>_calculate_load() +: <a class="el" href="dap__cpu__monitor_8c.html#aa50e51d75d2dcdcbddb1cf40b1df2f3c">dap_cpu_monitor.c</a> +</li> +<li>_deserealize_proc_stat() +: <a class="el" href="dap__cpu__monitor_8c.html#a51b82e6ec3267ae57ef002e96e620151">dap_cpu_monitor.c</a> +</li> +<li>_get_process_memory() +: <a class="el" href="dap__process__memory_8c.html#abd2440928361cfe4eb3e1be0f3963a99">dap_process_memory.c</a> +</li> +<li>_log_it() +: <a class="el" href="dap__common_8c.html#a56adb48b934d8b79d98f2be87d3a5df3">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#acbe3239b788dc1105a094596354a7e42">dap_common.h</a> +</li> +<li>_parse_size_line() +: <a class="el" href="dap__process__memory_8c.html#a12bc84267b098d654c3a5239f2db9421">dap_process_memory.c</a> +</li> +<li>_vlog_it() +: <a class="el" href="dap__common_8c.html#ac7f5cf32897e09c2eacfcf163787ccef">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#ab3ae03011f7dfbbf40dce01f7bdd4157">dap_common.h</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_b"></a>- b -</h3><ul> +<li>B64_Decode() +: <a class="el" href="dap__enc__base64_8c.html#a304d3393507ac334c690719e7b66ac23">dap_enc_base64.c</a> +</li> +<li>b64_decode() +: <a class="el" href="dap__enc__base64_8c.html#a9c3b4adc7a6fcdf700700d55b2c924ed">dap_enc_base64.c</a> +</li> +<li>b64_decode_ex() +: <a class="el" href="dap__enc__base64_8c.html#aea8b5297189d223a48f1886e692546e4">dap_enc_base64.c</a> +</li> +<li>B64_DecodeByte() +: <a class="el" href="dap__enc__base64_8c.html#ab0f10f3342a3055e4c98fb6bcec20c96">dap_enc_base64.c</a> +</li> +<li>b64_encode() +: <a class="el" href="dap__enc__base64_8c.html#a9a9b842a784b5202e1ab4eed1c156d00">dap_enc_base64.c</a> +</li> +<li>B64_Encode() +: <a class="el" href="dap__enc__base64_8c.html#af3bd7d29d6866e2c15040e710077bdf4">dap_enc_base64.c</a> +</li> +<li>B64_EncodeByte() +: <a class="el" href="dap__enc__base64_8c.html#a2ec720931ba76ef3cccc8e23b2e186f9">dap_enc_base64.c</a> +</li> +<li>B64_GetSize() +: <a class="el" href="dap__enc__base64_8c.html#aa785023e6318312a858628ac75c09cfc">dap_enc_base64.c</a> +</li> +<li>b64_table_by_standard() +: <a class="el" href="dap__enc__base64_8c.html#a7f71c6f222b5b8122b2240df6c9b3fa0">dap_enc_base64.c</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_d"></a>- d -</h3><ul> +<li>daemonize_process() +: <a class="el" href="dap__process__manager_8c.html#abeda31c74acff5c32d5952efd3c534fc">dap_process_manager.c</a> +</li> +<li>dap_common_deinit() +: <a class="el" href="dap__common_8c.html#adf17f0c9b75afc0078ab0fc56c0eec98">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#ab96d7e843bc09468220a7d264295cf69">dap_common.h</a> +</li> +<li>dap_common_init() +: <a class="el" href="dap__common_8c.html#aff6dc9e558a255f56618643f5be92b08">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#aff6dc9e558a255f56618643f5be92b08">dap_common.h</a> +</li> +<li>dap_config_close() +: <a class="el" href="dap__config_8c.html#ac40f9a095d00df268967293c5ea3f9df">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#ac40f9a095d00df268967293c5ea3f9df">dap_config.h</a> +</li> +<li>dap_config_deinit() +: <a class="el" href="dap__config_8c.html#a009960bd1586e17ec29cc646a2a5939c">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#a009960bd1586e17ec29cc646a2a5939c">dap_config.h</a> +</li> +<li>dap_config_get_array_str() +: <a class="el" href="dap__config_8c.html#a1785c0169c29d415206b02e1c4e9adb8">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#a1785c0169c29d415206b02e1c4e9adb8">dap_config.h</a> +</li> +<li>dap_config_get_item() +: <a class="el" href="dap__config_8c.html#a5d825008b72bc795b56abc39957bbdd2">dap_config.c</a> +</li> +<li>dap_config_get_item_bool() +: <a class="el" href="dap__config_8c.html#a7e4ce808bc4be2312b4e051bc9210d45">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#a7e4ce808bc4be2312b4e051bc9210d45">dap_config.h</a> +</li> +<li>dap_config_get_item_bool_default() +: <a class="el" href="dap__config_8c.html#a4ce7c5465324c6f6e3c9d490d1fc4e1f">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#a4ce7c5465324c6f6e3c9d490d1fc4e1f">dap_config.h</a> +</li> +<li>dap_config_get_item_double() +: <a class="el" href="dap__config_8c.html#ad19c0ac2fc89b73589b32754750dc0c2">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#ad19c0ac2fc89b73589b32754750dc0c2">dap_config.h</a> +</li> +<li>dap_config_get_item_int32() +: <a class="el" href="dap__config_8c.html#add7283ed9237378bb38f2bd8f891efa3">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#add7283ed9237378bb38f2bd8f891efa3">dap_config.h</a> +</li> +<li>dap_config_get_item_int32_default() +: <a class="el" href="dap__config_8c.html#a5965237dd87b494bbe2367e104c3b8f0">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#a5965237dd87b494bbe2367e104c3b8f0">dap_config.h</a> +</li> +<li>dap_config_get_item_str() +: <a class="el" href="dap__config_8c.html#affddb2eeef241ec37560794b2c90d0ec">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#affddb2eeef241ec37560794b2c90d0ec">dap_config.h</a> +</li> +<li>dap_config_get_item_str_default() +: <a class="el" href="dap__config_8c.html#ae341b2585e28b4b72ae91a00d86532d9">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#ae341b2585e28b4b72ae91a00d86532d9">dap_config.h</a> +</li> +<li>dap_config_init() +: <a class="el" href="dap__config_8c.html#a3843f4acdf67f2499f2437d69097cba1">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#a3843f4acdf67f2499f2437d69097cba1">dap_config.h</a> +</li> +<li>dap_config_open() +: <a class="el" href="dap__config_8c.html#a67254031cc34dcf6f7635f35d3dd22d1">dap_config.c</a> +, <a class="el" href="dap__config_8h.html#a67254031cc34dcf6f7635f35d3dd22d1">dap_config.h</a> +</li> +<li>dap_cpu_get_stats() +: <a class="el" href="dap__cpu__monitor_8c.html#af97c8ce690c4a7e1a6d9177f76200862">dap_cpu_monitor.c</a> +, <a class="el" href="dap__cpu__monitor_8h.html#ac8909ba058fd37e5465b7c64e9b3681e">dap_cpu_monitor.h</a> +</li> +<li>dap_cpu_monitor_deinit() +: <a class="el" href="dap__cpu__monitor_8c.html#ac18ced28d70e9117fae3759db759e2fb">dap_cpu_monitor.c</a> +, <a class="el" href="dap__cpu__monitor_8h.html#a8644f85c62710685c7c5c3624e4aadc8">dap_cpu_monitor.h</a> +</li> +<li>dap_cpu_monitor_init() +: <a class="el" href="dap__cpu__monitor_8c.html#a41c2f779847e3d67124dfde1fe0640b7">dap_cpu_monitor.c</a> +, <a class="el" href="dap__cpu__monitor_8h.html#a74565d8e36cf559a22aefa4a070a4e52">dap_cpu_monitor.h</a> +</li> +<li>dap_enc_base64_decode() +: <a class="el" href="dap__enc__base64_8c.html#a09bda17a1fce52c2d9740ad9852fbb98">dap_enc_base64.c</a> +, <a class="el" href="dap__enc__base64_8h.html#a09bda17a1fce52c2d9740ad9852fbb98">dap_enc_base64.h</a> +</li> +<li>dap_enc_base64_encode() +: <a class="el" href="dap__enc__base64_8c.html#a542e3fd8a5dd6116cb1e6bd48361a5cc">dap_enc_base64.c</a> +, <a class="el" href="dap__enc__base64_8h.html#ad164a1a38bbeab9485bd283c185fe557">dap_enc_base64.h</a> +</li> +<li>dap_random_string_create_alloc() +: <a class="el" href="dap__common_8c.html#aabbc0306fee1c3a56540b1604bbb516c">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#aabbc0306fee1c3a56540b1604bbb516c">dap_common.h</a> +</li> +<li>dap_random_string_fill() +: <a class="el" href="dap__common_8c.html#a3fa34950395c0139c5c95510de7119a8">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#a3fa34950395c0139c5c95510de7119a8">dap_common.h</a> +</li> +<li>dap_set_log_tag_width() +: <a class="el" href="dap__common_8c.html#ac8d0df7015664c720b27ee4f6e660479">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#ac8d0df7015664c720b27ee4f6e660479">dap_common.h</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_e"></a>- e -</h3><ul> +<li>exec_with_ret() +: <a class="el" href="dap__common_8c.html#a00992fd7732b0ff40ce020728f84bc3a">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#a00992fd7732b0ff40ce020728f84bc3a">dap_common.h</a> +</li> +<li>exec_with_ret_multistring() +: <a class="el" href="dap__common_8c.html#aa4a4c13332f14e44630f5e269048249a">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#aa4a4c13332f14e44630f5e269048249a">dap_common.h</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_g"></a>- g -</h3><ul> +<li>get_array_length() +: <a class="el" href="dap__config_8c.html#af8c517b0bd6ca2b9ab2e3fbf2dbdf707">dap_config.c</a> +</li> +<li>get_pid_from_file() +: <a class="el" href="dap__process__manager_8c.html#a3d03c30d6144592382149beaef1019b9">dap_process_manager.c</a> +</li> +<li>get_proc_mem_by_pid() +: <a class="el" href="dap__process__memory_8c.html#a30800f14d0a84a92a23429eac85a7f5d">dap_process_memory.c</a> +, <a class="el" href="dap__process__memory_8h.html#a30800f14d0a84a92a23429eac85a7f5d">dap_process_memory.h</a> +</li> +<li>get_proc_mem_current() +: <a class="el" href="dap__process__memory_8c.html#aca5c54866cc33715a7da93bfaed39a1d">dap_process_memory.c</a> +, <a class="el" href="dap__process__memory_8h.html#aca5c54866cc33715a7da93bfaed39a1d">dap_process_memory.h</a> +</li> +<li>get_select_breaker() +: <a class="el" href="dap__common_8c.html#a770a25cd7afda213e944f715a27f1e7c">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#ab027eeb728bcf25f75bc592fc627e4fe">dap_common.h</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_i"></a>- i -</h3><ul> +<li>is_process_running() +: <a class="el" href="dap__process__manager_8c.html#a2e370751950e83a2c633a69dfe026e07">dap_process_manager.c</a> +</li> +<li>itoa() +: <a class="el" href="dap__common_8c.html#a9c7174a7bbe81eedbd86ded2e247eee7">dap_common.c</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_k"></a>- k -</h3><ul> +<li>kill_process() +: <a class="el" href="dap__process__manager_8c.html#a61978d909d8e1abda89ced3f1cfd38c3">dap_process_manager.c</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_l"></a>- l -</h3><ul> +<li>log_error() +: <a class="el" href="dap__common_8c.html#a67850cb8c80403ee351125726b8c416b">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#aa76592df3b155b21f4d05cbd042db5f7">dap_common.h</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_s"></a>- s -</h3><ul> +<li>save_process_pid_in_file() +: <a class="el" href="dap__process__manager_8c.html#a0183612dbd7f0b918e8e39979c9760a0">dap_process_manager.c</a> +</li> +<li>send_select_break() +: <a class="el" href="dap__common_8c.html#a2e61ddaeeeb7e2ec14e002e7af8fadf6">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#aa3c5a3515672b9ecc8d114af678cb0a4">dap_common.h</a> +</li> +<li>set_log_level() +: <a class="el" href="dap__common_8c.html#a98de0fce0a8fb5c3b0cfe80bebe8f691">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#a98de0fce0a8fb5c3b0cfe80bebe8f691">dap_common.h</a> +</li> +</ul> + + +<h3><a class="anchor" id="index_t"></a>- t -</h3><ul> +<li>time_to_rfc822() +: <a class="el" href="dap__common_8c.html#a6ab10606e8ac33dd93a0526933b192c8">dap_common.c</a> +, <a class="el" href="dap__common_8h.html#a6ab10606e8ac33dd93a0526933b192c8">dap_common.h</a> +</li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/globals_type.html b/libdap/docs/globals_type.html new file mode 100755 index 0000000000000000000000000000000000000000..1c8930b8e209361d04bd7eb04c9bc415097d0e55 --- /dev/null +++ b/libdap/docs/globals_type.html @@ -0,0 +1,132 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: Globals</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li class="current"><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> + <div id="navrow3" class="tabs2"> + <ul class="tablist"> + <li><a href="globals.html"><span>All</span></a></li> + <li><a href="globals_func.html"><span>Functions</span></a></li> + <li><a href="globals_vars.html"><span>Variables</span></a></li> + <li class="current"><a href="globals_type.html"><span>Typedefs</span></a></li> + <li><a href="globals_enum.html"><span>Enumerations</span></a></li> + <li><a href="globals_eval.html"><span>Enumerator</span></a></li> + <li><a href="globals_defs.html"><span>Macros</span></a></li> + </ul> + </div> +</div><!-- top --> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div class="contents"> + <ul> +<li>byte +: <a class="el" href="dap__enc__base64_8c.html#a0c8186d9b9b7880309c27230bbb5e69d">dap_enc_base64.c</a> +</li> +<li>dap_config_internal_t +: <a class="el" href="dap__config_8c.html#a0d4df0d8066c51ebc87edddaca70c813">dap_config.c</a> +</li> +<li>dap_config_item_t +: <a class="el" href="dap__config_8c.html#a68fb401f4e3f45764f501c080845750d">dap_config.c</a> +</li> +<li>dap_config_t +: <a class="el" href="dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701">dap_config.h</a> +</li> +<li>dap_cpu_stats_t +: <a class="el" href="dap__cpu__monitor_8h.html#a71734313dfad90003700e30dbbd5dbe4">dap_cpu_monitor.h</a> +</li> +<li>dap_cpu_t +: <a class="el" href="dap__cpu__monitor_8h.html#a07c777b976f756102607b683d5969c7d">dap_cpu_monitor.h</a> +</li> +<li>dap_enc_b64_standard_t +: <a class="el" href="dap__enc__base64_8h.html#ae47fdbc3967e395dac8f30599961f45d">dap_enc_base64.h</a> +</li> +<li>dap_process_memory_t +: <a class="el" href="dap__process__memory_8h.html#a9eb3c4be5e9b4a8738730a15bb190555">dap_process_memory.h</a> +</li> +<li>proc_stat_line_t +: <a class="el" href="dap__cpu__monitor_8c.html#ab88a496964045c6ffffcc65683cdb871">dap_cpu_monitor.c</a> +</li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/globals_vars.html b/libdap/docs/globals_vars.html new file mode 100755 index 0000000000000000000000000000000000000000..419da8e9fe89c77cd4cc32dfc484273db649190f --- /dev/null +++ b/libdap/docs/globals_vars.html @@ -0,0 +1,150 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: Globals</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li class="current"><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> + <div id="navrow3" class="tabs2"> + <ul class="tablist"> + <li><a href="globals.html"><span>All</span></a></li> + <li><a href="globals_func.html"><span>Functions</span></a></li> + <li class="current"><a href="globals_vars.html"><span>Variables</span></a></li> + <li><a href="globals_type.html"><span>Typedefs</span></a></li> + <li><a href="globals_enum.html"><span>Enumerations</span></a></li> + <li><a href="globals_eval.html"><span>Enumerator</span></a></li> + <li><a href="globals_defs.html"><span>Macros</span></a></li> + </ul> + </div> +</div><!-- top --> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div class="contents"> + <ul> +<li>_cpu_old_stats +: <a class="el" href="dap__cpu__monitor_8c.html#a01fc76df94fc3adf860bc4f7bbe23abb">dap_cpu_monitor.c</a> +</li> +<li>_cpu_stats +: <a class="el" href="dap__cpu__monitor_8c.html#a44d7b6d3df547ba454b836b65ec25611">dap_cpu_monitor.c</a> +</li> +<li>_cpu_summary_old +: <a class="el" href="dap__cpu__monitor_8c.html#a98ed3bdb3fed3d87f29f0bf84b51ba95">dap_cpu_monitor.c</a> +</li> +<li>_proc_stat +: <a class="el" href="dap__cpu__monitor_8c.html#a857f823e882aa77331ba7dfdd7d5d1ce">dap_cpu_monitor.c</a> +</li> +<li>b64_standart_table +: <a class="el" href="dap__enc__base64_8c.html#afb28b1f82335ab68b1a7e6dc582eefc7">dap_enc_base64.c</a> +</li> +<li>b64_table_url_safe +: <a class="el" href="dap__enc__base64_8c.html#a9c8315f27143b78bd7dd570c8c4168a1">dap_enc_base64.c</a> +</li> +<li>break_latency +: <a class="el" href="dap__common_8c.html#af4baddcad4576299c1c44f1822c799fc">dap_common.c</a> +</li> +<li>breaker_set +: <a class="el" href="dap__common_8c.html#abd3c99eacca06234a6e4411a5ff0ae22">dap_common.c</a> +</li> +<li>initialized +: <a class="el" href="dap__common_8c.html#ad06983e7f6e71b233ea7ff3dee1952f2">dap_common.c</a> +</li> +<li>l_possible_chars +: <a class="el" href="dap__common_8c.html#a38aacebea4dcb4a58907594acf07d45f">dap_common.c</a> +</li> +<li>last_error +: <a class="el" href="dap__common_8c.html#ad817aedf213484c84d15adbe5f785333">dap_common.c</a> +</li> +<li>log_level +: <a class="el" href="dap__common_8c.html#ad2da3ac425bc17356fa089cd52c099bc">dap_common.c</a> +</li> +<li>log_tag_fmt_str +: <a class="el" href="dap__common_8c.html#a27810c0f123878383572ea6e7ab714aa">dap_common.c</a> +</li> +<li>s_configs_path +: <a class="el" href="dap__config_8c.html#aed6b1193ba38243186cfb5171c5db794">dap_config.c</a> +</li> +<li>s_log_file +: <a class="el" href="dap__common_8c.html#a50021147b626e80a4756b326379832e9">dap_common.c</a> +</li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/index.html b/libdap/docs/index.html new file mode 100755 index 0000000000000000000000000000000000000000..9646b1b0c8bba4d690c947ece4b1344c325be754 --- /dev/null +++ b/libdap/docs/index.html @@ -0,0 +1,90 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: Main Page</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li class="current"><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> +</div><!-- top --> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div class="header"> + <div class="headertitle"> +<div class="title">LibDap Documentation</div> </div> +</div><!--header--> +<div class="contents"> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/jquery.js b/libdap/docs/jquery.js new file mode 100755 index 0000000000000000000000000000000000000000..d52a1c77576c892c82d021f68d54d55e34d0efbd --- /dev/null +++ b/libdap/docs/jquery.js @@ -0,0 +1,68 @@ +/* + * jQuery JavaScript Library v1.7.1 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Nov 21 21:11:03 2011 -0500 + */ +(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b4<b3;b4++){if((b9=arguments[b4])!=null){for(b2 in b9){b0=b5[b2];b1=b9[b2];if(b5===b1){continue}if(b8&&b1&&(bF.isPlainObject(b1)||(b6=bF.isArray(b1)))){if(b6){b6=false;b7=b0&&bF.isArray(b0)?b0:[]}else{b7=b0&&bF.isPlainObject(b0)?b0:{}}b5[b2]=bF.extend(b8,b7,b1)}else{if(b1!==L){b5[b2]=b1}}}}}return b5};bF.extend({noConflict:function(b0){if(bb.$===bF){bb.$=bH}if(b0&&bb.jQuery===bF){bb.jQuery=bU}return bF},isReady:false,readyWait:1,holdReady:function(b0){if(b0){bF.readyWait++}else{bF.ready(true)}},ready:function(b0){if((b0===true&&!--bF.readyWait)||(b0!==true&&!bF.isReady)){if(!av.body){return setTimeout(bF.ready,1)}bF.isReady=true;if(b0!==true&&--bF.readyWait>0){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b4<b5;){if(b6.apply(b3[b4++],b2)===false){break}}}}else{if(b0){for(b1 in b3){if(b6.call(b3[b1],b1,b3[b1])===false){break}}}else{for(;b4<b5;){if(b6.call(b3[b4],b4,b3[b4++])===false){break}}}}return b3},trim:bO?function(b0){return b0==null?"":bO.call(b0)}:function(b0){return b0==null?"":b0.toString().replace(bI,"").replace(bE,"")},makeArray:function(b3,b1){var b0=b1||[];if(b3!=null){var b2=bF.type(b3);if(b3.length==null||b2==="string"||b2==="function"||b2==="regexp"||bF.isWindow(b3)){bz.call(b0,b3)}else{bF.merge(b0,b3)}}return b0},inArray:function(b2,b3,b1){var b0;if(b3){if(bv){return bv.call(b3,b2,b1)}b0=b3.length;b1=b1?b1<0?Math.max(0,b0+b1):b1:0;for(;b1<b0;b1++){if(b1 in b3&&b3[b1]===b2){return b1}}}return -1},merge:function(b4,b2){var b3=b4.length,b1=0;if(typeof b2.length==="number"){for(var b0=b2.length;b1<b0;b1++){b4[b3++]=b2[b1]}}else{while(b2[b1]!==L){b4[b3++]=b2[b1++]}}b4.length=b3;return b4},grep:function(b1,b6,b0){var b2=[],b5;b0=!!b0;for(var b3=0,b4=b1.length;b3<b4;b3++){b5=!!b6(b1[b3],b3);if(b0!==b5){b2.push(b1[b3])}}return b2},map:function(b0,b7,b8){var b5,b6,b4=[],b2=0,b1=b0.length,b3=b0 instanceof bF||b1!==L&&typeof b1==="number"&&((b1>0&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b2<b1;b2++){b5=b7(b0[b2],b2,b8);if(b5!=null){b4[b4.length]=b5}}}else{for(b6 in b0){b5=b7(b0[b6],b6,b8);if(b5!=null){b4[b4.length]=b5}}}return b4.concat.apply([],b4)},guid:1,proxy:function(b4,b3){if(typeof b3==="string"){var b2=b4[b3];b3=b4;b4=b2}if(!bF.isFunction(b4)){return L}var b0=bK.call(arguments,2),b1=function(){return b4.apply(b3,b0.concat(bK.call(arguments)))};b1.guid=b4.guid=b4.guid||b1.guid||bF.guid++;return b1},access:function(b0,b8,b6,b2,b5,b7){var b1=b0.length;if(typeof b8==="object"){for(var b3 in b8){bF.access(b0,b3,b8[b3],b2,b5,b6)}return b0}if(b6!==L){b2=!b7&&b2&&bF.isFunction(b6);for(var b4=0;b4<b1;b4++){b5(b0[b4],b8,b2?b6.call(b0[b4],b4,b5(b0[b4],b8)):b6,b7)}return b0}return b1?b5(b0[0],b8):L},now:function(){return(new Date()).getTime()},uaMatch:function(b1){b1=b1.toLowerCase();var b0=by.exec(b1)||bR.exec(b1)||bQ.exec(b1)||b1.indexOf("compatible")<0&&bS.exec(b1)||[];return{browser:b0[1]||"",version:b0[2]||"0"}},sub:function(){function b0(b3,b4){return new b0.fn.init(b3,b4)}bF.extend(true,b0,this);b0.superclass=this;b0.fn=b0.prototype=this();b0.fn.constructor=b0;b0.sub=this.sub;b0.fn.init=function b2(b3,b4){if(b4&&b4 instanceof bF&&!(b4 instanceof b0)){b4=b0(b4)}return bF.fn.init.call(this,b3,b4,b1)};b0.fn.init.prototype=b0.fn;var b1=b0(av);return b0},browser:{}});bF.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(b1,b0){bx["[object "+b0+"]"]=b0.toLowerCase()});bV=bF.uaMatch(bX);if(bV.browser){bF.browser[bV.browser]=true;bF.browser.version=bV.version}if(bF.browser.webkit){bF.browser.safari=true}if(bM.test("\xA0")){bI=/^[\s\xA0]+/;bE=/[\s\xA0]+$/}bD=bF(av);if(av.addEventListener){e=function(){av.removeEventListener("DOMContentLoaded",e,false);bF.ready()}}else{if(av.attachEvent){e=function(){if(av.readyState==="complete"){av.detachEvent("onreadystatechange",e);bF.ready()}}}}function bw(){if(bF.isReady){return}try{av.documentElement.doScroll("left")}catch(b0){setTimeout(bw,1);return}bF.ready()}return bF})();var a2={};function X(e){var bv=a2[e]={},bw,bx;e=e.split(/\s+/);for(bw=0,bx=e.length;bw<bx;bw++){bv[e[bw]]=true}return bv}b.Callbacks=function(bw){bw=bw?(a2[bw]||X(bw)):{};var bB=[],bC=[],bx,by,bv,bz,bA,bE=function(bF){var bG,bJ,bI,bH,bK;for(bG=0,bJ=bF.length;bG<bJ;bG++){bI=bF[bG];bH=b.type(bI);if(bH==="array"){bE(bI)}else{if(bH==="function"){if(!bw.unique||!bD.has(bI)){bB.push(bI)}}}}},e=function(bG,bF){bF=bF||[];bx=!bw.memory||[bG,bF];by=true;bA=bv||0;bv=0;bz=bB.length;for(;bB&&bA<bz;bA++){if(bB[bA].apply(bG,bF)===false&&bw.stopOnFalse){bx=true;break}}by=false;if(bB){if(!bw.once){if(bC&&bC.length){bx=bC.shift();bD.fireWith(bx[0],bx[1])}}else{if(bx===true){bD.disable()}else{bB=[]}}}},bD={add:function(){if(bB){var bF=bB.length;bE(arguments);if(by){bz=bB.length}else{if(bx&&bx!==true){bv=bF;e(bx[0],bx[1])}}}return this},remove:function(){if(bB){var bF=arguments,bH=0,bI=bF.length;for(;bH<bI;bH++){for(var bG=0;bG<bB.length;bG++){if(bF[bH]===bB[bG]){if(by){if(bG<=bz){bz--;if(bG<=bA){bA--}}}bB.splice(bG--,1);if(bw.unique){break}}}}}return this},has:function(bG){if(bB){var bF=0,bH=bB.length;for(;bF<bH;bF++){if(bG===bB[bF]){return true}}}return false},empty:function(){bB=[];return this},disable:function(){bB=bC=bx=L;return this},disabled:function(){return !bB},lock:function(){bC=L;if(!bx||bx===true){bD.disable()}return this},locked:function(){return !bC},fireWith:function(bG,bF){if(bC){if(by){if(!bw.once){bC.push([bG,bF])}}else{if(!(bw.once&&bx)){e(bG,bF)}}}return this},fire:function(){bD.fireWith(this,arguments);return this},fired:function(){return !!bx}};return bD};var aJ=[].slice;b.extend({Deferred:function(by){var bx=b.Callbacks("once memory"),bw=b.Callbacks("once memory"),bv=b.Callbacks("memory"),e="pending",bA={resolve:bx,reject:bw,notify:bv},bC={done:bx.add,fail:bw.add,progress:bv.add,state:function(){return e},isResolved:bx.fired,isRejected:bw.fired,then:function(bE,bD,bF){bB.done(bE).fail(bD).progress(bF);return this},always:function(){bB.done.apply(bB,arguments).fail.apply(bB,arguments);return this},pipe:function(bF,bE,bD){return b.Deferred(function(bG){b.each({done:[bF,"resolve"],fail:[bE,"reject"],progress:[bD,"notify"]},function(bI,bL){var bH=bL[0],bK=bL[1],bJ;if(b.isFunction(bH)){bB[bI](function(){bJ=bH.apply(this,arguments);if(bJ&&b.isFunction(bJ.promise)){bJ.promise().then(bG.resolve,bG.reject,bG.notify)}else{bG[bK+"With"](this===bB?bG:this,[bJ])}})}else{bB[bI](bG[bK])}})}).promise()},promise:function(bE){if(bE==null){bE=bC}else{for(var bD in bC){bE[bD]=bC[bD]}}return bE}},bB=bC.promise({}),bz;for(bz in bA){bB[bz]=bA[bz].fire;bB[bz+"With"]=bA[bz].fireWith}bB.done(function(){e="resolved"},bw.disable,bv.lock).fail(function(){e="rejected"},bx.disable,bv.lock);if(by){by.call(bB,bB)}return bB},when:function(bA){var bx=aJ.call(arguments,0),bv=0,e=bx.length,bB=new Array(e),bw=e,by=e,bC=e<=1&&bA&&b.isFunction(bA.promise)?bA:b.Deferred(),bE=bC.promise();function bD(bF){return function(bG){bx[bF]=arguments.length>1?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv<e;bv++){if(bx[bv]&&bx[bv].promise&&b.isFunction(bx[bv].promise)){bx[bv].promise().then(bD(bv),bC.reject,bz(bv))}else{--bw}}if(!bw){bC.resolveWith(bC,bx)}}else{if(bC!==bA){bC.resolveWith(bC,e?[bA]:[])}}return bE}});b.support=(function(){var bJ,bI,bF,bG,bx,bE,bA,bD,bz,bK,bB,by,bw,bv=av.createElement("div"),bH=av.documentElement;bv.setAttribute("className","t");bv.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav></:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="<div "+e+"><div></div></div><table "+e+" cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="<div style='width:4px;'></div>";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA<bz;bA++){delete bB[bv[bA]]}if(!(by?S:b.isEmptyObject)(bB)){return}}}if(!by){delete e[bw].data;if(!S(e[bw])){return}}if(b.support.deleteExpando||!e.setInterval){delete e[bw]}else{e[bw]=null}if(bD){if(b.support.deleteExpando){delete bx[bC]}else{if(bx.removeAttribute){bx.removeAttribute(bC)}else{bx[bC]=null}}}},_data:function(bv,e,bw){return b.data(bv,e,bw,true)},acceptData:function(bv){if(bv.nodeName){var e=b.noData[bv.nodeName.toLowerCase()];if(e){return !(e===true||bv.getAttribute("classid")!==e)}}return true}});b.fn.extend({data:function(by,bA){var bB,e,bw,bz=null;if(typeof by==="undefined"){if(this.length){bz=b.data(this[0]);if(this[0].nodeType===1&&!b._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var bx=0,bv=e.length;bx<bv;bx++){bw=e[bx].name;if(bw.indexOf("data-")===0){bw=b.camelCase(bw.substring(5));a5(this[0],bw,bz[bw])}}b._data(this[0],"parsedAttrs",true)}}return bz}else{if(typeof by==="object"){return this.each(function(){b.data(this,by)})}}bB=by.split(".");bB[1]=bB[1]?"."+bB[1]:"";if(bA===L){bz=this.triggerHandler("getData"+bB[1]+"!",[bB[0]]);if(bz===L&&this.length){bz=b.data(this[0],by);bz=a5(this[0],by,bz)}return bz===L&&bB[1]?this.data(bB[0]):bz}else{return this.each(function(){var bC=b(this),bD=[bB[0],bA];bC.triggerHandler("setData"+bB[1]+"!",bD);b.data(this,by,bA);bC.triggerHandler("changeData"+bB[1]+"!",bD)})}},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function a5(bx,bw,by){if(by===L&&bx.nodeType===1){var bv="data-"+bw.replace(aA,"-$1").toLowerCase();by=bx.getAttribute(bv);if(typeof by==="string"){try{by=by==="true"?true:by==="false"?false:by==="null"?null:b.isNumeric(by)?parseFloat(by):aS.test(by)?b.parseJSON(by):by}catch(bz){}b.data(bx,bw,by)}else{by=L}}return by}function S(bv){for(var e in bv){if(e==="data"&&b.isEmptyObject(bv[e])){continue}if(e!=="toJSON"){return false}}return true}function bi(by,bx,bA){var bw=bx+"defer",bv=bx+"queue",e=bx+"mark",bz=b._data(by,bw);if(bz&&(bA==="queue"||!b._data(by,bv))&&(bA==="mark"||!b._data(by,e))){setTimeout(function(){if(!b._data(by,bv)&&!b._data(by,e)){b.removeData(by,bw,true);bz.fire()}},0)}}b.extend({_mark:function(bv,e){if(bv){e=(e||"fx")+"mark";b._data(bv,e,(b._data(bv,e)||0)+1)}},_unmark:function(by,bx,bv){if(by!==true){bv=bx;bx=by;by=false}if(bx){bv=bv||"fx";var e=bv+"mark",bw=by?0:((b._data(bx,e)||1)-1);if(bw){b._data(bx,e,bw)}else{b.removeData(bx,e,true);bi(bx,bv,"mark")}}},queue:function(bv,e,bx){var bw;if(bv){e=(e||"fx")+"queue";bw=b._data(bv,e);if(bx){if(!bw||b.isArray(bx)){bw=b._data(bv,e,b.makeArray(bx))}else{bw.push(bx)}}return bw||[]}},dequeue:function(by,bx){bx=bx||"fx";var bv=b.queue(by,bx),bw=bv.shift(),e={};if(bw==="inprogress"){bw=bv.shift()}if(bw){if(bx==="fx"){bv.unshift("inprogress")}b._data(by,bx+".run",e);bw.call(by,function(){b.dequeue(by,bx)},e)}if(!bv.length){b.removeData(by,bx+"queue "+bx+".run",true);bi(by,bx,"queue")}}});b.fn.extend({queue:function(e,bv){if(typeof e!=="string"){bv=e;e="fx"}if(bv===L){return b.queue(this[0],e)}return this.each(function(){var bw=b.queue(this,e,bv);if(e==="fx"&&bw[0]!=="inprogress"){b.dequeue(this,e)}})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(bv,e){bv=b.fx?b.fx.speeds[bv]||bv:bv;e=e||"fx";return this.queue(e,function(bx,bw){var by=setTimeout(bx,bv);bw.stop=function(){clearTimeout(by)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(bD,bw){if(typeof bD!=="string"){bw=bD;bD=L}bD=bD||"fx";var e=b.Deferred(),bv=this,by=bv.length,bB=1,bz=bD+"defer",bA=bD+"queue",bC=bD+"mark",bx;function bE(){if(!(--bB)){e.resolveWith(bv,[bv])}}while(by--){if((bx=b.data(bv[by],bz,L,true)||(b.data(bv[by],bA,L,true)||b.data(bv[by],bC,L,true))&&b.data(bv[by],bz,b.Callbacks("once memory"),true))){bB++;bx.add(bE)}}bE();return e.promise()}});var aP=/[\n\t\r]/g,af=/\s+/,aU=/\r/g,g=/^(?:button|input)$/i,D=/^(?:button|input|object|select|textarea)$/i,l=/^a(?:rea)?$/i,ao=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,F=b.support.getSetAttribute,be,aY,aF;b.fn.extend({attr:function(e,bv){return b.access(this,e,bv,true,b.attr)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,bv){return b.access(this,e,bv,true,b.prop)},removeProp:function(e){e=b.propFix[e]||e;return this.each(function(){try{this[e]=L;delete this[e]}catch(bv){}})},addClass:function(by){var bA,bw,bv,bx,bz,bB,e;if(b.isFunction(by)){return this.each(function(bC){b(this).addClass(by.call(this,bC,this.className))})}if(by&&typeof by==="string"){bA=by.split(af);for(bw=0,bv=this.length;bw<bv;bw++){bx=this[bw];if(bx.nodeType===1){if(!bx.className&&bA.length===1){bx.className=by}else{bz=" "+bx.className+" ";for(bB=0,e=bA.length;bB<e;bB++){if(!~bz.indexOf(" "+bA[bB]+" ")){bz+=bA[bB]+" "}}bx.className=b.trim(bz)}}}}return this},removeClass:function(bz){var bA,bw,bv,by,bx,bB,e;if(b.isFunction(bz)){return this.each(function(bC){b(this).removeClass(bz.call(this,bC,this.className))})}if((bz&&typeof bz==="string")||bz===L){bA=(bz||"").split(af);for(bw=0,bv=this.length;bw<bv;bw++){by=this[bw];if(by.nodeType===1&&by.className){if(bz){bx=(" "+by.className+" ").replace(aP," ");for(bB=0,e=bA.length;bB<e;bB++){bx=bx.replace(" "+bA[bB]+" "," ")}by.className=b.trim(bx)}else{by.className=""}}}}return this},toggleClass:function(bx,bv){var bw=typeof bx,e=typeof bv==="boolean";if(b.isFunction(bx)){return this.each(function(by){b(this).toggleClass(bx.call(this,by,this.className,bv),bv)})}return this.each(function(){if(bw==="string"){var bA,bz=0,by=b(this),bB=bv,bC=bx.split(af);while((bA=bC[bz++])){bB=e?bB:!by.hasClass(bA);by[bB?"addClass":"removeClass"](bA)}}else{if(bw==="undefined"||bw==="boolean"){if(this.className){b._data(this,"__className__",this.className)}this.className=this.className||bx===false?"":b._data(this,"__className__")||""}}})},hasClass:function(e){var bx=" "+e+" ",bw=0,bv=this.length;for(;bw<bv;bw++){if(this[bw].nodeType===1&&(" "+this[bw].className+" ").replace(aP," ").indexOf(bx)>-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv<bz;bv++){bx=bC[bv];if(bx.selected&&(b.support.optDisabled?!bx.disabled:bx.getAttribute("disabled")===null)&&(!bx.parentNode.disabled||!b.nodeName(bx.parentNode,"optgroup"))){bA=b(bx).val();if(bw){return bA}bB.push(bA)}}if(bw&&!bB.length&&bC.length){return b(bC[by]).val()}return bB},set:function(bv,bw){var e=b.makeArray(bw);b(bv).find("option").each(function(){this.selected=b.inArray(b(this).val(),e)>=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw<e;bw++){bv=bA[bw];if(bv){by=b.propFix[bv]||bv;b.attr(bx,bv,"");bx.removeAttribute(F?bv:by);if(ao.test(bv)&&by in bx){bx[by]=false}}}}},attrHooks:{type:{set:function(e,bv){if(g.test(e.nodeName)&&e.parentNode){b.error("type property can't be changed")}else{if(!b.support.radioValue&&bv==="radio"&&b.nodeName(e,"input")){var bw=e.value;e.setAttribute("type",bv);if(bw){e.value=bw}return bv}}}},value:{get:function(bv,e){if(be&&b.nodeName(bv,"button")){return be.get(bv,e)}return e in bv?bv.value:null},set:function(bv,bw,e){if(be&&b.nodeName(bv,"button")){return be.set(bv,bw,e)}bv.value=bw}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(bz,bx,bA){var bw,e,by,bv=bz.nodeType;if(!bz||bv===3||bv===8||bv===2){return}by=bv!==1||!b.isXMLDoc(bz);if(by){bx=b.propFix[bx]||bx;e=b.propHooks[bx]}if(bA!==L){if(e&&"set" in e&&(bw=e.set(bz,bA,bx))!==L){return bw}else{return(bz[bx]=bA)}}else{if(e&&"get" in e&&(bw=e.get(bz,bx))!==null){return bw}else{return bz[bx]}}},propHooks:{tabIndex:{get:function(bv){var e=bv.getAttributeNode("tabindex");return e&&e.specified?parseInt(e.value,10):D.test(bv.nodeName)||l.test(bv.nodeName)&&bv.href?0:L}}}});b.attrHooks.tabindex=b.propHooks.tabIndex;aY={get:function(bv,e){var bx,bw=b.prop(bv,e);return bw===true||typeof bw!=="boolean"&&(bx=bv.getAttributeNode(e))&&bx.nodeValue!==false?e.toLowerCase():L},set:function(bv,bx,e){var bw;if(bx===false){b.removeAttr(bv,e)}else{bw=b.propFix[e]||e;if(bw in bv){bv[bw]=true}bv.setAttribute(e,e.toLowerCase())}return e}};if(!F){aF={name:true,id:true};be=b.valHooks.button={get:function(bw,bv){var e;e=bw.getAttributeNode(bv);return e&&(aF[bv]?e.nodeValue!=="":e.specified)?e.nodeValue:L},set:function(bw,bx,bv){var e=bw.getAttributeNode(bv);if(!e){e=av.createAttribute(bv);bw.setAttributeNode(e)}return(e.nodeValue=bx+"")}};b.attrHooks.tabindex.set=be.set;b.each(["width","height"],function(bv,e){b.attrHooks[e]=b.extend(b.attrHooks[e],{set:function(bw,bx){if(bx===""){bw.setAttribute(e,"auto");return bx}}})});b.attrHooks.contenteditable={get:be.get,set:function(bv,bw,e){if(bw===""){bw="false"}be.set(bv,bw,e)}}}if(!b.support.hrefNormalized){b.each(["href","src","width","height"],function(bv,e){b.attrHooks[e]=b.extend(b.attrHooks[e],{get:function(bx){var bw=bx.getAttribute(e,2);return bw===null?L:bw}})})}if(!b.support.style){b.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||L},set:function(e,bv){return(e.style.cssText=""+bv)}}}if(!b.support.optSelected){b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(bv){var e=bv.parentNode;if(e){e.selectedIndex;if(e.parentNode){e.parentNode.selectedIndex}}return null}})}if(!b.support.enctype){b.propFix.enctype="encoding"}if(!b.support.checkOn){b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}})}b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,bv){if(b.isArray(bv)){return(e.checked=b.inArray(b(e).val(),bv)>=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI<bC.length;bI++){bH=n.exec(bC[bI])||[];bF=bH[1];e=(bH[2]||"").split(".").sort();bE=b.event.special[bF]||{};bF=(by?bE.delegateType:bE.bindType)||bF;bE=b.event.special[bF]||{};bG=b.extend({type:bF,origType:bH[1],data:bA,handler:bJ,guid:bJ.guid,selector:by,quick:Y(by),namespace:e.join(".")},bv);bw=bK[bF];if(!bw){bw=bK[bF]=[];bw.delegateCount=0;if(!bE.setup||bE.setup.call(bx,bA,e,bB)===false){if(bx.addEventListener){bx.addEventListener(bF,bB,false)}else{if(bx.attachEvent){bx.attachEvent("on"+bF,bB)}}}}if(bE.add){bE.add.call(bx,bG);if(!bG.handler.guid){bG.handler.guid=bJ.guid}}if(by){bw.splice(bw.delegateCount++,0,bG)}else{bw.push(bG)}b.event.global[bF]=true}bx=null},global:{},remove:function(bJ,bE,bv,bH,bB){var bI=b.hasData(bJ)&&b._data(bJ),bF,bx,bz,bL,bC,bA,bG,bw,by,bK,bD,e;if(!bI||!(bw=bI.events)){return}bE=b.trim(bt(bE||"")).split(" ");for(bF=0;bF<bE.length;bF++){bx=n.exec(bE[bF])||[];bz=bL=bx[1];bC=bx[2];if(!bz){for(bz in bw){b.event.remove(bJ,bz+bE[bF],bv,bH,true)}continue}by=b.event.special[bz]||{};bz=(bH?by.delegateType:by.bindType)||bz;bD=bw[bz]||[];bA=bD.length;bC=bC?new RegExp("(^|\\.)"+bC.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(bG=0;bG<bD.length;bG++){e=bD[bG];if((bB||bL===e.origType)&&(!bv||bv.guid===e.guid)&&(!bC||bC.test(e.namespace))&&(!bH||bH===e.selector||bH==="**"&&e.selector)){bD.splice(bG--,1);if(e.selector){bD.delegateCount--}if(by.remove){by.remove.call(bJ,e)}}}if(bD.length===0&&bA!==bD.length){if(!by.teardown||by.teardown.call(bJ,bC)===false){b.removeEvent(bJ,bz,bI.handle)}delete bw[bz]}}if(b.isEmptyObject(bw)){bK=bI.handle;if(bK){bK.elem=null}b.removeData(bJ,["events","handle"],true)}},customEvent:{getData:true,setData:true,changeData:true},trigger:function(bv,bD,bA,bJ){if(bA&&(bA.nodeType===3||bA.nodeType===8)){return}var bG=bv.type||bv,bx=[],e,bw,bC,bH,bz,by,bF,bE,bB,bI;if(T.test(bG+b.event.triggered)){return}if(bG.indexOf("!")>=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bC<bB.length&&!bv.isPropagationStopped();bC++){bH=bB[bC][0];bv.type=bB[bC][1];bE=(b._data(bH,"events")||{})[bv.type]&&b._data(bH,"handle");if(bE){bE.apply(bH,bD)}bE=by&&bH[by];if(bE&&b.acceptData(bH)&&bE.apply(bH,bD)===false){bv.preventDefault()}}bv.type=bG;if(!bJ&&!bv.isDefaultPrevented()){if((!bF._default||bF._default.apply(bA.ownerDocument,bD)===false)&&!(bG==="click"&&b.nodeName(bA,"a"))&&b.acceptData(bA)){if(by&&bA[bG]&&((bG!=="focus"&&bG!=="blur")||bv.target.offsetWidth!==0)&&!b.isWindow(bA)){bz=bA[by];if(bz){bA[by]=null}b.event.triggered=bG;bA[bG]();b.event.triggered=L;if(bz){bA[by]=bz}}}}return bv.result},dispatch:function(e){e=b.event.fix(e||bb.event);var bz=((b._data(this,"events")||{})[e.type]||[]),bA=bz.delegateCount,bG=[].slice.call(arguments,0),by=!e.exclusive&&!e.namespace,bH=[],bC,bB,bK,bx,bF,bE,bv,bD,bI,bw,bJ;bG[0]=e;e.delegateTarget=this;if(bA&&!e.target.disabled&&!(e.button&&e.type==="click")){bx=b(this);bx.context=this.ownerDocument||this;for(bK=e.target;bK!=this;bK=bK.parentNode||this){bE={};bD=[];bx[0]=bK;for(bC=0;bC<bA;bC++){bI=bz[bC];bw=bI.selector;if(bE[bw]===L){bE[bw]=(bI.quick?j(bK,bI.quick):bx.is(bw))}if(bE[bw]){bD.push(bI)}}if(bD.length){bH.push({elem:bK,matches:bD})}}}if(bz.length>bA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC<bH.length&&!e.isPropagationStopped();bC++){bv=bH[bC];e.currentTarget=bv.elem;for(bB=0;bB<bv.matches.length&&!e.isImmediatePropagationStopped();bB++){bI=bv.matches[bB];if(by||(!e.namespace&&!bI.namespace)||e.namespace_re&&e.namespace_re.test(bI.namespace)){e.data=bI.data;e.handleObj=bI;bF=((b.event.special[bI.origType]||{}).handle||bI.handler).apply(bv.elem,bG);if(bF!==L){e.result=bF;if(bF===false){e.preventDefault();e.stopPropagation()}}}}}return e.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(bv,e){if(bv.which==null){bv.which=e.charCode!=null?e.charCode:e.keyCode}return bv}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(bx,bw){var by,bz,e,bv=bw.button,bA=bw.fromElement;if(bx.pageX==null&&bw.clientX!=null){by=bx.target.ownerDocument||av;bz=by.documentElement;e=by.body;bx.pageX=bw.clientX+(bz&&bz.scrollLeft||e&&e.scrollLeft||0)-(bz&&bz.clientLeft||e&&e.clientLeft||0);bx.pageY=bw.clientY+(bz&&bz.scrollTop||e&&e.scrollTop||0)-(bz&&bz.clientTop||e&&e.clientTop||0)}if(!bx.relatedTarget&&bA){bx.relatedTarget=bA===bx.target?bw.toElement:bA}if(!bx.which&&bv!==L){bx.which=(bv&1?1:(bv&2?3:(bv&4?2:0)))}return bx}},fix:function(bw){if(bw[b.expando]){return bw}var bv,bz,e=bw,bx=b.event.fixHooks[bw.type]||{},by=bx.props?this.props.concat(bx.props):this.props;bw=b.Event(e);for(bv=by.length;bv;){bz=by[--bv];bw[bz]=e[bz]}if(!bw.target){bw.target=e.srcElement||av}if(bw.target.nodeType===3){bw.target=bw.target.parentNode}if(bw.metaKey===L){bw.metaKey=bw.ctrlKey}return bx.filter?bx.filter(bw,e):bw},special:{ready:{setup:b.bindReady},load:{noBubble:true},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(bw,bv,e){if(b.isWindow(this)){this.onbeforeunload=e}},teardown:function(bv,e){if(this.onbeforeunload===e){this.onbeforeunload=null}}}},simulate:function(bw,by,bx,bv){var bz=b.extend(new b.Event(),bx,{type:bw,isSimulated:true,originalEvent:{}});if(bv){b.event.trigger(bz,null,by)}else{b.event.dispatch.call(by,bz)}if(bz.isDefaultPrevented()){bx.preventDefault()}}};b.event.handle=b.event.dispatch;b.removeEvent=av.removeEventListener?function(bv,e,bw){if(bv.removeEventListener){bv.removeEventListener(e,bw,false)}}:function(bv,e,bw){if(bv.detachEvent){bv.detachEvent("on"+e,bw)}};b.Event=function(bv,e){if(!(this instanceof b.Event)){return new b.Event(bv,e)}if(bv&&bv.type){this.originalEvent=bv;this.type=bv.type;this.isDefaultPrevented=(bv.defaultPrevented||bv.returnValue===false||bv.getPreventDefault&&bv.getPreventDefault())?i:bk}else{this.type=bv}if(e){b.extend(this,e)}this.timeStamp=bv&&bv.timeStamp||b.now();this[b.expando]=true};function bk(){return false}function i(){return true}b.Event.prototype={preventDefault:function(){this.isDefaultPrevented=i;var bv=this.originalEvent;if(!bv){return}if(bv.preventDefault){bv.preventDefault()}else{bv.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=i;var bv=this.originalEvent;if(!bv){return}if(bv.stopPropagation){bv.stopPropagation()}bv.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i;this.stopPropagation()},isDefaultPrevented:bk,isPropagationStopped:bk,isImmediatePropagationStopped:bk};b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(bv,e){b.event.special[bv]={delegateType:e,bindType:e,handle:function(bz){var bB=this,bA=bz.relatedTarget,by=bz.handleObj,bw=by.selector,bx;if(!bA||(bA!==bB&&!b.contains(bB,bA))){bz.type=by.origType;bx=by.handler.apply(this,arguments);bz.type=e}return bx}}});if(!b.support.submitBubbles){b.event.special.submit={setup:function(){if(b.nodeName(this,"form")){return false}b.event.add(this,"click._submit keypress._submit",function(bx){var bw=bx.target,bv=b.nodeName(bw,"input")||b.nodeName(bw,"button")?bw.form:L;if(bv&&!bv._submit_attached){b.event.add(bv,"submit._submit",function(e){if(this.parentNode&&!e.isTrigger){b.event.simulate("submit",this.parentNode,e,true)}});bv._submit_attached=true}})},teardown:function(){if(b.nodeName(this,"form")){return false}b.event.remove(this,"._submit")}}}if(!b.support.changeBubbles){b.event.special.change={setup:function(){if(bd.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio"){b.event.add(this,"propertychange._change",function(e){if(e.originalEvent.propertyName==="checked"){this._just_changed=true}});b.event.add(this,"click._change",function(e){if(this._just_changed&&!e.isTrigger){this._just_changed=false;b.event.simulate("change",this,e,true)}})}return false}b.event.add(this,"beforeactivate._change",function(bw){var bv=bw.target;if(bd.test(bv.nodeName)&&!bv._change_attached){b.event.add(bv,"change._change",function(e){if(this.parentNode&&!e.isSimulated&&!e.isTrigger){b.event.simulate("change",this.parentNode,e,true)}});bv._change_attached=true}})},handle:function(bv){var e=bv.target;if(this!==e||bv.isSimulated||bv.isTrigger||(e.type!=="radio"&&e.type!=="checkbox")){return bv.handleObj.handler.apply(this,arguments)}},teardown:function(){b.event.remove(this,"._change");return bd.test(this.nodeName)}}}if(!b.support.focusinBubbles){b.each({focus:"focusin",blur:"focusout"},function(bx,e){var bv=0,bw=function(by){b.event.simulate(e,by.target,b.event.fix(by),true)};b.event.special[e]={setup:function(){if(bv++===0){av.addEventListener(bx,bw,true)}},teardown:function(){if(--bv===0){av.removeEventListener(bx,bw,true)}}}})}b.fn.extend({on:function(bw,e,bz,by,bv){var bA,bx;if(typeof bw==="object"){if(typeof e!=="string"){bz=e;e=L}for(bx in bw){this.on(bx,e,bz,bw[bx],bv)}return this}if(bz==null&&by==null){by=e;bz=e=L}else{if(by==null){if(typeof e==="string"){by=bz;bz=L}else{by=bz;bz=e;e=L}}}if(by===false){by=bk}else{if(!by){return this}}if(bv===1){bA=by;by=function(bB){b().off(bB);return bA.apply(this,arguments)};by.guid=bA.guid||(bA.guid=b.guid++)}return this.each(function(){b.event.add(this,bw,by,bz,e)})},one:function(bv,e,bx,bw){return this.on.call(this,bv,e,bx,bw,1)},off:function(bw,e,by){if(bw&&bw.preventDefault&&bw.handleObj){var bv=bw.handleObj;b(bw.delegateTarget).off(bv.namespace?bv.type+"."+bv.namespace:bv.type,bv.selector,bv.handler);return this}if(typeof bw==="object"){for(var bx in bw){this.off(bx,e,bw[bx])}return this}if(e===false||typeof e==="function"){by=e;e=L}if(by===false){by=bk}return this.each(function(){b.event.remove(this,bw,by,e)})},bind:function(e,bw,bv){return this.on(e,null,bw,bv)},unbind:function(e,bv){return this.off(e,null,bv)},live:function(e,bw,bv){b(this.context).on(e,this.selector,bw,bv);return this},die:function(e,bv){b(this.context).off(e,this.selector||"**",bv);return this},delegate:function(e,bv,bx,bw){return this.on(bv,e,bx,bw)},undelegate:function(e,bv,bw){return arguments.length==1?this.off(e,"**"):this.off(bv,e,bw)},trigger:function(e,bv){return this.each(function(){b.event.trigger(e,bv,this)})},triggerHandler:function(e,bv){if(this[0]){return b.event.trigger(e,bv,this[0],true)}},toggle:function(bx){var bv=arguments,e=bx.guid||b.guid++,bw=0,by=function(bz){var bA=(b._data(this,"lastToggle"+bx.guid)||0)%bw;b._data(this,"lastToggle"+bx.guid,bA+1);bz.preventDefault();return bv[bA].apply(this,arguments)||false};by.guid=e;while(bw<bv.length){bv[bw++].guid=e}return this.click(by)},hover:function(e,bv){return this.mouseenter(e).mouseleave(bv||e)}});b.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu").split(" "),function(bv,e){b.fn[e]=function(bx,bw){if(bw==null){bw=bx;bx=null}return arguments.length>0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); +/* + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e<bR.length;e++){if(bR[e]===bR[e-1]){bR.splice(e--,1)}}}}return bR};by.matches=function(e,bR){return by(e,null,null,bR)};by.matchesSelector=function(e,bR){return by(bR,null,null,[e]).length>0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS<bU;bS++){bV=bE.order[bS];if((bT=bE.leftMatch[bV].exec(bX))){bR=bT[1];bT.splice(1,1);if(bR.substr(bR.length-1)!=="\\"){bT[1]=(bT[1]||"").replace(bK,"");bW=bE.find[bV](bT,e,bY);if(bW!=null){bX=bX.replace(bE.match[bV],"");break}}}}if(!bW){bW=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:bW,expr:bX}};by.filter=function(b1,b0,b4,bU){var bW,e,bZ,b6,b3,bR,bT,bV,b2,bS=b1,b5=[],bY=b0,bX=b0&&b0[0]&&by.isXML(b0[0]);while(b1&&b0.length){for(bZ in bE.filter){if((bW=bE.leftMatch[bZ].exec(b1))!=null&&bW[2]){bR=bE.filter[bZ];bT=bW[1];e=false;bW.splice(1,1);if(bT.substr(bT.length-1)==="\\"){continue}if(bY===b5){b5=[]}if(bE.preFilter[bZ]){bW=bE.preFilter[bZ](bW,bY,b4,b5,bU,bX);if(!bW){e=b6=true}else{if(bW===true){continue}}}if(bW){for(bV=0;(b3=bY[bV])!=null;bV++){if(b3){b6=bR(b3,bW,bV,bY);b2=bU^b6;if(b4&&b6!=null){if(b2){e=true}else{bY[bV]=false}}else{if(b2){b5.push(b3);e=true}}}}}if(b6!==L){if(!b4){bY=b5}b1=b1.replace(bE.match[bZ],"");if(!e){return[]}break}}}if(b1===bS){if(e==null){by.error(b1)}else{break}}bS=b1}return bY};by.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var bw=by.getText=function(bU){var bS,bT,e=bU.nodeType,bR="";if(e){if(e===1||e===9){if(typeof bU.textContent==="string"){return bU.textContent}else{if(typeof bU.innerText==="string"){return bU.innerText.replace(bO,"")}else{for(bU=bU.firstChild;bU;bU=bU.nextSibling){bR+=bw(bU)}}}}else{if(e===3||e===4){return bU.nodeValue}}}else{for(bS=0;(bT=bU[bS]);bS++){if(bT.nodeType!==8){bR+=bw(bT)}}}return bR};var bE=by.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(bW,bR){var bT=typeof bR==="string",bV=bT&&!bQ.test(bR),bX=bT&&!bV;if(bV){bR=bR.toLowerCase()}for(var bS=0,e=bW.length,bU;bS<e;bS++){if((bU=bW[bS])){while((bU=bU.previousSibling)&&bU.nodeType!==1){}bW[bS]=bX||bU&&bU.nodeName.toLowerCase()===bR?bU||false:bU===bR}}if(bX){by.filter(bR,bW,true)}},">":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS<e;bS++){bV=bW[bS];if(bV){var bT=bV.parentNode;bW[bS]=bT.nodeName.toLowerCase()===bR?bT:false}}}else{for(;bS<e;bS++){bV=bW[bS];if(bV){bW[bS]=bU?bV.parentNode:bV.parentNode===bR}}if(bU){by.filter(bR,bW,true)}}},"":function(bT,bR,bV){var bU,bS=bI++,e=bN;if(typeof bR==="string"&&!bQ.test(bR)){bR=bR.toLowerCase();bU=bR;e=bv}e("parentNode",bR,bS,bT,bU,bV)},"~":function(bT,bR,bV){var bU,bS=bI++,e=bN;if(typeof bR==="string"&&!bQ.test(bR)){bR=bR.toLowerCase();bU=bR;e=bv}e("previousSibling",bR,bS,bT,bU,bV)}},find:{ID:function(bR,bS,bT){if(typeof bS.getElementById!=="undefined"&&!bT){var e=bS.getElementById(bR[1]);return e&&e.parentNode?[e]:[]}},NAME:function(bS,bV){if(typeof bV.getElementsByName!=="undefined"){var bR=[],bU=bV.getElementsByName(bS[1]);for(var bT=0,e=bU.length;bT<e;bT++){if(bU[bT].getAttribute("name")===bS[1]){bR.push(bU[bT])}}return bR.length===0?null:bR}},TAG:function(e,bR){if(typeof bR.getElementsByTagName!=="undefined"){return bR.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(bT,bR,bS,e,bW,bX){bT=" "+bT[1].replace(bK,"")+" ";if(bX){return bT}for(var bU=0,bV;(bV=bR[bU])!=null;bU++){if(bV){if(bW^(bV.className&&(" "+bV.className+" ").replace(/[\t\n\r]/g," ").indexOf(bT)>=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1},lt:function(bS,bR,e){return bR<e[3]-0},gt:function(bS,bR,e){return bR>e[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV<bU;bV++){if(bT[bV]===bS){return false}}return true}else{by.error(e)}}}},CHILD:function(bS,bU){var bT,b0,bW,bZ,e,bV,bY,bX=bU[1],bR=bS;switch(bX){case"only":case"first":while((bR=bR.previousSibling)){if(bR.nodeType===1){return false}}if(bX==="first"){return true}bR=bS;case"last":while((bR=bR.nextSibling)){if(bR.nodeType===1){return false}}return true;case"nth":bT=bU[2];b0=bU[3];if(bT===1&&b0===0){return true}bW=bU[0];bZ=bS.parentNode;if(bZ&&(bZ[bC]!==bW||!bS.nodeIndex)){bV=0;for(bR=bZ.firstChild;bR;bR=bR.nextSibling){if(bR.nodeType===1){bR.nodeIndex=++bV}}bZ[bC]=bW}bY=bS.nodeIndex-b0;if(bT===0){return bY===0}else{return(bY%bT===0&&bY/bT>=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS<e;bS++){bR.push(bU[bS])}}else{for(;bU[bS];bS++){bR.push(bU[bS])}}}return bR}}var bJ,bG;if(av.documentElement.compareDocumentPosition){bJ=function(bR,e){if(bR===e){bB=true;return 0}if(!bR.compareDocumentPosition||!e.compareDocumentPosition){return bR.compareDocumentPosition?-1:1}return bR.compareDocumentPosition(e)&4?-1:1}}else{bJ=function(bY,bX){if(bY===bX){bB=true;return 0}else{if(bY.sourceIndex&&bX.sourceIndex){return bY.sourceIndex-bX.sourceIndex}}var bV,bR,bS=[],e=[],bU=bY.parentNode,bW=bX.parentNode,bZ=bU;if(bU===bW){return bG(bY,bX)}else{if(!bU){return -1}else{if(!bW){return 1}}}while(bZ){bS.unshift(bZ);bZ=bZ.parentNode}bZ=bW;while(bZ){e.unshift(bZ);bZ=bZ.parentNode}bV=bS.length;bR=e.length;for(var bT=0;bT<bV&&bT<bR;bT++){if(bS[bT]!==e[bT]){return bG(bS[bT],e[bT])}}return bT===bV?bG(bY,e[bT],-1):bG(bS[bT],bX,1)};bG=function(bR,e,bS){if(bR===e){return bS}var bT=bR.nextSibling;while(bT){if(bT===e){return -1}bT=bT.nextSibling}return 1}}(function(){var bR=av.createElement("div"),bS="script"+(new Date()).getTime(),e=av.documentElement;bR.innerHTML="<a name='"+bS+"'/>";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="<p class='TEST'></p>";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT<bS;bT++){var e=bZ[bT];if(e){var bU=false;e=e[bR];while(e){if(e[bC]===bV){bU=bZ[e.sizset];break}if(e.nodeType===1&&!bY){e[bC]=bV;e.sizset=bT}if(e.nodeName.toLowerCase()===bW){bU=e;break}e=e[bR]}bZ[bT]=bU}}}function bN(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT<bS;bT++){var e=bZ[bT];if(e){var bU=false;e=e[bR];while(e){if(e[bC]===bV){bU=bZ[e.sizset];break}if(e.nodeType===1){if(!bY){e[bC]=bV;e.sizset=bT}if(typeof bW!=="string"){if(e===bW){bU=true;break}}else{if(by.filter(bW,[e]).length>0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT<bR;bT++){by(bS,bY[bT],bX,bW)}return by.filter(bU,bX)};by.attr=b.attr;by.selectors.attrMap={};b.find=by;b.expr=by.selectors;b.expr[":"]=b.expr.filters;b.unique=by.uniqueSort;b.text=by.getText;b.isXMLDoc=by.isXML;b.contains=by.contains})();var ab=/Until$/,aq=/^(?:parents|prevUntil|prevAll)/,a9=/,/,bp=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,H=b.expr.match.POS,ay={children:true,contents:true,next:true,prev:true};b.fn.extend({find:function(e){var bw=this,by,bv;if(typeof e!=="string"){return b(e).filter(function(){for(by=0,bv=bw.length;by<bv;by++){if(b.contains(bw[by],this)){return true}}})}var bx=this.pushStack("","find",e),bA,bB,bz;for(by=0,bv=this.length;by<bv;by++){bA=bx.length;b.find(e,this[by],bx);if(by>0){for(bB=bA;bB<bx.length;bB++){for(bz=0;bz<bA;bz++){if(bx[bz]===bx[bB]){bx.splice(bB--,1);break}}}}}return bx},has:function(bv){var e=b(bv);return this.filter(function(){for(var bx=0,bw=e.length;bx<bw;bx++){if(b.contains(this,e[bx])){return true}}})},not:function(e){return this.pushStack(aG(this,e,false),"not",e)},filter:function(e){return this.pushStack(aG(this,e,true),"filter",e)},is:function(e){return !!e&&(typeof e==="string"?H.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw<by.length;bw++){if(b(bz).is(by[bw])){bv.push({selector:by[bw],elem:bz,level:bB})}}bz=bz.parentNode;bB++}return bv}var bA=H.test(by)||typeof by!=="string"?b(by,bx||this.context):0;for(bw=0,e=this.length;bw<e;bw++){bz=this[bw];while(bz){if(bA?bA.index(bz)>-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/<tbody/i,W=/<|&#?\w+;/,ae=/<(?:script|style)/i,O=/<(?:script|object|embed|option|style)/i,ah=new RegExp("<(?:"+aR+")","i"),o=/checked\s*(?:[^=]|=\s*.checked.)/i,bm=/\/(java|ecma)script/i,aN=/^\s*<!(?:\[CDATA\[|\-\-)/,ax={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},ac=a(av);ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div<div>","</div>"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1></$2>");try{for(var bw=0,bv=this.length;bw<bv;bw++){if(this[bw].nodeType===1){b.cleanData(this[bw].getElementsByTagName("*"));this[bw].innerHTML=bx}}}catch(by){this.empty().append(bx)}}else{if(b.isFunction(bx)){this.each(function(bz){var e=b(this);e.html(bx.call(this,bz,e.html()))})}else{this.empty().append(bx)}}}return this},replaceWith:function(e){if(this[0]&&this[0].parentNode){if(b.isFunction(e)){return this.each(function(bx){var bw=b(this),bv=bw.html();bw.replaceWith(e.call(this,bx,bv))})}if(typeof e!=="string"){e=b(e).detach()}return this.each(function(){var bw=this.nextSibling,bv=this.parentNode;b(this).remove();if(bw){b(bw).before(e)}else{b(bv).append(e)}})}else{return this.length?this.pushStack(b(b.isFunction(e)?e():e),"replaceWith",e):this}},detach:function(e){return this.remove(e,true)},domManip:function(bB,bF,bE){var bx,by,bA,bD,bC=bB[0],bv=[];if(!b.support.checkClone&&arguments.length===3&&typeof bC==="string"&&o.test(bC)){return this.each(function(){b(this).domManip(bB,bF,bE,true)})}if(b.isFunction(bC)){return this.each(function(bH){var bG=b(this);bB[0]=bC.call(this,bH,bF?bG.html():L);bG.domManip(bB,bF,bE)})}if(this[0]){bD=bC&&bC.parentNode;if(b.support.parentNode&&bD&&bD.nodeType===11&&bD.childNodes.length===this.length){bx={fragment:bD}}else{bx=b.buildFragment(bB,this,bv)}bA=bx.fragment;if(bA.childNodes.length===1){by=bA=bA.firstChild}else{by=bA.firstChild}if(by){bF=bF&&b.nodeName(by,"tr");for(var bw=0,e=this.length,bz=e-1;bw<e;bw++){bE.call(bF?ba(this[bw],by):this[bw],bx.cacheable||(e>1&&bw<bz)?b.clone(bA,true,true):bA)}}if(bv.length){b.each(bv,bo)}}return this}});function ba(e,bv){return b.nodeName(e,"table")?(e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody"))):e}function t(bB,bv){if(bv.nodeType!==1||!b.hasData(bB)){return}var by,bx,e,bA=b._data(bB),bz=b._data(bv,bA),bw=bA.events;if(bw){delete bz.handle;bz.events={};for(by in bw){for(bx=0,e=bw[by].length;bx<e;bx++){b.event.add(bv,by+(bw[by][bx].namespace?".":"")+bw[by][bx].namespace,bw[by][bx],bw[by][bx].data)}}}if(bz.data){bz.data=b.extend({},bz.data)}}function ai(bv,e){var bw;if(e.nodeType!==1){return}if(e.clearAttributes){e.clearAttributes()}if(e.mergeAttributes){e.mergeAttributes(bv)}bw=e.nodeName.toLowerCase();if(bw==="object"){e.outerHTML=bv.outerHTML}else{if(bw==="input"&&(bv.type==="checkbox"||bv.type==="radio")){if(bv.checked){e.defaultChecked=e.checked=bv.checked}if(e.value!==bv.value){e.value=bv.value}}else{if(bw==="option"){e.selected=bv.defaultSelected}else{if(bw==="input"||bw==="textarea"){e.defaultValue=bv.defaultValue}}}}e.removeAttribute(b.expando)}b.buildFragment=function(bz,bx,bv){var by,e,bw,bA,bB=bz[0];if(bx&&bx[0]){bA=bx[0].ownerDocument||bx[0]}if(!bA.createDocumentFragment){bA=av}if(bz.length===1&&typeof bB==="string"&&bB.length<512&&bA===av&&bB.charAt(0)==="<"&&!O.test(bB)&&(b.support.checkClone||!o.test(bB))&&(b.support.html5Clone||!ah.test(bB))){e=true;bw=b.fragments[bB];if(bw&&bw!==1){by=bw}}if(!by){by=bA.createDocumentFragment();b.clean(bz,bA,by,bv)}if(e){b.fragments[bB]=bw?by:1}return{fragment:by,cacheable:e}};b.fragments={};b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,bv){b.fn[e]=function(bw){var bz=[],bC=b(bw),bB=this.length===1&&this[0].parentNode;if(bB&&bB.nodeType===11&&bB.childNodes.length===1&&bC.length===1){bC[bv](this[0]);return this}else{for(var bA=0,bx=bC.length;bA<bx;bA++){var by=(bA>0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1></$2>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]==="<table>"&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB<bG;bB++){E(bz[bB])}}else{E(bz)}}if(bz.nodeType){bI.push(bz)}else{bI=b.merge(bI,bz)}}if(bH){bF=function(bL){return !bL.type||bm.test(bL.type)};for(bE=0;bI[bE];bE++){if(bA&&b.nodeName(bI[bE],"script")&&(!bI[bE].type||bI[bE].type.toLowerCase()==="text/javascript")){bA.push(bI[bE].parentNode?bI[bE].parentNode.removeChild(bI[bE]):bI[bE])}else{if(bI[bE].nodeType===1){var bJ=b.grep(bI[bE].getElementsByTagName("script"),bF);bI.splice.apply(bI,[bE+1,0].concat(bJ))}bH.appendChild(bI[bE])}}}return bI},cleanData:function(bv){var by,bw,e=b.cache,bB=b.event.special,bA=b.support.deleteExpando;for(var bz=0,bx;(bx=bv[bz])!=null;bz++){if(bx.nodeName&&b.noData[bx.nodeName.toLowerCase()]){continue}bw=bx[b.expando];if(bw){by=e[bw];if(by&&by.events){for(var bC in by.events){if(bB[bC]){b.event.remove(bx,bC)}else{b.removeEvent(bx,bC,by.handle)}}if(by.handle){by.handle.elem=null}}if(bA){delete bx[b.expando]}else{if(bx.removeAttribute){bx.removeAttribute(b.expando)}}delete e[bw]}}}});function bo(e,bv){if(bv.src){b.ajax({url:bv.src,async:false,dataType:"script"})}else{b.globalEval((bv.text||bv.textContent||bv.innerHTML||"").replace(aN,"/*$0*/"))}if(bv.parentNode){bv.parentNode.removeChild(bv)}}var ak=/alpha\([^)]*\)/i,au=/opacity=([^)]*)/,z=/([A-Z]|^ms)/g,bc=/^-?\d+(?:px)?$/i,bn=/^-?\d/,I=/^([\-+])=([\-+.\de]+)/,a7={position:"absolute",visibility:"hidden",display:"block"},an=["Left","Right"],a1=["Top","Bottom"],Z,aI,aX;b.fn.css=function(e,bv){if(arguments.length===2&&bv===L){return this}return b.access(this,e,bv,true,function(bx,bw,by){return by!==L?b.style(bx,bw,by):b.css(bx,bw)})};b.extend({cssHooks:{opacity:{get:function(bw,bv){if(bv){var e=Z(bw,"opacity","opacity");return e===""?"1":e}else{return bw.style.opacity}}}},cssNumber:{fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(bx,bw,bD,by){if(!bx||bx.nodeType===3||bx.nodeType===8||!bx.style){return}var bB,bC,bz=b.camelCase(bw),bv=bx.style,bE=b.cssHooks[bz];bw=b.cssProps[bz]||bz;if(bD!==L){bC=typeof bD;if(bC==="string"&&(bB=I.exec(bD))){bD=(+(bB[1]+1)*+bB[2])+parseFloat(b.css(bx,bw));bC="number"}if(bD==null||bC==="number"&&isNaN(bD)){return}if(bC==="number"&&!b.cssNumber[bz]){bD+="px"}if(!bE||!("set" in bE)||(bD=bE.set(bx,bD))!==L){try{bv[bw]=bD}catch(bA){}}}else{if(bE&&"get" in bE&&(bB=bE.get(bx,false,by))!==L){return bB}return bv[bw]}},css:function(by,bx,bv){var bw,e;bx=b.camelCase(bx);e=b.cssHooks[bx];bx=b.cssProps[bx]||bx;if(bx==="cssFloat"){bx="float"}if(e&&"get" in e&&(bw=e.get(by,true,bv))!==L){return bw}else{if(Z){return Z(by,bx)}}},swap:function(bx,bw,by){var e={};for(var bv in bw){e[bv]=bx.style[bv];bx.style[bv]=bw[bv]}by.call(bx);for(bv in bw){bx.style[bv]=e[bv]}}});b.curCSS=b.css;b.each(["height","width"],function(bv,e){b.cssHooks[e]={get:function(by,bx,bw){var bz;if(bx){if(by.offsetWidth!==0){return p(by,e,bw)}else{b.swap(by,a7,function(){bz=p(by,e,bw)})}return bz}},set:function(bw,bx){if(bc.test(bx)){bx=parseFloat(bx);if(bx>=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length;if(bA>0){if(bv!=="border"){for(;bx<e;bx++){if(!bv){bA-=parseFloat(b.css(by,"padding"+bz[bx]))||0}if(bv==="margin"){bA+=parseFloat(b.css(by,bv+bz[bx]))||0}else{bA-=parseFloat(b.css(by,"border"+bz[bx]+"Width"))||0}}}return bA+"px"}bA=Z(by,bw,bw);if(bA<0||bA==null){bA=by.style[bw]||0}bA=parseFloat(bA)||0;if(bv){for(;bx<e;bx++){bA+=parseFloat(b.css(by,"padding"+bz[bx]))||0;if(bv!=="padding"){bA+=parseFloat(b.css(by,"border"+bz[bx]+"Width"))||0}if(bv==="margin"){bA+=parseFloat(b.css(by,bv+bz[bx]))||0}}}return bA+"px"}if(b.expr&&b.expr.filters){b.expr.filters.hidden=function(bw){var bv=bw.offsetWidth,e=bw.offsetHeight;return(bv===0&&e===0)||(!b.support.reliableHiddenOffsets&&((bw.style&&bw.style.display)||b.css(bw,"display"))==="none")};b.expr.filters.visible=function(e){return !b.expr.filters.hidden(e)}}var k=/%20/g,ap=/\[\]$/,bs=/\r?\n/g,bq=/#.*$/,aD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,aZ=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,aM=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,aQ=/^(?:GET|HEAD)$/,c=/^\/\//,M=/\?/,a6=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw<bz;bw++){bv=bx[bw];bC=/^\+/.test(bv);if(bC){bv=bv.substr(1)||"*"}bB=e[bv]=e[bv]||[];bB[bC?"unshift":"push"](bA)}}}}function aW(bv,bE,bz,bD,bB,bx){bB=bB||bE.dataTypes[0];bx=bx||{};bx[bB]=true;var bA=bv[bB],bw=0,e=bA?bA.length:0,by=(bv===aa),bC;for(;bw<e&&(by||!bC);bw++){bC=bA[bw](bE,bz,bD);if(typeof bC==="string"){if(!by||bx[bC]){bC=L}else{bE.dataTypes.unshift(bC);bC=aW(bv,bE,bz,bD,bC,bx)}}}if((by||!bC)&&!bx["*"]){bC=aW(bv,bE,bz,bD,"*",bx)}return bC}function am(bw,bx){var bv,e,by=b.ajaxSettings.flatOptions||{};for(bv in bx){if(bx[bv]!==L){(by[bv]?bw:(e||(e={})))[bv]=bx[bv]}}if(e){b.extend(true,bw,e)}}b.fn.extend({load:function(bw,bz,bA){if(typeof bw!=="string"&&A){return A.apply(this,arguments)}else{if(!this.length){return this}}var by=bw.indexOf(" ");if(by>=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("<div>").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA<bw;bA++){if(bA===1){for(bE in bH.converters){if(typeof bE==="string"){bG[bE.toLowerCase()]=bH.converters[bE]}}}bx=bC;bC=bD[bA];if(bC==="*"){bC=bx}else{if(bx!=="*"&&bx!==bC){by=bx+" "+bC;bF=bG[by]||bG["* "+bC];if(!bF){e=L;for(bv in bG){bB=bv.split(" ");if(bB[0]===bx||bB[0]==="*"){e=bG[bB[1]+" "+bC];if(e){bv=bG[bv];if(bv===true){bF=e}else{if(e===true){bF=bv}}break}}}}if(!(bF||e)){b.error("No conversion from "+by.replace(" "," to "))}if(bF!==true){bz=bF?bF(bz):e(bv(bz))}}}}return bz}var aC=b.now(),u=/(\=)\?(&|$)|\?\?/i;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return b.expando+"_"+(aC++)}});b.ajaxPrefilter("json jsonp",function(bD,bA,bC){var bx=bD.contentType==="application/x-www-form-urlencoded"&&(typeof bD.data==="string");if(bD.dataTypes[0]==="jsonp"||bD.jsonp!==false&&(u.test(bD.url)||bx&&u.test(bD.data))){var bB,bw=bD.jsonpCallback=b.isFunction(bD.jsonpCallback)?bD.jsonpCallback():bD.jsonpCallback,bz=bb[bw],e=bD.url,by=bD.data,bv="$1"+bw+"$2";if(bD.jsonp!==false){e=e.replace(u,bv);if(bD.url===e){if(bx){by=by.replace(u,bv)}if(bD.data===by){e+=(/\?/.test(e)?"&":"?")+bD.jsonp+"="+bw}}}bD.url=e;bD.data=by;bb[bw]=function(bE){bB=[bE]};bC.always(function(){bb[bw]=bz;if(bB&&b.isFunction(bz)){bb[bw](bB[0])}});bD.converters["script json"]=function(){if(!bB){b.error(bw+" was not called")}return bB[0]};bD.dataTypes[0]="json";return"script"}});b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){b.globalEval(e);return e}}});b.ajaxPrefilter("script",function(e){if(e.cache===L){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});b.ajaxTransport("script",function(bw){if(bw.crossDomain){var e,bv=av.head||av.getElementsByTagName("head")[0]||av.documentElement;return{send:function(bx,by){e=av.createElement("script");e.async="async";if(bw.scriptCharset){e.charset=bw.scriptCharset}e.src=bw.url;e.onload=e.onreadystatechange=function(bA,bz){if(bz||!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;if(bv&&e.parentNode){bv.removeChild(e)}e=L;if(!bz){by(200,"success")}}};bv.insertBefore(e,bv.firstChild)},abort:function(){if(e){e.onload(0,1)}}}}});var B=bb.ActiveXObject?function(){for(var e in N){N[e](0,1)}}:false,y=0,N;function aL(){try{return new bb.XMLHttpRequest()}catch(bv){}}function aj(){try{return new bb.ActiveXObject("Microsoft.XMLHTTP")}catch(bv){}}b.ajaxSettings.xhr=bb.ActiveXObject?function(){return !this.isLocal&&aL()||aj()}:aL;(function(e){b.extend(b.support,{ajax:!!e,cors:!!e&&("withCredentials" in e)})})(b.ajaxSettings.xhr());if(b.support.ajax){b.ajaxTransport(function(e){if(!e.crossDomain||b.support.cors){var bv;return{send:function(bB,bw){var bA=e.xhr(),bz,by;if(e.username){bA.open(e.type,e.url,e.async,e.username,e.password)}else{bA.open(e.type,e.url,e.async)}if(e.xhrFields){for(by in e.xhrFields){bA[by]=e.xhrFields[by]}}if(e.mimeType&&bA.overrideMimeType){bA.overrideMimeType(e.mimeType)}if(!e.crossDomain&&!bB["X-Requested-With"]){bB["X-Requested-With"]="XMLHttpRequest"}try{for(by in bB){bA.setRequestHeader(by,bB[by])}}catch(bx){}bA.send((e.hasContent&&e.data)||null);bv=function(bK,bE){var bF,bD,bC,bI,bH;try{if(bv&&(bE||bA.readyState===4)){bv=L;if(bz){bA.onreadystatechange=b.noop;if(B){delete N[bz]}}if(bE){if(bA.readyState!==4){bA.abort()}}else{bF=bA.status;bC=bA.getAllResponseHeaders();bI={};bH=bA.responseXML;if(bH&&bH.documentElement){bI.xml=bH}bI.text=bA.responseText;try{bD=bA.statusText}catch(bJ){bD=""}if(!bF&&e.isLocal&&!e.crossDomain){bF=bI.text?200:404}else{if(bF===1223){bF=204}}}}}catch(bG){if(!bE){bw(-1,bG)}}if(bI){bw(bF,bD,bI,bC)}};if(!e.async||bA.readyState===4){bv()}else{bz=++y;if(B){if(!N){N={};b(bb).unload(B)}N[bz]=bv}bA.onreadystatechange=bv}},abort:function(){if(bv){bv(0,1)}}}}})}var Q={},a8,m,aB=/^(?:toggle|show|hide)$/,aT=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,a3,aH=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],a4;b.fn.extend({show:function(bx,bA,bz){var bw,by;if(bx||bx===0){return this.animate(a0("show",3),bx,bA,bz)}else{for(var bv=0,e=this.length;bv<e;bv++){bw=this[bv];if(bw.style){by=bw.style.display;if(!b._data(bw,"olddisplay")&&by==="none"){by=bw.style.display=""}if(by===""&&b.css(bw,"display")==="none"){b._data(bw,"olddisplay",x(bw.nodeName))}}}for(bv=0;bv<e;bv++){bw=this[bv];if(bw.style){by=bw.style.display;if(by===""||by==="none"){bw.style.display=b._data(bw,"olddisplay")||""}}}return this}},hide:function(bx,bA,bz){if(bx||bx===0){return this.animate(a0("hide",3),bx,bA,bz)}else{var bw,by,bv=0,e=this.length;for(;bv<e;bv++){bw=this[bv];if(bw.style){by=b.css(bw,"display");if(by!=="none"&&!b._data(bw,"olddisplay")){b._data(bw,"olddisplay",by)}}}for(bv=0;bv<e;bv++){if(this[bv].style){this[bv].style.display="none"}}return this}},_toggle:b.fn.toggle,toggle:function(bw,bv,bx){var e=typeof bw==="boolean";if(b.isFunction(bw)&&b.isFunction(bv)){this._toggle.apply(this,arguments)}else{if(bw==null||e){this.each(function(){var by=e?bw:b(this).is(":hidden");b(this)[by?"show":"hide"]()})}else{this.animate(a0("toggle",3),bw,bv,bx)}}return this},fadeTo:function(e,bx,bw,bv){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:bx},e,bw,bv)},animate:function(bz,bw,by,bx){var e=b.speed(bw,by,bx);if(b.isEmptyObject(bz)){return this.each(e.complete,[false])}bz=b.extend({},bz);function bv(){if(e.queue===false){b._mark(this)}var bE=b.extend({},e),bK=this.nodeType===1,bI=bK&&b(this).is(":hidden"),bB,bF,bD,bJ,bH,bC,bG,bL,bA;bE.animatedProperties={};for(bD in bz){bB=b.camelCase(bD);if(bD!==bB){bz[bB]=bz[bD];delete bz[bD]}bF=bz[bB];if(b.isArray(bF)){bE.animatedProperties[bB]=bF[1];bF=bz[bB]=bF[0]}else{bE.animatedProperties[bB]=bE.specialEasing&&bE.specialEasing[bB]||bE.easing||"swing"}if(bF==="hide"&&bI||bF==="show"&&!bI){return bE.complete.call(this)}if(bK&&(bB==="height"||bB==="width")){bE.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(b.css(this,"display")==="inline"&&b.css(this,"float")==="none"){if(!b.support.inlineBlockNeedsLayout||x(this.nodeName)==="inline"){this.style.display="inline-block"}else{this.style.zoom=1}}}}if(bE.overflow!=null){this.style.overflow="hidden"}for(bD in bz){bJ=new b.fx(this,bE,bD);bF=bz[bD];if(aB.test(bF)){bA=b._data(this,"toggle"+bD)||(bF==="toggle"?bI?"show":"hide":0);if(bA){b._data(this,"toggle"+bD,bA==="show"?"hide":"show");bJ[bA]()}else{bJ[bF]()}}else{bH=aT.exec(bF);bC=bJ.cur();if(bH){bG=parseFloat(bH[2]);bL=bH[3]||(b.cssNumber[bD]?"":"px");if(bL!=="px"){b.style(this,bD,(bG||1)+bL);bC=((bG||1)/bJ.cur())*bC;b.style(this,bD,bC+bL)}if(bH[1]){bG=((bH[1]==="-="?-1:1)*bG)+bC}bJ.custom(bC,bG,bL)}else{bJ.custom(bC,bF,"")}}}return true}return e.queue===false?this.each(bv):this.queue(e.queue,bv)},stop:function(bw,bv,e){if(typeof bw!=="string"){e=bv;bv=bw;bw=L}if(bv&&bw!==false){this.queue(bw||"fx",[])}return this.each(function(){var bx,by=false,bA=b.timers,bz=b._data(this);if(!e){b._unmark(true,this)}function bB(bE,bF,bD){var bC=bF[bD];b.removeData(bE,bD,true);bC.stop(e)}if(bw==null){for(bx in bz){if(bz[bx]&&bz[bx].stop&&bx.indexOf(".run")===bx.length-4){bB(this,bz,bx)}}}else{if(bz[bx=bw+".run"]&&bz[bx].stop){bB(this,bz,bx)}}for(bx=bA.length;bx--;){if(bA[bx].elem===this&&(bw==null||bA[bx].queue===bw)){if(e){bA[bx](true)}else{bA[bx].saveState()}by=true;bA.splice(bx,1)}}if(!(e&&by)){b.dequeue(this,bw)}})}});function bh(){setTimeout(at,0);return(a4=b.now())}function at(){a4=L}function a0(bv,e){var bw={};b.each(aH.concat.apply([],aH.slice(0,e)),function(){bw[this]=bv});return bw}b.each({slideDown:a0("show",1),slideUp:a0("hide",1),slideToggle:a0("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,bv){b.fn[e]=function(bw,by,bx){return this.animate(bv,bw,by,bx)}});b.extend({speed:function(bw,bx,bv){var e=bw&&typeof bw==="object"?b.extend({},bw):{complete:bv||!bv&&bx||b.isFunction(bw)&&bw,duration:bw,easing:bv&&bx||bx&&!b.isFunction(bx)&&bx};e.duration=b.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in b.fx.speeds?b.fx.speeds[e.duration]:b.fx.speeds._default;if(e.queue==null||e.queue===true){e.queue="fx"}e.old=e.complete;e.complete=function(by){if(b.isFunction(e.old)){e.old.call(this)}if(e.queue){b.dequeue(this,e.queue)}else{if(by!==false){b._unmark(this)}}};return e},easing:{linear:function(bw,bx,e,bv){return e+bv*bw},swing:function(bw,bx,e,bv){return((-Math.cos(bw*Math.PI)/2)+0.5)*bv+e}},timers:[],fx:function(bv,e,bw){this.options=e;this.elem=bv;this.prop=bw;e.orig=e.orig||{}}});b.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(b.fx.step[this.prop]||b.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var e,bv=b.css(this.elem,this.prop);return isNaN(e=parseFloat(bv))?!bv||bv==="auto"?0:bv:e},custom:function(bz,by,bx){var e=this,bw=b.fx;this.startTime=a4||bh();this.end=by;this.now=this.start=bz;this.pos=this.state=0;this.unit=bx||this.unit||(b.cssNumber[this.prop]?"":"px");function bv(bA){return e.step(bA)}bv.queue=this.options.queue;bv.elem=this.elem;bv.saveState=function(){if(e.options.hide&&b._data(e.elem,"fxshow"+e.prop)===L){b._data(e.elem,"fxshow"+e.prop,e.start)}};if(bv()&&b.timers.push(bv)&&!a3){a3=setInterval(bw.tick,bw.interval)}},show:function(){var e=b._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=e||b.style(this.elem,this.prop);this.options.show=true;if(e!==L){this.custom(this.cur(),e)}else{this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur())}b(this.elem).show()},hide:function(){this.options.orig[this.prop]=b._data(this.elem,"fxshow"+this.prop)||b.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(by){var bA,bB,bv,bx=a4||bh(),e=true,bz=this.elem,bw=this.options;if(by||bx>=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e<bv.length;e++){bw=bv[e];if(!bw()&&bv[e]===bw){bv.splice(e--,1)}}if(!bv.length){b.fx.stop()}},interval:13,stop:function(){clearInterval(a3);a3=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e){b.style(e.elem,"opacity",e.now)},_default:function(e){if(e.elem.style&&e.elem.style[e.prop]!=null){e.elem.style[e.prop]=e.now+e.unit}else{e.elem[e.prop]=e.now}}}});b.each(["width","height"],function(e,bv){b.fx.step[bv]=function(bw){b.style(bw.elem,bv,Math.max(0,bw.now)+bw.unit)}});if(b.expr&&b.expr.filters){b.expr.filters.animated=function(e){return b.grep(b.timers,function(bv){return e===bv.elem}).length}}function x(bx){if(!Q[bx]){var e=av.body,bv=b("<"+bx+">").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b})}})(window);/* + * jQuery UI 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h<j.length;h++){if(e.options[j[h][0]]){j[h][1].apply(e.element,f)}}}},contains:function(f,e){return document.compareDocumentPosition?f.compareDocumentPosition(e)&16:f!==e&&f.contains(e)},hasScroll:function(h,f){if(a(h).css("overflow")==="hidden"){return false}var e=(f&&f==="left")?"scrollLeft":"scrollTop",g=false;if(h[e]>0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/* + * jQuery UI Widget 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Widget + */ +(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/* + * jQuery UI Mouse 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Mouse + * + * Depends: + * jquery.ui.widget.js + */ +(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g<l.length;g++){var j=c.trim(l[g]),e="ui-resizable-"+j;var h=c('<div class="ui-resizable-handle '+e+'"></div>');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(h<e.maxWidth){e.maxWidth=h}if(k<e.maxHeight){e.maxHeight=k}}this._vBoundaries=e},_updateCache:function(e){var f=this.options;this.offset=this.helper.offset();if(a(e.left)){this.position.left=e.left}if(a(e.top)){this.position.top=e.top}if(a(e.height)){this.size.height=e.height}if(a(e.width)){this.size.width=e.width}},_updateRatio:function(h,g){var i=this.options,j=this.position,f=this.size,e=this.axis;if(a(h.height)){h.width=(h.height*this.aspectRatio)}else{if(a(h.width)){h.height=(h.width/this.aspectRatio)}}if(e=="sw"){h.left=j.left+(f.width-h.width);h.top=null}if(e=="nw"){h.top=j.top+(f.height-h.height);h.left=j.left+(f.width-h.width)}return h},_respectSize:function(l,g){var j=this.helper,i=this._vBoundaries,r=this._aspectRatio||g.shiftKey,q=this.axis,t=a(l.width)&&i.maxWidth&&(i.maxWidth<l.width),m=a(l.height)&&i.maxHeight&&(i.maxHeight<l.height),h=a(l.width)&&i.minWidth&&(i.minWidth>l.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f<this._proportionallyResizeElements.length;f++){var h=this._proportionallyResizeElements[f];if(!this.borderDif){var e=[h.css("borderTopWidth"),h.css("borderRightWidth"),h.css("borderBottomWidth"),h.css("borderLeftWidth")],j=[h.css("paddingTop"),h.css("paddingRight"),h.css("paddingBottom"),h.css("paddingLeft")];this.borderDif=c.map(e,function(l,n){var m=parseInt(l,10)||0,o=parseInt(j[n],10)||0;return m+o})}if(c.browser.msie&&!(!(c(g).is(":hidden")||c(g).parents(":hidden").length))){continue}h.css({height:(g.height()-this.borderDif[0]-this.borderDif[2])||0,width:(g.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var f=this.element,i=this.options;this.elementOffset=f.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/* + * jQuery hashchange event - v1.3 - 7/21/2010 + * http://benalman.com/projects/jquery-hashchange-plugin/ + * + * Copyright (c) 2010 "Cowboy" Ben Alman + * Dual licensed under the MIT and GPL licenses. + * http://benalman.com/about/license/ + */ +(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){r||l(a());n()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow;h.onpropertychange=function(){try{if(event.propertyName==="title"){q.document.title=h.title}}catch(s){}}}};j.stop=k;o=function(){return a(q.location.href)};l=function(v,s){var u=q.document,t=$.fn[c].domain;if(v!==s){u.title=h.title;u.open();t&&u.write('<script>document.domain="'+t+'"<\/script>');u.close();q.location.hash=v}}})();return j})()})(jQuery,this);(function(c){var a=c.scrollTo=function(f,e,d){c(window).scrollTo(f,e,d)};a.defaults={axis:"xy",duration:parseFloat(c.fn.jquery)>=1.3?0:1};a.window=function(d){return c(window)._scrollable()};c.fn._scrollable=function(){return this.map(function(){var e=this,d=!e.nodeName||c.inArray(e.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!d){return e}var f=(e.contentWindow||e).document||e.ownerDocument||e;return c.browser.safari||f.compatMode=="BackCompat"?f.body:f.documentElement})};c.fn.scrollTo=function(f,e,d){if(typeof e=="object"){d=e;e=0}if(typeof d=="function"){d={onAfter:d}}if(f=="max"){f=9000000000}d=c.extend({},a.defaults,d);e=e||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){e/=2}d.offset=b(d.offset);d.over=b(d.over);return this._scrollable().each(function(){var l=this,j=c(l),k=f,i,g={},m=j.is("html,body");switch(typeof k){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(k)){k=b(k);break}k=c(k,this);case"object":if(k.is||k.style){i=(k=c(k)).offset()}}c.each(d.axis.split(""),function(q,r){var s=r=="x"?"Left":"Top",u=s.toLowerCase(),p="scroll"+s,o=l[p],n=a.max(l,r);if(i){g[p]=i[u]+(m?0:o-j.offset()[u]);if(d.margin){g[p]-=parseInt(k.css("margin"+s))||0;g[p]-=parseInt(k.css("border"+s+"Width"))||0}g[p]+=d.offset[u]||0;if(d.over[u]){g[p]+=k[r=="x"?"width":"height"]()*d.over[u]}}else{var t=k[u];g[p]=t.slice&&t.slice(-1)=="%"?parseFloat(t)/100*n:t}if(/^\d+$/.test(g[p])){g[p]=g[p]<=0?0:Math.min(g[p],n)}if(!q&&d.queue){if(o!=g[p]){h(d.onAfterFirst)}delete g[p]}});h(d.onAfter);function h(n){j.animate(g,e,d.easing,n&&function(){n.call(this,f,d)})}}).end()};a.max=function(j,i){var h=i=="x"?"Width":"Height",e="scroll"+h;if(!c(j).is("html,body")){return j[e]-c(j)[h.toLowerCase()]()}var g="client"+h,f=j.ownerDocument.documentElement,d=j.ownerDocument.body;return Math.max(f[e],d[e])-Math.min(f[g],d[g])};function b(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);/* + PowerTip - v1.2.0 - 2013-04-03 + http://stevenbenner.github.com/jquery-powertip/ + Copyright (c) 2013 Steven Benner (http://stevenbenner.com/). + Released under MIT license. + https://raw.github.com/stevenbenner/jquery-powertip/master/LICENSE.txt +*/ +(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}}(function(k){var A=k(document),s=k(window),w=k("body");var n="displayController",e="hasActiveHover",d="forcedOpen",u="hasMouseMove",f="mouseOnToPopup",g="originalTitle",y="powertip",o="powertipjq",l="powertiptarget",E=180/Math.PI;var c={isTipOpen:false,isFixedTipOpen:false,isClosing:false,tipOpenImminent:false,activeHover:null,currentX:0,currentY:0,previousX:0,previousY:0,desyncTimeout:null,mouseTrackingActive:false,delayInProgress:false,windowWidth:0,windowHeight:0,scrollTop:0,scrollLeft:0};var p={none:0,top:1,bottom:2,left:4,right:8};k.fn.powerTip=function(F,N){if(!this.length){return this}if(k.type(F)==="string"&&k.powerTip[F]){return k.powerTip[F].call(this,this,N)}var O=k.extend({},k.fn.powerTip.defaults,F),G=new x(O);h();this.each(function M(){var R=k(this),Q=R.data(y),P=R.data(o),T=R.data(l),S;if(R.data(n)){k.powerTip.destroy(R)}S=R.attr("title");if(!Q&&!T&&!P&&S){R.data(y,S);R.data(g,S);R.removeAttr("title")}R.data(n,new t(R,O,G))});if(!O.manual){this.on({"mouseenter.powertip":function J(P){k.powerTip.show(this,P)},"mouseleave.powertip":function L(){k.powerTip.hide(this)},"focus.powertip":function K(){k.powerTip.show(this)},"blur.powertip":function H(){k.powerTip.hide(this,true)},"keydown.powertip":function I(P){if(P.keyCode===27){k.powerTip.hide(this,true)}}})}return this};k.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false};k.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};k.powerTip={show:function z(F,G){if(G){i(G);c.previousX=G.pageX;c.previousY=G.pageY;k(F).data(n).show()}else{k(F).first().data(n).show(true,true)}return F},reposition:function r(F){k(F).first().data(n).resetPosition();return F},hide:function D(G,F){if(G){k(G).first().data(n).hide(F)}else{if(c.activeHover){c.activeHover.data(n).hide(true)}}return G},destroy:function C(G){k(G).off(".powertip").each(function F(){var I=k(this),H=[g,n,e,d];if(I.data(g)){I.attr("title",I.data(g));H.push(y)}I.removeData(H)});return G}};k.powerTip.showTip=k.powerTip.show;k.powerTip.closeTip=k.powerTip.hide;function b(){var F=this;F.top="auto";F.left="auto";F.right="auto";F.bottom="auto";F.set=function(H,G){if(k.isNumeric(G)){F[H]=Math.round(G)}}}function t(K,N,F){var J=null;function L(P,Q){M();if(!K.data(e)){if(!P){c.tipOpenImminent=true;J=setTimeout(function O(){J=null;I()},N.intentPollInterval)}else{if(Q){K.data(d,true)}F.showTip(K)}}}function G(P){M();c.tipOpenImminent=false;if(K.data(e)){K.data(d,false);if(!P){c.delayInProgress=true;J=setTimeout(function O(){J=null;F.hideTip(K);c.delayInProgress=false},N.closeDelay)}else{F.hideTip(K)}}}function I(){var Q=Math.abs(c.previousX-c.currentX),O=Math.abs(c.previousY-c.currentY),P=Q+O;if(P<N.intentSensitivity){F.showTip(K)}else{c.previousX=c.currentX;c.previousY=c.currentY;L()}}function M(){J=clearTimeout(J);c.delayInProgress=false}function H(){F.resetPosition(K)}this.show=L;this.hide=G;this.cancel=M;this.resetPosition=H}function j(){function G(M,L,J,O,P){var K=L.split("-")[0],N=new b(),I;if(q(M)){I=H(M,K)}else{I=F(M,K)}switch(L){case"n":N.set("left",I.left-(J/2));N.set("bottom",c.windowHeight-I.top+P);break;case"e":N.set("left",I.left+P);N.set("top",I.top-(O/2));break;case"s":N.set("left",I.left-(J/2));N.set("top",I.top+P);break;case"w":N.set("top",I.top-(O/2));N.set("right",c.windowWidth-I.left+P);break;case"nw":N.set("bottom",c.windowHeight-I.top+P);N.set("right",c.windowWidth-I.left-20);break;case"nw-alt":N.set("left",I.left);N.set("bottom",c.windowHeight-I.top+P);break;case"ne":N.set("left",I.left-20);N.set("bottom",c.windowHeight-I.top+P);break;case"ne-alt":N.set("bottom",c.windowHeight-I.top+P);N.set("right",c.windowWidth-I.left);break;case"sw":N.set("top",I.top+P);N.set("right",c.windowWidth-I.left-20);break;case"sw-alt":N.set("left",I.left);N.set("top",I.top+P);break;case"se":N.set("left",I.left-20);N.set("top",I.top+P);break;case"se-alt":N.set("top",I.top+P);N.set("right",c.windowWidth-I.left);break}return N}function F(K,J){var O=K.offset(),N=K.outerWidth(),I=K.outerHeight(),M,L;switch(J){case"n":M=O.left+N/2;L=O.top;break;case"e":M=O.left+N;L=O.top+I/2;break;case"s":M=O.left+N/2;L=O.top+I;break;case"w":M=O.left;L=O.top+I/2;break;case"nw":M=O.left;L=O.top;break;case"ne":M=O.left+N;L=O.top;break;case"sw":M=O.left;L=O.top+I;break;case"se":M=O.left+N;L=O.top+I;break}return{top:L,left:M}}function H(O,K){var S=O.closest("svg")[0],N=O[0],W=S.createSVGPoint(),L=N.getBBox(),V=N.getScreenCTM(),M=L.width/2,Q=L.height/2,P=[],I=["nw","n","ne","e","se","s","sw","w"],U,X,R,T;function J(){P.push(W.matrixTransform(V))}W.x=L.x;W.y=L.y;J();W.x+=M;J();W.x+=M;J();W.y+=Q;J();W.y+=Q;J();W.x-=M;J();W.x-=M;J();W.y-=Q;J();if(P[0].y!==P[1].y||P[0].x!==P[7].x){X=Math.atan2(V.b,V.a)*E;R=Math.ceil(((X%360)-22.5)/45);if(R<1){R+=8}while(R--){I.push(I.shift())}}for(T=0;T<P.length;T++){if(I[T]===K){U=P[T];break}}return{top:U.y+c.scrollTop,left:U.x+c.scrollLeft}}this.compute=G}function x(Q){var P=new j(),O=k("#"+Q.popupId);if(O.length===0){O=k("<div/>",{id:Q.popupId});if(w.length===0){w=k("body")}w.append(O)}if(Q.followMouse){if(!O.data(u)){A.on("mousemove",M);s.on("scroll",M);O.data(u,true)}}if(Q.mouseOnToPopup){O.on({mouseenter:function L(){if(O.data(f)){if(c.activeHover){c.activeHover.data(n).cancel()}}},mouseleave:function N(){if(c.activeHover){c.activeHover.data(n).hide()}}})}function I(S){S.data(e,true);O.queue(function R(T){H(S);T()})}function H(S){var U;if(!S.data(e)){return}if(c.isTipOpen){if(!c.isClosing){K(c.activeHover)}O.delay(100).queue(function R(V){H(S);V()});return}S.trigger("powerTipPreRender");U=B(S);if(U){O.empty().append(U)}else{return}S.trigger("powerTipRender");c.activeHover=S;c.isTipOpen=true;O.data(f,Q.mouseOnToPopup);if(!Q.followMouse){G(S);c.isFixedTipOpen=true}else{M()}O.fadeIn(Q.fadeInTime,function T(){if(!c.desyncTimeout){c.desyncTimeout=setInterval(J,500)}S.trigger("powerTipOpen")})}function K(R){c.isClosing=true;c.activeHover=null;c.isTipOpen=false;c.desyncTimeout=clearInterval(c.desyncTimeout);R.data(e,false);R.data(d,false);O.fadeOut(Q.fadeOutTime,function S(){var T=new b();c.isClosing=false;c.isFixedTipOpen=false;O.removeClass();T.set("top",c.currentY+Q.offset);T.set("left",c.currentX+Q.offset);O.css(T);R.trigger("powerTipClose")})}function M(){if(!c.isFixedTipOpen&&(c.isTipOpen||(c.tipOpenImminent&&O.data(u)))){var R=O.outerWidth(),V=O.outerHeight(),U=new b(),S,T;U.set("top",c.currentY+Q.offset);U.set("left",c.currentX+Q.offset);S=m(U,R,V);if(S!==p.none){T=a(S);if(T===1){if(S===p.right){U.set("left",c.windowWidth-R)}else{if(S===p.bottom){U.set("top",c.scrollTop+c.windowHeight-V)}}}else{U.set("left",c.currentX-R-Q.offset);U.set("top",c.currentY-V-Q.offset)}}O.css(U)}}function G(S){var R,T;if(Q.smartPlacement){R=k.fn.powerTip.smartPlacementLists[Q.placement];k.each(R,function(U,W){var V=m(F(S,W),O.outerWidth(),O.outerHeight());T=W;if(V===p.none){return false}})}else{F(S,Q.placement);T=Q.placement}O.addClass(T)}function F(U,T){var R=0,S,W,V=new b();V.set("top",0);V.set("left",0);O.css(V);do{S=O.outerWidth();W=O.outerHeight();V=P.compute(U,T,S,W,Q.offset);O.css(V)}while(++R<=5&&(S!==O.outerWidth()||W!==O.outerHeight()));return V}function J(){var R=false;if(c.isTipOpen&&!c.isClosing&&!c.delayInProgress){if(c.activeHover.data(e)===false||c.activeHover.is(":disabled")){R=true}else{if(!v(c.activeHover)&&!c.activeHover.is(":focus")&&!c.activeHover.data(d)){if(O.data(f)){if(!v(O)){R=true}}else{R=true}}}if(R){K(c.activeHover)}}}this.showTip=I;this.hideTip=K;this.resetPosition=G}function q(F){return window.SVGElement&&F[0] instanceof SVGElement}function h(){if(!c.mouseTrackingActive){c.mouseTrackingActive=true;k(function H(){c.scrollLeft=s.scrollLeft();c.scrollTop=s.scrollTop();c.windowWidth=s.width();c.windowHeight=s.height()});A.on("mousemove",i);s.on({resize:function G(){c.windowWidth=s.width();c.windowHeight=s.height()},scroll:function F(){var I=s.scrollLeft(),J=s.scrollTop();if(I!==c.scrollLeft){c.currentX+=I-c.scrollLeft;c.scrollLeft=I}if(J!==c.scrollTop){c.currentY+=J-c.scrollTop;c.scrollTop=J}}})}}function i(F){c.currentX=F.pageX;c.currentY=F.pageY}function v(F){var H=F.offset(),J=F[0].getBoundingClientRect(),I=J.right-J.left,G=J.bottom-J.top;return c.currentX>=H.left&&c.currentX<=H.left+I&&c.currentY>=H.top&&c.currentY<=H.top+G}function B(I){var G=I.data(y),F=I.data(o),K=I.data(l),H,J;if(G){if(k.isFunction(G)){G=G.call(I[0])}J=G}else{if(F){if(k.isFunction(F)){F=F.call(I[0])}if(F.length>0){J=F.clone(true,true)}}else{if(K){H=k("#"+K);if(H.length>0){J=H.html()}}}}return J}function m(M,L,K){var G=c.scrollTop,J=c.scrollLeft,I=G+c.windowHeight,F=J+c.windowWidth,H=p.none;if(M.top<G||Math.abs(M.bottom-c.windowHeight)-K<G){H|=p.top}if(M.top+K>I||Math.abs(M.bottom-c.windowHeight)>I){H|=p.bottom}if(M.left<J||M.right+L>F){H|=p.left}if(M.left+L>F||M.right<J){H|=p.right}return H}function a(G){var F=0;while(G){G&=G-1;F++}return F}})); \ No newline at end of file diff --git a/libdap/docs/nav_f.png b/libdap/docs/nav_f.png new file mode 100755 index 0000000000000000000000000000000000000000..72a58a529ed3a9ed6aa0c51a79cf207e026deee2 Binary files /dev/null and b/libdap/docs/nav_f.png differ diff --git a/libdap/docs/nav_g.png b/libdap/docs/nav_g.png new file mode 100755 index 0000000000000000000000000000000000000000..2093a237a94f6c83e19ec6e5fd42f7ddabdafa81 Binary files /dev/null and b/libdap/docs/nav_g.png differ diff --git a/libdap/docs/nav_h.png b/libdap/docs/nav_h.png new file mode 100755 index 0000000000000000000000000000000000000000..33389b101d9cd9b4c98ad286b5d9c46a6671f650 Binary files /dev/null and b/libdap/docs/nav_h.png differ diff --git a/libdap/docs/open.png b/libdap/docs/open.png new file mode 100755 index 0000000000000000000000000000000000000000..30f75c7efe2dd0c9e956e35b69777a02751f048b Binary files /dev/null and b/libdap/docs/open.png differ diff --git a/libdap/docs/search/all_0.html b/libdap/docs/search/all_0.html new file mode 100755 index 0000000000000000000000000000000000000000..d54e0bd8eab93c9e5717887cb1cb7cf402c9150f --- /dev/null +++ b/libdap/docs/search/all_0.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_0.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_0.js b/libdap/docs/search/all_0.js new file mode 100755 index 0000000000000000000000000000000000000000..2e4c370d8319bd93a387ea88034c29ad8587206a --- /dev/null +++ b/libdap/docs/search/all_0.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['_5fcalculate_5fload',['_calculate_load',['../dap__cpu__monitor_8c.html#aa50e51d75d2dcdcbddb1cf40b1df2f3c',1,'dap_cpu_monitor.c']]], + ['_5fcpu_5fold_5fstats',['_cpu_old_stats',['../dap__cpu__monitor_8c.html#a01fc76df94fc3adf860bc4f7bbe23abb',1,'dap_cpu_monitor.c']]], + ['_5fcpu_5fstats',['_cpu_stats',['../dap__cpu__monitor_8c.html#a44d7b6d3df547ba454b836b65ec25611',1,'dap_cpu_monitor.c']]], + ['_5fcpu_5fsummary_5fold',['_cpu_summary_old',['../dap__cpu__monitor_8c.html#a98ed3bdb3fed3d87f29f0bf84b51ba95',1,'dap_cpu_monitor.c']]], + ['_5fdeserealize_5fproc_5fstat',['_deserealize_proc_stat',['../dap__cpu__monitor_8c.html#a51b82e6ec3267ae57ef002e96e620151',1,'dap_cpu_monitor.c']]], + ['_5fget_5fprocess_5fmemory',['_get_process_memory',['../dap__process__memory_8c.html#abd2440928361cfe4eb3e1be0f3963a99',1,'dap_process_memory.c']]], + ['_5finternal',['_internal',['../structdap__config.html#a1fddb1b8266f833975a1843cc0a97f89',1,'dap_config']]], + ['_5flog_5fit',['_log_it',['../dap__common_8c.html#a56adb48b934d8b79d98f2be87d3a5df3',1,'_log_it(const char *log_tag, enum log_level ll, const char *format,...): dap_common.c'],['../dap__common_8h.html#acbe3239b788dc1105a094596354a7e42',1,'_log_it(const char *log_tag, enum log_level, const char *format,...): dap_common.c']]], + ['_5fparse_5fsize_5fline',['_parse_size_line',['../dap__process__memory_8c.html#a12bc84267b098d654c3a5239f2db9421',1,'dap_process_memory.c']]], + ['_5fproc_5fstat',['_proc_stat',['../dap__cpu__monitor_8c.html#a857f823e882aa77331ba7dfdd7d5d1ce',1,'dap_cpu_monitor.c']]], + ['_5fvlog_5fit',['_vlog_it',['../dap__common_8c.html#ac7f5cf32897e09c2eacfcf163787ccef',1,'_vlog_it(const char *log_tag, enum log_level ll, const char *format, va_list ap): dap_common.c'],['../dap__common_8h.html#ab3ae03011f7dfbbf40dce01f7bdd4157',1,'_vlog_it(const char *log_tag, enum log_level, const char *format, va_list ap): dap_common.c']]] +]; diff --git a/libdap/docs/search/all_1.html b/libdap/docs/search/all_1.html new file mode 100755 index 0000000000000000000000000000000000000000..8cc6a1de90573d362d4c4eae5248f0243b8a8c8c --- /dev/null +++ b/libdap/docs/search/all_1.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_1.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_1.js b/libdap/docs/search/all_1.js new file mode 100755 index 0000000000000000000000000000000000000000..55935f69d653f394e705a0a2d86c7a63d077dce0 --- /dev/null +++ b/libdap/docs/search/all_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['array_5flength',['array_length',['../structdap__config__item.html#a1356be094234835635d452d5c2275e51',1,'dap_config_item']]] +]; diff --git a/libdap/docs/search/all_10.html b/libdap/docs/search/all_10.html new file mode 100755 index 0000000000000000000000000000000000000000..c25484f20885b8a49e0e53451dcce9893f17a077 --- /dev/null +++ b/libdap/docs/search/all_10.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_10.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_10.js b/libdap/docs/search/all_10.js new file mode 100755 index 0000000000000000000000000000000000000000..5284da6033c5af18ef0d7218dd92044cd5275638 --- /dev/null +++ b/libdap/docs/search/all_10.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['time_5fto_5frfc822',['time_to_rfc822',['../dap__common_8c.html#a6ab10606e8ac33dd93a0526933b192c8',1,'time_to_rfc822(char *out, size_t out_size_max, time_t t): dap_common.c'],['../dap__common_8h.html#a6ab10606e8ac33dd93a0526933b192c8',1,'time_to_rfc822(char *out, size_t out_size_max, time_t t): dap_common.c']]], + ['total',['total',['../structproc__stat__line.html#aaace759e4cb4ff95a881cbbdb4be8610',1,'proc_stat_line']]], + ['total_5ftime',['total_time',['../structdap__cpu.html#a0c983a38d28e1a302edbbd7c7f0817ab',1,'dap_cpu']]] +]; diff --git a/libdap/docs/search/all_11.html b/libdap/docs/search/all_11.html new file mode 100755 index 0000000000000000000000000000000000000000..3615c2815f03d5f227fa06ea6122cd63c6e48856 --- /dev/null +++ b/libdap/docs/search/all_11.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_11.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_11.js b/libdap/docs/search/all_11.js new file mode 100755 index 0000000000000000000000000000000000000000..ffabac56b00a3f80bb288e1bc084cf2047748fad --- /dev/null +++ b/libdap/docs/search/all_11.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['user',['user',['../structproc__stat__line.html#a402884026456bc19d3786dc06fb6c5fb',1,'proc_stat_line']]] +]; diff --git a/libdap/docs/search/all_12.html b/libdap/docs/search/all_12.html new file mode 100755 index 0000000000000000000000000000000000000000..abd082a5e7e38447007decbb032a1aef12eb231a --- /dev/null +++ b/libdap/docs/search/all_12.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_12.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_12.js b/libdap/docs/search/all_12.js new file mode 100755 index 0000000000000000000000000000000000000000..e03281de3e1e8ea2109987d06d38888616335784 --- /dev/null +++ b/libdap/docs/search/all_12.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['vlog_5fit',['vlog_it',['../dap__common_8h.html#ab53061ef6723b1e4a233022ef9f33c76',1,'dap_common.h']]], + ['vsz',['vsz',['../structdap__process__memory.html#a60efb3269151a8f5c8b25a4ada69835f',1,'dap_process_memory']]] +]; diff --git a/libdap/docs/search/all_2.html b/libdap/docs/search/all_2.html new file mode 100755 index 0000000000000000000000000000000000000000..d15ac65f7c50bc335b7920bc157c8001e89ee22c --- /dev/null +++ b/libdap/docs/search/all_2.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_2.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_2.js b/libdap/docs/search/all_2.js new file mode 100755 index 0000000000000000000000000000000000000000..cd9eaa7c65231b2660c3cfd9ae890c03738c93e8 --- /dev/null +++ b/libdap/docs/search/all_2.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['b64_5fdecode',['B64_Decode',['../dap__enc__base64_8c.html#a304d3393507ac334c690719e7b66ac23',1,'B64_Decode(const char *srcChars, int srcLen, byte *outBytes): dap_enc_base64.c'],['../dap__enc__base64_8c.html#a9c3b4adc7a6fcdf700700d55b2c924ed',1,'b64_decode(const char *, size_t): dap_enc_base64.c']]], + ['b64_5fdecode_5fex',['b64_decode_ex',['../dap__enc__base64_8c.html#aea8b5297189d223a48f1886e692546e4',1,'dap_enc_base64.c']]], + ['b64_5fdecodebyte',['B64_DecodeByte',['../dap__enc__base64_8c.html#ab0f10f3342a3055e4c98fb6bcec20c96',1,'dap_enc_base64.c']]], + ['b64_5fencode',['b64_encode',['../dap__enc__base64_8c.html#a9a9b842a784b5202e1ab4eed1c156d00',1,'b64_encode(const unsigned char *, size_t): dap_enc_base64.c'],['../dap__enc__base64_8c.html#af3bd7d29d6866e2c15040e710077bdf4',1,'B64_Encode(const byte *srcBytes, int srcLen, char *outChars): dap_enc_base64.c']]], + ['b64_5fencodebyte',['B64_EncodeByte',['../dap__enc__base64_8c.html#a2ec720931ba76ef3cccc8e23b2e186f9',1,'dap_enc_base64.c']]], + ['b64_5fgetsize',['B64_GetSize',['../dap__enc__base64_8c.html#aa785023e6318312a858628ac75c09cfc',1,'dap_enc_base64.c']]], + ['b64_5fmalloc',['b64_malloc',['../dap__enc__base64_8c.html#a221b9c9698df0aa156ee2a33072ff9b4',1,'dap_enc_base64.c']]], + ['b64_5frealloc',['b64_realloc',['../dap__enc__base64_8c.html#a4750e31a6a2f09d3ef3e1962e25d8592',1,'dap_enc_base64.c']]], + ['b64_5fstandart_5ftable',['b64_standart_table',['../dap__enc__base64_8c.html#afb28b1f82335ab68b1a7e6dc582eefc7',1,'dap_enc_base64.c']]], + ['b64_5ftable_5fby_5fstandard',['b64_table_by_standard',['../dap__enc__base64_8c.html#a7f71c6f222b5b8122b2240df6c9b3fa0',1,'dap_enc_base64.c']]], + ['b64_5ftable_5furl_5fsafe',['b64_table_url_safe',['../dap__enc__base64_8c.html#a9c8315f27143b78bd7dd570c8c4168a1',1,'dap_enc_base64.c']]], + ['break_5flatency',['break_latency',['../dap__common_8c.html#af4baddcad4576299c1c44f1822c799fc',1,'dap_common.c']]], + ['breaker_5fset',['breaker_set',['../dap__common_8c.html#abd3c99eacca06234a6e4411a5ff0ae22',1,'dap_common.c']]], + ['byte',['byte',['../dap__enc__base64_8c.html#a0c8186d9b9b7880309c27230bbb5e69d',1,'dap_enc_base64.c']]] +]; diff --git a/libdap/docs/search/all_3.html b/libdap/docs/search/all_3.html new file mode 100755 index 0000000000000000000000000000000000000000..9f526c67cd4f63a2ff5a6c2bb2e3741036ee3158 --- /dev/null +++ b/libdap/docs/search/all_3.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_3.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_3.js b/libdap/docs/search/all_3.js new file mode 100755 index 0000000000000000000000000000000000000000..f6fd8f8f0291766072508a566b6771cf4039ac6f --- /dev/null +++ b/libdap/docs/search/all_3.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['childs',['childs',['../structdap__config__item.html#a0d5f05c91c5195732960516a5395e39a',1,'dap_config_item']]], + ['cpu',['cpu',['../structproc__stat__line.html#ae4a4c7a21577e98720547dc33a58f51c',1,'proc_stat_line']]], + ['cpu_5fcores_5fcount',['cpu_cores_count',['../structdap__cpu__stats.html#a2a4a244c6c716b5e25483ca67a69f7c9',1,'dap_cpu_stats']]], + ['cpu_5fsummary',['cpu_summary',['../structdap__cpu__stats.html#a173285c53062dc49c248d7048c944a6a',1,'dap_cpu_stats']]], + ['cpus',['cpus',['../structdap__cpu__stats.html#ad6e495ab156770ce147fe1f20bfe6562',1,'dap_cpu_stats']]] +]; diff --git a/libdap/docs/search/all_4.html b/libdap/docs/search/all_4.html new file mode 100755 index 0000000000000000000000000000000000000000..7b814aa94777c59280fe2b08e10eeb24c82d5b2d --- /dev/null +++ b/libdap/docs/search/all_4.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_4.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_4.js b/libdap/docs/search/all_4.js new file mode 100755 index 0000000000000000000000000000000000000000..46187507122fb79132b68b06ff6f47d0c708dcc5 --- /dev/null +++ b/libdap/docs/search/all_4.js @@ -0,0 +1,69 @@ +var searchData= +[ + ['daemonize_5fprocess',['daemonize_process',['../dap__process__manager_8c.html#abeda31c74acff5c32d5952efd3c534fc',1,'dap_process_manager.c']]], + ['dap_5fcommon_2ec',['dap_common.c',['../dap__common_8c.html',1,'']]], + ['dap_5fcommon_2eh',['dap_common.h',['../dap__common_8h.html',1,'']]], + ['dap_5fcommon_5fdeinit',['dap_common_deinit',['../dap__common_8c.html#adf17f0c9b75afc0078ab0fc56c0eec98',1,'dap_common_deinit(): dap_common.c'],['../dap__common_8h.html#ab96d7e843bc09468220a7d264295cf69',1,'dap_common_deinit(void): dap_common.c']]], + ['dap_5fcommon_5finit',['dap_common_init',['../dap__common_8c.html#aff6dc9e558a255f56618643f5be92b08',1,'dap_common_init(const char *a_log_file): dap_common.c'],['../dap__common_8h.html#aff6dc9e558a255f56618643f5be92b08',1,'dap_common_init(const char *a_log_file): dap_common.c']]], + ['dap_5fconfig',['dap_config',['../structdap__config.html',1,'']]], + ['dap_5fconfig_2ec',['dap_config.c',['../dap__config_8c.html',1,'']]], + ['dap_5fconfig_2eh',['dap_config.h',['../dap__config_8h.html',1,'']]], + ['dap_5fconfig_5fclose',['dap_config_close',['../dap__config_8c.html#ac40f9a095d00df268967293c5ea3f9df',1,'dap_config_close(dap_config_t *a_config): dap_config.c'],['../dap__config_8h.html#ac40f9a095d00df268967293c5ea3f9df',1,'dap_config_close(dap_config_t *a_config): dap_config.c']]], + ['dap_5fconfig_5fdeinit',['dap_config_deinit',['../dap__config_8c.html#a009960bd1586e17ec29cc646a2a5939c',1,'dap_config_deinit(): dap_config.c'],['../dap__config_8h.html#a009960bd1586e17ec29cc646a2a5939c',1,'dap_config_deinit(): dap_config.c']]], + ['dap_5fconfig_5fget_5farray_5fstr',['dap_config_get_array_str',['../dap__config_8c.html#a1785c0169c29d415206b02e1c4e9adb8',1,'dap_config_get_array_str(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, uint16_t *array_length): dap_config.c'],['../dap__config_8h.html#a1785c0169c29d415206b02e1c4e9adb8',1,'dap_config_get_array_str(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, uint16_t *array_length): dap_config.c']]], + ['dap_5fconfig_5fget_5fitem',['dap_config_get_item',['../dap__config_8c.html#a5d825008b72bc795b56abc39957bbdd2',1,'dap_config.c']]], + ['dap_5fconfig_5fget_5fitem_5fbool',['dap_config_get_item_bool',['../dap__config_8c.html#a7e4ce808bc4be2312b4e051bc9210d45',1,'dap_config_get_item_bool(dap_config_t *a_config, const char *a_section_path, const char *a_item_name): dap_config.c'],['../dap__config_8h.html#a7e4ce808bc4be2312b4e051bc9210d45',1,'dap_config_get_item_bool(dap_config_t *a_config, const char *a_section_path, const char *a_item_name): dap_config.c']]], + ['dap_5fconfig_5fget_5fitem_5fbool_5fdefault',['dap_config_get_item_bool_default',['../dap__config_8c.html#a4ce7c5465324c6f6e3c9d490d1fc4e1f',1,'dap_config_get_item_bool_default(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, bool a_default): dap_config.c'],['../dap__config_8h.html#a4ce7c5465324c6f6e3c9d490d1fc4e1f',1,'dap_config_get_item_bool_default(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, bool a_default): dap_config.c']]], + ['dap_5fconfig_5fget_5fitem_5fdouble',['dap_config_get_item_double',['../dap__config_8c.html#ad19c0ac2fc89b73589b32754750dc0c2',1,'dap_config_get_item_double(dap_config_t *a_config, const char *a_section_path, const char *a_item_name): dap_config.c'],['../dap__config_8h.html#ad19c0ac2fc89b73589b32754750dc0c2',1,'dap_config_get_item_double(dap_config_t *a_config, const char *a_section_path, const char *a_item_name): dap_config.c']]], + ['dap_5fconfig_5fget_5fitem_5fint32',['dap_config_get_item_int32',['../dap__config_8c.html#add7283ed9237378bb38f2bd8f891efa3',1,'dap_config_get_item_int32(dap_config_t *a_config, const char *a_section_path, const char *a_item_name): dap_config.c'],['../dap__config_8h.html#add7283ed9237378bb38f2bd8f891efa3',1,'dap_config_get_item_int32(dap_config_t *a_config, const char *a_section_path, const char *a_item_name): dap_config.c']]], + ['dap_5fconfig_5fget_5fitem_5fint32_5fdefault',['dap_config_get_item_int32_default',['../dap__config_8c.html#a5965237dd87b494bbe2367e104c3b8f0',1,'dap_config_get_item_int32_default(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, int32_t a_default): dap_config.c'],['../dap__config_8h.html#a5965237dd87b494bbe2367e104c3b8f0',1,'dap_config_get_item_int32_default(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, int32_t a_default): dap_config.c']]], + ['dap_5fconfig_5fget_5fitem_5fstr',['dap_config_get_item_str',['../dap__config_8c.html#affddb2eeef241ec37560794b2c90d0ec',1,'dap_config_get_item_str(dap_config_t *a_config, const char *a_section_path, const char *a_item_name): dap_config.c'],['../dap__config_8h.html#affddb2eeef241ec37560794b2c90d0ec',1,'dap_config_get_item_str(dap_config_t *a_config, const char *a_section_path, const char *a_item_name): dap_config.c']]], + ['dap_5fconfig_5fget_5fitem_5fstr_5fdefault',['dap_config_get_item_str_default',['../dap__config_8c.html#ae341b2585e28b4b72ae91a00d86532d9',1,'dap_config_get_item_str_default(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, const char *a_value_default): dap_config.c'],['../dap__config_8h.html#ae341b2585e28b4b72ae91a00d86532d9',1,'dap_config_get_item_str_default(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, const char *a_value_default): dap_config.c']]], + ['dap_5fconfig_5finit',['dap_config_init',['../dap__config_8c.html#a3843f4acdf67f2499f2437d69097cba1',1,'dap_config_init(const char *a_configs_path): dap_config.c'],['../dap__config_8h.html#a3843f4acdf67f2499f2437d69097cba1',1,'dap_config_init(const char *a_configs_path): dap_config.c']]], + ['dap_5fconfig_5finternal',['dap_config_internal',['../structdap__config__internal.html',1,'dap_config_internal'],['../dap__config_8c.html#afd640ddb34b9b70d1bdde0498e135b28',1,'DAP_CONFIG_INTERNAL(): dap_config.c']]], + ['dap_5fconfig_5finternal_5ft',['dap_config_internal_t',['../dap__config_8c.html#a0d4df0d8066c51ebc87edddaca70c813',1,'dap_config.c']]], + ['dap_5fconfig_5fitem',['dap_config_item',['../structdap__config__item.html',1,'']]], + ['dap_5fconfig_5fitem_5ft',['dap_config_item_t',['../dap__config_8c.html#a68fb401f4e3f45764f501c080845750d',1,'dap_config.c']]], + ['dap_5fconfig_5fopen',['dap_config_open',['../dap__config_8c.html#a67254031cc34dcf6f7635f35d3dd22d1',1,'dap_config_open(const char *a_name): dap_config.c'],['../dap__config_8h.html#a67254031cc34dcf6f7635f35d3dd22d1',1,'dap_config_open(const char *a_name): dap_config.c']]], + ['dap_5fconfig_5ft',['dap_config_t',['../dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701',1,'dap_config.h']]], + ['dap_5fcpu',['dap_cpu',['../structdap__cpu.html',1,'']]], + ['dap_5fcpu_5fget_5fstats',['dap_cpu_get_stats',['../dap__cpu__monitor_8c.html#af97c8ce690c4a7e1a6d9177f76200862',1,'dap_cpu_get_stats(): dap_cpu_monitor.c'],['../dap__cpu__monitor_8h.html#ac8909ba058fd37e5465b7c64e9b3681e',1,'dap_cpu_get_stats(void): dap_cpu_monitor.c']]], + ['dap_5fcpu_5fmonitor_2ec',['dap_cpu_monitor.c',['../dap__cpu__monitor_8c.html',1,'']]], + ['dap_5fcpu_5fmonitor_2eh',['dap_cpu_monitor.h',['../dap__cpu__monitor_8h.html',1,'']]], + ['dap_5fcpu_5fmonitor_5fdeinit',['dap_cpu_monitor_deinit',['../dap__cpu__monitor_8c.html#ac18ced28d70e9117fae3759db759e2fb',1,'dap_cpu_monitor_deinit(): dap_cpu_monitor.c'],['../dap__cpu__monitor_8h.html#a8644f85c62710685c7c5c3624e4aadc8',1,'dap_cpu_monitor_deinit(void): dap_cpu_monitor.c']]], + ['dap_5fcpu_5fmonitor_5finit',['dap_cpu_monitor_init',['../dap__cpu__monitor_8c.html#a41c2f779847e3d67124dfde1fe0640b7',1,'dap_cpu_monitor_init(): dap_cpu_monitor.c'],['../dap__cpu__monitor_8h.html#a74565d8e36cf559a22aefa4a070a4e52',1,'dap_cpu_monitor_init(void): dap_cpu_monitor.c']]], + ['dap_5fcpu_5fstats',['dap_cpu_stats',['../structdap__cpu__stats.html',1,'']]], + ['dap_5fcpu_5fstats_5ft',['dap_cpu_stats_t',['../dap__cpu__monitor_8h.html#a71734313dfad90003700e30dbbd5dbe4',1,'dap_cpu_monitor.h']]], + ['dap_5fcpu_5ft',['dap_cpu_t',['../dap__cpu__monitor_8h.html#a07c777b976f756102607b683d5969c7d',1,'dap_cpu_monitor.h']]], + ['dap_5fdelete',['DAP_DELETE',['../dap__common_8h.html#abc94d3603906f97d0ce7368f44eebf8b',1,'dap_common.h']]], + ['dap_5fdup',['DAP_DUP',['../dap__common_8h.html#a7303c16a9766b284e07bd6790d65b59e',1,'dap_common.h']]], + ['dap_5fenc_5fb64_5fstandard',['dap_enc_b64_standard',['../dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7',1,'dap_enc_base64.h']]], + ['dap_5fenc_5fb64_5fstandard_5ft',['dap_enc_b64_standard_t',['../dap__enc__base64_8h.html#ae47fdbc3967e395dac8f30599961f45d',1,'dap_enc_base64.h']]], + ['dap_5fenc_5fbase64_2ec',['dap_enc_base64.c',['../dap__enc__base64_8c.html',1,'']]], + ['dap_5fenc_5fbase64_2eh',['dap_enc_base64.h',['../dap__enc__base64_8h.html',1,'']]], + ['dap_5fenc_5fbase64_5fdecode',['dap_enc_base64_decode',['../dap__enc__base64_8c.html#a09bda17a1fce52c2d9740ad9852fbb98',1,'dap_enc_base64_decode(const char *in, size_t in_size, void *out, dap_enc_b64_standard_t standard): dap_enc_base64.c'],['../dap__enc__base64_8h.html#a09bda17a1fce52c2d9740ad9852fbb98',1,'dap_enc_base64_decode(const char *in, size_t in_size, void *out, dap_enc_b64_standard_t standard): dap_enc_base64.c']]], + ['dap_5fenc_5fbase64_5fencode',['dap_enc_base64_encode',['../dap__enc__base64_8c.html#a542e3fd8a5dd6116cb1e6bd48361a5cc',1,'dap_enc_base64_encode(const void *a_in, size_t a_in_size, char *a_out, dap_enc_b64_standard_t standard): dap_enc_base64.c'],['../dap__enc__base64_8h.html#ad164a1a38bbeab9485bd283c185fe557',1,'dap_enc_base64_encode(const void *in, size_t in_size, char *out, dap_enc_b64_standard_t standard): dap_enc_base64.c']]], + ['dap_5fenc_5fbase64_5fencode_5fsize',['DAP_ENC_BASE64_ENCODE_SIZE',['../dap__enc__base64_8h.html#a441f115386986f22872acd70d7d04736',1,'dap_enc_base64.h']]], + ['dap_5fenc_5fstandard_5fb64',['DAP_ENC_STANDARD_B64',['../dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7a684c2e012891c1ffc99a50250aa9e03b',1,'dap_enc_base64.h']]], + ['dap_5fenc_5fstandard_5fb64_5furlsafe',['DAP_ENC_STANDARD_B64_URLSAFE',['../dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7a14e31e001657e974079cd81873eadf32',1,'dap_enc_base64.h']]], + ['dap_5fnew',['DAP_NEW',['../dap__common_8h.html#a74a9d9e85c7cc12c155f147d9a971cad',1,'dap_common.h']]], + ['dap_5fnew_5fsize',['DAP_NEW_SIZE',['../dap__common_8h.html#a80373ba28489011c16cd76f6d0ba5b53',1,'dap_common.h']]], + ['dap_5fnew_5fz',['DAP_NEW_Z',['../dap__common_8h.html#a9270d1341aa00be475591ecfa8985c08',1,'dap_common.h']]], + ['dap_5fnew_5fz_5fsize',['DAP_NEW_Z_SIZE',['../dap__common_8h.html#ad0f1f3c74154c73a5dfd33598dfd375b',1,'dap_common.h']]], + ['dap_5fprocess_5fmanager_2ec',['dap_process_manager.c',['../dap__process__manager_8c.html',1,'']]], + ['dap_5fprocess_5fmanager_2eh',['dap_process_manager.h',['../dap__process__manager_8h.html',1,'']]], + ['dap_5fprocess_5fmemory',['dap_process_memory',['../structdap__process__memory.html',1,'']]], + ['dap_5fprocess_5fmemory_2ec',['dap_process_memory.c',['../dap__process__memory_8c.html',1,'']]], + ['dap_5fprocess_5fmemory_2eh',['dap_process_memory.h',['../dap__process__memory_8h.html',1,'']]], + ['dap_5fprocess_5fmemory_5ft',['dap_process_memory_t',['../dap__process__memory_8h.html#a9eb3c4be5e9b4a8738730a15bb190555',1,'dap_process_memory.h']]], + ['dap_5fprotocol_5fversion',['DAP_PROTOCOL_VERSION',['../dap__common_8h.html#a9757f0cc77df1fd0759b1b91a9f63ff0',1,'dap_common.h']]], + ['dap_5frandom_5fstring_5fcreate_5falloc',['dap_random_string_create_alloc',['../dap__common_8c.html#aabbc0306fee1c3a56540b1604bbb516c',1,'dap_random_string_create_alloc(size_t a_length): dap_common.c'],['../dap__common_8h.html#aabbc0306fee1c3a56540b1604bbb516c',1,'dap_random_string_create_alloc(size_t a_length): dap_common.c']]], + ['dap_5frandom_5fstring_5ffill',['dap_random_string_fill',['../dap__common_8c.html#a3fa34950395c0139c5c95510de7119a8',1,'dap_random_string_fill(char *str, size_t length): dap_common.c'],['../dap__common_8h.html#a3fa34950395c0139c5c95510de7119a8',1,'dap_random_string_fill(char *str, size_t length): dap_common.c']]], + ['dap_5fset_5flog_5ftag_5fwidth',['dap_set_log_tag_width',['../dap__common_8c.html#ac8d0df7015664c720b27ee4f6e660479',1,'dap_set_log_tag_width(size_t width): dap_common.c'],['../dap__common_8h.html#ac8d0df7015664c720b27ee4f6e660479',1,'dap_set_log_tag_width(size_t width): dap_common.c']]], + ['data_5fbool',['data_bool',['../structdap__config__item.html#a968b000deb88effc230e70d0d9c66a92',1,'dap_config_item']]], + ['data_5fdouble',['data_double',['../structdap__config__item.html#ac6ac02cf0dd1be8351d88377d13a2334',1,'dap_config_item']]], + ['data_5fint32',['data_int32',['../structdap__config__item.html#a454d9855bc02ab4ea83ae024ea68a790',1,'dap_config_item']]], + ['data_5fstr',['data_str',['../structdap__config__item.html#a58fbfb4c01c1129eefb20396925b4bc4',1,'dap_config_item']]], + ['data_5fstr_5farray',['data_str_array',['../structdap__config__item.html#ac875bc711381a9cdd1422a41f8cc217d',1,'dap_config_item']]], + ['data_5fuint8',['data_uint8',['../structdap__config__item.html#ae6bac770c57d935696cb93c6a7e60266',1,'dap_config_item']]] +]; diff --git a/libdap/docs/search/all_5.html b/libdap/docs/search/all_5.html new file mode 100755 index 0000000000000000000000000000000000000000..d8de5560e288efe418f9337af78f74eab6da6856 --- /dev/null +++ b/libdap/docs/search/all_5.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_5.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_5.js b/libdap/docs/search/all_5.js new file mode 100755 index 0000000000000000000000000000000000000000..114f44a86cf3e07b28bbd3e67f606e7971b03815 --- /dev/null +++ b/libdap/docs/search/all_5.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['exec_5fwith_5fret',['exec_with_ret',['../dap__common_8c.html#a00992fd7732b0ff40ce020728f84bc3a',1,'exec_with_ret(const char *a_cmd): dap_common.c'],['../dap__common_8h.html#a00992fd7732b0ff40ce020728f84bc3a',1,'exec_with_ret(const char *a_cmd): dap_common.c']]], + ['exec_5fwith_5fret_5fmultistring',['exec_with_ret_multistring',['../dap__common_8c.html#aa4a4c13332f14e44630f5e269048249a',1,'exec_with_ret_multistring(const char *a_cmd): dap_common.c'],['../dap__common_8h.html#aa4a4c13332f14e44630f5e269048249a',1,'exec_with_ret_multistring(const char *a_cmd): dap_common.c']]] +]; diff --git a/libdap/docs/search/all_6.html b/libdap/docs/search/all_6.html new file mode 100755 index 0000000000000000000000000000000000000000..9ba0cc2b4d1d07e0549a721b725643e759a465d2 --- /dev/null +++ b/libdap/docs/search/all_6.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_6.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_6.js b/libdap/docs/search/all_6.js new file mode 100755 index 0000000000000000000000000000000000000000..bc84c3307df06a25b0ec8f9af7dc0bb1319c87de --- /dev/null +++ b/libdap/docs/search/all_6.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['get_5farray_5flength',['get_array_length',['../dap__config_8c.html#af8c517b0bd6ca2b9ab2e3fbf2dbdf707',1,'dap_config.c']]], + ['get_5fpid_5ffrom_5ffile',['get_pid_from_file',['../dap__process__manager_8c.html#a3d03c30d6144592382149beaef1019b9',1,'dap_process_manager.c']]], + ['get_5fproc_5fmem_5fby_5fpid',['get_proc_mem_by_pid',['../dap__process__memory_8c.html#a30800f14d0a84a92a23429eac85a7f5d',1,'get_proc_mem_by_pid(pid_t pid): dap_process_memory.c'],['../dap__process__memory_8h.html#a30800f14d0a84a92a23429eac85a7f5d',1,'get_proc_mem_by_pid(pid_t pid): dap_process_memory.c']]], + ['get_5fproc_5fmem_5fcurrent',['get_proc_mem_current',['../dap__process__memory_8c.html#aca5c54866cc33715a7da93bfaed39a1d',1,'get_proc_mem_current(void): dap_process_memory.c'],['../dap__process__memory_8h.html#aca5c54866cc33715a7da93bfaed39a1d',1,'get_proc_mem_current(void): dap_process_memory.c']]], + ['get_5fselect_5fbreaker',['get_select_breaker',['../dap__common_8c.html#a770a25cd7afda213e944f715a27f1e7c',1,'get_select_breaker(): dap_common.c'],['../dap__common_8h.html#ab027eeb728bcf25f75bc592fc627e4fe',1,'get_select_breaker(void): dap_common.c']]], + ['guest',['guest',['../structproc__stat__line.html#aaf57de8eaf10ecf4cb98a95db8d15ab6',1,'proc_stat_line']]], + ['guest_5fnice',['guest_nice',['../structproc__stat__line.html#aa9149e2bf80b103cee1cd83748cdf34b',1,'proc_stat_line']]] +]; diff --git a/libdap/docs/search/all_7.html b/libdap/docs/search/all_7.html new file mode 100755 index 0000000000000000000000000000000000000000..9384ec9b3b1c9bf4142b4326be5b6209bc1e13aa --- /dev/null +++ b/libdap/docs/search/all_7.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_7.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_7.js b/libdap/docs/search/all_7.js new file mode 100755 index 0000000000000000000000000000000000000000..6bef37ef60ed0db52d2c18622b793b9dffb8769a --- /dev/null +++ b/libdap/docs/search/all_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['hh',['hh',['../structdap__config__item.html#ae4e3cf0c16788119e444b219bf958a80',1,'dap_config_item']]] +]; diff --git a/libdap/docs/search/all_8.html b/libdap/docs/search/all_8.html new file mode 100755 index 0000000000000000000000000000000000000000..37566c5d83808f4c7dc0efbda138ce4d4981c8f9 --- /dev/null +++ b/libdap/docs/search/all_8.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_8.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_8.js b/libdap/docs/search/all_8.js new file mode 100755 index 0000000000000000000000000000000000000000..a87097b83b3b42535934c2236512c8b0d2aa6505 --- /dev/null +++ b/libdap/docs/search/all_8.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['idle',['idle',['../structproc__stat__line.html#a5450aed4badc84f28992b5a171c6c24e',1,'proc_stat_line']]], + ['idle_5ftime',['idle_time',['../structdap__cpu.html#a8eb9a71e68def6d6087e5ae87b8b8ab1',1,'dap_cpu']]], + ['initialized',['initialized',['../dap__common_8c.html#ad06983e7f6e71b233ea7ff3dee1952f2',1,'dap_common.c']]], + ['int_5fdigits',['INT_DIGITS',['../dap__common_8c.html#a6b293a3f1ddf0b2dd42c5ed279e245ca',1,'dap_common.c']]], + ['iowait',['iowait',['../structproc__stat__line.html#aa474930d802a9275d1688d87654962f8',1,'proc_stat_line']]], + ['irq',['irq',['../structproc__stat__line.html#ac884edb2ab2b162a68fa30f22f0cbe34',1,'proc_stat_line']]], + ['is_5farray',['is_array',['../structdap__config__item.html#a4b63e29afcccdd4fcee6ef2476a7b94d',1,'dap_config_item']]], + ['is_5fprocess_5frunning',['is_process_running',['../dap__process__manager_8c.html#a2e370751950e83a2c633a69dfe026e07',1,'dap_process_manager.c']]], + ['item_5fnext',['item_next',['../structdap__config__item.html#ad00ba78ddeec058fb3c32b115229f7ec',1,'dap_config_item']]], + ['item_5froot',['item_root',['../structdap__config__internal.html#a1b2f52e9224342c2db4875dac880bb91',1,'dap_config_internal']]], + ['itoa',['itoa',['../dap__common_8c.html#a9c7174a7bbe81eedbd86ded2e247eee7',1,'dap_common.c']]] +]; diff --git a/libdap/docs/search/all_9.html b/libdap/docs/search/all_9.html new file mode 100755 index 0000000000000000000000000000000000000000..c8c51023c26b697e132a7fcc4c51b4bf16a43184 --- /dev/null +++ b/libdap/docs/search/all_9.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_9.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_9.js b/libdap/docs/search/all_9.js new file mode 100755 index 0000000000000000000000000000000000000000..4c0aafbaa7b10206017c6f3c06d392fddccd8209 --- /dev/null +++ b/libdap/docs/search/all_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['kill_5fprocess',['kill_process',['../dap__process__manager_8c.html#a61978d909d8e1abda89ced3f1cfd38c3',1,'dap_process_manager.c']]] +]; diff --git a/libdap/docs/search/all_a.html b/libdap/docs/search/all_a.html new file mode 100755 index 0000000000000000000000000000000000000000..4cb31f0c97d3ac9e71e60f467e6bd31369355cbd --- /dev/null +++ b/libdap/docs/search/all_a.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_a.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_a.js b/libdap/docs/search/all_a.js new file mode 100755 index 0000000000000000000000000000000000000000..8d9643d914059f15de0de92bcd4b3a452bbd1d32 --- /dev/null +++ b/libdap/docs/search/all_a.js @@ -0,0 +1,18 @@ +var searchData= +[ + ['l_5fcritical',['L_CRITICAL',['../dap__common_8h.html#ac91d55174d383848b976a34de843748ead95cd234638314479dea217167c37e4a',1,'dap_common.h']]], + ['l_5fdebug',['L_DEBUG',['../dap__common_8h.html#ac91d55174d383848b976a34de843748eabef96148470abb1ed19980e5b5c40ad4',1,'dap_common.h']]], + ['l_5ferror',['L_ERROR',['../dap__common_8h.html#ac91d55174d383848b976a34de843748ea5aa6d01f59e4b628af96f650fc5ecc15',1,'dap_common.h']]], + ['l_5finfo',['L_INFO',['../dap__common_8h.html#ac91d55174d383848b976a34de843748eae580867d0ddde34905fea2f8669839b7',1,'dap_common.h']]], + ['l_5fnotice',['L_NOTICE',['../dap__common_8h.html#ac91d55174d383848b976a34de843748eac0e398e95a19b2d3e23eb0620e91a515',1,'dap_common.h']]], + ['l_5fpossible_5fchars',['l_possible_chars',['../dap__common_8c.html#a38aacebea4dcb4a58907594acf07d45f',1,'dap_common.c']]], + ['l_5fwarning',['L_WARNING',['../dap__common_8h.html#ac91d55174d383848b976a34de843748ea83e54d43eb3fd145052377ecd43932a1',1,'dap_common.h']]], + ['last_5ferror',['last_error',['../dap__common_8c.html#ad817aedf213484c84d15adbe5f785333',1,'dap_common.c']]], + ['last_5ferror_5fmax',['LAST_ERROR_MAX',['../dap__common_8c.html#aaa5fc6c48a65650511f1b50caa1c6672',1,'dap_common.c']]], + ['load',['load',['../structdap__cpu.html#a34954f614e249658e1fe9103c95333c6',1,'dap_cpu']]], + ['log_5ferror',['log_error',['../dap__common_8c.html#a67850cb8c80403ee351125726b8c416b',1,'log_error(): dap_common.c'],['../dap__common_8h.html#aa76592df3b155b21f4d05cbd042db5f7',1,'log_error(void): dap_common.c']]], + ['log_5fit',['log_it',['../dap__common_8h.html#acd8f4f3ce595157ca36ce6b61ca4195e',1,'dap_common.h']]], + ['log_5flevel',['log_level',['../dap__common_8h.html#ac91d55174d383848b976a34de843748e',1,'log_level(): dap_common.h'],['../dap__common_8c.html#ad2da3ac425bc17356fa089cd52c099bc',1,'log_level(): dap_common.c']]], + ['log_5ftag',['LOG_TAG',['../dap__config_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6',1,'LOG_TAG(): dap_config.c'],['../dap__common_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6',1,'LOG_TAG(): dap_common.c'],['../dap__cpu__monitor_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6',1,'LOG_TAG(): dap_cpu_monitor.c'],['../dap__process__manager_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6',1,'LOG_TAG(): dap_process_manager.c'],['../dap__process__memory_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6',1,'LOG_TAG(): dap_process_memory.c']]], + ['log_5ftag_5ffmt_5fstr',['log_tag_fmt_str',['../dap__common_8c.html#a27810c0f123878383572ea6e7ab714aa',1,'dap_common.c']]] +]; diff --git a/libdap/docs/search/all_b.html b/libdap/docs/search/all_b.html new file mode 100755 index 0000000000000000000000000000000000000000..d34a612eccde041bce2103ffe8e1de6c30cf3ed3 --- /dev/null +++ b/libdap/docs/search/all_b.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_b.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_b.js b/libdap/docs/search/all_b.js new file mode 100755 index 0000000000000000000000000000000000000000..07340e76d36b5ae48b4208b2f6d376e4bd12b1f9 --- /dev/null +++ b/libdap/docs/search/all_b.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['max_5fcpu_5fcount',['MAX_CPU_COUNT',['../dap__cpu__monitor_8h.html#add08506024a2c5399f9f9f6a797392ef',1,'dap_cpu_monitor.h']]], + ['max_5fline_5flength',['MAX_LINE_LENGTH',['../dap__process__memory_8c.html#af0f2173e3b202ddf5756531b4471dcb2',1,'dap_process_memory.c']]] +]; diff --git a/libdap/docs/search/all_c.html b/libdap/docs/search/all_c.html new file mode 100755 index 0000000000000000000000000000000000000000..c1ae2cae73d49fe60ee9753ebfd827e286af8eb5 --- /dev/null +++ b/libdap/docs/search/all_c.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_c.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_c.js b/libdap/docs/search/all_c.js new file mode 100755 index 0000000000000000000000000000000000000000..48b04b1dcc7b7d0513d1083de50e006c52a896bb --- /dev/null +++ b/libdap/docs/search/all_c.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['name',['name',['../structdap__config__item.html#a569502aa96f12958efcaac38dc3864d7',1,'dap_config_item']]], + ['ncpu',['ncpu',['../structdap__cpu.html#a1a555a9a00eddc0c10b401d601462441',1,'dap_cpu']]], + ['nice',['nice',['../structproc__stat__line.html#a8e470a27c13e95e0332746511da0eefd',1,'proc_stat_line']]] +]; diff --git a/libdap/docs/search/all_d.html b/libdap/docs/search/all_d.html new file mode 100755 index 0000000000000000000000000000000000000000..712223c6617f82d88aff8431f24b2f628d198312 --- /dev/null +++ b/libdap/docs/search/all_d.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_d.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_d.js b/libdap/docs/search/all_d.js new file mode 100755 index 0000000000000000000000000000000000000000..8807af5596e454fd3e5ba679cba1d92b7f264be7 --- /dev/null +++ b/libdap/docs/search/all_d.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['proc_5fstat_5fline',['proc_stat_line',['../structproc__stat__line.html',1,'']]], + ['proc_5fstat_5fline_5ft',['proc_stat_line_t',['../dap__cpu__monitor_8c.html#ab88a496964045c6ffffcc65683cdb871',1,'dap_cpu_monitor.c']]] +]; diff --git a/libdap/docs/search/all_e.html b/libdap/docs/search/all_e.html new file mode 100755 index 0000000000000000000000000000000000000000..d553ffa22d8f67ecf0e0862f9f7da7be574600a6 --- /dev/null +++ b/libdap/docs/search/all_e.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_e.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_e.js b/libdap/docs/search/all_e.js new file mode 100755 index 0000000000000000000000000000000000000000..129a07805646dd9e5b245e021b5ccbe18192f2b0 --- /dev/null +++ b/libdap/docs/search/all_e.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['rss',['rss',['../structdap__process__memory.html#ae68f8b935eee6f3d06adc3379ced9329',1,'dap_process_memory']]] +]; diff --git a/libdap/docs/search/all_f.html b/libdap/docs/search/all_f.html new file mode 100755 index 0000000000000000000000000000000000000000..c77391a0462d8c9b866d4b0be4744012742d1ae0 --- /dev/null +++ b/libdap/docs/search/all_f.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="all_f.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/all_f.js b/libdap/docs/search/all_f.js new file mode 100755 index 0000000000000000000000000000000000000000..38beb1535dcf4263dc4903e7b187e68d31c059a4 --- /dev/null +++ b/libdap/docs/search/all_f.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['s_5fconfigs_5fpath',['s_configs_path',['../dap__config_8c.html#aed6b1193ba38243186cfb5171c5db794',1,'dap_config.c']]], + ['s_5flog_5ffile',['s_log_file',['../dap__common_8c.html#a50021147b626e80a4756b326379832e9',1,'dap_common.c']]], + ['save_5fprocess_5fpid_5fin_5ffile',['save_process_pid_in_file',['../dap__process__manager_8c.html#a0183612dbd7f0b918e8e39979c9760a0',1,'dap_process_manager.c']]], + ['send_5fselect_5fbreak',['send_select_break',['../dap__common_8c.html#a2e61ddaeeeb7e2ec14e002e7af8fadf6',1,'send_select_break(): dap_common.c'],['../dap__common_8h.html#aa3c5a3515672b9ecc8d114af678cb0a4',1,'send_select_break(void): dap_common.c']]], + ['set_5flog_5flevel',['set_log_level',['../dap__common_8c.html#a98de0fce0a8fb5c3b0cfe80bebe8f691',1,'set_log_level(enum log_level ll): dap_common.c'],['../dap__common_8h.html#a98de0fce0a8fb5c3b0cfe80bebe8f691',1,'set_log_level(enum log_level ll): dap_common.c']]], + ['softirq',['softirq',['../structproc__stat__line.html#a2e0b270f69fe599a43bff21867e5ae03',1,'proc_stat_line']]], + ['steal',['steal',['../structproc__stat__line.html#ae2167610040ce2a590e4aca9657301bf',1,'proc_stat_line']]], + ['system',['system',['../structproc__stat__line.html#afe925267a10c39272ca56786f9b4e819',1,'proc_stat_line']]] +]; diff --git a/libdap/docs/search/classes_0.html b/libdap/docs/search/classes_0.html new file mode 100755 index 0000000000000000000000000000000000000000..025587a7162aacf040c59254a3dcbc770b07cfba --- /dev/null +++ b/libdap/docs/search/classes_0.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="classes_0.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/classes_0.js b/libdap/docs/search/classes_0.js new file mode 100755 index 0000000000000000000000000000000000000000..53027338c2fa13e7d2e97f39a8d874d006bb980e --- /dev/null +++ b/libdap/docs/search/classes_0.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['dap_5fconfig',['dap_config',['../structdap__config.html',1,'']]], + ['dap_5fconfig_5finternal',['dap_config_internal',['../structdap__config__internal.html',1,'']]], + ['dap_5fconfig_5fitem',['dap_config_item',['../structdap__config__item.html',1,'']]], + ['dap_5fcpu',['dap_cpu',['../structdap__cpu.html',1,'']]], + ['dap_5fcpu_5fstats',['dap_cpu_stats',['../structdap__cpu__stats.html',1,'']]], + ['dap_5fprocess_5fmemory',['dap_process_memory',['../structdap__process__memory.html',1,'']]] +]; diff --git a/libdap/docs/search/classes_1.html b/libdap/docs/search/classes_1.html new file mode 100755 index 0000000000000000000000000000000000000000..86dc4ffe6568fd90aae9f58255c44f2991844150 --- /dev/null +++ b/libdap/docs/search/classes_1.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="classes_1.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/classes_1.js b/libdap/docs/search/classes_1.js new file mode 100755 index 0000000000000000000000000000000000000000..ad8f75258d819fdfb3408b1ab4b9aee98caec7c4 --- /dev/null +++ b/libdap/docs/search/classes_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['proc_5fstat_5fline',['proc_stat_line',['../structproc__stat__line.html',1,'']]] +]; diff --git a/libdap/docs/search/close.png b/libdap/docs/search/close.png new file mode 100755 index 0000000000000000000000000000000000000000..9342d3dfeea7b7c4ee610987e717804b5a42ceb9 Binary files /dev/null and b/libdap/docs/search/close.png differ diff --git a/libdap/docs/search/defines_0.html b/libdap/docs/search/defines_0.html new file mode 100755 index 0000000000000000000000000000000000000000..17cfaa2ce937f95646b7d8c058560bd26ee46bea --- /dev/null +++ b/libdap/docs/search/defines_0.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="defines_0.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/defines_0.js b/libdap/docs/search/defines_0.js new file mode 100755 index 0000000000000000000000000000000000000000..4115ba58f18f144d610c62a64c1fa9bec293170a --- /dev/null +++ b/libdap/docs/search/defines_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['b64_5fmalloc',['b64_malloc',['../dap__enc__base64_8c.html#a221b9c9698df0aa156ee2a33072ff9b4',1,'dap_enc_base64.c']]], + ['b64_5frealloc',['b64_realloc',['../dap__enc__base64_8c.html#a4750e31a6a2f09d3ef3e1962e25d8592',1,'dap_enc_base64.c']]] +]; diff --git a/libdap/docs/search/defines_1.html b/libdap/docs/search/defines_1.html new file mode 100755 index 0000000000000000000000000000000000000000..5c0025e2a968e58f8da156b935a3b2114d50b49a --- /dev/null +++ b/libdap/docs/search/defines_1.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="defines_1.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/defines_1.js b/libdap/docs/search/defines_1.js new file mode 100755 index 0000000000000000000000000000000000000000..ee91da5c9b4b073bebc9291f22b7183b62c698fd --- /dev/null +++ b/libdap/docs/search/defines_1.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['dap_5fconfig_5finternal',['DAP_CONFIG_INTERNAL',['../dap__config_8c.html#afd640ddb34b9b70d1bdde0498e135b28',1,'dap_config.c']]], + ['dap_5fdelete',['DAP_DELETE',['../dap__common_8h.html#abc94d3603906f97d0ce7368f44eebf8b',1,'dap_common.h']]], + ['dap_5fdup',['DAP_DUP',['../dap__common_8h.html#a7303c16a9766b284e07bd6790d65b59e',1,'dap_common.h']]], + ['dap_5fenc_5fbase64_5fencode_5fsize',['DAP_ENC_BASE64_ENCODE_SIZE',['../dap__enc__base64_8h.html#a441f115386986f22872acd70d7d04736',1,'dap_enc_base64.h']]], + ['dap_5fnew',['DAP_NEW',['../dap__common_8h.html#a74a9d9e85c7cc12c155f147d9a971cad',1,'dap_common.h']]], + ['dap_5fnew_5fsize',['DAP_NEW_SIZE',['../dap__common_8h.html#a80373ba28489011c16cd76f6d0ba5b53',1,'dap_common.h']]], + ['dap_5fnew_5fz',['DAP_NEW_Z',['../dap__common_8h.html#a9270d1341aa00be475591ecfa8985c08',1,'dap_common.h']]], + ['dap_5fnew_5fz_5fsize',['DAP_NEW_Z_SIZE',['../dap__common_8h.html#ad0f1f3c74154c73a5dfd33598dfd375b',1,'dap_common.h']]], + ['dap_5fprotocol_5fversion',['DAP_PROTOCOL_VERSION',['../dap__common_8h.html#a9757f0cc77df1fd0759b1b91a9f63ff0',1,'dap_common.h']]] +]; diff --git a/libdap/docs/search/defines_2.html b/libdap/docs/search/defines_2.html new file mode 100755 index 0000000000000000000000000000000000000000..a206bfcf2b58a2df392d792ec27635996266cacc --- /dev/null +++ b/libdap/docs/search/defines_2.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="defines_2.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/defines_2.js b/libdap/docs/search/defines_2.js new file mode 100755 index 0000000000000000000000000000000000000000..f822e7eb2293ee02a0f2aaa8899d6bf2be9937be --- /dev/null +++ b/libdap/docs/search/defines_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['int_5fdigits',['INT_DIGITS',['../dap__common_8c.html#a6b293a3f1ddf0b2dd42c5ed279e245ca',1,'dap_common.c']]] +]; diff --git a/libdap/docs/search/defines_3.html b/libdap/docs/search/defines_3.html new file mode 100755 index 0000000000000000000000000000000000000000..3826e1f09581998f709e2ab7358dcb91b4a6394a --- /dev/null +++ b/libdap/docs/search/defines_3.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="defines_3.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/defines_3.js b/libdap/docs/search/defines_3.js new file mode 100755 index 0000000000000000000000000000000000000000..2d30d388364156894ff268e97f76e28145c8664b --- /dev/null +++ b/libdap/docs/search/defines_3.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['last_5ferror_5fmax',['LAST_ERROR_MAX',['../dap__common_8c.html#aaa5fc6c48a65650511f1b50caa1c6672',1,'dap_common.c']]], + ['log_5fit',['log_it',['../dap__common_8h.html#acd8f4f3ce595157ca36ce6b61ca4195e',1,'dap_common.h']]], + ['log_5ftag',['LOG_TAG',['../dap__config_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6',1,'LOG_TAG(): dap_config.c'],['../dap__common_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6',1,'LOG_TAG(): dap_common.c'],['../dap__cpu__monitor_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6',1,'LOG_TAG(): dap_cpu_monitor.c'],['../dap__process__manager_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6',1,'LOG_TAG(): dap_process_manager.c'],['../dap__process__memory_8c.html#a7ce0df38eb467e59f209470c8f5ac4e6',1,'LOG_TAG(): dap_process_memory.c']]] +]; diff --git a/libdap/docs/search/defines_4.html b/libdap/docs/search/defines_4.html new file mode 100755 index 0000000000000000000000000000000000000000..c6864f75fb8209e644d5a6a2976c2a08d4fc6fde --- /dev/null +++ b/libdap/docs/search/defines_4.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="defines_4.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/defines_4.js b/libdap/docs/search/defines_4.js new file mode 100755 index 0000000000000000000000000000000000000000..07340e76d36b5ae48b4208b2f6d376e4bd12b1f9 --- /dev/null +++ b/libdap/docs/search/defines_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['max_5fcpu_5fcount',['MAX_CPU_COUNT',['../dap__cpu__monitor_8h.html#add08506024a2c5399f9f9f6a797392ef',1,'dap_cpu_monitor.h']]], + ['max_5fline_5flength',['MAX_LINE_LENGTH',['../dap__process__memory_8c.html#af0f2173e3b202ddf5756531b4471dcb2',1,'dap_process_memory.c']]] +]; diff --git a/libdap/docs/search/defines_5.html b/libdap/docs/search/defines_5.html new file mode 100755 index 0000000000000000000000000000000000000000..eff655103010355a9439fffcd8e224d105e6f74f --- /dev/null +++ b/libdap/docs/search/defines_5.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="defines_5.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/defines_5.js b/libdap/docs/search/defines_5.js new file mode 100755 index 0000000000000000000000000000000000000000..a9213513bfe2df854860d1fc362f857f228ac725 --- /dev/null +++ b/libdap/docs/search/defines_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['vlog_5fit',['vlog_it',['../dap__common_8h.html#ab53061ef6723b1e4a233022ef9f33c76',1,'dap_common.h']]] +]; diff --git a/libdap/docs/search/enums_0.html b/libdap/docs/search/enums_0.html new file mode 100755 index 0000000000000000000000000000000000000000..aba8d799d126616c102b74b2b4ba812268d712c9 --- /dev/null +++ b/libdap/docs/search/enums_0.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="enums_0.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/enums_0.js b/libdap/docs/search/enums_0.js new file mode 100755 index 0000000000000000000000000000000000000000..0e5fc3cfc62adc23e98ac36ca58939258eba883d --- /dev/null +++ b/libdap/docs/search/enums_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['dap_5fenc_5fb64_5fstandard',['dap_enc_b64_standard',['../dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7',1,'dap_enc_base64.h']]] +]; diff --git a/libdap/docs/search/enums_1.html b/libdap/docs/search/enums_1.html new file mode 100755 index 0000000000000000000000000000000000000000..a8d3843014fe3fe6e5b063d18907960216ae8237 --- /dev/null +++ b/libdap/docs/search/enums_1.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="enums_1.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/enums_1.js b/libdap/docs/search/enums_1.js new file mode 100755 index 0000000000000000000000000000000000000000..91357d1ffbbceccb1d8af234cb5ed14e09088a03 --- /dev/null +++ b/libdap/docs/search/enums_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['log_5flevel',['log_level',['../dap__common_8h.html#ac91d55174d383848b976a34de843748e',1,'dap_common.h']]] +]; diff --git a/libdap/docs/search/enumvalues_0.html b/libdap/docs/search/enumvalues_0.html new file mode 100755 index 0000000000000000000000000000000000000000..83192d354d507c69ee1c62d06aa76d2912460abc --- /dev/null +++ b/libdap/docs/search/enumvalues_0.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="enumvalues_0.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/enumvalues_0.js b/libdap/docs/search/enumvalues_0.js new file mode 100755 index 0000000000000000000000000000000000000000..06de8ed7d98378c69dc588487e4ceb728480e619 --- /dev/null +++ b/libdap/docs/search/enumvalues_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['dap_5fenc_5fstandard_5fb64',['DAP_ENC_STANDARD_B64',['../dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7a684c2e012891c1ffc99a50250aa9e03b',1,'dap_enc_base64.h']]], + ['dap_5fenc_5fstandard_5fb64_5furlsafe',['DAP_ENC_STANDARD_B64_URLSAFE',['../dap__enc__base64_8h.html#aef8f66eb8b66128e3881e784fa5630f7a14e31e001657e974079cd81873eadf32',1,'dap_enc_base64.h']]] +]; diff --git a/libdap/docs/search/enumvalues_1.html b/libdap/docs/search/enumvalues_1.html new file mode 100755 index 0000000000000000000000000000000000000000..0715ef5a3c6ef49cc8854387ea4e915fb7f91ca1 --- /dev/null +++ b/libdap/docs/search/enumvalues_1.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="enumvalues_1.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/enumvalues_1.js b/libdap/docs/search/enumvalues_1.js new file mode 100755 index 0000000000000000000000000000000000000000..f9a011b8397821a3f1b3b1966d2729c7ecc8a442 --- /dev/null +++ b/libdap/docs/search/enumvalues_1.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['l_5fcritical',['L_CRITICAL',['../dap__common_8h.html#ac91d55174d383848b976a34de843748ead95cd234638314479dea217167c37e4a',1,'dap_common.h']]], + ['l_5fdebug',['L_DEBUG',['../dap__common_8h.html#ac91d55174d383848b976a34de843748eabef96148470abb1ed19980e5b5c40ad4',1,'dap_common.h']]], + ['l_5ferror',['L_ERROR',['../dap__common_8h.html#ac91d55174d383848b976a34de843748ea5aa6d01f59e4b628af96f650fc5ecc15',1,'dap_common.h']]], + ['l_5finfo',['L_INFO',['../dap__common_8h.html#ac91d55174d383848b976a34de843748eae580867d0ddde34905fea2f8669839b7',1,'dap_common.h']]], + ['l_5fnotice',['L_NOTICE',['../dap__common_8h.html#ac91d55174d383848b976a34de843748eac0e398e95a19b2d3e23eb0620e91a515',1,'dap_common.h']]], + ['l_5fwarning',['L_WARNING',['../dap__common_8h.html#ac91d55174d383848b976a34de843748ea83e54d43eb3fd145052377ecd43932a1',1,'dap_common.h']]] +]; diff --git a/libdap/docs/search/files_0.html b/libdap/docs/search/files_0.html new file mode 100755 index 0000000000000000000000000000000000000000..0b637cf9cd131b377c0eb3afbc6db158dc6923f9 --- /dev/null +++ b/libdap/docs/search/files_0.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="files_0.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/files_0.js b/libdap/docs/search/files_0.js new file mode 100755 index 0000000000000000000000000000000000000000..51ea79eaa9891d63eec8212c1d1002baccd7fb3e --- /dev/null +++ b/libdap/docs/search/files_0.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['dap_5fcommon_2ec',['dap_common.c',['../dap__common_8c.html',1,'']]], + ['dap_5fcommon_2eh',['dap_common.h',['../dap__common_8h.html',1,'']]], + ['dap_5fconfig_2ec',['dap_config.c',['../dap__config_8c.html',1,'']]], + ['dap_5fconfig_2eh',['dap_config.h',['../dap__config_8h.html',1,'']]], + ['dap_5fcpu_5fmonitor_2ec',['dap_cpu_monitor.c',['../dap__cpu__monitor_8c.html',1,'']]], + ['dap_5fcpu_5fmonitor_2eh',['dap_cpu_monitor.h',['../dap__cpu__monitor_8h.html',1,'']]], + ['dap_5fenc_5fbase64_2ec',['dap_enc_base64.c',['../dap__enc__base64_8c.html',1,'']]], + ['dap_5fenc_5fbase64_2eh',['dap_enc_base64.h',['../dap__enc__base64_8h.html',1,'']]], + ['dap_5fprocess_5fmanager_2ec',['dap_process_manager.c',['../dap__process__manager_8c.html',1,'']]], + ['dap_5fprocess_5fmanager_2eh',['dap_process_manager.h',['../dap__process__manager_8h.html',1,'']]], + ['dap_5fprocess_5fmemory_2ec',['dap_process_memory.c',['../dap__process__memory_8c.html',1,'']]], + ['dap_5fprocess_5fmemory_2eh',['dap_process_memory.h',['../dap__process__memory_8h.html',1,'']]] +]; diff --git a/libdap/docs/search/functions_0.html b/libdap/docs/search/functions_0.html new file mode 100755 index 0000000000000000000000000000000000000000..6bc52b6198f8fe82ca1a9033c7ad91d528380106 --- /dev/null +++ b/libdap/docs/search/functions_0.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="functions_0.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/functions_0.js b/libdap/docs/search/functions_0.js new file mode 100755 index 0000000000000000000000000000000000000000..9b62f7b7a337b327c8dbfbc9468c145ea191b8de --- /dev/null +++ b/libdap/docs/search/functions_0.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['_5fcalculate_5fload',['_calculate_load',['../dap__cpu__monitor_8c.html#aa50e51d75d2dcdcbddb1cf40b1df2f3c',1,'dap_cpu_monitor.c']]], + ['_5fdeserealize_5fproc_5fstat',['_deserealize_proc_stat',['../dap__cpu__monitor_8c.html#a51b82e6ec3267ae57ef002e96e620151',1,'dap_cpu_monitor.c']]], + ['_5fget_5fprocess_5fmemory',['_get_process_memory',['../dap__process__memory_8c.html#abd2440928361cfe4eb3e1be0f3963a99',1,'dap_process_memory.c']]], + ['_5flog_5fit',['_log_it',['../dap__common_8c.html#a56adb48b934d8b79d98f2be87d3a5df3',1,'_log_it(const char *log_tag, enum log_level ll, const char *format,...): dap_common.c'],['../dap__common_8h.html#acbe3239b788dc1105a094596354a7e42',1,'_log_it(const char *log_tag, enum log_level, const char *format,...): dap_common.c']]], + ['_5fparse_5fsize_5fline',['_parse_size_line',['../dap__process__memory_8c.html#a12bc84267b098d654c3a5239f2db9421',1,'dap_process_memory.c']]], + ['_5fvlog_5fit',['_vlog_it',['../dap__common_8c.html#ac7f5cf32897e09c2eacfcf163787ccef',1,'_vlog_it(const char *log_tag, enum log_level ll, const char *format, va_list ap): dap_common.c'],['../dap__common_8h.html#ab3ae03011f7dfbbf40dce01f7bdd4157',1,'_vlog_it(const char *log_tag, enum log_level, const char *format, va_list ap): dap_common.c']]] +]; diff --git a/libdap/docs/search/functions_1.html b/libdap/docs/search/functions_1.html new file mode 100755 index 0000000000000000000000000000000000000000..648831fd7a80f4948a591d96816096a088ce6abe --- /dev/null +++ b/libdap/docs/search/functions_1.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="functions_1.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/functions_1.js b/libdap/docs/search/functions_1.js new file mode 100755 index 0000000000000000000000000000000000000000..ef3272693ee1caab8feeac1dea003a8519fa4008 --- /dev/null +++ b/libdap/docs/search/functions_1.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['b64_5fdecode',['B64_Decode',['../dap__enc__base64_8c.html#a304d3393507ac334c690719e7b66ac23',1,'B64_Decode(const char *srcChars, int srcLen, byte *outBytes): dap_enc_base64.c'],['../dap__enc__base64_8c.html#a9c3b4adc7a6fcdf700700d55b2c924ed',1,'b64_decode(const char *, size_t): dap_enc_base64.c']]], + ['b64_5fdecode_5fex',['b64_decode_ex',['../dap__enc__base64_8c.html#aea8b5297189d223a48f1886e692546e4',1,'dap_enc_base64.c']]], + ['b64_5fdecodebyte',['B64_DecodeByte',['../dap__enc__base64_8c.html#ab0f10f3342a3055e4c98fb6bcec20c96',1,'dap_enc_base64.c']]], + ['b64_5fencode',['b64_encode',['../dap__enc__base64_8c.html#a9a9b842a784b5202e1ab4eed1c156d00',1,'b64_encode(const unsigned char *, size_t): dap_enc_base64.c'],['../dap__enc__base64_8c.html#af3bd7d29d6866e2c15040e710077bdf4',1,'B64_Encode(const byte *srcBytes, int srcLen, char *outChars): dap_enc_base64.c']]], + ['b64_5fencodebyte',['B64_EncodeByte',['../dap__enc__base64_8c.html#a2ec720931ba76ef3cccc8e23b2e186f9',1,'dap_enc_base64.c']]], + ['b64_5fgetsize',['B64_GetSize',['../dap__enc__base64_8c.html#aa785023e6318312a858628ac75c09cfc',1,'dap_enc_base64.c']]], + ['b64_5ftable_5fby_5fstandard',['b64_table_by_standard',['../dap__enc__base64_8c.html#a7f71c6f222b5b8122b2240df6c9b3fa0',1,'dap_enc_base64.c']]] +]; diff --git a/libdap/docs/search/functions_2.html b/libdap/docs/search/functions_2.html new file mode 100755 index 0000000000000000000000000000000000000000..c93d089465e9d704786134546f4d91e80bb347f3 --- /dev/null +++ b/libdap/docs/search/functions_2.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="functions_2.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/functions_2.js b/libdap/docs/search/functions_2.js new file mode 100755 index 0000000000000000000000000000000000000000..838947f51dadbc0c917036807e46444300c7013e --- /dev/null +++ b/libdap/docs/search/functions_2.js @@ -0,0 +1,27 @@ +var searchData= +[ + ['daemonize_5fprocess',['daemonize_process',['../dap__process__manager_8c.html#abeda31c74acff5c32d5952efd3c534fc',1,'dap_process_manager.c']]], + ['dap_5fcommon_5fdeinit',['dap_common_deinit',['../dap__common_8c.html#adf17f0c9b75afc0078ab0fc56c0eec98',1,'dap_common_deinit(): dap_common.c'],['../dap__common_8h.html#ab96d7e843bc09468220a7d264295cf69',1,'dap_common_deinit(void): dap_common.c']]], + ['dap_5fcommon_5finit',['dap_common_init',['../dap__common_8c.html#aff6dc9e558a255f56618643f5be92b08',1,'dap_common_init(const char *a_log_file): dap_common.c'],['../dap__common_8h.html#aff6dc9e558a255f56618643f5be92b08',1,'dap_common_init(const char *a_log_file): dap_common.c']]], + ['dap_5fconfig_5fclose',['dap_config_close',['../dap__config_8c.html#ac40f9a095d00df268967293c5ea3f9df',1,'dap_config_close(dap_config_t *a_config): dap_config.c'],['../dap__config_8h.html#ac40f9a095d00df268967293c5ea3f9df',1,'dap_config_close(dap_config_t *a_config): dap_config.c']]], + ['dap_5fconfig_5fdeinit',['dap_config_deinit',['../dap__config_8c.html#a009960bd1586e17ec29cc646a2a5939c',1,'dap_config_deinit(): dap_config.c'],['../dap__config_8h.html#a009960bd1586e17ec29cc646a2a5939c',1,'dap_config_deinit(): dap_config.c']]], + ['dap_5fconfig_5fget_5farray_5fstr',['dap_config_get_array_str',['../dap__config_8c.html#a1785c0169c29d415206b02e1c4e9adb8',1,'dap_config_get_array_str(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, uint16_t *array_length): dap_config.c'],['../dap__config_8h.html#a1785c0169c29d415206b02e1c4e9adb8',1,'dap_config_get_array_str(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, uint16_t *array_length): dap_config.c']]], + ['dap_5fconfig_5fget_5fitem',['dap_config_get_item',['../dap__config_8c.html#a5d825008b72bc795b56abc39957bbdd2',1,'dap_config.c']]], + ['dap_5fconfig_5fget_5fitem_5fbool',['dap_config_get_item_bool',['../dap__config_8c.html#a7e4ce808bc4be2312b4e051bc9210d45',1,'dap_config_get_item_bool(dap_config_t *a_config, const char *a_section_path, const char *a_item_name): dap_config.c'],['../dap__config_8h.html#a7e4ce808bc4be2312b4e051bc9210d45',1,'dap_config_get_item_bool(dap_config_t *a_config, const char *a_section_path, const char *a_item_name): dap_config.c']]], + ['dap_5fconfig_5fget_5fitem_5fbool_5fdefault',['dap_config_get_item_bool_default',['../dap__config_8c.html#a4ce7c5465324c6f6e3c9d490d1fc4e1f',1,'dap_config_get_item_bool_default(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, bool a_default): dap_config.c'],['../dap__config_8h.html#a4ce7c5465324c6f6e3c9d490d1fc4e1f',1,'dap_config_get_item_bool_default(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, bool a_default): dap_config.c']]], + ['dap_5fconfig_5fget_5fitem_5fdouble',['dap_config_get_item_double',['../dap__config_8c.html#ad19c0ac2fc89b73589b32754750dc0c2',1,'dap_config_get_item_double(dap_config_t *a_config, const char *a_section_path, const char *a_item_name): dap_config.c'],['../dap__config_8h.html#ad19c0ac2fc89b73589b32754750dc0c2',1,'dap_config_get_item_double(dap_config_t *a_config, const char *a_section_path, const char *a_item_name): dap_config.c']]], + ['dap_5fconfig_5fget_5fitem_5fint32',['dap_config_get_item_int32',['../dap__config_8c.html#add7283ed9237378bb38f2bd8f891efa3',1,'dap_config_get_item_int32(dap_config_t *a_config, const char *a_section_path, const char *a_item_name): dap_config.c'],['../dap__config_8h.html#add7283ed9237378bb38f2bd8f891efa3',1,'dap_config_get_item_int32(dap_config_t *a_config, const char *a_section_path, const char *a_item_name): dap_config.c']]], + ['dap_5fconfig_5fget_5fitem_5fint32_5fdefault',['dap_config_get_item_int32_default',['../dap__config_8c.html#a5965237dd87b494bbe2367e104c3b8f0',1,'dap_config_get_item_int32_default(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, int32_t a_default): dap_config.c'],['../dap__config_8h.html#a5965237dd87b494bbe2367e104c3b8f0',1,'dap_config_get_item_int32_default(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, int32_t a_default): dap_config.c']]], + ['dap_5fconfig_5fget_5fitem_5fstr',['dap_config_get_item_str',['../dap__config_8c.html#affddb2eeef241ec37560794b2c90d0ec',1,'dap_config_get_item_str(dap_config_t *a_config, const char *a_section_path, const char *a_item_name): dap_config.c'],['../dap__config_8h.html#affddb2eeef241ec37560794b2c90d0ec',1,'dap_config_get_item_str(dap_config_t *a_config, const char *a_section_path, const char *a_item_name): dap_config.c']]], + ['dap_5fconfig_5fget_5fitem_5fstr_5fdefault',['dap_config_get_item_str_default',['../dap__config_8c.html#ae341b2585e28b4b72ae91a00d86532d9',1,'dap_config_get_item_str_default(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, const char *a_value_default): dap_config.c'],['../dap__config_8h.html#ae341b2585e28b4b72ae91a00d86532d9',1,'dap_config_get_item_str_default(dap_config_t *a_config, const char *a_section_path, const char *a_item_name, const char *a_value_default): dap_config.c']]], + ['dap_5fconfig_5finit',['dap_config_init',['../dap__config_8c.html#a3843f4acdf67f2499f2437d69097cba1',1,'dap_config_init(const char *a_configs_path): dap_config.c'],['../dap__config_8h.html#a3843f4acdf67f2499f2437d69097cba1',1,'dap_config_init(const char *a_configs_path): dap_config.c']]], + ['dap_5fconfig_5fopen',['dap_config_open',['../dap__config_8c.html#a67254031cc34dcf6f7635f35d3dd22d1',1,'dap_config_open(const char *a_name): dap_config.c'],['../dap__config_8h.html#a67254031cc34dcf6f7635f35d3dd22d1',1,'dap_config_open(const char *a_name): dap_config.c']]], + ['dap_5fcpu_5fget_5fstats',['dap_cpu_get_stats',['../dap__cpu__monitor_8c.html#af97c8ce690c4a7e1a6d9177f76200862',1,'dap_cpu_get_stats(): dap_cpu_monitor.c'],['../dap__cpu__monitor_8h.html#ac8909ba058fd37e5465b7c64e9b3681e',1,'dap_cpu_get_stats(void): dap_cpu_monitor.c']]], + ['dap_5fcpu_5fmonitor_5fdeinit',['dap_cpu_monitor_deinit',['../dap__cpu__monitor_8c.html#ac18ced28d70e9117fae3759db759e2fb',1,'dap_cpu_monitor_deinit(): dap_cpu_monitor.c'],['../dap__cpu__monitor_8h.html#a8644f85c62710685c7c5c3624e4aadc8',1,'dap_cpu_monitor_deinit(void): dap_cpu_monitor.c']]], + ['dap_5fcpu_5fmonitor_5finit',['dap_cpu_monitor_init',['../dap__cpu__monitor_8c.html#a41c2f779847e3d67124dfde1fe0640b7',1,'dap_cpu_monitor_init(): dap_cpu_monitor.c'],['../dap__cpu__monitor_8h.html#a74565d8e36cf559a22aefa4a070a4e52',1,'dap_cpu_monitor_init(void): dap_cpu_monitor.c']]], + ['dap_5fenc_5fbase64_5fdecode',['dap_enc_base64_decode',['../dap__enc__base64_8c.html#a09bda17a1fce52c2d9740ad9852fbb98',1,'dap_enc_base64_decode(const char *in, size_t in_size, void *out, dap_enc_b64_standard_t standard): dap_enc_base64.c'],['../dap__enc__base64_8h.html#a09bda17a1fce52c2d9740ad9852fbb98',1,'dap_enc_base64_decode(const char *in, size_t in_size, void *out, dap_enc_b64_standard_t standard): dap_enc_base64.c']]], + ['dap_5fenc_5fbase64_5fencode',['dap_enc_base64_encode',['../dap__enc__base64_8c.html#a542e3fd8a5dd6116cb1e6bd48361a5cc',1,'dap_enc_base64_encode(const void *a_in, size_t a_in_size, char *a_out, dap_enc_b64_standard_t standard): dap_enc_base64.c'],['../dap__enc__base64_8h.html#ad164a1a38bbeab9485bd283c185fe557',1,'dap_enc_base64_encode(const void *in, size_t in_size, char *out, dap_enc_b64_standard_t standard): dap_enc_base64.c']]], + ['dap_5frandom_5fstring_5fcreate_5falloc',['dap_random_string_create_alloc',['../dap__common_8c.html#aabbc0306fee1c3a56540b1604bbb516c',1,'dap_random_string_create_alloc(size_t a_length): dap_common.c'],['../dap__common_8h.html#aabbc0306fee1c3a56540b1604bbb516c',1,'dap_random_string_create_alloc(size_t a_length): dap_common.c']]], + ['dap_5frandom_5fstring_5ffill',['dap_random_string_fill',['../dap__common_8c.html#a3fa34950395c0139c5c95510de7119a8',1,'dap_random_string_fill(char *str, size_t length): dap_common.c'],['../dap__common_8h.html#a3fa34950395c0139c5c95510de7119a8',1,'dap_random_string_fill(char *str, size_t length): dap_common.c']]], + ['dap_5fset_5flog_5ftag_5fwidth',['dap_set_log_tag_width',['../dap__common_8c.html#ac8d0df7015664c720b27ee4f6e660479',1,'dap_set_log_tag_width(size_t width): dap_common.c'],['../dap__common_8h.html#ac8d0df7015664c720b27ee4f6e660479',1,'dap_set_log_tag_width(size_t width): dap_common.c']]] +]; diff --git a/libdap/docs/search/functions_3.html b/libdap/docs/search/functions_3.html new file mode 100755 index 0000000000000000000000000000000000000000..caa48ea262dd55903a2a4073702ed720c2ca294f --- /dev/null +++ b/libdap/docs/search/functions_3.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="functions_3.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/functions_3.js b/libdap/docs/search/functions_3.js new file mode 100755 index 0000000000000000000000000000000000000000..114f44a86cf3e07b28bbd3e67f606e7971b03815 --- /dev/null +++ b/libdap/docs/search/functions_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['exec_5fwith_5fret',['exec_with_ret',['../dap__common_8c.html#a00992fd7732b0ff40ce020728f84bc3a',1,'exec_with_ret(const char *a_cmd): dap_common.c'],['../dap__common_8h.html#a00992fd7732b0ff40ce020728f84bc3a',1,'exec_with_ret(const char *a_cmd): dap_common.c']]], + ['exec_5fwith_5fret_5fmultistring',['exec_with_ret_multistring',['../dap__common_8c.html#aa4a4c13332f14e44630f5e269048249a',1,'exec_with_ret_multistring(const char *a_cmd): dap_common.c'],['../dap__common_8h.html#aa4a4c13332f14e44630f5e269048249a',1,'exec_with_ret_multistring(const char *a_cmd): dap_common.c']]] +]; diff --git a/libdap/docs/search/functions_4.html b/libdap/docs/search/functions_4.html new file mode 100755 index 0000000000000000000000000000000000000000..a9c64adf9173d127b402307827966dab06acaa51 --- /dev/null +++ b/libdap/docs/search/functions_4.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="functions_4.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/functions_4.js b/libdap/docs/search/functions_4.js new file mode 100755 index 0000000000000000000000000000000000000000..6b172d200faaaac761ec8d0bb8425ec00cab45a1 --- /dev/null +++ b/libdap/docs/search/functions_4.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['get_5farray_5flength',['get_array_length',['../dap__config_8c.html#af8c517b0bd6ca2b9ab2e3fbf2dbdf707',1,'dap_config.c']]], + ['get_5fpid_5ffrom_5ffile',['get_pid_from_file',['../dap__process__manager_8c.html#a3d03c30d6144592382149beaef1019b9',1,'dap_process_manager.c']]], + ['get_5fproc_5fmem_5fby_5fpid',['get_proc_mem_by_pid',['../dap__process__memory_8c.html#a30800f14d0a84a92a23429eac85a7f5d',1,'get_proc_mem_by_pid(pid_t pid): dap_process_memory.c'],['../dap__process__memory_8h.html#a30800f14d0a84a92a23429eac85a7f5d',1,'get_proc_mem_by_pid(pid_t pid): dap_process_memory.c']]], + ['get_5fproc_5fmem_5fcurrent',['get_proc_mem_current',['../dap__process__memory_8c.html#aca5c54866cc33715a7da93bfaed39a1d',1,'get_proc_mem_current(void): dap_process_memory.c'],['../dap__process__memory_8h.html#aca5c54866cc33715a7da93bfaed39a1d',1,'get_proc_mem_current(void): dap_process_memory.c']]], + ['get_5fselect_5fbreaker',['get_select_breaker',['../dap__common_8c.html#a770a25cd7afda213e944f715a27f1e7c',1,'get_select_breaker(): dap_common.c'],['../dap__common_8h.html#ab027eeb728bcf25f75bc592fc627e4fe',1,'get_select_breaker(void): dap_common.c']]] +]; diff --git a/libdap/docs/search/functions_5.html b/libdap/docs/search/functions_5.html new file mode 100755 index 0000000000000000000000000000000000000000..9d135fa08e8f40cb906e2a6e0c842979a40dbd22 --- /dev/null +++ b/libdap/docs/search/functions_5.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="functions_5.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/functions_5.js b/libdap/docs/search/functions_5.js new file mode 100755 index 0000000000000000000000000000000000000000..1277f0952fb742f164d872d21dc42cef59c6b590 --- /dev/null +++ b/libdap/docs/search/functions_5.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['is_5fprocess_5frunning',['is_process_running',['../dap__process__manager_8c.html#a2e370751950e83a2c633a69dfe026e07',1,'dap_process_manager.c']]], + ['itoa',['itoa',['../dap__common_8c.html#a9c7174a7bbe81eedbd86ded2e247eee7',1,'dap_common.c']]] +]; diff --git a/libdap/docs/search/functions_6.html b/libdap/docs/search/functions_6.html new file mode 100755 index 0000000000000000000000000000000000000000..5fca897bd009ef465bac8426de97ea8ddc3154ab --- /dev/null +++ b/libdap/docs/search/functions_6.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="functions_6.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/functions_6.js b/libdap/docs/search/functions_6.js new file mode 100755 index 0000000000000000000000000000000000000000..4c0aafbaa7b10206017c6f3c06d392fddccd8209 --- /dev/null +++ b/libdap/docs/search/functions_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['kill_5fprocess',['kill_process',['../dap__process__manager_8c.html#a61978d909d8e1abda89ced3f1cfd38c3',1,'dap_process_manager.c']]] +]; diff --git a/libdap/docs/search/functions_7.html b/libdap/docs/search/functions_7.html new file mode 100755 index 0000000000000000000000000000000000000000..02631a344105cd5a705183d0682dd2e1addb33ce --- /dev/null +++ b/libdap/docs/search/functions_7.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="functions_7.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/functions_7.js b/libdap/docs/search/functions_7.js new file mode 100755 index 0000000000000000000000000000000000000000..7bd60e6c2feeb812414c4896d630faa05ce9097d --- /dev/null +++ b/libdap/docs/search/functions_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['log_5ferror',['log_error',['../dap__common_8c.html#a67850cb8c80403ee351125726b8c416b',1,'log_error(): dap_common.c'],['../dap__common_8h.html#aa76592df3b155b21f4d05cbd042db5f7',1,'log_error(void): dap_common.c']]] +]; diff --git a/libdap/docs/search/functions_8.html b/libdap/docs/search/functions_8.html new file mode 100755 index 0000000000000000000000000000000000000000..ff37095921fe0c874bb71cafcbed3e00c59f2a87 --- /dev/null +++ b/libdap/docs/search/functions_8.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="functions_8.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/functions_8.js b/libdap/docs/search/functions_8.js new file mode 100755 index 0000000000000000000000000000000000000000..ec5ef57c3dae6405cd6997bb2880a3e9de8695d5 --- /dev/null +++ b/libdap/docs/search/functions_8.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['save_5fprocess_5fpid_5fin_5ffile',['save_process_pid_in_file',['../dap__process__manager_8c.html#a0183612dbd7f0b918e8e39979c9760a0',1,'dap_process_manager.c']]], + ['send_5fselect_5fbreak',['send_select_break',['../dap__common_8c.html#a2e61ddaeeeb7e2ec14e002e7af8fadf6',1,'send_select_break(): dap_common.c'],['../dap__common_8h.html#aa3c5a3515672b9ecc8d114af678cb0a4',1,'send_select_break(void): dap_common.c']]], + ['set_5flog_5flevel',['set_log_level',['../dap__common_8c.html#a98de0fce0a8fb5c3b0cfe80bebe8f691',1,'set_log_level(enum log_level ll): dap_common.c'],['../dap__common_8h.html#a98de0fce0a8fb5c3b0cfe80bebe8f691',1,'set_log_level(enum log_level ll): dap_common.c']]] +]; diff --git a/libdap/docs/search/functions_9.html b/libdap/docs/search/functions_9.html new file mode 100755 index 0000000000000000000000000000000000000000..1d3458312466fb0ede4ea413b53ccd027cf7182d --- /dev/null +++ b/libdap/docs/search/functions_9.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="functions_9.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/functions_9.js b/libdap/docs/search/functions_9.js new file mode 100755 index 0000000000000000000000000000000000000000..eb845cd1c65b105e40bfaebd58a7dfd772e455e8 --- /dev/null +++ b/libdap/docs/search/functions_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['time_5fto_5frfc822',['time_to_rfc822',['../dap__common_8c.html#a6ab10606e8ac33dd93a0526933b192c8',1,'time_to_rfc822(char *out, size_t out_size_max, time_t t): dap_common.c'],['../dap__common_8h.html#a6ab10606e8ac33dd93a0526933b192c8',1,'time_to_rfc822(char *out, size_t out_size_max, time_t t): dap_common.c']]] +]; diff --git a/libdap/docs/search/mag_sel.png b/libdap/docs/search/mag_sel.png new file mode 100755 index 0000000000000000000000000000000000000000..81f6040a2092402b4d98f9ffa8855d12a0d4ca17 Binary files /dev/null and b/libdap/docs/search/mag_sel.png differ diff --git a/libdap/docs/search/nomatches.html b/libdap/docs/search/nomatches.html new file mode 100755 index 0000000000000000000000000000000000000000..b1ded27e9ad6af3a2ac11e6b21ce159dcaf87e0c --- /dev/null +++ b/libdap/docs/search/nomatches.html @@ -0,0 +1,12 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="NoMatches">No Matches</div> +</div> +</body> +</html> diff --git a/libdap/docs/search/search.css b/libdap/docs/search/search.css new file mode 100755 index 0000000000000000000000000000000000000000..4d7612ff63e3b5449072d07c3ffc648c6ad0bb11 --- /dev/null +++ b/libdap/docs/search/search.css @@ -0,0 +1,271 @@ +/*---------------- Search Box */ + +#FSearchBox { + float: left; +} + +#MSearchBox { + white-space : nowrap; + position: absolute; + float: none; + display: inline; + margin-top: 8px; + right: 0px; + width: 170px; + z-index: 102; + background-color: white; +} + +#MSearchBox .left +{ + display:block; + position:absolute; + left:10px; + width:20px; + height:19px; + background:url('search_l.png') no-repeat; + background-position:right; +} + +#MSearchSelect { + display:block; + position:absolute; + width:20px; + height:19px; +} + +.left #MSearchSelect { + left:4px; +} + +.right #MSearchSelect { + right:5px; +} + +#MSearchField { + display:block; + position:absolute; + height:19px; + background:url('search_m.png') repeat-x; + border:none; + width:111px; + margin-left:20px; + padding-left:4px; + color: #909090; + outline: none; + font: 9pt Arial, Verdana, sans-serif; +} + +#FSearchBox #MSearchField { + margin-left:15px; +} + +#MSearchBox .right { + display:block; + position:absolute; + right:10px; + top:0px; + width:20px; + height:19px; + background:url('search_r.png') no-repeat; + background-position:left; +} + +#MSearchClose { + display: none; + position: absolute; + top: 4px; + background : none; + border: none; + margin: 0px 4px 0px 0px; + padding: 0px 0px; + outline: none; +} + +.left #MSearchClose { + left: 6px; +} + +.right #MSearchClose { + right: 2px; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #90A5CE; + background-color: #F9FAFC; + z-index: 1; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: #FFFFFF; + background-color: #3D578C; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + width: 60ex; + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000; + background-color: #EEF1F7; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; +} + +.SRResult { + display: none; +} + +DIV.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.searchresult { + background-color: #F0F3F8; +} + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: url("../tab_a.png"); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/libdap/docs/search/search.js b/libdap/docs/search/search.js new file mode 100755 index 0000000000000000000000000000000000000000..dedce3bf093890b8693ec9b110414855542fb79b --- /dev/null +++ b/libdap/docs/search/search.js @@ -0,0 +1,791 @@ +function convertToId(search) +{ + var result = ''; + for (i=0;i<search.length;i++) + { + var c = search.charAt(i); + var cn = c.charCodeAt(0); + if (c.match(/[a-z0-9\u0080-\uFFFF]/)) + { + result+=c; + } + else if (cn<16) + { + result+="_0"+cn.toString(16); + } + else + { + result+="_"+cn.toString(16); + } + } + return result; +} + +function getXPos(item) +{ + var x = 0; + if (item.offsetWidth) + { + while (item && item!=document.body) + { + x += item.offsetLeft; + item = item.offsetParent; + } + } + return x; +} + +function getYPos(item) +{ + var y = 0; + if (item.offsetWidth) + { + while (item && item!=document.body) + { + y += item.offsetTop; + item = item.offsetParent; + } + } + return y; +} + +/* A class handling everything associated with the search panel. + + Parameters: + name - The name of the global variable that will be + storing this instance. Is needed to be able to set timeouts. + resultPath - path to use for external files +*/ +function SearchBox(name, resultsPath, inFrame, label) +{ + if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); } + + // ---------- Instance variables + this.name = name; + this.resultsPath = resultsPath; + this.keyTimeout = 0; + this.keyTimeoutLength = 500; + this.closeSelectionTimeout = 300; + this.lastSearchValue = ""; + this.lastResultsPage = ""; + this.hideTimeout = 0; + this.searchIndex = 0; + this.searchActive = false; + this.insideFrame = inFrame; + this.searchLabel = label; + + // ----------- DOM Elements + + this.DOMSearchField = function() + { return document.getElementById("MSearchField"); } + + this.DOMSearchSelect = function() + { return document.getElementById("MSearchSelect"); } + + this.DOMSearchSelectWindow = function() + { return document.getElementById("MSearchSelectWindow"); } + + this.DOMPopupSearchResults = function() + { return document.getElementById("MSearchResults"); } + + this.DOMPopupSearchResultsWindow = function() + { return document.getElementById("MSearchResultsWindow"); } + + this.DOMSearchClose = function() + { return document.getElementById("MSearchClose"); } + + this.DOMSearchBox = function() + { return document.getElementById("MSearchBox"); } + + // ------------ Event Handlers + + // Called when focus is added or removed from the search field. + this.OnSearchFieldFocus = function(isActive) + { + this.Activate(isActive); + } + + this.OnSearchSelectShow = function() + { + var searchSelectWindow = this.DOMSearchSelectWindow(); + var searchField = this.DOMSearchSelect(); + + if (this.insideFrame) + { + var left = getXPos(searchField); + var top = getYPos(searchField); + left += searchField.offsetWidth + 6; + top += searchField.offsetHeight; + + // show search selection popup + searchSelectWindow.style.display='block'; + left -= searchSelectWindow.offsetWidth; + searchSelectWindow.style.left = left + 'px'; + searchSelectWindow.style.top = top + 'px'; + } + else + { + var left = getXPos(searchField); + var top = getYPos(searchField); + top += searchField.offsetHeight; + + // show search selection popup + searchSelectWindow.style.display='block'; + searchSelectWindow.style.left = left + 'px'; + searchSelectWindow.style.top = top + 'px'; + } + + // stop selection hide timer + if (this.hideTimeout) + { + clearTimeout(this.hideTimeout); + this.hideTimeout=0; + } + return false; // to avoid "image drag" default event + } + + this.OnSearchSelectHide = function() + { + this.hideTimeout = setTimeout(this.name +".CloseSelectionWindow()", + this.closeSelectionTimeout); + } + + // Called when the content of the search field is changed. + this.OnSearchFieldChange = function(evt) + { + if (this.keyTimeout) // kill running timer + { + clearTimeout(this.keyTimeout); + this.keyTimeout = 0; + } + + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 || e.keyCode==13) + { + if (e.shiftKey==1) + { + this.OnSearchSelectShow(); + var win=this.DOMSearchSelectWindow(); + for (i=0;i<win.childNodes.length;i++) + { + var child = win.childNodes[i]; // get span within a + if (child.className=='SelectItem') + { + child.focus(); + return; + } + } + return; + } + else if (window.frames.MSearchResults.searchResults) + { + var elem = window.frames.MSearchResults.searchResults.NavNext(0); + if (elem) elem.focus(); + } + } + else if (e.keyCode==27) // Escape out of the search field + { + this.DOMSearchField().blur(); + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.lastSearchValue = ''; + this.Activate(false); + return; + } + + // strip whitespaces + var searchValue = this.DOMSearchField().value.replace(/ +/g, ""); + + if (searchValue != this.lastSearchValue) // search value has changed + { + if (searchValue != "") // non-empty search + { + // set timer for search update + this.keyTimeout = setTimeout(this.name + '.Search()', + this.keyTimeoutLength); + } + else // empty search field + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.lastSearchValue = ''; + } + } + } + + this.SelectItemCount = function(id) + { + var count=0; + var win=this.DOMSearchSelectWindow(); + for (i=0;i<win.childNodes.length;i++) + { + var child = win.childNodes[i]; // get span within a + if (child.className=='SelectItem') + { + count++; + } + } + return count; + } + + this.SelectItemSet = function(id) + { + var i,j=0; + var win=this.DOMSearchSelectWindow(); + for (i=0;i<win.childNodes.length;i++) + { + var child = win.childNodes[i]; // get span within a + if (child.className=='SelectItem') + { + var node = child.firstChild; + if (j==id) + { + node.innerHTML='•'; + } + else + { + node.innerHTML=' '; + } + j++; + } + } + } + + // Called when an search filter selection is made. + // set item with index id as the active item + this.OnSelectItem = function(id) + { + this.searchIndex = id; + this.SelectItemSet(id); + var searchValue = this.DOMSearchField().value.replace(/ +/g, ""); + if (searchValue!="" && this.searchActive) // something was found -> do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex<this.SelectItemCount()) // Down + { + this.searchIndex++; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==38 && this.searchIndex>0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches.html'; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline'; + if (this.insideFrame) + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of <Search()>. + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName == 'DIV' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName == 'DIV' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults() +{ + var results = document.getElementById("SRResults"); + for (var e=0; e<searchData.length; e++) + { + var id = searchData[e][0]; + var srResult = document.createElement('div'); + srResult.setAttribute('id','SR_'+id); + setClassAttr(srResult,'SRResult'); + var srEntry = document.createElement('div'); + setClassAttr(srEntry,'SREntry'); + var srLink = document.createElement('a'); + srLink.setAttribute('id','Item'+e); + setKeyActions(srLink,'return searchResults.Nav(event,'+e+')'); + setClassAttr(srLink,'SRSymbol'); + srLink.innerHTML = searchData[e][1][0]; + srEntry.appendChild(srLink); + if (searchData[e][1].length==2) // single result + { + srLink.setAttribute('href',searchData[e][1][1][0]); + if (searchData[e][1][1][1]) + { + srLink.setAttribute('target','_parent'); + } + var srScope = document.createElement('span'); + setClassAttr(srScope,'SRScope'); + srScope.innerHTML = searchData[e][1][1][2]; + srEntry.appendChild(srScope); + } + else // multiple results + { + srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")'); + var srChildren = document.createElement('div'); + setClassAttr(srChildren,'SRChildren'); + for (var c=0; c<searchData[e][1].length-1; c++) + { + var srChild = document.createElement('a'); + srChild.setAttribute('id','Item'+e+'_c'+c); + setKeyActions(srChild,'return searchResults.NavChild(event,'+e+','+c+')'); + setClassAttr(srChild,'SRScope'); + srChild.setAttribute('href',searchData[e][1][c+1][0]); + if (searchData[e][1][c+1][1]) + { + srChild.setAttribute('target','_parent'); + } + srChild.innerHTML = searchData[e][1][c+1][2]; + srChildren.appendChild(srChild); + } + srEntry.appendChild(srChildren); + } + srResult.appendChild(srEntry); + results.appendChild(srResult); + } +} + +function init_search() +{ + var results = document.getElementById("MSearchSelectWindow"); + for (var key in indexSectionLabels) + { + var link = document.createElement('a'); + link.setAttribute('class','SelectItem'); + link.setAttribute('onclick','searchBox.OnSelectItem('+key+')'); + link.href='javascript:void(0)'; + link.innerHTML='<span class="SelectionMark"> </span>'+indexSectionLabels[key]; + results.appendChild(link); + } + searchBox.OnSelectItem(0); +} + diff --git a/libdap/docs/search/search_l.png b/libdap/docs/search/search_l.png new file mode 100755 index 0000000000000000000000000000000000000000..c872f4da4a01d0754f923e6c94fd8159c0621bd1 Binary files /dev/null and b/libdap/docs/search/search_l.png differ diff --git a/libdap/docs/search/search_m.png b/libdap/docs/search/search_m.png new file mode 100755 index 0000000000000000000000000000000000000000..b429a16ba641960da1e52e5da85dc80fd82635c8 Binary files /dev/null and b/libdap/docs/search/search_m.png differ diff --git a/libdap/docs/search/search_r.png b/libdap/docs/search/search_r.png new file mode 100755 index 0000000000000000000000000000000000000000..97ee8b439687084201b79c6f776a41f495c6392a Binary files /dev/null and b/libdap/docs/search/search_r.png differ diff --git a/libdap/docs/search/searchdata.js b/libdap/docs/search/searchdata.js new file mode 100755 index 0000000000000000000000000000000000000000..a27aecbd1b56d26a531f3cbed3c188d63bd90f4e --- /dev/null +++ b/libdap/docs/search/searchdata.js @@ -0,0 +1,39 @@ +var indexSectionsWithContent = +{ + 0: "_abcdeghiklmnprstuv", + 1: "dp", + 2: "d", + 3: "_bdegiklst", + 4: "_abcdghilnrstuv", + 5: "bdp", + 6: "dl", + 7: "dl", + 8: "bdilmv" +}; + +var indexSectionNames = +{ + 0: "all", + 1: "classes", + 2: "files", + 3: "functions", + 4: "variables", + 5: "typedefs", + 6: "enums", + 7: "enumvalues", + 8: "defines" +}; + +var indexSectionLabels = +{ + 0: "All", + 1: "Data Structures", + 2: "Files", + 3: "Functions", + 4: "Variables", + 5: "Typedefs", + 6: "Enumerations", + 7: "Enumerator", + 8: "Macros" +}; + diff --git a/libdap/docs/search/typedefs_0.html b/libdap/docs/search/typedefs_0.html new file mode 100755 index 0000000000000000000000000000000000000000..fb07195c2f7067e928a834b72da1bd3428a09610 --- /dev/null +++ b/libdap/docs/search/typedefs_0.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="typedefs_0.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/typedefs_0.js b/libdap/docs/search/typedefs_0.js new file mode 100755 index 0000000000000000000000000000000000000000..2c642cb67e678f131985b341e54ea13bedd8d6f3 --- /dev/null +++ b/libdap/docs/search/typedefs_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['byte',['byte',['../dap__enc__base64_8c.html#a0c8186d9b9b7880309c27230bbb5e69d',1,'dap_enc_base64.c']]] +]; diff --git a/libdap/docs/search/typedefs_1.html b/libdap/docs/search/typedefs_1.html new file mode 100755 index 0000000000000000000000000000000000000000..6edac96b8b23bf312424df73d2437440e3624513 --- /dev/null +++ b/libdap/docs/search/typedefs_1.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="typedefs_1.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/typedefs_1.js b/libdap/docs/search/typedefs_1.js new file mode 100755 index 0000000000000000000000000000000000000000..9e85ce4b7dd90cf9818ec30a0fd87f40c9f29638 --- /dev/null +++ b/libdap/docs/search/typedefs_1.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['dap_5fconfig_5finternal_5ft',['dap_config_internal_t',['../dap__config_8c.html#a0d4df0d8066c51ebc87edddaca70c813',1,'dap_config.c']]], + ['dap_5fconfig_5fitem_5ft',['dap_config_item_t',['../dap__config_8c.html#a68fb401f4e3f45764f501c080845750d',1,'dap_config.c']]], + ['dap_5fconfig_5ft',['dap_config_t',['../dap__config_8h.html#a041ba6d4b0f96f433117582d3960d701',1,'dap_config.h']]], + ['dap_5fcpu_5fstats_5ft',['dap_cpu_stats_t',['../dap__cpu__monitor_8h.html#a71734313dfad90003700e30dbbd5dbe4',1,'dap_cpu_monitor.h']]], + ['dap_5fcpu_5ft',['dap_cpu_t',['../dap__cpu__monitor_8h.html#a07c777b976f756102607b683d5969c7d',1,'dap_cpu_monitor.h']]], + ['dap_5fenc_5fb64_5fstandard_5ft',['dap_enc_b64_standard_t',['../dap__enc__base64_8h.html#ae47fdbc3967e395dac8f30599961f45d',1,'dap_enc_base64.h']]], + ['dap_5fprocess_5fmemory_5ft',['dap_process_memory_t',['../dap__process__memory_8h.html#a9eb3c4be5e9b4a8738730a15bb190555',1,'dap_process_memory.h']]] +]; diff --git a/libdap/docs/search/typedefs_2.html b/libdap/docs/search/typedefs_2.html new file mode 100755 index 0000000000000000000000000000000000000000..cc5cc40478d15474b7ca1ea93ccfe0f0daaf953a --- /dev/null +++ b/libdap/docs/search/typedefs_2.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="typedefs_2.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/typedefs_2.js b/libdap/docs/search/typedefs_2.js new file mode 100755 index 0000000000000000000000000000000000000000..02e273dd2d32816b81f1c8f0768b074567f92579 --- /dev/null +++ b/libdap/docs/search/typedefs_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['proc_5fstat_5fline_5ft',['proc_stat_line_t',['../dap__cpu__monitor_8c.html#ab88a496964045c6ffffcc65683cdb871',1,'dap_cpu_monitor.c']]] +]; diff --git a/libdap/docs/search/variables_0.html b/libdap/docs/search/variables_0.html new file mode 100755 index 0000000000000000000000000000000000000000..3835278f0ecb383cf4726ad8b9f92616d0710736 --- /dev/null +++ b/libdap/docs/search/variables_0.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="variables_0.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/variables_0.js b/libdap/docs/search/variables_0.js new file mode 100755 index 0000000000000000000000000000000000000000..4a068fd76aa473d785ffb251628ae6c9fdff478f --- /dev/null +++ b/libdap/docs/search/variables_0.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['_5fcpu_5fold_5fstats',['_cpu_old_stats',['../dap__cpu__monitor_8c.html#a01fc76df94fc3adf860bc4f7bbe23abb',1,'dap_cpu_monitor.c']]], + ['_5fcpu_5fstats',['_cpu_stats',['../dap__cpu__monitor_8c.html#a44d7b6d3df547ba454b836b65ec25611',1,'dap_cpu_monitor.c']]], + ['_5fcpu_5fsummary_5fold',['_cpu_summary_old',['../dap__cpu__monitor_8c.html#a98ed3bdb3fed3d87f29f0bf84b51ba95',1,'dap_cpu_monitor.c']]], + ['_5finternal',['_internal',['../structdap__config.html#a1fddb1b8266f833975a1843cc0a97f89',1,'dap_config']]], + ['_5fproc_5fstat',['_proc_stat',['../dap__cpu__monitor_8c.html#a857f823e882aa77331ba7dfdd7d5d1ce',1,'dap_cpu_monitor.c']]] +]; diff --git a/libdap/docs/search/variables_1.html b/libdap/docs/search/variables_1.html new file mode 100755 index 0000000000000000000000000000000000000000..3c65cf264efd25d16632e3e20eb26d891c4c1dd2 --- /dev/null +++ b/libdap/docs/search/variables_1.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="variables_1.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/variables_1.js b/libdap/docs/search/variables_1.js new file mode 100755 index 0000000000000000000000000000000000000000..55935f69d653f394e705a0a2d86c7a63d077dce0 --- /dev/null +++ b/libdap/docs/search/variables_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['array_5flength',['array_length',['../structdap__config__item.html#a1356be094234835635d452d5c2275e51',1,'dap_config_item']]] +]; diff --git a/libdap/docs/search/variables_2.html b/libdap/docs/search/variables_2.html new file mode 100755 index 0000000000000000000000000000000000000000..7b43e0ac703c25343c4e4c186fa788b77d744c1d --- /dev/null +++ b/libdap/docs/search/variables_2.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="variables_2.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/variables_2.js b/libdap/docs/search/variables_2.js new file mode 100755 index 0000000000000000000000000000000000000000..1797901272098a8e6a7764ab0b584831cd63b2ed --- /dev/null +++ b/libdap/docs/search/variables_2.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['b64_5fstandart_5ftable',['b64_standart_table',['../dap__enc__base64_8c.html#afb28b1f82335ab68b1a7e6dc582eefc7',1,'dap_enc_base64.c']]], + ['b64_5ftable_5furl_5fsafe',['b64_table_url_safe',['../dap__enc__base64_8c.html#a9c8315f27143b78bd7dd570c8c4168a1',1,'dap_enc_base64.c']]], + ['break_5flatency',['break_latency',['../dap__common_8c.html#af4baddcad4576299c1c44f1822c799fc',1,'dap_common.c']]], + ['breaker_5fset',['breaker_set',['../dap__common_8c.html#abd3c99eacca06234a6e4411a5ff0ae22',1,'dap_common.c']]] +]; diff --git a/libdap/docs/search/variables_3.html b/libdap/docs/search/variables_3.html new file mode 100755 index 0000000000000000000000000000000000000000..ea0392dfe36ee2ce62d5cfa728d6d0922e60b2fa --- /dev/null +++ b/libdap/docs/search/variables_3.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="variables_3.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/variables_3.js b/libdap/docs/search/variables_3.js new file mode 100755 index 0000000000000000000000000000000000000000..f6fd8f8f0291766072508a566b6771cf4039ac6f --- /dev/null +++ b/libdap/docs/search/variables_3.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['childs',['childs',['../structdap__config__item.html#a0d5f05c91c5195732960516a5395e39a',1,'dap_config_item']]], + ['cpu',['cpu',['../structproc__stat__line.html#ae4a4c7a21577e98720547dc33a58f51c',1,'proc_stat_line']]], + ['cpu_5fcores_5fcount',['cpu_cores_count',['../structdap__cpu__stats.html#a2a4a244c6c716b5e25483ca67a69f7c9',1,'dap_cpu_stats']]], + ['cpu_5fsummary',['cpu_summary',['../structdap__cpu__stats.html#a173285c53062dc49c248d7048c944a6a',1,'dap_cpu_stats']]], + ['cpus',['cpus',['../structdap__cpu__stats.html#ad6e495ab156770ce147fe1f20bfe6562',1,'dap_cpu_stats']]] +]; diff --git a/libdap/docs/search/variables_4.html b/libdap/docs/search/variables_4.html new file mode 100755 index 0000000000000000000000000000000000000000..1ed95cb60c9769a648d534c3cf8ccb40d1b577e0 --- /dev/null +++ b/libdap/docs/search/variables_4.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="variables_4.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/variables_4.js b/libdap/docs/search/variables_4.js new file mode 100755 index 0000000000000000000000000000000000000000..3b8014504a0b3ad2d17f3ad531385adb971ef360 --- /dev/null +++ b/libdap/docs/search/variables_4.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['data_5fbool',['data_bool',['../structdap__config__item.html#a968b000deb88effc230e70d0d9c66a92',1,'dap_config_item']]], + ['data_5fdouble',['data_double',['../structdap__config__item.html#ac6ac02cf0dd1be8351d88377d13a2334',1,'dap_config_item']]], + ['data_5fint32',['data_int32',['../structdap__config__item.html#a454d9855bc02ab4ea83ae024ea68a790',1,'dap_config_item']]], + ['data_5fstr',['data_str',['../structdap__config__item.html#a58fbfb4c01c1129eefb20396925b4bc4',1,'dap_config_item']]], + ['data_5fstr_5farray',['data_str_array',['../structdap__config__item.html#ac875bc711381a9cdd1422a41f8cc217d',1,'dap_config_item']]], + ['data_5fuint8',['data_uint8',['../structdap__config__item.html#ae6bac770c57d935696cb93c6a7e60266',1,'dap_config_item']]] +]; diff --git a/libdap/docs/search/variables_5.html b/libdap/docs/search/variables_5.html new file mode 100755 index 0000000000000000000000000000000000000000..ecc883b5cc0dfb1ac3f3ec3cd27fab2558c4b430 --- /dev/null +++ b/libdap/docs/search/variables_5.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="variables_5.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/variables_5.js b/libdap/docs/search/variables_5.js new file mode 100755 index 0000000000000000000000000000000000000000..7730e99a7c6e7e7be57709bc6c0d9eb51b3e4e68 --- /dev/null +++ b/libdap/docs/search/variables_5.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['guest',['guest',['../structproc__stat__line.html#aaf57de8eaf10ecf4cb98a95db8d15ab6',1,'proc_stat_line']]], + ['guest_5fnice',['guest_nice',['../structproc__stat__line.html#aa9149e2bf80b103cee1cd83748cdf34b',1,'proc_stat_line']]] +]; diff --git a/libdap/docs/search/variables_6.html b/libdap/docs/search/variables_6.html new file mode 100755 index 0000000000000000000000000000000000000000..0c1a66babfedc96b877f2c4ba39b9e42c1af2eb3 --- /dev/null +++ b/libdap/docs/search/variables_6.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="variables_6.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/variables_6.js b/libdap/docs/search/variables_6.js new file mode 100755 index 0000000000000000000000000000000000000000..6bef37ef60ed0db52d2c18622b793b9dffb8769a --- /dev/null +++ b/libdap/docs/search/variables_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['hh',['hh',['../structdap__config__item.html#ae4e3cf0c16788119e444b219bf958a80',1,'dap_config_item']]] +]; diff --git a/libdap/docs/search/variables_7.html b/libdap/docs/search/variables_7.html new file mode 100755 index 0000000000000000000000000000000000000000..e0da2ef5b38df79d6eee9f177fc6b0a25e3d29bf --- /dev/null +++ b/libdap/docs/search/variables_7.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="variables_7.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/variables_7.js b/libdap/docs/search/variables_7.js new file mode 100755 index 0000000000000000000000000000000000000000..a834987d481a947734359e6f7f2dd274b7e0f156 --- /dev/null +++ b/libdap/docs/search/variables_7.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['idle',['idle',['../structproc__stat__line.html#a5450aed4badc84f28992b5a171c6c24e',1,'proc_stat_line']]], + ['idle_5ftime',['idle_time',['../structdap__cpu.html#a8eb9a71e68def6d6087e5ae87b8b8ab1',1,'dap_cpu']]], + ['initialized',['initialized',['../dap__common_8c.html#ad06983e7f6e71b233ea7ff3dee1952f2',1,'dap_common.c']]], + ['iowait',['iowait',['../structproc__stat__line.html#aa474930d802a9275d1688d87654962f8',1,'proc_stat_line']]], + ['irq',['irq',['../structproc__stat__line.html#ac884edb2ab2b162a68fa30f22f0cbe34',1,'proc_stat_line']]], + ['is_5farray',['is_array',['../structdap__config__item.html#a4b63e29afcccdd4fcee6ef2476a7b94d',1,'dap_config_item']]], + ['item_5fnext',['item_next',['../structdap__config__item.html#ad00ba78ddeec058fb3c32b115229f7ec',1,'dap_config_item']]], + ['item_5froot',['item_root',['../structdap__config__internal.html#a1b2f52e9224342c2db4875dac880bb91',1,'dap_config_internal']]] +]; diff --git a/libdap/docs/search/variables_8.html b/libdap/docs/search/variables_8.html new file mode 100755 index 0000000000000000000000000000000000000000..0c3d1df33f736b80736006d518163c9efab03811 --- /dev/null +++ b/libdap/docs/search/variables_8.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="variables_8.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/variables_8.js b/libdap/docs/search/variables_8.js new file mode 100755 index 0000000000000000000000000000000000000000..86f461506e74d2c8d3f1db3b19d3157acb1e9703 --- /dev/null +++ b/libdap/docs/search/variables_8.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['l_5fpossible_5fchars',['l_possible_chars',['../dap__common_8c.html#a38aacebea4dcb4a58907594acf07d45f',1,'dap_common.c']]], + ['last_5ferror',['last_error',['../dap__common_8c.html#ad817aedf213484c84d15adbe5f785333',1,'dap_common.c']]], + ['load',['load',['../structdap__cpu.html#a34954f614e249658e1fe9103c95333c6',1,'dap_cpu']]], + ['log_5flevel',['log_level',['../dap__common_8c.html#ad2da3ac425bc17356fa089cd52c099bc',1,'dap_common.c']]], + ['log_5ftag_5ffmt_5fstr',['log_tag_fmt_str',['../dap__common_8c.html#a27810c0f123878383572ea6e7ab714aa',1,'dap_common.c']]] +]; diff --git a/libdap/docs/search/variables_9.html b/libdap/docs/search/variables_9.html new file mode 100755 index 0000000000000000000000000000000000000000..e14a1071e3247552511a95dca53fa312359461e0 --- /dev/null +++ b/libdap/docs/search/variables_9.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="variables_9.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/variables_9.js b/libdap/docs/search/variables_9.js new file mode 100755 index 0000000000000000000000000000000000000000..48b04b1dcc7b7d0513d1083de50e006c52a896bb --- /dev/null +++ b/libdap/docs/search/variables_9.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['name',['name',['../structdap__config__item.html#a569502aa96f12958efcaac38dc3864d7',1,'dap_config_item']]], + ['ncpu',['ncpu',['../structdap__cpu.html#a1a555a9a00eddc0c10b401d601462441',1,'dap_cpu']]], + ['nice',['nice',['../structproc__stat__line.html#a8e470a27c13e95e0332746511da0eefd',1,'proc_stat_line']]] +]; diff --git a/libdap/docs/search/variables_a.html b/libdap/docs/search/variables_a.html new file mode 100755 index 0000000000000000000000000000000000000000..4e38be7cbfc8176c0c9080a1be9e9e39ad8890db --- /dev/null +++ b/libdap/docs/search/variables_a.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="variables_a.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/variables_a.js b/libdap/docs/search/variables_a.js new file mode 100755 index 0000000000000000000000000000000000000000..129a07805646dd9e5b245e021b5ccbe18192f2b0 --- /dev/null +++ b/libdap/docs/search/variables_a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['rss',['rss',['../structdap__process__memory.html#ae68f8b935eee6f3d06adc3379ced9329',1,'dap_process_memory']]] +]; diff --git a/libdap/docs/search/variables_b.html b/libdap/docs/search/variables_b.html new file mode 100755 index 0000000000000000000000000000000000000000..c98ef41d0a93e00e72b307bbd7df33fd7ff8ee53 --- /dev/null +++ b/libdap/docs/search/variables_b.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="variables_b.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/variables_b.js b/libdap/docs/search/variables_b.js new file mode 100755 index 0000000000000000000000000000000000000000..bdb90f5d545a745e304c289ec48cec23e20a5699 --- /dev/null +++ b/libdap/docs/search/variables_b.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['s_5fconfigs_5fpath',['s_configs_path',['../dap__config_8c.html#aed6b1193ba38243186cfb5171c5db794',1,'dap_config.c']]], + ['s_5flog_5ffile',['s_log_file',['../dap__common_8c.html#a50021147b626e80a4756b326379832e9',1,'dap_common.c']]], + ['softirq',['softirq',['../structproc__stat__line.html#a2e0b270f69fe599a43bff21867e5ae03',1,'proc_stat_line']]], + ['steal',['steal',['../structproc__stat__line.html#ae2167610040ce2a590e4aca9657301bf',1,'proc_stat_line']]], + ['system',['system',['../structproc__stat__line.html#afe925267a10c39272ca56786f9b4e819',1,'proc_stat_line']]] +]; diff --git a/libdap/docs/search/variables_c.html b/libdap/docs/search/variables_c.html new file mode 100755 index 0000000000000000000000000000000000000000..d5f444969d469f53a7d7ba97ce9d5a5af48f2847 --- /dev/null +++ b/libdap/docs/search/variables_c.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="variables_c.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/variables_c.js b/libdap/docs/search/variables_c.js new file mode 100755 index 0000000000000000000000000000000000000000..d63f4958f1beb6484c2e2249330909b04e2b124f --- /dev/null +++ b/libdap/docs/search/variables_c.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['total',['total',['../structproc__stat__line.html#aaace759e4cb4ff95a881cbbdb4be8610',1,'proc_stat_line']]], + ['total_5ftime',['total_time',['../structdap__cpu.html#a0c983a38d28e1a302edbbd7c7f0817ab',1,'dap_cpu']]] +]; diff --git a/libdap/docs/search/variables_d.html b/libdap/docs/search/variables_d.html new file mode 100755 index 0000000000000000000000000000000000000000..a57e383b1e990927144cb26ce117ebbe0a9750b0 --- /dev/null +++ b/libdap/docs/search/variables_d.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="variables_d.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/variables_d.js b/libdap/docs/search/variables_d.js new file mode 100755 index 0000000000000000000000000000000000000000..ffabac56b00a3f80bb288e1bc084cf2047748fad --- /dev/null +++ b/libdap/docs/search/variables_d.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['user',['user',['../structproc__stat__line.html#a402884026456bc19d3786dc06fb6c5fb',1,'proc_stat_line']]] +]; diff --git a/libdap/docs/search/variables_e.html b/libdap/docs/search/variables_e.html new file mode 100755 index 0000000000000000000000000000000000000000..d1502e0e5316ea775c5352914de5f6e7458a73cc --- /dev/null +++ b/libdap/docs/search/variables_e.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html><head><title></title> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<link rel="stylesheet" type="text/css" href="search.css"/> +<script type="text/javascript" src="variables_e.js"></script> +<script type="text/javascript" src="search.js"></script> +</head> +<body class="SRPage"> +<div id="SRIndex"> +<div class="SRStatus" id="Loading">Loading...</div> +<div id="SRResults"></div> +<script type="text/javascript"><!-- +createResults(); +--></script> +<div class="SRStatus" id="Searching">Searching...</div> +<div class="SRStatus" id="NoMatches">No Matches</div> +<script type="text/javascript"><!-- +document.getElementById("Loading").style.display="none"; +document.getElementById("NoMatches").style.display="none"; +var searchResults = new SearchResults("searchResults"); +searchResults.Search(); +--></script> +</div> +</body> +</html> diff --git a/libdap/docs/search/variables_e.js b/libdap/docs/search/variables_e.js new file mode 100755 index 0000000000000000000000000000000000000000..f1337c6828fca43e77e283b1658596675f160bad --- /dev/null +++ b/libdap/docs/search/variables_e.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['vsz',['vsz',['../structdap__process__memory.html#a60efb3269151a8f5c8b25a4ada69835f',1,'dap_process_memory']]] +]; diff --git a/libdap/docs/splitbar.png b/libdap/docs/splitbar.png new file mode 100755 index 0000000000000000000000000000000000000000..fe895f2c58179b471a22d8320b39a4bd7312ec8e Binary files /dev/null and b/libdap/docs/splitbar.png differ diff --git a/libdap/docs/structdap__config.html b/libdap/docs/structdap__config.html new file mode 100755 index 0000000000000000000000000000000000000000..aab2e2ea1bca2a1bc9d16231a438a2cf65b28cbb --- /dev/null +++ b/libdap/docs/structdap__config.html @@ -0,0 +1,123 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: dap_config Struct Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="classes.html"><span>Data Structure Index</span></a></li> + <li><a href="functions.html"><span>Data Fields</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#pub-attribs">Data Fields</a> </div> + <div class="headertitle"> +<div class="title">dap_config Struct Reference</div> </div> +</div><!--header--> +<div class="contents"> + +<p><code>#include <<a class="el" href="dap__config_8h_source.html">dap_config.h</a>></code></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a> +Data Fields</h2></td></tr> +<tr class="memitem:a1fddb1b8266f833975a1843cc0a97f89"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__config.html#a1fddb1b8266f833975a1843cc0a97f89">_internal</a></td></tr> +<tr class="separator:a1fddb1b8266f833975a1843cc0a97f89"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Field Documentation</h2> +<a class="anchor" id="a1fddb1b8266f833975a1843cc0a97f89"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void* dap_config::_internal</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<hr/>The documentation for this struct was generated from the following file:<ul> +<li>core/<a class="el" href="dap__config_8h_source.html">dap_config.h</a></li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/structdap__config__internal.html b/libdap/docs/structdap__config__internal.html new file mode 100755 index 0000000000000000000000000000000000000000..c7ada3bd0b49d3bf5b63f1de59ad392f10f5b4eb --- /dev/null +++ b/libdap/docs/structdap__config__internal.html @@ -0,0 +1,121 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: dap_config_internal Struct Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="classes.html"><span>Data Structure Index</span></a></li> + <li><a href="functions.html"><span>Data Fields</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#pub-attribs">Data Fields</a> </div> + <div class="headertitle"> +<div class="title">dap_config_internal Struct Reference</div> </div> +</div><!--header--> +<div class="contents"> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a> +Data Fields</h2></td></tr> +<tr class="memitem:a1b2f52e9224342c2db4875dac880bb91"><td class="memItemLeft" align="right" valign="top"><a class="el" href="dap__config_8c.html#a68fb401f4e3f45764f501c080845750d">dap_config_item_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__config__internal.html#a1b2f52e9224342c2db4875dac880bb91">item_root</a></td></tr> +<tr class="separator:a1b2f52e9224342c2db4875dac880bb91"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Field Documentation</h2> +<a class="anchor" id="a1b2f52e9224342c2db4875dac880bb91"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="dap__config_8c.html#a68fb401f4e3f45764f501c080845750d">dap_config_item_t</a>* dap_config_internal::item_root</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<hr/>The documentation for this struct was generated from the following file:<ul> +<li>core/<a class="el" href="dap__config_8c.html">dap_config.c</a></li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/structdap__config__item.html b/libdap/docs/structdap__config__item.html new file mode 100755 index 0000000000000000000000000000000000000000..b66bc7ac0f4c077a34c4ae856d8774a18fa55baf --- /dev/null +++ b/libdap/docs/structdap__config__item.html @@ -0,0 +1,298 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: dap_config_item Struct Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="classes.html"><span>Data Structure Index</span></a></li> + <li><a href="functions.html"><span>Data Fields</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#pub-attribs">Data Fields</a> </div> + <div class="headertitle"> +<div class="title">dap_config_item Struct Reference</div> </div> +</div><!--header--> +<div class="contents"> + +<p>The <a class="el" href="structdap__config__item.html" title="The dap_config_item struct. ">dap_config_item</a> struct. + <a href="structdap__config__item.html#details">More...</a></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a> +Data Fields</h2></td></tr> +<tr class="memitem:a569502aa96f12958efcaac38dc3864d7"><td class="memItemLeft" align="right" valign="top">char </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__config__item.html#a569502aa96f12958efcaac38dc3864d7">name</a> [64]</td></tr> +<tr class="separator:a569502aa96f12958efcaac38dc3864d7"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a0d5f05c91c5195732960516a5395e39a"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structdap__config__item.html">dap_config_item</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__config__item.html#a0d5f05c91c5195732960516a5395e39a">childs</a></td></tr> +<tr class="separator:a0d5f05c91c5195732960516a5395e39a"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ad00ba78ddeec058fb3c32b115229f7ec"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structdap__config__item.html">dap_config_item</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__config__item.html#ad00ba78ddeec058fb3c32b115229f7ec">item_next</a></td></tr> +<tr class="separator:ad00ba78ddeec058fb3c32b115229f7ec"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a41d35693dc6b3aa54a5fe7174ec4219c"><td class="memItemLeft" >union {</td></tr> +<tr class="memitem:a0568b03e822ae862eecd237b0ef3caf1"><td class="memItemLeft" >   char *   <a class="el" href="structdap__config__item.html#a58fbfb4c01c1129eefb20396925b4bc4">data_str</a></td></tr> +<tr class="separator:a0568b03e822ae862eecd237b0ef3caf1"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a446b0bde73c416fa2d98628fdab1febe"><td class="memItemLeft" >   uint8_t   <a class="el" href="structdap__config__item.html#ae6bac770c57d935696cb93c6a7e60266">data_uint8</a></td></tr> +<tr class="separator:a446b0bde73c416fa2d98628fdab1febe"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a38f845dea483eb5f3076a3c933bb1c51"><td class="memItemLeft" >   bool   <a class="el" href="structdap__config__item.html#a968b000deb88effc230e70d0d9c66a92">data_bool</a></td></tr> +<tr class="separator:a38f845dea483eb5f3076a3c933bb1c51"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:acf15c9b1f654b7ce8f9ce29596e200b2"><td class="memItemLeft" >   double   <a class="el" href="structdap__config__item.html#ac6ac02cf0dd1be8351d88377d13a2334">data_double</a></td></tr> +<tr class="separator:acf15c9b1f654b7ce8f9ce29596e200b2"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ad60cec46b5f54316c0207143136fa2ef"><td class="memItemLeft" >   int32_t   <a class="el" href="structdap__config__item.html#a454d9855bc02ab4ea83ae024ea68a790">data_int32</a></td></tr> +<tr class="separator:ad60cec46b5f54316c0207143136fa2ef"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a09670847a42730d2b86bfa0e6f082ee2"><td class="memItemLeft" >   struct {</td></tr> +<tr class="memitem:a3eb75e5d7d99322b1af00adead59b69f"><td class="memItemLeft" >      char **   <a class="el" href="structdap__config__item.html#ac875bc711381a9cdd1422a41f8cc217d">data_str_array</a></td></tr> +<tr class="separator:a3eb75e5d7d99322b1af00adead59b69f"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a9fcae017b786921a4bfe17e964abfcfe"><td class="memItemLeft" >      uint16_t   <a class="el" href="structdap__config__item.html#a1356be094234835635d452d5c2275e51">array_length</a></td></tr> +<tr class="separator:a9fcae017b786921a4bfe17e964abfcfe"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a09670847a42730d2b86bfa0e6f082ee2"><td class="memItemLeft" valign="top">   } </td><td class="memItemRight" valign="bottom"></td></tr> +<tr class="separator:a09670847a42730d2b86bfa0e6f082ee2"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a41d35693dc6b3aa54a5fe7174ec4219c"><td class="memItemLeft" valign="top">}; </td><td class="memItemRight" valign="bottom"></td></tr> +<tr class="separator:a41d35693dc6b3aa54a5fe7174ec4219c"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a4b63e29afcccdd4fcee6ef2476a7b94d"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__config__item.html#a4b63e29afcccdd4fcee6ef2476a7b94d">is_array</a></td></tr> +<tr class="separator:a4b63e29afcccdd4fcee6ef2476a7b94d"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ae4e3cf0c16788119e444b219bf958a80"><td class="memItemLeft" align="right" valign="top">UT_hash_handle </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__config__item.html#ae4e3cf0c16788119e444b219bf958a80">hh</a></td></tr> +<tr class="separator:ae4e3cf0c16788119e444b219bf958a80"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> +<div class="textblock"><p>The <a class="el" href="structdap__config__item.html" title="The dap_config_item struct. ">dap_config_item</a> struct. </p> +</div><h2 class="groupheader">Field Documentation</h2> +<a class="anchor" id="a41d35693dc6b3aa54a5fe7174ec4219c"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">union { ... } </td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a1356be094234835635d452d5c2275e51"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">uint16_t dap_config_item::array_length</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a0d5f05c91c5195732960516a5395e39a"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">struct <a class="el" href="structdap__config__item.html">dap_config_item</a>* dap_config_item::childs</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a968b000deb88effc230e70d0d9c66a92"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">bool dap_config_item::data_bool</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="ac6ac02cf0dd1be8351d88377d13a2334"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">double dap_config_item::data_double</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a454d9855bc02ab4ea83ae024ea68a790"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int32_t dap_config_item::data_int32</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a58fbfb4c01c1129eefb20396925b4bc4"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">char* dap_config_item::data_str</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="ac875bc711381a9cdd1422a41f8cc217d"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">char** dap_config_item::data_str_array</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="ae6bac770c57d935696cb93c6a7e60266"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">uint8_t dap_config_item::data_uint8</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="ae4e3cf0c16788119e444b219bf958a80"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">UT_hash_handle dap_config_item::hh</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a4b63e29afcccdd4fcee6ef2476a7b94d"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">bool dap_config_item::is_array</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="ad00ba78ddeec058fb3c32b115229f7ec"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">struct <a class="el" href="structdap__config__item.html">dap_config_item</a>* dap_config_item::item_next</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a569502aa96f12958efcaac38dc3864d7"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">char dap_config_item::name[64]</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<hr/>The documentation for this struct was generated from the following file:<ul> +<li>core/<a class="el" href="dap__config_8c.html">dap_config.c</a></li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/structdap__cpu.html b/libdap/docs/structdap__cpu.html new file mode 100755 index 0000000000000000000000000000000000000000..1dbc9d49bbae849139eb5ac588e7b65df728efd6 --- /dev/null +++ b/libdap/docs/structdap__cpu.html @@ -0,0 +1,165 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: dap_cpu Struct Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="classes.html"><span>Data Structure Index</span></a></li> + <li><a href="functions.html"><span>Data Fields</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#pub-attribs">Data Fields</a> </div> + <div class="headertitle"> +<div class="title">dap_cpu Struct Reference</div> </div> +</div><!--header--> +<div class="contents"> + +<p><code>#include <<a class="el" href="dap__cpu__monitor_8h_source.html">dap_cpu_monitor.h</a>></code></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a> +Data Fields</h2></td></tr> +<tr class="memitem:a1a555a9a00eddc0c10b401d601462441"><td class="memItemLeft" align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__cpu.html#a1a555a9a00eddc0c10b401d601462441">ncpu</a></td></tr> +<tr class="separator:a1a555a9a00eddc0c10b401d601462441"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a34954f614e249658e1fe9103c95333c6"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__cpu.html#a34954f614e249658e1fe9103c95333c6">load</a></td></tr> +<tr class="separator:a34954f614e249658e1fe9103c95333c6"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a0c983a38d28e1a302edbbd7c7f0817ab"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__cpu.html#a0c983a38d28e1a302edbbd7c7f0817ab">total_time</a></td></tr> +<tr class="separator:a0c983a38d28e1a302edbbd7c7f0817ab"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a8eb9a71e68def6d6087e5ae87b8b8ab1"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__cpu.html#a8eb9a71e68def6d6087e5ae87b8b8ab1">idle_time</a></td></tr> +<tr class="separator:a8eb9a71e68def6d6087e5ae87b8b8ab1"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Field Documentation</h2> +<a class="anchor" id="a8eb9a71e68def6d6087e5ae87b8b8ab1"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t dap_cpu::idle_time</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a34954f614e249658e1fe9103c95333c6"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">float dap_cpu::load</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a1a555a9a00eddc0c10b401d601462441"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">unsigned dap_cpu::ncpu</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a0c983a38d28e1a302edbbd7c7f0817ab"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t dap_cpu::total_time</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<hr/>The documentation for this struct was generated from the following file:<ul> +<li>core/unix/<a class="el" href="dap__cpu__monitor_8h_source.html">dap_cpu_monitor.h</a></li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/structdap__cpu__stats.html b/libdap/docs/structdap__cpu__stats.html new file mode 100755 index 0000000000000000000000000000000000000000..3c75931ed371e98d172ee21c6d425a28597d969a --- /dev/null +++ b/libdap/docs/structdap__cpu__stats.html @@ -0,0 +1,151 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: dap_cpu_stats Struct Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="classes.html"><span>Data Structure Index</span></a></li> + <li><a href="functions.html"><span>Data Fields</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#pub-attribs">Data Fields</a> </div> + <div class="headertitle"> +<div class="title">dap_cpu_stats Struct Reference</div> </div> +</div><!--header--> +<div class="contents"> + +<p><code>#include <<a class="el" href="dap__cpu__monitor_8h_source.html">dap_cpu_monitor.h</a>></code></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a> +Data Fields</h2></td></tr> +<tr class="memitem:a2a4a244c6c716b5e25483ca67a69f7c9"><td class="memItemLeft" align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__cpu__stats.html#a2a4a244c6c716b5e25483ca67a69f7c9">cpu_cores_count</a></td></tr> +<tr class="separator:a2a4a244c6c716b5e25483ca67a69f7c9"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a173285c53062dc49c248d7048c944a6a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="dap__cpu__monitor_8h.html#a07c777b976f756102607b683d5969c7d">dap_cpu_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__cpu__stats.html#a173285c53062dc49c248d7048c944a6a">cpu_summary</a></td></tr> +<tr class="separator:a173285c53062dc49c248d7048c944a6a"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ad6e495ab156770ce147fe1f20bfe6562"><td class="memItemLeft" align="right" valign="top"><a class="el" href="dap__cpu__monitor_8h.html#a07c777b976f756102607b683d5969c7d">dap_cpu_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__cpu__stats.html#ad6e495ab156770ce147fe1f20bfe6562">cpus</a> [<a class="el" href="dap__cpu__monitor_8h.html#add08506024a2c5399f9f9f6a797392ef">MAX_CPU_COUNT</a>]</td></tr> +<tr class="separator:ad6e495ab156770ce147fe1f20bfe6562"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Field Documentation</h2> +<a class="anchor" id="a2a4a244c6c716b5e25483ca67a69f7c9"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">unsigned dap_cpu_stats::cpu_cores_count</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a173285c53062dc49c248d7048c944a6a"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="dap__cpu__monitor_8h.html#a07c777b976f756102607b683d5969c7d">dap_cpu_t</a> dap_cpu_stats::cpu_summary</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="ad6e495ab156770ce147fe1f20bfe6562"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="dap__cpu__monitor_8h.html#a07c777b976f756102607b683d5969c7d">dap_cpu_t</a> dap_cpu_stats::cpus[<a class="el" href="dap__cpu__monitor_8h.html#add08506024a2c5399f9f9f6a797392ef">MAX_CPU_COUNT</a>]</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<hr/>The documentation for this struct was generated from the following file:<ul> +<li>core/unix/<a class="el" href="dap__cpu__monitor_8h_source.html">dap_cpu_monitor.h</a></li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/structdap__process__memory.html b/libdap/docs/structdap__process__memory.html new file mode 100755 index 0000000000000000000000000000000000000000..81eb173816e7751b21babd6b893d1104464b3090 --- /dev/null +++ b/libdap/docs/structdap__process__memory.html @@ -0,0 +1,137 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: dap_process_memory Struct Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="classes.html"><span>Data Structure Index</span></a></li> + <li><a href="functions.html"><span>Data Fields</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#pub-attribs">Data Fields</a> </div> + <div class="headertitle"> +<div class="title">dap_process_memory Struct Reference</div> </div> +</div><!--header--> +<div class="contents"> + +<p><code>#include <<a class="el" href="dap__process__memory_8h_source.html">dap_process_memory.h</a>></code></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a> +Data Fields</h2></td></tr> +<tr class="memitem:a60efb3269151a8f5c8b25a4ada69835f"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__process__memory.html#a60efb3269151a8f5c8b25a4ada69835f">vsz</a></td></tr> +<tr class="separator:a60efb3269151a8f5c8b25a4ada69835f"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ae68f8b935eee6f3d06adc3379ced9329"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structdap__process__memory.html#ae68f8b935eee6f3d06adc3379ced9329">rss</a></td></tr> +<tr class="separator:ae68f8b935eee6f3d06adc3379ced9329"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Field Documentation</h2> +<a class="anchor" id="ae68f8b935eee6f3d06adc3379ced9329"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t dap_process_memory::rss</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a60efb3269151a8f5c8b25a4ada69835f"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t dap_process_memory::vsz</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<hr/>The documentation for this struct was generated from the following file:<ul> +<li>core/unix/<a class="el" href="dap__process__memory_8h_source.html">dap_process_memory.h</a></li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/structproc__stat__line.html b/libdap/docs/structproc__stat__line.html new file mode 100755 index 0000000000000000000000000000000000000000..29df18f9ebc1049e17015b6b343b112d167ecc3b --- /dev/null +++ b/libdap/docs/structproc__stat__line.html @@ -0,0 +1,275 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>LibDap: proc_stat_line Struct Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { init_search(); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">LibDap + </div> + <div id="projectbrief">This library contains the basic modules that are used in the products of the family DAP</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="classes.html"><span>Data Structure Index</span></a></li> + <li><a href="functions.html"><span>Data Fields</span></a></li> + </ul> + </div> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#pub-attribs">Data Fields</a> </div> + <div class="headertitle"> +<div class="title">proc_stat_line Struct Reference</div> </div> +</div><!--header--> +<div class="contents"> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a> +Data Fields</h2></td></tr> +<tr class="memitem:ae4a4c7a21577e98720547dc33a58f51c"><td class="memItemLeft" align="right" valign="top">char </td><td class="memItemRight" valign="bottom"><a class="el" href="structproc__stat__line.html#ae4a4c7a21577e98720547dc33a58f51c">cpu</a> [10]</td></tr> +<tr class="separator:ae4a4c7a21577e98720547dc33a58f51c"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a402884026456bc19d3786dc06fb6c5fb"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structproc__stat__line.html#a402884026456bc19d3786dc06fb6c5fb">user</a></td></tr> +<tr class="separator:a402884026456bc19d3786dc06fb6c5fb"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a8e470a27c13e95e0332746511da0eefd"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structproc__stat__line.html#a8e470a27c13e95e0332746511da0eefd">nice</a></td></tr> +<tr class="separator:a8e470a27c13e95e0332746511da0eefd"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:afe925267a10c39272ca56786f9b4e819"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structproc__stat__line.html#afe925267a10c39272ca56786f9b4e819">system</a></td></tr> +<tr class="separator:afe925267a10c39272ca56786f9b4e819"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a5450aed4badc84f28992b5a171c6c24e"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structproc__stat__line.html#a5450aed4badc84f28992b5a171c6c24e">idle</a></td></tr> +<tr class="separator:a5450aed4badc84f28992b5a171c6c24e"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aa474930d802a9275d1688d87654962f8"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structproc__stat__line.html#aa474930d802a9275d1688d87654962f8">iowait</a></td></tr> +<tr class="separator:aa474930d802a9275d1688d87654962f8"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ac884edb2ab2b162a68fa30f22f0cbe34"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structproc__stat__line.html#ac884edb2ab2b162a68fa30f22f0cbe34">irq</a></td></tr> +<tr class="separator:ac884edb2ab2b162a68fa30f22f0cbe34"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a2e0b270f69fe599a43bff21867e5ae03"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structproc__stat__line.html#a2e0b270f69fe599a43bff21867e5ae03">softirq</a></td></tr> +<tr class="separator:a2e0b270f69fe599a43bff21867e5ae03"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ae2167610040ce2a590e4aca9657301bf"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structproc__stat__line.html#ae2167610040ce2a590e4aca9657301bf">steal</a></td></tr> +<tr class="separator:ae2167610040ce2a590e4aca9657301bf"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aaf57de8eaf10ecf4cb98a95db8d15ab6"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structproc__stat__line.html#aaf57de8eaf10ecf4cb98a95db8d15ab6">guest</a></td></tr> +<tr class="separator:aaf57de8eaf10ecf4cb98a95db8d15ab6"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aa9149e2bf80b103cee1cd83748cdf34b"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structproc__stat__line.html#aa9149e2bf80b103cee1cd83748cdf34b">guest_nice</a></td></tr> +<tr class="separator:aa9149e2bf80b103cee1cd83748cdf34b"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aaace759e4cb4ff95a881cbbdb4be8610"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structproc__stat__line.html#aaace759e4cb4ff95a881cbbdb4be8610">total</a></td></tr> +<tr class="separator:aaace759e4cb4ff95a881cbbdb4be8610"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Field Documentation</h2> +<a class="anchor" id="ae4a4c7a21577e98720547dc33a58f51c"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">char proc_stat_line::cpu[10]</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="aaf57de8eaf10ecf4cb98a95db8d15ab6"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t proc_stat_line::guest</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="aa9149e2bf80b103cee1cd83748cdf34b"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t proc_stat_line::guest_nice</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a5450aed4badc84f28992b5a171c6c24e"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t proc_stat_line::idle</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="aa474930d802a9275d1688d87654962f8"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t proc_stat_line::iowait</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="ac884edb2ab2b162a68fa30f22f0cbe34"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t proc_stat_line::irq</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a8e470a27c13e95e0332746511da0eefd"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t proc_stat_line::nice</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a2e0b270f69fe599a43bff21867e5ae03"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t proc_stat_line::softirq</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="ae2167610040ce2a590e4aca9657301bf"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t proc_stat_line::steal</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="afe925267a10c39272ca56786f9b4e819"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t proc_stat_line::system</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="aaace759e4cb4ff95a881cbbdb4be8610"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t proc_stat_line::total</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a402884026456bc19d3786dc06fb6c5fb"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t proc_stat_line::user</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<hr/>The documentation for this struct was generated from the following file:<ul> +<li>core/unix/<a class="el" href="dap__cpu__monitor_8c.html">dap_cpu_monitor.c</a></li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> diff --git a/libdap/docs/sync_off.png b/libdap/docs/sync_off.png new file mode 100755 index 0000000000000000000000000000000000000000..3b443fc62892114406e3d399421b2a881b897acc Binary files /dev/null and b/libdap/docs/sync_off.png differ diff --git a/libdap/docs/sync_on.png b/libdap/docs/sync_on.png new file mode 100755 index 0000000000000000000000000000000000000000..e08320fb64e6fa33b573005ed6d8fe294e19db76 Binary files /dev/null and b/libdap/docs/sync_on.png differ diff --git a/libdap/docs/tab_a.png b/libdap/docs/tab_a.png new file mode 100755 index 0000000000000000000000000000000000000000..3b725c41c5a527a3a3e40097077d0e206a681247 Binary files /dev/null and b/libdap/docs/tab_a.png differ diff --git a/libdap/docs/tab_b.png b/libdap/docs/tab_b.png new file mode 100755 index 0000000000000000000000000000000000000000..e2b4a8638cb3496a016eaed9e16ffc12846dea18 Binary files /dev/null and b/libdap/docs/tab_b.png differ diff --git a/libdap/docs/tab_h.png b/libdap/docs/tab_h.png new file mode 100755 index 0000000000000000000000000000000000000000..fd5cb705488e60fcf30f56fcc951dee74f3b095b Binary files /dev/null and b/libdap/docs/tab_h.png differ diff --git a/libdap/docs/tab_s.png b/libdap/docs/tab_s.png new file mode 100755 index 0000000000000000000000000000000000000000..ab478c95b67371d700a20869f7de1ddd73522d50 Binary files /dev/null and b/libdap/docs/tab_s.png differ diff --git a/libdap/docs/tabs.css b/libdap/docs/tabs.css new file mode 100755 index 0000000000000000000000000000000000000000..9cf578f23a154ff026365d61ea59013ad431466b --- /dev/null +++ b/libdap/docs/tabs.css @@ -0,0 +1,60 @@ +.tabs, .tabs2, .tabs3 { + background-image: url('tab_b.png'); + width: 100%; + z-index: 101; + font-size: 13px; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +} + +.tabs2 { + font-size: 10px; +} +.tabs3 { + font-size: 9px; +} + +.tablist { + margin: 0; + padding: 0; + display: table; +} + +.tablist li { + float: left; + display: table-cell; + background-image: url('tab_b.png'); + line-height: 36px; + list-style: none; +} + +.tablist a { + display: block; + padding: 0 20px; + font-weight: bold; + background-image:url('tab_s.png'); + background-repeat:no-repeat; + background-position:right; + color: #283A5D; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; + outline: none; +} + +.tabs3 .tablist a { + padding: 0 10px; +} + +.tablist a:hover { + background-image: url('tab_h.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); + text-decoration: none; +} + +.tablist li.current a { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} diff --git a/libdap/include/dap_circular_buffer.h b/libdap/include/dap_circular_buffer.h new file mode 100755 index 0000000000000000000000000000000000000000..ed7a1fadd615dca3d57502b0ffc53273f4a8a0cd --- /dev/null +++ b/libdap/include/dap_circular_buffer.h @@ -0,0 +1,52 @@ +// +// CircularBuffer.h +// +// Created by 罗亮富(Roen)zxllf23@163.com on 14-1-14. +// Copyright (c) 2014年 All rights reserved. +// +// Note: edited by Anatolii Kurotych + +#ifndef YYDJ_Roen_CircularBuffer_h +#define YYDJ_Roen_CircularBuffer_h +#include <stdio.h> +#include <stdlib.h> +#include <stdbool.h> + +/* + A circular buffer(circular queue, cyclic buffer or ring buffer), is a data structure that uses a single, fixed-size buffer as if it were connected end-to-end. This structure lends itself easily to buffering data streams. visit https://en.wikipedia.org/wiki/Circular_buffer to see more information. + */ + +typedef struct s_circularBuffer* circular_buffer_t; + +// Construct CircularBuffer with ‘size' in byte. You must call CircularBufferFree() in balance for destruction. +extern circular_buffer_t circular_buffer_create(size_t size); + +// Destruct CircularBuffer +extern void circular_buffer_free(circular_buffer_t cBuf); + +// Reset the CircularBuffer +extern void circular_buffer_reset(circular_buffer_t cBuf); + +//get the capacity of CircularBuffer +extern size_t circular_buffer_get_capacity(circular_buffer_t cBuf); + +//get occupied data size of CircularBuffer +extern size_t circular_buffer_get_data_size(circular_buffer_t cBuf); + +// Push data to the tail of a circular buffer from 'src' with 'length' size in byte. +extern void circular_buffer_push(circular_buffer_t cBuf, const void *src, size_t length); + +// Pop data from a circular buffer to 'dataOut' with wished 'length' size in byte,return the actual data size in byte popped out,which is less or equal to the input 'length parameter. +extern size_t circular_buffer_pop(circular_buffer_t cBuf, size_t length, void *dataOut); + +// Read data from a circular buffer to 'dataOut' with wished 'length' size in byte,return the actual data size in byte popped out,which is less or equal to the input 'length parameter. +extern size_t circular_buffer_read(circular_buffer_t cBuf, size_t length, void *dataOut); + +//for test purpose, print the circular buffer's data content by printf(...); the 'hex' parameters indicates that if the data should be printed in asscii string or hex data format. +extern void circular_buffer_print(circular_buffer_t cBuf, bool hex); + +#ifdef __unix__ +// Read data from a circular buffer to socketFd +extern int circular_buffer_write_In_socket(circular_buffer_t cBuf, int sockfd); +#endif +#endif diff --git a/libdap/include/dap_common.h b/libdap/include/dap_common.h new file mode 100755 index 0000000000000000000000000000000000000000..c858ac97cad8015356e75934906b52f54cb41fe6 --- /dev/null +++ b/libdap/include/dap_common.h @@ -0,0 +1,398 @@ +/* + * Authors: + * Dmitriy A. Gearasimov <kahovski@gmail.com> + * Anatolii Kurotych <akurotych@gmail.com> + * DeM Labs Inc. https://demlabs.net + * DeM Labs Open source community https://github.com/demlabsinc + * Copyright (c) 2017-2019 + * All rights reserved. + + This file is part of DAP (Deus Applications Prototypes) the open source project + + DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DAP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with any DAP based project. If not, see <http://www.gnu.org/licenses/>. +*/ +#define _XOPEN_SOURCE 700 + +#pragma once + +#include <stdarg.h> +#include <stddef.h> +#include <stdbool.h> +#include <stdint.h> +#include <stdlib.h> +#include <stdio.h> +#include <time.h> + +#include "portable_endian.h" + +typedef uint8_t byte_t; + +#if defined(__GNUC__) ||defined (__clang__) + #define DAP_ALIGN_PACKED __attribute__((aligned(1),packed)) +#else + #define DAP_ALIGN_PACKED __attribute__((aligned(1),packed)) +#endif + +#ifdef _MSC_VER + #define DAP_STATIC_INLINE static __forceinline + #define DAP_INLINE __forceinline + #define DAP_ALIGNED(x) __declspec( align(x) ) +#else + #define DAP_STATIC_INLINE static __attribute__((always_inline)) inline + #define DAP_INLINE __attribute__((always_inline)) inline + #define DAP_ALIGNED(x) __attribute__ ((aligned (x))) +#endif + +#ifndef TRUE + #define TRUE true + #define FALSE false +#endif + +#ifndef UNUSED + #define UNUSED(x) (void)(x) +#endif + +#ifndef ROUNDUP + #define ROUNDUP(n,width) (((n) + (width) - 1) & ~(unsigned)((width) - 1)) +#endif + +#ifdef __cplusplus +#define DAP_CAST_REINT(t,v) reinterpret_cast<t*>(v) +#else +#define DAP_CAST_REINT(t,v) ((t*) v) +#endif + +#if DAP_USE_RPMALLOC + #include "rpmalloc.h" + #define DAP_MALLOC(a) rpmalloc(a) + #define DAP_FREE(a) rpfree(a) + #define DAP_CALLOC(a, b) rpcalloc(a, b) + #define DAP_ALMALLOC(a, b) rpaligned_alloc(a, b) + #define DAP_ALREALLOC(a,b,c) rpaligned_realloc(a, b, c, 0, 0) + #define DAP_ALFREE(a) rpfree(a) + #define DAP_NEW(a) DAP_CAST_REINT(a, rpmalloc(sizeof(a))) + #define DAP_NEW_SIZE(a, b) DAP_CAST_REINT(a, rpmalloc(b)) + #define DAP_NEW_Z(a) DAP_CAST_REINT(a, rpcalloc(1,sizeof(a))) + #define DAP_NEW_Z_SIZE(a, b) DAP_CAST_REINT(a, rpcalloc(1,b)) + #define DAP_REALLOC(a, b) rprealloc(a,b) + #define DAP_DELETE(a) rpfree(a) + #define DAP_DUP(a) ( __typeof(a) ret = memcpy(ret,a,sizeof(*a)) ) + #define DAP_DUP_SIZE(a,b) ( __typeof(a) ret = memcpy(ret,a,b) ) +#else + #define DAP_MALLOC(a) malloc(a) + #define DAP_FREE(a) free(a) + #define DAP_CALLOC(a, b) calloc(a, b) + #define DAP_ALMALLOC(a, b) _dap_aligned_alloc(a, b) + #define DAP_ALREALLOC(a, b) _dap_aligned_realloc(a, b) + #define DAP_ALFREE(a) _dap_aligned_free(a, b) + #define DAP_NEW( a ) DAP_CAST_REINT(a, malloc(sizeof(a)) ) + #define DAP_NEW_SIZE(a, b) DAP_CAST_REINT(a, malloc(b) ) + #define DAP_NEW_Z( a ) DAP_CAST_REINT(a, calloc(1,sizeof(a))) + #define DAP_NEW_Z_SIZE(a, b) DAP_CAST_REINT(a, calloc(1,b)) + #define DAP_REALLOC(a, b) realloc(a,b) + #define DAP_DELETE(a) free(a) + #define DAP_DUP(a) ( __typeof(a) ret = memcpy(ret,a,sizeof(*a)) ) + #define DAP_DUP_SIZE(a,b) ( __typeof(a) memcpy(ret,a,b) ) +#endif + +DAP_STATIC_INLINE void *_dap_aligned_alloc( uintptr_t alignment, uintptr_t size ) +{ + uintptr_t ptr = (uintptr_t) DAP_MALLOC( size + (alignment * 2) + sizeof(void *) ); + + if ( !ptr ) + return (void *)ptr; + + uintptr_t al_ptr = ( ptr + sizeof(void *) + alignment) & ~(alignment - 1 ); + ((uintptr_t *)al_ptr)[-1] = ptr; + + return (void *)al_ptr; +} + +DAP_STATIC_INLINE void *_dap_aligned_realloc( uintptr_t alignment, void *bptr, uintptr_t size ) +{ + uintptr_t ptr = (uintptr_t) DAP_REALLOC( bptr, size + (alignment * 2) + sizeof(void *) ); + + if ( !ptr ) + return (void *)ptr; + + uintptr_t al_ptr = ( ptr + sizeof(void *) + alignment) & ~(alignment - 1 ); + ((uintptr_t *)al_ptr)[-1] = ptr; + + return (void *)al_ptr; +} + +DAP_STATIC_INLINE void _dap_aligned_free( void *ptr ) +{ + if ( !ptr ) + return; + + void *base_ptr = (void *)((uintptr_t *)ptr)[-1]; + DAP_FREE( base_ptr ); +} + +#define DAP_PROTOCOL_VERSION 22 + +#ifndef LOWORD + #define LOWORD( l ) ((uint16_t) (((uintptr_t) (l)) & 0xFFFF)) + #define HIWORD( l ) ((uint16_t) ((((uintptr_t) (l)) >> 16) & 0xFFFF)) + #define LOBYTE( w ) ((uint8_t) (((uintptr_t) (w)) & 0xFF)) + #define HIBYTE( w ) ((uint8_t) ((((uintptr_t) (w)) >> 8) & 0xFF)) +#endif + +#ifndef RGB + #define RGB(r,g,b) ((uint32_t)(((uint8_t)(r)|((uint16_t)((uint8_t)(g))<<8))|(((uint32_t)(uint8_t)(b))<<16))) + #define RGBA(r, g, b, a) ((uint32_t) ((uint32_t)RGB(r,g,b) | (uint32_t)(a) << 24)) + #define GetRValue(rgb) (LOBYTE(rgb)) + #define GetGValue(rgb) (LOBYTE(((uint16_t)(rgb)) >> 8)) + #define GetBValue(rgb) (LOBYTE((rgb)>>16)) + #define GetAValue(rgb) (LOBYTE((rgb)>>24)) +#endif + +#define QBYTE RGBA + +#define DAP_LOG_HISTORY 1 + +//#define DAP_LOG_HISTORY_STR_SIZE 128 +//#define DAP_LOG_HISTORY_MAX_STRINGS 4096 +//#define DAP_LOG_HISTORY_BUFFER_SIZE (DAP_LOG_HISTORY_STR_SIZE * DAP_LOG_HISTORY_MAX_STRINGS) +//#define DAP_LOG_HISTORY_M (DAP_LOG_HISTORY_MAX_STRINGS - 1) + +#ifdef _WIN32 + #define dap_sscanf __mingw_sscanf + #define dap_vsscanf __mingw_vsscanf + #define dap_scanf __mingw_scanf + #define dap_vscanf __mingw_vscanf + #define dap_fscanf __mingw_fscanf + #define dap_vfscanf __mingw_vfscanf + #define dap_sprintf __mingw_sprintf + #define dap_snprintf __mingw_snprintf + #define dap_printf __mingw_printf + #define dap_vprintf __mingw_vprintf + #define dap_fprintf __mingw_fprintf + #define dap_vfprintf __mingw_vfprintf + #define dap_vsprintf __mingw_vsprintf + #define dap_vsnprintf __mingw_vsnprintf + #define dap_asprintf __mingw_asprintf + #define dap_vasprintf __mingw_vasprintf +#else + #define dap_sscanf sscanf + #define dap_vsscanf vsscanf + #define dap_scanf scanf + #define dap_vscanf vscanf + #define dap_fscanf fscanf + #define dap_vfscanf vfscanf + #define dap_sprintf sprintf + #define dap_snprintf snprintf + #define dap_printf printf + #define dap_vprintf vprintf + #define dap_fprintf fprintf + #define dap_vfprintf vfprintf + #define dap_vsprintf vsprintf + #define dap_vsnprintf vsnprintf + #define dap_asprintf asprintf + #define dap_vasprintf vasprintf +#endif + +typedef int dap_spinlock_t; + +/** + * @brief The log_level enum + */ + +typedef enum dap_log_level { + + L_DEBUG = 0, + L_INFO = 1, + L_NOTICE = 2, + L_MSG = 3, + L_DAP = 4, + L_WARNING = 5, + L_ATT = 6, + L_ERROR = 7, + L_CRITICAL = 8, + L_TOTAL, + +} dap_log_level_t; + +typedef struct dap_log_history_str_s { + + time_t t; + uint8_t *str; + uint32_t len; + +} dap_log_history_str_t; + +#define DAP_INTERVAL_TIMERS_MAX 15 + +typedef void (*dap_timer_callback_t)(void *param); +typedef struct dap_timer_interface { + void *timer; + dap_timer_callback_t callback; + void *param; +} dap_timer_interface_t; + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef MAX_PATH +#define MAX_PATH 120 +#endif + +#ifndef _WIN32 +#ifndef MAX +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#endif +#ifndef MIN +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif + +#endif + +extern uint16_t htoa_lut256[ 256 ]; + +#define dap_htoa64( out, in, len ) \ +{\ + uintptr_t _len = len; \ + uint16_t *__restrict _out = (uint16_t *__restrict)out; \ + uint64_t *__restrict _in = (uint64_t *__restrict)in;\ +\ + while ( _len ) {\ + uint64_t _val = *_in ++;\ + _out[0] = htoa_lut256[ _val & 0x00000000000000FF ];\ + _out[1] = htoa_lut256[ (_val & 0x000000000000FF00) >> 8 ];\ + _out[2] = htoa_lut256[ (_val & 0x0000000000FF0000) >> 16 ];\ + _out[3] = htoa_lut256[ (_val & 0x00000000FF000000) >> 24 ];\ + _out[4] = htoa_lut256[ (_val & 0x000000FF00000000) >> 32 ];\ + _out[5] = htoa_lut256[ (_val & 0x0000FF0000000000) >> 40 ];\ + _out[6] = htoa_lut256[ (_val & 0x00FF000000000000) >> 48 ];\ + _out[7] = htoa_lut256[ (_val & 0xFF00000000000000) >> 56 ];\ + _out += 8;\ + _len -= 8;\ + }\ +} + +typedef enum { + DAP_ASCII_ALNUM = 1 << 0, + DAP_ASCII_ALPHA = 1 << 1, + DAP_ASCII_CNTRL = 1 << 2, + DAP_ASCII_DIGIT = 1 << 3, + DAP_ASCII_GRAPH = 1 << 4, + DAP_ASCII_LOWER = 1 << 5, + DAP_ASCII_PRINT = 1 << 6, + DAP_ASCII_PUNCT = 1 << 7, + DAP_ASCII_SPACE = 1 << 8, + DAP_ASCII_UPPER = 1 << 9, + DAP_ASCII_XDIGIT = 1 << 10 +} DapAsciiType; + +static const uint16_t s_ascii_table_data[256] = { + 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, + 0x004, 0x104, 0x104, 0x004, 0x104, 0x104, 0x004, 0x004, + 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, + 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, + 0x140, 0x0d0, 0x0d0, 0x0d0, 0x0d0, 0x0d0, 0x0d0, 0x0d0, + 0x0d0, 0x0d0, 0x0d0, 0x0d0, 0x0d0, 0x0d0, 0x0d0, 0x0d0, + 0x459, 0x459, 0x459, 0x459, 0x459, 0x459, 0x459, 0x459, + 0x459, 0x459, 0x0d0, 0x0d0, 0x0d0, 0x0d0, 0x0d0, 0x0d0, + 0x0d0, 0x653, 0x653, 0x653, 0x653, 0x653, 0x653, 0x253, + 0x253, 0x253, 0x253, 0x253, 0x253, 0x253, 0x253, 0x253, + 0x253, 0x253, 0x253, 0x253, 0x253, 0x253, 0x253, 0x253, + 0x253, 0x253, 0x253, 0x0d0, 0x0d0, 0x0d0, 0x0d0, 0x0d0, + 0x0d0, 0x473, 0x473, 0x473, 0x473, 0x473, 0x473, 0x073, + 0x073, 0x073, 0x073, 0x073, 0x073, 0x073, 0x073, 0x073, + 0x073, 0x073, 0x073, 0x073, 0x073, 0x073, 0x073, 0x073, + 0x073, 0x073, 0x073, 0x0d0, 0x0d0, 0x0d0, 0x0d0, 0x004 +/* the upper 128 are all zeroes */ +}; + +//const uint16_t * const c_dap_ascii_table = s_ascii_table_data; + +#define dap_ascii_isspace(c) (s_ascii_table_data[(unsigned char) (c)] & DAP_ASCII_SPACE) != 0 +#define dap_ascii_isalpha(c) (s_ascii_table_data[(unsigned char) (c)] & DAP_ASCII_ALPHA) != 0 + +void dap_sleep( uint32_t ms ); + +DAP_STATIC_INLINE bool DAP_AtomicTryLock( dap_spinlock_t *lock ) +{ + return (__sync_lock_test_and_set(lock, 1) == 0); +} + +DAP_STATIC_INLINE void DAP_AtomicLock( dap_spinlock_t *lock ) +{ + while ( !DAP_AtomicTryLock(lock) ) { + dap_sleep( 0 ); + } +} + +DAP_STATIC_INLINE void DAP_AtomicUnlock( dap_spinlock_t *lock ) +{ + __sync_lock_release( lock ); +} + +extern char *g_sys_dir_path; + +//int dap_common_init( const char * a_log_file ); +int dap_common_init( const char *console_title, const char *a_log_file ); +int wdap_common_init( const char *console_title, const wchar_t *a_wlog_file); + +void dap_common_deinit(void); + +// set max items in log list +void dap_log_set_max_item(unsigned int a_max); +// get logs from list +char *dap_log_get_item(time_t a_start_time, int a_limit); + +void _log_it( const char * log_tag, enum dap_log_level, const char * format,... ); +#define log_it( _log_level, ...) _log_it( LOG_TAG, _log_level, ##__VA_ARGS__) +//void _vlog_it( const char * log_tag, uint32_t taglen, enum dap_log_level, const char * format, va_list ap ); + +//#define vlog_it( a_log_level, a_format, a_ap ) _vlog_it( LOG_TAG, sizeof(LOG_TAG)-1, a_log_level, a_format, a_ap ) + +const char * log_error(void); +void dap_log_level_set(enum dap_log_level ll); +enum dap_log_level dap_log_level_get(void); +void dap_set_log_tag_width(size_t width); + +const char * dap_get_appname(); +void dap_set_appname(const char * a_appname); + +char *dap_itoa(int i); + +int dap_time_to_str_rfc822(char * out, size_t out_size_max, time_t t); +int timespec_diff(struct timespec *a_start, struct timespec *a_stop, struct timespec *a_result); + +int get_select_breaker(void); +int send_select_break(void); +char * exec_with_ret(const char * a_cmd); +char * exec_with_ret_multistring(const char * a_cmd); +char * dap_random_string_create_alloc(size_t a_length); +void dap_random_string_fill(char *str, size_t length); +void dap_dump_hex(const void* data, size_t size); + +size_t dap_hex2bin(uint8_t *a_out, const char *a_in, size_t a_len); +size_t dap_bin2hex(char *a_out, const void *a_in, size_t a_len); +void dap_digit_from_string(const char *num_str, void *raw, size_t raw_len); +void dap_digit_from_string2(const char *num_str, void *raw, size_t raw_len); + +void *dap_interval_timer_create(unsigned int a_msec, dap_timer_callback_t a_callback, void *a_param); +int dap_interval_timer_delete(void *a_timer); + +#ifdef __MINGW32__ +int exec_silent(const char *a_cmd); +#endif + +#ifdef __cplusplus +} +#endif diff --git a/libdap/include/dap_config.h b/libdap/include/dap_config.h new file mode 100755 index 0000000000000000000000000000000000000000..5eaed02230a6c5e752b2ce2fd74cfc32141dab1d --- /dev/null +++ b/libdap/include/dap_config.h @@ -0,0 +1,78 @@ +/* + * Authors: + * Dmitriy A. Gearasimov <kahovski@gmail.com> + * Anatolii Kurotych <akurotych@gmail.com> + * DeM Labs Inc. https://demlabs.net + * DeM Labs Open source community https://gitlab.demlabs.net/cellframe + * Copyright (c) 2017-2019 + * All rights reserved. + + This file is part of DAP (Deus Applications Prototypes) the open source project + + DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DAP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with any DAP based project. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef _DAP_CONFIG_H_ +#define _DAP_CONFIG_H_ + +#include <stdbool.h> +#include <stdint.h> + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct dap_config{ + void * _internal; +} dap_config_t; + +int dap_config_init(const char * a_configs_path); +void dap_config_deinit(); +dap_config_t * dap_config_open(const char * a_name); +void dap_config_close(dap_config_t * a_config); + +const char * dap_config_path(); + +uint16_t dap_config_get_item_uint16(dap_config_t * a_config, const char * a_section_path, const char * a_item_name); +uint16_t dap_config_get_item_uint16_default(dap_config_t * a_config, const char * a_section_path, const char * a_item_name, uint16_t a_default); + +int32_t dap_config_get_item_int32(dap_config_t * a_config, const char * a_section_path, const char * a_item_name); +int32_t dap_config_get_item_int32_default(dap_config_t * a_config, const char * a_section_path, const char * a_item_name, int32_t a_default); + +int64_t dap_config_get_item_int64(dap_config_t * a_config, const char * a_section_path, const char * a_item_name); +int64_t dap_config_get_item_int64_default(dap_config_t * a_config, const char * a_section_path, const char * a_item_name, int64_t a_default); + +uint64_t dap_config_get_item_uint64(dap_config_t * a_config, const char * a_section_path, const char * a_item_name); +uint64_t dap_config_get_item_uint64_default(dap_config_t * a_config, const char * a_section_path, const char * a_item_name, uint64_t a_default); + +const char * dap_config_get_item_str(dap_config_t * a_config, const char * a_section_path, const char * a_item_name); +const char * dap_config_get_item_str_default(dap_config_t * a_config, const char * a_section_path, const char * a_item_name, const char * a_value_default); +char** dap_config_get_array_str(dap_config_t * a_config, const char * a_section_path, + const char * a_item_name, uint16_t * array_length); + +bool dap_config_get_item_bool(dap_config_t * a_config, const char * a_section_path, const char * a_item_name); +bool dap_config_get_item_bool_default(dap_config_t * a_config, const char * a_section_path, const char * a_item_name, bool a_default); + +double dap_config_get_item_double(dap_config_t * a_config, const char * a_section_path, const char * a_item_name); +double dap_config_get_item_double_default(dap_config_t * a_config, const char * a_section_path, const char * a_item_name, double a_default); + +extern dap_config_t * g_config; + + +#ifdef __cplusplus +} +#endif + + +#endif diff --git a/libdap/include/dap_file_utils.h b/libdap/include/dap_file_utils.h new file mode 100755 index 0000000000000000000000000000000000000000..92cfe9812c49b4540b6c1d608de58e3470ce7a3e --- /dev/null +++ b/libdap/include/dap_file_utils.h @@ -0,0 +1,105 @@ +/* + * Authors: + * Aleksandr Lysikov <alexander.lysikov@demlabs.net> + * DeM Labs Inc. https://demlabs.net + * Kelvin Project https://gitlab.demlabs.net/cellframe + * Copyright (c) 2017-2019 + * All rights reserved. + + This file is part of DAP (Deus Applications Prototypes) the open source project + + DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DAP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with any DAP based project. If not, see <http://www.gnu.org/licenses/>. + */ +#include <stdbool.h> +#include "utlist.h" +#include <dirent.h> + +#ifndef _DAP_FILE_UTILS_H_ +#define _DAP_FILE_UTILS_H_ + +#ifdef _WIN32 + +#include <Windows.h> + +/* On Win32, the canonical directory separator is the backslash, and + * the search path separator is the semicolon. Note that also the + * (forward) slash works as directory separator. + */ +#define DAP_DIR_SEPARATOR '\\' +#define DAP_DIR_SEPARATOR_S "\\" +#define DAP_IS_DIR_SEPARATOR(c) ((c) == DAP_DIR_SEPARATOR || (c) == '/') +#define DAP_SEARCHPATH_SEPARATOR ';' +#define DAP_SEARCHPATH_SEPARATOR_S ";" + +#else + +#define DAP_DIR_SEPARATOR '/' +#define DAP_DIR_SEPARATOR_S "/" +#define DAP_IS_DIR_SEPARATOR(c) ((c) == DAP_DIR_SEPARATOR) +#define DAP_SEARCHPATH_SEPARATOR ':' +#define DAP_SEARCHPATH_SEPARATOR_S ":" + +#endif + +typedef struct dap_list_name_directories{ + char *name_directory; + struct dap_list_name_directories *next; +}dap_list_name_directories_t; + +/** + * Check the directory path for unsupported symbols + * + * @dir_path directory pathname + * @return true, if the directory path contains only ASCII symbols + */ +bool dap_valid_ascii_symbols(const char *a_dir_path); + +/** + * Check the file for exists + * + * @a_file_path filename pathname + * @return true, if file exists + */ +bool dap_file_test(const char * a_file_path); + +/** + * Check the directory for exists + * + * @a_dir_path directory pathname + * @return true, if the file is a directory + */ +bool dap_dir_test(const char * a_dir_path); + +/** + * Create a new directory with intermediate sub-directories + * + * @dir_path new directory pathname + * @return 0, if the directory was created or already exist, else -1 + */ +int dap_mkdir_with_parents(const char *a_dir_path); + + +char* dap_path_get_basename(const char *a_file_name); +bool dap_path_is_absolute(const char *a_file_name); +char* dap_path_get_dirname(const char *a_file_name); + +/** + * Get list of subdirectories + * + * @a_path_name directory path. + * @return dap_list_t type variable that contains a list of subdirectories. + */ +dap_list_name_directories_t *dap_get_subs(const char *a_path_name); + +#endif // _FILE_UTILS_H_ diff --git a/libdap/include/dap_list.h b/libdap/include/dap_list.h new file mode 100755 index 0000000000000000000000000000000000000000..1ae4957fd17fe71fbe897d1a2e53aabd23d713e5 --- /dev/null +++ b/libdap/include/dap_list.h @@ -0,0 +1,62 @@ +/* + * Doubly-Linked Lists — linked lists that can be iterated over in both directions + */ + +#ifndef __DAP_LIST_H__ +#define __DAP_LIST_H__ + +typedef void (*dap_callback_destroyed_t)(void* data); +typedef void (*dap_callback_t)(void* data, void* user_data); +typedef void* (*dap_callback_copy_t)(const void * src, void* data); +typedef int (*dap_callback_compare_t)(const void * a, const void * b); +typedef int (*dap_callback_compare_data_t)(const void * a, const void * b, void* user_data); + +typedef struct _dap_list dap_list_t; + +struct _dap_list +{ + void* data; + dap_list_t *next; + dap_list_t *prev; +}; + +/* Doubly linked lists + */ +dap_list_t* dap_list_alloc(void); +void dap_list_free(dap_list_t *list); +void dap_list_free1(dap_list_t *list); +void dap_list_free_full(dap_list_t *list, dap_callback_destroyed_t free_func); +dap_list_t* dap_list_append(dap_list_t *list, void* data); +dap_list_t* dap_list_prepend(dap_list_t *list, void* data); +dap_list_t* dap_list_insert(dap_list_t *list, void* data, int position); +dap_list_t* dap_list_insert_sorted(dap_list_t *list, void* data, dap_callback_compare_t func); +dap_list_t* dap_list_insert_sorted_with_data(dap_list_t *list, void* data, dap_callback_compare_data_t func, void* user_data); +dap_list_t* dap_list_insert_before(dap_list_t *list, dap_list_t *sibling, void* data); +dap_list_t* dap_list_concat(dap_list_t *list1, dap_list_t *list2); +dap_list_t* dap_list_remove(dap_list_t *list, const void * data); +dap_list_t* dap_list_remove_all(dap_list_t *list, const void * data); +dap_list_t* dap_list_remove_link(dap_list_t *list, dap_list_t *llink); +dap_list_t* dap_list_delete_link(dap_list_t *list, dap_list_t *link_); +dap_list_t* dap_list_reverse(dap_list_t *list); +dap_list_t* dap_list_copy(dap_list_t *list); + +dap_list_t* dap_list_copy_deep(dap_list_t *list, dap_callback_copy_t func, void* user_data); + +dap_list_t* dap_list_nth(dap_list_t *list, unsigned int n); +dap_list_t* dap_list_nth_prev(dap_list_t *list, unsigned int n); +dap_list_t* dap_list_find(dap_list_t *list, const void * data); +dap_list_t* dap_list_find_custom(dap_list_t *list, const void * data, dap_callback_compare_t func); +int dap_list_position(dap_list_t *list, dap_list_t *llink); +int dap_list_index(dap_list_t *list, const void * data); +dap_list_t* dap_list_last(dap_list_t *list); +dap_list_t* dap_list_first(dap_list_t *list); +unsigned int dap_list_length(dap_list_t *list); +void dap_list_foreach(dap_list_t *list, dap_callback_t func, void* user_data); +dap_list_t* dap_list_sort(dap_list_t *list, dap_callback_compare_t compare_func); +dap_list_t* dap_list_sort_with_data(dap_list_t *list, dap_callback_compare_data_t compare_func, void* user_data); +void* dap_list_nth_data(dap_list_t *list, unsigned int n); + +#define dap_list_previous(list) ((list) ? (((dap_list_t *)(list))->prev) : NULL) +#define dap_list_next(list) ((list) ? (((dap_list_t *)(list))->next) : NULL) + +#endif /* __DAP_LIST_H__ */ diff --git a/libdap/include/dap_math_ops.h b/libdap/include/dap_math_ops.h new file mode 100755 index 0000000000000000000000000000000000000000..7f6002d30685697a2ede56d96f2b434a2584dad2 --- /dev/null +++ b/libdap/include/dap_math_ops.h @@ -0,0 +1,28 @@ +#pragma once +#include <stdint.h> +//#include "common/int-util.h" + +#if defined(__GNUC__) ||defined (__clang__) + +#if __SIZEOF_INT128__ == 16 + +#define DAP_GLOBAL_IS_INT128 +typedef __int128 _dap_int128_t; + +#if !defined (int128_t) +typedef __int128 int128_t; +#endif +#if !defined (uint128_t) +typedef unsigned __int128 uint128_t; +#endif +#endif +#endif + +typedef union dap_uint128{ + uint8_t data_raw[16]; +#if defined(DAP_GLOBAL_IS_INT128) + _dap_int128_t data_int128; +#endif +} dap_uint128_t; + + diff --git a/libdap/include/dap_module.h b/libdap/include/dap_module.h new file mode 100755 index 0000000000000000000000000000000000000000..96053929662bdde1fc9ffdb24859e59ba3620801 --- /dev/null +++ b/libdap/include/dap_module.h @@ -0,0 +1,46 @@ +/* + * Authors: + * Dmitriy A. Gearasimov <gerasimov.dmitriy@demlabs.net> + * DeM Labs Inc. https://demlabs.net + * Kelvin Project https://gitlab.demlabs.net/cellframe + * Copyright (c) 2017-2018 + * All rights reserved. + + This file is part of DAP (Deus Applications Prototypes) the open source project + + DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DAP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with any DAP based project. If not, see <http://www.gnu.org/licenses/>. +*/ +#pragma once + +typedef int (*dap_module_callback_init_t)(void * arg0, ...); +typedef void (*dap_module_callback_deinit_t)(void); + +typedef struct dap_module { + const char * name; + unsigned int version; + const char * dependensies[]; +} dap_module_t; + +#define DAP_MODULE_ARGS_MAX 10 +typedef struct dap_module_args { + const char * name; + const char * args[DAP_MODULE_ARGS_MAX]; // ARGS could me not more than DAP_MODULE_ARGS_MAX define +} dap_module_args_t; + +int dap_module_add(const char * a_name, unsigned int a_version, const char * a_dependensies, + dap_module_callback_init_t a_init_callback, dap_module_args_t a_init_args[], + dap_module_callback_deinit_t a_deinit_callback ); + +int dap_module_init_all(void); +void dap_module_deinit_all(void); diff --git a/libdap/include/dap_strfuncs.h b/libdap/include/dap_strfuncs.h new file mode 100755 index 0000000000000000000000000000000000000000..a50775d36763a1cc49a4a41fc2694dfad682ec75 --- /dev/null +++ b/libdap/include/dap_strfuncs.h @@ -0,0 +1,85 @@ +/* DAP String Functions */ + +#pragma once + +#include <sys/types.h> + +#include <limits.h> +#include <stdbool.h> +#include <stdint.h> +#include <stdarg.h> +#include <stdlib.h> +#include <time.h> +#include <string.h> + +#define dap_return_if_fail(expr) {if(!(expr)) {return;}} +#define dap_return_val_if_fail(expr,val) {if(!(expr)) {return (val);}} + +#define POINTER_TO_INT(p) ((int) (p)) +#define POINTER_TO_UINT(p) ((unsigned int) (p)) + +#define INT_TO_POINTER(i) ((void*) (i)) +#define UINT_TO_POINTER(u) ((void*) (u)) + +#undef max +#define max(a, b) (((a) > (b)) ? (a) : (b)) + +#undef min +#define min(a, b) (((a) < (b)) ? (a) : (b)) + +#undef abs +#define abs(a) (((a) < 0) ? -(a) : (a)) + +#undef clamp +#define clamp(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) + +#ifdef _WIN32 +char *strptime( char *buff, const char *fmt, struct tm *tm ); +#endif + +size_t dap_strlen(const char *a_str); +// compare a_str1 and a_str2 +int dap_strcmp(const char *a_str1, const char *a_str2); +// compare a_n characters of a_str1 and a_str2 +int dap_strncmp(const char *a_str1, const char *a_str2, size_t a_n); +// duplicates a string +char* dap_strdup(const char *a_str); +char* dap_strdup_vprintf(const char *a_format, va_list a_args); +char* dap_strdup_printf(const char *a_format, ...); + +char* dap_stpcpy(char *a_dest, const char *a_src); +char* dap_strstr_len(const char *a_haystack, ssize_t a_haystack_len, const char *a_needle); +// concatenates all of str_array's strings, sliding in an optional separator, the returned string is newly allocated. +char* dap_strjoinv(const char *a_separator, char **a_str_array); +char* dap_strjoin(const char *a_separator, ...); +// split up string into max_tokens tokens at delimiter and return a newly allocated string array +char** dap_strsplit(const char *a_string, const char *a_delimiter, int a_max_tokens); +size_t dap_str_countv(char **a_str_array); +// copies a NULL-terminated array of strings +char** dap_strdupv(const char **a_str_array); +// frees the array itself and all of its strings. +void dap_strfreev(char **a_str_array); + +// removes leading spaces +char* dap_strchug(char *a_string); +// removes trailing spaces +char* dap_strchomp(char *a_string); +// removes leading & trailing spaces +#define dap_strstrip( a_string ) dap_strchomp (dap_strchug (a_string)) + +// Converts all lower case ASCII letters to upper case ASCII letters. +char* dap_strup(const char *a_str, ssize_t a_len); +// Converts a string to lower case. +char* dap_strdown(const char *a_str, ssize_t a_len); +char* dap_strreverse(char *a_string); + +#ifdef _WIN32 +#ifdef HAVE_STRNDUP +#define strndup(s, l) _strndup(s, l) +#endif +char *_strndup(char *str, unsigned long len); +#endif + +#define DAP_USEC_PER_SEC 1000000 +void dap_usleep(time_t a_microseconds); + diff --git a/libdap/include/dap_string.h b/libdap/include/dap_string.h new file mode 100755 index 0000000000000000000000000000000000000000..7275f9db7599d6a24a8615c2cb75c18471dbb44f --- /dev/null +++ b/libdap/include/dap_string.h @@ -0,0 +1,95 @@ +// dap_string_t is an object that handles the memory management of a C string for you. + +#ifndef __DAP_STRING_H__ +#define __DAP_STRING_H__ + +#include <stdbool.h> +#include <stdio.h> +#include <stdint.h> +#include <sys/types.h> + +typedef struct _dap_string dap_string_t; + +struct _dap_string +{ + char *str; + size_t len; + size_t allocated_len; +}; + +dap_string_t* dap_string_new(const char *init); +dap_string_t* dap_string_new_len(const char *init, ssize_t len); +dap_string_t * dap_string_sized_new(size_t a_dfl_size); +char* dap_string_free(dap_string_t *string, bool free_segment); + +bool dap_string_equal(const dap_string_t *v, const dap_string_t *v2); + +unsigned int dap_string_hash(const dap_string_t *str); + +dap_string_t* dap_string_assign(dap_string_t *string, const char *rval); + +dap_string_t* dap_string_truncate(dap_string_t *string, size_t len); + +dap_string_t* dap_string_set_size(dap_string_t *string, size_t len); + +dap_string_t* dap_string_insert_len(dap_string_t *string, ssize_t pos, const char *val, ssize_t len); + +dap_string_t* dap_string_append(dap_string_t *string, const char *val); + +dap_string_t* dap_string_append_len(dap_string_t *string, const char *val, ssize_t len); + +dap_string_t* dap_string_append_c(dap_string_t *string, char a_c); + +dap_string_t* dap_string_append_unichar(dap_string_t *string, uint32_t wc); + +dap_string_t* dap_string_prepend(dap_string_t *string, const char *val); + +dap_string_t* dap_string_prepend_c(dap_string_t *string, char a_c); + +dap_string_t* dap_string_prepend_unichar(dap_string_t *string, uint32_t wc); + +dap_string_t* dap_string_prepend_len(dap_string_t *string, const char *val, ssize_t len); + +dap_string_t* dap_string_insert(dap_string_t *string, ssize_t pos, const char *val); + +dap_string_t* dap_string_insert_c(dap_string_t *string, ssize_t pos, char a_c); + +dap_string_t* dap_string_insert_unichar(dap_string_t *string, ssize_t pos, uint32_t wc); + +dap_string_t* dap_string_overwrite(dap_string_t *string, size_t pos, const char *val); + +dap_string_t* dap_string_overwrite_len(dap_string_t *string, size_t pos, const char *val, ssize_t len); + +dap_string_t* dap_string_erase(dap_string_t *string, ssize_t pos, ssize_t len); + +void dap_string_vprintf(dap_string_t *string, const char *format, va_list args); +void dap_string_printf(dap_string_t *string, const char *format, ...); +void dap_string_append_vprintf(dap_string_t *string, const char *format, va_list args); +void dap_string_append_printf(dap_string_t *string, const char *format, ...); + +/* -- optimize dap_strig_append_c --- */ +#ifdef G_CAN_INLINE +static inline dap_string_t* dap_string_append_c_inline(dap_string_t *a_string, char a_c) +{ + if(a_string->len + 1 < a_string->allocated_len) + { + a_string->str[a_string->len++] = a_c; + a_string->str[a_string->len] = 0; + } + else + dap_string_insert_c(a_string, -1, a_c); + return a_string; +} +#define dap_string_append_c(a_string,a_c) dap_string_append_c_inline (a_string, a_c) +#endif /* G_CAN_INLINE */ + +dap_string_t *dap_string_down(dap_string_t *string); + +dap_string_t *dap_string_up(dap_string_t *string); + +#ifndef G_DISABLE_DEPRECATED +#define dap_string_sprintf dap_string_printf +#define dap_string_sprintfa dap_string_append_printf +#endif + +#endif /* __DAP_STRING_H__ */ diff --git a/libdap/include/portable_endian.h b/libdap/include/portable_endian.h new file mode 100644 index 0000000000000000000000000000000000000000..31c0809d913194de891b8498dc9a1a4d03fc7b5b --- /dev/null +++ b/libdap/include/portable_endian.h @@ -0,0 +1,122 @@ + +// "License": Public Domain +// I, Mathias Panzenb?ck, place this file hereby into the public domain. Use it at your own risk for whatever you like. +// In case there are jurisdictions that don't support putting things in the public domain you can also consider it to +// be "dual licensed" under the BSD, MIT and Apache licenses, if you want to. This code is trivial anyway. Consider it +// an example on how to get the endian conversion functions on different platforms. + +#ifndef PORTABLE_ENDIAN_H__ +#define PORTABLE_ENDIAN_H__ + +#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__) + +# define __WINDOWS__ + +#endif + +#if defined(__linux__) || defined(__CYGWIN__) + +# include <endian.h> + +#elif defined(__APPLE__) + +# include <libkern/OSByteOrder.h> + +# define htobe16(x) OSSwapHostToBigInt16(x) +# define htole16(x) OSSwapHostToLittleInt16(x) +# define be16toh(x) OSSwapBigToHostInt16(x) +# define le16toh(x) OSSwapLittleToHostInt16(x) + +# define htobe32(x) OSSwapHostToBigInt32(x) +# define htole32(x) OSSwapHostToLittleInt32(x) +# define be32toh(x) OSSwapBigToHostInt32(x) +# define le32toh(x) OSSwapLittleToHostInt32(x) + +# define htobe64(x) OSSwapHostToBigInt64(x) +# define htole64(x) OSSwapHostToLittleInt64(x) +# define be64toh(x) OSSwapBigToHostInt64(x) +# define le64toh(x) OSSwapLittleToHostInt64(x) + +# define __BYTE_ORDER BYTE_ORDER +# define __BIG_ENDIAN BIG_ENDIAN +# define __LITTLE_ENDIAN LITTLE_ENDIAN +# define __PDP_ENDIAN PDP_ENDIAN + +#elif defined(__OpenBSD__) + +# include <sys/endian.h> + +#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) + +# include <sys/endian.h> + +# define be16toh(x) betoh16(x) +# define le16toh(x) letoh16(x) + +# define be32toh(x) betoh32(x) +# define le32toh(x) letoh32(x) + +# define be64toh(x) betoh64(x) +# define le64toh(x) letoh64(x) + +#elif defined(__WINDOWS__) + +# include <windows.h> + +# if BYTE_ORDER == LITTLE_ENDIAN + +# if defined(_MSC_VER) +# include <stdlib.h> +# define htobe16(x) _byteswap_ushort(x) +# define htole16(x) (x) +# define be16toh(x) _byteswap_ushort(x) +# define le16toh(x) (x) + +# define htobe32(x) _byteswap_ulong(x) +# define htole32(x) (x) +# define be32toh(x) _byteswap_ulong(x) +# define le32toh(x) (x) + +# define htobe64(x) _byteswap_uint64(x) +# define htole64(x) (x) +# define be64toh(x) _byteswap_uint64(x) +# define le64toh(x) (x) + +# elif defined(__GNUC__) || defined(__clang__) + +# define htobe16(x) __builtin_bswap16(x) +# define htole16(x) (x) +# define be16toh(x) __builtin_bswap16(x) +# define le16toh(x) (x) + +# define htobe32(x) __builtin_bswap32(x) +# define htole32(x) (x) +# define be32toh(x) __builtin_bswap32(x) +# define le32toh(x) (x) + +# define htobe64(x) __builtin_bswap64(x) +# define htole64(x) (x) +# define be64toh(x) __builtin_bswap64(x) +# define le64toh(x) (x) +# else +# error platform not supported +# endif + +# else + +# error byte order not supported + +# endif + +# define __BYTE_ORDER BYTE_ORDER +# define __BIG_ENDIAN BIG_ENDIAN +# define __LITTLE_ENDIAN LITTLE_ENDIAN +# define __PDP_ENDIAN PDP_ENDIAN + +#else + +# error platform not supported + +#endif + +#endif diff --git a/libdap/include/uthash.h b/libdap/include/uthash.h new file mode 100755 index 0000000000000000000000000000000000000000..775599c9a8c2ce33d06323bbd2da161744b58160 --- /dev/null +++ b/libdap/include/uthash.h @@ -0,0 +1,1074 @@ +/* +Copyright (c) 2003-2016, 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. +*/ + +#ifndef UTHASH_H +#define UTHASH_H + +#define UTHASH_VERSION 2.0.1 + +#include <string.h> /* memcmp,strlen */ +#include <stddef.h> /* ptrdiff_t */ +#include <stdlib.h> /* exit() */ + +/* These macros use decltype or the earlier __typeof GNU extension. + As decltype is only available in newer compilers (VS2010 or gcc 4.3+ + when compiling c++ source) this code uses whatever method is needed + or, for VS2008 where neither is available, uses casting workarounds. */ +#if defined(_MSC_VER) /* MS compiler */ +#if _MSC_VER >= 1600 && defined(__cplusplus) /* VS2010 or newer in C++ mode */ +#define DECLTYPE(x) (decltype(x)) +#else /* VS2008 or older (or VS2010 in C mode) */ +#define NO_DECLTYPE +#define DECLTYPE(x) +#endif +#elif defined(__BORLANDC__) || defined(__LCC__) || defined(__WATCOMC__) +#define NO_DECLTYPE +#define DECLTYPE(x) +#else /* GNU, Sun and other compilers */ +#define DECLTYPE(x) (__typeof(x)) +#endif + +#ifdef NO_DECLTYPE +#define DECLTYPE_ASSIGN(dst,src) \ +do { \ + char **_da_dst = (char**)(&(dst)); \ + *_da_dst = (char*)(src); \ +} while (0) +#else +#define DECLTYPE_ASSIGN(dst,src) \ +do { \ + (dst) = DECLTYPE(dst)(src); \ +} while (0) +#endif + +/* a number of the hash function use uint32_t which isn't defined on Pre VS2010 */ +#if defined(_WIN32) +#if defined(_MSC_VER) && _MSC_VER >= 1600 +#include <stdint.h> +#elif defined(__WATCOMC__) || defined(__MINGW32__) || defined(__CYGWIN__) +#include <stdint.h> +#else +typedef unsigned int uint32_t; +typedef unsigned char uint8_t; +#endif +#elif defined(__GNUC__) && !defined(__VXWORKS__) +#include <stdint.h> +#else +typedef unsigned int uint32_t; +typedef unsigned char uint8_t; +#endif + +#ifndef uthash_fatal +#define uthash_fatal(msg) exit(-1) /* fatal error (out of memory,etc) */ +#endif +#ifndef uthash_malloc +#define uthash_malloc(sz) malloc(sz) /* malloc fcn */ +#endif +#ifndef uthash_free +#define uthash_free(ptr,sz) free(ptr) /* free fcn */ +#endif +#ifndef uthash_strlen +#define uthash_strlen(s) strlen(s) +#endif +#ifndef uthash_memcmp +#define uthash_memcmp(a,b,n) memcmp(a,b,n) +#endif + +#ifndef uthash_noexpand_fyi +#define uthash_noexpand_fyi(tbl) /* can be defined to log noexpand */ +#endif +#ifndef uthash_expand_fyi +#define uthash_expand_fyi(tbl) /* can be defined to log expands */ +#endif + +/* initial number of buckets */ +#define HASH_INITIAL_NUM_BUCKETS 32U /* initial number of buckets */ +#define HASH_INITIAL_NUM_BUCKETS_LOG2 5U /* lg2 of initial number of buckets */ +#define HASH_BKT_CAPACITY_THRESH 10U /* expand when bucket count reaches */ + +/* calculate the element whose hash handle address is hhp */ +#define ELMT_FROM_HH(tbl,hhp) ((void*)(((char*)(hhp)) - ((tbl)->hho))) +/* calculate the hash handle from element address elp */ +#define HH_FROM_ELMT(tbl,elp) ((UT_hash_handle *)(((char*)(elp)) + ((tbl)->hho))) + +#define HASH_VALUE(keyptr,keylen,hashv) \ +do { \ + HASH_FCN(keyptr, keylen, hashv); \ +} while (0) + +#define HASH_FIND_BYHASHVALUE(hh,head,keyptr,keylen,hashval,out) \ +do { \ + (out) = NULL; \ + if (head) { \ + unsigned _hf_bkt; \ + HASH_TO_BKT(hashval, (head)->hh.tbl->num_buckets, _hf_bkt); \ + if (HASH_BLOOM_TEST((head)->hh.tbl, hashval) != 0) { \ + HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ], keyptr, keylen, hashval, out); \ + } \ + } \ +} while (0) + +#define HASH_FIND(hh,head,keyptr,keylen,out) \ +do { \ + unsigned _hf_hashv; \ + HASH_VALUE(keyptr, keylen, _hf_hashv); \ + HASH_FIND_BYHASHVALUE(hh, head, keyptr, keylen, _hf_hashv, out); \ +} while (0) + +#ifdef HASH_BLOOM +#define HASH_BLOOM_BITLEN (1UL << HASH_BLOOM) +#define HASH_BLOOM_BYTELEN (HASH_BLOOM_BITLEN/8UL) + (((HASH_BLOOM_BITLEN%8UL)!=0UL) ? 1UL : 0UL) +#define HASH_BLOOM_MAKE(tbl) \ +do { \ + (tbl)->bloom_nbits = HASH_BLOOM; \ + (tbl)->bloom_bv = (uint8_t*)uthash_malloc(HASH_BLOOM_BYTELEN); \ + if (!((tbl)->bloom_bv)) { uthash_fatal( "out of memory"); } \ + memset((tbl)->bloom_bv, 0, HASH_BLOOM_BYTELEN); \ + (tbl)->bloom_sig = HASH_BLOOM_SIGNATURE; \ +} while (0) + +#define HASH_BLOOM_FREE(tbl) \ +do { \ + uthash_free((tbl)->bloom_bv, HASH_BLOOM_BYTELEN); \ +} while (0) + +#define HASH_BLOOM_BITSET(bv,idx) (bv[(idx)/8U] |= (1U << ((idx)%8U))) +#define HASH_BLOOM_BITTEST(bv,idx) (bv[(idx)/8U] & (1U << ((idx)%8U))) + +#define HASH_BLOOM_ADD(tbl,hashv) \ + HASH_BLOOM_BITSET((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1U))) + +#define HASH_BLOOM_TEST(tbl,hashv) \ + HASH_BLOOM_BITTEST((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1U))) + +#else +#define HASH_BLOOM_MAKE(tbl) +#define HASH_BLOOM_FREE(tbl) +#define HASH_BLOOM_ADD(tbl,hashv) +#define HASH_BLOOM_TEST(tbl,hashv) (1) +#define HASH_BLOOM_BYTELEN 0U +#endif + +#define HASH_MAKE_TABLE(hh,head) \ +do { \ + (head)->hh.tbl = (UT_hash_table*)uthash_malloc( \ + sizeof(UT_hash_table)); \ + if (!((head)->hh.tbl)) { uthash_fatal( "out of memory"); } \ + memset((head)->hh.tbl, 0, sizeof(UT_hash_table)); \ + (head)->hh.tbl->tail = &((head)->hh); \ + (head)->hh.tbl->num_buckets = HASH_INITIAL_NUM_BUCKETS; \ + (head)->hh.tbl->log2_num_buckets = HASH_INITIAL_NUM_BUCKETS_LOG2; \ + (head)->hh.tbl->hho = (char*)(&(head)->hh) - (char*)(head); \ + (head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc( \ + HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \ + if (! (head)->hh.tbl->buckets) { uthash_fatal( "out of memory"); } \ + memset((head)->hh.tbl->buckets, 0, \ + HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \ + HASH_BLOOM_MAKE((head)->hh.tbl); \ + (head)->hh.tbl->signature = HASH_SIGNATURE; \ +} while (0) + +#define HASH_REPLACE_BYHASHVALUE_INORDER(hh,head,fieldname,keylen_in,hashval,add,replaced,cmpfcn) \ +do { \ + (replaced) = NULL; \ + HASH_FIND_BYHASHVALUE(hh, head, &((add)->fieldname), keylen_in, hashval, replaced); \ + if (replaced) { \ + HASH_DELETE(hh, head, replaced); \ + } \ + HASH_ADD_KEYPTR_BYHASHVALUE_INORDER(hh, head, &((add)->fieldname), keylen_in, hashval, add, cmpfcn); \ +} while (0) + +#define HASH_REPLACE_BYHASHVALUE(hh,head,fieldname,keylen_in,hashval,add,replaced) \ +do { \ + (replaced) = NULL; \ + HASH_FIND_BYHASHVALUE(hh, head, &((add)->fieldname), keylen_in, hashval, replaced); \ + if (replaced) { \ + HASH_DELETE(hh, head, replaced); \ + } \ + HASH_ADD_KEYPTR_BYHASHVALUE(hh, head, &((add)->fieldname), keylen_in, hashval, add); \ +} while (0) + +#define HASH_REPLACE(hh,head,fieldname,keylen_in,add,replaced) \ +do { \ + unsigned _hr_hashv; \ + HASH_VALUE(&((add)->fieldname), keylen_in, _hr_hashv); \ + HASH_REPLACE_BYHASHVALUE(hh, head, fieldname, keylen_in, _hr_hashv, add, replaced); \ +} while (0) + +#define HASH_REPLACE_INORDER(hh,head,fieldname,keylen_in,add,replaced,cmpfcn) \ +do { \ + unsigned _hr_hashv; \ + HASH_VALUE(&((add)->fieldname), keylen_in, _hr_hashv); \ + HASH_REPLACE_BYHASHVALUE_INORDER(hh, head, fieldname, keylen_in, _hr_hashv, add, replaced, cmpfcn); \ +} while (0) + +#define HASH_APPEND_LIST(hh, head, add) \ +do { \ + (add)->hh.next = NULL; \ + (add)->hh.prev = ELMT_FROM_HH((head)->hh.tbl, (head)->hh.tbl->tail); \ + (head)->hh.tbl->tail->next = (add); \ + (head)->hh.tbl->tail = &((add)->hh); \ +} while (0) + +#define HASH_ADD_KEYPTR_BYHASHVALUE_INORDER(hh,head,keyptr,keylen_in,hashval,add,cmpfcn) \ +do { \ + unsigned _ha_bkt; \ + (add)->hh.hashv = (hashval); \ + (add)->hh.key = (char*) (keyptr); \ + (add)->hh.keylen = (unsigned) (keylen_in); \ + if (!(head)) { \ + (add)->hh.next = NULL; \ + (add)->hh.prev = NULL; \ + (head) = (add); \ + HASH_MAKE_TABLE(hh, head); \ + } else { \ + void *_hs_iter = (head); \ + (add)->hh.tbl = (head)->hh.tbl; \ + do { \ + if (cmpfcn(DECLTYPE(head)(_hs_iter), add) > 0) \ + break; \ + } while ((_hs_iter = HH_FROM_ELMT((head)->hh.tbl, _hs_iter)->next)); \ + if (_hs_iter) { \ + (add)->hh.next = _hs_iter; \ + if (((add)->hh.prev = HH_FROM_ELMT((head)->hh.tbl, _hs_iter)->prev)) { \ + HH_FROM_ELMT((head)->hh.tbl, (add)->hh.prev)->next = (add); \ + } else { \ + (head) = (add); \ + } \ + HH_FROM_ELMT((head)->hh.tbl, _hs_iter)->prev = (add); \ + } else { \ + HASH_APPEND_LIST(hh, head, add); \ + } \ + } \ + (head)->hh.tbl->num_items++; \ + HASH_TO_BKT(hashval, (head)->hh.tbl->num_buckets, _ha_bkt); \ + HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt], &(add)->hh); \ + HASH_BLOOM_ADD((head)->hh.tbl, hashval); \ + HASH_EMIT_KEY(hh, head, keyptr, keylen_in); \ + HASH_FSCK(hh, head); \ +} while (0) + +#define HASH_ADD_KEYPTR_INORDER(hh,head,keyptr,keylen_in,add,cmpfcn) \ +do { \ + unsigned _hs_hashv; \ + HASH_VALUE(keyptr, keylen_in, _hs_hashv); \ + HASH_ADD_KEYPTR_BYHASHVALUE_INORDER(hh, head, keyptr, keylen_in, _hs_hashv, add, cmpfcn); \ +} while (0) + +#define HASH_ADD_BYHASHVALUE_INORDER(hh,head,fieldname,keylen_in,hashval,add,cmpfcn) \ + HASH_ADD_KEYPTR_BYHASHVALUE_INORDER(hh, head, &((add)->fieldname), keylen_in, hashval, add, cmpfcn) + +#define HASH_ADD_INORDER(hh,head,fieldname,keylen_in,add,cmpfcn) \ + HASH_ADD_KEYPTR_INORDER(hh, head, &((add)->fieldname), keylen_in, add, cmpfcn) + +#define HASH_ADD_KEYPTR_BYHASHVALUE(hh,head,keyptr,keylen_in,hashval,add) \ +do { \ + unsigned _ha_bkt; \ + (add)->hh.hashv = (hashval); \ + (add)->hh.key = (char*) (keyptr); \ + (add)->hh.keylen = (unsigned) (keylen_in); \ + if (!(head)) { \ + (add)->hh.next = NULL; \ + (add)->hh.prev = NULL; \ + (head) = (add); \ + HASH_MAKE_TABLE(hh, head); \ + } else { \ + (add)->hh.tbl = (head)->hh.tbl; \ + HASH_APPEND_LIST(hh, head, add); \ + } \ + (head)->hh.tbl->num_items++; \ + HASH_TO_BKT(hashval, (head)->hh.tbl->num_buckets, _ha_bkt); \ + HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt], &(add)->hh); \ + HASH_BLOOM_ADD((head)->hh.tbl, hashval); \ + HASH_EMIT_KEY(hh, head, keyptr, keylen_in); \ + HASH_FSCK(hh, head); \ +} while (0) + +#define HASH_ADD_KEYPTR(hh,head,keyptr,keylen_in,add) \ +do { \ + unsigned _ha_hashv; \ + HASH_VALUE(keyptr, keylen_in, _ha_hashv); \ + HASH_ADD_KEYPTR_BYHASHVALUE(hh, head, keyptr, keylen_in, _ha_hashv, add); \ +} while (0) + +#define HASH_ADD_BYHASHVALUE(hh,head,fieldname,keylen_in,hashval,add) \ + HASH_ADD_KEYPTR_BYHASHVALUE(hh, head, &((add)->fieldname), keylen_in, hashval, add) + +#define HASH_ADD(hh,head,fieldname,keylen_in,add) \ + HASH_ADD_KEYPTR(hh, head, &((add)->fieldname), keylen_in, add) + +#define HASH_TO_BKT(hashv,num_bkts,bkt) \ +do { \ + bkt = ((hashv) & ((num_bkts) - 1U)); \ +} while (0) + +/* delete "delptr" from the hash table. + * "the usual" patch-up process for the app-order doubly-linked-list. + * The use of _hd_hh_del below deserves special explanation. + * These used to be expressed using (delptr) but that led to a bug + * if someone used the same symbol for the head and deletee, like + * HASH_DELETE(hh,users,users); + * We want that to work, but by changing the head (users) below + * we were forfeiting our ability to further refer to the deletee (users) + * in the patch-up process. Solution: use scratch space to + * copy the deletee pointer, then the latter references are via that + * scratch pointer rather than through the repointed (users) symbol. + */ +#define HASH_DELETE(hh,head,delptr) \ +do { \ + struct UT_hash_handle *_hd_hh_del; \ + if ( ((delptr)->hh.prev == NULL) && ((delptr)->hh.next == NULL) ) { \ + uthash_free((head)->hh.tbl->buckets, \ + (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \ + HASH_BLOOM_FREE((head)->hh.tbl); \ + uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \ + head = NULL; \ + } else { \ + unsigned _hd_bkt; \ + _hd_hh_del = &((delptr)->hh); \ + if ((delptr) == ELMT_FROM_HH((head)->hh.tbl,(head)->hh.tbl->tail)) { \ + (head)->hh.tbl->tail = \ + (UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \ + (head)->hh.tbl->hho); \ + } \ + if ((delptr)->hh.prev != NULL) { \ + ((UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \ + (head)->hh.tbl->hho))->next = (delptr)->hh.next; \ + } else { \ + DECLTYPE_ASSIGN(head,(delptr)->hh.next); \ + } \ + if (_hd_hh_del->next != NULL) { \ + ((UT_hash_handle*)((ptrdiff_t)_hd_hh_del->next + \ + (head)->hh.tbl->hho))->prev = \ + _hd_hh_del->prev; \ + } \ + HASH_TO_BKT( _hd_hh_del->hashv, (head)->hh.tbl->num_buckets, _hd_bkt); \ + HASH_DEL_IN_BKT(hh,(head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del); \ + (head)->hh.tbl->num_items--; \ + } \ + HASH_FSCK(hh,head); \ +} while (0) + + +/* convenience forms of HASH_FIND/HASH_ADD/HASH_DEL */ +#define HASH_FIND_STR(head,findstr,out) \ + HASH_FIND(hh,head,findstr,(unsigned)uthash_strlen(findstr),out) +#define HASH_ADD_STR(head,strfield,add) \ + HASH_ADD(hh,head,strfield[0],(unsigned)uthash_strlen(add->strfield),add) +#define HASH_REPLACE_STR(head,strfield,add,replaced) \ + HASH_REPLACE(hh,head,strfield[0],(unsigned)uthash_strlen(add->strfield),add,replaced) +#define HASH_FIND_INT(head,findint,out) \ + HASH_FIND(hh,head,findint,sizeof(int),out) +#define HASH_ADD_INT(head,intfield,add) \ + HASH_ADD(hh,head,intfield,sizeof(int),add) +#define HASH_REPLACE_INT(head,intfield,add,replaced) \ + HASH_REPLACE(hh,head,intfield,sizeof(int),add,replaced) +#define HASH_FIND_PTR(head,findptr,out) \ + HASH_FIND(hh,head,findptr,sizeof(void *),out) +#define HASH_ADD_PTR(head,ptrfield,add) \ + HASH_ADD(hh,head,ptrfield,sizeof(void *),add) +#define HASH_REPLACE_PTR(head,ptrfield,add,replaced) \ + HASH_REPLACE(hh,head,ptrfield,sizeof(void *),add,replaced) +#define HASH_DEL(head,delptr) \ + HASH_DELETE(hh,head,delptr) + +/* HASH_FSCK checks hash integrity on every add/delete when HASH_DEBUG is defined. + * This is for uthash developer only; it compiles away if HASH_DEBUG isn't defined. + */ +#ifdef HASH_DEBUG +#define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0) +#define HASH_FSCK(hh,head) \ +do { \ + struct UT_hash_handle *_thh; \ + if (head) { \ + unsigned _bkt_i; \ + unsigned _count; \ + char *_prev; \ + _count = 0; \ + for( _bkt_i = 0; _bkt_i < (head)->hh.tbl->num_buckets; _bkt_i++) { \ + unsigned _bkt_count = 0; \ + _thh = (head)->hh.tbl->buckets[_bkt_i].hh_head; \ + _prev = NULL; \ + while (_thh) { \ + if (_prev != (char*)(_thh->hh_prev)) { \ + HASH_OOPS("invalid hh_prev %p, actual %p\n", \ + _thh->hh_prev, _prev ); \ + } \ + _bkt_count++; \ + _prev = (char*)(_thh); \ + _thh = _thh->hh_next; \ + } \ + _count += _bkt_count; \ + if ((head)->hh.tbl->buckets[_bkt_i].count != _bkt_count) { \ + HASH_OOPS("invalid bucket count %u, actual %u\n", \ + (head)->hh.tbl->buckets[_bkt_i].count, _bkt_count); \ + } \ + } \ + if (_count != (head)->hh.tbl->num_items) { \ + HASH_OOPS("invalid hh item count %u, actual %u\n", \ + (head)->hh.tbl->num_items, _count ); \ + } \ + /* traverse hh in app order; check next/prev integrity, count */ \ + _count = 0; \ + _prev = NULL; \ + _thh = &(head)->hh; \ + while (_thh) { \ + _count++; \ + if (_prev !=(char*)(_thh->prev)) { \ + HASH_OOPS("invalid prev %p, actual %p\n", \ + _thh->prev, _prev ); \ + } \ + _prev = (char*)ELMT_FROM_HH((head)->hh.tbl, _thh); \ + _thh = ( _thh->next ? (UT_hash_handle*)((char*)(_thh->next) + \ + (head)->hh.tbl->hho) : NULL ); \ + } \ + if (_count != (head)->hh.tbl->num_items) { \ + HASH_OOPS("invalid app item count %u, actual %u\n", \ + (head)->hh.tbl->num_items, _count ); \ + } \ + } \ +} while (0) +#else +#define HASH_FSCK(hh,head) +#endif + +/* When compiled with -DHASH_EMIT_KEYS, length-prefixed keys are emitted to + * the descriptor to which this macro is defined for tuning the hash function. + * The app can #include <unistd.h> to get the prototype for write(2). */ +#ifdef HASH_EMIT_KEYS +#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) \ +do { \ + unsigned _klen = fieldlen; \ + write(HASH_EMIT_KEYS, &_klen, sizeof(_klen)); \ + write(HASH_EMIT_KEYS, keyptr, (unsigned long)fieldlen); \ +} while (0) +#else +#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) +#endif + +/* default to Jenkin's hash unless overridden e.g. DHASH_FUNCTION=HASH_SAX */ +#ifdef HASH_FUNCTION +#define HASH_FCN HASH_FUNCTION +#else +#define HASH_FCN HASH_JEN +#endif + +/* The Bernstein hash function, used in Perl prior to v5.6. Note (x<<5+x)=x*33. */ +#define HASH_BER(key,keylen,hashv) \ +do { \ + unsigned _hb_keylen=(unsigned)keylen; \ + const unsigned char *_hb_key=(const unsigned char*)(key); \ + (hashv) = 0; \ + while (_hb_keylen-- != 0U) { \ + (hashv) = (((hashv) << 5) + (hashv)) + *_hb_key++; \ + } \ +} while (0) + + +/* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at + * http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx */ +#define HASH_SAX(key,keylen,hashv) \ +do { \ + unsigned _sx_i; \ + const unsigned char *_hs_key=(const unsigned char*)(key); \ + hashv = 0; \ + for(_sx_i=0; _sx_i < keylen; _sx_i++) { \ + hashv ^= (hashv << 5) + (hashv >> 2) + _hs_key[_sx_i]; \ + } \ +} while (0) +/* FNV-1a variation */ +#define HASH_FNV(key,keylen,hashv) \ +do { \ + unsigned _fn_i; \ + const unsigned char *_hf_key=(const unsigned char*)(key); \ + hashv = 2166136261U; \ + for(_fn_i=0; _fn_i < keylen; _fn_i++) { \ + hashv = hashv ^ _hf_key[_fn_i]; \ + hashv = hashv * 16777619U; \ + } \ +} while (0) + +#define HASH_OAT(key,keylen,hashv) \ +do { \ + unsigned _ho_i; \ + const unsigned char *_ho_key=(const unsigned char*)(key); \ + hashv = 0; \ + for(_ho_i=0; _ho_i < keylen; _ho_i++) { \ + hashv += _ho_key[_ho_i]; \ + hashv += (hashv << 10); \ + hashv ^= (hashv >> 6); \ + } \ + hashv += (hashv << 3); \ + hashv ^= (hashv >> 11); \ + hashv += (hashv << 15); \ +} while (0) + +#define HASH_JEN_MIX(a,b,c) \ +do { \ + a -= b; a -= c; a ^= ( c >> 13 ); \ + b -= c; b -= a; b ^= ( a << 8 ); \ + c -= a; c -= b; c ^= ( b >> 13 ); \ + a -= b; a -= c; a ^= ( c >> 12 ); \ + b -= c; b -= a; b ^= ( a << 16 ); \ + c -= a; c -= b; c ^= ( b >> 5 ); \ + a -= b; a -= c; a ^= ( c >> 3 ); \ + b -= c; b -= a; b ^= ( a << 10 ); \ + c -= a; c -= b; c ^= ( b >> 15 ); \ +} while (0) + +#define HASH_JEN(key,keylen,hashv) \ +do { \ + unsigned _hj_i,_hj_j,_hj_k; \ + unsigned const char *_hj_key=(unsigned const char*)(key); \ + hashv = 0xfeedbeefu; \ + _hj_i = _hj_j = 0x9e3779b9u; \ + _hj_k = (unsigned)(keylen); \ + while (_hj_k >= 12U) { \ + _hj_i += (_hj_key[0] + ( (unsigned)_hj_key[1] << 8 ) \ + + ( (unsigned)_hj_key[2] << 16 ) \ + + ( (unsigned)_hj_key[3] << 24 ) ); \ + _hj_j += (_hj_key[4] + ( (unsigned)_hj_key[5] << 8 ) \ + + ( (unsigned)_hj_key[6] << 16 ) \ + + ( (unsigned)_hj_key[7] << 24 ) ); \ + hashv += (_hj_key[8] + ( (unsigned)_hj_key[9] << 8 ) \ + + ( (unsigned)_hj_key[10] << 16 ) \ + + ( (unsigned)_hj_key[11] << 24 ) ); \ + \ + HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ + \ + _hj_key += 12; \ + _hj_k -= 12U; \ + } \ + hashv += (unsigned)(keylen); \ + switch ( _hj_k ) { \ + case 11: hashv += ( (unsigned)_hj_key[10] << 24 ); /* FALLTHROUGH */ \ + case 10: hashv += ( (unsigned)_hj_key[9] << 16 ); /* FALLTHROUGH */ \ + case 9: hashv += ( (unsigned)_hj_key[8] << 8 ); /* FALLTHROUGH */ \ + case 8: _hj_j += ( (unsigned)_hj_key[7] << 24 ); /* FALLTHROUGH */ \ + case 7: _hj_j += ( (unsigned)_hj_key[6] << 16 ); /* FALLTHROUGH */ \ + case 6: _hj_j += ( (unsigned)_hj_key[5] << 8 ); /* FALLTHROUGH */ \ + case 5: _hj_j += _hj_key[4]; /* FALLTHROUGH */ \ + case 4: _hj_i += ( (unsigned)_hj_key[3] << 24 ); /* FALLTHROUGH */ \ + case 3: _hj_i += ( (unsigned)_hj_key[2] << 16 ); /* FALLTHROUGH */ \ + case 2: _hj_i += ( (unsigned)_hj_key[1] << 8 ); /* FALLTHROUGH */ \ + case 1: _hj_i += _hj_key[0]; \ + } \ + HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ +} while (0) + +/* The Paul Hsieh hash function */ +#undef get16bits +#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \ + || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__) +#define get16bits(d) (*((const uint16_t *) (d))) +#endif + +#if !defined (get16bits) +#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8) \ + +(uint32_t)(((const uint8_t *)(d))[0]) ) +#endif +#define HASH_SFH(key,keylen,hashv) \ +do { \ + unsigned const char *_sfh_key=(unsigned const char*)(key); \ + uint32_t _sfh_tmp, _sfh_len = (uint32_t)keylen; \ + \ + unsigned _sfh_rem = _sfh_len & 3U; \ + _sfh_len >>= 2; \ + hashv = 0xcafebabeu; \ + \ + /* Main loop */ \ + for (;_sfh_len > 0U; _sfh_len--) { \ + hashv += get16bits (_sfh_key); \ + _sfh_tmp = ((uint32_t)(get16bits (_sfh_key+2)) << 11) ^ hashv; \ + hashv = (hashv << 16) ^ _sfh_tmp; \ + _sfh_key += 2U*sizeof (uint16_t); \ + hashv += hashv >> 11; \ + } \ + \ + /* Handle end cases */ \ + switch (_sfh_rem) { \ + case 3: hashv += get16bits (_sfh_key); \ + hashv ^= hashv << 16; \ + hashv ^= (uint32_t)(_sfh_key[sizeof (uint16_t)]) << 18; \ + hashv += hashv >> 11; \ + break; \ + case 2: hashv += get16bits (_sfh_key); \ + hashv ^= hashv << 11; \ + hashv += hashv >> 17; \ + break; \ + case 1: hashv += *_sfh_key; \ + hashv ^= hashv << 10; \ + hashv += hashv >> 1; \ + } \ + \ + /* Force "avalanching" of final 127 bits */ \ + hashv ^= hashv << 3; \ + hashv += hashv >> 5; \ + hashv ^= hashv << 4; \ + hashv += hashv >> 17; \ + hashv ^= hashv << 25; \ + hashv += hashv >> 6; \ +} while (0) + +#ifdef HASH_USING_NO_STRICT_ALIASING +/* The MurmurHash exploits some CPU's (x86,x86_64) tolerance for unaligned reads. + * For other types of CPU's (e.g. Sparc) an unaligned read causes a bus error. + * MurmurHash uses the faster approach only on CPU's where we know it's safe. + * + * Note the preprocessor built-in defines can be emitted using: + * + * gcc -m64 -dM -E - < /dev/null (on gcc) + * cc -## a.c (where a.c is a simple test file) (Sun Studio) + */ +#if (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86)) +#define MUR_GETBLOCK(p,i) p[i] +#else /* non intel */ +#define MUR_PLUS0_ALIGNED(p) (((unsigned long)p & 3UL) == 0UL) +#define MUR_PLUS1_ALIGNED(p) (((unsigned long)p & 3UL) == 1UL) +#define MUR_PLUS2_ALIGNED(p) (((unsigned long)p & 3UL) == 2UL) +#define MUR_PLUS3_ALIGNED(p) (((unsigned long)p & 3UL) == 3UL) +#define WP(p) ((uint32_t*)((unsigned long)(p) & ~3UL)) +#if (defined(__BIG_ENDIAN__) || defined(SPARC) || defined(__ppc__) || defined(__ppc64__)) +#define MUR_THREE_ONE(p) ((((*WP(p))&0x00ffffff) << 8) | (((*(WP(p)+1))&0xff000000) >> 24)) +#define MUR_TWO_TWO(p) ((((*WP(p))&0x0000ffff) <<16) | (((*(WP(p)+1))&0xffff0000) >> 16)) +#define MUR_ONE_THREE(p) ((((*WP(p))&0x000000ff) <<24) | (((*(WP(p)+1))&0xffffff00) >> 8)) +#else /* assume little endian non-intel */ +#define MUR_THREE_ONE(p) ((((*WP(p))&0xffffff00) >> 8) | (((*(WP(p)+1))&0x000000ff) << 24)) +#define MUR_TWO_TWO(p) ((((*WP(p))&0xffff0000) >>16) | (((*(WP(p)+1))&0x0000ffff) << 16)) +#define MUR_ONE_THREE(p) ((((*WP(p))&0xff000000) >>24) | (((*(WP(p)+1))&0x00ffffff) << 8)) +#endif +#define MUR_GETBLOCK(p,i) (MUR_PLUS0_ALIGNED(p) ? ((p)[i]) : \ + (MUR_PLUS1_ALIGNED(p) ? MUR_THREE_ONE(p) : \ + (MUR_PLUS2_ALIGNED(p) ? MUR_TWO_TWO(p) : \ + MUR_ONE_THREE(p)))) +#endif +#define MUR_ROTL32(x,r) (((x) << (r)) | ((x) >> (32 - (r)))) +#define MUR_FMIX(_h) \ +do { \ + _h ^= _h >> 16; \ + _h *= 0x85ebca6bu; \ + _h ^= _h >> 13; \ + _h *= 0xc2b2ae35u; \ + _h ^= _h >> 16; \ +} while (0) + +#define HASH_MUR(key,keylen,hashv) \ +do { \ + const uint8_t *_mur_data = (const uint8_t*)(key); \ + const int _mur_nblocks = (int)(keylen) / 4; \ + uint32_t _mur_h1 = 0xf88D5353u; \ + uint32_t _mur_c1 = 0xcc9e2d51u; \ + uint32_t _mur_c2 = 0x1b873593u; \ + uint32_t _mur_k1 = 0; \ + const uint8_t *_mur_tail; \ + const uint32_t *_mur_blocks = (const uint32_t*)(_mur_data+(_mur_nblocks*4)); \ + int _mur_i; \ + for(_mur_i = -_mur_nblocks; _mur_i!=0; _mur_i++) { \ + _mur_k1 = MUR_GETBLOCK(_mur_blocks,_mur_i); \ + _mur_k1 *= _mur_c1; \ + _mur_k1 = MUR_ROTL32(_mur_k1,15); \ + _mur_k1 *= _mur_c2; \ + \ + _mur_h1 ^= _mur_k1; \ + _mur_h1 = MUR_ROTL32(_mur_h1,13); \ + _mur_h1 = (_mur_h1*5U) + 0xe6546b64u; \ + } \ + _mur_tail = (const uint8_t*)(_mur_data + (_mur_nblocks*4)); \ + _mur_k1=0; \ + switch((keylen) & 3U) { \ + case 3: _mur_k1 ^= (uint32_t)_mur_tail[2] << 16; /* FALLTHROUGH */ \ + case 2: _mur_k1 ^= (uint32_t)_mur_tail[1] << 8; /* FALLTHROUGH */ \ + case 1: _mur_k1 ^= (uint32_t)_mur_tail[0]; \ + _mur_k1 *= _mur_c1; \ + _mur_k1 = MUR_ROTL32(_mur_k1,15); \ + _mur_k1 *= _mur_c2; \ + _mur_h1 ^= _mur_k1; \ + } \ + _mur_h1 ^= (uint32_t)(keylen); \ + MUR_FMIX(_mur_h1); \ + hashv = _mur_h1; \ +} while (0) +#endif /* HASH_USING_NO_STRICT_ALIASING */ + +/* iterate over items in a known bucket to find desired item */ +#define HASH_FIND_IN_BKT(tbl,hh,head,keyptr,keylen_in,hashval,out) \ +do { \ + if ((head).hh_head != NULL) { \ + DECLTYPE_ASSIGN(out, ELMT_FROM_HH(tbl, (head).hh_head)); \ + } else { \ + (out) = NULL; \ + } \ + while ((out) != NULL) { \ + if ((out)->hh.hashv == (hashval) && (out)->hh.keylen == (keylen_in)) { \ + if (uthash_memcmp((out)->hh.key, keyptr, keylen_in) == 0) { \ + break; \ + } \ + } \ + if ((out)->hh.hh_next != NULL) { \ + DECLTYPE_ASSIGN(out, ELMT_FROM_HH(tbl, (out)->hh.hh_next)); \ + } else { \ + (out) = NULL; \ + } \ + } \ +} while (0) + +/* add an item to a bucket */ +#define HASH_ADD_TO_BKT(head,addhh) \ +do { \ + head.count++; \ + (addhh)->hh_next = head.hh_head; \ + (addhh)->hh_prev = NULL; \ + if (head.hh_head != NULL) { (head).hh_head->hh_prev = (addhh); } \ + (head).hh_head=addhh; \ + if ((head.count >= ((head.expand_mult+1U) * HASH_BKT_CAPACITY_THRESH)) \ + && ((addhh)->tbl->noexpand != 1U)) { \ + HASH_EXPAND_BUCKETS((addhh)->tbl); \ + } \ +} while (0) + +/* remove an item from a given bucket */ +#define HASH_DEL_IN_BKT(hh,head,hh_del) \ + (head).count--; \ + if ((head).hh_head == hh_del) { \ + (head).hh_head = hh_del->hh_next; \ + } \ + if (hh_del->hh_prev) { \ + hh_del->hh_prev->hh_next = hh_del->hh_next; \ + } \ + if (hh_del->hh_next) { \ + hh_del->hh_next->hh_prev = hh_del->hh_prev; \ + } + +/* Bucket expansion has the effect of doubling the number of buckets + * and redistributing the items into the new buckets. Ideally the + * items will distribute more or less evenly into the new buckets + * (the extent to which this is true is a measure of the quality of + * the hash function as it applies to the key domain). + * + * With the items distributed into more buckets, the chain length + * (item count) in each bucket is reduced. Thus by expanding buckets + * the hash keeps a bound on the chain length. This bounded chain + * length is the essence of how a hash provides constant time lookup. + * + * The calculation of tbl->ideal_chain_maxlen below deserves some + * explanation. First, keep in mind that we're calculating the ideal + * maximum chain length based on the *new* (doubled) bucket count. + * In fractions this is just n/b (n=number of items,b=new num buckets). + * Since the ideal chain length is an integer, we want to calculate + * ceil(n/b). We don't depend on floating point arithmetic in this + * hash, so to calculate ceil(n/b) with integers we could write + * + * ceil(n/b) = (n/b) + ((n%b)?1:0) + * + * and in fact a previous version of this hash did just that. + * But now we have improved things a bit by recognizing that b is + * always a power of two. We keep its base 2 log handy (call it lb), + * so now we can write this with a bit shift and logical AND: + * + * ceil(n/b) = (n>>lb) + ( (n & (b-1)) ? 1:0) + * + */ +#define HASH_EXPAND_BUCKETS(tbl) \ +do { \ + unsigned _he_bkt; \ + unsigned _he_bkt_i; \ + struct UT_hash_handle *_he_thh, *_he_hh_nxt; \ + UT_hash_bucket *_he_new_buckets, *_he_newbkt; \ + _he_new_buckets = (UT_hash_bucket*)uthash_malloc( \ + 2UL * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \ + if (!_he_new_buckets) { uthash_fatal( "out of memory"); } \ + memset(_he_new_buckets, 0, \ + 2UL * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \ + tbl->ideal_chain_maxlen = \ + (tbl->num_items >> (tbl->log2_num_buckets+1U)) + \ + (((tbl->num_items & ((tbl->num_buckets*2U)-1U)) != 0U) ? 1U : 0U); \ + tbl->nonideal_items = 0; \ + for(_he_bkt_i = 0; _he_bkt_i < tbl->num_buckets; _he_bkt_i++) \ + { \ + _he_thh = tbl->buckets[ _he_bkt_i ].hh_head; \ + while (_he_thh != NULL) { \ + _he_hh_nxt = _he_thh->hh_next; \ + HASH_TO_BKT( _he_thh->hashv, tbl->num_buckets*2U, _he_bkt); \ + _he_newbkt = &(_he_new_buckets[ _he_bkt ]); \ + if (++(_he_newbkt->count) > tbl->ideal_chain_maxlen) { \ + tbl->nonideal_items++; \ + _he_newbkt->expand_mult = _he_newbkt->count / \ + tbl->ideal_chain_maxlen; \ + } \ + _he_thh->hh_prev = NULL; \ + _he_thh->hh_next = _he_newbkt->hh_head; \ + if (_he_newbkt->hh_head != NULL) { _he_newbkt->hh_head->hh_prev = \ + _he_thh; } \ + _he_newbkt->hh_head = _he_thh; \ + _he_thh = _he_hh_nxt; \ + } \ + } \ + uthash_free( tbl->buckets, tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \ + tbl->num_buckets *= 2U; \ + tbl->log2_num_buckets++; \ + tbl->buckets = _he_new_buckets; \ + tbl->ineff_expands = (tbl->nonideal_items > (tbl->num_items >> 1)) ? \ + (tbl->ineff_expands+1U) : 0U; \ + if (tbl->ineff_expands > 1U) { \ + tbl->noexpand=1; \ + uthash_noexpand_fyi(tbl); \ + } \ + uthash_expand_fyi(tbl); \ +} while (0) + + +/* This is an adaptation of Simon Tatham's O(n log(n)) mergesort */ +/* Note that HASH_SORT assumes the hash handle name to be hh. + * HASH_SRT was added to allow the hash handle name to be passed in. */ +#define HASH_SORT(head,cmpfcn) HASH_SRT(hh,head,cmpfcn) +#define HASH_SRT(hh,head,cmpfcn) \ +do { \ + unsigned _hs_i; \ + unsigned _hs_looping,_hs_nmerges,_hs_insize,_hs_psize,_hs_qsize; \ + struct UT_hash_handle *_hs_p, *_hs_q, *_hs_e, *_hs_list, *_hs_tail; \ + if (head != NULL) { \ + _hs_insize = 1; \ + _hs_looping = 1; \ + _hs_list = &((head)->hh); \ + while (_hs_looping != 0U) { \ + _hs_p = _hs_list; \ + _hs_list = NULL; \ + _hs_tail = NULL; \ + _hs_nmerges = 0; \ + while (_hs_p != NULL) { \ + _hs_nmerges++; \ + _hs_q = _hs_p; \ + _hs_psize = 0; \ + for ( _hs_i = 0; _hs_i < _hs_insize; _hs_i++ ) { \ + _hs_psize++; \ + _hs_q = (UT_hash_handle*)((_hs_q->next != NULL) ? \ + ((void*)((char*)(_hs_q->next) + \ + (head)->hh.tbl->hho)) : NULL); \ + if (! (_hs_q) ) { break; } \ + } \ + _hs_qsize = _hs_insize; \ + while ((_hs_psize > 0U) || ((_hs_qsize > 0U) && (_hs_q != NULL))) {\ + if (_hs_psize == 0U) { \ + _hs_e = _hs_q; \ + _hs_q = (UT_hash_handle*)((_hs_q->next != NULL) ? \ + ((void*)((char*)(_hs_q->next) + \ + (head)->hh.tbl->hho)) : NULL); \ + _hs_qsize--; \ + } else if ( (_hs_qsize == 0U) || (_hs_q == NULL) ) { \ + _hs_e = _hs_p; \ + if (_hs_p != NULL){ \ + _hs_p = (UT_hash_handle*)((_hs_p->next != NULL) ? \ + ((void*)((char*)(_hs_p->next) + \ + (head)->hh.tbl->hho)) : NULL); \ + } \ + _hs_psize--; \ + } else if (( \ + cmpfcn(DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_p)), \ + DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_q))) \ + ) <= 0) { \ + _hs_e = _hs_p; \ + if (_hs_p != NULL){ \ + _hs_p = (UT_hash_handle*)((_hs_p->next != NULL) ? \ + ((void*)((char*)(_hs_p->next) + \ + (head)->hh.tbl->hho)) : NULL); \ + } \ + _hs_psize--; \ + } else { \ + _hs_e = _hs_q; \ + _hs_q = (UT_hash_handle*)((_hs_q->next != NULL) ? \ + ((void*)((char*)(_hs_q->next) + \ + (head)->hh.tbl->hho)) : NULL); \ + _hs_qsize--; \ + } \ + if ( _hs_tail != NULL ) { \ + _hs_tail->next = ((_hs_e != NULL) ? \ + ELMT_FROM_HH((head)->hh.tbl,_hs_e) : NULL); \ + } else { \ + _hs_list = _hs_e; \ + } \ + if (_hs_e != NULL) { \ + _hs_e->prev = ((_hs_tail != NULL) ? \ + ELMT_FROM_HH((head)->hh.tbl,_hs_tail) : NULL); \ + } \ + _hs_tail = _hs_e; \ + } \ + _hs_p = _hs_q; \ + } \ + if (_hs_tail != NULL){ \ + _hs_tail->next = NULL; \ + } \ + if ( _hs_nmerges <= 1U ) { \ + _hs_looping=0; \ + (head)->hh.tbl->tail = _hs_tail; \ + DECLTYPE_ASSIGN(head,ELMT_FROM_HH((head)->hh.tbl, _hs_list)); \ + } \ + _hs_insize *= 2U; \ + } \ + HASH_FSCK(hh,head); \ + } \ +} while (0) + +/* This function selects items from one hash into another hash. + * The end result is that the selected items have dual presence + * in both hashes. There is no copy of the items made; rather + * they are added into the new hash through a secondary hash + * hash handle that must be present in the structure. */ +#define HASH_SELECT(hh_dst, dst, hh_src, src, cond) \ +do { \ + unsigned _src_bkt, _dst_bkt; \ + void *_last_elt=NULL, *_elt; \ + UT_hash_handle *_src_hh, *_dst_hh, *_last_elt_hh=NULL; \ + ptrdiff_t _dst_hho = ((char*)(&(dst)->hh_dst) - (char*)(dst)); \ + if (src != NULL) { \ + for(_src_bkt=0; _src_bkt < (src)->hh_src.tbl->num_buckets; _src_bkt++) { \ + for(_src_hh = (src)->hh_src.tbl->buckets[_src_bkt].hh_head; \ + _src_hh != NULL; \ + _src_hh = _src_hh->hh_next) { \ + _elt = ELMT_FROM_HH((src)->hh_src.tbl, _src_hh); \ + if (cond(_elt)) { \ + _dst_hh = (UT_hash_handle*)(((char*)_elt) + _dst_hho); \ + _dst_hh->key = _src_hh->key; \ + _dst_hh->keylen = _src_hh->keylen; \ + _dst_hh->hashv = _src_hh->hashv; \ + _dst_hh->prev = _last_elt; \ + _dst_hh->next = NULL; \ + if (_last_elt_hh != NULL) { _last_elt_hh->next = _elt; } \ + if (dst == NULL) { \ + DECLTYPE_ASSIGN(dst,_elt); \ + HASH_MAKE_TABLE(hh_dst,dst); \ + } else { \ + _dst_hh->tbl = (dst)->hh_dst.tbl; \ + } \ + HASH_TO_BKT(_dst_hh->hashv, _dst_hh->tbl->num_buckets, _dst_bkt); \ + HASH_ADD_TO_BKT(_dst_hh->tbl->buckets[_dst_bkt],_dst_hh); \ + (dst)->hh_dst.tbl->num_items++; \ + _last_elt = _elt; \ + _last_elt_hh = _dst_hh; \ + } \ + } \ + } \ + } \ + HASH_FSCK(hh_dst,dst); \ +} while (0) + +#define HASH_CLEAR(hh,head) \ +do { \ + if (head != NULL) { \ + uthash_free((head)->hh.tbl->buckets, \ + (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket)); \ + HASH_BLOOM_FREE((head)->hh.tbl); \ + uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \ + (head)=NULL; \ + } \ +} while (0) + +#define HASH_OVERHEAD(hh,head) \ + ((head != NULL) ? ( \ + (size_t)(((head)->hh.tbl->num_items * sizeof(UT_hash_handle)) + \ + ((head)->hh.tbl->num_buckets * sizeof(UT_hash_bucket)) + \ + sizeof(UT_hash_table) + \ + (HASH_BLOOM_BYTELEN))) : 0U) + +#ifdef NO_DECLTYPE +#define HASH_ITER(hh,head,el,tmp) \ +for(((el)=(head)), ((*(char**)(&(tmp)))=(char*)((head!=NULL)?(head)->hh.next:NULL)); \ + (el) != NULL; ((el)=(tmp)), ((*(char**)(&(tmp)))=(char*)((tmp!=NULL)?(tmp)->hh.next:NULL))) +#else +#define HASH_ITER(hh,head,el,tmp) \ +for(((el)=(head)), ((tmp)=DECLTYPE(el)((head!=NULL)?(head)->hh.next:NULL)); \ + (el) != NULL; ((el)=(tmp)), ((tmp)=DECLTYPE(el)((tmp!=NULL)?(tmp)->hh.next:NULL))) +#endif + +/* obtain a count of items in the hash */ +#define HASH_COUNT(head) HASH_CNT(hh,head) +#define HASH_CNT(hh,head) ((head != NULL)?((head)->hh.tbl->num_items):0U) + +typedef struct UT_hash_bucket { + struct UT_hash_handle *hh_head; + unsigned count; + + /* expand_mult is normally set to 0. In this situation, the max chain length + * threshold is enforced at its default value, HASH_BKT_CAPACITY_THRESH. (If + * the bucket's chain exceeds this length, bucket expansion is triggered). + * However, setting expand_mult to a non-zero value delays bucket expansion + * (that would be triggered by additions to this particular bucket) + * until its chain length reaches a *multiple* of HASH_BKT_CAPACITY_THRESH. + * (The multiplier is simply expand_mult+1). The whole idea of this + * multiplier is to reduce bucket expansions, since they are expensive, in + * situations where we know that a particular bucket tends to be overused. + * It is better to let its chain length grow to a longer yet-still-bounded + * value, than to do an O(n) bucket expansion too often. + */ + unsigned expand_mult; + +} UT_hash_bucket; + +/* random signature used only to find hash tables in external analysis */ +#define HASH_SIGNATURE 0xa0111fe1u +#define HASH_BLOOM_SIGNATURE 0xb12220f2u + +typedef struct UT_hash_table { + UT_hash_bucket *buckets; + unsigned num_buckets, log2_num_buckets; + unsigned num_items; + struct UT_hash_handle *tail; /* tail hh in app order, for fast append */ + ptrdiff_t hho; /* hash handle offset (byte pos of hash handle in element */ + + /* in an ideal situation (all buckets used equally), no bucket would have + * more than ceil(#items/#buckets) items. that's the ideal chain length. */ + unsigned ideal_chain_maxlen; + + /* nonideal_items is the number of items in the hash whose chain position + * exceeds the ideal chain maxlen. these items pay the penalty for an uneven + * hash distribution; reaching them in a chain traversal takes >ideal steps */ + unsigned nonideal_items; + + /* ineffective expands occur when a bucket doubling was performed, but + * afterward, more than half the items in the hash had nonideal chain + * positions. If this happens on two consecutive expansions we inhibit any + * further expansion, as it's not helping; this happens when the hash + * function isn't a good fit for the key domain. When expansion is inhibited + * the hash will still work, albeit no longer in constant time. */ + unsigned ineff_expands, noexpand; + + uint32_t signature; /* used only to find hash tables in external analysis */ +#ifdef HASH_BLOOM + uint32_t bloom_sig; /* used only to test bloom exists in external analysis */ + uint8_t *bloom_bv; + uint8_t bloom_nbits; +#endif + +} UT_hash_table; + +typedef struct UT_hash_handle { + struct UT_hash_table *tbl; + void *prev; /* prev element in app order */ + void *next; /* next element in app order */ + struct UT_hash_handle *hh_prev; /* previous hh in bucket order */ + struct UT_hash_handle *hh_next; /* next hh in bucket order */ + void *key; /* ptr to enclosing struct's key */ + unsigned keylen; /* enclosing struct's key len */ + unsigned hashv; /* result of hash-fcn(key) */ +} UT_hash_handle; + +#endif /* UTHASH_H */ diff --git a/libdap/include/utlist.h b/libdap/include/utlist.h new file mode 100755 index 0000000000000000000000000000000000000000..9b5534ffbdb07d6504891f1135e9a8d70bfb137f --- /dev/null +++ b/libdap/include/utlist.h @@ -0,0 +1,895 @@ +/* +Copyright (c) 2007-2016, 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. +*/ + +#ifndef UTLIST_H +#define UTLIST_H + +#define UTLIST_VERSION 2.0.1 + +#include <assert.h> + +/* + * This file contains macros to manipulate singly and doubly-linked lists. + * + * 1. LL_ macros: singly-linked lists. + * 2. DL_ macros: doubly-linked lists. + * 3. CDL_ macros: circular doubly-linked lists. + * + * To use singly-linked lists, your structure must have a "next" pointer. + * To use doubly-linked lists, your structure must "prev" and "next" pointers. + * Either way, the pointer to the head of the list must be initialized to NULL. + * + * ----------------.EXAMPLE ------------------------- + * struct item { + * int id; + * struct item *prev, *next; + * } + * + * struct item *list = NULL: + * + * int main() { + * struct item *item; + * ... allocate and populate item ... + * DL_APPEND(list, item); + * } + * -------------------------------------------------- + * + * For doubly-linked lists, the append and delete macros are O(1) + * For singly-linked lists, append and delete are O(n) but prepend is O(1) + * The sort macro is O(n log(n)) for all types of single/double/circular lists. + */ + +/* These macros use decltype or the earlier __typeof GNU extension. + As decltype is only available in newer compilers (VS2010 or gcc 4.3+ + when compiling c++ code), this code uses whatever method is needed + or, for VS2008 where neither is available, uses casting workarounds. */ +#ifdef _MSC_VER /* MS compiler */ +#if _MSC_VER >= 1600 && defined(__cplusplus) /* VS2010 or newer in C++ mode */ +#define LDECLTYPE(x) decltype(x) +#else /* VS2008 or older (or VS2010 in C mode) */ +#define NO_DECLTYPE +#endif +#elif defined(__ICCARM__) +#define NO_DECLTYPE +#else /* GNU, Sun and other compilers */ +#define LDECLTYPE(x) __typeof(x) +#endif + +/* for VS2008 we use some workarounds to get around the lack of decltype, + * namely, we always reassign our tmp variable to the list head if we need + * to dereference its prev/next pointers, and save/restore the real head.*/ +#ifdef NO_DECLTYPE +#define IF_NO_DECLTYPE(x) x +#define LDECLTYPE(x) char* +#define _SV(elt,list) _tmp = (char*)(list); {char **_alias = (char**)&(list); *_alias = (elt); } +#define _NEXT(elt,list,next) ((char*)((list)->next)) +#define _NEXTASGN(elt,list,to,next) { char **_alias = (char**)&((list)->next); *_alias=(char*)(to); } +/* #define _PREV(elt,list,prev) ((char*)((list)->prev)) */ +#define _PREVASGN(elt,list,to,prev) { char **_alias = (char**)&((list)->prev); *_alias=(char*)(to); } +#define _RS(list) { char **_alias = (char**)&(list); *_alias=_tmp; } +#define _CASTASGN(a,b) { char **_alias = (char**)&(a); *_alias=(char*)(b); } +#else +#define IF_NO_DECLTYPE(x) +#define _SV(elt,list) +#define _NEXT(elt,list,next) ((elt)->next) +#define _NEXTASGN(elt,list,to,next) ((elt)->next)=(to) +/* #define _PREV(elt,list,prev) ((elt)->prev) */ +#define _PREVASGN(elt,list,to,prev) ((elt)->prev)=(to) +#define _RS(list) +#define _CASTASGN(a,b) (a)=(b) +#endif + +/****************************************************************************** + * The sort macro is an adaptation of Simon Tatham's O(n log(n)) mergesort * + * Unwieldy variable names used here to avoid shadowing passed-in variables. * + *****************************************************************************/ +#define LL_SORT(list, cmp) \ + LL_SORT2(list, cmp, next) + +#define LL_SORT2(list, cmp, next) \ +do { \ + LDECLTYPE(list) _ls_p; \ + LDECLTYPE(list) _ls_q; \ + LDECLTYPE(list) _ls_e; \ + LDECLTYPE(list) _ls_tail; \ + IF_NO_DECLTYPE(LDECLTYPE(list) _tmp;) \ + int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping; \ + if (list) { \ + _ls_insize = 1; \ + _ls_looping = 1; \ + while (_ls_looping) { \ + _CASTASGN(_ls_p,list); \ + (list) = NULL; \ + _ls_tail = NULL; \ + _ls_nmerges = 0; \ + while (_ls_p) { \ + _ls_nmerges++; \ + _ls_q = _ls_p; \ + _ls_psize = 0; \ + for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) { \ + _ls_psize++; \ + _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list,next); _RS(list); \ + if (!_ls_q) break; \ + } \ + _ls_qsize = _ls_insize; \ + while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) { \ + if (_ls_psize == 0) { \ + _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \ + _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \ + } else if (_ls_qsize == 0 || !_ls_q) { \ + _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \ + _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \ + } else if (cmp(_ls_p,_ls_q) <= 0) { \ + _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \ + _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \ + } else { \ + _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \ + _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \ + } \ + if (_ls_tail) { \ + _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e,next); _RS(list); \ + } else { \ + _CASTASGN(list,_ls_e); \ + } \ + _ls_tail = _ls_e; \ + } \ + _ls_p = _ls_q; \ + } \ + if (_ls_tail) { \ + _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,NULL,next); _RS(list); \ + } \ + if (_ls_nmerges <= 1) { \ + _ls_looping=0; \ + } \ + _ls_insize *= 2; \ + } \ + } \ +} while (0) + + +#define DL_SORT(list, cmp) \ + DL_SORT2(list, cmp, prev, next) + +#define DL_SORT2(list, cmp, prev, next) \ +do { \ + LDECLTYPE(list) _ls_p; \ + LDECLTYPE(list) _ls_q; \ + LDECLTYPE(list) _ls_e; \ + LDECLTYPE(list) _ls_tail; \ + IF_NO_DECLTYPE(LDECLTYPE(list) _tmp;) \ + int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping; \ + if (list) { \ + _ls_insize = 1; \ + _ls_looping = 1; \ + while (_ls_looping) { \ + _CASTASGN(_ls_p,list); \ + (list) = NULL; \ + _ls_tail = NULL; \ + _ls_nmerges = 0; \ + while (_ls_p) { \ + _ls_nmerges++; \ + _ls_q = _ls_p; \ + _ls_psize = 0; \ + for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) { \ + _ls_psize++; \ + _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list,next); _RS(list); \ + if (!_ls_q) break; \ + } \ + _ls_qsize = _ls_insize; \ + while ((_ls_psize > 0) || ((_ls_qsize > 0) && _ls_q)) { \ + if (_ls_psize == 0) { \ + _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \ + _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \ + } else if ((_ls_qsize == 0) || (!_ls_q)) { \ + _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \ + _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \ + } else if (cmp(_ls_p,_ls_q) <= 0) { \ + _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \ + _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \ + } else { \ + _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \ + _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \ + } \ + if (_ls_tail) { \ + _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e,next); _RS(list); \ + } else { \ + _CASTASGN(list,_ls_e); \ + } \ + _SV(_ls_e,list); _PREVASGN(_ls_e,list,_ls_tail,prev); _RS(list); \ + _ls_tail = _ls_e; \ + } \ + _ls_p = _ls_q; \ + } \ + _CASTASGN((list)->prev, _ls_tail); \ + _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,NULL,next); _RS(list); \ + if (_ls_nmerges <= 1) { \ + _ls_looping=0; \ + } \ + _ls_insize *= 2; \ + } \ + } \ +} while (0) + +#define CDL_SORT(list, cmp) \ + CDL_SORT2(list, cmp, prev, next) + +#define CDL_SORT2(list, cmp, prev, next) \ +do { \ + LDECLTYPE(list) _ls_p; \ + LDECLTYPE(list) _ls_q; \ + LDECLTYPE(list) _ls_e; \ + LDECLTYPE(list) _ls_tail; \ + LDECLTYPE(list) _ls_oldhead; \ + LDECLTYPE(list) _tmp; \ + int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping; \ + if (list) { \ + _ls_insize = 1; \ + _ls_looping = 1; \ + while (_ls_looping) { \ + _CASTASGN(_ls_p,list); \ + _CASTASGN(_ls_oldhead,list); \ + (list) = NULL; \ + _ls_tail = NULL; \ + _ls_nmerges = 0; \ + while (_ls_p) { \ + _ls_nmerges++; \ + _ls_q = _ls_p; \ + _ls_psize = 0; \ + for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) { \ + _ls_psize++; \ + _SV(_ls_q,list); \ + if (_NEXT(_ls_q,list,next) == _ls_oldhead) { \ + _ls_q = NULL; \ + } else { \ + _ls_q = _NEXT(_ls_q,list,next); \ + } \ + _RS(list); \ + if (!_ls_q) break; \ + } \ + _ls_qsize = _ls_insize; \ + while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) { \ + if (_ls_psize == 0) { \ + _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \ + _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \ + if (_ls_q == _ls_oldhead) { _ls_q = NULL; } \ + } else if (_ls_qsize == 0 || !_ls_q) { \ + _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \ + _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \ + if (_ls_p == _ls_oldhead) { _ls_p = NULL; } \ + } else if (cmp(_ls_p,_ls_q) <= 0) { \ + _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \ + _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \ + if (_ls_p == _ls_oldhead) { _ls_p = NULL; } \ + } else { \ + _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \ + _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \ + if (_ls_q == _ls_oldhead) { _ls_q = NULL; } \ + } \ + if (_ls_tail) { \ + _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e,next); _RS(list); \ + } else { \ + _CASTASGN(list,_ls_e); \ + } \ + _SV(_ls_e,list); _PREVASGN(_ls_e,list,_ls_tail,prev); _RS(list); \ + _ls_tail = _ls_e; \ + } \ + _ls_p = _ls_q; \ + } \ + _CASTASGN((list)->prev,_ls_tail); \ + _CASTASGN(_tmp,list); \ + _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_tmp,next); _RS(list); \ + if (_ls_nmerges <= 1) { \ + _ls_looping=0; \ + } \ + _ls_insize *= 2; \ + } \ + } \ +} while (0) + +/****************************************************************************** + * singly linked list macros (non-circular) * + *****************************************************************************/ +#define LL_PREPEND(head,add) \ + LL_PREPEND2(head,add,next) + +#define LL_PREPEND2(head,add,next) \ +do { \ + (add)->next = (head); \ + (head) = (add); \ +} while (0) + +#define LL_CONCAT(head1,head2) \ + LL_CONCAT2(head1,head2,next) + +#define LL_CONCAT2(head1,head2,next) \ +do { \ + LDECLTYPE(head1) _tmp; \ + if (head1) { \ + _tmp = (head1); \ + while (_tmp->next) { _tmp = _tmp->next; } \ + _tmp->next=(head2); \ + } else { \ + (head1)=(head2); \ + } \ +} while (0) + +#define LL_APPEND(head,add) \ + LL_APPEND2(head,add,next) + +#define LL_APPEND2(head,add,next) \ +do { \ + LDECLTYPE(head) _tmp; \ + (add)->next=NULL; \ + if (head) { \ + _tmp = (head); \ + while (_tmp->next) { _tmp = _tmp->next; } \ + _tmp->next=(add); \ + } else { \ + (head)=(add); \ + } \ +} while (0) + +#define LL_DELETE(head,del) \ + LL_DELETE2(head,del,next) + +#define LL_DELETE2(head,del,next) \ +do { \ + LDECLTYPE(head) _tmp; \ + if ((head) == (del)) { \ + (head)=(head)->next; \ + } else { \ + _tmp = (head); \ + while (_tmp->next && (_tmp->next != (del))) { \ + _tmp = _tmp->next; \ + } \ + if (_tmp->next) { \ + _tmp->next = (del)->next; \ + } \ + } \ +} while (0) + +#define LL_COUNT(head,el,counter) \ + LL_COUNT2(head,el,counter,next) \ + +#define LL_COUNT2(head,el,counter,next) \ +do { \ + (counter) = 0; \ + LL_FOREACH2(head,el,next) { ++(counter); } \ +} while (0) + +#define LL_FOREACH(head,el) \ + LL_FOREACH2(head,el,next) + +#define LL_FOREACH2(head,el,next) \ + for ((el) = (head); el; (el) = (el)->next) + +#define LL_FOREACH_SAFE(head,el,tmp) \ + LL_FOREACH_SAFE2(head,el,tmp,next) + +#define LL_FOREACH_SAFE2(head,el,tmp,next) \ + for ((el) = (head); (el) && ((tmp) = (el)->next, 1); (el) = (tmp)) + +#define LL_SEARCH_SCALAR(head,out,field,val) \ + LL_SEARCH_SCALAR2(head,out,field,val,next) + +#define LL_SEARCH_SCALAR2(head,out,field,val,next) \ +do { \ + LL_FOREACH2(head,out,next) { \ + if ((out)->field == (val)) break; \ + } \ +} while (0) + +#define LL_SEARCH(head,out,elt,cmp) \ + LL_SEARCH2(head,out,elt,cmp,next) + +#define LL_SEARCH2(head,out,elt,cmp,next) \ +do { \ + LL_FOREACH2(head,out,next) { \ + if ((cmp(out,elt))==0) break; \ + } \ +} while (0) + +#define LL_REPLACE_ELEM2(head, el, add, next) \ +do { \ + LDECLTYPE(head) _tmp; \ + assert((head) != NULL); \ + assert((el) != NULL); \ + assert((add) != NULL); \ + (add)->next = (el)->next; \ + if ((head) == (el)) { \ + (head) = (add); \ + } else { \ + _tmp = (head); \ + while (_tmp->next && (_tmp->next != (el))) { \ + _tmp = _tmp->next; \ + } \ + if (_tmp->next) { \ + _tmp->next = (add); \ + } \ + } \ +} while (0) + +#define LL_REPLACE_ELEM(head, el, add) \ + LL_REPLACE_ELEM2(head, el, add, next) + +#define LL_PREPEND_ELEM2(head, el, add, next) \ +do { \ + if (el) { \ + LDECLTYPE(head) _tmp; \ + assert((head) != NULL); \ + assert((add) != NULL); \ + (add)->next = (el); \ + if ((head) == (el)) { \ + (head) = (add); \ + } else { \ + _tmp = (head); \ + while (_tmp->next && (_tmp->next != (el))) { \ + _tmp = _tmp->next; \ + } \ + if (_tmp->next) { \ + _tmp->next = (add); \ + } \ + } \ + } else { \ + LL_APPEND2(head, add, next); \ + } \ +} while (0) \ + +#define LL_PREPEND_ELEM(head, el, add) \ + LL_PREPEND_ELEM2(head, el, add, next) + +#define LL_APPEND_ELEM2(head, el, add, next) \ +do { \ + if (el) { \ + assert((head) != NULL); \ + assert((add) != NULL); \ + (add)->next = (el)->next; \ + (el)->next = (add); \ + } else { \ + LL_PREPEND2(head, add, next); \ + } \ +} while (0) \ + +#define LL_APPEND_ELEM(head, el, add) \ + LL_APPEND_ELEM2(head, el, add, next) + +#ifdef NO_DECLTYPE +/* Here are VS2008 / NO_DECLTYPE replacements for a few functions */ + +#undef LL_CONCAT2 +#define LL_CONCAT2(head1,head2,next) \ +do { \ + char *_tmp; \ + if (head1) { \ + _tmp = (char*)(head1); \ + while ((head1)->next) { (head1) = (head1)->next; } \ + (head1)->next = (head2); \ + _RS(head1); \ + } else { \ + (head1)=(head2); \ + } \ +} while (0) + +#undef LL_APPEND2 +#define LL_APPEND2(head,add,next) \ +do { \ + if (head) { \ + (add)->next = head; /* use add->next as a temp variable */ \ + while ((add)->next->next) { (add)->next = (add)->next->next; } \ + (add)->next->next=(add); \ + } else { \ + (head)=(add); \ + } \ + (add)->next=NULL; \ +} while (0) + +#undef LL_DELETE2 +#define LL_DELETE2(head,del,next) \ +do { \ + if ((head) == (del)) { \ + (head)=(head)->next; \ + } else { \ + char *_tmp = (char*)(head); \ + while ((head)->next && ((head)->next != (del))) { \ + (head) = (head)->next; \ + } \ + if ((head)->next) { \ + (head)->next = ((del)->next); \ + } \ + _RS(head); \ + } \ +} while (0) + +#undef LL_REPLACE_ELEM2 +#define LL_REPLACE_ELEM2(head, el, add, next) \ +do { \ + assert((head) != NULL); \ + assert((el) != NULL); \ + assert((add) != NULL); \ + if ((head) == (el)) { \ + (head) = (add); \ + } else { \ + (add)->next = head; \ + while ((add)->next->next && ((add)->next->next != (el))) { \ + (add)->next = (add)->next->next; \ + } \ + if ((add)->next->next) { \ + (add)->next->next = (add); \ + } \ + } \ + (add)->next = (el)->next; \ +} while (0) + +#undef LL_PREPEND_ELEM2 +#define LL_PREPEND_ELEM2(head, el, add, next) \ +do { \ + if (el) { \ + assert((head) != NULL); \ + assert((add) != NULL); \ + if ((head) == (el)) { \ + (head) = (add); \ + } else { \ + (add)->next = (head); \ + while ((add)->next->next && ((add)->next->next != (el))) { \ + (add)->next = (add)->next->next; \ + } \ + if ((add)->next->next) { \ + (add)->next->next = (add); \ + } \ + } \ + (add)->next = (el); \ + } else { \ + LL_APPEND2(head, add, next); \ + } \ +} while (0) \ + +#endif /* NO_DECLTYPE */ + +/****************************************************************************** + * doubly linked list macros (non-circular) * + *****************************************************************************/ +#define DL_PREPEND(head,add) \ + DL_PREPEND2(head,add,prev,next) + +#define DL_PREPEND2(head,add,prev,next) \ +do { \ + (add)->next = (head); \ + if (head) { \ + (add)->prev = (head)->prev; \ + (head)->prev = (add); \ + } else { \ + (add)->prev = (add); \ + } \ + (head) = (add); \ +} while (0) + +#define DL_APPEND(head,add) \ + DL_APPEND2(head,add,prev,next) + +#define DL_APPEND2(head,add,prev,next) \ +do { \ + if (head) { \ + (add)->prev = (head)->prev; \ + (head)->prev->next = (add); \ + (head)->prev = (add); \ + (add)->next = NULL; \ + } else { \ + (head)=(add); \ + (head)->prev = (head); \ + (head)->next = NULL; \ + } \ +} while (0) + +#define DL_CONCAT(head1,head2) \ + DL_CONCAT2(head1,head2,prev,next) + +#define DL_CONCAT2(head1,head2,prev,next) \ +do { \ + LDECLTYPE(head1) _tmp; \ + if (head2) { \ + if (head1) { \ + _CASTASGN(_tmp, (head2)->prev); \ + (head2)->prev = (head1)->prev; \ + (head1)->prev->next = (head2); \ + _CASTASGN((head1)->prev, _tmp); \ + } else { \ + (head1)=(head2); \ + } \ + } \ +} while (0) + +#define DL_DELETE(head,del) \ + DL_DELETE2(head,del,prev,next) + +#define DL_DELETE2(head,del,prev,next) \ +do { \ + assert((del)->prev != NULL); \ + if ((del)->prev == (del)) { \ + (head)=NULL; \ + } else if ((del)==(head)) { \ + (del)->next->prev = (del)->prev; \ + (head) = (del)->next; \ + } else { \ + (del)->prev->next = (del)->next; \ + if ((del)->next) { \ + (del)->next->prev = (del)->prev; \ + } else { \ + (head)->prev = (del)->prev; \ + } \ + } \ +} while (0) + +#define DL_COUNT(head,el,counter) \ + DL_COUNT2(head,el,counter,next) \ + +#define DL_COUNT2(head,el,counter,next) \ +do { \ + (counter) = 0; \ + DL_FOREACH2(head,el,next) { ++(counter); } \ +} while (0) + +#define DL_FOREACH(head,el) \ + DL_FOREACH2(head,el,next) + +#define DL_FOREACH2(head,el,next) \ + for ((el) = (head); el; (el) = (el)->next) + +/* this version is safe for deleting the elements during iteration */ +#define DL_FOREACH_SAFE(head,el,tmp) \ + DL_FOREACH_SAFE2(head,el,tmp,next) + +#define DL_FOREACH_SAFE2(head,el,tmp,next) \ + for ((el) = (head); (el) && ((tmp) = (el)->next, 1); (el) = (tmp)) + +/* these are identical to their singly-linked list counterparts */ +#define DL_SEARCH_SCALAR LL_SEARCH_SCALAR +#define DL_SEARCH LL_SEARCH +#define DL_SEARCH_SCALAR2 LL_SEARCH_SCALAR2 +#define DL_SEARCH2 LL_SEARCH2 + +#define DL_REPLACE_ELEM2(head, el, add, prev, next) \ +do { \ + assert((head) != NULL); \ + assert((el) != NULL); \ + assert((add) != NULL); \ + if ((head) == (el)) { \ + (head) = (add); \ + (add)->next = (el)->next; \ + if ((el)->next == NULL) { \ + (add)->prev = (add); \ + } else { \ + (add)->prev = (el)->prev; \ + (add)->next->prev = (add); \ + } \ + } else { \ + (add)->next = (el)->next; \ + (add)->prev = (el)->prev; \ + (add)->prev->next = (add); \ + if ((el)->next == NULL) { \ + (head)->prev = (add); \ + } else { \ + (add)->next->prev = (add); \ + } \ + } \ +} while (0) + +#define DL_REPLACE_ELEM(head, el, add) \ + DL_REPLACE_ELEM2(head, el, add, prev, next) + +#define DL_PREPEND_ELEM2(head, el, add, prev, next) \ +do { \ + if (el) { \ + assert((head) != NULL); \ + assert((add) != NULL); \ + (add)->next = (el); \ + (add)->prev = (el)->prev; \ + (el)->prev = (add); \ + if ((head) == (el)) { \ + (head) = (add); \ + } else { \ + (add)->prev->next = (add); \ + } \ + } else { \ + DL_APPEND2(head, add, prev, next); \ + } \ +} while (0) \ + +#define DL_PREPEND_ELEM(head, el, add) \ + DL_PREPEND_ELEM2(head, el, add, prev, next) + +#define DL_APPEND_ELEM2(head, el, add, prev, next) \ +do { \ + if (el) { \ + assert((head) != NULL); \ + assert((add) != NULL); \ + (add)->next = (el)->next; \ + (add)->prev = (el); \ + (el)->next = (add); \ + if ((add)->next) { \ + (add)->next->prev = (add); \ + } else { \ + (head)->prev = (add); \ + } \ + } else { \ + DL_PREPEND2(head, add, prev, next); \ + } \ +} while (0) \ + +#define DL_APPEND_ELEM(head, el, add) \ + DL_APPEND_ELEM2(head, el, add, prev, next) + +/****************************************************************************** + * circular doubly linked list macros * + *****************************************************************************/ +#define CDL_APPEND(head,add) \ + CDL_APPEND2(head,add,prev,next) + +#define CDL_APPEND2(head,add,prev,next) \ +do { \ + if (head) { \ + (add)->prev = (head)->prev; \ + (add)->next = (head); \ + (head)->prev = (add); \ + (add)->prev->next = (add); \ + } else { \ + (add)->prev = (add); \ + (add)->next = (add); \ + (head) = (add); \ + } \ +} while (0) + +#define CDL_PREPEND(head,add) \ + CDL_PREPEND2(head,add,prev,next) + +#define CDL_PREPEND2(head,add,prev,next) \ +do { \ + if (head) { \ + (add)->prev = (head)->prev; \ + (add)->next = (head); \ + (head)->prev = (add); \ + (add)->prev->next = (add); \ + } else { \ + (add)->prev = (add); \ + (add)->next = (add); \ + } \ + (head) = (add); \ +} while (0) + +#define CDL_DELETE(head,del) \ + CDL_DELETE2(head,del,prev,next) + +#define CDL_DELETE2(head,del,prev,next) \ +do { \ + if (((head)==(del)) && ((head)->next == (head))) { \ + (head) = NULL; \ + } else { \ + (del)->next->prev = (del)->prev; \ + (del)->prev->next = (del)->next; \ + if ((del) == (head)) (head)=(del)->next; \ + } \ +} while (0) + +#define CDL_COUNT(head,el,counter) \ + CDL_COUNT2(head,el,counter,next) \ + +#define CDL_COUNT2(head, el, counter,next) \ +do { \ + (counter) = 0; \ + CDL_FOREACH2(head,el,next) { ++(counter); } \ +} while (0) + +#define CDL_FOREACH(head,el) \ + CDL_FOREACH2(head,el,next) + +#define CDL_FOREACH2(head,el,next) \ + for ((el)=(head);el;(el)=(((el)->next==(head)) ? NULL : (el)->next)) + +#define CDL_FOREACH_SAFE(head,el,tmp1,tmp2) \ + CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next) + +#define CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next) \ + for ((el) = (head), (tmp1) = (head) ? (head)->prev : NULL; \ + (el) && ((tmp2) = (el)->next, 1); \ + (el) = ((el) == (tmp1) ? NULL : (tmp2))) + +#define CDL_SEARCH_SCALAR(head,out,field,val) \ + CDL_SEARCH_SCALAR2(head,out,field,val,next) + +#define CDL_SEARCH_SCALAR2(head,out,field,val,next) \ +do { \ + CDL_FOREACH2(head,out,next) { \ + if ((out)->field == (val)) break; \ + } \ +} while (0) + +#define CDL_SEARCH(head,out,elt,cmp) \ + CDL_SEARCH2(head,out,elt,cmp,next) + +#define CDL_SEARCH2(head,out,elt,cmp,next) \ +do { \ + CDL_FOREACH2(head,out,next) { \ + if ((cmp(out,elt))==0) break; \ + } \ +} while (0) + +#define CDL_REPLACE_ELEM2(head, el, add, prev, next) \ +do { \ + assert((head) != NULL); \ + assert((el) != NULL); \ + assert((add) != NULL); \ + if ((el)->next == (el)) { \ + (add)->next = (add); \ + (add)->prev = (add); \ + (head) = (add); \ + } else { \ + (add)->next = (el)->next; \ + (add)->prev = (el)->prev; \ + (add)->next->prev = (add); \ + (add)->prev->next = (add); \ + if ((head) == (el)) { \ + (head) = (add); \ + } \ + } \ +} while (0) + +#define CDL_REPLACE_ELEM(head, el, add) \ + CDL_REPLACE_ELEM2(head, el, add, prev, next) + +#define CDL_PREPEND_ELEM2(head, el, add, prev, next) \ +do { \ + if (el) { \ + assert((head) != NULL); \ + assert((add) != NULL); \ + (add)->next = (el); \ + (add)->prev = (el)->prev; \ + (el)->prev = (add); \ + (add)->prev->next = (add); \ + if ((head) == (el)) { \ + (head) = (add); \ + } \ + } else { \ + CDL_APPEND2(head, add, prev, next); \ + } \ +} while (0) + +#define CDL_PREPEND_ELEM(head, el, add) \ + CDL_PREPEND_ELEM2(head, el, add, prev, next) + +#define CDL_APPEND_ELEM2(head, el, add, prev, next) \ +do { \ + if (el) { \ + assert((head) != NULL); \ + assert((add) != NULL); \ + (add)->next = (el)->next; \ + (add)->prev = (el); \ + (el)->next = (add); \ + (add)->next->prev = (add); \ + } else { \ + CDL_PREPEND2(head, add, prev, next); \ + } \ +} while (0) + +#define CDL_APPEND_ELEM(head, el, add) \ + CDL_APPEND_ELEM2(head, el, add, prev, next) + +#endif /* UTLIST_H */ diff --git a/libdap/libdap.pri b/libdap/libdap.pri new file mode 100755 index 0000000000000000000000000000000000000000..b290a6c1ecd98561c966e9d9d83b1c8653565949 --- /dev/null +++ b/libdap/libdap.pri @@ -0,0 +1,39 @@ +QMAKE_CFLAGS_DEBUG = -std=gnu11 +QMAKE_CFLAGS_RELEASE = -std=gnu11 +unix { + include(src/unix/unix.pri) +} +darwin { + include(src/darwin/darwin.pri) +} + +win32 { + include(src/win32/win32.pri) + LIBS += -lpsapi +} + +DEFINES += DAP_LOG_MT +HEADERS += $$PWD/include/dap_common.h \ + $$PWD/include/dap_config.h \ + $$PWD/include/dap_math_ops.h \ + $$PWD/include/uthash.h \ + $$PWD/include/utlist.h \ + $$PWD/include/dap_math_ops.h \ + $$PWD/include/dap_file_utils.h \ + $$PWD/src/circular_buffer.h \ + $$PWD/include/dap_circular_buffer.h \ + $$PWD/include/dap_list.h \ + $$PWD/include/dap_module.h \ + $$PWD/include/dap_strfuncs.h \ + $$PWD/include/dap_string.h + +SOURCES += $$PWD/src/dap_common.c \ + $$PWD/src/dap_config.c \ + $$PWD/src/dap_file_utils.c \ + $$PWD/src/dap_circular_buffer.c \ + $$PWD/src/dap_list.c \ + $$PWD/src/dap_module.c \ + $$PWD/src/dap_strfuncs.c \ + $$PWD/src/dap_string.c + +INCLUDEPATH += $$PWD/include diff --git a/libdap/src/android/CMakeLists.txt b/libdap/src/android/CMakeLists.txt new file mode 100755 index 0000000000000000000000000000000000000000..1e9d95846f79bcecbdddf4c3debbf0d572798269 --- /dev/null +++ b/libdap/src/android/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.0) + +project (dap_core_android C) + +file(GLOB CORE_ANDROID_SRCS *.c) +file(GLOB CORE_ANDROID_HEADERS *.h) + +add_library(${PROJECT_NAME} STATIC ${CORE_ANDROID_SRCS} ${CORE_ANDROID_HEADERS}) + +#target_link_libraries(${PROJECT_NAME} dap_core pthread) + +target_include_directories(${PROJECT_NAME} INTERFACE .) + + diff --git a/libdap/src/android/pthread_barrier.c b/libdap/src/android/pthread_barrier.c new file mode 100755 index 0000000000000000000000000000000000000000..bc99b81bae6df1276c89920527b75a566dc6d3c2 --- /dev/null +++ b/libdap/src/android/pthread_barrier.c @@ -0,0 +1,54 @@ +#if __ANDROID_API__ < __ANDROID_API_N__ +#include "pthread_barrier.h" + +#include <errno.h> + +int pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count) +{ + if(count == 0) + { + errno = EINVAL; + return -1; + } + if(pthread_mutex_init(&barrier->mutex, 0) < 0) + { + return -2; + } + if(pthread_cond_init(&barrier->cond, 0) < 0) + { + pthread_mutex_destroy(&barrier->mutex); + return -3; + } + barrier->tripCount = count; + barrier->count = 0; + + return 0; +} + +int pthread_barrier_destroy(pthread_barrier_t *barrier) +{ + pthread_cond_destroy(&barrier->cond); + pthread_mutex_destroy(&barrier->mutex); + return 0; +} + +int pthread_barrier_wait(pthread_barrier_t *barrier) +{ + pthread_mutex_lock(&barrier->mutex); + ++(barrier->count); + if(barrier->count >= barrier->tripCount) + { + barrier->count = 0; + pthread_cond_broadcast(&barrier->cond); + pthread_mutex_unlock(&barrier->mutex); + return 1; + } + else + { + pthread_cond_wait(&barrier->cond, &(barrier->mutex)); + pthread_mutex_unlock(&barrier->mutex); + return 0; + } +} + +#endif diff --git a/libdap/src/android/pthread_barrier.h b/libdap/src/android/pthread_barrier.h new file mode 100755 index 0000000000000000000000000000000000000000..ef6a37581a979536130dcef4cb6ccceab41244c9 --- /dev/null +++ b/libdap/src/android/pthread_barrier.h @@ -0,0 +1,25 @@ +#ifndef PTHREAD_BARRIER_H +#define PTHREAD_BARRIER_H + +#include <pthread.h> + +#if __ANDROID_API__ < __ANDROID_API_N__ +typedef int pthread_barrierattr_t; +typedef struct +{ + pthread_mutex_t mutex; + pthread_cond_t cond; + int count; + int tripCount; +} pthread_barrier_t; + + +int pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count); + +int pthread_barrier_destroy(pthread_barrier_t *barrier); + +int pthread_barrier_wait(pthread_barrier_t *barrier); + + +#endif // PTHREAD_BARRIER_H +#endif // PTHREAD_BARRIER_H diff --git a/libdap/src/circular_buffer.h b/libdap/src/circular_buffer.h new file mode 100755 index 0000000000000000000000000000000000000000..a7d5d8038868a7cd78f5d5afc0794dc66db4b268 --- /dev/null +++ b/libdap/src/circular_buffer.h @@ -0,0 +1,54 @@ +// +// CircularBuffer.h +// +// Created by 罗亮富(Roen)zxllf23@163.com on 14-1-14. +// Copyright (c) 2014年 All rights reserved. +// +// Note: Edited by Kurotych Anatolii + +#ifndef YYDJ_Roen_CircularBuffer_h +#define YYDJ_Roen_CircularBuffer_h +#include <stdio.h> +#include <stdlib.h> +#include <stdbool.h> + +/* + A circular buffer(circular queue, cyclic buffer or ring buffer), is a data structure that uses a single, fixed-size buffer as if it were connected end-to-end. This structure lends itself easily to buffering data streams. visit https://en.wikipedia.org/wiki/Circular_buffer to see more information. + */ + +typedef struct s_circularBuffer* CircularBuffer; + +// Construct CircularBuffer with ‘size' in byte. You must call CircularBufferFree() in balance for destruction. +extern CircularBuffer CircularBufferCreate(size_t size); + +// Destruct CircularBuffer +extern void CircularBufferFree(CircularBuffer cBuf); + +// Reset the CircularBuffer +extern void CircularBufferReset(CircularBuffer cBuf); + +//get the capacity of CircularBuffer +extern size_t CircularBufferGetCapacity(CircularBuffer cBuf); + +//get occupied data size of CircularBuffer +extern size_t CircularBufferGetDataSize(CircularBuffer cBuf); + +// Push data to the tail of a circular buffer from 'src' with 'length' size in byte. +extern void CircularBufferPush(CircularBuffer cBuf,void *src, size_t length); + +// Pop data from a circular buffer to 'dataOut' with wished 'length' size in byte,return the actual data size in byte popped out,which is less or equal to the input 'length parameter. +extern size_t CircularBufferPop(CircularBuffer cBuf, size_t length, void *dataOut); + +// Read data from a circular buffer to 'dataOut' with wished 'length' size in byte,return the actual data size in byte popped out,which is less or equal to the input 'length parameter. +extern size_t CircularBufferRead(CircularBuffer cBuf, size_t length, void *dataOut); + +#ifdef __unix__ +// Write data from a cicrular buffer to file descriptor. This is non blocking operation ( use flags MSG_DONTWAIT | MSG_NOSIGNAL ) +// if >= 0 return write data count +// <= 0 reserved for errors +extern int CircularBufferWriteInSocket(CircularBuffer cBuf, int sockfd); +#endif + +//for test purpose, print the circular buffer's data content by printf(...); the 'hex' parameters indicates that if the data should be printed in asscii string or hex data format. +extern void CircularBufferPrint(CircularBuffer cBuf, bool hex); +#endif diff --git a/libdap/src/common/int-util.h b/libdap/src/common/int-util.h new file mode 100755 index 0000000000000000000000000000000000000000..7cec571ad8364146acef48ac744d111ca7165deb --- /dev/null +++ b/libdap/src/common/int-util.h @@ -0,0 +1,249 @@ +// Copyright (c) 2014-2017, The Monero Project +// +// 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 copyright holder 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 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. +// +// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers + +#pragma once + +#include <assert.h> +#include <stdbool.h> +#include <stdint.h> +#include <string.h> +#include <sys/param.h> + +#if defined(__ANDROID__) +#include <byteswap.h> +#endif + +#if defined(__sun) && defined(__SVR4) +#include <endian.h> +#endif + +#if defined(_MSC_VER) +#include <stdlib.h> + +static inline uint32_t rol32(uint32_t x, int r) { + static_assert(sizeof(uint32_t) == sizeof(unsigned int), "this code assumes 32-bit integers"); + return _rotl(x, r); +} + +static inline uint64_t rol64(uint64_t x, int r) { + return _rotl64(x, r); +} + +#else + +static inline uint32_t rol32(uint32_t x, int r) { + return (x << (r & 31)) | (x >> (-r & 31)); +} + +static inline uint64_t rol64(uint64_t x, int r) { + return (x << (r & 63)) | (x >> (-r & 63)); +} + +#endif + +static inline uint64_t hi_dword(uint64_t val) { + return val >> 32; +} + +static inline uint64_t lo_dword(uint64_t val) { + return val & 0xFFFFFFFF; +} + +static inline uint64_t mul128(uint64_t multiplier, uint64_t multiplicand, uint64_t* product_hi) { + // multiplier = ab = a * 2^32 + b + // multiplicand = cd = c * 2^32 + d + // ab * cd = a * c * 2^64 + (a * d + b * c) * 2^32 + b * d + uint64_t a = hi_dword(multiplier); + uint64_t b = lo_dword(multiplier); + uint64_t c = hi_dword(multiplicand); + uint64_t d = lo_dword(multiplicand); + + uint64_t ac = a * c; + uint64_t ad = a * d; + uint64_t bc = b * c; + uint64_t bd = b * d; + + uint64_t adbc = ad + bc; + uint64_t adbc_carry = adbc < ad ? 1 : 0; + + // multiplier * multiplicand = product_hi * 2^64 + product_lo + uint64_t product_lo = bd + (adbc << 32); + uint64_t product_lo_carry = product_lo < bd ? 1 : 0; + *product_hi = ac + (adbc >> 32) + (adbc_carry << 32) + product_lo_carry; + assert(ac <= *product_hi); + + return product_lo; +} + +static inline uint64_t div_with_reminder(uint64_t dividend, uint32_t divisor, uint32_t* remainder) { + dividend |= ((uint64_t)*remainder) << 32; + *remainder = dividend % divisor; + return dividend / divisor; +} + +// Long division with 2^32 base +static inline uint32_t div128_32(uint64_t dividend_hi, uint64_t dividend_lo, uint32_t divisor, uint64_t* quotient_hi, uint64_t* quotient_lo) { + uint64_t dividend_dwords[4]; + uint32_t remainder = 0; + + dividend_dwords[3] = hi_dword(dividend_hi); + dividend_dwords[2] = lo_dword(dividend_hi); + dividend_dwords[1] = hi_dword(dividend_lo); + dividend_dwords[0] = lo_dword(dividend_lo); + + *quotient_hi = div_with_reminder(dividend_dwords[3], divisor, &remainder) << 32; + *quotient_hi |= div_with_reminder(dividend_dwords[2], divisor, &remainder); + *quotient_lo = div_with_reminder(dividend_dwords[1], divisor, &remainder) << 32; + *quotient_lo |= div_with_reminder(dividend_dwords[0], divisor, &remainder); + + return remainder; +} + +#define IDENT32(x) ((uint32_t) (x)) +#define IDENT64(x) ((uint64_t) (x)) + +#define SWAP32(x) ((((uint32_t) (x) & 0x000000ff) << 24) | \ + (((uint32_t) (x) & 0x0000ff00) << 8) | \ + (((uint32_t) (x) & 0x00ff0000) >> 8) | \ + (((uint32_t) (x) & 0xff000000) >> 24)) +#define SWAP64(x) ((((uint64_t) (x) & 0x00000000000000ff) << 56) | \ + (((uint64_t) (x) & 0x000000000000ff00) << 40) | \ + (((uint64_t) (x) & 0x0000000000ff0000) << 24) | \ + (((uint64_t) (x) & 0x00000000ff000000) << 8) | \ + (((uint64_t) (x) & 0x000000ff00000000) >> 8) | \ + (((uint64_t) (x) & 0x0000ff0000000000) >> 24) | \ + (((uint64_t) (x) & 0x00ff000000000000) >> 40) | \ + (((uint64_t) (x) & 0xff00000000000000) >> 56)) + +static inline uint32_t ident32(uint32_t x) { return x; } +static inline uint64_t ident64(uint64_t x) { return x; } + +#ifndef __OpenBSD__ +# if defined(__ANDROID__) && defined(__swap32) && !defined(swap32) +# define swap32 __swap32 +# elif !defined(swap32) +static inline uint32_t swap32(uint32_t x) { + x = ((x & 0x00ff00ff) << 8) | ((x & 0xff00ff00) >> 8); + return (x << 16) | (x >> 16); +} +# endif +# if defined(__ANDROID__) && defined(__swap64) && !defined(swap64) +# define swap64 __swap64 +# elif !defined(swap64) +static inline uint64_t swap64(uint64_t x) { + x = ((x & 0x00ff00ff00ff00ff) << 8) | ((x & 0xff00ff00ff00ff00) >> 8); + x = ((x & 0x0000ffff0000ffff) << 16) | ((x & 0xffff0000ffff0000) >> 16); + return (x << 32) | (x >> 32); +} +# endif +#endif /* __OpenBSD__ */ + +#if defined(__GNUC__) +#define UNUSED __attribute__((unused)) +#else +#define UNUSED +#endif +static inline void mem_inplace_ident(void *mem UNUSED, size_t n UNUSED) { } +#undef UNUSED + +static inline void mem_inplace_swap32(void *mem, size_t n) { + size_t i; + for (i = 0; i < n; i++) { + ((uint32_t *) mem)[i] = swap32(((const uint32_t *) mem)[i]); + } +} +static inline void mem_inplace_swap64(void *mem, size_t n) { + size_t i; + for (i = 0; i < n; i++) { + ((uint64_t *) mem)[i] = swap64(((const uint64_t *) mem)[i]); + } +} + +static inline void memcpy_ident32(void *dst, const void *src, size_t n) { + memcpy(dst, src, 4 * n); +} +static inline void memcpy_ident64(void *dst, const void *src, size_t n) { + memcpy(dst, src, 8 * n); +} + +static inline void memcpy_swap32(void *dst, const void *src, size_t n) { + size_t i; + for (i = 0; i < n; i++) { + ((uint32_t *) dst)[i] = swap32(((const uint32_t *) src)[i]); + } +} +static inline void memcpy_swap64(void *dst, const void *src, size_t n) { + size_t i; + for (i = 0; i < n; i++) { + ((uint64_t *) dst)[i] = swap64(((const uint64_t *) src)[i]); + } +} + +#if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN) || !defined(BIG_ENDIAN) +static_assert(false, "BYTE_ORDER is undefined. Perhaps, GNU extensions are not enabled"); +#endif + +#if BYTE_ORDER == LITTLE_ENDIAN +#define SWAP32LE IDENT32 +#define SWAP32BE SWAP32 +#define swap32le ident32 +#define swap32be swap32 +#define mem_inplace_swap32le mem_inplace_ident +#define mem_inplace_swap32be mem_inplace_swap32 +#define memcpy_swap32le memcpy_ident32 +#define memcpy_swap32be memcpy_swap32 +#define SWAP64LE IDENT64 +#define SWAP64BE SWAP64 +#define swap64le ident64 +#define swap64be swap64 +#define mem_inplace_swap64le mem_inplace_ident +#define mem_inplace_swap64be mem_inplace_swap64 +#define memcpy_swap64le memcpy_ident64 +#define memcpy_swap64be memcpy_swap64 +#endif + +#if BYTE_ORDER == BIG_ENDIAN +#define SWAP32BE IDENT32 +#define SWAP32LE SWAP32 +#define swap32be ident32 +#define swap32le swap32 +#define mem_inplace_swap32be mem_inplace_ident +#define mem_inplace_swap32le mem_inplace_swap32 +#define memcpy_swap32be memcpy_ident32 +#define memcpy_swap32le memcpy_swap32 +#define SWAP64BE IDENT64 +#define SWAP64LE SWAP64 +#define swap64be ident64 +#define swap64le swap64 +#define mem_inplace_swap64be mem_inplace_ident +#define mem_inplace_swap64le mem_inplace_swap64 +#define memcpy_swap64be memcpy_ident64 +#define memcpy_swap64le memcpy_swap64 +#endif diff --git a/libdap/src/common/memwipe.c b/libdap/src/common/memwipe.c new file mode 100755 index 0000000000000000000000000000000000000000..da7e9f34611cd84638ae2f98c9e0dcb7e370e4e5 --- /dev/null +++ b/libdap/src/common/memwipe.c @@ -0,0 +1,106 @@ +// Copyright (c) 2017, The Monero Project +// +// 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 copyright holder 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 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. +// +// Parts of this file Copyright (c) 2009-2015 The Bitcoin Core developers + +#define __STDC_WANT_LIB_EXT1__ 1 +#include <string.h> +#include <stdlib.h> +#ifdef HAVE_EXPLICIT_BZERO +#include <strings.h> +#endif +#include "memwipe.h" + +#if defined(_MSC_VER) +#define SCARECROW \ + __asm; +#else +#define SCARECROW \ + __asm__ __volatile__("" : : "r"(ptr) : "memory"); +#endif + +#ifdef HAVE_MEMSET_S + +void *memwipe(void *ptr, size_t n) +{ + if (memset_s(ptr, n, 0, n)) + { + abort(); + } + SCARECROW // might as well... + return ptr; +} + +#elif defined HAVE_EXPLICIT_BZERO + +void *memwipe(void *ptr, size_t n) +{ + explicit_bzero(ptr, n); + SCARECROW + return ptr; +} + +#else + +/* The memory_cleanse implementation is taken from Bitcoin */ + +/* Compilers have a bad habit of removing "superfluous" memset calls that + * are trying to zero memory. For example, when memset()ing a buffer and + * then free()ing it, the compiler might decide that the memset is + * unobservable and thus can be removed. + * + * Previously we used OpenSSL which tried to stop this by a) implementing + * memset in assembly on x86 and b) putting the function in its own file + * for other platforms. + * + * This change removes those tricks in favour of using asm directives to + * scare the compiler away. As best as our compiler folks can tell, this is + * sufficient and will continue to be so. + * + * Adam Langley <agl@google.com> + * Commit: ad1907fe73334d6c696c8539646c21b11178f20f + * BoringSSL (LICENSE: ISC) + */ +static void memory_cleanse(void *ptr, size_t len) +{ + memset(ptr, 0, len); + + /* As best as we can tell, this is sufficient to break any optimisations that + might try to eliminate "superfluous" memsets. If there's an easy way to + detect memset_s, it would be better to use that. */ + SCARECROW +} + +void *memwipe(void *ptr, size_t n) +{ + memory_cleanse(ptr, n); + SCARECROW + return ptr; +} + +#endif diff --git a/libdap/src/common/memwipe.h b/libdap/src/common/memwipe.h new file mode 100755 index 0000000000000000000000000000000000000000..46cd131f3d53799b24387ff9a177fa229b28252a --- /dev/null +++ b/libdap/src/common/memwipe.h @@ -0,0 +1,36 @@ +// Copyright (c) 2017, The Monero Project +// Copyrught (c) 2018, DapCash Project +// +// 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 copyright holder 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 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. +// +// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers +#ifndef _MEMWIPE_H_ +#define _MEMWIPE_H_ + +void *memwipe(void *src, size_t n); + +#endif \ No newline at end of file diff --git a/libdap/src/core.pri b/libdap/src/core.pri new file mode 100755 index 0000000000000000000000000000000000000000..14172b607b0058e8c19c58dd47781a7ed443192c --- /dev/null +++ b/libdap/src/core.pri @@ -0,0 +1,31 @@ +unix { + include(unix/unix.pri) +} +darwin { + include(darwin/darwin.pri) +} + +HEADERS += $$PWD/dap_common.h \ + $$PWD/dap_config.h \ + $$PWD/dap_math_ops.h \ + $$PWD/uthash.h \ + $$PWD/utlist.h \ + $$PWD/dap_math_ops.h \ + $$PWD/dap_file_utils.h \ + $$PWD/circular_buffer.h \ + $$PWD/dap_circular_buffer.h \ + $$PWD/dap_list.h \ + $$PWD/dap_module.h \ + $$PWD/dap_strfuncs.h \ + $$PWD/dap_string.h + +SOURCES += $$PWD/dap_common.c \ + $$PWD/dap_config.c \ + $$PWD/dap_file_utils.c \ + $$PWD/dap_circular_buffer.c \ + $$PWD/dap_list.c \ + $$PWD/dap_module.c \ + $$PWD/dap_strfuncs.c \ + $$PWD/dap_string.c + +INCLUDEPATH += $$PWD diff --git a/libdap/src/dap_circular_buffer.c b/libdap/src/dap_circular_buffer.c new file mode 100755 index 0000000000000000000000000000000000000000..254571627ad81647e8f6a7d42c5d2699b9026173 --- /dev/null +++ b/libdap/src/dap_circular_buffer.c @@ -0,0 +1,346 @@ +// +// CircularBuffer.c +// +// Created by 罗亮富(Roen zxllf23@163.com) on 14-1-14. +// Copyright (c) 2014年 All rights reserved. +// +// Note: Edited by Kurotych Anatolii + + +#include "dap_circular_buffer.h" +#include <string.h> +#include <errno.h> + +#include "dap_common.h" + +#define LOG_TAG "circular_buffer" + +struct s_circularBuffer{ + + size_t capacity; //capacity bytes size + size_t dataSize; //occupied data size + size_t tailOffset; //head offset, the oldest byte position offset + size_t headOffset; //tail offset, the lastest byte position offset + uint8_t *buffer; + +}; + +extern circular_buffer_t circular_buffer_create(size_t size) +{ + size_t totalSize = sizeof(struct s_circularBuffer) + size; + void *p = malloc(totalSize); + circular_buffer_t buffer = (circular_buffer_t)p; + buffer->buffer = p + sizeof(struct s_circularBuffer); + buffer->capacity = size; + circular_buffer_reset(buffer); + return buffer; +} + +void circular_buffer_free(circular_buffer_t cBuf) +{ + circular_buffer_reset(cBuf); + cBuf->capacity = 0; + cBuf->dataSize = 0; + cBuf->buffer = NULL; + free(cBuf); +} + +void circular_buffer_reset(circular_buffer_t cBuf) +{ + cBuf->headOffset = -1; + cBuf->tailOffset = -1; + cBuf->dataSize = 0; +} + +size_t circular_buffer_get_capacity(circular_buffer_t cBuf) +{ + return cBuf->capacity; +} + +size_t circular_buffer_get_data_size(circular_buffer_t cBuf) +{ + return cBuf->dataSize; +} + +void circular_buffer_push(circular_buffer_t cBuf, const void *src, size_t length) +{ + if(length == 0) + return; + + size_t writableLen = length; + const void *pSrc = src; + + if(writableLen > cBuf->capacity)//in case of size overflow + { + size_t overFlowLen = writableLen - cBuf->capacity; + writableLen = cBuf->capacity; + pSrc = src + overFlowLen; + } + + + bool resetHead = false; + //in case the circle buffer won't be full after adding the data + if(cBuf->tailOffset+writableLen < cBuf->capacity) + { + memcpy(&cBuf->buffer[cBuf->tailOffset + 1], pSrc, writableLen); + + if((cBuf->tailOffset < cBuf->headOffset) && (cBuf->tailOffset+writableLen >= cBuf->headOffset) ) + resetHead = true; + + cBuf->tailOffset += writableLen; + } + else//in case the circle buffer will be overflow after adding the data + { + size_t remainSize = cBuf->capacity - cBuf->tailOffset - 1; //the remain size + memcpy(&cBuf->buffer[cBuf->tailOffset+1], pSrc, remainSize); + + size_t coverSize = writableLen - remainSize; //size of data to be covered from the beginning + memcpy(cBuf->buffer, pSrc+remainSize, coverSize); + + if(cBuf->tailOffset < cBuf->headOffset) + resetHead = true; + else + { + if(coverSize>cBuf->headOffset) + resetHead = true; + } + + cBuf->tailOffset = coverSize - 1; + } + + if(cBuf->headOffset == (size_t)-1) + cBuf->headOffset = 0; + + if(resetHead) + { + if(cBuf->tailOffset+1 < cBuf->capacity) + cBuf->headOffset = cBuf->tailOffset + 1; + else + cBuf->headOffset = 0; + + cBuf->dataSize = cBuf->capacity; + } + else + { + if(cBuf->tailOffset >= cBuf->headOffset) + cBuf->dataSize = cBuf->tailOffset - cBuf->headOffset + 1; + else + cBuf->dataSize = cBuf->capacity - (cBuf->headOffset - cBuf->tailOffset - 1); + } +} + +#ifdef __unix__ +#include <sys/types.h> +#include <sys/socket.h> + +int circular_buffer_write_In_socket(circular_buffer_t cBuf, int sockfd) +{ + if(cBuf->dataSize == 0) { + return 0; + } + + ssize_t rdLen = -1; + + if(cBuf->headOffset <= cBuf->tailOffset) + { + rdLen = send(sockfd, + &cBuf->buffer[cBuf->headOffset], + cBuf->dataSize, MSG_DONTWAIT | MSG_NOSIGNAL | MSG_DONTROUTE); + if(rdLen < 0) { + log_it(L_ERROR, "Can't write data in socket. %s", strerror(errno)); + return -1; + } + + cBuf->headOffset += rdLen; + if(cBuf->headOffset > cBuf->tailOffset) + { + cBuf->headOffset = -1; + cBuf->tailOffset = -1; + } + + cBuf->dataSize -= rdLen; + } + else + { + if(cBuf->headOffset + cBuf->dataSize <= cBuf->capacity) + { + rdLen = send(sockfd, + &cBuf->buffer[cBuf->headOffset], + cBuf->dataSize, MSG_DONTWAIT | MSG_NOSIGNAL); + + if(rdLen < 0) { + log_it(L_ERROR, "Can't write data in socket. %s", strerror(errno)); + return -1; + } + + cBuf->headOffset += rdLen; + if(cBuf->headOffset == cBuf->capacity) + cBuf->headOffset = 0; + } + else + { + size_t countBytesToEnd = cBuf->capacity - cBuf->headOffset; + rdLen = send(sockfd, + &cBuf->buffer[cBuf->headOffset], + countBytesToEnd, MSG_DONTWAIT | MSG_NOSIGNAL); + // log_it(L_DEBUG, "Write in socket: %s", &cBuf->buffer[cBuf->headOffset]); + if(rdLen < 0) { + log_it(L_ERROR, "Can't write data in socket. %s", strerror(errno)); + return -1; + } + + if(rdLen < (ssize_t)countBytesToEnd) { + log_it(L_WARNING, "rdLen < countBytesToEnd"); + circular_buffer_pop(cBuf, rdLen, NULL); + return rdLen; + } + + cBuf->dataSize -= countBytesToEnd; + cBuf->headOffset = 0; + cBuf->tailOffset = cBuf->dataSize - 1; + + ssize_t rdLen2 = send(sockfd, + cBuf->buffer, + cBuf->dataSize, MSG_DONTWAIT | MSG_NOSIGNAL); + + if(rdLen2 < 0) { + log_it(L_ERROR, "Can't write data in socket. %s", strerror(errno)); + return rdLen; + } + + cBuf->headOffset = rdLen2; + if(cBuf->headOffset > cBuf->tailOffset) + { + cBuf->headOffset = -1; + cBuf->tailOffset = -1; + cBuf->dataSize = 0; + } + return countBytesToEnd + rdLen2; + } + } + + return rdLen; + +} + +#endif + +size_t inter_circularBuffer_read(circular_buffer_t cBuf, size_t length, void *dataOut, bool resetHead) +{ + if(cBuf->dataSize == 0 || length == 0) + return 0; + + size_t rdLen = length; + + if(cBuf->dataSize < rdLen) + rdLen = cBuf->dataSize; + + + if(cBuf->headOffset <= cBuf->tailOffset) + { + if(dataOut) + memcpy(dataOut, &cBuf->buffer[cBuf->headOffset], rdLen); + + if(resetHead) + { + cBuf->headOffset += rdLen; + if(cBuf->headOffset > cBuf->tailOffset) + { + cBuf->headOffset = -1; + cBuf->tailOffset = -1; + } + } + } + else + { + if(cBuf->headOffset+rdLen <= cBuf->capacity) + { + if(dataOut) + memcpy(dataOut, &cBuf->buffer[cBuf->headOffset], rdLen); + + if(resetHead) + { + cBuf->headOffset += rdLen; + if(cBuf->headOffset == cBuf->capacity) + cBuf->headOffset = 0; + } + } + else + { + size_t frg1Len = cBuf->capacity - cBuf->headOffset; + if(dataOut) + memcpy(dataOut, &cBuf->buffer[cBuf->headOffset], frg1Len); + + size_t frg2len = rdLen - frg1Len; + if(dataOut) + memcpy(dataOut+frg1Len, cBuf->buffer, frg2len); + + if(resetHead) + { + cBuf->headOffset = frg2len; + if(cBuf->headOffset > cBuf->tailOffset) + { + cBuf->headOffset = -1; + cBuf->tailOffset = -1; + } + } + } + } + + if(resetHead) + cBuf->dataSize -= rdLen; + + return rdLen; +} + + +size_t circular_buffer_pop(circular_buffer_t cBuf, size_t length, void *dataOut) +{ + return inter_circularBuffer_read(cBuf,length,dataOut,true); +} + +size_t circular_buffer_read(circular_buffer_t cBuf, size_t length, void *dataOut) +{ + return inter_circularBuffer_read(cBuf,length,dataOut,false); +} + + +//print circular buffer's content into str, +void circular_buffer_print(circular_buffer_t cBuf, bool hex) +{ + uint8_t *b = cBuf->buffer; + size_t cSize = circular_buffer_get_capacity(cBuf); + char *str = malloc(2*cSize+1); + + char c; + + for(size_t i=0; i<cSize; i++) + { + if(circular_buffer_get_data_size(cBuf) == 0) + { + c = '_'; + } + else if (cBuf->tailOffset < cBuf->headOffset) + { + if(i>cBuf->tailOffset && i<cBuf->headOffset) + c = '_'; + else + c = b[i]; + } + else + { + if(i>cBuf->tailOffset || i<cBuf->headOffset) + c = '_'; + else + c = b[i]; + } + if(hex) + dap_sprintf(str+i*2, "%02X|",c); + else + dap_sprintf(str+i*2, "%c|",c); + } + + printf("CircularBuffer: %s <size %zu dataSize:%zu>\n",str,circular_buffer_get_capacity(cBuf),circular_buffer_get_data_size(cBuf)); + + free(str); +} diff --git a/libdap/src/dap_common.c b/libdap/src/dap_common.c new file mode 100755 index 0000000000000000000000000000000000000000..cfbd52714978753e5f265e919c3f617aa5a9c1fd --- /dev/null +++ b/libdap/src/dap_common.c @@ -0,0 +1,924 @@ +/* + * Authors: + * Dmitriy A. Gearasimov <kahovski@gmail.com> + * DeM Labs Inc. https://demlabs.net + * DeM Labs Open source community https://gitlab.demlabs.net/cellframe + * Copyright (c) 2017-2019 + * All rights reserved. + + This file is part of DAP (Deus Applications Prototypes) the open source project + + DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DAP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with any DAP based project. If not, see <http://www.gnu.org/licenses/>. +*/ +#include <stdio.h> +#include <stdlib.h> +#include <time.h> /* 'nanosleep' */ +#include <unistd.h> /* 'pipe', 'read', 'write' */ +#include <string.h> +#include <stdarg.h> +#include <assert.h> +#include <stdint.h> +#include <stdatomic.h> +#include "utlist.h" +#include <errno.h> + +#ifdef DAP_OS_ANDROID + #include <android/log.h> +#endif + +#ifndef _WIN32 + + #include <pthread.h> + #include <syslog.h> + #include <signal.h> + +#else // WIN32 + + #include <stdlib.h> + #include <windows.h> + #include <process.h> + #include <pthread.h> + + #include "win32/dap_console_manager.h" + + #define popen _popen + #define pclose _pclose + #define pipe(pfds) _pipe(pfds, 4096, 0x8000) + +#endif + +#include "dap_common.h" +#include "dap_strfuncs.h" +#include "dap_string.h" +#include "dap_list.h" +#include "dap_file_utils.h" +#include "dap_lut.h" + +#define DAP_LOG_USE_SPINLOCK 0 +#define DAP_LOG_HISTORY 1 + +#define LAST_ERROR_MAX 255 + +#define LOG_TAG "dap_common" + +static const char *s_log_level_tag[ 16 ] = { + " [DBG] ", // L_DEBUG = 0 + " [INF] ", // L_INFO = 1, + " [ * ] ", // L_NOTICE = 2, + " [MSG] ", // L_MESSAGE = 3, + " [DAP] ", // L_DAP = 4, + " [WRN] ", // L_WARNING = 5, + " [ATT] ", // L_ATT = 6, + " [ERR] ", // L_ERROR = 7, + " [ ! ] ", // L_CRITICAL = 8, + " [---] ", // = 9 + " [---] ", // = 10 + " [---] ", // = 11 + " [---] ", // = 12 + " [---] ", // = 13 + " [---] ", // = 14 + " [---] ", // = 15 +}; + +const char *s_ansi_seq_color[ 16 ] = { + + "\x1b[0;37;40m", // L_DEBUG = 0 + "\x1b[1;32;40m", // L_INFO = 2, + "\x1b[0;32;40m", // L_NOTICE = 1, + "\x1b[1;33;40m", // L_MESSAGE = 3, + "\x1b[0;36;40m", // L_DAP = 4, + "\x1b[1;35;40m", // L_WARNING = 5, + "\x1b[1;36;40m", // L_ATT = 6, + "\x1b[1;31;40m", // L_ERROR = 7, + "\x1b[1;37;41m", // L_CRITICAL = 8, + "", // = 9 + "", // = 10 + "", // = 11 + "", // = 12 + "", // = 13 + "", // = 14 + "", // = 15 +}; + +static unsigned int s_ansi_seq_color_len[16] = {0}; + +#ifdef _WIN32 + WORD log_level_colors[ 16 ] = { + 7, // L_DEBUG + 10, // L_INFO + 2, // L_NOTICE + 11, // L_MESSAGE + 9, // L_DAP + 13, // L_WARNING + 14, // L_ATT + 12, // L_ERROR + (12 << 4) + 15, // L_CRITICAL + 7, + 7, + 7, + 7, + 7, + 7, + 7 + }; +#endif + +static volatile bool s_log_term_signal = false; +char* g_sys_dir_path = NULL; + +static char s_last_error[LAST_ERROR_MAX] = {'\0'}, + s_log_file_path[MAX_PATH] = {'\0'}, + s_log_tag_fmt_str[10] = {'\0'}; + +static enum dap_log_level s_dap_log_level = L_DEBUG; +static FILE *s_log_file = NULL; + +#if DAP_LOG_USE_SPINLOCK + static dap_spinlock_t log_spinlock; +#else + static pthread_mutex_t s_log_mutex = PTHREAD_MUTEX_INITIALIZER; +#endif +static pthread_cond_t s_log_cond = PTHREAD_COND_INITIALIZER; +static volatile int s_log_count = 0; + +static pthread_t s_log_thread = 0; +static void *s_log_thread_proc(void *arg); + +typedef struct log_str_t { + char str[1000]; + unsigned int offset; + struct log_str_t *prev, *next; +} log_str_t; + +static log_str_t *s_log_buffer = NULL; +static char* s_appname = NULL; + +DAP_STATIC_INLINE void s_update_log_time(char *a_datetime_str) { + time_t t = time(NULL); + struct tm *tmptime = localtime(&t); + strftime(a_datetime_str, 32, "[%x-%X]", tmptime); +} + +/** + * @brief set_log_level Sets the logging level + * @param[in] ll logging level + */ +void dap_log_level_set( enum dap_log_level a_ll ) { + s_dap_log_level = a_ll; +} + +/** + * @brief dap_get_appname + * @return + */ +const char * dap_get_appname() +{ + return s_appname?s_appname: "dap"; +} + +/** + * @brief dap_set_appname + * @param a_appname + * @return + */ +void dap_set_appname(const char * a_appname) +{ + s_appname = dap_strdup(a_appname); + +} + +enum dap_log_level dap_log_level_get( void ) { + return s_dap_log_level ; +} + +/** + * @brief dap_set_log_tag_width Sets the length of the label + * @param[in] width Length not more than 99 + */ +void dap_set_log_tag_width(size_t a_width) { + + if (a_width > 99) { + dap_fprintf(stderr,"Can't set width %zd", a_width); + return; + } + dap_snprintf(s_log_tag_fmt_str,sizeof (s_log_tag_fmt_str), "[%%%zds]\t",a_width); +} + +/** + * @brief dap_common_init initialise + * @param[in] a_log_file + * @return + */ +int dap_common_init( const char *a_console_title, const char *a_log_filename ) { + + // init randomer + srand( (unsigned int)time(NULL) ); + (void) a_console_title; + strncpy( s_log_tag_fmt_str, "[%s]\t",sizeof (s_log_tag_fmt_str)); + for (int i = 0; i < 16; ++i) + s_ansi_seq_color_len[i] =(unsigned int) strlen(s_ansi_seq_color[i]); + if ( a_log_filename ) { + s_log_file = fopen( a_log_filename , "a" ); + if( s_log_file == NULL) + s_log_file = fopen( a_log_filename , "w" ); + if ( s_log_file == NULL ) { + dap_fprintf( stderr, "Can't open log file %s to append\n", a_log_filename ); + return -1; + } + dap_stpcpy(s_log_file_path, a_log_filename); + } + pthread_create( &s_log_thread, NULL, s_log_thread_proc, NULL ); + return 0; +} + +#ifdef WIN32 +int wdap_common_init( const char *a_console_title, const wchar_t *a_log_filename ) { + + // init randomer + srand( (unsigned int)time(NULL) ); + (void) a_console_title; + strncpy( s_log_tag_fmt_str, "[%s]\t",sizeof (s_log_tag_fmt_str)); + for (int i = 0; i < 16; ++i) + s_ansi_seq_color_len[i] =(unsigned int) strlen(s_ansi_seq_color[i]); + if ( a_log_filename ) { + s_log_file = _wfopen( a_log_filename , L"a" ); + if( s_log_file == NULL) + s_log_file = _wfopen( a_log_filename , L"w" ); + if ( s_log_file == NULL ) { + dap_fprintf( stderr, "Can't open log file %s to append\n", a_log_filename ); + return -1; + } + //dap_stpcpy(s_log_file_path, a_log_filename); + } + pthread_create( &s_log_thread, NULL, s_log_thread_proc, NULL ); + return 0; +} + +#endif + +/** + * @brief dap_common_deinit Deinitialise + */ +void dap_common_deinit( ) { + pthread_mutex_lock(&s_log_mutex); + s_log_term_signal = true; + pthread_cond_signal(&s_log_cond); + pthread_mutex_unlock(&s_log_mutex); + pthread_join(s_log_thread, NULL); + if (s_log_file) + fclose(s_log_file); +} + + +/** + * @brief s_log_thread_proc + * @param arg + * @return + */ +static void *s_log_thread_proc(void *arg) { + (void) arg; + for ( ; !s_log_term_signal; ) { + pthread_mutex_lock(&s_log_mutex); + for ( ; s_log_count == 0; ) { + pthread_cond_wait(&s_log_cond, &s_log_mutex); + if (s_log_term_signal) { + break; + } + } + if (s_log_count) { + log_str_t *elem, *tmp; + if(s_log_file) { + if(!dap_file_test(s_log_file_path)) { + fclose(s_log_file); + s_log_file = fopen(s_log_file_path, "a"); + } + } + DL_FOREACH_SAFE(s_log_buffer, elem, tmp) { + if(s_log_file) + fwrite(elem->str + elem->offset, strlen(elem->str) - elem->offset, 1, s_log_file); + fwrite(elem->str, strlen(elem->str), 1, stdout); + + DL_DELETE(s_log_buffer, elem); + DAP_FREE(elem); + --s_log_count; + + if(s_log_file) + fflush(s_log_file); + fflush(stdout); + } + } + pthread_mutex_unlock(&s_log_mutex); + } + pthread_exit(NULL); +} + +/** + * @brief _log_it + * @param log_tag + * @param ll + * @param fmt + */ +void _log_it(const char *a_log_tag, enum dap_log_level a_ll, const char *a_fmt, ...) { + if ( a_ll < s_dap_log_level || a_ll >= 16 || !a_log_tag ) + return; + log_str_t *l_log_string = DAP_NEW_Z(log_str_t); + strncpy(l_log_string->str, s_ansi_seq_color[a_ll],sizeof (l_log_string->str)-1); + l_log_string->offset = s_ansi_seq_color_len[a_ll]; + s_update_log_time(l_log_string->str + l_log_string->offset); + size_t offset = strlen(l_log_string->str); + offset += dap_snprintf(l_log_string->str + offset, sizeof (l_log_string->str) -offset, "%s[%s%s", s_log_level_tag[a_ll], a_log_tag, "] "); + va_list va; + va_start( va, a_fmt ); + offset += dap_vsnprintf(l_log_string->str + offset,sizeof (l_log_string->str) -offset, a_fmt, va); + va_end( va ); + memcpy(&l_log_string->str[offset], "\n", 1); + pthread_mutex_lock(&s_log_mutex); + DL_APPEND(s_log_buffer, l_log_string); + ++s_log_count; + pthread_cond_signal(&s_log_cond); + pthread_mutex_unlock(&s_log_mutex); +} + +/** + * @brief dap_log_get_item + * @param a_start_time + * @param a_limit + * @return + */ +char *dap_log_get_item(time_t a_start_time, int a_limit) +{ + return NULL; // TODO +} + +/** + * @brief log_error Error log + * @return + */ +const char *log_error() +{ + return s_last_error; +} + + +#if 1 +#define INT_DIGITS 19 /* enough for 64 bit integer */ + +/** + * @brief itoa The function converts an integer num to a string equivalent and places the result in a string + * @param[in] i number + * @return + */ +char *dap_itoa(int i) +{ + /* Room for INT_DIGITS digits, - and '\0' */ + static char buf[INT_DIGITS + 2]; + char *p = buf + INT_DIGITS + 1; /* points to terminating '\0' */ + if (i >= 0) { + do { + *--p = '0' + (i % 10); + i /= 10; + } while (i != 0); + return p; + } + else { /* i < 0 */ + do { + *--p = '0' - (i % 10); + i /= 10; + } while (i != 0); + *--p = '-'; + } + return p; +} + +#endif + + +/** + * @brief time_to_rfc822 Convert time_t to string with RFC822 formatted date and time + * @param[out] out Output buffer + * @param[out] out_size_mac Maximum size of output buffer + * @param[in] t UNIX time + * @return Length of resulting string if ok or lesser than zero if not + */ +int dap_time_to_str_rfc822(char * out, size_t out_size_max, time_t t) +{ + struct tm *tmp; + tmp = localtime( &t ); + + if ( tmp == NULL ) { + log_it( L_ERROR, "Can't convert data from unix fromat to structured one" ); + return -2; + } + + int ret; + + #ifndef _WIN32 + ret = strftime( out, out_size_max, "%a, %d %b %y %T %z", tmp ); + #else + ret = strftime( out, out_size_max, "%a, %d %b %y %H:%M:%S", tmp ); + #endif + + if ( !ret ) { + log_it( L_ERROR, "Can't print formatted time in string" ); + return -1; + } + + return ret; +} + +/** + * @brief Calculate diff of two struct timespec + * @param[in] a_start - first time + * @param[in] a_stop - second time + * @param[out] a_result - diff time, may be NULL + * @return diff time in millisecond + */ +int timespec_diff(struct timespec *a_start, struct timespec *a_stop, struct timespec *a_result) +{ + if(!a_start || !a_stop) + return 0; + if(!a_result) { + struct timespec l_time_tmp = { 0 }; + a_result = &l_time_tmp; + } + if((a_stop->tv_nsec - a_start->tv_nsec) < 0) { + a_result->tv_sec = a_stop->tv_sec - a_start->tv_sec - 1; + a_result->tv_nsec = a_stop->tv_nsec - a_start->tv_nsec + 1000000000; + } else { + a_result->tv_sec = a_stop->tv_sec - a_start->tv_sec; + a_result->tv_nsec = a_stop->tv_nsec - a_start->tv_nsec; + } + + return (a_result->tv_sec * 1000 + a_result->tv_nsec / 1000000); +} + +#define BREAK_LATENCY 1 + +static int breaker_set[2] = { -1, -1 }; +static int initialized = 0; +#ifndef _WIN32 +static struct timespec break_latency = { 0, BREAK_LATENCY * 1000 * 1000 }; +#endif + +int get_select_breaker( ) +{ + if ( !initialized ) { + if ( pipe(breaker_set) < 0 ) + return -1; + else + initialized = 1; + } + + return breaker_set[0]; +} + +int send_select_break( ) +{ + if ( !initialized ) + return -1; + + char buffer[1]; + + #ifndef _WIN32 + if ( write(breaker_set[1], "\0", 1) <= 0 ) + #else + if ( _write(breaker_set[1], "\0", 1) <= 0 ) + #endif + return -1; + + #ifndef _WIN32 + nanosleep( &break_latency, NULL ); + #else + Sleep( BREAK_LATENCY ); + #endif + + #ifndef _WIN32 + if ( read(breaker_set[0], buffer, 1) <= 0 || buffer[0] != '\0' ) + #else + if ( _read(breaker_set[0], buffer, 1) <= 0 || buffer[0] != '\0' ) + #endif + return -1; + + return 0; +} + +#ifdef ANDROID1 +static u_long myNextRandom = 1; + +double atof(const char *nptr) +{ + return (strtod(nptr, NULL)); +} + +int rand(void) +{ + return (int)((myNextRandom = (1103515245 * myNextRandom) + 12345) % ((u_long)RAND_MAX + 1)); +} + +void srand(u_int seed) +{ + myNextRandom = seed; +} + +#endif + +#if 0 + +/** + * @brief exec_with_ret Executes a command with result return + * @param[in] a_cmd Command + * @return Result + */ +char * exec_with_ret(const char * a_cmd) +{ + FILE * fp; + size_t buf_len = 0; + char buf[4096] = {0}; + fp= popen(a_cmd, "r"); + if (!fp) { + goto FIN; + } + memset(buf,0,sizeof(buf)); + fgets(buf,sizeof(buf)-1,fp); + pclose(fp); + buf_len=strlen(buf); + if(buf[buf_len-1] =='\n')buf[buf_len-1] ='\0'; +FIN: + return strdup(buf); +} + +/** + * @brief exec_with_ret_multistring performs a command with a result return in the form of a multistring + * @param[in] a_cmd Coomand + * @return Return + */ +char * exec_with_ret_multistring(const char * a_cmd) +{ + FILE * fp; + size_t buf_len = 0; + char buf[4096] = {0}; + fp= popen(a_cmd, "r"); + if (!fp) { + goto FIN; + } + memset(buf,0,sizeof(buf)); + char retbuf[4096] = {0}; + while(fgets(buf,sizeof(buf)-1,fp)) { + strcat(retbuf, buf); + } + pclose(fp); + buf_len=strlen(retbuf); + if(retbuf[buf_len-1] =='\n')retbuf[buf_len-1] ='\0'; +FIN: + return strdup(retbuf); +} +#endif + +static const char l_possible_chars[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + +/** + * @brief random_string_fill Filling a string with random characters + * @param[out] str A pointer to a char array + * @param[in] length The length of the array or string + */ +void dap_random_string_fill(char *str, size_t length) { + for(size_t i = 0; i < length; i++) + str[i] = l_possible_chars[ + rand() % (sizeof(l_possible_chars) - 1)]; +} + +/** + * @brief random_string_create Generates a random string + * @param[in] a_length lenght + * @return a pointer to an array + */ +char * dap_random_string_create_alloc(size_t a_length) +{ + char * ret = DAP_NEW_SIZE(char, a_length+1); + size_t i; + for(i=0; i<a_length; ++i) { + int index = rand() % (sizeof(l_possible_chars)-1); + ret[i] = l_possible_chars[index]; + } + return ret; +} + +#if 0 + +#define MAX_PRINT_WIDTH 100 + +static void _printrepchar(char c, size_t count) { + assert(count < MAX_PRINT_WIDTH && + "Too many characters"); + static char buff[MAX_PRINT_WIDTH]; + memset(buff, (int)c, count); + printf("%s\n", buff); +} + + +/** + * @brief The function displays a dump + * @param[in] data The data dump you want to display + * @param[in] size The size of the data whose dump you want to display + * + * The function displays a dump, for example an array, in hex format +*/ +void dap_dump_hex(const void* data, size_t size) { + char ascii[17]; + size_t i, j; + ascii[16] = '\0'; + for (i = 0; i < size; ++i) { + printf("%02X ", ((const unsigned char*)data)[i]); + if (((const unsigned char*)data)[i] >= ' ' && ((const unsigned char*)data)[i] <= '~') { + ascii[i % 16] = ((const char*)data)[i]; + } else { + ascii[i % 16] = '.'; + } + if ((i+1) % 8 == 0 || i+1 == size) { + printf(" "); + if ((i+1) % 16 == 0) { + printf("| %s \n", ascii); + } else if (i+1 == size) { + ascii[(i+1) % 16] = '\0'; + if ((i+1) % 16 <= 8) { + printf(" "); + } + for (j = (i+1) % 16; j < 16; ++j) { + printf(" "); + } + printf("| %s \n", ascii); + } + } + } + _printrepchar('-', 70); +} + +void *memzero(void *a_buf, size_t n) +{ + memset(a_buf,0,n); + return a_buf; +} + +#endif + +/** + * Convert binary data to binhex encoded data. + * + * out output buffer, must be twice the number of bytes to encode. + * len is the size of the data in the in[] buffer to encode. + * return the number of bytes encoded, or -1 on error. + */ +size_t dap_bin2hex(char *a_out, const void *a_in, size_t a_len) +{ + size_t ct = a_len; + static char hex[] = "0123456789ABCDEF"; + const uint8_t *l_in = (const uint8_t *)a_in; + + if(!a_in || !a_out ) + return 0; + // hexadecimal lookup table + + while(ct-- > 0){ + *a_out++ = hex[*l_in >> 4]; + *a_out++ = hex[*l_in++ & 0x0F]; + } + return a_len; +} + +/** + * Convert binhex encoded data to binary data + * + * len is the size of the data in the in[] buffer to decode, and must be even. + * out outputbuffer must be at least half of "len" in size. + * The buffers in[] and out[] can be the same to allow in-place decoding. + * return the number of bytes encoded, or 0 on error. + */ +size_t dap_hex2bin(uint8_t *a_out, const char *a_in, size_t a_len) +{ + // '0'-'9' = 0x30-0x39 + // 'a'-'f' = 0x61-0x66 + // 'A'-'F' = 0x41-0x46 + size_t ct = a_len; + if(!a_in || !a_out || (a_len & 1)) + return 0; + while(ct > 0) { + char ch1 = ((*a_in >= 'a') ? (*a_in++ - 'a' + 10) : ((*a_in >= 'A') ? (*a_in++ - 'A' + 10) : (*a_in++ - '0'))) << 4; + char ch2 = ((*a_in >= 'a') ? (*a_in++ - 'a' + 10) : ((*a_in >= 'A') ? (*a_in++ - 'A' + 10) : (*a_in++ - '0'))); // ((*in >= 'A') ? (*in++ - 'A' + 10) : (*in++ - '0')); + *a_out++ =(uint8_t) ch1 + (uint8_t) ch2; + ct -= 2; + } + return a_len; +} + +/** + * Convert string to digit + */ +void dap_digit_from_string(const char *num_str, void *raw, size_t raw_len) +{ + if(!num_str) + return; + uint64_t val; + + if(!strncasecmp(num_str, "0x", 2)) { + val = strtoull(num_str + 2, NULL, 16); + }else { + val = strtoull(num_str, NULL, 10); + } + + // for LITTLE_ENDIAN (Intel), do nothing, otherwise swap bytes +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + val = le64toh(val); +#endif + memset(raw, 0, raw_len); + memcpy(raw, &val, min(raw_len, sizeof(uint64_t))); +} + +typedef union { + uint16_t addrs[4]; + uint64_t addr; +} node_addr_t; + +void dap_digit_from_string2(const char *num_str, void *raw, size_t raw_len) +{ + if(!num_str) + return; + + uint64_t val; + + if(!strncasecmp(num_str, "0x", 2)) { + val = strtoull(num_str + 2, NULL, 16); + }else { + node_addr_t *nodeaddr = (node_addr_t *)&val; + sscanf( num_str, "%hx::%hx::%hx::%hx", &nodeaddr->addrs[3], &nodeaddr->addrs[2], &nodeaddr->addrs[1], &nodeaddr->addrs[0] ); + } + + // for LITTLE_ENDIAN (Intel), do nothing, otherwise swap bytes +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + val = le64toh(val); +#endif + memset(raw, 0, raw_len); + memcpy(raw, &val, min(raw_len, sizeof(uint64_t))); +} + + +/*! + * \brief Execute shell command silently + * \param a_cmd command line + * \return 0 if success, -1 otherwise + */ +int exec_silent(const char * a_cmd) { + +#ifdef _WIN32 + PROCESS_INFORMATION p_info; + STARTUPINFOA s_info; + + memset(&s_info, 0, sizeof(s_info)); + memset(&p_info, 0, sizeof(p_info)); + + s_info.cb = sizeof(s_info); + char cmdline[512] = {'\0'}; + strcat(cmdline, "C:\\Windows\\System32\\cmd.exe /c "); + strcat(cmdline, a_cmd); + + if (CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0x08000000, NULL, NULL, &s_info, &p_info)) { + WaitForSingleObject(p_info.hProcess, 0xffffffff); + CloseHandle(p_info.hProcess); + CloseHandle(p_info.hThread); + return 0; + } + else { + return -1; + } +#else + return execl(".",a_cmd); +#endif +} + +static int s_timers_count = 0; +static dap_timer_interface_t s_timers[DAP_INTERVAL_TIMERS_MAX]; +#ifdef _WIN32 +static CRITICAL_SECTION s_timers_lock; +#else +static pthread_mutex_t s_timers_lock; +#endif + +static int s_timer_find(void *a_timer) +{ + for (int i = 0; i < s_timers_count; i++) { + if (s_timers[i].timer == a_timer) { + return i; + } + } + return -1; +} + +#ifdef _WIN32 +static void CALLBACK s_win_callback(PVOID a_arg, BOOLEAN a_always_true) +{ + UNUSED(a_always_true); + s_timers[(int)a_arg].callback(s_timers[(int)a_arg].param); +} +#else +static void s_posix_callback(union sigval a_arg) +{ + s_timers[a_arg.sival_int].callback(s_timers[a_arg.sival_int].param); +} +#endif + +/*! + * \brief dap_interval_timer_create Create new timer object and set callback function to it + * \param a_msec Timer period + * \param a_callback Function to be called with timer period + * \return pointer to timer object if success, otherwise return NULL + */ +void *dap_interval_timer_create(unsigned int a_msec, dap_timer_callback_t a_callback, void *a_param) +{ + if (s_timers_count == DAP_INTERVAL_TIMERS_MAX) { + return NULL; + } +#ifdef _WIN32 + if (s_timers_count == 0) { + InitializeCriticalSection(&s_timers_lock); + } + HANDLE l_timer; + if (!CreateTimerQueueTimer(&l_timer, NULL, (WAITORTIMERCALLBACK)s_win_callback, (PVOID)s_timers_count, a_msec, a_msec, 0)) { + return NULL; + } + EnterCriticalSection(&s_timers_lock); +#else + if (s_timers_count == 0) { + pthread_mutex_init(&s_timers_lock, NULL); + } + timer_t l_timer; + struct sigevent l_sig_event = { }; + l_sig_event.sigev_notify = SIGEV_THREAD; + l_sig_event.sigev_value.sival_int = s_timers_count; + l_sig_event.sigev_notify_function = s_posix_callback; + if (timer_create(CLOCK_MONOTONIC, &l_sig_event, &l_timer)) { + return NULL; + } + struct itimerspec l_period = { }; + l_period.it_interval.tv_sec = l_period.it_value.tv_sec = a_msec / 1000; + l_period.it_interval.tv_nsec = l_period.it_value.tv_nsec = (a_msec % 1000) * 1000000; + timer_settime(l_timer, 0, &l_period, NULL); + pthread_mutex_lock(&s_timers_lock); +#endif + s_timers[s_timers_count].timer = (void *)l_timer; + s_timers[s_timers_count].callback = a_callback; + s_timers[s_timers_count].param = a_param; + s_timers_count++; +#ifdef _WIN32 + LeaveCriticalSection(&s_timers_lock); +#else + pthread_mutex_unlock(&s_timers_lock); +#endif + return (void *)l_timer; +} + +/*! + * \brief dap_interval_timer_delete Delete existed timer object and stop callback function calls + * \param a_timer A timer object created previously with dap_interval_timer_create + * \return 0 if success, -1 otherwise + */ +int dap_interval_timer_delete(void *a_timer) +{ + if (!s_timers_count) { + return -1; + } +#ifdef _WIN32 + EnterCriticalSection(&s_timers_lock); +#else + pthread_mutex_lock(&s_timers_lock); +#endif + int l_timer_idx = s_timer_find(a_timer); + if (l_timer_idx == -1) { + return -1; + } + for (int i = l_timer_idx; i < s_timers_count - 1; i++) { + s_timers[i] = s_timers[i + 1]; + } + s_timers_count--; +#ifdef _WIN32 + LeaveCriticalSection(&s_timers_lock); + if (s_timers_count == 0) { + DeleteCriticalSection(&s_timers_lock); + } + return !DeleteTimerQueueTimer(NULL, (HANDLE)a_timer, NULL); +#else + if (s_timers_count == 0) { + pthread_mutex_destroy(&s_timers_lock); + } + return timer_delete((timer_t)a_timer); +#endif +} diff --git a/libdap/src/dap_config.c b/libdap/src/dap_config.c new file mode 100755 index 0000000000000000000000000000000000000000..93d2cf7772fe5b57d9adef74478ebcf6b85b73bb --- /dev/null +++ b/libdap/src/dap_config.c @@ -0,0 +1,581 @@ +#include <stdio.h> +#include <string.h> + +#include <errno.h> +#include <ctype.h> +#include "dap_file_utils.h" +#include "uthash.h" +#include "dap_common.h" +#include "dap_config.h" + +#define LOG_TAG "dap_config" + +dap_config_t * g_config = NULL; + +/** + * @brief The dap_config_item struct + */ +typedef struct dap_config_item{ + char name[64]; + struct dap_config_item * childs; + struct dap_config_item * item_next; + union{ + char *data_str; + uint8_t data_uint8; + bool data_bool; + double data_double; + int32_t data_int32; + struct { + char **data_str_array; + uint16_t array_length; + }; + }; + bool is_array; + UT_hash_handle hh; +} dap_config_item_t; + + +typedef struct dap_config_internal +{ + dap_config_item_t * item_root; +} dap_config_internal_t; +#define DAP_CONFIG_INTERNAL(a) ( (dap_config_internal_t* ) a->_internal ) + +#define MAX_CONFIG_PATH 256 +static char s_configs_path[MAX_CONFIG_PATH] = "/opt/dap/etc"; + + +/** + * @brief dap_config_init Initialization settings + * @param[in] a_configs_path If NULL path is set to default + * @return + */ +int dap_config_init(const char * a_configs_path) +{ + if( a_configs_path ) { +#ifdef _WIN32 + // Check up under Windows, in Linux is not required + if(!dap_valid_ascii_symbols(a_configs_path)) { + log_it(L_ERROR, "Supported only ASCII symbols for directory path"); + return -1; + } +#endif + if(dap_dir_test(a_configs_path) || !dap_mkdir_with_parents(a_configs_path)) { + strncpy(s_configs_path, a_configs_path,sizeof(s_configs_path)-1); + return 0; + } + } + return -1; +} + +const char * dap_config_path() +{ + return s_configs_path; +} + + +/** + * @brief dap_config_deinit Deinitialize settings + */ +void dap_config_deinit() +{ + +} + + +/** + * @brief get_array_length Function parse string and return array length + * @param[in] value + * @details internal function parse string and return array length + * @return + */ +static uint16_t get_array_length(const char* str) { + uint16_t array_length = 1; // by default if not find ',' + while (*str) { + if (*str == ',') + array_length++; + str++; + } + return array_length; +} +/** + * @brief dap_config_open Open the configuration settings + * @param[in] a_name Configuration name + * @return dap_config_t Configuration + */ +dap_config_t * dap_config_open(const char * a_name) +{ + dap_config_t * ret = NULL; + if ( a_name ){ + log_it(L_DEBUG,"Looking for config name %s...",a_name); + size_t l_config_path_size_max = strlen(a_name)+6+strlen(s_configs_path); + char *l_config_path = DAP_NEW_SIZE(char,l_config_path_size_max); + snprintf(l_config_path,l_config_path_size_max, "%s/%s.cfg",s_configs_path,a_name); + FILE * f = fopen(l_config_path,"r"); + if ( f ){ + fseek(f, 0, SEEK_END); + long buf_len = ftell(f); + char buf[buf_len]; + fseek(f, 0L, SEEK_SET); + log_it(L_DEBUG,"Opened config %s",a_name); + ret = DAP_NEW_Z(dap_config_t); + dap_config_internal_t * l_config_internal = DAP_NEW_Z(dap_config_internal_t); + ret->_internal = l_config_internal; + size_t l_global_offset=0; + size_t l_buf_size=0; + size_t l_buf_pos_line_start=0; + size_t l_buf_pos_line_end=0; + dap_config_item_t * l_section_current = NULL ; + bool l_is_space_now = false; + while ( feof(f)==0){ // Break on lines + size_t i; + l_global_offset += (l_buf_size = fread(buf, 1, buf_len, f) ); + for (i=0; i< l_buf_size; i++){ + if( (buf[i] == '\r') || (buf[i] == '\n' ) ){ + if( ! l_is_space_now){ + l_buf_pos_line_end = i; + l_is_space_now = true; + //if(l_buf_pos_line_end) + // l_buf_pos_line_end--; + if(l_buf_pos_line_end != l_buf_pos_line_start ){ // Line detected + char *l_line = NULL; + size_t l_line_length = 0; + size_t j; + + // Trimming spaces and skip the line if commented + for ( j = l_buf_pos_line_start; j < l_buf_pos_line_end; j++ ){ + if ( buf[j] == '#' ) + break; + if (buf[j] != ' ' ){ + l_line_length = (l_buf_pos_line_end - j); + break; + } + } + if( l_line_length ){ + l_line = DAP_NEW_SIZE(char,l_line_length+1); + memcpy(l_line,buf+j,l_line_length); + l_line[l_line_length] = 0; + + // Process trimmed line + if( (l_line[0] == '[' ) && (l_line[l_line_length-1] == ']' ) ){ // Section detected + //log_it(L_DEBUG, "Raw line '%s'",l_line); + char * l_section_name = strdup(l_line+1); + size_t l_section_name_length = (l_line_length - 2); + l_section_name[l_section_name_length]='\0'; + // log_it(L_DEBUG,"Config section '%s'",l_section_name); + + dap_config_item_t * l_item_section = DAP_NEW_Z(dap_config_item_t); + strncpy(l_item_section->name,l_section_name,sizeof(l_item_section->name)-1); + l_item_section->item_next = l_config_internal->item_root; + l_config_internal->item_root = l_item_section; + free(l_section_name); + + l_section_current = l_item_section; + }else{ // key-value line + //log_it(L_DEBUG,"Read line '%s'",l_line); + char l_param_name[sizeof(l_section_current->name)]; + size_t l_param_name_size=0; + size_t l_param_value_size=0; + char l_param_value[1024]; + l_param_name[0] = 0; + l_param_value[0] = 0; + for ( j = 0; j < l_line_length; j++ ){ // Parse param name + if ( ( l_line[j] == ' ' )|| ( l_line[j] == '=' ) ||( l_line[j] == '\t' ) ){ // Param name + l_param_name_size = j; + if (l_param_name_size > (sizeof(l_param_name) -1) ){ + l_param_name_size = (sizeof(l_param_name) - 1 ); + log_it(L_WARNING,"Too long param name in config, %u is more than %u maximum", + j,sizeof(l_param_name) -1); + } + strncpy(l_param_name,l_line,j); + l_param_name[j] = 0; + break; + } + + } + + for (; j < l_line_length; j++ ){ // Find beginning of param value + if ( ( l_line[j] != '\t' ) && ( l_line[j] != ' ' ) && ( l_line[j] != '=' ) ){ + break; + } + } + l_param_value_size = l_line_length - j; + if (l_param_value_size ){ + if (l_param_value_size > (sizeof(l_param_value) -1) ){ + l_param_value_size = (sizeof(l_param_value) - 1 ); + log_it(L_WARNING,"Too long param value in config, %u is more than %u maximum", + l_line_length - j,sizeof(l_param_value) -1); + } + strncpy(l_param_value,l_line +j, l_param_value_size); + l_param_value[l_param_value_size] = '\0'; + for(int j=(int)l_param_value_size-1; j>=0; j--){ + if( (l_param_value[j] ==' ') || (l_param_value[j] =='\t') ){ + l_param_value[j] = '\0'; + }else{ + break; + } + } + } + // log_it(L_DEBUG," Param '%s' = '%s'", l_param_name, l_param_value); + if (l_section_current){ + + if (l_param_value[0] == '[') { + if(l_param_value[1] == ']') { + log_it(L_WARNING, "Empty array!"); + continue; + } + + // delete '[' and ']' + char* values = l_param_value + 1; + values[l_param_value_size-2] = 0; + + dap_config_item_t * l_item = DAP_NEW_Z(dap_config_item_t); + + strncpy(l_item->name,l_param_name,sizeof(l_item->name)); + l_item->item_next = l_section_current->childs; + l_item->is_array = true; + l_section_current->childs = l_item; + l_item->array_length = get_array_length(l_param_value); + l_item->data_str_array = (char**) malloc (sizeof(char*) * l_item->array_length); + // parsing items in array + int j = 0; + char * l_tmp = NULL; + char *token = strtok_r(values, ",",&l_tmp); + while(token) { + + // trim token whitespace + if (isspace(token[0])) + token = token + 1; + if (isspace(token[strlen(token) - 1]) + || token[strlen(token) - 1] == ']' /* last item in array */) + token[strlen(token) - 1] = 0; + + l_item->data_str_array[j] = strdup(token); + + token = strtok_r(NULL, ",",&l_tmp); + j++; + } + + } else { + dap_config_item_t * l_item = DAP_NEW_Z(dap_config_item_t); + + strncpy(l_item->name,l_param_name,sizeof(l_item->name)); + l_item->item_next = l_section_current->childs; + l_item->data_str = strdup (l_param_value); + + l_section_current->childs = l_item; + } + }else{ + log_it(L_ERROR,"Can't add param to a tree without current section"); + } + + } + DAP_DELETE(l_line); + } + } + } + continue; + }else{ + if (l_is_space_now){ + l_is_space_now = false; + l_buf_pos_line_start = i; + } + } + } + } + fclose(f); + }else{ + log_it(L_ERROR,"Can't open config file '%s' (%s)",l_config_path,strerror(errno)); + } + DAP_DELETE(l_config_path); + }else{ + log_it(L_ERROR,"Config name is NULL"); + } + return ret; +} + +/** + * @brief dap_config_close Closing the configuration + * @param[in] a_config Configuration + */ +void dap_config_close(dap_config_t * a_config) +{ + dap_config_item_t * l_item = DAP_CONFIG_INTERNAL(a_config)->item_root ; + while(l_item) { + dap_config_item_t * l_item_child = l_item->childs; + DAP_CONFIG_INTERNAL(a_config)->item_root = l_item->item_next; + + while(l_item_child) { + l_item->childs = l_item_child->item_next; + if(l_item_child->is_array) { + for(int i = 0; i< l_item_child->array_length; i++) + free(l_item_child->data_str_array[i]); + free(l_item_child->data_str_array); + } else if (l_item_child->data_str) { + DAP_DELETE(l_item_child->data_str); + } + DAP_DELETE(l_item_child); + l_item_child = l_item->childs; + } + + if(l_item->data_str) { + DAP_DELETE(l_item->data_str); + } + DAP_DELETE(l_item); + l_item = DAP_CONFIG_INTERNAL(a_config)->item_root; + } + + free(a_config->_internal); + free(a_config); + +} + +/** + * @brief dap_config_get_item_int32 Getting a configuration item as a int32 + * @param[in] a_config + * @param[in] a_section_path + * @param[in] a_item_name + * @return + */ +int32_t dap_config_get_item_int32(dap_config_t * a_config, const char * a_section_path, const char * a_item_name) +{ + return atoi(dap_config_get_item_str(a_config,a_section_path,a_item_name)); +} + +/** + * @brief dap_config_get_item_int64 + * @param a_config + * @param a_section_path + * @param a_item_name + * @return + */ +int64_t dap_config_get_item_int64(dap_config_t * a_config, const char * a_section_path, const char * a_item_name) +{ + return atoll(dap_config_get_item_str(a_config,a_section_path,a_item_name)); +} + +/** + * @brief dap_config_get_item_uint64 + * @param a_config + * @param a_section_path + * @param a_item_name + * @return + */ +uint64_t dap_config_get_item_uint64(dap_config_t * a_config, const char * a_section_path, const char * a_item_name) +{ + return (uint64_t) atoll(dap_config_get_item_str(a_config,a_section_path,a_item_name)); +} + +/** + * @brief dap_config_get_item_uint16 + * @param a_config + * @param a_section_path + * @param a_item_name + * @return + */ +uint16_t dap_config_get_item_uint16(dap_config_t * a_config, const char * a_section_path, const char * a_item_name) +{ + return (uint16_t) atoi(dap_config_get_item_str(a_config,a_section_path,a_item_name)); +} + + +/** + * @brief dap_config_get_item_int32_default Getting a configuration item as a int32 + * @param[in] a_config Configuration + * @param[in] a_section_path Path + * @param[in] a_item_name setting + * @param[in] a_default + * @return + */ +int32_t dap_config_get_item_int32_default(dap_config_t * a_config, const char * a_section_path, const char * a_item_name, int32_t a_default) +{ + const char * l_str_ret = dap_config_get_item_str(a_config,a_section_path,a_item_name); + return l_str_ret?atoi(l_str_ret):a_default; +} + +/** + * @brief dap_config_get_item_uint16_default + * @param a_config + * @param a_section_path + * @param a_item_name + * @param a_default + * @return + */ +uint16_t dap_config_get_item_uint16_default(dap_config_t * a_config, const char * a_section_path, const char * a_item_name, uint16_t a_default) +{ + const char * l_str_ret = dap_config_get_item_str(a_config,a_section_path,a_item_name); + return l_str_ret? (uint16_t) atoi(l_str_ret):a_default; +} + +/** + * @brief dap_config_get_item_int64_default + * @param a_config + * @param a_section_path + * @param a_item_name + * @param a_default + * @return + */ +int64_t dap_config_get_item_int64_default(dap_config_t * a_config, const char * a_section_path, const char * a_item_name, int64_t a_default) +{ + const char * l_str_ret = dap_config_get_item_str(a_config,a_section_path,a_item_name); + return l_str_ret? (int64_t) atoll(l_str_ret):a_default; +} + +/** + * @brief dap_config_get_item_int64_default + * @param a_config + * @param a_section_path + * @param a_item_name + * @param a_default + * @return + */ +uint64_t dap_config_get_item_uint64_default(dap_config_t * a_config, const char * a_section_path, const char * a_item_name, uint64_t a_default) +{ + const char * l_str_ret = dap_config_get_item_str(a_config,a_section_path,a_item_name); + return l_str_ret? (uint64_t) atoll(l_str_ret):a_default; +} + + +/** + * @brief dap_config_get_item Get the configuration as a item + * @param[in] a_config Configuration + * @param[in] a_section_path Path + * @param[in] a_item_name setting + * @return + */ +static dap_config_item_t * dap_config_get_item(dap_config_t * a_config, const char * a_section_path, const char * a_item_name) +{ + dap_config_item_t * l_item_section = DAP_CONFIG_INTERNAL(a_config)->item_root ; + while(l_item_section){ + if (strcmp(l_item_section->name,a_section_path)==0){ + dap_config_item_t * l_item = l_item_section->childs; + while (l_item){ + if (strcmp(l_item->name,a_item_name)==0){ + return l_item; + } + l_item = l_item->item_next; + } + } + l_item_section = l_item_section->item_next; + } + return NULL; +} + + +/** + * @brief dap_config_get_item_str Getting a configuration item as a string + * @param[in] a_config Configuration + * @param[in] a_section_path Path + * @param[in] a_item_name setting + * @return + */ +const char * dap_config_get_item_str(dap_config_t * a_config, const char * a_section_path, const char * a_item_name) +{ + dap_config_item_t * item = dap_config_get_item(a_config, a_section_path, a_item_name); + if (item == NULL) + return NULL; + return item->data_str; +} + + +/** + * @brief dap_config_get_array_str Getting an array of configuration items as a string + * @param[in] a_config Configuration + * @param[in] a_section_path Path + * @param[in] a_item_name setting + * @return + */ +char** dap_config_get_array_str(dap_config_t * a_config, const char * a_section_path, + const char * a_item_name, uint16_t * array_length) { + dap_config_item_t * item = dap_config_get_item(a_config, a_section_path, a_item_name); + if (item == NULL){ + if(array_length != NULL) + *array_length = 0; + return NULL; + } + if (array_length != NULL) + *array_length = item->array_length; + return item->data_str_array; +} + + +/** + * @brief dap_config_get_item_str_default Getting an array of configuration items as a string + * @param[in] a_config Configuration + * @param[in] a_section_path Path + * @param[in] a_item_name setting + * @param[in] a_value_default Default + * @return + */ +const char * dap_config_get_item_str_default(dap_config_t * a_config, const char * a_section_path, const char * a_item_name, const char * a_value_default) +{ + dap_config_item_t * l_item_section = DAP_CONFIG_INTERNAL(a_config)->item_root ; + while(l_item_section){ + if (strcmp(l_item_section->name,a_section_path)==0){ + dap_config_item_t * l_item = l_item_section->childs; + while (l_item){ + if (strcmp(l_item->name,a_item_name)==0){ + return l_item->data_str; + } + l_item = l_item->item_next; + } + } + l_item_section = l_item_section->item_next; + } + return a_value_default; +} + +/** + * @brief dap_config_get_item_bool Getting a configuration item as a boolean + * @param[in] a_config Configuration + * @param[in] a_section_path Path + * @param[in] a_item_name Setting + * @return + */ +bool dap_config_get_item_bool(dap_config_t * a_config, const char * a_section_path, const char * a_item_name) +{ + return strcmp(dap_config_get_item_str(a_config,a_section_path,a_item_name),"true") == 0; +} + + +/** + * @brief dap_config_get_item_bool_default Getting a configuration item as a boolean + * @param[in] a_config Configuration + * @param[in] a_section_path Path + * @param[in] a_item_name Setting + * @param[in] a_default Default + * @return + */ +bool dap_config_get_item_bool_default(dap_config_t * a_config, const char * a_section_path, + const char * a_item_name, bool a_default) +{ + return strcmp(dap_config_get_item_str_default(a_config,a_section_path,a_item_name, + a_default?"true":"false"),"true") == 0; +} + +/** + * @brief dap_config_get_item_double Getting a configuration item as a floating-point value + * @param[in] a_config Configuration + * @param[in] a_section_path Path + * @param[in] a_item_name Setting + * @return + */ +double dap_config_get_item_double(dap_config_t * a_config, const char * a_section_path, const char * a_item_name) +{ + return atof(dap_config_get_item_str(a_config,a_section_path,a_item_name)); +} + +/** + * @brief dap_config_get_item_double Getting a configuration item as a floating-point value + * @param[in] a_config Configuration + * @param[in] a_section_path Path + * @param[in] a_item_name Setting + * @param[in] a_default Defailt + * @return + */ +double dap_config_get_item_double_default(dap_config_t * a_config, const char * a_section_path, const char * a_item_name, double a_default) +{ + const char * l_str_ret = dap_config_get_item_str(a_config,a_section_path,a_item_name); + return l_str_ret?atof(l_str_ret):a_default; +} + diff --git a/libdap/src/dap_file_utils.c b/libdap/src/dap_file_utils.c new file mode 100755 index 0000000000000000000000000000000000000000..910c64a79ee21dfc1aa2463b6cc3f39921b93894 --- /dev/null +++ b/libdap/src/dap_file_utils.c @@ -0,0 +1,406 @@ +/* + * Authors: + * Aleksandr Lysikov <alexander.lysikov@demlabs.net> + * DeM Labs Inc. https://demlabs.net + * Kelvin Project https://gitlab.demlabs.net/cellframe + * Copyright (c) 2017-2018 + * All rights reserved. + + This file is part of DAP (Deus Applications Prototypes) the open source project + + DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DAP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with any DAP based project. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <stdlib.h> +#include <stdint.h> +#include <errno.h> +#if (OS_TARGET == OS_MACOS) + #include <stdio.h> +#else + #include <malloc.h> +#endif +#include <string.h> +#include <sys/stat.h> + +#ifdef _WIN32 +#include <windows.h> +#include <io.h> +#endif + +#include "dap_common.h" +#include "dap_strfuncs.h" +#include "dap_file_utils.h" + +/** + * Check the directory path for unsupported symbols + * + * @string + * @return true, if the directory path contains only ASCII symbols + */ +bool dap_valid_ascii_symbols(const char *a_string) +{ + if(!a_string) + return true; + for(size_t i = 0; i < strlen(a_string); i++) { + if((uint8_t) a_string[i] > 0x7f) + return false; + } + return true; +} + +/** + * Check the file for exists + * + * @a_file_path filename pathname + * @return true, if file exists + */ +bool dap_file_test(const char * a_file_path) +{ + if(!a_file_path) + return false; +#ifdef _WIN32 + int attr = GetFileAttributesA(a_file_path); + if(attr != -1 && (attr & FILE_ATTRIBUTE_NORMAL)) + return true; +#else + struct stat st; + if (!stat(a_file_path, &st)) { + if (S_ISREG(st.st_mode)) + return true; + } +#endif + return false; +} + +/** + * Check the directory for exists + * + * @dir_path directory pathname + * @return true, if the file is a directory + */ +bool dap_dir_test(const char * a_dir_path) +{ + if(!a_dir_path) + return false; +#ifdef _WIN32 + int attr = GetFileAttributesA(a_dir_path); + if(attr != -1 && (attr & FILE_ATTRIBUTE_DIRECTORY)) + return true; +#else + struct stat st; + if(!stat(a_dir_path, &st)) { + if(S_ISDIR(st.st_mode)) + return true; + } +#endif + return false; +} + +/** + * Create a new directory with intermediate sub-directories + * + * @dir_path new directory pathname + * @return 0, if the directory was created or already exist, else -1 + */ +int dap_mkdir_with_parents(const char *a_dir_path) +{ + + char *path, *p; + // validation of a pointer + if(a_dir_path == NULL || a_dir_path[0] == '\0') { + errno = EINVAL; + return -1; + } + path = strdup(a_dir_path); + // skip the root component if it is present, i.e. the "/" in Unix or "C:\" in Windows +#ifdef _WIN32 + if(((path[0] >= 'a' && path[0] <= 'z') || (path[0] >= 'A' && path[0] <= 'Z')) + && (path[1] == ':') && DAP_IS_DIR_SEPARATOR(path[2])) { + p = path + 3; + } +#else + if (DAP_IS_DIR_SEPARATOR(path[0])) { + p = path + 1; + } +#endif + else + p = path; + + do { + while(*p && !DAP_IS_DIR_SEPARATOR(*p)) + p++; + + if(!*p) + p = NULL; + else + *p = '\0'; + + if(!dap_dir_test(path)) { +#ifdef _WIN32 + int result = mkdir(path); +#else + int result = mkdir(path, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); +#endif + if(result == -1) { + free(path); + errno = ENOTDIR; + return -1; + } + } + if(p) { + *p++ = DAP_DIR_SEPARATOR; + while(*p && DAP_IS_DIR_SEPARATOR(*p)) + p++; + } + } while(p); + + free(path); + return 0; +} + +/** + * dap_path_get_basename: + * @a_file_name: the name of the file + * + * Gets the last component of the filename. + * + * If @a_file_name ends with a directory separator it gets the component + * before the last slash. If @a_file_name consists only of directory + * separators (and on Windows, possibly a drive letter), a single + * separator is returned. If @a_file_name is empty, it gets ".". + * + * Returns: a newly allocated string containing the last + * component of the filename + */ +char* dap_path_get_basename(const char *a_file_name) +{ + ssize_t l_base; + ssize_t l_last_nonslash; + const char *l_retval; + + dap_return_val_if_fail(a_file_name != NULL, NULL); + + if(a_file_name[0] == '\0') + return dap_strdup("."); + + l_last_nonslash = strlen(a_file_name) - 1; + + while(l_last_nonslash >= 0 && DAP_IS_DIR_SEPARATOR(a_file_name[l_last_nonslash])) + l_last_nonslash--; + + if(l_last_nonslash == -1) + // string only containing slashes + return dap_strdup(DAP_DIR_SEPARATOR_S); + +#ifdef _WIN32 + if (l_last_nonslash == 1 && + dap_ascii_isalpha(a_file_name[0]) && + a_file_name[1] == ':') + // string only containing slashes and a drive + return dap_strdup (DAP_DIR_SEPARATOR_S); +#endif + l_base = l_last_nonslash; + + while(l_base >= 0 && !DAP_IS_DIR_SEPARATOR(a_file_name[l_base])) + l_base--; + +#ifdef _WIN32 + if (l_base == -1 && + dap_ascii_isalpha(a_file_name[0]) && + a_file_name[1] == ':') + l_base = 1; +#endif + + //size_t l_len = l_last_nonslash - l_base; + l_retval = a_file_name + l_base + 1; + + return dap_strdup(l_retval); +} + +/** + * dap_path_is_absolute: + * @a_file_name: a file name + * + * Returns true if the given @a_file_name is an absolute file name. + * Note that this is a somewhat vague concept on Windows. + * + * On POSIX systems, an absolute file name is well-defined. It always + * starts from the single root directory. For example "/usr/local". + * + * On Windows, the concepts of current drive and drive-specific + * current directory introduce vagueness. This function interprets as + * an absolute file name one that either begins with a directory + * separator such as "\Users\tml" or begins with the root on a drive, + * for example "C:\Windows". The first case also includes UNC paths + * such as "\\myserver\docs\foo". In all cases, either slashes or + * backslashes are accepted. + * + * Returns: true if @a_file_name is absolute + */ +bool dap_path_is_absolute(const char *a_file_name) +{ + dap_return_val_if_fail(a_file_name != NULL, false); + + if(DAP_IS_DIR_SEPARATOR(a_file_name[0])) + return true; + +#ifdef _WIN32 + /* Recognize drive letter on native Windows */ + if (dap_ascii_isalpha(a_file_name[0]) && + a_file_name[1] == ':' && DAP_IS_DIR_SEPARATOR (a_file_name[2])) + return true; +#endif + + return false; +} + +/** + * dap_path_get_dirname: + * @a_file_name: the name of the file + * + * Gets the directory components of a file name. + * + * If the file name has no directory components "." is returned. + * The returned string should be freed when no longer needed. + * + * Returns: the directory components of the file + */ +char* dap_path_get_dirname(const char *a_file_name) +{ + char *l_base; + size_t l_len; + + dap_return_val_if_fail(a_file_name != NULL, NULL); + + l_base = strrchr(a_file_name, DAP_DIR_SEPARATOR); + +#ifdef _WIN32 + { + char *l_q; + l_q = strrchr (a_file_name, '/'); + if (l_base == NULL || (l_q != NULL && l_q > l_base)) + l_base = l_q; + } +#endif + + if(!l_base) + { +#ifdef _WIN32 + if (dap_ascii_isalpha(a_file_name[0]) && a_file_name[1] == ':') + { + char l_drive_colon_dot[4]; + + l_drive_colon_dot[0] = a_file_name[0]; + l_drive_colon_dot[1] = ':'; + l_drive_colon_dot[2] = '.'; + l_drive_colon_dot[3] = '\0'; + + return dap_strdup (l_drive_colon_dot); + } +#endif + return dap_strdup("."); + } + + while(l_base > a_file_name && DAP_IS_DIR_SEPARATOR(*l_base)) + l_base--; + +#ifdef _WIN32 + /* base points to the char before the last slash. + * + * In case file_name is the root of a drive (X:\) or a child of the + * root of a drive (X:\foo), include the slash. + * + * In case file_name is the root share of an UNC path + * (\\server\share), add a slash, returning \\server\share\ . + * + * In case file_name is a direct child of a share in an UNC path + * (\\server\share\foo), include the slash after the share name, + * returning \\server\share\ . + */ + if (l_base == a_file_name + 1 && + dap_ascii_isalpha(a_file_name[0]) && + a_file_name[1] == ':') + l_base++; + else if (DAP_IS_DIR_SEPARATOR (a_file_name[0]) && + DAP_IS_DIR_SEPARATOR (a_file_name[1]) && + a_file_name[2] && + !DAP_IS_DIR_SEPARATOR (a_file_name[2]) && + l_base >= a_file_name + 2) + { + const char *l_p = a_file_name + 2; + while (*l_p && !DAP_IS_DIR_SEPARATOR (*l_p)) + l_p++; + if (l_p == l_base + 1) + { + l_len = (uint32_t) strlen (a_file_name) + 1; + l_base = DAP_NEW_SIZE (char, l_len + 1); + strcpy (l_base, a_file_name); + l_base[l_len-1] = DAP_DIR_SEPARATOR; + l_base[l_len] = 0; + return l_base; + } + if (DAP_IS_DIR_SEPARATOR (*l_p)) + { + l_p++; + while (*l_p && !DAP_IS_DIR_SEPARATOR (*l_p)) + l_p++; + if (l_p == l_base + 1) + l_base++; + } + } +#endif + + l_len = (uint32_t) 1 + l_base - a_file_name; + l_base = DAP_NEW_SIZE(char, l_len + 1); + memmove(l_base, a_file_name, l_len); + l_base[l_len] = 0; + + return l_base; +} + +dap_list_name_directories_t *dap_get_subs(const char *a_path_dir){ + dap_list_name_directories_t *list = NULL; + dap_list_name_directories_t *element; +#ifdef _WIN32 + size_t m_size = strlen(a_path_dir); + char *m_path = DAP_NEW_SIZE(char, m_size + 2); + memcpy(m_path, a_path_dir, m_size); + m_path[m_size] = '*'; + m_path[m_size + 1] = '\0'; + WIN32_FIND_DATA info_file; + HANDLE h_find_file = FindFirstFileA(m_path, &info_file); + while (FindNextFileA(h_find_file, &info_file)){ + if (info_file.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY){ + element = (dap_list_name_directories_t *)malloc(sizeof(dap_list_name_directories_t)); + element->name_directory = dap_strdup(info_file.cFileName); + LL_APPEND(list, element); + } + } + FindClose(h_find_file); + DAP_FREE(m_path); +#else + DIR *dir = opendir(a_path_dir); + struct dirent *entry = readdir(dir); + while (entry != NULL){ + if (strcmp(entry->d_name, "..") != 0 && strcmp(entry->d_name, ".") != 0 && entry->d_type == DT_DIR){ + element = (dap_list_name_directories_t *)malloc(sizeof(dap_list_name_directories_t)); + element->name_directory = dap_strdup(entry->d_name); + LL_APPEND(list, element); + } + entry = readdir(dir); + } + closedir(dir); +#endif + return list; +} diff --git a/libdap/src/dap_list.c b/libdap/src/dap_list.c new file mode 100755 index 0000000000000000000000000000000000000000..1d043eac172f3e3a398294e7b3c8b518350b7047 --- /dev/null +++ b/libdap/src/dap_list.c @@ -0,0 +1,1005 @@ +/* + * Doubly-Linked Lists — linked lists that can be iterated over in both directions + */ + +#include <stddef.h> + +#include "dap_common.h" +#include "dap_strfuncs.h" +#include "dap_list.h" + + +#define LOG_TAG "dap_list" + +/** + * dap_list_alloc: + * Returns: a pointer to the newly-allocated DapList element + **/ +dap_list_t *dap_list_alloc(void) +{ + dap_list_t *list = DAP_NEW(dap_list_t); + return list; +} + +dap_list_t *dap_list_alloc0(void) +{ + dap_list_t *list = DAP_NEW_Z(dap_list_t); + return list; +} + +/** + * dap_list_free: + * Frees all of the memory used by a DapList. + * The freed elements are returned to the slice allocator. + * If list elements contain dynamically-allocated memory, you should + * either use dap_list_free_full() or free them manually first. + */ +void dap_list_free(dap_list_t *list) +{ + while(list) + { + dap_list_t *next = list->next; + DAP_DELETE(list); + list = next; + } +} + +/** + * dap_list_free_1: + * + * Frees one DapList element. + * It is usually used after dap_list_remove_link(). + */ +void dap_list_free1(dap_list_t *list) +{ + DAP_DELETE(list); +} + +/** + * dap_list_free_full: + * @list: a pointer to a DapList + * @free_func: the function to be called to free each element's data + * + * Convenience method, which frees all the memory used by a DapList, + * and calls @free_func on every element's data. + */ +void dap_list_free_full(dap_list_t *list, dap_callback_destroyed_t free_func) +{ + dap_list_foreach(list, (dap_callback_t) free_func, NULL); + dap_list_free(list); +} + +/** + * dap_list_append: + * @list: a pointer to a DapList + * @data: the data for the new element + * + * Adds a new element on to the end of the list. + * + * Note that the return value is the new start of the list, + * if @list was empty; make sure you store the new value. + * + * dap_list_append() has to traverse the entire list to find the end, + * which is inefficient when adding multiple elements. A common idiom + * to avoid the inefficiency is to use dap_list_prepend() and reverse + * the list with dap_list_reverse() when all elements have been added. + * + * |[<!-- language="C" --> + * // Notice that these are initialized to the empty list. + * DapList *string_list = NULL, *number_list = NULL; + * + * // This is a list of strings. + * string_list = dap_list_append (string_list, "first"); + * string_list = dap_list_append (string_list, "second"); + * + * // This is a list of integers. + * number_list = dap_list_append (number_list, INT_TO_POINTER (27)); + * number_list = dap_list_append (number_list, INT_TO_POINTER (14)); + * ]| + * + * Returns: either @list or the new start of the DapList if @list was %NULL + */ +dap_list_t * dap_list_append(dap_list_t *list, void* data) +{ + dap_list_t *new_list; + dap_list_t *last; + + new_list = dap_list_alloc(); + new_list->data = data; + new_list->next = NULL; + + if(list) + { + last = dap_list_last(list); + /* assert (last != NULL); */ + last->next = new_list; + new_list->prev = last; + + return list; + } + else + { + new_list->prev = NULL; + return new_list; + } +} + +/** + * dap_list_prepend: + * @list: a pointer to a DapList, this must point to the top of the list + * @data: the data for the new element + * + * Prepends a new element on to the start of the list. + * + * Note that the return value is the new start of the list, + * which will have changed, so make sure you store the new value. + * + * |[<!-- language="C" --> + * // Notice that it is initialized to the empty list. + * DapList *list = NULL; + * + * list = dap_list_prepend (list, "last"); + * list = dap_list_prepend (list, "first"); + * ]| + * + * Do not use this function to prepend a new element to a different + * element than the start of the list. Use dap_list_insert_before() instead. + * + * Returns: a pointer to the newly prepended element, which is the new + * start of the DapList + */ +dap_list_t *dap_list_prepend(dap_list_t *list, void* data) +{ + dap_list_t *new_list; + + new_list = dap_list_alloc(); + new_list->data = data; + new_list->next = list; + + if(list) + { + new_list->prev = list->prev; + if(list->prev) + list->prev->next = new_list; + list->prev = new_list; + } + else + new_list->prev = NULL; + + return new_list; +} + +/** + * dap_list_insert: + * @list: a pointer to a DapList, this must point to the top of the list + * @data: the data for the new element + * @position: the position to insert the element. If this is + * negative, or is larger than the number of elements in the + * list, the new element is added on to the end of the list. + * + * Inserts a new element into the list at the given position. + * + * Returns: the (possibly changed) start of the DapList + */ +dap_list_t *dap_list_insert(dap_list_t *list, void* data, int position) +{ + dap_list_t *new_list; + dap_list_t *tmp_list; + + if(position < 0) + return dap_list_append(list, data); + else if(position == 0) + return dap_list_prepend(list, data); + + tmp_list = dap_list_nth(list,(unsigned int) position); + if(!tmp_list) + return dap_list_append(list, data); + + new_list = dap_list_alloc(); + new_list->data = data; + new_list->prev = tmp_list->prev; + tmp_list->prev->next = new_list; + new_list->next = tmp_list; + tmp_list->prev = new_list; + + return list; +} + +/** + * dap_list_insert_before: + * @list: a pointer to a DapList, this must point to the top of the list + * @sibling: the list element before which the new element + * is inserted or %NULL to insert at the end of the list + * @data: the data for the new element + * + * Inserts a new element into the list before the given position. + * + * Returns: the (possibly changed) start of the DapList + */ +dap_list_t *dap_list_insert_before(dap_list_t *list, dap_list_t *sibling, void* data) +{ + if(!list) + { + list = dap_list_alloc(); + list->data = data; + dap_return_val_if_fail(sibling == NULL, list); + return list; + } + else if(sibling) + { + dap_list_t *node; + + node = dap_list_alloc(); + node->data = data; + node->prev = sibling->prev; + node->next = sibling; + sibling->prev = node; + if(node->prev) + { + node->prev->next = node; + return list; + } + else + { + dap_return_val_if_fail(sibling == list, node); + return node; + } + } + else + { + dap_list_t *last; + + last = list; + while(last->next) + last = last->next; + + last->next = dap_list_alloc(); + last->next->data = data; + last->next->prev = last; + last->next->next = NULL; + + return list; + } +} + +/** + * dap_list_concat: + * @list1: a DapList, this must point to the top of the list + * @list2: the DapList to add to the end of the first DapList, + * this must point to the top of the list + * + * Adds the second DapList onto the end of the first DapList. + * Note that the elements of the second DapList are not copied. + * They are used directly. + * + * This function is for example used to move an element in the list. + * The following example moves an element to the top of the list: + * |[<!-- language="C" --> + * list = dap_list_remove_link (list, llink); + * list = dap_list_concat (llink, list); + * ]| + * + * Returns: the start of the new DapList, which equals @list1 if not %NULL + */ +dap_list_t *dap_list_concat(dap_list_t *list1, dap_list_t *list2) +{ + dap_list_t *tmp_list; + + if(list2) + { + tmp_list = dap_list_last(list1); + if(tmp_list) + tmp_list->next = list2; + else + list1 = list2; + list2->prev = tmp_list; + } + + return list1; +} + +static inline dap_list_t * _dap_list_remove_link(dap_list_t *list, dap_list_t *link) +{ + if(link == NULL) + return list; + + if(link->prev) + { + if(link->prev->next == link) + link->prev->next = link->next; + else + log_it(L_ERROR, "corrupted double-linked list detected"); + } + if(link->next) + { + if(link->next->prev == link) + link->next->prev = link->prev; + else + log_it(L_ERROR, "corrupted double-linked list detected"); + } + + if(link == list) + list = list->next; + + link->next = NULL; + link->prev = NULL; + + return list; +} + +/** + * dap_list_remove: + * @list: a DapList, this must point to the top of the list + * @data: the data of the element to remove + * + * Removes an element from a DapList. + * If two elements contain the same data, only the first is removed. + * If none of the elements contain the data, the DapList is unchanged. + * + * Returns: the (possibly changed) start of the DapList + */ +dap_list_t *dap_list_remove(dap_list_t *list, const void * data) +{ + dap_list_t *tmp; + + tmp = list; + while(tmp) + { + if(tmp->data != data) + tmp = tmp->next; + else + { + list = _dap_list_remove_link(list, tmp); + dap_list_free1(tmp); + + break; + } + } + return list; +} + +/** + * dap_list_remove_all: + * @list: a DapList, this must point to the top of the list + * @data: data to remove + * + * Removes all list nodes with data equal to @data. + * Returns the new head of the list. Contrast with + * dap_list_remove() which removes only the first node + * matching the given data. + * + * Returns: the (possibly changed) start of the DapList + */ +dap_list_t *dap_list_remove_all(dap_list_t *list, const void * data) +{ + dap_list_t *tmp = list; + + while(tmp) + { + if(tmp->data != data) + tmp = tmp->next; + else + { + dap_list_t *next = tmp->next; + + if(tmp->prev) + tmp->prev->next = next; + else + list = next; + if(next) + next->prev = tmp->prev; + + dap_list_free1(tmp); + tmp = next; + } + } + return list; +} + +/** + * dap_list_remove_link: + * @list: a DapList, this must point to the top of the list + * @llink: an element in the DapList + * + * Removes an element from a DapList, without freeing the element. + * The removed element's prev and next links are set to %NULL, so + * that it becomes a self-contained list with one element. + * + * This function is for example used to move an element in the list + * (see the example for dap_list_concat()) or to remove an element in + * the list before freeing its data: + * |[<!-- language="C" --> + * list = dap_list_remove_link (list, llink); + * free_some_data_that_may_access_the_list_again (llink->data); + * dap_list_free (llink); + * ]| + * + * Returns: the (possibly changed) start of the DapList + */ +dap_list_t *dap_list_remove_link(dap_list_t *list, dap_list_t *llink) +{ + return _dap_list_remove_link(list, llink); +} + +/** + * dap_list_delete_link: + * @list: a DapList, this must point to the top of the list + * @link_: node to delete from @list + * + * Removes the node link_ from the list and frees it. + * Compare this to dap_list_remove_link() which removes the node + * without freeing it. + * + * Returns: the (possibly changed) start of the DapList + */ +dap_list_t *dap_list_delete_link(dap_list_t *list, dap_list_t *link_) +{ + list = _dap_list_remove_link(list, link_); + dap_list_free1(link_); + + return list; +} + +/** + * dap_list_copy: + * @list: a DapList, this must point to the top of the list + * + * Copies a DapList. + * + * Note that this is a "shallow" copy. If the list elements + * consist of pointers to data, the pointers are copied but + * the actual data is not. See dap_list_copy_deep() if you need + * to copy the data as well. + * + * Returns: the start of the new list that holds the same data as @list + */ +dap_list_t *dap_list_copy(dap_list_t *list) +{ + return dap_list_copy_deep(list, NULL, NULL); +} + +/** + * dap_list_copy_deep: + * @list: a DapList, this must point to the top of the list + * @func: a copy function used to copy every element in the list + * @user_data: user data passed to the copy function @func, or %NULL + * + * Makes a full (deep) copy of a DapList. + * + * In contrast with dap_list_copy(), this function uses @func to make + * a copy of each list element, in addition to copying the list + * container itself. + * + * @func, as a #DapCopyFunc, takes two arguments, the data to be copied + * and a @user_data pointer. It's safe to pass %NULL as user_data, + * if the copy function takes only one argument. + * + * For instance, + * |[<!-- language="C" --> + * another_list = dap_list_copy_deep (list, (DapCopyFunc) dap_object_ref, NULL); + * ]| + * + * And, to entirely free the new list, you could do: + * |[<!-- language="C" --> + * dap_list_free_full (another_list, dap_object_unref); + * ]| + * + * Returns: the start of the new list that holds a full copy of @list, + * use dap_list_free_full() to free it + */ +dap_list_t *dap_list_copy_deep(dap_list_t *list, dap_callback_copy_t func, void* user_data) +{ + dap_list_t *new_list = NULL; + + if(list) + { + dap_list_t *last; + + new_list = dap_list_alloc(); + if(func) + new_list->data = func(list->data, user_data); + else + new_list->data = list->data; + new_list->prev = NULL; + last = new_list; + list = list->next; + while(list) + { + last->next = dap_list_alloc(); + last->next->prev = last; + last = last->next; + if(func) + last->data = func(list->data, user_data); + else + last->data = list->data; + list = list->next; + } + last->next = NULL; + } + + return new_list; +} + +/** + * dap_list_reverse: + * @list: a DapList, this must point to the top of the list + * + * Reverses a DapList. + * It simply switches the next and prev pointers of each element. + * + * Returns: the start of the reversed DapList + */ +dap_list_t * dap_list_reverse(dap_list_t *list) +{ + dap_list_t *last; + + last = NULL; + while(list) + { + last = list; + list = last->next; + last->next = last->prev; + last->prev = list; + } + + return last; +} + +/** + * dap_list_nth: + * @list: a DapList, this must point to the top of the list + * @n: the position of the element, counting from 0 + * + * Gets the element at the given position in a DapList. + * + * Returns: the element, or %NULL if the position is off + * the end of the DapList + */ +dap_list_t *dap_list_nth(dap_list_t *list, unsigned int n) +{ + while((n-- > 0) && list) + list = list->next; + + return list; +} + +/** + * dap_list_nth_prev: + * @list: a DapList + * @n: the position of the element, counting from 0 + * + * Gets the element @n places before @list. + * + * Returns: the element, or %NULL if the position is + * off the end of the DapList + */ +dap_list_t *dap_list_nth_prev(dap_list_t *list, unsigned int n) +{ + while((n-- > 0) && list) + list = list->prev; + + return list; +} + +/** + * dap_list_nth_data: + * @list: a DapList, this must point to the top of the list + * @n: the position of the element + * + * Gets the data of the element at the given position. + * + * Returns: the element's data, or %NULL if the position + * is off the end of the DapList + */ +void* dap_list_nth_data(dap_list_t *list, unsigned int n) +{ + while((n-- > 0) && list) + list = list->next; + + return list ? list->data : NULL ; +} + +/** + * dap_list_find: + * @list: a DapList, this must point to the top of the list + * @data: the element data to find + * + * Finds the element in a DapList which contains the given data. + * + * Returns: the found DapList element, or %NULL if it is not found + */ +dap_list_t *dap_list_find(dap_list_t *list, const void * data) +{ + while(list) + { + if(list->data == data) + break; + list = list->next; + } + + return list; +} + +/** + * dap_list_find_custom: + * @list: a DapList, this must point to the top of the list + * @data: user data passed to the function + * @func: the function to call for each element. + * It should return 0 when the desired element is found + * + * Finds an element in a DapList, using a supplied function to + * find the desired element. It iterates over the list, calling + * the given function which should return 0 when the desired + * element is found. The function takes two const pointer arguments, + * the DapList element's data as the first argument and the + * given user data. + * + * Returns: the found DapList element, or %NULL if it is not found + */ +dap_list_t *dap_list_find_custom(dap_list_t *list, const void * data, dap_callback_compare_t func) +{ + dap_return_val_if_fail(func != NULL, list); + + while(list) + { + if(!func(list->data, data)) + return list; + list = list->next; + } + + return NULL ; +} + +/** + * dap_list_position: + * @list: a DapList, this must point to the top of the list + * @llink: an element in the DapList + * + * Gets the position of the given element + * in the DapList (starting from 0). + * + * Returns: the position of the element in the DapList, + * or -1 if the element is not found + */ +int dap_list_position(dap_list_t *list, dap_list_t *llink) +{ + int i; + + i = 0; + while(list) + { + if(list == llink) + return i; + i++; + list = list->next; + } + + return -1; +} + +/** + * dap_list_index: + * @list: a DapList, this must point to the top of the list + * @data: the data to find + * + * Gets the position of the element containing + * the given data (starting from 0). + * + * Returns: the index of the element containing the data, + * or -1 if the data is not found + */ +int dap_list_index(dap_list_t *list, const void * data) +{ + int i; + + i = 0; + while(list) + { + if(list->data == data) + return i; + i++; + list = list->next; + } + + return -1; +} + +/** + * dap_list_last: + * @list: any DapList element + * + * Gets the last element in a DapList. + * + * Returns: the last element in the DapList, + * or %NULL if the DapList has no elements + */ +dap_list_t * dap_list_last(dap_list_t *list) +{ + if(list) + { + while(list->next) + list = list->next; + } + + return list; +} + +/** + * dap_list_first: + * @list: any DapList element + * + * Gets the first element in a DapList. + * + * Returns: the first element in the DapList, + * or %NULL if the DapList has no elements + */ +dap_list_t *dap_list_first(dap_list_t *list) +{ + if(list) + { + while(list->prev) + list = list->prev; + } + + return list; +} + +/** + * dap_list_length: + * @list: a DapList, this must point to the top of the list + * + * Gets the number of elements in a DapList. + * + * This function iterates over the whole list to count its elements. + * + * Returns: the number of elements in the DapList + */ +unsigned int dap_list_length(dap_list_t *list) +{ + unsigned int length; + + length = 0; + while(list) + { + length++; + list = list->next; + } + + return length; +} + +/** + * dap_list_foreach: + * @list: a DapList, this must point to the top of the list + * @func: the function to call with each element's data + * @user_data: user data to pass to the function + * + * Calls a function for each element of a DapList. + */ +void dap_list_foreach(dap_list_t *list, dap_callback_t func, void* user_data) +{ + while(list) + { + dap_list_t *next = list->next; + (*func)(list->data, user_data); + list = next; + } +} + +static dap_list_t* dap_list_insert_sorted_real(dap_list_t *list, void* data, dap_callback_t func, void* user_data) +{ + dap_list_t *tmp_list = list; + dap_list_t *new_list; + int cmp; + + dap_return_val_if_fail(func != NULL, list); + + if(!list) + { + new_list = dap_list_alloc0(); + new_list->data = data; + return new_list; + } + + cmp = ((dap_callback_compare_data_t) func)(data, tmp_list->data, user_data); + + while((tmp_list->next) && (cmp > 0)) + { + tmp_list = tmp_list->next; + + cmp = ((dap_callback_compare_data_t) func)(data, tmp_list->data, user_data); + } + + new_list = dap_list_alloc0(); + new_list->data = data; + + if((!tmp_list->next) && (cmp > 0)) + { + tmp_list->next = new_list; + new_list->prev = tmp_list; + return list; + } + + if(tmp_list->prev) + { + tmp_list->prev->next = new_list; + new_list->prev = tmp_list->prev; + } + new_list->next = tmp_list; + tmp_list->prev = new_list; + + if(tmp_list == list) + return new_list; + else + return list; +} + +/** + * dap_list_insert_sorted: + * @list: a pointer to a DapList, this must point to the top of the + * already sorted list + * @data: the data for the new element + * @func: the function to compare elements in the list. It should + * return a number > 0 if the first parameter comes after the + * second parameter in the sort order. + * + * Inserts a new element into the list, using the given comparison + * function to determine its position. + * + * If you are adding many new elements to a list, and the number of + * new elements is much larger than the length of the list, use + * dap_list_prepend() to add the new items and sort the list afterwards + * with dap_list_sort(). + * + * Returns: the (possibly changed) start of the DapList + */ +dap_list_t *dap_list_insert_sorted(dap_list_t *list, void* data, dap_callback_compare_t func) +{ + return dap_list_insert_sorted_real(list, data, (dap_callback_t) func, NULL); +} + +/** + * dap_list_insert_sorted_with_data: + * @list: a pointer to a DapList, this must point to the top of the + * already sorted list + * @data: the data for the new element + * @func: the function to compare elements in the list. It should + * return a number > 0 if the first parameter comes after the + * second parameter in the sort order. + * @user_data: user data to pass to comparison function + * + * Inserts a new element into the list, using the given comparison + * function to determine its position. + * + * If you are adding many new elements to a list, and the number of + * new elements is much larger than the length of the list, use + * dap_list_prepend() to add the new items and sort the list afterwards + * with dap_list_sort(). + * + * Returns: the (possibly changed) start of the DapList + */ +dap_list_t * dap_list_insert_sorted_with_data(dap_list_t *list, void* data, dap_callback_compare_data_t func, void* user_data) +{ + return dap_list_insert_sorted_real(list, data, (dap_callback_t) func, user_data); +} + +static dap_list_t *dap_list_sort_merge(dap_list_t *l1, dap_list_t *l2, dap_callback_t compare_func, void* user_data) +{ + dap_list_t list, *l, *lprev; + int cmp; + + l = &list; + lprev = NULL; + + while(l1 && l2) + { + cmp = ((dap_callback_compare_data_t) compare_func)(l1->data, l2->data, user_data); + + if(cmp <= 0) + { + l->next = l1; + l1 = l1->next; + } + else + { + l->next = l2; + l2 = l2->next; + } + l = l->next; + l->prev = lprev; + lprev = l; + } + l->next = l1 ? l1 : l2; + l->next->prev = l; + + return list.next; +} + +static dap_list_t *dap_list_sort_real(dap_list_t *list, dap_callback_t compare_func, void* user_data) +{ + dap_list_t *l1, *l2; + + if(!list) + return NULL ; + if(!list->next) + return list; + + l1 = list; + l2 = list->next; + + while((l2 = l2->next) != NULL ) + { + if((l2 = l2->next) == NULL) + break; + l1 = l1->next; + } + l2 = l1->next; + l1->next = NULL; + + return dap_list_sort_merge(dap_list_sort_real(list, compare_func, user_data), + dap_list_sort_real(l2, compare_func, user_data), + compare_func, + user_data); +} + +/** + * dap_list_sort: + * @list: a DapList, this must point to the top of the list + * @compare_func: the comparison function used to sort the DapList. + * This function is passed the data from 2 elements of the DapList + * and should return 0 if they are equal, a negative value if the + * first element comes before the second, or a positive value if + * the first element comes after the second. + * + * Sorts a DapList using the given comparison function. The algorithm + * used is a stable sort. + * + * Returns: the (possibly changed) start of the DapList + */ +/** + * DapCompareFunc: + * @a: a value + * @b: a value to compare with + * + * Specifies the type of a comparison function used to compare two + * values. The function should return a negative integer if the first + * value comes before the second, 0 if they are equal, or a positive + * integer if the first value comes after the second. + * + * Returns: negative value if @a < @b; zero if @a = @b; positive + * value if @a > @b + */ +dap_list_t *dap_list_sort(dap_list_t *list, dap_callback_compare_t compare_func) +{ + return dap_list_sort_real(list, (dap_callback_t) compare_func, NULL); +} + +/** + * dap_list_sort_with_data: + * @list: a DapList, this must point to the top of the list + * @compare_func: comparison function + * @user_data: user data to pass to comparison function + * + * Like dap_list_sort(), but the comparison function accepts + * a user data argument. + * + * Returns: the (possibly changed) start of the DapList + */ +/** + * DapCompareFunc: + * @a: a value + * @b: a value to compare with + * @user_data: user data + * + * Specifies the type of a comparison function used to compare two + * values. The function should return a negative integer if the first + * value comes before the second, 0 if they are equal, or a positive + * integer if the first value comes after the second. + * + * Returns: negative value if @a < @b; zero if @a = @b; positive + * value if @a > @b + */ +dap_list_t *dap_list_sort_with_data(dap_list_t *list, dap_callback_compare_data_t compare_func, void* user_data) +{ + return dap_list_sort_real(list, (dap_callback_t) compare_func, user_data); +} diff --git a/libdap/src/dap_lut.h b/libdap/src/dap_lut.h new file mode 100644 index 0000000000000000000000000000000000000000..70dafa0871cfd446fb919c4961ea178d18b747e4 --- /dev/null +++ b/libdap/src/dap_lut.h @@ -0,0 +1,22 @@ + +DAP_ALIGNED(16) uint16_t htoa_lut256[ 256 ] = { + + 0x3030, 0x3130, 0x3230, 0x3330, 0x3430, 0x3530, 0x3630, 0x3730, 0x3830, 0x3930, 0x4130, 0x4230, 0x4330, 0x4430, 0x4530, + 0x4630, 0x3031, 0x3131, 0x3231, 0x3331, 0x3431, 0x3531, 0x3631, 0x3731, 0x3831, 0x3931, 0x4131, 0x4231, 0x4331, 0x4431, + 0x4531, 0x4631, 0x3032, 0x3132, 0x3232, 0x3332, 0x3432, 0x3532, 0x3632, 0x3732, 0x3832, 0x3932, 0x4132, 0x4232, 0x4332, + 0x4432, 0x4532, 0x4632, 0x3033, 0x3133, 0x3233, 0x3333, 0x3433, 0x3533, 0x3633, 0x3733, 0x3833, 0x3933, 0x4133, 0x4233, + 0x4333, 0x4433, 0x4533, 0x4633, 0x3034, 0x3134, 0x3234, 0x3334, 0x3434, 0x3534, 0x3634, 0x3734, 0x3834, 0x3934, 0x4134, + 0x4234, 0x4334, 0x4434, 0x4534, 0x4634, 0x3035, 0x3135, 0x3235, 0x3335, 0x3435, 0x3535, 0x3635, 0x3735, 0x3835, 0x3935, + 0x4135, 0x4235, 0x4335, 0x4435, 0x4535, 0x4635, 0x3036, 0x3136, 0x3236, 0x3336, 0x3436, 0x3536, 0x3636, 0x3736, 0x3836, + 0x3936, 0x4136, 0x4236, 0x4336, 0x4436, 0x4536, 0x4636, 0x3037, 0x3137, 0x3237, 0x3337, 0x3437, 0x3537, 0x3637, 0x3737, + 0x3837, 0x3937, 0x4137, 0x4237, 0x4337, 0x4437, 0x4537, 0x4637, 0x3038, 0x3138, 0x3238, 0x3338, 0x3438, 0x3538, 0x3638, + 0x3738, 0x3838, 0x3938, 0x4138, 0x4238, 0x4338, 0x4438, 0x4538, 0x4638, 0x3039, 0x3139, 0x3239, 0x3339, 0x3439, 0x3539, + 0x3639, 0x3739, 0x3839, 0x3939, 0x4139, 0x4239, 0x4339, 0x4439, 0x4539, 0x4639, 0x3041, 0x3141, 0x3241, 0x3341, 0x3441, + 0x3541, 0x3641, 0x3741, 0x3841, 0x3941, 0x4141, 0x4241, 0x4341, 0x4441, 0x4541, 0x4641, 0x3042, 0x3142, 0x3242, 0x3342, + 0x3442, 0x3542, 0x3642, 0x3742, 0x3842, 0x3942, 0x4142, 0x4242, 0x4342, 0x4442, 0x4542, 0x4642, 0x3043, 0x3143, 0x3243, + 0x3343, 0x3443, 0x3543, 0x3643, 0x3743, 0x3843, 0x3943, 0x4143, 0x4243, 0x4343, 0x4443, 0x4543, 0x4643, 0x3044, 0x3144, + 0x3244, 0x3344, 0x3444, 0x3544, 0x3644, 0x3744, 0x3844, 0x3944, 0x4144, 0x4244, 0x4344, 0x4444, 0x4544, 0x4644, 0x3045, + 0x3145, 0x3245, 0x3345, 0x3445, 0x3545, 0x3645, 0x3745, 0x3845, 0x3945, 0x4145, 0x4245, 0x4345, 0x4445, 0x4545, 0x4645, + 0x3046, 0x3146, 0x3246, 0x3346, 0x3446, 0x3546, 0x3646, 0x3746, 0x3846, 0x3946, 0x4146, 0x4246, 0x4346, 0x4446, 0x4546, + 0x4646 +}; diff --git a/libdap/src/dap_module.c b/libdap/src/dap_module.c new file mode 100755 index 0000000000000000000000000000000000000000..de7c1d9374d60d78e25ae8b7e7aa376a3d804ecd --- /dev/null +++ b/libdap/src/dap_module.c @@ -0,0 +1,29 @@ +/* + * Authors: + * Dmitriy A. Gearasimov <gerasimov.dmitriy@demlabs.net> + * DeM Labs Inc. https://demlabs.net + * Kelvin Project https://gitlab.demlabs.net/cellframe + * Copyright (c) 2017-2018 + * All rights reserved. + + This file is part of DAP (Deus Applications Prototypes) the open source project + + DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DAP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with any DAP based project. If not, see <http://www.gnu.org/licenses/>. +*/ +#include "dap_common.h" +#include "dap_module.h" + +#define LOG_TAG "module" + + diff --git a/libdap/src/dap_strfuncs.c b/libdap/src/dap_strfuncs.c new file mode 100755 index 0000000000000000000000000000000000000000..29ef7430d33710fd19f1b532537f86625f9e4df6 --- /dev/null +++ b/libdap/src/dap_strfuncs.c @@ -0,0 +1,722 @@ +/* DAP String Functions */ +#ifdef _WIN32 +//#define _CRT_SECURE_NO_WARNINGS +#include <windows.h> +#endif +#include <stddef.h> +#include <stdio.h> +#include <stdlib.h> +#include <ctype.h> +#include <errno.h> + +#include "dap_common.h" +#include "dap_strfuncs.h" + +/** + * dap_strlen: + * @a_str: (nullable): the string + * + * If @a_str is %NULL it returns 0 + * + * Returns: length of the string + */ +size_t dap_strlen(const char *a_str) +{ + size_t l_length = 0; + + if(a_str) { + l_length = strlen(a_str); + } + return l_length; +} + +/** + * dap_strcmp: + * @a_str1: (nullable): the string + * @a_str2: (nullable): the string + * + * Compare a_str1 and a_str2 + */ +int dap_strcmp(const char *a_str1, const char *a_str2) +{ + if(a_str1 && a_str2) { + return strcmp(a_str1, a_str2); + } + return -1; +} + +/** + * dap_strcmp: + * @a_str1: (nullable): the string + * @a_str2: (nullable): the string + * + * Compare a_n characters of a_str1 and a_str2 + */ +int dap_strncmp(const char *a_str1, const char *a_str2, size_t a_n) +{ + if(a_str1 && a_str2) { + return strncmp(a_str1, a_str2, a_n); + } + return -1; +} + +/** + * dap_strdup: + * @a_str: (nullable): the string to duplicate + * + * Duplicates a string. If @a_str is %NULL it returns %NULL. + * The returned string should be freed + * when no longer needed. + * + * Returns: a newly-allocated copy of @a_str + */ +char* dap_strdup(const char *a_str) +{ + char *l_new_str; + size_t l_length; + + if(a_str) + { + l_length = (size_t) (strlen(a_str) + 1); + l_new_str = DAP_NEW_SIZE(char, l_length); + memcpy(l_new_str, a_str, l_length); + } + else + l_new_str = NULL; + + return l_new_str; +} + +/** + * dap_strdup_vprintf: + * @a_format: a standard printf() format string, but notice + * [string precision pitfalls][string-precision] + * @a_args: the list of parameters to insert into the format string + * + * Similar to the standard C vsprintf() function but safer, since it + * calculates the maximum space required and allocates memory to hold + * the result. The returned string should be freed with DAP_DELETE() + * when no longer needed. + * + * Returns: a newly-allocated string holding the result + */ +char* dap_strdup_vprintf(const char *a_format, va_list a_args) +{ + char *l_string = NULL; + int len = dap_vasprintf(&l_string, a_format, a_args); + if(len < 0) + l_string = NULL; + return l_string; +} + +/** + * dap_strdup_printf: + * @a_format: a standard printf() format string + * + * Similar to the standard C sprintf() function but safer, since it + * calculates the maximum space required and allocates memory to hold + * the result. The returned string should be freed with DAP_DELETE() + * when no longer needed. + * + * Returns: a newly-allocated string holding the result + */ +char* dap_strdup_printf(const char *a_format, ...) +{ + char *l_buffer; + va_list l_args; + + va_start(l_args, a_format); + l_buffer = dap_strdup_vprintf(a_format, l_args); + va_end(l_args); + + return l_buffer; +} + +/* + // alternative version + char* dap_strdup_printf2(const char *a_format, ...) + { + size_t l_buffer_size = 0; + char *l_buffer = NULL; + va_list l_args; + + va_start(l_args, a_format); + l_buffer_size += vsnprintf(l_buffer, 0, a_format, l_args); + va_end(l_args); + + if(!l_buffer_size) + return NULL; + l_buffer = DAP_NEW_SIZE(char, l_buffer_size + 1); + + va_start(l_args, a_format); + vsnprintf(l_buffer, l_buffer_size + 1, a_format, l_args); + va_end(l_args); + + return l_buffer; + }*/ + +/** + * dap_stpcpy: + * @a_dest: destination buffer. + * @a_src: source string. + * + * Copies a null-terminated string into the dest buffer, include the + * trailing null, and return a pointer to the trailing null byte. + * This is useful for concatenating multiple strings together + * without having to repeatedly scan for the end. + * + * Returns: a pointer to trailing null byte. + **/ +char* dap_stpcpy(char *a_dest, const char *a_src) +{ + char *l_d = a_dest; + const char *l_s = a_src; + + dap_return_val_if_fail(a_dest != NULL, NULL); + dap_return_val_if_fail(a_src != NULL, NULL); + do + *l_d++ = *l_s; + while(*l_s++ != '\0'); + + return l_d - 1; +} + +/** + * dap_strstr_len: + * @a_haystack: a string + * @a_haystack_len: the maximum length of @a_haystack. Note that -1 is + * a valid length, if @a_haystack is null-terminated, meaning it will + * search through the whole string. + * @a_needle: the string to search for + * + * Searches the string @a_haystack for the first occurrence + * of the string @a_needle, limiting the length of the search + * to @a_haystack_len. + * + * Returns: a pointer to the found occurrence, or + * %NULL if not found. + */ +char* dap_strstr_len(const char *a_haystack, ssize_t a_haystack_len, const char *a_needle) +{ + dap_return_val_if_fail(a_haystack != NULL, NULL); + dap_return_val_if_fail(a_needle != NULL, NULL); + + if(a_haystack_len < 0) + return strstr(a_haystack, a_needle); + else + { + const char *l_p = a_haystack; + ssize_t l_needle_len = (ssize_t) strlen(a_needle); + const char *l_end; + ssize_t l_i; + + if(l_needle_len == 0) + return (char *) a_haystack; + + if(a_haystack_len < l_needle_len) + return NULL; + + l_end = a_haystack + a_haystack_len - l_needle_len; + + while(l_p <= l_end && *l_p) + { + for(l_i = 0; l_i < l_needle_len; l_i++) + if(l_p[l_i] != a_needle[l_i]) + goto next; + + return (char *) l_p; + + next: + l_p++; + } + + return NULL; + } +} + +/** + * dap_strjoinv: + * @a_separator: (allow-none): a string to insert between each of the + * strings, or %NULL + * @a_str_array: a %NULL-terminated array of strings to join + * + * Joins a number of strings together to form one long string, with the + * optional @separator inserted between each of them. The returned string + * should be freed. + * + * If @str_array has no items, the return value will be an + * empty string. If @a_str_array contains a single item, @a_separator will not + * appear in the resulting string. + * + * Returns: a newly-allocated string containing all of the strings joined + * together, with @a_separator between them + */ +char* dap_strjoinv(const char *a_separator, char **a_str_array) +{ + char *l_string; + char *l_ptr; + + dap_return_val_if_fail(a_str_array != NULL, NULL); + + if(a_separator == NULL) + a_separator = ""; + + if(*a_str_array) + { + int l_i; + size_t l_len; + size_t l_separator_len; + + l_separator_len = strlen(a_separator); + /* First part, getting length */ + l_len = 1 + strlen(a_str_array[0]); + for(l_i = 1; a_str_array[l_i] != NULL; l_i++) + l_len += strlen(a_str_array[l_i]); + l_len += l_separator_len * (l_i - 1); + + /* Second part, building string */ + l_string = DAP_NEW_SIZE(char, l_len); + l_ptr = dap_stpcpy(l_string, *a_str_array); + for(l_i = 1; a_str_array[l_i] != NULL; l_i++) + { + l_ptr = dap_stpcpy(l_ptr, a_separator); + l_ptr = dap_stpcpy(l_ptr, a_str_array[l_i]); + } + } + else + l_string = dap_strdup(""); + + return l_string; +} + +/** + * dap_strjoin: + * @a_separator: (allow-none): a string to insert between each of the + * strings, or %NULL + * @...: a %NULL-terminated list of strings to join + * + * Joins a number of strings together to form one long string, with the + * optional @a_separator inserted between each of them. The returned string + * should be freed. + * + * Returns: a newly-allocated string containing all of the strings joined + * together, with @a_separator between them + */ +char* dap_strjoin(const char *a_separator, ...) +{ + char *string, *l_s; + va_list l_args; + size_t l_len; + size_t l_separator_len; + char *l_ptr; + + if(a_separator == NULL) + a_separator = ""; + + l_separator_len = strlen(a_separator); + + va_start(l_args, a_separator); + + l_s = va_arg(l_args, char*); + + if(l_s) + { + /* First part, getting length */ + l_len = 1 + strlen(l_s); + + l_s = va_arg(l_args, char*); + while(l_s) + { + l_len += l_separator_len + strlen(l_s); + l_s = va_arg(l_args, char*); + } + va_end(l_args); + + /* Second part, building string */ + string = DAP_NEW_SIZE(char, l_len); + + va_start(l_args, a_separator); + + l_s = va_arg(l_args, char*); + l_ptr = dap_stpcpy(string, l_s); + + l_s = va_arg(l_args, char*); + while(l_s) + { + l_ptr = dap_stpcpy(l_ptr, a_separator); + l_ptr = dap_stpcpy(l_ptr, l_s); + l_s = va_arg(l_args, char*); + } + } + else + string = dap_strdup(""); + + va_end(l_args); + + return string; +} + +typedef struct _dap_slist dap_slist; + +struct _dap_slist +{ + void* data; + dap_slist *next; +}; + +static dap_slist* dap_slist_prepend(dap_slist *a_list, void* a_data) +{ + dap_slist *l_new_list; + + l_new_list = DAP_NEW_Z(dap_slist); + l_new_list->data = a_data; + l_new_list->next = a_list; + + return l_new_list; +} + +static void dap_slist_free(dap_slist *a_list) +{ + if(a_list) + { + dap_slist *l_cur_node; + dap_slist *l_last_node = a_list; + while(l_last_node) + { + l_cur_node = l_last_node; + l_last_node = l_last_node->next; + DAP_DELETE(l_cur_node); + } + } +} + +/** + * dap_strsplit: + * @a_string: a string to split + * @a_delimiter: a string which specifies the places at which to split + * the string. The delimiter is not included in any of the resulting + * strings, unless @a_max_tokens is reached. + * @a_max_tokens: the maximum number of pieces to split @a_string into. + * If this is less than 1, the string is split completely. + * + * Splits a string into a maximum of @a_max_tokens pieces, using the given + * @a_delimiter. If @a_max_tokens is reached, the remainder of @a_string is + * appended to the last token. + * + * As an example, the result of dap_strsplit (":a:bc::d:", ":", -1) is a + * %NULL-terminated vector containing the six strings "", "a", "bc", "", "d" + * and "". + * + * As a special case, the result of splitting the empty string "" is an empty + * vector, not a vector containing a single string. The reason for this + * special case is that being able to represent a empty vector is typically + * more useful than consistent handling of empty elements. If you do need + * to represent empty elements, you'll need to check for the empty string + * before calling dap_strsplit(). + * + * Returns: a newly-allocated %NULL-terminated array of strings. + * Use dap_strfreev() to free it. + */ +char** dap_strsplit(const char *a_string, const char *a_delimiter, int a_max_tokens) +{ + dap_slist *l_string_list = NULL, *l_slist; + char **l_str_array, *l_s; + uint32_t l_n = 1; + + dap_return_val_if_fail(a_string != NULL, NULL); + dap_return_val_if_fail(a_delimiter != NULL, NULL); + + if(a_max_tokens < 1) + a_max_tokens = INT_MAX; + + l_s = strstr(a_string, a_delimiter); + if(l_s) + { + uint32_t delimiter_len = (uint32_t) strlen(a_delimiter); + + do + { + uint32_t len; + char *new_string; + + len = (uint32_t) (l_s - a_string); + new_string = DAP_NEW_SIZE(char, len + 1); + strncpy(new_string, a_string, len); + new_string[len] = 0; + l_string_list = dap_slist_prepend(l_string_list, new_string); + l_n++; + a_string = l_s + delimiter_len; + l_s = strstr(a_string, a_delimiter); + } + while(--a_max_tokens && l_s); + } + l_string_list = dap_slist_prepend(l_string_list, dap_strdup(a_string)); + + l_str_array = DAP_NEW_SIZE(char*, (l_n + 1) * sizeof(char*)); + + l_str_array[l_n--] = NULL; + for(l_slist = l_string_list; l_slist; l_slist = l_slist->next) + l_str_array[l_n--] = l_slist->data; + + dap_slist_free(l_string_list); + + return l_str_array; +} + +size_t dap_str_countv(char **a_str_array) +{ + size_t l_i = 0; + if(a_str_array) + { + for(l_i = 0; a_str_array[l_i] != NULL; l_i++) + ; + } + return l_i; +} + +/** + * dap_strdupv: + * @a_str_array: (nullable): a %NULL-terminated array of strings + * + * Copies %NULL-terminated array of strings. The copy is a deep copy; + * the new array should be freed by first freeing each string, then + * the array itself. g_strfreev() does this for you. If called + * on a %NULL value, g_strdupv() simply returns %NULL. + * + * Returns: (nullable): a new %NULL-terminated array of strings. + */ +char** dap_strdupv(const char **a_str_array) +{ + if(a_str_array) + { + int l_i; + char **l_retval; + + l_i = 0; + while(a_str_array[l_i]) + ++l_i; + + l_retval = DAP_NEW_SIZE(char*, (l_i + 1) * sizeof(char*)); + + l_i = 0; + while(a_str_array[l_i]) + { + l_retval[l_i] = dap_strdup(a_str_array[l_i]); + ++l_i; + } + l_retval[l_i] = NULL; + + return l_retval; + } + else + return NULL; +} + +/** + * dap_strfreev: + * @a_str_array: (nullable): a %NULL-terminated array of strings to free + * + * Frees a %NULL-terminated array of strings, as well as each + * string it contains. + * + * If @a_str_array is %NULL, this function simply returns. + */ +void dap_strfreev(char **a_str_array) +{ + if(a_str_array) + { + int l_i; + for(l_i = 0; a_str_array[l_i] != NULL; l_i++) + DAP_DELETE(a_str_array[l_i]); + + DAP_DELETE(a_str_array); + } +} + +/** + * dap_strchug: + * @a_string: a string to remove the leading whitespace from + * + * Removes leading whitespace from a string, by moving the rest + * of the characters forward. + * + * This function doesn't allocate or reallocate any memory; + * it modifies @a_string in place. Therefore, it cannot be used on + * statically allocated strings. + * + * The pointer to @a_string is returned to allow the nesting of functions. + * Returns: @a_string + */ +char* dap_strchug(char *a_string) +{ + unsigned char *l_start; + + dap_return_val_if_fail(a_string != NULL, NULL); + + for(l_start = (unsigned char*) a_string; *l_start && dap_ascii_isspace(*l_start); l_start++) + ; + + memmove(a_string, l_start, strlen((char *) l_start) + 1); + + return a_string; +} + +/** + * dap_strchomp: + * @a_string: a string to remove the trailing whitespace from + * + * Removes trailing whitespace from a string. + * + * This function doesn't allocate or reallocate any memory; + * it modifies @a_string in place. Therefore, it cannot be used + * on statically allocated strings. + * + * The pointer to @a_string is returned to allow the nesting of functions. + * + * Returns: @a_string + */ +char* dap_strchomp(char *a_string) +{ + size_t l_len; + + dap_return_val_if_fail(a_string != NULL, NULL); + + l_len = (size_t) strlen(a_string); + while(l_len--) + { + if(dap_ascii_isspace((unsigned char ) a_string[l_len])) + a_string[l_len] = '\0'; + else + break; + } + return a_string; +} + +/** + * dap_strup: + * @a_str: a string + * @a_len: length of @a_str in bytes, or -1 if @a_str is nul-terminated + * + * Converts all lower case ASCII letters to upper case ASCII letters. + * + * Returns: a newly allocated string, with all the lower case + * characters in @a_str converted to upper case + */ +char* dap_strup(const char *a_str, ssize_t a_len) +{ + char *l_result, *l_s; + + dap_return_val_if_fail(a_str != NULL, NULL); + + if(a_len < 0) + a_len = strlen(a_str); + + l_result = strndup(a_str, a_len); + for(l_s = l_result; *l_s; l_s++) + *l_s = toupper(*l_s); + + return l_result; +} + +/** + * dap_strdown: + * @a_str: a string + * @a_len: length of @a_str in bytes, or -1 if @a_str is nul-terminated + * + * Converts all upper case ASCII letters to lower case ASCII letters. + * + * Returns: a newly-allocated string, with all the upper case + * characters in @a_str converted to lower case + */ +char* dap_strdown(const char *a_str, ssize_t a_len) +{ + char *l_result, *l_s; + + dap_return_val_if_fail(a_str != NULL, NULL); + + if(a_len < 0) + a_len = strlen(a_str); + + l_result = strndup(a_str, a_len); + for(l_s = l_result; *l_s; l_s++) + *l_s = tolower(*l_s); + + return l_result; +} + +/** + * dap_strreverse: + * @a_string: the string to reverse + * + * Reverses all of the bytes in a string. For example, + * `dap_strreverse("abcdef")` will result in "fedcba". + * + * Note that g_strreverse() doesn't work on UTF-8 strings + * containing multibyte characters. + * + * Returns: the same pointer passed in as @a_string + */ +char* dap_strreverse(char *a_string) +{ + dap_return_val_if_fail(a_string != NULL, NULL); + + if(*a_string) + { + register char *l_h, *l_t; + + l_h = a_string; + l_t = a_string + strlen(a_string) - 1; + + while(l_h < l_t) + { + register char l_c; + + l_c = *l_h; + *l_h = *l_t; + l_h++; + *l_t = l_c; + l_t--; + } + } + + return a_string; +} + +#ifdef _WIN32 +char *strptime( char *buff, const char *fmt, struct tm *tm ) { + uint32_t len = strlen( buff ); + dap_sscanf( buff,"%u.%u.%u_%u.%u.%u",&tm->tm_year, &tm->tm_mon, &tm->tm_mday, &tm->tm_hour, &tm->tm_min, &tm->tm_sec ); + tm->tm_year += 2000; + return buff + len; +} + +char *_strndup(char *str, unsigned long len) { + char *buf = (char*)memchr(str, '\0', len); + if (buf) + len = buf - str; + buf = (char*)malloc(len + 1); + memcpy(buf, str, len); + buf[len] = '\0'; + return buf; +} +#endif + +/** + * dap_usleep: + * @a_microseconds: number of microseconds to pause + * + * Pauses the current thread for the given number of microseconds. + */ +void dap_usleep(time_t a_microseconds) +{ +#ifdef _WIN32 + Sleep (a_microseconds / 1000); +#else + struct timespec l_request, l_remaining; + l_request.tv_sec = a_microseconds / DAP_USEC_PER_SEC; + l_request.tv_nsec = 1000 * (a_microseconds % DAP_USEC_PER_SEC); + while(nanosleep(&l_request, &l_remaining) == -1 && errno == EINTR) + l_request = l_remaining; +#endif +} + diff --git a/libdap/src/dap_string.c b/libdap/src/dap_string.c new file mode 100755 index 0000000000000000000000000000000000000000..072107e390f4b55d887f83bdf3f901c47fb29fa7 --- /dev/null +++ b/libdap/src/dap_string.c @@ -0,0 +1,917 @@ +// dap_string_t is an object that handles the memory management of a C string for you. + +#include <stdarg.h> +#include <stddef.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <ctype.h> + +#include "dap_common.h" +#include "dap_strfuncs.h" +#include "dap_string.h" + +#define MY_MAXSIZE ((size_t)-1) + +static inline size_t nearest_power(size_t a_base, size_t a_num) +{ + if(a_num > MY_MAXSIZE / 2) { + return MY_MAXSIZE; + } + else { + size_t l_n = a_base; + + while(l_n < a_num) + l_n <<= 1; + + return l_n; + } +} + +static void dap_string_maybe_expand(dap_string_t *a_string, size_t a_len) +{ + if(a_string->len + a_len >= a_string->allocated_len) { + a_string->allocated_len = nearest_power(1, a_string->len + a_len + 1); + + /*char *l_str = DAP_NEW_Z_SIZE(char, a_string->allocated_len); + if(a_string->str) + strcpy(l_str, a_string->str); + DAP_DELETE(a_string->str); + a_string->str = l_str;*/ + a_string->str = DAP_REALLOC(a_string->str, a_string->allocated_len); + } +} + +/** + * dap_string_sized_new: + * @a_a_dfl_size: the default size of the space allocated to + * hold the string + * + * Creates a new #dap_string_t, with enough space for @a_a_dfl_size + * bytes. This is useful if you are going to add a lot of + * text to the string and don't want it to be reallocated + * too often. + * + * Returns: the new #dap_string_t + */ +dap_string_t * dap_string_sized_new(size_t a_dfl_size) +{ + dap_string_t *l_string = DAP_NEW(dap_string_t); + + l_string->allocated_len = 0; + l_string->len = 0; + l_string->str = NULL; + + dap_string_maybe_expand(l_string, max(a_dfl_size, 2)); + l_string->str[0] = 0; + + return l_string; +} + +/** + * dap_string_new: + * @a_a_init: (nullable): the initial text to copy into the string, or %NULL to + * start with an empty string + * + * Creates a new #dap_string_t, initialized with the given string. + * + * Returns: the new #dap_string_t + */ +dap_string_t* dap_string_new(const char *a_init) +{ + dap_string_t *l_string; + + if(a_init == NULL || *a_init == '\0') + l_string = dap_string_sized_new(2); + else + { + int len; + + len = strlen(a_init); + l_string = dap_string_sized_new(len + 2); + + dap_string_append_len(l_string, a_init, len); + } + + return l_string; +} + +/** + * dap_string_new_len: + * @a_init: initial contents of the string + * @a_len: length of @a_init to use + * + * Creates a new #dap_string_t with @a_len bytes of the @a_init buffer. + * Because a length is provided, @a_init need not be nul-terminated, + * and can contain embedded nul bytes. + * + * Since this function does not stop at nul bytes, it is the caller's + * responsibility to ensure that @a_init has at least @a_len addressable + * bytes. + * + * Returns: a new #dap_string_t + */ +dap_string_t* dap_string_new_len(const char *a_init, ssize_t a_len) +{ + dap_string_t *l_string; + + if(a_len < 0) + return dap_string_new(a_init); + else + { + l_string = dap_string_sized_new(a_len); + + if(a_init) + dap_string_append_len(l_string, a_init, a_len); + + return l_string; + } +} + +/** + * dap_string_free: + * @a_string: (transfer full): a #dap_string_t + * @a_free_segment: if %true, the actual character data is freed as well + * + * Frees the memory allocated for the #dap_string_t. + * If @a_free_segment is %true it also frees the character data. If + * it's %false, the caller gains ownership of the buffer and must + * free it after use with dap_free(). + * + * Returns: (nullable): the character data of @a_string + * (i.e. %NULL if @a_free_segment is %true) + */ +char* dap_string_free(dap_string_t *a_string, bool a_free_segment) +{ + char *l_segment; + + dap_return_val_if_fail(a_string != NULL, NULL); + + if(a_free_segment) + { + DAP_DELETE(a_string->str); + l_segment = NULL; + } + else + l_segment = a_string->str; + + DAP_DELETE(a_string); + + return l_segment; +} + +/** + * dap_string_equal: + * @a_v: a #dap_string_t + * @a_v2: another #dap_string_t + * + * Compares two strings for equality, returning %true if they are equal. + * For use with #GHashTable. + * + * Returns: %true if the strings are the same length and contain the + * same bytes + */ +bool dap_string_equal(const dap_string_t *a_v, const dap_string_t *a_v2) +{ + char *p, *q; + dap_string_t *l_string1 = (dap_string_t *) a_v; + dap_string_t *l_string2 = (dap_string_t *) a_v2; + size_t i = l_string1->len; + + if(i != l_string2->len) + return false; + + p = l_string1->str; + q = l_string2->str; + while(i) + { + if(*p != *q) + return false; + p++; + q++; + i--; + } + return true; +} + +/** + * dap_string_hash: + * @a_str: a string to hash + * + * Creates a hash code for @a_str + * + * Returns: hash code for @a_str + */ +unsigned int dap_string_hash(const dap_string_t *a_str) +{ + const char *p = a_str->str; + size_t n = a_str->len; + unsigned int h = 0; + + /* 31 bit hash function */ + while(n--) + { + h = (h << 5) - h + *p; + p++; + } + + return h; +} + +/** + * dap_string_assign: + * @a_string: the destination #dap_string_t. Its current contents + * are destroyed. + * @a_rval: the string to copy into @a_string + * + * Copies the bytes from a string into a #dap_string_t, + * destroying any previous contents. It is rather like + * the standard strcpy() function, except that you do not + * have to worry about having enough space to copy the string. + * + * Returns: (transfer none): @a_string + */ +dap_string_t* dap_string_assign(dap_string_t *a_string, const char *a_rval) +{ + dap_return_val_if_fail(a_string != NULL, NULL); + dap_return_val_if_fail(a_rval != NULL, a_string); + + /* Make sure assigning to itself doesn't corrupt the string. */ + if(a_string->str != a_rval) + { + /* Assigning from substring should be ok, since + * dap_string_truncate() does not reallocate. + */ + dap_string_truncate(a_string, 0); + dap_string_append(a_string, a_rval); + } + + return a_string; +} + +/** + * dap_string_truncate: + * @a_string: a #dap_string_t + * @a_len: the new size of @a_string + * + * Cuts off the end of the dap_string_t, leaving the first @a_len bytes. + * + * Returns: (transfer none): @a_string + */ +dap_string_t* dap_string_truncate(dap_string_t *string, size_t len) +{ + dap_return_val_if_fail(string != NULL, NULL); + + string->len = min(len, string->len); + string->str[string->len] = 0; + + return string; +} + +/** + * dap_string_set_size: + * @a_string: a #dap_string_t + * @a_len: the new length + * + * Sets the length of a #dap_string_t. If the length is less than + * the current length, the string will be truncated. If the + * length is greater than the current length, the contents + * of the newly added area are undefined. (However, as + * always, string->str[string->len] will be a nul byte.) + * + * Returns: (transfer none): @a_string + */ +dap_string_t* dap_string_set_size(dap_string_t *string, size_t len) +{ + dap_return_val_if_fail(string != NULL, NULL); + + if(len >= string->allocated_len) + dap_string_maybe_expand(string, len - string->len); + + string->len = len; + string->str[len] = 0; + + return string; +} + +/** + * dap_string_insert_len: + * @a_string: a #dap_string_t + * @a_pos: position in @a_string where insertion should + * happen, or -1 for at the end + * @a_val: bytes to insert + * @a_len: number of bytes of @a_val to insert + * + * Inserts @a_len bytes of @a_val into @a_string at @a_pos. + * Because @a_len is provided, @a_val may contain embedded + * nuls and need not be nul-terminated. If @a_pos is -1, + * bytes are inserted at the end of the string. + * + * Since this function does not stop at nul bytes, it is + * the caller's responsibility to ensure that @a_val has at + * least @a_len addressable bytes. + * + * Returns: (transfer none): @a_string + */ +dap_string_t* dap_string_insert_len(dap_string_t *string, ssize_t pos, const char *val, ssize_t len) +{ + dap_return_val_if_fail(string != NULL, NULL); + dap_return_val_if_fail(len == 0 || val != NULL, string); + + if(len == 0) + return string; + + if(len < 0) + len = strlen(val); + + if(pos < 0) + pos = string->len; + else + dap_return_val_if_fail((size_t )pos <= string->len, string); + + /* Check whether val represents a substring of string. + * This test probably violates chapter and verse of the C standards, + * since ">=" and "<=" are only valid when val really is a substring. + * In practice, it will work on modern archs. + */ + if(val >= string->str && val <= string->str + string->len) + { + size_t offset = val - string->str; + size_t precount = 0; + + dap_string_maybe_expand(string, len); + val = string->str + offset; + /* At this point, val is valid again. */ + + /* Open up space where we are going to insert. */ + if((size_t) pos < string->len) + memmove(string->str + pos + len, string->str + pos, string->len - pos); + + /* Move the source part before the gap, if any. */ + if(offset < (size_t) pos) { + precount = min(len, pos - (ssize_t )offset); + memcpy(string->str + pos, val, precount); + } + + /* Move the source part after the gap, if any. */ + if((size_t) len > precount) + memcpy(string->str + pos + precount, + val + /* Already moved: */precount + /* Space opened up: */len, + len - precount); + } + else + { + dap_string_maybe_expand(string, len); + + /* If we aren't appending at the end, move a hunk + * of the old string to the end, opening up space + */ + if((size_t) pos < string->len) + memmove(string->str + pos + len, string->str + pos, string->len - pos); + + /* insert the new string */ + if(len == 1) + string->str[pos] = *val; + else + memcpy(string->str + pos, val, len); + } + + string->len += len; + + string->str[string->len] = 0; + + return string; +} + +/** + * dap_string_append: + * @a_string: a #dap_string_t + * @a_val: the string to append onto the end of @a_string + * + * Adds a string onto the end of a #dap_string_t, expanding + * it if necessary. + * + * Returns: (transfer none): @a_string + */ +dap_string_t* dap_string_append(dap_string_t *string, const char *val) +{ + return dap_string_insert_len(string, -1, val, -1); +} + +/** + * dap_string_append_len: + * @a_string: a #dap_string_t + * @a_val: bytes to append + * @a_len: number of bytes of @a_val to use + * + * Appends @a_len bytes of @a_val to @a_string. Because @a_len is + * provided, @a_val may contain embedded nuls and need not + * be nul-terminated. + * + * Since this function does not stop at nul bytes, it is + * the caller's responsibility to ensure that @a_val has at + * least @a_len addressable bytes. + * + * Returns: (transfer none): @a_string + */ +dap_string_t* dap_string_append_len(dap_string_t *string, const char *val, ssize_t len) +{ + return dap_string_insert_len(string, -1, val, len); +} + +/** + * dap_string_append_c: + * @a_string: a #dap_string_t + * @a_c: the byte to append onto the end of @a_string + * + * Adds a byte onto the end of a #dap_string_t, expanding + * it if necessary. + * + * Returns: (transfer none): @a_string + */ +#undef dap_string_append_c +dap_string_t* dap_string_append_c(dap_string_t *string, char c) +{ + dap_return_val_if_fail(string != NULL, NULL); + + return dap_string_insert_c(string, -1, c); +} + +/** + * dap_string_append_unichar: + * @a_string: a #dap_string_t + * @a_wc: a Unicode character + * + * Converts a Unicode character into UTF-8, and appends it + * to the string. + * + * Returns: (transfer none): @a_string + */ +dap_string_t* dap_string_append_unichar(dap_string_t *string, uint32_t wc) +{ + dap_return_val_if_fail(string != NULL, NULL); + + return dap_string_insert_unichar(string, -1, wc); +} + +/** + * dap_string_prepend: + * @a_string: a #dap_string_t + * @a_val: the string to prepend on the start of @a_string + * + * Adds a string on to the start of a #dap_string_t, + * expanding it if necessary. + * + * Returns: (transfer none): @a_string + */ +dap_string_t* dap_string_prepend(dap_string_t *string, const char *val) +{ + return dap_string_insert_len(string, 0, val, -1); +} + +/** + * dap_string_prepend_len: + * @a_string: a #dap_string_t + * @a_val: bytes to prepend + * @a_len: number of bytes in @a_val to prepend + * + * Prepends @a_len bytes of @a_val to @a_string. + * Because @a_len is provided, @a_val may contain + * embedded nuls and need not be nul-terminated. + * + * Since this function does not stop at nul bytes, + * it is the caller's responsibility to ensure that + * @a_val has at least @a_len addressable bytes. + * + * Returns: (transfer none): @a_string + */ +dap_string_t* dap_string_prepend_len(dap_string_t *string, const char *val, ssize_t len) +{ + return dap_string_insert_len(string, 0, val, len); +} + +/** + * dap_string_prepend_c: + * @a_string: a #dap_string_t + * @a_c: the byte to prepend on the start of the #dap_string_t + * + * Adds a byte onto the start of a #dap_string_t, + * expanding it if necessary. + * + * Returns: (transfer none): @a_string + */ +dap_string_t* dap_string_prepend_c(dap_string_t *string, char c) +{ + dap_return_val_if_fail(string != NULL, NULL); + + return dap_string_insert_c(string, 0, c); +} + +/** + * dap_string_prepend_unichar: + * @a_string: a #dap_string_t + * @a_wc: a Unicode character + * + * Converts a Unicode character into UTF-8, and prepends it + * to the string. + * + * Returns: (transfer none): @a_string + */ +dap_string_t* dap_string_prepend_unichar(dap_string_t *string, uint32_t wc) +{ + dap_return_val_if_fail(string != NULL, NULL); + + return dap_string_insert_unichar(string, 0, wc); +} + +/** + * dap_string_insert: + * @a_string: a #dap_string_t + * @a_pos: the position to insert the copy of the string + * @a_val: the string to insert + * + * Inserts a copy of a string into a #dap_string_t, + * expanding it if necessary. + * + * Returns: (transfer none): @a_string + */ +dap_string_t* dap_string_insert(dap_string_t *string, ssize_t pos, const char *val) +{ + return dap_string_insert_len(string, pos, val, -1); +} + +/** + * dap_string_insert_c: + * @a_string: a #dap_string_t + * @a_pos: the position to insert the byte + * @a_c: the byte to insert + * + * Inserts a byte into a #dap_string_t, expanding it if necessary. + * + * Returns: (transfer none): @a_string + */ +dap_string_t* dap_string_insert_c(dap_string_t *string, ssize_t pos, char c) +{ + dap_return_val_if_fail(string != NULL, NULL); + + dap_string_maybe_expand(string, 1); + + if(pos < 0) + pos = string->len; + else + dap_return_val_if_fail((size_t )pos <= string->len, string); + + /* If not just an append, move the old stuff */ + if((size_t) pos < string->len) + memmove(string->str + pos + 1, string->str + pos, string->len - pos); + + string->str[pos] = c; + + string->len += 1; + + string->str[string->len] = 0; + + return string; +} + +/** + * dap_string_insert_unichar: + * @a_string: a #dap_string_t + * @a_pos: the position at which to insert character, or -1 + * to append at the end of the string + * @a_wc: a Unicode character + * + * Converts a Unicode character into UTF-8, and insert it + * into the string at the given position. + * + * Returns: (transfer none): @a_string + */ +dap_string_t* dap_string_insert_unichar(dap_string_t *string, ssize_t pos, uint32_t wc) +{ + int charlen, first, i; + char *dest; + + dap_return_val_if_fail(string != NULL, NULL); + + /* Code copied from dap_unichar_to_utf() */ + if(wc < 0x80) + { + first = 0; + charlen = 1; + } + else if(wc < 0x800) + { + first = 0xc0; + charlen = 2; + } + else if(wc < 0x10000) + { + first = 0xe0; + charlen = 3; + } + else if(wc < 0x200000) + { + first = 0xf0; + charlen = 4; + } + else if(wc < 0x4000000) + { + first = 0xf8; + charlen = 5; + } + else + { + first = 0xfc; + charlen = 6; + } + /* End of copied code */ + + dap_string_maybe_expand(string, charlen); + + if(pos < 0) + pos = string->len; + else + dap_return_val_if_fail((size_t )pos <= string->len, string); + + /* If not just an append, move the old stuff */ + if((size_t) pos < string->len) + memmove(string->str + pos + charlen, string->str + pos, string->len - pos); + + dest = string->str + pos; + /* Code copied from dap_unichar_to_utf() */ + for(i = charlen - 1; i > 0; --i) + { + dest[i] = (wc & 0x3f) | 0x80; + wc >>= 6; + } + dest[0] = wc | first; + /* End of copied code */ + + string->len += charlen; + + string->str[string->len] = 0; + + return string; +} + +/** + * dap_string_overwrite: + * @a_string: a #dap_string_t + * @a_pos: the position at which to start overwriting + * @a_val: the string that will overwrite the @a_string starting at @a_pos + * + * Overwrites part of a string, lengthening it if necessary. + * + * Returns: (transfer none): @a_string + */ +dap_string_t* dap_string_overwrite(dap_string_t *string, size_t pos, const char *val) +{ + dap_return_val_if_fail(val != NULL, string); + return dap_string_overwrite_len(string, pos, val, strlen(val)); +} + +/** + * dap_string_overwrite_len: + * @a_string: a #dap_string_t + * @a_pos: the position at which to start overwriting + * @a_val: the string that will overwrite the @a_string starting at @a_pos + * @a_len: the number of bytes to write from @a_val + * + * Overwrites part of a string, lengthening it if necessary. + * This function will work with embedded nuls. + * + * Returns: (transfer none): @a_string + */ +dap_string_t* dap_string_overwrite_len(dap_string_t *string, size_t pos, const char *val, ssize_t len) +{ + size_t end; + + dap_return_val_if_fail(string != NULL, NULL); + + if(!len) + return string; + + dap_return_val_if_fail(val != NULL, string); + dap_return_val_if_fail(pos <= string->len, string); + + if(len < 0) + len = strlen(val); + + end = pos + len; + + if(end > string->len) + dap_string_maybe_expand(string, end - string->len); + + memcpy(string->str + pos, val, len); + + if(end > string->len) + { + string->str[end] = '\0'; + string->len = end; + } + + return string; +} + +/** + * dap_string_erase: + * @a_string: a #dap_string_t + * @a_pos: the position of the content to remove + * @a_len: the number of bytes to remove, or -1 to remove all + * following bytes + * + * Removes @a_len bytes from a #dap_string_t, starting at position @a_pos. + * The rest of the #dap_string_t is shifted down to fill the gap. + * + * Returns: (transfer none): @a_string + */ +dap_string_t* dap_string_erase(dap_string_t *string, ssize_t pos, ssize_t len) +{ + dap_return_val_if_fail(string != NULL, NULL); + dap_return_val_if_fail(pos >= 0, string); + dap_return_val_if_fail((size_t )pos <= string->len, string); + + if(len < 0) + len = string->len - pos; + else + { + dap_return_val_if_fail((size_t )(pos + len) <= string->len, string); + + if((size_t) (pos + len) < string->len) + memmove(string->str + pos, string->str + pos + len, string->len - (pos + len)); + } + + string->len -= len; + + string->str[string->len] = 0; + + return string; +} + +/** + * dap_string_down: + * @a_string: a #dap_string_t + * + * Converts a #dap_string_t to lowercase. + * + * Returns: (transfer none): the #dap_string_t + * + * Deprecated:2.2: This function uses the locale-specific + * tolower() function, which is almost never the right thing. + * Use dap_string_ascii_down() or dap_utf8_strdown() instead. + */ +dap_string_t* dap_string_down(dap_string_t *string) +{ + uint8_t *s; + long n; + + dap_return_val_if_fail(string != NULL, NULL); + + n = string->len; + s = (uint8_t *) string->str; + + while(n) + { + if(isupper(*s)) + *s = tolower(*s); + s++; + n--; + } + + return string; +} + +/** + * dap_string_up: + * @a_string: a #dap_string_t + * + * Converts a #dap_string_t to uppercase. + * + * Returns: (transfer none): @a_string + * + * Deprecated:2.2: This function uses the locale-specific + * toupper() function, which is almost never the right thing. + * Use dap_string_ascii_up() or dap_utf8_strup() instead. + */ +dap_string_t* dap_string_up(dap_string_t *string) +{ + uint8_t *s; + long n; + + dap_return_val_if_fail(string != NULL, NULL); + + n = string->len; + s = (uint8_t *) string->str; + + while(n) + { + if(islower(*s)) + *s = toupper(*s); + s++; + n--; + } + + return string; +} + +/** + * dap_string_append_vprintf: + * @a_string: a #dap_string_t + * @a_format: the string format. See the printf() documentation + * @a_args: the list of arguments to insert in the output + * + * Appends a formatted string onto the end of a #dap_string_t. + * This function is similar to dap_string_append_printf() + * except that the arguments to the format string are passed + * as a va_list. + */ +void dap_string_append_vprintf(dap_string_t *string, const char *format, va_list args) +{ + char *buf; + int len; + + dap_return_if_fail(string != NULL); + dap_return_if_fail(format != NULL); + + len = dap_vasprintf(&buf, format, args); + + if(len >= 0) { + dap_string_maybe_expand(string, len); + memcpy(string->str + string->len, buf, len + 1); + string->len += len; + DAP_DELETE(buf); + } +} + +/** + * dap_string_vprintf: + * @a_string: a #dap_string_t + * @a_format: the string format. See the printf() documentation + * @a_args: the parameters to insert into the format string + * + * Writes a formatted string into a #dap_string_t. + * This function is similar to dap_string_printf() except that + * the arguments to the format string are passed as a va_list. + */ +void dap_string_vprintf(dap_string_t *string, const char *format, va_list args) +{ + dap_string_truncate(string, 0); + dap_string_append_vprintf(string, format, args); +} + +/** + * dap_string_sprintf: + * @a_string: a #dap_string_t + * @a_format: the string format. See the sprintf() documentation + * @...: the parameters to insert into the format string + * + * Writes a formatted string into a #dap_string_t. + * This is similar to the standard sprintf() function, + * except that the #dap_string_t buffer automatically expands + * to contain the results. The previous contents of the + * #dap_string_t are destroyed. + * + * Deprecated: This function has been renamed to dap_string_printf(). + */ + +/** + * dap_string_printf: + * @a_string: a #dap_string_t + * @a_format: the string format. See the printf() documentation + * @...: the parameters to insert into the format string + * + * Writes a formatted string into a #dap_string_t. + * This is similar to the standard sprintf() function, + * except that the #dap_string_t buffer automatically expands + * to contain the results. The previous contents of the + * #dap_string_t are destroyed. + */ +void dap_string_printf(dap_string_t *string, const char *format, ...) +{ + va_list args; + + dap_string_truncate(string, 0); + + va_start(args, format); + dap_string_append_vprintf(string, format, args); + va_end(args); +} + +/** + * dap_string_append_printf: + * @a_string: a #dap_string_t + * @a_format: the string format. See the printf() documentation + * @...: the parameters to insert into the format string + * + * Appends a formatted string onto the end of a #dap_string_t. + * This function is similar to dap_string_printf() except + * that the text is appended to the #dap_string_t. + */ +void dap_string_append_printf(dap_string_t *string, const char *format, ...) +{ + va_list args; + + va_start(args, format); + dap_string_append_vprintf(string, format, args); + va_end(args); +} diff --git a/libdap/src/darwin/CMakeLists.txt b/libdap/src/darwin/CMakeLists.txt new file mode 100755 index 0000000000000000000000000000000000000000..8f981d542da3e9b9540f764c97ee0a8fda60f7c1 --- /dev/null +++ b/libdap/src/darwin/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.0) + +project (dap_core_darwin) + +file(GLOB CORE_DARWIN_SRCS *.c) +file(GLOB CORE_DARWIN_HEADERS *.h) + +if(DARWIN) + file(GLOB CORE_MACOS_SRCS macos/*.c) + file(GLOB CORE_MACOS_HEADERS macos/*.h) +endif() + +add_library(${PROJECT_NAME} STATIC ${CORE_DARWIN_SRCS} ${CORE_DARWIN_HEADERS} + ${CORE_MACOS_SRCS} ${CORE_MACOS_HEADERS}) + +target_link_libraries(${PROJECT_NAME} dap_core pthread) + diff --git a/libdap/src/darwin/darwin.pri b/libdap/src/darwin/darwin.pri new file mode 100755 index 0000000000000000000000000000000000000000..d8afafc897de6181a09fb9556a66b5e330915177 --- /dev/null +++ b/libdap/src/darwin/darwin.pri @@ -0,0 +1,5 @@ +macos { + include(macos/macos.pri) +} + +INCLUDEPATH += $$PWD diff --git a/libdap/src/darwin/macos/dap_network_monitor.c b/libdap/src/darwin/macos/dap_network_monitor.c new file mode 100755 index 0000000000000000000000000000000000000000..f66c7156c476b4365d01f1ae515c392cad71edfe --- /dev/null +++ b/libdap/src/darwin/macos/dap_network_monitor.c @@ -0,0 +1,329 @@ +#include <SystemConfiguration/SystemConfiguration.h> +#include <CoreFoundation/CoreFoundation.h> +#include <CoreFoundation/CFDictionary.h> +#include <CoreFoundation/CFArray.h> +#include <CoreFoundation/CFString.h> +#include <pthread.h> +#include <string.h> +#include <unistd.h> + +#include "dap_network_monitor.h" +#include "dap_common.h" +#include "pthread_barrier.h" + + +#define LOG_TAG "dap_network_monitor" + +static SCDynamicStoreRef s_store = NULL; +static CFRunLoopSourceRef s_rls; +#define __bridge + +static void* network_monitor_worker(void *arg); + +static struct { + CFRunLoopRef rlref; + pthread_t thread; + dap_network_monitor_notification_callback_t callback; +} _net_notification; + + +void watch_for_network_changes() +{ + SCDynamicStoreContext context = { 0, (void *)s_store, NULL, NULL, NULL }; + + s_store = SCDynamicStoreCreate(NULL, CFSTR("watch_for_network_changes"), _net_notification.callback, &context); + if (!s_store) { + log_it(L_ERROR, "Could not open session with config.error = %s\n", SCErrorString(SCError())); + return; + } + +/* +* establish and register dynamic store keys to watch +* - global IPv4 configuration changes (e.g. new default route) +* - per-service IPv4 state changes (IP service added/removed/...) +*/ + CFStringRef key1 = SCDynamicStoreKeyCreateNetworkGlobalEntity (NULL, kSCDynamicStoreDomainState, kSCEntNetIPv4); + CFStringRef key2 = SCDynamicStoreKeyCreateNetworkInterfaceEntity (NULL, kSCDynamicStoreDomainState, kSCCompAnyRegex, kSCEntNetIPv4); + CFStringRef key3 = SCDynamicStoreKeyCreateNetworkServiceEntity (NULL, kSCDynamicStoreDomainState, kSCCompAnyRegex, kSCEntNetIPv4); + CFStringRef pattern1 = SCDynamicStoreKeyCreateNetworkInterfaceEntity (NULL, kSCDynamicStoreDomainState, kSCCompAnyRegex, kSCEntNetIPv4); + CFStringRef pattern2 = SCDynamicStoreKeyCreateNetworkInterfaceEntity (NULL, kSCDynamicStoreDomainState, kSCCompAnyRegex, kSCEntNetInterface); + CFStringRef pattern3 = SCDynamicStoreKeyCreateNetworkGlobalEntity (NULL, kSCDynamicStoreDomainState, kSCEntNetIPv4); + CFStringRef pattern4 = SCDynamicStoreKeyCreateNetworkGlobalEntity (NULL, kSCDynamicStoreDomainState, kSCEntNetInterface); + CFStringRef pattern5 = SCDynamicStoreKeyCreateNetworkServiceEntity (NULL, kSCDynamicStoreDomainState, kSCCompAnyRegex, kSCEntNetIPv4); + CFStringRef pattern6 = SCDynamicStoreKeyCreateNetworkServiceEntity (NULL, kSCDynamicStoreDomainState, kSCCompAnyRegex, kSCEntNetInterface); + CFMutableArrayRef keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + CFMutableArrayRef patterns = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + + if (!key1 || !key2 || !key3 || !keys || !pattern1 || !pattern2 || !pattern3 || !pattern4 || !pattern5 || !pattern6 || !patterns) goto error; + + CFArrayAppendValue(keys, key1); + CFArrayAppendValue(keys, key2); + CFArrayAppendValue(keys, key3); + CFArrayAppendValue(patterns, pattern1); + CFArrayAppendValue(patterns, pattern2); + CFArrayAppendValue(patterns, pattern3); + CFArrayAppendValue(patterns, pattern4); + CFArrayAppendValue(patterns, pattern5); + CFArrayAppendValue(patterns, pattern6); + + if (SCDynamicStoreSetNotificationKeys(s_store, keys, patterns)){ + s_rls = SCDynamicStoreCreateRunLoopSource(NULL, s_store, 0); + if (s_rls) { + CFRunLoopAddSource(CFRunLoopGetCurrent(), s_rls, kCFRunLoopDefaultMode); + }else{ + log_it(L_ERROR, "SCDynamicStoreCreateRunLoopSource failed: %s\n", SCErrorString(SCError())); + CFRelease(s_store); + } + }else { + log_it(L_ERROR, "SCDynamicStoreSetNotificationKeys failed: %s\n", SCErrorString(SCError())); + CFRelease(s_store); + } + goto exit; + + error: + if (s_store) CFRelease(s_store); + + exit: + if (key1) CFRelease(key1); + if (key2) CFRelease(key2); + if (key3) CFRelease(key3); + if (pattern1) CFRelease(pattern1); + if (pattern2) CFRelease(pattern2); + if (pattern3) CFRelease(pattern3); + if (pattern4) CFRelease(pattern4); + if (pattern5) CFRelease(pattern5); + if (pattern6) CFRelease(pattern6); + if (keys) CFRelease(keys); + if (patterns) CFRelease(patterns); + return; +} + + +/** + * @brief dap_network_monitor_init + * @param callback + * @details starts network monitorting + * @return 0 if successful + */ +int dap_network_monitor_init(dap_network_monitor_notification_callback_t cbMonitorNatification) +{ + memset((void*)&_net_notification, 0, sizeof(_net_notification)); + _net_notification.callback = cbMonitorNatification; + + pthread_barrier_t barrier; + + pthread_barrier_init(&barrier, NULL, 2); + if(pthread_create(&_net_notification.thread, NULL, network_monitor_worker, &barrier) != 0) { + log_it(L_ERROR, "Error create notification thread"); + return -3; + } + + pthread_barrier_wait(&barrier); + + pthread_barrier_destroy(&barrier); + + log_it(L_INFO, "dap_network_monitor was initialized"); + return 0; +} + +/** + * @brief dap_network_monitor_deinit + */ +void dap_network_monitor_deinit(void) +{ + CFRunLoopStop(_net_notification.rlref); + //log_it(L_INFO, "After stopping run loop cycle"); + pthread_cancel(_net_notification.thread); + //log_it(L_INFO, "After cancelation monitor thread!"); + pthread_join(_net_notification.thread, NULL); + //log_it(L_INFO, "After deinit that wonderfull monitor!"); +} + + + +static void* network_monitor_worker(void *arg) +{ + pthread_barrier_t *barrier = (pthread_barrier_t *)arg; + watch_for_network_changes(); + pthread_barrier_wait(barrier); + _net_notification.rlref = CFRunLoopGetCurrent(); + CFRunLoopRun(); + log_it(L_WARNING, "We are in the loop activity and won't have to see this message!"); + return NULL; +} + + + + + +//////////////////////////////////////////////////////////////// +// Usefull functions for future processing changes to interfaces + +static OSStatus MoreSCErrorBoolean(Boolean success) +{ + OSStatus err; + int scErr; + + err = noErr; + if ( ! success ) { + scErr = SCError(); + if (scErr == kSCStatusOK) { + scErr = kSCStatusFailed; + } + // Return an SCF error directly as an OSStatus. + // That's a little cheesy. In a real program + // you might want to do some mapping from SCF + // errors to a range within the OSStatus range. + err = scErr; + } + return err; +} + +static OSStatus MoreSCError(const void *value) +{ + return MoreSCErrorBoolean(value != NULL); +} + +static OSStatus CFQError(CFTypeRef cf) + // Maps Core Foundation error indications (such as they + // are) to the OSStatus domain. +{ + OSStatus err; + + err = noErr; + if (cf == NULL) { + err = -4960; + } + return err; +} + +static void CFQRelease(CFTypeRef cf) + // A version of CFRelease that's tolerant of NULL. +{ + if (cf != NULL) { + CFRelease(cf); + } +} + + +static void GetIPAddressListFromValue(const void *key, + const void *value, + void *context) + // This function is a callback CopyIPAddressListSCF when + // it calls CFDictionaryApplyFunction. It extracts the + // IPv4 address list from the network service dictionary + // and appends it to the result dictionary (which is passed + // in via the context pointers). +{ + CFArrayRef intfAddrList; + + assert( key != NULL ); + assert( CFGetTypeID(key) == CFStringGetTypeID() ); + assert( value != NULL ); + assert( CFGetTypeID(value) == CFDictionaryGetTypeID() ); + assert( context != NULL ); + assert( CFGetTypeID(context) == CFArrayGetTypeID() ); + + //CFDictionaryRef _value = (CFDictionaryRef) value; + struct __CFDictionary * _value = (__bridge struct __CFDictionary *) value; + intfAddrList = (__bridge struct __CFArray *) CFDictionaryGetValue(_value, + kSCPropNetIPv4Addresses); + if (intfAddrList != NULL) { + assert( CFGetTypeID(intfAddrList) + == CFArrayGetTypeID() ); + struct __CFArray * _context = (__bridge struct __CFArray *) context; + CFArrayAppendArray(_context, + intfAddrList, + CFRangeMake(0, CFArrayGetCount(intfAddrList)) + ); + } + +} + +static OSStatus CopyIPAddressListSCF(CFArrayRef *addrList) + // Returns a CFArray that contains every IPv4 + // address on the system (as CFStrings) in no + // particular order. +{ + OSStatus err; + SCDynamicStoreRef ref; + CFStringRef pattern; + CFArrayRef patternList; + CFDictionaryRef valueDict; + CFMutableArrayRef result; + + assert( addrList != NULL); + assert(*addrList == NULL); + + ref = NULL; + pattern = NULL; + patternList = NULL; + valueDict = NULL; + result = NULL; + + // Create a connection to the dynamic store, then create + // a search pattern that finds all IPv4 entities. + // The pattern is "State:/Network/Service/[^/]+/IPv4". + ref = SCDynamicStoreCreate( NULL, + CFSTR("CopyIPAddressListSCF"), + NULL, + NULL); + err = MoreSCError(ref); + if (err == noErr) { + pattern = SCDynamicStoreKeyCreateNetworkInterfaceEntity( + NULL, + kSCDynamicStoreDomainState, + kSCCompAnyRegex, + kSCEntNetIPv4); + err = MoreSCError(pattern); + } + + // Now make a pattern list out of the pattern and then + // call SCDynamicStoreCopyMultiple. We use that call, + // rather than repeated calls to SCDynamicStoreCopyValue, + // because it gives us a snapshot of the state. + if (err == noErr) { + patternList = CFArrayCreate(NULL, + (const void **) &pattern, + 1, + &kCFTypeArrayCallBacks); + err = CFQError(patternList); + } + if (err == noErr) { + valueDict = SCDynamicStoreCopyMultiple(ref, + NULL, + patternList); + err = MoreSCError(valueDict); + } + + // For each IPv4 entity that we found, extract the list + // of IP addresses and append it to our results array. + if (err == noErr) { + result = CFArrayCreateMutable(NULL, 0, + &kCFTypeArrayCallBacks); + err = CFQError(result); + } + + // Iterate over the values, extracting the IP address + // arrays and appending them to the result. + if (err == noErr) { + CFDictionaryApplyFunction(valueDict, + GetIPAddressListFromValue, + result); + } + // Clean up. + + CFQRelease(ref); + CFQRelease(pattern); + CFQRelease(patternList); + if (err != noErr && result != NULL) { + CFQRelease(result); + result = NULL; + printf("10\n"); + } + *addrList = result; + + assert( (err == noErr) == (*addrList != NULL) ); + + return err; +} diff --git a/libdap/src/darwin/macos/dap_network_monitor.h b/libdap/src/darwin/macos/dap_network_monitor.h new file mode 100755 index 0000000000000000000000000000000000000000..7421eafe891fd8243cbbffe4fc95eaaf645fadb2 --- /dev/null +++ b/libdap/src/darwin/macos/dap_network_monitor.h @@ -0,0 +1,53 @@ +/* + * Authors: + * Anton Isaikin <anton.isaikin@demlabs.net> + * DeM Labs Inc. https://demlabs.net + * DeM Labs Open source community https://gitlab.demlabs.net/cellframe + * Copyright (c) 2017-2019 + * All rights reserved. + + This file is part of DAP (Deus Applications Prototypes) the open source project + + DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DAP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with any DAP based project. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifdef __cplusplus +extern "C" { +#endif + +#pragma once + +#include <CoreFoundation/CoreFoundation.h> +#include <SystemConfiguration/SystemConfiguration.h> +#include <CoreFoundation/CFArray.h> + +typedef void (*dap_network_monitor_notification_callback_t) + (SCDynamicStoreRef store, CFArrayRef changedKeys, void *info); +/** + * @brief dap_network_monitor_init + * @param callback + * @details starts network monitorting + * @return 0 if successful + */ +int dap_network_monitor_init(dap_network_monitor_notification_callback_t callback); + +/** + * @brief dap_network_monitor_deinit + */ +void dap_network_monitor_deinit(void); + + +#ifdef __cplusplus +} +#endif diff --git a/libdap/src/darwin/macos/macos.pri b/libdap/src/darwin/macos/macos.pri new file mode 100755 index 0000000000000000000000000000000000000000..1fb87f8d0207d2a315b72571d834a1e6cf321a90 --- /dev/null +++ b/libdap/src/darwin/macos/macos.pri @@ -0,0 +1,10 @@ +HEADERS += $$PWD/dap_network_monitor.h \ +HEADERS += $$PWD/pthread_barrier.h + +SOURCES += $$PWD/dap_network_monitor.c + +INCLUDEPATH += $$PWD + +LIBS += -framework CoreFoundation +LIBS += -framework SystemConfiguration +#LIBS += -framework NetworkExtension diff --git a/libdap/src/darwin/macos/pthread_barrier.h b/libdap/src/darwin/macos/pthread_barrier.h new file mode 100755 index 0000000000000000000000000000000000000000..e1f5a8da888205764fbed7949dc77184552a0fb0 --- /dev/null +++ b/libdap/src/darwin/macos/pthread_barrier.h @@ -0,0 +1,65 @@ +#ifndef PTHREAD_BARRIER_H +#define PTHREAD_BARRIER_H + +#include <pthread.h> +#include <errno.h> + +typedef int pthread_barrierattr_t; +typedef struct +{ + pthread_mutex_t mutex; + pthread_cond_t cond; + int count; + int tripCount; +} pthread_barrier_t; + + +int pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count) +{ + if(count == 0) + { + errno = EINVAL; + return -1; + } + if(pthread_mutex_init(&barrier->mutex, 0) < 0) + { + return -2; + } + if(pthread_cond_init(&barrier->cond, 0) < 0) + { + pthread_mutex_destroy(&barrier->mutex); + return -3; + } + barrier->tripCount = count; + barrier->count = 0; + + return 0; +} + +int pthread_barrier_destroy(pthread_barrier_t *barrier) +{ + pthread_cond_destroy(&barrier->cond); + pthread_mutex_destroy(&barrier->mutex); + return 0; +} + +int pthread_barrier_wait(pthread_barrier_t *barrier) +{ + pthread_mutex_lock(&barrier->mutex); + ++(barrier->count); + if(barrier->count >= barrier->tripCount) + { + barrier->count = 0; + pthread_cond_broadcast(&barrier->cond); + pthread_mutex_unlock(&barrier->mutex); + return 1; + } + else + { + pthread_cond_wait(&barrier->cond, &(barrier->mutex)); + pthread_mutex_unlock(&barrier->mutex); + return 0; + } +} + +#endif // PTHREAD_BARRIER_H diff --git a/libdap/src/rpmalloc/rpmalloc.c b/libdap/src/rpmalloc/rpmalloc.c new file mode 100644 index 0000000000000000000000000000000000000000..8b1bbcdfa549ed4552d0b487f47db5b00652fab8 --- /dev/null +++ b/libdap/src/rpmalloc/rpmalloc.c @@ -0,0 +1,2491 @@ +/* rpmalloc.c - Memory allocator - Public Domain - 2016 Mattias Jansson + * + * This library provides a cross-platform lock free thread caching malloc implementation in C11. + * The latest source code is always available at + * + * https://github.com/mjansson/rpmalloc + * + * This library is put in the public domain; you can redistribute it and/or modify it without any restrictions. + * + */ + +#include "rpmalloc.h" + +/// Build time configurable limits +#ifndef HEAP_ARRAY_SIZE +//! Size of heap hashmap +#define HEAP_ARRAY_SIZE 47 +#endif +#ifndef ENABLE_THREAD_CACHE +//! Enable per-thread cache +#define ENABLE_THREAD_CACHE 1 +#endif +#ifndef ENABLE_GLOBAL_CACHE +//! Enable global cache shared between all threads, requires thread cache +#define ENABLE_GLOBAL_CACHE 1 +#endif +#ifndef ENABLE_VALIDATE_ARGS +//! Enable validation of args to public entry points +#define ENABLE_VALIDATE_ARGS 0 +#endif +#ifndef ENABLE_STATISTICS +//! Enable statistics collection +#define ENABLE_STATISTICS 0 +#endif +#ifndef ENABLE_ASSERTS +//! Enable asserts +#define ENABLE_ASSERTS 0 +#endif +#ifndef ENABLE_OVERRIDE +//! Override standard library malloc/free and new/delete entry points +#define ENABLE_OVERRIDE 0 +#endif +#ifndef ENABLE_PRELOAD +//! Support preloading +#define ENABLE_PRELOAD 0 +#endif +#ifndef DISABLE_UNMAP +//! Disable unmapping memory pages +#define DISABLE_UNMAP 0 +#endif +#ifndef DEFAULT_SPAN_MAP_COUNT +//! Default number of spans to map in call to map more virtual memory (default values yield 4MiB here) +#define DEFAULT_SPAN_MAP_COUNT 64 +#endif + +#if ENABLE_THREAD_CACHE +#ifndef ENABLE_UNLIMITED_CACHE +//! Unlimited thread and global cache +#define ENABLE_UNLIMITED_CACHE 0 +#endif +#ifndef ENABLE_UNLIMITED_THREAD_CACHE +//! Unlimited cache disables any thread cache limitations +#define ENABLE_UNLIMITED_THREAD_CACHE ENABLE_UNLIMITED_CACHE +#endif +#if !ENABLE_UNLIMITED_THREAD_CACHE +#ifndef THREAD_CACHE_MULTIPLIER +//! Multiplier for thread cache (cache limit will be span release count multiplied by this value) +#define THREAD_CACHE_MULTIPLIER 16 +#endif +#ifndef ENABLE_ADAPTIVE_THREAD_CACHE +//! Enable adaptive size of per-thread cache (still bounded by THREAD_CACHE_MULTIPLIER hard limit) +#define ENABLE_ADAPTIVE_THREAD_CACHE 0 +#endif +#endif +#endif + +#if ENABLE_GLOBAL_CACHE && ENABLE_THREAD_CACHE +#ifndef ENABLE_UNLIMITED_GLOBAL_CACHE +//! Unlimited cache disables any global cache limitations +#define ENABLE_UNLIMITED_GLOBAL_CACHE ENABLE_UNLIMITED_CACHE +#endif +#if !ENABLE_UNLIMITED_GLOBAL_CACHE +//! Multiplier for global cache (cache limit will be span release count multiplied by this value) +#define GLOBAL_CACHE_MULTIPLIER (THREAD_CACHE_MULTIPLIER * 6) +#endif +#else +# undef ENABLE_GLOBAL_CACHE +# define ENABLE_GLOBAL_CACHE 0 +#endif + +#if !ENABLE_THREAD_CACHE || ENABLE_UNLIMITED_THREAD_CACHE +# undef ENABLE_ADAPTIVE_THREAD_CACHE +# define ENABLE_ADAPTIVE_THREAD_CACHE 0 +#endif + +#if DISABLE_UNMAP && !ENABLE_GLOBAL_CACHE +# error Must use global cache if unmap is disabled +#endif + +#if defined( _WIN32 ) || defined( __WIN32__ ) || defined( _WIN64 ) +# define PLATFORM_WINDOWS 1 +# define PLATFORM_POSIX 0 +#else +# define PLATFORM_WINDOWS 0 +# define PLATFORM_POSIX 1 +#endif + +/// Platform and arch specifics +#if defined(_MSC_VER) && !defined(__clang__) +# define FORCEINLINE inline __forceinline +# define _Static_assert static_assert +#else +# define FORCEINLINE inline __attribute__((__always_inline__)) +#endif +#if PLATFORM_WINDOWS +# define WIN32_LEAN_AND_MEAN +# include <windows.h> +# if ENABLE_VALIDATE_ARGS +# include <Intsafe.h> +# endif +#else +# include <unistd.h> +# include <stdio.h> +# include <stdlib.h> +# if defined(__APPLE__) +# include <mach/mach_vm.h> +# include <pthread.h> +# endif +# if defined(__HAIKU__) +# include <OS.h> +# include <pthread.h> +# endif +#endif + +#include <stdint.h> +#include <string.h> + +#if ENABLE_ASSERTS +# undef NDEBUG +# if defined(_MSC_VER) && !defined(_DEBUG) +# define _DEBUG +# endif +# include <assert.h> +#else +# undef assert +# define assert(x) do {} while(0) +#endif +#if ENABLE_STATISTICS +# include <stdio.h> +#endif + +/// Atomic access abstraction +#if defined(_MSC_VER) && !defined(__clang__) + +typedef volatile long atomic32_t; +typedef volatile long long atomic64_t; +typedef volatile void* atomicptr_t; + +#define atomic_thread_fence_acquire() +#define atomic_thread_fence_release() + +static FORCEINLINE int32_t atomic_load32(atomic32_t* src) { return *src; } +static FORCEINLINE void atomic_store32(atomic32_t* dst, int32_t val) { *dst = val; } +static FORCEINLINE int32_t atomic_incr32(atomic32_t* val) { return (int32_t)_InterlockedExchangeAdd(val, 1) + 1; } +static FORCEINLINE int32_t atomic_add32(atomic32_t* val, int32_t add) { return (int32_t)_InterlockedExchangeAdd(val, add) + add; } +static FORCEINLINE void* atomic_load_ptr(atomicptr_t* src) { return (void*)*src; } +static FORCEINLINE void atomic_store_ptr(atomicptr_t* dst, void* val) { *dst = val; } +# if defined(__LLP64__) || defined(__LP64__) || defined(_WIN64) +static FORCEINLINE int atomic_cas_ptr(atomicptr_t* dst, void* val, void* ref) { return (_InterlockedCompareExchange64((volatile long long*)dst, (long long)val, (long long)ref) == (long long)ref) ? 1 : 0; } +#else +static FORCEINLINE int atomic_cas_ptr(atomicptr_t* dst, void* val, void* ref) { return (_InterlockedCompareExchange((volatile long*)dst, (long)val, (long)ref) == (long)ref) ? 1 : 0; } +#endif + +#define EXPECTED(x) (x) +#define UNEXPECTED(x) (x) + +#else + +#include <stdatomic.h> + +typedef volatile _Atomic(int32_t) atomic32_t; +typedef volatile _Atomic(int64_t) atomic64_t; +typedef volatile _Atomic(void*) atomicptr_t; + +#define atomic_thread_fence_acquire() atomic_thread_fence(memory_order_acquire) +#define atomic_thread_fence_release() atomic_thread_fence(memory_order_release) + +static FORCEINLINE int32_t atomic_load32(atomic32_t* src) { return atomic_load_explicit(src, memory_order_relaxed); } +static FORCEINLINE void atomic_store32(atomic32_t* dst, int32_t val) { atomic_store_explicit(dst, val, memory_order_relaxed); } +static FORCEINLINE int32_t atomic_incr32(atomic32_t* val) { return atomic_fetch_add_explicit(val, 1, memory_order_relaxed) + 1; } +static FORCEINLINE int32_t atomic_add32(atomic32_t* val, int32_t add) { return atomic_fetch_add_explicit(val, add, memory_order_relaxed) + add; } +static FORCEINLINE void* atomic_load_ptr(atomicptr_t* src) { return atomic_load_explicit(src, memory_order_relaxed); } +static FORCEINLINE void atomic_store_ptr(atomicptr_t* dst, void* val) { atomic_store_explicit(dst, val, memory_order_relaxed); } +static FORCEINLINE int atomic_cas_ptr(atomicptr_t* dst, void* val, void* ref) { return atomic_compare_exchange_weak_explicit(dst, &ref, val, memory_order_release, memory_order_acquire); } + +#define EXPECTED(x) __builtin_expect((x), 1) +#define UNEXPECTED(x) __builtin_expect((x), 0) + +#endif + +/// Preconfigured limits and sizes +//! Granularity of a small allocation block +#define SMALL_GRANULARITY 16 +//! Small granularity shift count +#define SMALL_GRANULARITY_SHIFT 4 +//! Number of small block size classes +#define SMALL_CLASS_COUNT 65 +//! Maximum size of a small block +#define SMALL_SIZE_LIMIT (SMALL_GRANULARITY * (SMALL_CLASS_COUNT - 1)) +//! Granularity of a medium allocation block +#define MEDIUM_GRANULARITY 512 +//! Medium granularity shift count +#define MEDIUM_GRANULARITY_SHIFT 9 +//! Number of medium block size classes +#define MEDIUM_CLASS_COUNT 61 +//! Total number of small + medium size classes +#define SIZE_CLASS_COUNT (SMALL_CLASS_COUNT + MEDIUM_CLASS_COUNT) +//! Number of large block size classes +#define LARGE_CLASS_COUNT 32 +//! Maximum size of a medium block +#define MEDIUM_SIZE_LIMIT (SMALL_SIZE_LIMIT + (MEDIUM_GRANULARITY * MEDIUM_CLASS_COUNT)) +//! Maximum size of a large block +#define LARGE_SIZE_LIMIT ((LARGE_CLASS_COUNT * _memory_span_size) - SPAN_HEADER_SIZE) +//! Size of a span header (must be a multiple of SMALL_GRANULARITY) +#define SPAN_HEADER_SIZE 96 + +#if ENABLE_VALIDATE_ARGS +//! Maximum allocation size to avoid integer overflow +#undef MAX_ALLOC_SIZE +#define MAX_ALLOC_SIZE (((size_t)-1) - _memory_span_size) +#endif + +#define pointer_offset(ptr, ofs) (void*)((char*)(ptr) + (ptrdiff_t)(ofs)) +#define pointer_diff(first, second) (ptrdiff_t)((const char*)(first) - (const char*)(second)) + +#define INVALID_POINTER ((void*)((uintptr_t)-1)) + +/// Data types +//! A memory heap, per thread +typedef struct heap_t heap_t; +//! Heap spans per size class +typedef struct heap_class_t heap_class_t; +//! Span of memory pages +typedef struct span_t span_t; +//! Span list +typedef struct span_list_t span_list_t; +//! Span active data +typedef struct span_active_t span_active_t; +//! Size class definition +typedef struct size_class_t size_class_t; +//! Global cache +typedef struct global_cache_t global_cache_t; + +//! Flag indicating span is the first (master) span of a split superspan +#define SPAN_FLAG_MASTER 1U +//! Flag indicating span is a secondary (sub) span of a split superspan +#define SPAN_FLAG_SUBSPAN 2U +//! Flag indicating span has blocks with increased alignment +#define SPAN_FLAG_ALIGNED_BLOCKS 4U + +#if ENABLE_ADAPTIVE_THREAD_CACHE || ENABLE_STATISTICS +struct span_use_t { + //! Current number of spans used (actually used, not in cache) + uint32_t current; + //! High water mark of spans used + uint32_t high; +#if ENABLE_STATISTICS + //! Number of spans transitioned to global cache + uint32_t spans_to_global; + //! Number of spans transitioned from global cache + uint32_t spans_from_global; + //! Number of spans transitioned to thread cache + uint32_t spans_to_cache; + //! Number of spans transitioned from thread cache + uint32_t spans_from_cache; + //! Number of spans transitioned to reserved state + uint32_t spans_to_reserved; + //! Number of spans transitioned from reserved state + uint32_t spans_from_reserved; + //! Number of raw memory map calls + uint32_t spans_map_calls; +#endif +}; +typedef struct span_use_t span_use_t; +#endif + +#if ENABLE_STATISTICS +struct size_class_use_t { + //! Current number of allocations + atomic32_t alloc_current; + //! Peak number of allocations + int32_t alloc_peak; + //! Total number of allocations + int32_t alloc_total; + //! Total number of frees + atomic32_t free_total; + //! Number of spans transitioned to cache + uint32_t spans_to_cache; + //! Number of spans transitioned from cache + uint32_t spans_from_cache; + //! Number of spans transitioned from reserved state + uint32_t spans_from_reserved; + //! Number of spans mapped + uint32_t spans_map_calls; +}; +typedef struct size_class_use_t size_class_use_t; +#endif + +typedef enum span_state_t { + SPAN_STATE_ACTIVE = 0, + SPAN_STATE_PARTIAL, + SPAN_STATE_FULL +} span_state_t; + +//A span can either represent a single span of memory pages with size declared by span_map_count configuration variable, +//or a set of spans in a continuous region, a super span. Any reference to the term "span" usually refers to both a single +//span or a super span. A super span can further be divided into multiple spans (or this, super spans), where the first +//(super)span is the master and subsequent (super)spans are subspans. The master span keeps track of how many subspans +//that are still alive and mapped in virtual memory, and once all subspans and master have been unmapped the entire +//superspan region is released and unmapped (on Windows for example, the entire superspan range has to be released +//in the same call to release the virtual memory range, but individual subranges can be decommitted individually +//to reduce physical memory use). +struct span_t { + //! Free list + void* free_list; + //! State + uint32_t state; + //! Used count when not active (not including deferred free list) + uint32_t used_count; + //! Block count + uint32_t block_count; + //! Size class + uint32_t size_class; + //! Index of last block initialized in free list + uint32_t free_list_limit; + //! Span list size when part of a cache list, or size of deferred free list when partial/full + uint32_t list_size; + //! Deferred free list + atomicptr_t free_list_deferred; + //! Size of a block + uint32_t block_size; + //! Flags and counters + uint32_t flags; + //! Number of spans + uint32_t span_count; + //! Total span counter for master spans, distance for subspans + uint32_t total_spans_or_distance; + //! Remaining span counter, for master spans + atomic32_t remaining_spans; + //! Alignment offset + uint32_t align_offset; + //! Owning heap + heap_t* heap; + //! Next span + span_t* next; + //! Previous span + span_t* prev; +}; +_Static_assert(sizeof(span_t) <= SPAN_HEADER_SIZE, "span size mismatch"); + +struct heap_class_t { + //! Free list of active span + void* free_list; + //! Double linked list of partially used spans with free blocks for each size class. + // Current active span is at head of list. Previous span pointer in head points to tail span of list. + span_t* partial_span; +}; + +struct heap_t { + //! Active and semi-used span data per size class + heap_class_t span_class[SIZE_CLASS_COUNT]; +#if ENABLE_THREAD_CACHE + //! List of free spans (single linked list) + span_t* span_cache[LARGE_CLASS_COUNT]; + //! List of deferred free spans of class 0 (single linked list) + atomicptr_t span_cache_deferred; +#endif +#if ENABLE_ADAPTIVE_THREAD_CACHE || ENABLE_STATISTICS + //! Current and high water mark of spans used per span count + span_use_t span_use[LARGE_CLASS_COUNT]; +#endif + //! Mapped but unused spans + span_t* span_reserve; + //! Master span for mapped but unused spans + span_t* span_reserve_master; + //! Number of mapped but unused spans + size_t spans_reserved; + //! Next heap in id list + heap_t* next_heap; + //! Next heap in orphan list + heap_t* next_orphan; + //! Memory pages alignment offset + size_t align_offset; + //! Heap ID + int32_t id; +#if ENABLE_STATISTICS + //! Number of bytes transitioned thread -> global + size_t thread_to_global; + //! Number of bytes transitioned global -> thread + size_t global_to_thread; + //! Allocation stats per size class + size_class_use_t size_class_use[SIZE_CLASS_COUNT + 1]; +#endif +}; + +struct size_class_t { + //! Size of blocks in this class + uint32_t block_size; + //! Number of blocks in each chunk + uint16_t block_count; + //! Class index this class is merged with + uint16_t class_idx; +}; +_Static_assert(sizeof(size_class_t) == 8, "Size class size mismatch"); + +struct global_cache_t { + //! Cache list pointer + atomicptr_t cache; + //! Cache size + atomic32_t size; + //! ABA counter + atomic32_t counter; +}; + +/// Global data +//! Initialized flag +static int _rpmalloc_initialized; +//! Configuration +static rpmalloc_config_t _memory_config; +//! Memory page size +static size_t _memory_page_size; +//! Shift to divide by page size +static size_t _memory_page_size_shift; +//! Granularity at which memory pages are mapped by OS +static size_t _memory_map_granularity; +#if RPMALLOC_CONFIGURABLE +//! Size of a span of memory pages +static size_t _memory_span_size; +//! Shift to divide by span size +static size_t _memory_span_size_shift; +//! Mask to get to start of a memory span +static uintptr_t _memory_span_mask; +#else +//! Hardwired span size (64KiB) +#define _memory_span_size (64 * 1024) +#define _memory_span_size_shift 16 +#define _memory_span_mask (~((uintptr_t)(_memory_span_size - 1))) +#endif +//! Number of spans to map in each map call +static size_t _memory_span_map_count; +//! Number of spans to release from thread cache to global cache (single spans) +static size_t _memory_span_release_count; +//! Number of spans to release from thread cache to global cache (large multiple spans) +static size_t _memory_span_release_count_large; +//! Global size classes +static size_class_t _memory_size_class[SIZE_CLASS_COUNT]; +//! Run-time size limit of medium blocks +static size_t _memory_medium_size_limit; +//! Heap ID counter +static atomic32_t _memory_heap_id; +//! Huge page support +static int _memory_huge_pages; +#if ENABLE_GLOBAL_CACHE +//! Global span cache +static global_cache_t _memory_span_cache[LARGE_CLASS_COUNT]; +#endif +//! All heaps +static atomicptr_t _memory_heaps[HEAP_ARRAY_SIZE]; +//! Orphaned heaps +static atomicptr_t _memory_orphan_heaps; +//! Running orphan counter to avoid ABA issues in linked list +static atomic32_t _memory_orphan_counter; +#if ENABLE_STATISTICS +//! Active heap count +static atomic32_t _memory_active_heaps; +//! Number of currently mapped memory pages +static atomic32_t _mapped_pages; +//! Peak number of concurrently mapped memory pages +static int32_t _mapped_pages_peak; +//! Number of currently unused spans +static atomic32_t _reserved_spans; +//! Running counter of total number of mapped memory pages since start +static atomic32_t _mapped_total; +//! Running counter of total number of unmapped memory pages since start +static atomic32_t _unmapped_total; +//! Number of currently mapped memory pages in OS calls +static atomic32_t _mapped_pages_os; +//! Number of currently allocated pages in huge allocations +static atomic32_t _huge_pages_current; +//! Peak number of currently allocated pages in huge allocations +static int32_t _huge_pages_peak; +#endif + +//! Current thread heap +#if (defined(__APPLE__) || defined(__HAIKU__)) && ENABLE_PRELOAD +static pthread_key_t _memory_thread_heap; +#else +# ifdef _MSC_VER +# define _Thread_local __declspec(thread) +# define TLS_MODEL +# else +# define TLS_MODEL __attribute__((tls_model("initial-exec"))) +# if !defined(__clang__) && defined(__GNUC__) +# define _Thread_local __thread +# endif +# endif +static _Thread_local heap_t* _memory_thread_heap TLS_MODEL; +#endif + +static inline heap_t* +get_thread_heap_raw(void) { +#if (defined(__APPLE__) || defined(__HAIKU__)) && ENABLE_PRELOAD + return pthread_getspecific(_memory_thread_heap); +#else + return _memory_thread_heap; +#endif +} + +//! Get the current thread heap +static inline heap_t* +get_thread_heap(void) { + heap_t* heap = get_thread_heap_raw(); +#if ENABLE_PRELOAD + if (EXPECTED(heap != 0)) + return heap; + rpmalloc_initialize(); + return get_thread_heap_raw(); +#else + return heap; +#endif +} + +//! Set the current thread heap +static void +set_thread_heap(heap_t* heap) { +#if (defined(__APPLE__) || defined(__HAIKU__)) && ENABLE_PRELOAD + pthread_setspecific(_memory_thread_heap, heap); +#else + _memory_thread_heap = heap; +#endif +} + +//! Default implementation to map more virtual memory +static void* +_memory_map_os(size_t size, size_t* offset); + +//! Default implementation to unmap virtual memory +static void +_memory_unmap_os(void* address, size_t size, size_t offset, size_t release); + +//! Lookup a memory heap from heap ID +static heap_t* +_memory_heap_lookup(int32_t id) { + uint32_t list_idx = id % HEAP_ARRAY_SIZE; + heap_t* heap = atomic_load_ptr(&_memory_heaps[list_idx]); + while (heap && (heap->id != id)) + heap = heap->next_heap; + return heap; +} + +#if ENABLE_STATISTICS +# define _memory_statistics_inc(counter, value) counter += value +# define _memory_statistics_add(atomic_counter, value) atomic_add32(atomic_counter, (int32_t)(value)) +# define _memory_statistics_add_peak(atomic_counter, value, peak) do { int32_t _cur_count = atomic_add32(atomic_counter, (int32_t)(value)); if (_cur_count > (peak)) peak = _cur_count; } while (0) +# define _memory_statistics_sub(atomic_counter, value) atomic_add32(atomic_counter, -(int32_t)(value)) +# define _memory_statistics_inc_alloc(heap, class_idx) do { \ + int32_t alloc_current = atomic_incr32(&heap->size_class_use[class_idx].alloc_current); \ + if (alloc_current > heap->size_class_use[class_idx].alloc_peak) \ + heap->size_class_use[class_idx].alloc_peak = alloc_current; \ + heap->size_class_use[class_idx].alloc_total++; \ +} while(0) +# define _memory_statistics_inc_free(heap, class_idx) do { \ + atomic_add32(&heap->size_class_use[class_idx].alloc_current, -1); \ + atomic_incr32(&heap->size_class_use[class_idx].free_total); \ +} while(0) +#else +# define _memory_statistics_inc(counter, value) do {} while(0) +# define _memory_statistics_add(atomic_counter, value) do {} while(0) +# define _memory_statistics_add_peak(atomic_counter, value, peak) do {} while (0) +# define _memory_statistics_sub(atomic_counter, value) do {} while(0) +# define _memory_statistics_inc_alloc(heap, class_idx) do {} while(0) +# define _memory_statistics_inc_free(heap, class_idx) do {} while(0) +#endif + +static void +_memory_heap_cache_insert(heap_t* heap, span_t* span); + +//! Map more virtual memory +static void* +_memory_map(size_t size, size_t* offset) { + assert(!(size % _memory_page_size)); + assert(size >= _memory_page_size); + _memory_statistics_add_peak(&_mapped_pages, (size >> _memory_page_size_shift), _mapped_pages_peak); + _memory_statistics_add(&_mapped_total, (size >> _memory_page_size_shift)); + return _memory_config.memory_map(size, offset); +} + +//! Unmap virtual memory +static void +_memory_unmap(void* address, size_t size, size_t offset, size_t release) { + assert(!release || (release >= size)); + assert(!release || (release >= _memory_page_size)); + if (release) { + assert(!(release % _memory_page_size)); + _memory_statistics_sub(&_mapped_pages, (release >> _memory_page_size_shift)); + _memory_statistics_add(&_unmapped_total, (release >> _memory_page_size_shift)); + } + _memory_config.memory_unmap(address, size, offset, release); +} + +//! Declare the span to be a subspan and store distance from master span and span count +static void +_memory_span_mark_as_subspan_unless_master(span_t* master, span_t* subspan, size_t span_count) { + assert((subspan != master) || (subspan->flags & SPAN_FLAG_MASTER)); + if (subspan != master) { + subspan->flags = SPAN_FLAG_SUBSPAN; + subspan->total_spans_or_distance = (uint32_t)((uintptr_t)pointer_diff(subspan, master) >> _memory_span_size_shift); + subspan->align_offset = 0; + } + subspan->span_count = (uint32_t)span_count; +} + +//! Use reserved spans to fulfill a memory map request (reserve size must be checked by caller) +static span_t* +_memory_map_from_reserve(heap_t* heap, size_t span_count) { + //Update the heap span reserve + span_t* span = heap->span_reserve; + heap->span_reserve = pointer_offset(span, span_count * _memory_span_size); + heap->spans_reserved -= span_count; + + _memory_span_mark_as_subspan_unless_master(heap->span_reserve_master, span, span_count); + if (span_count <= LARGE_CLASS_COUNT) + _memory_statistics_inc(heap->span_use[span_count - 1].spans_from_reserved, 1); + + return span; +} + +//! Get the aligned number of spans to map in based on wanted count, configured mapping granularity and the page size +static size_t +_memory_map_align_span_count(size_t span_count) { + size_t request_count = (span_count > _memory_span_map_count) ? span_count : _memory_span_map_count; + if ((_memory_page_size > _memory_span_size) && ((request_count * _memory_span_size) % _memory_page_size)) + request_count += _memory_span_map_count - (request_count % _memory_span_map_count); + return request_count; +} + +//! Store the given spans as reserve in the given heap +static void +_memory_heap_set_reserved_spans(heap_t* heap, span_t* master, span_t* reserve, size_t reserve_span_count) { + heap->span_reserve_master = master; + heap->span_reserve = reserve; + heap->spans_reserved = reserve_span_count; +} + +//! Setup a newly mapped span +static void +_memory_span_initialize(span_t* span, size_t total_span_count, size_t span_count, size_t align_offset) { + span->total_spans_or_distance = (uint32_t)total_span_count; + span->span_count = (uint32_t)span_count; + span->align_offset = (uint32_t)align_offset; + span->flags = SPAN_FLAG_MASTER; + atomic_store32(&span->remaining_spans, (int32_t)total_span_count); +} + +//! Map a akigned set of spans, taking configured mapping granularity and the page size into account +static span_t* +_memory_map_aligned_span_count(heap_t* heap, size_t span_count) { + //If we already have some, but not enough, reserved spans, release those to heap cache and map a new + //full set of spans. Otherwise we would waste memory if page size > span size (huge pages) + size_t aligned_span_count = _memory_map_align_span_count(span_count); + size_t align_offset = 0; + span_t* span = _memory_map(aligned_span_count * _memory_span_size, &align_offset); + if (!span) + return 0; + _memory_span_initialize(span, aligned_span_count, span_count, align_offset); + _memory_statistics_add(&_reserved_spans, aligned_span_count); + if (span_count <= LARGE_CLASS_COUNT) + _memory_statistics_inc(heap->span_use[span_count - 1].spans_map_calls, 1); + if (aligned_span_count > span_count) { + if (heap->spans_reserved) { + _memory_span_mark_as_subspan_unless_master(heap->span_reserve_master, heap->span_reserve, heap->spans_reserved); + _memory_heap_cache_insert(heap, heap->span_reserve); + } + _memory_heap_set_reserved_spans(heap, span, pointer_offset(span, span_count * _memory_span_size), aligned_span_count - span_count); + } + return span; +} + +//! Map in memory pages for the given number of spans (or use previously reserved pages) +static span_t* +_memory_map_spans(heap_t* heap, size_t span_count) { + if (span_count <= heap->spans_reserved) + return _memory_map_from_reserve(heap, span_count); + return _memory_map_aligned_span_count(heap, span_count); +} + +//! Unmap memory pages for the given number of spans (or mark as unused if no partial unmappings) +static void +_memory_unmap_span(span_t* span) { + assert((span->flags & SPAN_FLAG_MASTER) || (span->flags & SPAN_FLAG_SUBSPAN)); + assert(!(span->flags & SPAN_FLAG_MASTER) || !(span->flags & SPAN_FLAG_SUBSPAN)); + + int is_master = !!(span->flags & SPAN_FLAG_MASTER); + span_t* master = is_master ? span : (pointer_offset(span, -(int32_t)(span->total_spans_or_distance * _memory_span_size))); + assert(is_master || (span->flags & SPAN_FLAG_SUBSPAN)); + assert(master->flags & SPAN_FLAG_MASTER); + + size_t span_count = span->span_count; + if (!is_master) { + //Directly unmap subspans (unless huge pages, in which case we defer and unmap entire page range with master) + assert(span->align_offset == 0); + if (_memory_span_size >= _memory_page_size) { + _memory_unmap(span, span_count * _memory_span_size, 0, 0); + _memory_statistics_sub(&_reserved_spans, span_count); + } + } else { + //Special double flag to denote an unmapped master + //It must be kept in memory since span header must be used + span->flags |= SPAN_FLAG_MASTER | SPAN_FLAG_SUBSPAN; + } + + if (atomic_add32(&master->remaining_spans, -(int32_t)span_count) <= 0) { + //Everything unmapped, unmap the master span with release flag to unmap the entire range of the super span + assert(!!(master->flags & SPAN_FLAG_MASTER) && !!(master->flags & SPAN_FLAG_SUBSPAN)); + size_t unmap_count = master->span_count; + if (_memory_span_size < _memory_page_size) + unmap_count = master->total_spans_or_distance; + _memory_statistics_sub(&_reserved_spans, unmap_count); + _memory_unmap(master, unmap_count * _memory_span_size, master->align_offset, master->total_spans_or_distance * _memory_span_size); + } +} + +#if ENABLE_THREAD_CACHE + +//! Unmap a single linked list of spans +static void +_memory_unmap_span_list(span_t* span) { + size_t list_size = span->list_size; + for (size_t ispan = 0; ispan < list_size; ++ispan) { + span_t* next_span = span->next; + _memory_unmap_span(span); + span = next_span; + } + assert(!span); +} + +//! Add span to head of single linked span list +static size_t +_memory_span_list_push(span_t** head, span_t* span) { + span->next = *head; + if (*head) + span->list_size = (*head)->list_size + 1; + else + span->list_size = 1; + *head = span; + return span->list_size; +} + +//! Remove span from head of single linked span list, returns the new list head +static span_t* +_memory_span_list_pop(span_t** head) { + span_t* span = *head; + span_t* next_span = 0; + if (span->list_size > 1) { + assert(span->next); + next_span = span->next; + assert(next_span); + next_span->list_size = span->list_size - 1; + } + *head = next_span; + return span; +} + +//! Split a single linked span list +static span_t* +_memory_span_list_split(span_t* span, size_t limit) { + span_t* next = 0; + if (limit < 2) + limit = 2; + if (span->list_size > limit) { + uint32_t list_size = 1; + span_t* last = span; + next = span->next; + while (list_size < limit) { + last = next; + next = next->next; + ++list_size; + } + last->next = 0; + assert(next); + next->list_size = span->list_size - list_size; + span->list_size = list_size; + span->prev = 0; + } + return next; +} + +#endif + +//! Add a span to partial span double linked list at the head +static void +_memory_span_partial_list_add(span_t** head, span_t* span) { + if (*head) { + span->next = *head; + //Maintain pointer to tail span + span->prev = (*head)->prev; + (*head)->prev = span; + } else { + span->next = 0; + span->prev = span; + } + *head = span; +} + +//! Add a span to partial span double linked list at the tail +static void +_memory_span_partial_list_add_tail(span_t** head, span_t* span) { + span->next = 0; + if (*head) { + span_t* tail = (*head)->prev; + tail->next = span; + span->prev = tail; + //Maintain pointer to tail span + (*head)->prev = span; + } else { + span->prev = span; + *head = span; + } +} + +//! Pop head span from partial span double linked list +static void +_memory_span_partial_list_pop_head(span_t** head) { + span_t* span = *head; + *head = span->next; + if (*head) { + //Maintain pointer to tail span + (*head)->prev = span->prev; + } +} + +//! Remove a span from partial span double linked list +static void +_memory_span_partial_list_remove(span_t** head, span_t* span) { + if (UNEXPECTED(*head == span)) { + _memory_span_partial_list_pop_head(head); + } else { + span_t* next_span = span->next; + span_t* prev_span = span->prev; + prev_span->next = next_span; + if (EXPECTED(next_span != 0)) { + next_span->prev = prev_span; + } else { + //Update pointer to tail span + (*head)->prev = prev_span; + } + } +} + +#if ENABLE_GLOBAL_CACHE + +//! Insert the given list of memory page spans in the global cache +static void +_memory_cache_insert(global_cache_t* cache, span_t* span, size_t cache_limit) { + assert((span->list_size == 1) || (span->next != 0)); + int32_t list_size = (int32_t)span->list_size; + //Unmap if cache has reached the limit + if (atomic_add32(&cache->size, list_size) > (int32_t)cache_limit) { +#if !ENABLE_UNLIMITED_GLOBAL_CACHE + _memory_unmap_span_list(span); + atomic_add32(&cache->size, -list_size); + return; +#endif + } + void* current_cache, *new_cache; + do { + current_cache = atomic_load_ptr(&cache->cache); + span->prev = (void*)((uintptr_t)current_cache & _memory_span_mask); + new_cache = (void*)((uintptr_t)span | ((uintptr_t)atomic_incr32(&cache->counter) & ~_memory_span_mask)); + } while (!atomic_cas_ptr(&cache->cache, new_cache, current_cache)); +} + +//! Extract a number of memory page spans from the global cache +static span_t* +_memory_cache_extract(global_cache_t* cache) { + uintptr_t span_ptr; + do { + void* global_span = atomic_load_ptr(&cache->cache); + span_ptr = (uintptr_t)global_span & _memory_span_mask; + if (span_ptr) { + span_t* span = (void*)span_ptr; + //By accessing the span ptr before it is swapped out of list we assume that a contending thread + //does not manage to traverse the span to being unmapped before we access it + void* new_cache = (void*)((uintptr_t)span->prev | ((uintptr_t)atomic_incr32(&cache->counter) & ~_memory_span_mask)); + if (atomic_cas_ptr(&cache->cache, new_cache, global_span)) { + atomic_add32(&cache->size, -(int32_t)span->list_size); + return span; + } + } + } while (span_ptr); + return 0; +} + +//! Finalize a global cache, only valid from allocator finalization (not thread safe) +static void +_memory_cache_finalize(global_cache_t* cache) { + void* current_cache = atomic_load_ptr(&cache->cache); + span_t* span = (void*)((uintptr_t)current_cache & _memory_span_mask); + while (span) { + span_t* skip_span = (void*)((uintptr_t)span->prev & _memory_span_mask); + atomic_add32(&cache->size, -(int32_t)span->list_size); + _memory_unmap_span_list(span); + span = skip_span; + } + assert(!atomic_load32(&cache->size)); + atomic_store_ptr(&cache->cache, 0); + atomic_store32(&cache->size, 0); +} + +//! Insert the given list of memory page spans in the global cache +static void +_memory_global_cache_insert(span_t* span) { + size_t span_count = span->span_count; +#if ENABLE_UNLIMITED_GLOBAL_CACHE + _memory_cache_insert(&_memory_span_cache[span_count - 1], span, 0); +#else + const size_t cache_limit = (GLOBAL_CACHE_MULTIPLIER * ((span_count == 1) ? _memory_span_release_count : _memory_span_release_count_large)); + _memory_cache_insert(&_memory_span_cache[span_count - 1], span, cache_limit); +#endif +} + +//! Extract a number of memory page spans from the global cache for large blocks +static span_t* +_memory_global_cache_extract(size_t span_count) { + span_t* span = _memory_cache_extract(&_memory_span_cache[span_count - 1]); + assert(!span || (span->span_count == span_count)); + return span; +} + +#endif + +#if ENABLE_THREAD_CACHE +//! Adopt the deferred span cache list +static void +_memory_heap_cache_adopt_deferred(heap_t* heap) { + atomic_thread_fence_acquire(); + span_t* span = atomic_load_ptr(&heap->span_cache_deferred); + if (!span) + return; + do { + span = atomic_load_ptr(&heap->span_cache_deferred); + } while (!atomic_cas_ptr(&heap->span_cache_deferred, 0, span)); + while (span) { + span_t* next_span = span->next; + _memory_span_list_push(&heap->span_cache[0], span); +#if ENABLE_STATISTICS + heap->size_class_use[span->size_class].spans_to_cache++; +#endif + span = next_span; + } +} +#endif + +//! Insert a single span into thread heap cache, releasing to global cache if overflow +static void +_memory_heap_cache_insert(heap_t* heap, span_t* span) { +#if ENABLE_THREAD_CACHE + size_t span_count = span->span_count; + size_t idx = span_count - 1; + _memory_statistics_inc(heap->span_use[idx].spans_to_cache, 1); + if (!idx) + _memory_heap_cache_adopt_deferred(heap); +#if ENABLE_UNLIMITED_THREAD_CACHE + _memory_span_list_push(&heap->span_cache[idx], span); +#else + const size_t release_count = (!idx ? _memory_span_release_count : _memory_span_release_count_large); + size_t current_cache_size = _memory_span_list_push(&heap->span_cache[idx], span); + if (current_cache_size <= release_count) + return; + const size_t hard_limit = release_count * THREAD_CACHE_MULTIPLIER; + if (current_cache_size <= hard_limit) { +#if ENABLE_ADAPTIVE_THREAD_CACHE + //Require 25% of high water mark to remain in cache (and at least 1, if use is 0) + const size_t high_mark = heap->span_use[idx].high; + const size_t min_limit = (high_mark >> 2) + release_count + 1; + if (current_cache_size < min_limit) + return; +#else + return; +#endif + } + heap->span_cache[idx] = _memory_span_list_split(span, release_count); + assert(span->list_size == release_count); +#if ENABLE_STATISTICS + heap->thread_to_global += (size_t)span->list_size * span_count * _memory_span_size; + heap->span_use[idx].spans_to_global += span->list_size; +#endif +#if ENABLE_GLOBAL_CACHE + _memory_global_cache_insert(span); +#else + _memory_unmap_span_list(span); +#endif +#endif +#else + (void)sizeof(heap); + _memory_unmap_span(span); +#endif +} + +//! Extract the given number of spans from the different cache levels +static span_t* +_memory_heap_thread_cache_extract(heap_t* heap, size_t span_count) { +#if ENABLE_THREAD_CACHE + size_t idx = span_count - 1; + if (!idx) + _memory_heap_cache_adopt_deferred(heap); + if (heap->span_cache[idx]) { +#if ENABLE_STATISTICS + heap->span_use[idx].spans_from_cache++; +#endif + return _memory_span_list_pop(&heap->span_cache[idx]); + } +#endif + return 0; +} + +static span_t* +_memory_heap_reserved_extract(heap_t* heap, size_t span_count) { + if (heap->spans_reserved >= span_count) + return _memory_map_spans(heap, span_count); + return 0; +} + +static span_t* +_memory_heap_global_cache_extract(heap_t* heap, size_t span_count) { +#if ENABLE_GLOBAL_CACHE + //Step 3: Extract from global cache + size_t idx = span_count - 1; + heap->span_cache[idx] = _memory_global_cache_extract(span_count); + if (heap->span_cache[idx]) { +#if ENABLE_STATISTICS + heap->global_to_thread += (size_t)heap->span_cache[idx]->list_size * span_count * _memory_span_size; + heap->span_use[idx].spans_from_global += heap->span_cache[idx]->list_size; +#endif + return _memory_span_list_pop(&heap->span_cache[idx]); + } +#endif + return 0; +} + +static span_t* +_memory_heap_extract_new_span(heap_t* heap, size_t span_count, uint32_t class_idx) { + (void)sizeof(class_idx); +#if ENABLE_ADAPTIVE_THREAD_CACHE || ENABLE_STATISTICS + uint32_t use_idx = (uint32_t)span_count - 1; + ++heap->span_use[use_idx].current; + if (heap->span_use[use_idx].current > heap->span_use[use_idx].high) + heap->span_use[use_idx].high = heap->span_use[use_idx].current; +#endif + span_t* span = _memory_heap_thread_cache_extract(heap, span_count); + if (EXPECTED(span != 0)) { + _memory_statistics_inc(heap->size_class_use[class_idx].spans_from_cache, 1); + return span; + } + span = _memory_heap_reserved_extract(heap, span_count); + if (EXPECTED(span != 0)) { + _memory_statistics_inc(heap->size_class_use[class_idx].spans_from_reserved, 1); + return span; + } + span = _memory_heap_global_cache_extract(heap, span_count); + if (EXPECTED(span != 0)) { + _memory_statistics_inc(heap->size_class_use[class_idx].spans_from_cache, 1); + return span; + } + //Final fallback, map in more virtual memory + span = _memory_map_spans(heap, span_count); + _memory_statistics_inc(heap->size_class_use[class_idx].spans_map_calls, 1); + return span; +} + +//! Move the span to the heap thread cache +static void +_memory_span_release_to_cache(heap_t* heap, span_t* span) { + heap_class_t* heap_class = heap->span_class + span->size_class; + assert(heap_class->partial_span != span); + if (span->state == SPAN_STATE_PARTIAL) + _memory_span_partial_list_remove(&heap_class->partial_span, span); +#if ENABLE_ADAPTIVE_THREAD_CACHE || ENABLE_STATISTICS + if (heap->span_use[0].current) + --heap->span_use[0].current; + _memory_statistics_inc(heap->span_use[0].spans_to_cache, 1); + _memory_statistics_inc(heap->size_class_use[span->size_class].spans_to_cache, 1); +#endif + _memory_heap_cache_insert(heap, span); +} + +//! Initialize a (partial) free list up to next system memory page, while reserving the first block +//! as allocated, returning number of blocks in list +static uint32_t +free_list_partial_init(void** list, void** first_block, void* page_start, void* block_start, + uint32_t block_count, uint32_t block_size) { + assert(block_count); + *first_block = block_start; + if (block_count > 1) { + void* free_block = pointer_offset(block_start, block_size); + void* block_end = pointer_offset(block_start, block_size * block_count); + //If block size is less than half a memory page, bound init to next memory page boundary + if (block_size < (_memory_page_size >> 1)) { + void* page_end = pointer_offset(page_start, _memory_page_size); + if (page_end < block_end) + block_end = page_end; + } + *list = free_block; + block_count = 2; + void* next_block = pointer_offset(free_block, block_size); + while (next_block < block_end) { + *((void**)free_block) = next_block; + free_block = next_block; + ++block_count; + next_block = pointer_offset(next_block, block_size); + } + *((void**)free_block) = 0; + } else { + *list = 0; + } + return block_count; +} + +//! Initialize an unused span (from cache or mapped) to be new active span +static void* +_memory_span_set_new_active(heap_t* heap, heap_class_t* heap_class, span_t* span, uint32_t class_idx) { + assert(span->span_count == 1); + size_class_t* size_class = _memory_size_class + class_idx; + span->size_class = class_idx; + span->heap = heap; + span->flags &= ~SPAN_FLAG_ALIGNED_BLOCKS; + span->block_count = size_class->block_count; + span->block_size = size_class->block_size; + span->state = SPAN_STATE_ACTIVE; + span->free_list = 0; + + //Setup free list. Only initialize one system page worth of free blocks in list + void* block; + span->free_list_limit = free_list_partial_init(&heap_class->free_list, &block, + span, pointer_offset(span, SPAN_HEADER_SIZE), size_class->block_count, size_class->block_size); + atomic_store_ptr(&span->free_list_deferred, 0); + span->list_size = 0; + atomic_thread_fence_release(); + + _memory_span_partial_list_add(&heap_class->partial_span, span); + return block; +} + +//! Promote a partially used span (from heap used list) to be new active span +static void +_memory_span_set_partial_active(heap_class_t* heap_class, span_t* span) { + assert(span->state == SPAN_STATE_PARTIAL); + assert(span->block_count == _memory_size_class[span->size_class].block_count); + //Move data to heap size class and set span as active + heap_class->free_list = span->free_list; + span->state = SPAN_STATE_ACTIVE; + span->free_list = 0; + assert(heap_class->free_list); +} + +//! Mark span as full (from active) +static void +_memory_span_set_active_full(heap_class_t* heap_class, span_t* span) { + assert(span->state == SPAN_STATE_ACTIVE); + assert(span == heap_class->partial_span); + _memory_span_partial_list_pop_head(&heap_class->partial_span); + span->used_count = span->block_count; + span->state = SPAN_STATE_FULL; + span->free_list = 0; +} + +//! Move span from full to partial state +static void +_memory_span_set_full_partial(heap_t* heap, span_t* span) { + assert(span->state == SPAN_STATE_FULL); + heap_class_t* heap_class = &heap->span_class[span->size_class]; + span->state = SPAN_STATE_PARTIAL; + _memory_span_partial_list_add_tail(&heap_class->partial_span, span); +} + +static void* +_memory_span_extract_deferred(span_t* span) { + void* free_list; + do { + free_list = atomic_load_ptr(&span->free_list_deferred); + } while ((free_list == INVALID_POINTER) || !atomic_cas_ptr(&span->free_list_deferred, INVALID_POINTER, free_list)); + span->list_size = 0; + atomic_store_ptr(&span->free_list_deferred, 0); + atomic_thread_fence_release(); + return free_list; +} + +//! Pop first block from a free list +static void* +free_list_pop(void** list) { + void* block = *list; + *list = *((void**)block); + return block; +} + +//! Allocate a small/medium sized memory block from the given heap +static void* +_memory_allocate_from_heap_fallback(heap_t* heap, uint32_t class_idx) { + heap_class_t* heap_class = &heap->span_class[class_idx]; + void* block; + + span_t* active_span = heap_class->partial_span; + if (EXPECTED(active_span != 0)) { + assert(active_span->state == SPAN_STATE_ACTIVE); + assert(active_span->block_count == _memory_size_class[active_span->size_class].block_count); + //Swap in free list if not empty + if (active_span->free_list) { + heap_class->free_list = active_span->free_list; + active_span->free_list = 0; + return free_list_pop(&heap_class->free_list); + } + //If the span did not fully initialize free list, link up another page worth of blocks + if (active_span->free_list_limit < active_span->block_count) { + void* block_start = pointer_offset(active_span, SPAN_HEADER_SIZE + (active_span->free_list_limit * active_span->block_size)); + active_span->free_list_limit += free_list_partial_init(&heap_class->free_list, &block, + (void*)((uintptr_t)block_start & ~(_memory_page_size - 1)), block_start, + active_span->block_count - active_span->free_list_limit, active_span->block_size); + return block; + } + //Swap in deferred free list + atomic_thread_fence_acquire(); + if (atomic_load_ptr(&active_span->free_list_deferred)) { + heap_class->free_list = _memory_span_extract_deferred(active_span); + return free_list_pop(&heap_class->free_list); + } + + //If the active span is fully allocated, mark span as free floating (fully allocated and not part of any list) + assert(!heap_class->free_list); + assert(active_span->free_list_limit >= active_span->block_count); + _memory_span_set_active_full(heap_class, active_span); + } + assert(!heap_class->free_list); + + //Try promoting a semi-used span to active + active_span = heap_class->partial_span; + if (EXPECTED(active_span != 0)) { + _memory_span_set_partial_active(heap_class, active_span); + return free_list_pop(&heap_class->free_list); + } + assert(!heap_class->free_list); + assert(!heap_class->partial_span); + + //Find a span in one of the cache levels + active_span = _memory_heap_extract_new_span(heap, 1, class_idx); + + //Mark span as owned by this heap and set base data, return first block + return _memory_span_set_new_active(heap, heap_class, active_span, class_idx); +} + +//! Allocate a small sized memory block from the given heap +static void* +_memory_allocate_small(heap_t* heap, size_t size) { + //Small sizes have unique size classes + const uint32_t class_idx = (uint32_t)((size + (SMALL_GRANULARITY - 1)) >> SMALL_GRANULARITY_SHIFT); + _memory_statistics_inc_alloc(heap, class_idx); + if (EXPECTED(heap->span_class[class_idx].free_list != 0)) + return free_list_pop(&heap->span_class[class_idx].free_list); + return _memory_allocate_from_heap_fallback(heap, class_idx); +} + +//! Allocate a medium sized memory block from the given heap +static void* +_memory_allocate_medium(heap_t* heap, size_t size) { + //Calculate the size class index and do a dependent lookup of the final class index (in case of merged classes) + const uint32_t base_idx = (uint32_t)(SMALL_CLASS_COUNT + ((size - (SMALL_SIZE_LIMIT + 1)) >> MEDIUM_GRANULARITY_SHIFT)); + const uint32_t class_idx = _memory_size_class[base_idx].class_idx; + _memory_statistics_inc_alloc(heap, class_idx); + if (EXPECTED(heap->span_class[class_idx].free_list != 0)) + return free_list_pop(&heap->span_class[class_idx].free_list); + return _memory_allocate_from_heap_fallback(heap, class_idx); +} + +//! Allocate a large sized memory block from the given heap +static void* +_memory_allocate_large(heap_t* heap, size_t size) { + //Calculate number of needed max sized spans (including header) + //Since this function is never called if size > LARGE_SIZE_LIMIT + //the span_count is guaranteed to be <= LARGE_CLASS_COUNT + size += SPAN_HEADER_SIZE; + size_t span_count = size >> _memory_span_size_shift; + if (size & (_memory_span_size - 1)) + ++span_count; + size_t idx = span_count - 1; +#if ENABLE_ADAPTIVE_THREAD_CACHE || ENABLE_STATISTICS + ++heap->span_use[idx].current; + if (heap->span_use[idx].current > heap->span_use[idx].high) + heap->span_use[idx].high = heap->span_use[idx].current; +#endif + + //Find a span in one of the cache levels + span_t* span = _memory_heap_extract_new_span(heap, span_count, SIZE_CLASS_COUNT); + + //Mark span as owned by this heap and set base data + assert(span->span_count == span_count); + span->size_class = (uint32_t)(SIZE_CLASS_COUNT + idx); + span->heap = heap; + atomic_thread_fence_release(); + + return pointer_offset(span, SPAN_HEADER_SIZE); +} + +//! Allocate a huge block by mapping memory pages directly +static void* +_memory_allocate_huge(size_t size) { + size += SPAN_HEADER_SIZE; + size_t num_pages = size >> _memory_page_size_shift; + if (size & (_memory_page_size - 1)) + ++num_pages; + size_t align_offset = 0; + span_t* span = _memory_map(num_pages * _memory_page_size, &align_offset); + if (!span) + return span; + //Store page count in span_count + span->size_class = (uint32_t)-1; + span->span_count = (uint32_t)num_pages; + span->align_offset = (uint32_t)align_offset; + _memory_statistics_add_peak(&_huge_pages_current, num_pages, _huge_pages_peak); + + return pointer_offset(span, SPAN_HEADER_SIZE); +} + +//! Allocate a block larger than medium size +static void* +_memory_allocate_oversized(heap_t* heap, size_t size) { + if (size <= LARGE_SIZE_LIMIT) + return _memory_allocate_large(heap, size); + return _memory_allocate_huge(size); +} + +//! Allocate a block of the given size +static void* +_memory_allocate(heap_t* heap, size_t size) { + if (EXPECTED(size <= SMALL_SIZE_LIMIT)) + return _memory_allocate_small(heap, size); + else if (size <= _memory_medium_size_limit) + return _memory_allocate_medium(heap, size); + return _memory_allocate_oversized(heap, size); +} + +//! Allocate a new heap +static heap_t* +_memory_allocate_heap(void) { + void* raw_heap; + void* next_raw_heap; + uintptr_t orphan_counter; + heap_t* heap; + heap_t* next_heap; + //Try getting an orphaned heap + atomic_thread_fence_acquire(); + do { + raw_heap = atomic_load_ptr(&_memory_orphan_heaps); + heap = (void*)((uintptr_t)raw_heap & ~(uintptr_t)0x1FF); + if (!heap) + break; + next_heap = heap->next_orphan; + orphan_counter = (uintptr_t)atomic_incr32(&_memory_orphan_counter); + next_raw_heap = (void*)((uintptr_t)next_heap | (orphan_counter & (uintptr_t)0x1FF)); + } while (!atomic_cas_ptr(&_memory_orphan_heaps, next_raw_heap, raw_heap)); + + if (!heap) { + //Map in pages for a new heap + size_t align_offset = 0; + heap = _memory_map((1 + (sizeof(heap_t) >> _memory_page_size_shift)) * _memory_page_size, &align_offset); + if (!heap) + return heap; + memset(heap, 0, sizeof(heap_t)); + heap->align_offset = align_offset; + + //Get a new heap ID + do { + heap->id = atomic_incr32(&_memory_heap_id); + if (_memory_heap_lookup(heap->id)) + heap->id = 0; + } while (!heap->id); + + //Link in heap in heap ID map + size_t list_idx = heap->id % HEAP_ARRAY_SIZE; + do { + next_heap = atomic_load_ptr(&_memory_heaps[list_idx]); + heap->next_heap = next_heap; + } while (!atomic_cas_ptr(&_memory_heaps[list_idx], heap, next_heap)); + } + + return heap; +} + +//! Deallocate the given small/medium memory block in the current thread local heap +static void +_memory_deallocate_direct(span_t* span, void* block) { + assert(span->heap == get_thread_heap_raw()); + uint32_t state = span->state; + //Add block to free list + *((void**)block) = span->free_list; + span->free_list = block; + if (UNEXPECTED(state == SPAN_STATE_ACTIVE)) + return; + uint32_t used = --span->used_count; + uint32_t free = span->list_size; + if (UNEXPECTED(used == free)) + _memory_span_release_to_cache(span->heap, span); + else if (UNEXPECTED(state == SPAN_STATE_FULL)) + _memory_span_set_full_partial(span->heap, span); +} + +//! Put the block in the deferred free list of the owning span +static void +_memory_deallocate_defer(span_t* span, void* block) { + atomic_thread_fence_acquire(); + if (span->state == SPAN_STATE_FULL) { + if ((span->list_size + 1) == span->block_count) { + //Span will be completely freed by deferred deallocations, no other thread can + //currently touch it. Safe to move to owner heap deferred cache + span_t* last_head; + heap_t* heap = span->heap; + do { + last_head = atomic_load_ptr(&heap->span_cache_deferred); + span->next = last_head; + } while (!atomic_cas_ptr(&heap->span_cache_deferred, span, last_head)); + return; + } + } + + void* free_list; + do { + atomic_thread_fence_acquire(); + free_list = atomic_load_ptr(&span->free_list_deferred); + *((void**)block) = free_list; + } while ((free_list == INVALID_POINTER) || !atomic_cas_ptr(&span->free_list_deferred, INVALID_POINTER, free_list)); + ++span->list_size; + atomic_store_ptr(&span->free_list_deferred, block); +} + +static void +_memory_deallocate_small_or_medium(span_t* span, void* p) { + _memory_statistics_inc_free(span->heap, span->size_class); + if (span->flags & SPAN_FLAG_ALIGNED_BLOCKS) { + //Realign pointer to block start + void* blocks_start = pointer_offset(span, SPAN_HEADER_SIZE); + uint32_t block_offset = (uint32_t)pointer_diff(p, blocks_start); + p = pointer_offset(p, -(int32_t)(block_offset % span->block_size)); + } + //Check if block belongs to this heap or if deallocation should be deferred + if (span->heap == get_thread_heap_raw()) + _memory_deallocate_direct(span, p); + else + _memory_deallocate_defer(span, p); +} + +//! Deallocate the given large memory block to the current heap +static void +_memory_deallocate_large(span_t* span) { + //Decrease counter + assert(span->span_count == ((size_t)span->size_class - SIZE_CLASS_COUNT + 1)); + assert(span->size_class >= SIZE_CLASS_COUNT); + assert(span->size_class - SIZE_CLASS_COUNT < LARGE_CLASS_COUNT); + assert(!(span->flags & SPAN_FLAG_MASTER) || !(span->flags & SPAN_FLAG_SUBSPAN)); + assert((span->flags & SPAN_FLAG_MASTER) || (span->flags & SPAN_FLAG_SUBSPAN)); + //Large blocks can always be deallocated and transferred between heaps + //Investigate if it is better to defer large spans as well through span_cache_deferred, + //possibly with some heuristics to pick either scheme at runtime per deallocation + heap_t* heap = get_thread_heap(); +#if ENABLE_ADAPTIVE_THREAD_CACHE || ENABLE_STATISTICS + size_t idx = span->span_count - 1; + if (heap->span_use[idx].current) + --heap->span_use[idx].current; +#endif + if ((span->span_count > 1) && !heap->spans_reserved) { + heap->span_reserve = span; + heap->spans_reserved = span->span_count; + if (span->flags & SPAN_FLAG_MASTER) { + heap->span_reserve_master = span; + } else { //SPAN_FLAG_SUBSPAN + uint32_t distance = span->total_spans_or_distance; + span_t* master = pointer_offset(span, -(int32_t)(distance * _memory_span_size)); + heap->span_reserve_master = master; + assert(master->flags & SPAN_FLAG_MASTER); + assert(atomic_load32(&master->remaining_spans) >= (int32_t)span->span_count); + } + _memory_statistics_inc(heap->span_use[idx].spans_to_reserved, 1); + } else { + //Insert into cache list + _memory_heap_cache_insert(heap, span); + } +} + +//! Deallocat the given huge span +static void +_memory_deallocate_huge(span_t* span) { + //Oversized allocation, page count is stored in span_count + size_t num_pages = span->span_count; + _memory_unmap(span, num_pages * _memory_page_size, span->align_offset, num_pages * _memory_page_size); + _memory_statistics_sub(&_huge_pages_current, num_pages); +} + +//! Deallocate the given block +static void +_memory_deallocate(void* p) { + //Grab the span (always at start of span, using span alignment) + span_t* span = (void*)((uintptr_t)p & _memory_span_mask); + if (UNEXPECTED(!span)) + return; + if (EXPECTED(span->size_class < SIZE_CLASS_COUNT)) + _memory_deallocate_small_or_medium(span, p); + else if (span->size_class != (uint32_t)-1) + _memory_deallocate_large(span); + else + _memory_deallocate_huge(span); +} + +//! Reallocate the given block to the given size +static void* +_memory_reallocate(void* p, size_t size, size_t oldsize, unsigned int flags) { + if (p) { + //Grab the span using guaranteed span alignment + span_t* span = (void*)((uintptr_t)p & _memory_span_mask); + if (span->heap) { + if (span->size_class < SIZE_CLASS_COUNT) { + //Small/medium sized block + assert(span->span_count == 1); + void* blocks_start = pointer_offset(span, SPAN_HEADER_SIZE); + uint32_t block_offset = (uint32_t)pointer_diff(p, blocks_start); + uint32_t block_idx = block_offset / span->block_size; + void* block = pointer_offset(blocks_start, block_idx * span->block_size); + if (!oldsize) + oldsize = span->block_size - (uint32_t)pointer_diff(p, block); + if ((size_t)span->block_size >= size) { + //Still fits in block, never mind trying to save memory, but preserve data if alignment changed + if ((p != block) && !(flags & RPMALLOC_NO_PRESERVE)) + memmove(block, p, oldsize); + return block; + } + } else { + //Large block + size_t total_size = size + SPAN_HEADER_SIZE; + size_t num_spans = total_size >> _memory_span_size_shift; + if (total_size & (_memory_span_mask - 1)) + ++num_spans; + size_t current_spans = (span->size_class - SIZE_CLASS_COUNT) + 1; + assert(current_spans == span->span_count); + void* block = pointer_offset(span, SPAN_HEADER_SIZE); + if (!oldsize) + oldsize = (current_spans * _memory_span_size) - (size_t)pointer_diff(p, block); + if ((current_spans >= num_spans) && (num_spans >= (current_spans / 2))) { + //Still fits in block, never mind trying to save memory, but preserve data if alignment changed + if ((p != block) && !(flags & RPMALLOC_NO_PRESERVE)) + memmove(block, p, oldsize); + return block; + } + } + } else { + //Oversized block + size_t total_size = size + SPAN_HEADER_SIZE; + size_t num_pages = total_size >> _memory_page_size_shift; + if (total_size & (_memory_page_size - 1)) + ++num_pages; + //Page count is stored in span_count + size_t current_pages = span->span_count; + void* block = pointer_offset(span, SPAN_HEADER_SIZE); + if (!oldsize) + oldsize = (current_pages * _memory_page_size) - (size_t)pointer_diff(p, block); + if ((current_pages >= num_pages) && (num_pages >= (current_pages / 2))) { + //Still fits in block, never mind trying to save memory, but preserve data if alignment changed + if ((p != block) && !(flags & RPMALLOC_NO_PRESERVE)) + memmove(block, p, oldsize); + return block; + } + } + } + + //Size is greater than block size, need to allocate a new block and deallocate the old + heap_t* heap = get_thread_heap(); + //Avoid hysteresis by overallocating if increase is small (below 37%) + size_t lower_bound = oldsize + (oldsize >> 2) + (oldsize >> 3); + void* block = _memory_allocate(heap, (size > lower_bound) ? size : ((size > oldsize) ? lower_bound : size)); + if (p) { + if (!(flags & RPMALLOC_NO_PRESERVE)) + memcpy(block, p, oldsize < size ? oldsize : size); + _memory_deallocate(p); + } + + return block; +} + +//! Get the usable size of the given block +static size_t +_memory_usable_size(void* p) { + //Grab the span using guaranteed span alignment + span_t* span = (void*)((uintptr_t)p & _memory_span_mask); + if (span->heap) { + //Small/medium block + if (span->size_class < SIZE_CLASS_COUNT) { + void* blocks_start = pointer_offset(span, SPAN_HEADER_SIZE); + return span->block_size - ((size_t)pointer_diff(p, blocks_start) % span->block_size); + } + + //Large block + size_t current_spans = (span->size_class - SIZE_CLASS_COUNT) + 1; + return (current_spans * _memory_span_size) - (size_t)pointer_diff(p, span); + } + + //Oversized block, page count is stored in span_count + size_t current_pages = span->span_count; + return (current_pages * _memory_page_size) - (size_t)pointer_diff(p, span); +} + +//! Adjust and optimize the size class properties for the given class +static void +_memory_adjust_size_class(size_t iclass) { + size_t block_size = _memory_size_class[iclass].block_size; + size_t block_count = (_memory_span_size - SPAN_HEADER_SIZE) / block_size; + + _memory_size_class[iclass].block_count = (uint16_t)block_count; + _memory_size_class[iclass].class_idx = (uint16_t)iclass; + + //Check if previous size classes can be merged + size_t prevclass = iclass; + while (prevclass > 0) { + --prevclass; + //A class can be merged if number of pages and number of blocks are equal + if (_memory_size_class[prevclass].block_count == _memory_size_class[iclass].block_count) + memcpy(_memory_size_class + prevclass, _memory_size_class + iclass, sizeof(_memory_size_class[iclass])); + else + break; + } +} + +#if defined(_MSC_VER) && !defined(__clang__) && (!defined(BUILD_DYNAMIC_LINK) || !BUILD_DYNAMIC_LINK) +#include <fibersapi.h> +static DWORD fls_key; +static void NTAPI +rp_thread_destructor(void* value) { +// printf("rpmalloc_thread_finalize( ) to\n"); + + if (value) + rpmalloc_thread_finalize(); +} +#endif + +#if PLATFORM_POSIX +# include <sys/mman.h> +# include <sched.h> +# ifdef __FreeBSD__ +# include <sys/sysctl.h> +# define MAP_HUGETLB MAP_ALIGNED_SUPER +# endif +# ifndef MAP_UNINITIALIZED +# define MAP_UNINITIALIZED 0 +# endif +#endif +#include <errno.h> + +//! Initialize the allocator and setup global data +extern inline int +rpmalloc_initialize(void) { + +// printf("*** rpmalloc_initialize( )\n"); + + if (_rpmalloc_initialized) { + rpmalloc_thread_initialize(); + return 0; + } + memset(&_memory_config, 0, sizeof(rpmalloc_config_t)); + return rpmalloc_initialize_config(0); +} + +int +rpmalloc_initialize_config(const rpmalloc_config_t* config) { + if (_rpmalloc_initialized) { + rpmalloc_thread_initialize(); + return 0; + } + _rpmalloc_initialized = 1; + + if (config) + memcpy(&_memory_config, config, sizeof(rpmalloc_config_t)); + + if (!_memory_config.memory_map || !_memory_config.memory_unmap) { + _memory_config.memory_map = _memory_map_os; + _memory_config.memory_unmap = _memory_unmap_os; + } + +#if RPMALLOC_CONFIGURABLE + _memory_page_size = _memory_config.page_size; +#else + _memory_page_size = 0; +#endif + _memory_huge_pages = 0; + _memory_map_granularity = _memory_page_size; + if (!_memory_page_size) { +#if PLATFORM_WINDOWS + SYSTEM_INFO system_info; + memset(&system_info, 0, sizeof(system_info)); + GetSystemInfo(&system_info); + _memory_page_size = system_info.dwPageSize; + _memory_map_granularity = system_info.dwAllocationGranularity; + if (config && config->enable_huge_pages) { + HANDLE token = 0; + size_t large_page_minimum = GetLargePageMinimum(); + if (large_page_minimum) + OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &token); + if (token) { + LUID luid; + if (LookupPrivilegeValue(0, SE_LOCK_MEMORY_NAME, &luid)) { + TOKEN_PRIVILEGES token_privileges; + memset(&token_privileges, 0, sizeof(token_privileges)); + token_privileges.PrivilegeCount = 1; + token_privileges.Privileges[0].Luid = luid; + token_privileges.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; + if (AdjustTokenPrivileges(token, FALSE, &token_privileges, 0, 0, 0)) { + DWORD err = GetLastError(); + if (err == ERROR_SUCCESS) { + _memory_huge_pages = 1; + _memory_page_size = large_page_minimum; + _memory_map_granularity = large_page_minimum; + } + } + } + CloseHandle(token); + } + } +#else + _memory_page_size = (size_t)sysconf(_SC_PAGESIZE); + _memory_map_granularity = _memory_page_size; + if (config && config->enable_huge_pages) { +#if defined(__linux__) + size_t huge_page_size = 0; + FILE* meminfo = fopen("/proc/meminfo", "r"); + if (meminfo) { + char line[128]; + while (!huge_page_size && fgets(line, sizeof(line) - 1, meminfo)) { + line[sizeof(line) - 1] = 0; + if (strstr(line, "Hugepagesize:")) + huge_page_size = (size_t)strtol(line + 13, 0, 10) * 1024; + } + fclose(meminfo); + } + if (huge_page_size) { + _memory_huge_pages = 1; + _memory_page_size = huge_page_size; + _memory_map_granularity = huge_page_size; + } +#elif defined(__FreeBSD__) + int rc; + size_t sz = sizeof(rc); + + if (sysctlbyname("vm.pmap.pg_ps_enabled", &rc, &sz, NULL, 0) == 0 && rc == 1) { + _memory_huge_pages = 1; + _memory_page_size = 2 * 1024 * 1024; + _memory_map_granularity = _memory_page_size; + } +#elif defined(__APPLE__) + _memory_huge_pages = 1; + _memory_page_size = 2 * 1024 * 1024; + _memory_map_granularity = _memory_page_size; +#endif + } +#endif + } else { + if (config && config->enable_huge_pages) + _memory_huge_pages = 1; + } + + //The ABA counter in heap orphan list is tied to using 512 (bitmask 0x1FF) + if (_memory_page_size < 512) + _memory_page_size = 512; + if (_memory_page_size > (64 * 1024 * 1024)) + _memory_page_size = (64 * 1024 * 1024); + _memory_page_size_shift = 0; + size_t page_size_bit = _memory_page_size; + while (page_size_bit != 1) { + ++_memory_page_size_shift; + page_size_bit >>= 1; + } + _memory_page_size = ((size_t)1 << _memory_page_size_shift); + +#if RPMALLOC_CONFIGURABLE + size_t span_size = _memory_config.span_size; + if (!span_size) + span_size = (64 * 1024); + if (span_size > (256 * 1024)) + span_size = (256 * 1024); + _memory_span_size = 4096; + _memory_span_size_shift = 12; + while (_memory_span_size < span_size) { + _memory_span_size <<= 1; + ++_memory_span_size_shift; + } + _memory_span_mask = ~(uintptr_t)(_memory_span_size - 1); +#endif + + _memory_span_map_count = ( _memory_config.span_map_count ? _memory_config.span_map_count : DEFAULT_SPAN_MAP_COUNT); + if ((_memory_span_size * _memory_span_map_count) < _memory_page_size) + _memory_span_map_count = (_memory_page_size / _memory_span_size); + if ((_memory_page_size >= _memory_span_size) && ((_memory_span_map_count * _memory_span_size) % _memory_page_size)) + _memory_span_map_count = (_memory_page_size / _memory_span_size); + + _memory_config.page_size = _memory_page_size; + _memory_config.span_size = _memory_span_size; + _memory_config.span_map_count = _memory_span_map_count; + _memory_config.enable_huge_pages = _memory_huge_pages; + + _memory_span_release_count = (_memory_span_map_count > 4 ? ((_memory_span_map_count < 64) ? _memory_span_map_count : 64) : 4); + _memory_span_release_count_large = (_memory_span_release_count > 8 ? (_memory_span_release_count / 4) : 2); + +#if (defined(__APPLE__) || defined(__HAIKU__)) && ENABLE_PRELOAD + if (pthread_key_create(&_memory_thread_heap, 0)) + return -1; +#endif +#if defined(_MSC_VER) && !defined(__clang__) && (!defined(BUILD_DYNAMIC_LINK) || !BUILD_DYNAMIC_LINK) + fls_key = FlsAlloc(&rp_thread_destructor); +#endif + + atomic_store32(&_memory_heap_id, 0); + atomic_store32(&_memory_orphan_counter, 0); +#if ENABLE_STATISTICS + atomic_store32(&_memory_active_heaps, 0); + atomic_store32(&_reserved_spans, 0); + atomic_store32(&_mapped_pages, 0); + _mapped_pages_peak = 0; + atomic_store32(&_mapped_total, 0); + atomic_store32(&_unmapped_total, 0); + atomic_store32(&_mapped_pages_os, 0); + atomic_store32(&_huge_pages_current, 0); + _huge_pages_peak = 0; +#endif + + //Setup all small and medium size classes + size_t iclass = 0; + _memory_size_class[iclass].block_size = SMALL_GRANULARITY; + _memory_adjust_size_class(iclass); + for (iclass = 1; iclass < SMALL_CLASS_COUNT; ++iclass) { + size_t size = iclass * SMALL_GRANULARITY; + _memory_size_class[iclass].block_size = (uint32_t)size; + _memory_adjust_size_class(iclass); + } + //At least two blocks per span, then fall back to large allocations + _memory_medium_size_limit = (_memory_span_size - SPAN_HEADER_SIZE) >> 1; + if (_memory_medium_size_limit > MEDIUM_SIZE_LIMIT) + _memory_medium_size_limit = MEDIUM_SIZE_LIMIT; + for (iclass = 0; iclass < MEDIUM_CLASS_COUNT; ++iclass) { + size_t size = SMALL_SIZE_LIMIT + ((iclass + 1) * MEDIUM_GRANULARITY); + if (size > _memory_medium_size_limit) + break; + _memory_size_class[SMALL_CLASS_COUNT + iclass].block_size = (uint32_t)size; + _memory_adjust_size_class(SMALL_CLASS_COUNT + iclass); + } + + for (size_t list_idx = 0; list_idx < HEAP_ARRAY_SIZE; ++list_idx) + atomic_store_ptr(&_memory_heaps[list_idx], 0); + + //Initialize this thread + rpmalloc_thread_initialize(); + return 0; +} + +//! Finalize the allocator +void +rpmalloc_finalize(void) { + atomic_thread_fence_acquire(); + +// printf(">>> rpmalloc_finalize\n"); + + rpmalloc_thread_finalize(); + //rpmalloc_dump_statistics(stderr); + + //Free all thread caches + for (size_t list_idx = 0; list_idx < HEAP_ARRAY_SIZE; ++list_idx) { + heap_t* heap = atomic_load_ptr(&_memory_heaps[list_idx]); + while (heap) { + if (heap->spans_reserved) { + span_t* span = _memory_map_spans(heap, heap->spans_reserved); + _memory_unmap_span(span); + } + + for (size_t iclass = 0; iclass < SIZE_CLASS_COUNT; ++iclass) { + heap_class_t* heap_class = heap->span_class + iclass; + span_t* span = heap_class->partial_span; + while (span) { + span_t* next = span->next; + if (span->state == SPAN_STATE_ACTIVE) { + uint32_t used_blocks = span->block_count; + if (span->free_list_limit < span->block_count) + used_blocks = span->free_list_limit; + uint32_t free_blocks = 0; + void* block = heap_class->free_list; + while (block) { + ++free_blocks; + block = *((void**)block); + } + block = span->free_list; + while (block) { + ++free_blocks; + block = *((void**)block); + } + if (used_blocks == (free_blocks + span->list_size)) + _memory_heap_cache_insert(heap, span); + } else { + if (span->used_count == span->list_size) + _memory_heap_cache_insert(heap, span); + } + span = next; + } + } + +#if ENABLE_THREAD_CACHE + //Free span caches (other thread might have deferred after the thread using this heap finalized) + _memory_heap_cache_adopt_deferred(heap); + for (size_t iclass = 0; iclass < LARGE_CLASS_COUNT; ++iclass) { + if (heap->span_cache[iclass]) + _memory_unmap_span_list(heap->span_cache[iclass]); + } +#endif + heap_t* next_heap = heap->next_heap; + size_t heap_size = (1 + (sizeof(heap_t) >> _memory_page_size_shift)) * _memory_page_size; + _memory_unmap(heap, heap_size, heap->align_offset, heap_size); + heap = next_heap; + } + } + +#if ENABLE_GLOBAL_CACHE + //Free global caches + for (size_t iclass = 0; iclass < LARGE_CLASS_COUNT; ++iclass) + _memory_cache_finalize(&_memory_span_cache[iclass]); +#endif + + atomic_store_ptr(&_memory_orphan_heaps, 0); + atomic_thread_fence_release(); + +#if ENABLE_STATISTICS + //If you hit these asserts you probably have memory leaks or double frees in your code + assert(!atomic_load32(&_mapped_pages)); + assert(!atomic_load32(&_reserved_spans)); + assert(!atomic_load32(&_mapped_pages_os)); +#endif + +#if (defined(__APPLE__) || defined(__HAIKU__)) && ENABLE_PRELOAD + pthread_key_delete(_memory_thread_heap); +#endif +#if defined(_MSC_VER) && !defined(__clang__) && (!defined(BUILD_DYNAMIC_LINK) || !BUILD_DYNAMIC_LINK) + FlsFree(fls_key); +#endif + _rpmalloc_initialized = 0; +} + +//! Initialize thread, assign heap +extern inline void +rpmalloc_thread_initialize(void) { +// printf("rpmalloc_thread_initialize( )\n"); + if (!get_thread_heap_raw()) { + heap_t* heap = _memory_allocate_heap(); + if (heap) { + atomic_thread_fence_acquire(); +#if ENABLE_STATISTICS + atomic_incr32(&_memory_active_heaps); +#endif + set_thread_heap(heap); +#if defined(_MSC_VER) && !defined(__clang__) && (!defined(BUILD_DYNAMIC_LINK) || !BUILD_DYNAMIC_LINK) + FlsSetValue(fls_key, heap); +#endif + } + } +} + +//! Finalize thread, orphan heap +void +rpmalloc_thread_finalize(void) { + +// printf("rpmalloc_thread_finalize( )\n"); + + heap_t* heap = get_thread_heap_raw(); + if (!heap) + return; + + //Release thread cache spans back to global cache +#if ENABLE_THREAD_CACHE + _memory_heap_cache_adopt_deferred(heap); + for (size_t iclass = 0; iclass < LARGE_CLASS_COUNT; ++iclass) { + span_t* span = heap->span_cache[iclass]; +#if ENABLE_GLOBAL_CACHE + while (span) { + assert(span->span_count == (iclass + 1)); + size_t release_count = (!iclass ? _memory_span_release_count : _memory_span_release_count_large); + span_t* next = _memory_span_list_split(span, (uint32_t)release_count); +#if ENABLE_STATISTICS + heap->thread_to_global += (size_t)span->list_size * span->span_count * _memory_span_size; + heap->span_use[iclass].spans_to_global += span->list_size; +#endif + _memory_global_cache_insert(span); + span = next; + } +#else + if (span) + _memory_unmap_span_list(span); +#endif + heap->span_cache[iclass] = 0; + } +#endif + + //Orphan the heap + void* raw_heap; + uintptr_t orphan_counter; + heap_t* last_heap; + do { + last_heap = atomic_load_ptr(&_memory_orphan_heaps); + heap->next_orphan = (void*)((uintptr_t)last_heap & ~(uintptr_t)0x1FF); + orphan_counter = (uintptr_t)atomic_incr32(&_memory_orphan_counter); + raw_heap = (void*)((uintptr_t)heap | (orphan_counter & (uintptr_t)0x1FF)); + } while (!atomic_cas_ptr(&_memory_orphan_heaps, raw_heap, last_heap)); + + set_thread_heap(0); + +#if ENABLE_STATISTICS + atomic_add32(&_memory_active_heaps, -1); + assert(atomic_load32(&_memory_active_heaps) >= 0); +#endif +} + +int +rpmalloc_is_thread_initialized(void) { + return (get_thread_heap_raw() != 0) ? 1 : 0; +} + +const rpmalloc_config_t* +rpmalloc_config(void) { + return &_memory_config; +} + +//! Map new pages to virtual memory +static void* +_memory_map_os(size_t size, size_t* offset) { + //Either size is a heap (a single page) or a (multiple) span - we only need to align spans, and only if larger than map granularity + size_t padding = ((size >= _memory_span_size) && (_memory_span_size > _memory_map_granularity)) ? _memory_span_size : 0; + assert(size >= _memory_page_size); +#if PLATFORM_WINDOWS + //Ok to MEM_COMMIT - according to MSDN, "actual physical pages are not allocated unless/until the virtual addresses are actually accessed" + void* ptr = VirtualAlloc(0, size + padding, (_memory_huge_pages ? MEM_LARGE_PAGES : 0) | MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); + if (!ptr) { + assert(!"Failed to map virtual memory block"); + return 0; + } +#else + int flags = MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZED; +# if defined(__APPLE__) + void* ptr = mmap(0, size + padding, PROT_READ | PROT_WRITE, flags, (_memory_huge_pages ? VM_FLAGS_SUPERPAGE_SIZE_2MB : -1), 0); +# elif defined(MAP_HUGETLB) + void* ptr = mmap(0, size + padding, PROT_READ | PROT_WRITE, (_memory_huge_pages ? MAP_HUGETLB : 0) | flags, -1, 0); +# else + void* ptr = mmap(0, size + padding, PROT_READ | PROT_WRITE, flags, -1, 0); +# endif + if ((ptr == MAP_FAILED) || !ptr) { + assert("Failed to map virtual memory block" == 0); + return 0; + } +#endif +#if ENABLE_STATISTICS + atomic_add32(&_mapped_pages_os, (int32_t)((size + padding) >> _memory_page_size_shift)); +#endif + if (padding) { + size_t final_padding = padding - ((uintptr_t)ptr & ~_memory_span_mask); + assert(final_padding <= _memory_span_size); + assert(final_padding <= padding); + assert(!(final_padding % 8)); + ptr = pointer_offset(ptr, final_padding); + *offset = final_padding >> 3; + } + assert((size < _memory_span_size) || !((uintptr_t)ptr & ~_memory_span_mask)); + return ptr; +} + +//! Unmap pages from virtual memory +static void +_memory_unmap_os(void* address, size_t size, size_t offset, size_t release) { + assert(release || (offset == 0)); + assert(!release || (release >= _memory_page_size)); + assert(size >= _memory_page_size); + if (release && offset) { + offset <<= 3; + address = pointer_offset(address, -(int32_t)offset); +#if PLATFORM_POSIX + //Padding is always one span size + release += _memory_span_size; +#endif + } +#if !DISABLE_UNMAP +#if PLATFORM_WINDOWS + if (!VirtualFree(address, release ? 0 : size, release ? MEM_RELEASE : MEM_DECOMMIT)) { + assert(!"Failed to unmap virtual memory block"); + } +#else + if (release) { + if (munmap(address, release)) { + assert("Failed to unmap virtual memory block" == 0); + } + } + else { +#if defined(POSIX_MADV_FREE) + if (posix_madvise(address, size, POSIX_MADV_FREE)) +#endif + if (posix_madvise(address, size, POSIX_MADV_DONTNEED)) { + assert("Failed to madvise virtual memory block as free" == 0); + } + } +#endif +#endif +#if ENABLE_STATISTICS + if (release) + atomic_add32(&_mapped_pages_os, -(int32_t)(release >> _memory_page_size_shift)); +#endif +} + +// Extern interface + +extern inline RPMALLOC_ALLOCATOR void* +rpmalloc(size_t size) { +#if ENABLE_VALIDATE_ARGS + if (size >= MAX_ALLOC_SIZE) { + errno = EINVAL; + return 0; + } +#endif + heap_t* heap = get_thread_heap(); + return _memory_allocate(heap, size); +} + +extern inline void +rpfree(void* ptr) { + _memory_deallocate(ptr); +} + +extern inline RPMALLOC_ALLOCATOR void* +rpcalloc(size_t num, size_t size) { + size_t total; +#if ENABLE_VALIDATE_ARGS +#if PLATFORM_WINDOWS + int err = SizeTMult(num, size, &total); + if ((err != S_OK) || (total >= MAX_ALLOC_SIZE)) { + errno = EINVAL; + return 0; + } +#else + int err = __builtin_umull_overflow(num, size, &total); + if (err || (total >= MAX_ALLOC_SIZE)) { + errno = EINVAL; + return 0; + } +#endif +#else + total = num * size; +#endif + heap_t* heap = get_thread_heap(); + void* block = _memory_allocate(heap, total); + memset(block, 0, total); + return block; +} + +extern inline RPMALLOC_ALLOCATOR void* +rprealloc(void* ptr, size_t size) { +#if ENABLE_VALIDATE_ARGS + if (size >= MAX_ALLOC_SIZE) { + errno = EINVAL; + return ptr; + } +#endif + return _memory_reallocate(ptr, size, 0, 0); +} + +extern RPMALLOC_ALLOCATOR void* +rpaligned_realloc(void* ptr, size_t alignment, size_t size, size_t oldsize, + unsigned int flags) { +#if ENABLE_VALIDATE_ARGS + if ((size + alignment < size) || (alignment > _memory_page_size)) { + errno = EINVAL; + return 0; + } +#endif + void* block; + if (alignment > 32) { + size_t usablesize = _memory_usable_size(ptr); + if ((usablesize >= size) && (size >= (usablesize / 2)) && !((uintptr_t)ptr & (alignment - 1))) + return ptr; + + block = rpaligned_alloc(alignment, size); + if (ptr) { + if (!oldsize) + oldsize = usablesize; + if (!(flags & RPMALLOC_NO_PRESERVE)) + memcpy(block, ptr, oldsize < size ? oldsize : size); + rpfree(ptr); + } + //Mark as having aligned blocks + span_t* span = (span_t*)((uintptr_t)block & _memory_span_mask); + span->flags |= SPAN_FLAG_ALIGNED_BLOCKS; + } else { + block = _memory_reallocate(ptr, size, oldsize, flags); + } + return block; +} + +extern RPMALLOC_ALLOCATOR void* +rpaligned_alloc(size_t alignment, size_t size) { + if (alignment <= 16) + return rpmalloc(size); + +#if ENABLE_VALIDATE_ARGS + if ((size + alignment) < size) { + errno = EINVAL; + return 0; + } + if (alignment & (alignment - 1)) { + errno = EINVAL; + return 0; + } +#endif + + void* ptr = 0; + size_t align_mask = alignment - 1; + if (alignment < _memory_page_size) { + ptr = rpmalloc(size + alignment); + if ((uintptr_t)ptr & align_mask) + ptr = (void*)(((uintptr_t)ptr & ~(uintptr_t)align_mask) + alignment); + //Mark as having aligned blocks + span_t* span = (span_t*)((uintptr_t)ptr & _memory_span_mask); + span->flags |= SPAN_FLAG_ALIGNED_BLOCKS; + return ptr; + } + + // Fallback to mapping new pages for this request. Since pointers passed + // to rpfree must be able to reach the start of the span by bitmasking of + // the address with the span size, the returned aligned pointer from this + // function must be with a span size of the start of the mapped area. + // In worst case this requires us to loop and map pages until we get a + // suitable memory address. It also means we can never align to span size + // or greater, since the span header will push alignment more than one + // span size away from span start (thus causing pointer mask to give us + // an invalid span start on free) + if (alignment & align_mask) { + errno = EINVAL; + return 0; + } + if (alignment >= _memory_span_size) { + errno = EINVAL; + return 0; + } + + size_t extra_pages = alignment / _memory_page_size; + + // Since each span has a header, we will at least need one extra memory page + size_t num_pages = 1 + (size / _memory_page_size); + if (size & (_memory_page_size - 1)) + ++num_pages; + + if (extra_pages > num_pages) + num_pages = 1 + extra_pages; + + size_t original_pages = num_pages; + size_t limit_pages = (_memory_span_size / _memory_page_size) * 2; + if (limit_pages < (original_pages * 2)) + limit_pages = original_pages * 2; + + size_t mapped_size, align_offset; + span_t* span; + +retry: + align_offset = 0; + mapped_size = num_pages * _memory_page_size; + + span = _memory_map(mapped_size, &align_offset); + if (!span) { + errno = ENOMEM; + return 0; + } + ptr = pointer_offset(span, SPAN_HEADER_SIZE); + + if ((uintptr_t)ptr & align_mask) + ptr = (void*)(((uintptr_t)ptr & ~(uintptr_t)align_mask) + alignment); + + if (((size_t)pointer_diff(ptr, span) >= _memory_span_size) || + (pointer_offset(ptr, size) > pointer_offset(span, mapped_size)) || + (((uintptr_t)ptr & _memory_span_mask) != (uintptr_t)span)) { + _memory_unmap(span, mapped_size, align_offset, mapped_size); + ++num_pages; + if (num_pages > limit_pages) { + errno = EINVAL; + return 0; + } + goto retry; + } + + //Store page count in span_count + span->size_class = (uint32_t)-1; + span->span_count = (uint32_t)num_pages; + span->align_offset = (uint32_t)align_offset; + _memory_statistics_add_peak(&_huge_pages_current, num_pages, _huge_pages_peak); + + return ptr; +} + +extern inline RPMALLOC_ALLOCATOR void* +rpmemalign(size_t alignment, size_t size) { + return rpaligned_alloc(alignment, size); +} + +extern inline int +rpposix_memalign(void **memptr, size_t alignment, size_t size) { + if (memptr) + *memptr = rpaligned_alloc(alignment, size); + else + return EINVAL; + return *memptr ? 0 : ENOMEM; +} + +extern inline size_t +rpmalloc_usable_size(void* ptr) { + return (ptr ? _memory_usable_size(ptr) : 0); +} + +extern inline void +rpmalloc_thread_collect(void) { +} + +void +rpmalloc_thread_statistics(rpmalloc_thread_statistics_t* stats) { + memset(stats, 0, sizeof(rpmalloc_thread_statistics_t)); + heap_t* heap = get_thread_heap_raw(); + if (!heap) + return; + + for (size_t iclass = 0; iclass < SIZE_CLASS_COUNT; ++iclass) { + size_class_t* size_class = _memory_size_class + iclass; + heap_class_t* heap_class = heap->span_class + iclass; + span_t* span = heap_class->partial_span; + while (span) { + atomic_thread_fence_acquire(); + size_t free_count = span->list_size; + if (span->state == SPAN_STATE_PARTIAL) + free_count += (size_class->block_count - span->used_count); + stats->sizecache = free_count * size_class->block_size; + span = span->next; + } + } + +#if ENABLE_THREAD_CACHE + for (size_t iclass = 0; iclass < LARGE_CLASS_COUNT; ++iclass) { + if (heap->span_cache[iclass]) + stats->spancache = (size_t)heap->span_cache[iclass]->list_size * (iclass + 1) * _memory_span_size; + span_t* deferred_list = !iclass ? atomic_load_ptr(&heap->span_cache_deferred) : 0; + //TODO: Incorrect, for deferred lists the size is NOT stored in list_size + if (deferred_list) + stats->spancache = (size_t)deferred_list->list_size * (iclass + 1) * _memory_span_size; + } +#endif +#if ENABLE_STATISTICS + stats->thread_to_global = heap->thread_to_global; + stats->global_to_thread = heap->global_to_thread; + + for (size_t iclass = 0; iclass < LARGE_CLASS_COUNT; ++iclass) { + stats->span_use[iclass].current = (size_t)heap->span_use[iclass].current; + stats->span_use[iclass].peak = (size_t)heap->span_use[iclass].high; + stats->span_use[iclass].to_global = (size_t)heap->span_use[iclass].spans_to_global; + stats->span_use[iclass].from_global = (size_t)heap->span_use[iclass].spans_from_global; + stats->span_use[iclass].to_cache = (size_t)heap->span_use[iclass].spans_to_cache; + stats->span_use[iclass].from_cache = (size_t)heap->span_use[iclass].spans_from_cache; + stats->span_use[iclass].to_reserved = (size_t)heap->span_use[iclass].spans_to_reserved; + stats->span_use[iclass].from_reserved = (size_t)heap->span_use[iclass].spans_from_reserved; + stats->span_use[iclass].map_calls = (size_t)heap->span_use[iclass].spans_map_calls; + } + for (size_t iclass = 0; iclass < SIZE_CLASS_COUNT; ++iclass) { + stats->size_use[iclass].alloc_current = (size_t)atomic_load32(&heap->size_class_use[iclass].alloc_current); + stats->size_use[iclass].alloc_peak = (size_t)heap->size_class_use[iclass].alloc_peak; + stats->size_use[iclass].alloc_total = (size_t)heap->size_class_use[iclass].alloc_total; + stats->size_use[iclass].free_total = (size_t)atomic_load32(&heap->size_class_use[iclass].free_total); + stats->size_use[iclass].spans_to_cache = (size_t)heap->size_class_use[iclass].spans_to_cache; + stats->size_use[iclass].spans_from_cache = (size_t)heap->size_class_use[iclass].spans_from_cache; + stats->size_use[iclass].spans_from_reserved = (size_t)heap->size_class_use[iclass].spans_from_reserved; + stats->size_use[iclass].map_calls = (size_t)heap->size_class_use[iclass].spans_map_calls; + } +#endif +} + +void +rpmalloc_global_statistics(rpmalloc_global_statistics_t* stats) { + memset(stats, 0, sizeof(rpmalloc_global_statistics_t)); +#if ENABLE_STATISTICS + stats->mapped = (size_t)atomic_load32(&_mapped_pages) * _memory_page_size; + stats->mapped_peak = (size_t)_mapped_pages_peak * _memory_page_size; + stats->mapped_total = (size_t)atomic_load32(&_mapped_total) * _memory_page_size; + stats->unmapped_total = (size_t)atomic_load32(&_unmapped_total) * _memory_page_size; + stats->huge_alloc = (size_t)atomic_load32(&_huge_pages_current) * _memory_page_size; + stats->huge_alloc_peak = (size_t)_huge_pages_peak * _memory_page_size; +#endif +#if ENABLE_GLOBAL_CACHE + for (size_t iclass = 0; iclass < LARGE_CLASS_COUNT; ++iclass) { + stats->cached += (size_t)atomic_load32(&_memory_span_cache[iclass].size) * (iclass + 1) * _memory_span_size; + } +#endif +} + +void +rpmalloc_dump_statistics(void* file) { +#if ENABLE_STATISTICS + //If you hit this assert, you still have active threads or forgot to finalize some thread(s) + assert(atomic_load32(&_memory_active_heaps) == 0); + + for (size_t list_idx = 0; list_idx < HEAP_ARRAY_SIZE; ++list_idx) { + heap_t* heap = atomic_load_ptr(&_memory_heaps[list_idx]); + while (heap) { + fprintf(file, "Heap %d stats:\n", heap->id); + fprintf(file, "Class CurAlloc PeakAlloc TotAlloc TotFree BlkSize BlkCount PeakAllocMiB ToCacheMiB FromCacheMiB FromReserveMiB MmapCalls\n"); + for (size_t iclass = 0; iclass < SIZE_CLASS_COUNT; ++iclass) { + if (!heap->size_class_use[iclass].alloc_total) { + assert(!atomic_load32(&heap->size_class_use[iclass].free_total)); + assert(!heap->size_class_use[iclass].spans_map_calls); + continue; + } + fprintf(file, "%3u: %10u %10u %10u %10u %8u %8u %13zu %11zu %12zu %14zu %9u\n", (uint32_t)iclass, + atomic_load32(&heap->size_class_use[iclass].alloc_current), + heap->size_class_use[iclass].alloc_peak, + heap->size_class_use[iclass].alloc_total, + atomic_load32(&heap->size_class_use[iclass].free_total), + _memory_size_class[iclass].block_size, + _memory_size_class[iclass].block_count, + ((size_t)heap->size_class_use[iclass].alloc_peak * (size_t)_memory_size_class[iclass].block_size) / (size_t)(1024 * 1024), + ((size_t)heap->size_class_use[iclass].spans_to_cache * _memory_span_size) / (size_t)(1024 * 1024), + ((size_t)heap->size_class_use[iclass].spans_from_cache * _memory_span_size) / (size_t)(1024 * 1024), + ((size_t)heap->size_class_use[iclass].spans_from_reserved * _memory_span_size) / (size_t)(1024 * 1024), + heap->size_class_use[iclass].spans_map_calls); + } + fprintf(file, "Spans Current Peak PeakMiB Cached ToCacheMiB FromCacheMiB ToReserveMiB FromReserveMiB ToGlobalMiB FromGlobalMiB MmapCalls\n"); + for (size_t iclass = 0; iclass < LARGE_CLASS_COUNT; ++iclass) { + if (!heap->span_use[iclass].high && !heap->span_use[iclass].spans_map_calls) + continue; + fprintf(file, "%4u: %8u %8u %8zu %7u %11zu %12zu %12zu %14zu %11zu %13zu %10u\n", (uint32_t)(iclass + 1), + heap->span_use[iclass].current, + heap->span_use[iclass].high, + ((size_t)heap->span_use[iclass].high * (size_t)_memory_span_size * (iclass + 1)) / (size_t)(1024 * 1024), + heap->span_cache[iclass] ? heap->span_cache[iclass]->list_size : 0, + ((size_t)heap->span_use[iclass].spans_to_cache * (iclass + 1) * _memory_span_size) / (size_t)(1024 * 1024), + ((size_t)heap->span_use[iclass].spans_from_cache * (iclass + 1) * _memory_span_size) / (size_t)(1024 * 1024), + ((size_t)heap->span_use[iclass].spans_to_reserved * (iclass + 1) * _memory_span_size) / (size_t)(1024 * 1024), + ((size_t)heap->span_use[iclass].spans_from_reserved * (iclass + 1) * _memory_span_size) / (size_t)(1024 * 1024), + ((size_t)heap->span_use[iclass].spans_to_global * (size_t)_memory_span_size * (iclass + 1)) / (size_t)(1024 * 1024), + ((size_t)heap->span_use[iclass].spans_from_global * (size_t)_memory_span_size * (iclass + 1)) / (size_t)(1024 * 1024), + heap->span_use[iclass].spans_map_calls); + } + fprintf(file, "ThreadToGlobalMiB GlobalToThreadMiB\n"); + fprintf(file, "%17zu %17zu\n", (size_t)heap->thread_to_global / (size_t)(1024 * 1024), (size_t)heap->global_to_thread / (size_t)(1024 * 1024)); + heap = heap->next_heap; + } + } + + size_t huge_current = (size_t)atomic_load32(&_huge_pages_current) * _memory_page_size; + size_t huge_peak = (size_t)_huge_pages_peak * _memory_page_size; + fprintf(file, "HugeCurrentMiB HugePeakMiB\n"); + fprintf(file, "%14zu %11zu\n", huge_current / (size_t)(1024 * 1024), huge_peak / (size_t)(1024 * 1024)); + + size_t mapped = (size_t)atomic_load32(&_mapped_pages) * _memory_page_size; + size_t mapped_os = (size_t)atomic_load32(&_mapped_pages_os) * _memory_page_size; + size_t mapped_peak = (size_t)_mapped_pages_peak * _memory_page_size; + size_t mapped_total = (size_t)atomic_load32(&_mapped_total) * _memory_page_size; + size_t unmapped_total = (size_t)atomic_load32(&_unmapped_total) * _memory_page_size; + size_t reserved_total = (size_t)atomic_load32(&_reserved_spans) * _memory_span_size; + fprintf(file, "MappedMiB MappedOSMiB MappedPeakMiB MappedTotalMiB UnmappedTotalMiB ReservedTotalMiB\n"); + fprintf(file, "%9zu %11zu %13zu %14zu %16zu %16zu\n", + mapped / (size_t)(1024 * 1024), + mapped_os / (size_t)(1024 * 1024), + mapped_peak / (size_t)(1024 * 1024), + mapped_total / (size_t)(1024 * 1024), + unmapped_total / (size_t)(1024 * 1024), + reserved_total / (size_t)(1024 * 1024)); + + fprintf(file, "\n"); +#else + (void)sizeof(file); +#endif +} + +#if ENABLE_PRELOAD || ENABLE_OVERRIDE + +#include "malloc.c" + +#endif diff --git a/libdap/src/rpmalloc/rpmalloc.h b/libdap/src/rpmalloc/rpmalloc.h new file mode 100644 index 0000000000000000000000000000000000000000..bfbdca2dc5af1184a60a10d4cca3ea58ee7c2dee --- /dev/null +++ b/libdap/src/rpmalloc/rpmalloc.h @@ -0,0 +1,268 @@ +/* rpmalloc.h - Memory allocator - Public Domain - 2016 Mattias Jansson + * + * This library provides a cross-platform lock free thread caching malloc implementation in C11. + * The latest source code is always available at + * + * https://github.com/mjansson/rpmalloc + * + * This library is put in the public domain; you can redistribute it and/or modify it without any restrictions. + * + */ + +#pragma once + +#include <stddef.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(__clang__) || defined(__GNUC__) +# define RPMALLOC_EXPORT __attribute__((visibility("default"))) +# define RPMALLOC_ALLOCATOR +# define RPMALLOC_ATTRIB_MALLOC __attribute__((__malloc__)) +# if defined(__clang_major__) && (__clang_major__ < 4) +# define RPMALLOC_ATTRIB_ALLOC_SIZE(size) +# define RPMALLOC_ATTRIB_ALLOC_SIZE2(count, size) +# else +# define RPMALLOC_ATTRIB_ALLOC_SIZE(size) __attribute__((alloc_size(size))) +# define RPMALLOC_ATTRIB_ALLOC_SIZE2(count, size) __attribute__((alloc_size(count, size))) +# endif +# define RPMALLOC_CDECL +#elif defined(_MSC_VER) +# define RPMALLOC_EXPORT +# define RPMALLOC_ALLOCATOR __declspec(allocator) __declspec(restrict) +# define RPMALLOC_ATTRIB_MALLOC +# define RPMALLOC_ATTRIB_ALLOC_SIZE(size) +# define RPMALLOC_ATTRIB_ALLOC_SIZE2(count,size) +# define RPMALLOC_CDECL __cdecl +#else +# define RPMALLOC_EXPORT +# define RPMALLOC_ALLOCATOR +# define RPMALLOC_ATTRIB_MALLOC +# define RPMALLOC_ATTRIB_ALLOC_SIZE(size) +# define RPMALLOC_ATTRIB_ALLOC_SIZE2(count,size) +# define RPMALLOC_CDECL +#endif + +//! Define RPMALLOC_CONFIGURABLE to enable configuring sizes +#ifndef RPMALLOC_CONFIGURABLE +#define RPMALLOC_CONFIGURABLE 0 +#endif + +//! Flag to rpaligned_realloc to not preserve content in reallocation +#define RPMALLOC_NO_PRESERVE 1 + +//redefinition from mman-linux.h For POSIX +#ifndef POSIX_MADV_DONTNEED +#define POSIX_MADV_DONTNEED 4/* Don't need these pages. */ +#endif + +typedef struct rpmalloc_global_statistics_t { + //! Current amount of virtual memory mapped, all of which might not have been committed (only if ENABLE_STATISTICS=1) + size_t mapped; + //! Peak amount of virtual memory mapped, all of which might not have been committed (only if ENABLE_STATISTICS=1) + size_t mapped_peak; + //! Current amount of memory in global caches for small and medium sizes (<32KiB) + size_t cached; + //! Current amount of memory allocated in huge allocations, i.e larger than LARGE_SIZE_LIMIT which is 2MiB by default (only if ENABLE_STATISTICS=1) + size_t huge_alloc; + //! Peak amount of memory allocated in huge allocations, i.e larger than LARGE_SIZE_LIMIT which is 2MiB by default (only if ENABLE_STATISTICS=1) + size_t huge_alloc_peak; + //! Total amount of memory mapped since initialization (only if ENABLE_STATISTICS=1) + size_t mapped_total; + //! Total amount of memory unmapped since initialization (only if ENABLE_STATISTICS=1) + size_t unmapped_total; +} rpmalloc_global_statistics_t; + +typedef struct rpmalloc_thread_statistics_t { + //! Current number of bytes available in thread size class caches for small and medium sizes (<32KiB) + size_t sizecache; + //! Current number of bytes available in thread span caches for small and medium sizes (<32KiB) + size_t spancache; + //! Total number of bytes transitioned from thread cache to global cache (only if ENABLE_STATISTICS=1) + size_t thread_to_global; + //! Total number of bytes transitioned from global cache to thread cache (only if ENABLE_STATISTICS=1) + size_t global_to_thread; + //! Per span count statistics (only if ENABLE_STATISTICS=1) + struct { + //! Currently used number of spans + size_t current; + //! High water mark of spans used + size_t peak; + //! Number of spans transitioned to global cache + size_t to_global; + //! Number of spans transitioned from global cache + size_t from_global; + //! Number of spans transitioned to thread cache + size_t to_cache; + //! Number of spans transitioned from thread cache + size_t from_cache; + //! Number of spans transitioned to reserved state + size_t to_reserved; + //! Number of spans transitioned from reserved state + size_t from_reserved; + //! Number of raw memory map calls (not hitting the reserve spans but resulting in actual OS mmap calls) + size_t map_calls; + } span_use[32]; + //! Per size class statistics (only if ENABLE_STATISTICS=1) + struct { + //! Current number of allocations + size_t alloc_current; + //! Peak number of allocations + size_t alloc_peak; + //! Total number of allocations + size_t alloc_total; + //! Total number of frees + size_t free_total; + //! Number of spans transitioned to cache + size_t spans_to_cache; + //! Number of spans transitioned from cache + size_t spans_from_cache; + //! Number of spans transitioned from reserved state + size_t spans_from_reserved; + //! Number of raw memory map calls (not hitting the reserve spans but resulting in actual OS mmap calls) + size_t map_calls; + } size_use[128]; +} rpmalloc_thread_statistics_t; + +typedef struct rpmalloc_config_t { + //! Map memory pages for the given number of bytes. The returned address MUST be + // aligned to the rpmalloc span size, which will always be a power of two. + // Optionally the function can store an alignment offset in the offset variable + // in case it performs alignment and the returned pointer is offset from the + // actual start of the memory region due to this alignment. The alignment offset + // will be passed to the memory unmap function. The alignment offset MUST NOT be + // larger than 65535 (storable in an uint16_t), if it is you must use natural + // alignment to shift it into 16 bits. If you set a memory_map function, you + // must also set a memory_unmap function or else the default implementation will + // be used for both. + void* (*memory_map)(size_t size, size_t* offset); + //! Unmap the memory pages starting at address and spanning the given number of bytes. + // If release is set to non-zero, the unmap is for an entire span range as returned by + // a previous call to memory_map and that the entire range should be released. The + // release argument holds the size of the entire span range. If release is set to 0, + // the unmap is a partial decommit of a subset of the mapped memory range. + // If you set a memory_unmap function, you must also set a memory_map function or + // else the default implementation will be used for both. + void (*memory_unmap)(void* address, size_t size, size_t offset, size_t release); + //! Size of memory pages. The page size MUST be a power of two. All memory mapping + // requests to memory_map will be made with size set to a multiple of the page size. + // Used if RPMALLOC_CONFIGURABLE is defined to 1, otherwise system page size is used. + size_t page_size; + //! Size of a span of memory blocks. MUST be a power of two, and in [4096,262144] + // range (unless 0 - set to 0 to use the default span size). Used if RPMALLOC_CONFIGURABLE + // is defined to 1. + size_t span_size; + //! Number of spans to map at each request to map new virtual memory blocks. This can + // be used to minimize the system call overhead at the cost of virtual memory address + // space. The extra mapped pages will not be written until actually used, so physical + // committed memory should not be affected in the default implementation. Will be + // aligned to a multiple of spans that match memory page size in case of huge pages. + size_t span_map_count; + //! Enable use of large/huge pages. If this flag is set to non-zero and page size is + // zero, the allocator will try to enable huge pages and auto detect the configuration. + // If this is set to non-zero and page_size is also non-zero, the allocator will + // assume huge pages have been configured and enabled prior to initializing the + // allocator. + // For Windows, see https://docs.microsoft.com/en-us/windows/desktop/memory/large-page-support + // For Linux, see https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt + int enable_huge_pages; +} rpmalloc_config_t; + +//! Initialize allocator with default configuration +RPMALLOC_EXPORT int +rpmalloc_initialize(void); + +//! Initialize allocator with given configuration +RPMALLOC_EXPORT int +rpmalloc_initialize_config(const rpmalloc_config_t* config); + +//! Get allocator configuration +RPMALLOC_EXPORT const rpmalloc_config_t* +rpmalloc_config(void); + +//! Finalize allocator +RPMALLOC_EXPORT void +rpmalloc_finalize(void); + +//! Initialize allocator for calling thread +RPMALLOC_EXPORT void +rpmalloc_thread_initialize(void); + +//! Finalize allocator for calling thread +RPMALLOC_EXPORT void +rpmalloc_thread_finalize(void); + +//! Perform deferred deallocations pending for the calling thread heap +RPMALLOC_EXPORT void +rpmalloc_thread_collect(void); + +//! Query if allocator is initialized for calling thread +RPMALLOC_EXPORT int +rpmalloc_is_thread_initialized(void); + +//! Get per-thread statistics +RPMALLOC_EXPORT void +rpmalloc_thread_statistics(rpmalloc_thread_statistics_t* stats); + +//! Get global statistics +RPMALLOC_EXPORT void +rpmalloc_global_statistics(rpmalloc_global_statistics_t* stats); + +//! Dump all statistics in human readable format to file (should be a FILE*) +RPMALLOC_EXPORT void +rpmalloc_dump_statistics(void* file); + +//! Allocate a memory block of at least the given size +RPMALLOC_EXPORT RPMALLOC_ALLOCATOR void* +rpmalloc(size_t size) RPMALLOC_ATTRIB_MALLOC RPMALLOC_ATTRIB_ALLOC_SIZE(1); + +//! Free the given memory block +RPMALLOC_EXPORT void +rpfree(void* ptr); + +//! Allocate a memory block of at least the given size and zero initialize it +RPMALLOC_EXPORT RPMALLOC_ALLOCATOR void* +rpcalloc(size_t num, size_t size) RPMALLOC_ATTRIB_MALLOC RPMALLOC_ATTRIB_ALLOC_SIZE2(1, 2); + +//! Reallocate the given block to at least the given size +RPMALLOC_EXPORT RPMALLOC_ALLOCATOR void* +rprealloc(void* ptr, size_t size) RPMALLOC_ATTRIB_MALLOC RPMALLOC_ATTRIB_ALLOC_SIZE(2); + +//! Reallocate the given block to at least the given size and alignment, +// with optional control flags (see RPMALLOC_NO_PRESERVE). +// Alignment must be a power of two and a multiple of sizeof(void*), +// and should ideally be less than memory page size. A caveat of rpmalloc +// internals is that this must also be strictly less than the span size (default 64KiB) +RPMALLOC_EXPORT RPMALLOC_ALLOCATOR void* +rpaligned_realloc(void* ptr, size_t alignment, size_t size, size_t oldsize, unsigned int flags) RPMALLOC_ATTRIB_MALLOC RPMALLOC_ATTRIB_ALLOC_SIZE(3); + +//! Allocate a memory block of at least the given size and alignment. +// Alignment must be a power of two and a multiple of sizeof(void*), +// and should ideally be less than memory page size. A caveat of rpmalloc +// internals is that this must also be strictly less than the span size (default 64KiB) +RPMALLOC_EXPORT RPMALLOC_ALLOCATOR void* +rpaligned_alloc(size_t alignment, size_t size) RPMALLOC_ATTRIB_MALLOC RPMALLOC_ATTRIB_ALLOC_SIZE(2); + +//! Allocate a memory block of at least the given size and alignment. +// Alignment must be a power of two and a multiple of sizeof(void*), +// and should ideally be less than memory page size. A caveat of rpmalloc +// internals is that this must also be strictly less than the span size (default 64KiB) +RPMALLOC_EXPORT RPMALLOC_ALLOCATOR void* +rpmemalign(size_t alignment, size_t size) RPMALLOC_ATTRIB_MALLOC RPMALLOC_ATTRIB_ALLOC_SIZE(2); + +//! Allocate a memory block of at least the given size and alignment. +// Alignment must be a power of two and a multiple of sizeof(void*), +// and should ideally be less than memory page size. A caveat of rpmalloc +// internals is that this must also be strictly less than the span size (default 64KiB) +RPMALLOC_EXPORT int +rpposix_memalign(void **memptr, size_t alignment, size_t size); + +//! Query the usable size of the given memory block (from given pointer to the end of block) +RPMALLOC_EXPORT size_t +rpmalloc_usable_size(void* ptr); + +#ifdef __cplusplus +} +#endif diff --git a/libdap/src/unix/CMakeLists.txt b/libdap/src/unix/CMakeLists.txt new file mode 100755 index 0000000000000000000000000000000000000000..828fdfb757ca7c653c734c5caeb69b2621b1adfb --- /dev/null +++ b/libdap/src/unix/CMakeLists.txt @@ -0,0 +1,29 @@ +cmake_minimum_required(VERSION 3.0) + +project (dap_core_unix) + +file(GLOB CORE_UNIX_SRCS *.c) +file(GLOB CORE_UNIX_HEADERS *.h) + +if(LINUX) + file(GLOB CORE_LINUX_SRCS linux/*.c) + file(GLOB CORE_LINUX_HEADERS linux/*.h) +endif() + +add_library(${PROJECT_NAME} STATIC ${CORE_UNIX_SRCS} ${CORE_UNIX_HEADERS} + ${CORE_LINUX_SRCS} ${CORE_LINUX_HEADERS}) + +target_link_libraries(${PROJECT_NAME} dap_core) + +if (ANDROID) + target_link_libraries(${PROJECT_NAME} dap_core_android) +else() + target_link_libraries(${PROJECT_NAME} pthread) +endif() + +target_include_directories(dap_core_unix INTERFACE .) + +if(LINUX) + target_include_directories(dap_core_unix INTERFACE ./linux) +endif() + diff --git a/libdap/src/unix/dap_cpu_monitor.c b/libdap/src/unix/dap_cpu_monitor.c new file mode 100755 index 0000000000000000000000000000000000000000..7a41bc78e8a034cfcc15963381599dd38dc437ca --- /dev/null +++ b/libdap/src/unix/dap_cpu_monitor.c @@ -0,0 +1,113 @@ +#include "dap_cpu_monitor.h" +#include "dap_common.h" + +#include <stdio.h> +#include <unistd.h> +#include <string.h> + +#define LOG_TAG "dap_cpu_monitor" + +static FILE * _proc_stat = NULL; +static dap_cpu_stats_t _cpu_stats = {0}; +static dap_cpu_t _cpu_old_stats[MAX_CPU_COUNT] = {0}; +static dap_cpu_t _cpu_summary_old = {0}; + +typedef struct proc_stat_line +{ + /* http://man7.org/linux/man-pages/man5/proc.5.html */ + char cpu[10]; + size_t user; + size_t nice; + size_t system; + size_t idle; + size_t iowait; + size_t irq; + size_t softirq; + size_t steal; + size_t guest; + size_t guest_nice; + size_t total; // summary all parameters +} proc_stat_line_t; + +int dap_cpu_monitor_init() +{ + _cpu_stats.cpu_cores_count = (unsigned) sysconf(_SC_NPROCESSORS_ONLN); + + log_it(L_DEBUG, "Cpu core count: %d", _cpu_stats.cpu_cores_count); + + dap_cpu_get_stats(); // init prev parameters + + return 0; +} + +void dap_cpu_monitor_deinit() +{ + +} + +static void _deserealize_proc_stat(char *line, proc_stat_line_t *stat) +{ + sscanf(line,"%s %zu %zu %zu %zu %zu %zu %zu %zu %zu %zu", + stat->cpu, &stat->user, &stat->nice, &stat->system, &stat->idle, + &stat->iowait, &stat->irq, &stat->softirq, &stat->steal, + &stat->guest, &stat->guest_nice); + stat->total = stat->user + stat->system + stat->idle + + stat->iowait + stat->irq + stat->softirq + + stat->steal + stat->guest + stat->guest_nice; +} + +static float _calculate_load(size_t idle_time, size_t prev_idle_time, + size_t total_time, size_t prev_total_time) +{ + return (1 - (1.0*idle_time -prev_idle_time) / + (total_time - prev_total_time)) * 100.0; +} + +dap_cpu_stats_t dap_cpu_get_stats() +{ + _proc_stat = fopen("/proc/stat", "r"); + + if(_proc_stat == NULL){ + log_it(L_ERROR, "Сan't open /proc/stat file"); + return (dap_cpu_stats_t){0}; + } + + char *line = NULL; + proc_stat_line_t stat = {0}; + + /** get summary cpu stat **/ + size_t mem_size; + getline(&line, &mem_size, _proc_stat); + _deserealize_proc_stat(line, &stat); + + _cpu_stats.cpu_summary.idle_time = stat.idle; + _cpu_stats.cpu_summary.total_time = stat.total; + /*********************************************/ + + for(unsigned i = 0; i < _cpu_stats.cpu_cores_count; i++) { + getline(&line, &mem_size, _proc_stat); + _deserealize_proc_stat(line, &stat); + _cpu_stats.cpus[i].idle_time = stat.idle; + _cpu_stats.cpus[i].total_time = stat.total; + _cpu_stats.cpus[i].ncpu = i; + + _cpu_stats.cpus[i].load = _calculate_load(_cpu_stats.cpus[i].idle_time, + _cpu_old_stats[i].idle_time, + _cpu_stats.cpus[i].total_time, + _cpu_old_stats[i].total_time); + } + + _cpu_stats.cpu_summary.load = _calculate_load(_cpu_stats.cpu_summary.idle_time, + _cpu_summary_old.idle_time, + _cpu_stats.cpu_summary.total_time, + _cpu_summary_old.total_time); + + memcpy(&_cpu_summary_old, &_cpu_stats.cpu_summary, sizeof (dap_cpu_t)); + + memcpy(_cpu_old_stats, _cpu_stats.cpus, + sizeof (dap_cpu_t) * _cpu_stats.cpu_cores_count); + + fclose(_proc_stat); + + return _cpu_stats; +} diff --git a/libdap/src/unix/dap_cpu_monitor.h b/libdap/src/unix/dap_cpu_monitor.h new file mode 100755 index 0000000000000000000000000000000000000000..7cc4aefcfd6e46939a3828f2fcf132e326e53c12 --- /dev/null +++ b/libdap/src/unix/dap_cpu_monitor.h @@ -0,0 +1,69 @@ +/* + * Authors: + * Anatolii Kurotych <akurotych@gmail.com> + * DeM Labs Inc. https://demlabs.net + * DeM Labs Open source community https://gitlab.demlabs.net/cellframe + * Copyright (c) 2017-2019 + * All rights reserved. + + This file is part of DAP (Deus Applications Prototypes) the open source project + + DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DAP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with any DAP based project. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +// For C++ +#ifdef __cplusplus +extern "C" { +#endif + +#define MAX_CPU_COUNT 64 + +#include <stdlib.h> + +typedef struct dap_cpu { + unsigned ncpu; // number of cpu core + float load; // percent of load + size_t total_time; + size_t idle_time; +} dap_cpu_t; + +typedef struct dap_cpu_stats +{ + unsigned cpu_cores_count; + dap_cpu_t cpu_summary; // average statistic for all cpu + dap_cpu_t cpus[MAX_CPU_COUNT]; // list of cpu with stat +} dap_cpu_stats_t; + +/** + * @brief dap_cpu_monitor_init Monitor CPU initialization + * @return + */ +int dap_cpu_monitor_init(void); + +/** + * @brief dap_cpu_monitor_deinit Monitor CPU deinitialization + */ +void dap_cpu_monitor_deinit(void); + +/** + * @brief dap_cpu_get_stats Getting processor information + * @return + */ +dap_cpu_stats_t dap_cpu_get_stats(void); + +#ifdef __cplusplus +} +#endif diff --git a/libdap/src/unix/dap_process_manager.c b/libdap/src/unix/dap_process_manager.c new file mode 100755 index 0000000000000000000000000000000000000000..e2d825977374cc7f46056d74677ddada73aef97f --- /dev/null +++ b/libdap/src/unix/dap_process_manager.c @@ -0,0 +1,79 @@ +#ifdef __linux__ +#include <stdio.h> +#include <sys/types.h> +#include <signal.h> + +#include "dap_process_manager.h" +#include "dap_common.h" + +#undef LOG_TAG +#define LOG_TAG "dap_process_manager" + +/** + * @brief is_process_running Check whether the process is running + * @param[in] pid PID + * @return + */ +bool is_process_running(pid_t pid) { + return kill(pid, 0) == 0; +} + +/** + * @brief save_process_pid_in_file Saves process pid into file by file_path + * @param[in] file_path File path + * @return Execution result + * + * Saves process pid into file by file_path. + * If file exists he will be overwritten + */ +bool save_process_pid_in_file(const char* file_path) { + FILE * fpid = fopen(file_path, "w"); + if (fpid == NULL) { + log_it(L_ERROR, "Cant create/open file by path %s",file_path); + return false; + } + fprintf(fpid, "%d", getpid()); + fclose(fpid); + return true; +} + +/** + * @brief get_pid_from_file File must consist only PID. Return 0 if file is clear. + * @param[in] file_path File path + * @return Execution result + */ +pid_t get_pid_from_file(const char* file_path) { + FILE * fpid = fopen(file_path, "r"); + if (fpid == NULL) { + log_it(L_ERROR, "Cant create/open file by path %s",file_path); + return false; + } + + pid_t f_pid = 0; + fscanf(fpid, "%d", &f_pid); + fclose(fpid); + + return f_pid; +} + +/** + * @brief daemonize_process Demonizes current process and exit from program + * @return + */ +bool daemonize_process() { + return daemon(1,1) == 0; +} + +/** + * @brief kill_process Sends SIGKILL to process + * @param[in] pid + * @return + */ +bool kill_process(pid_t pid) { + if (!is_process_running(pid)) { + return false; + } + return kill(pid, SIGKILL) == 0; +} + +#endif diff --git a/libdap/src/unix/dap_process_manager.h b/libdap/src/unix/dap_process_manager.h new file mode 100755 index 0000000000000000000000000000000000000000..29fb0ddcc86e6bbb67acda0bd9f5dda65f3ccb39 --- /dev/null +++ b/libdap/src/unix/dap_process_manager.h @@ -0,0 +1,56 @@ +/* + * Authors: + * Anatolii Kurotych <akurotych@gmail.com> + * DeM Labs Inc. https://demlabs.net + * DeM Labs Open source community https://gitlab.demlabs.net/cellframe + * Copyright (c) 2017-2019 + * All rights reserved. + + This file is part of DAP (Deus Applications Prototypes) the open source project + + DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DAP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with any DAP based project. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __linux__ + +#include <stdbool.h> +#include <unistd.h> + +/* Saves process pid into file by file_path. + * If file exists he will be overwritten */ +extern bool save_process_pid_in_file(const char* file_path); + +/* File must consist only PID. Return 0 if file is clear. */ +extern pid_t get_pid_from_file(const char* file_path); + +/* Return true if process running */ +extern bool is_process_running(pid_t pid); + +/* Demonizes current process and exit from program */ +extern bool daemonize_process(void); + +/* Sends SIGKILL to process */ +extern bool kill_process(pid_t pid); + +#endif + +#ifdef __cplusplus +} +#endif diff --git a/libdap/src/unix/dap_process_memory.c b/libdap/src/unix/dap_process_memory.c new file mode 100755 index 0000000000000000000000000000000000000000..dc14f0b32c99e0b292a6d9ef393ab654750e423d --- /dev/null +++ b/libdap/src/unix/dap_process_memory.c @@ -0,0 +1,64 @@ +#include "dap_process_memory.h" +#include "dap_common.h" +#include <stdlib.h> +#include <string.h> +#include <stdio.h> + +#define LOG_TAG "dap_process_mem" + +#define MAX_LINE_LENGTH 128 + +static size_t _parse_size_line(char *line) { + // This assumes that a digit will be found and the line ends in " Kb". + size_t i = strlen(line); + const char *p = line; + while (*p < '0' || *p > '9') p++; + line[i - 3] = '\0'; + i = (size_t)atol(p); + return i; +} + +static dap_process_memory_t _get_process_memory(const char* proc_file_path) +{ + FILE *file = fopen(proc_file_path, "r"); + + if(file == NULL) { + log_it(L_WARNING, "Cant open proc file"); + return (dap_process_memory_t){0,0}; + } + + char line[MAX_LINE_LENGTH]; + dap_process_memory_t proc_mem = {0}; + + while (fgets(line, MAX_LINE_LENGTH, file) != NULL) { + if (strncmp(line, "VmSize:", 7) == 0) { + proc_mem.vsz = _parse_size_line(line); + } + + if (strncmp(line, "VmRSS:", 6) == 0) { + proc_mem.rss = _parse_size_line(line); + } + + if (proc_mem.rss != 0 && proc_mem.vsz != 0) + break; + } + + fclose(file); + + if(proc_mem.vsz == 0 || proc_mem.rss == 0) + log_it(L_WARNING, "Getting memory statistics failed"); + + return proc_mem; +} + +dap_process_memory_t get_proc_mem_current(void) +{ + return _get_process_memory("/proc/self/status"); +} + +dap_process_memory_t get_proc_mem_by_pid(pid_t pid) +{ + char buf[126] = {0}; + sprintf(buf, "/proc/%d/status", pid); + return _get_process_memory(buf); +} diff --git a/libdap/src/unix/dap_process_memory.h b/libdap/src/unix/dap_process_memory.h new file mode 100755 index 0000000000000000000000000000000000000000..9d392ecd8ebbbe1d9bc9c1870e068bcee6538d83 --- /dev/null +++ b/libdap/src/unix/dap_process_memory.h @@ -0,0 +1,56 @@ +/* + * Authors: + * Anatolii Kurotych <akurotych@gmail.com> + * DeM Labs Inc. https://demlabs.net + * DeM Labs Open source community https://gitlab.demlabs.net/cellframe + * Copyright (c) 2017-2019 + * All rights reserved. + + This file is part of DAP (Deus Applications Prototypes) the open source project + + DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DAP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with any DAP based project. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include <stdint.h> +#include <sys/types.h> + + +typedef struct dap_process_memory { + size_t vsz; // virtual memory (kb) + size_t rss; // physical memory (kb) +} dap_process_memory_t; + + +/** + * @brief get_proc_mem_current Get information about the amount of RAM consumed for the current process + * @return + */ +dap_process_memory_t get_proc_mem_current(void); + +/** + * @brief get_proc_mem_by_pid Obtain information about the amount of RAM consumed for a particular process + * @param[in] pid PID + * @return + */ +dap_process_memory_t get_proc_mem_by_pid(pid_t pid); + +#ifdef __cplusplus +} +#endif diff --git a/libdap/src/unix/linux/dap_network_monitor.c b/libdap/src/unix/linux/dap_network_monitor.c new file mode 100755 index 0000000000000000000000000000000000000000..3341ad089f80ec0b0d9df86938c5ade3e8ef0a40 --- /dev/null +++ b/libdap/src/unix/linux/dap_network_monitor.c @@ -0,0 +1,248 @@ +#include <linux/netlink.h> +#include <pthread.h> +#include <netinet/in.h> +#include <string.h> +#include <unistd.h> +#include <sys/socket.h> +#include <arpa/inet.h> + +#ifdef __ANDROID__ + #include "pthread_barrier.h" +#endif + +#include "dap_network_monitor.h" +#include "dap_common.h" + +#define LOG_TAG "dap_network_monitor" + +static bool _send_NLM_F_ACK_msg(int fd) +{ + static int sequence_number = 0; + + struct nlmsghdr *nh = DAP_NEW_Z(struct nlmsghdr); + struct sockaddr_nl sa; + struct iovec iov = { &nh, nh->nlmsg_len }; + struct msghdr msg = {&sa, sizeof(sa), &iov, 1, NULL, 0, 0}; + + memset(&sa, 0, sizeof(sa)); + sa.nl_family = AF_NETLINK; + nh->nlmsg_pid = getpid(); + nh->nlmsg_seq = ++sequence_number; + nh->nlmsg_flags |= NLM_F_ACK; + + ssize_t rc = sendmsg(fd, &msg, 0); + if (rc == -1) { + log_it(L_ERROR, "sendmsg failed"); + return false; + } + + DAP_DELETE(nh); + return true; +} + +static struct { + int socket; + pthread_t thread; + dap_network_monitor_notification_callback_t callback; +} _net_notification; + +static void* network_monitor_worker(void *arg); + +int dap_network_monitor_init(dap_network_monitor_notification_callback_t cb) +{ + memset((void*)&_net_notification, 0, sizeof(_net_notification)); + + if ((_net_notification.socket = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE)) == -1) { + log_it(L_ERROR, "Can't open notification socket"); + return -1; + } + + struct sockaddr_nl addr = {0}; + addr.nl_family = AF_NETLINK; + addr.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR | RTMGRP_IPV4_ROUTE; + if (bind(_net_notification.socket, (struct sockaddr *)&addr, sizeof(addr)) == -1) { + log_it(L_ERROR, "Can't bind notification socket"); + return -2; + } + + pthread_barrier_t barrier; + + pthread_barrier_init(&barrier, NULL, 2); + if(pthread_create(&_net_notification.thread, NULL, network_monitor_worker, &barrier) != 0) { + log_it(L_ERROR, "Error create notification thread"); + return -3; + } + + pthread_barrier_wait(&barrier); + + pthread_barrier_destroy(&barrier); + + _net_notification.callback = cb; + log_it(L_DEBUG, "dap_network_monitor was initialized"); + return 0; +} + +void dap_network_monitor_deinit(void) +{ + if(_net_notification.socket == 0 || _net_notification.socket == -1) { + log_it(L_ERROR, "Network monitor not be inited"); + return; + } + close(_net_notification.socket); + pthread_cancel(_net_notification.thread); + pthread_join(_net_notification.thread, NULL); +} + +static void _ip_addr_msg_handler(struct nlmsghdr *nlh, + dap_network_notification_t* result) +{ + struct ifaddrmsg *ifa = (struct ifaddrmsg *)NLMSG_DATA(nlh); + struct rtattr *rth = IFA_RTA(ifa); + size_t rtl = IFA_PAYLOAD(nlh); + for (; rtl && RTA_OK(rth, rtl); rth = RTA_NEXT(rth,rtl)) { + char *inet_str = inet_ntoa(*((struct in_addr *)RTA_DATA(rth))); + + if (rth->rta_type != IFA_LOCAL) continue; + + /* fill result */ + result->addr.ip = htonl(*((uint32_t *)RTA_DATA(rth))); + strcpy(result->addr.s_ip, inet_str); + if_indextoname(ifa->ifa_index, result->addr.interface_name); + } +} + +static void _route_msg_handler(struct nlmsghdr *nlh, + dap_network_notification_t* result, + int received_bytes) +{ + struct rtmsg *route_entry; /* This struct represent a route entry + in the routing table */ + struct rtattr *route_attribute; /* This struct contain route + attributes (route type) */ + int route_attribute_len = 0; + + route_attribute_len = RTM_PAYLOAD(nlh); + + for ( ; NLMSG_OK(nlh, received_bytes); \ + nlh = NLMSG_NEXT(nlh, received_bytes)) + { + /* Get the route data */ + route_entry = (struct rtmsg *) NLMSG_DATA(nlh); + + result->route.netmask = route_entry->rtm_dst_len; + result->route.protocol = route_entry->rtm_protocol; + + /* Get attributes of route_entry */ + route_attribute = (struct rtattr *) RTM_RTA(route_entry); + + /* Get the route atttibutes len */ + route_attribute_len = RTM_PAYLOAD(nlh); + /* Loop through all attributes */ + for ( ; RTA_OK(route_attribute, route_attribute_len); \ + route_attribute = RTA_NEXT(route_attribute, route_attribute_len)) + { + /* Get the destination address */ + if (route_attribute->rta_type == RTA_DST) + { + result->route.destination_address = htonl(*(uint32_t*)RTA_DATA(route_attribute)); + + inet_ntop(AF_INET, RTA_DATA(route_attribute), + result->route.s_destination_address, + sizeof(result->route.s_destination_address)); + } + /* Get the gateway (Next hop) */ + if (route_attribute->rta_type == RTA_GATEWAY) + { + result->route.gateway_address = htonl(*(uint32_t*)RTA_DATA(route_attribute)); +; + inet_ntop(AF_INET, RTA_DATA(route_attribute), + result->route.s_gateway_address, + sizeof(result->route.s_gateway_address)); + } + } + } + +} + +static void _link_msg_handler(struct nlmsghdr *nlh, + dap_network_notification_t* result, + struct sockaddr_nl sa) +{ + (void) sa; + struct ifaddrmsg *ifa=NLMSG_DATA(nlh); + struct ifinfomsg *ifi=NLMSG_DATA(nlh);; + + switch (nlh->nlmsg_type){ + case RTM_NEWLINK: + if_indextoname(ifa->ifa_index,result->link.interface_name); + result->link.is_up = ifi->ifi_flags & IFF_UP ? true : false; + result->link.is_running = ifi->ifi_flags & IFF_RUNNING ? true : false; + //printf("netlink_link_state: Link %s is %s and %s\n", + // result->link.interface_name, (ifi->ifi_flags & IFF_UP)?"Up":"Down", (ifi->ifi_flags & IFF_RUNNING)?"Running":"Not Running"); + break; + case RTM_DELLINK: + if_indextoname(ifa->ifa_index,result->link.interface_name); + //printf("msg_handler: RTM_DELLINK : %s\n",result->link.interface_name); + break; + } +} + +static void clear_results(dap_network_notification_t* cb_result) +{ + bzero(cb_result, sizeof (dap_network_notification_t)); + cb_result->route.destination_address = (uint64_t) -1; + cb_result->route.gateway_address = (uint64_t) -1; +} + +static void* network_monitor_worker(void *arg) +{ + pthread_barrier_t *barrier = (pthread_barrier_t *)arg; + log_it(L_DEBUG, "Network monitor worker started"); + if (_net_notification.socket == -1) { + log_it(L_ERROR, "Net socket not running. Can't start worker"); + return NULL; + } + + dap_network_notification_t callback_result; + int len; + char buf[4096]; + struct iovec iov = { buf, sizeof(buf) }; + struct sockaddr_nl sa; + struct nlmsghdr *nlh; + struct msghdr msg = { &sa, sizeof(sa), &iov, 1, NULL, 0, 0 }; + + pthread_barrier_wait(barrier); + while ((len = recvmsg(_net_notification.socket, &msg, 0)) > 0){ + _send_NLM_F_ACK_msg(_net_notification.socket); + + for (nlh = (struct nlmsghdr *) buf; (NLMSG_OK(nlh, len)) && (nlh->nlmsg_type != NLMSG_DONE); nlh = NLMSG_NEXT(nlh, len)) { + if (nlh->nlmsg_type == NLMSG_ERROR){ + /* Do some error handling. */ + log_it(L_DEBUG, "There an error! nlmsg_type %d", nlh->nlmsg_type); + break; + } + + clear_results(&callback_result); + + callback_result.type = nlh->nlmsg_type; + if (nlh->nlmsg_type == RTM_NEWADDR || nlh->nlmsg_type == RTM_DELADDR) { + _ip_addr_msg_handler(nlh, &callback_result); + } else if(nlh->nlmsg_type == RTM_NEWROUTE || nlh->nlmsg_type == RTM_DELROUTE) { + _route_msg_handler(nlh, &callback_result, len); + } else if (nlh->nlmsg_type == RTM_NEWLINK || nlh->nlmsg_type == RTM_DELLINK){ + _link_msg_handler(nlh, &callback_result, sa); + } + else{ + log_it(L_DEBUG, "Not supported msg type %d", nlh->nlmsg_type); + continue; + } + + if (_net_notification.callback) { + _net_notification.callback(callback_result); + } else { + log_it(L_ERROR, "callback is NULL"); + } + } + } + return NULL; +} diff --git a/libdap/src/unix/linux/dap_network_monitor.h b/libdap/src/unix/linux/dap_network_monitor.h new file mode 100755 index 0000000000000000000000000000000000000000..30316fba9ad50b2b2836990cf3203c21679bc773 --- /dev/null +++ b/libdap/src/unix/linux/dap_network_monitor.h @@ -0,0 +1,91 @@ +/* + * Authors: + * Anatolii Kurotych <akurotych@gmail.com> + * DeM Labs Inc. https://demlabs.net + * DeM Labs Open source community https://gitlab.demlabs.net/cellframe + * Copyright (c) 2017-2019 + * All rights reserved. + + This file is part of DAP (Deus Applications Prototypes) the open source project + + DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DAP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with any DAP based project. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifdef __cplusplus +extern "C" { +#endif + +#pragma once + +#include <stdint.h> +#include <stdbool.h> +#include <net/if.h> +#include <linux/rtnetlink.h> + +#define MAX_IP_STR_LEN 15 +#define DAP_ADRESS_UNDEFINED (uint64_t)-1 + +typedef enum { + // like in rtnetlink defines + IP_ADDR_ADD = RTM_NEWADDR, + IP_ADDR_REMOVE, + IP_ROUTE_ADD = RTM_NEWROUTE, + IP_ROUTE_REMOVE, + IP_LINK_NEW = RTM_NEWLINK, + IP_LINK_DEL +} dap_network_monitor_notification_type_t; + +typedef struct { + dap_network_monitor_notification_type_t type; + union { + struct { + char interface_name[IF_NAMESIZE]; + char s_ip[MAX_IP_STR_LEN + 1]; + uint32_t ip; // inet_ntoa(*((struct in_addr *)&ipaddr)) for cast to char* + } addr; // for IP_ADDR_ADD, IP_ADDR_REMOVE + struct { + uint64_t destination_address; // 64 bit for checking -1 like not filled variable + char s_destination_address[MAX_IP_STR_LEN + 1]; + uint64_t gateway_address; + char s_gateway_address[MAX_IP_STR_LEN + 1]; + uint8_t protocol; + uint8_t netmask; + } route; // for IP_ROUTE_ADD, IP_ROUTE_REMOVE + struct { + char interface_name[IF_NAMESIZE]; + bool is_up; + bool is_running; + } link; // for RTM_NEWLINK, RTM_DELLINK + }; +} dap_network_notification_t; + +typedef void (*dap_network_monitor_notification_callback_t) + (const dap_network_notification_t notification); + +/** + * @brief dap_network_monitor_init + * @param callback + * @details starts network monitorting + * @return 0 if successful + */ +int dap_network_monitor_init(dap_network_monitor_notification_callback_t callback); + +/** + * @brief dap_network_monitor_deinit + */ +void dap_network_monitor_deinit(void); + +#ifdef __cplusplus +} +#endif diff --git a/libdap/src/unix/linux/linux.pri b/libdap/src/unix/linux/linux.pri new file mode 100755 index 0000000000000000000000000000000000000000..05fc40b8a06d55a4b52d3c47ce3767c48f29b73c --- /dev/null +++ b/libdap/src/unix/linux/linux.pri @@ -0,0 +1,5 @@ +HEADERS += $$PWD/dap_network_monitor.h \ + +SOURCES += $$PWD/dap_network_monitor.c \ + +INCLUDEPATH += $$PWD diff --git a/libdap/src/unix/unix.pri b/libdap/src/unix/unix.pri new file mode 100755 index 0000000000000000000000000000000000000000..299e0ae39c4d49552285fe3ef4fa2603799e5b7f --- /dev/null +++ b/libdap/src/unix/unix.pri @@ -0,0 +1,17 @@ +linux-* { + include(linux/linux.pri) +} + +!android { + +HEADERS += $$PWD/dap_cpu_monitor.h \ + $$PWD/dap_process_manager.h \ + $$PWD/dap_process_memory.h \ + +SOURCES += $$PWD/dap_cpu_monitor.c \ + $$PWD/dap_process_manager.c \ + $$PWD/dap_process_memory.c \ + +INCLUDEPATH += $$PWD + +} diff --git a/libdap/src/win32/CMakeLists.txt b/libdap/src/win32/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..f3d0c43a6662887771ccebe815b8f8102824b6e1 --- /dev/null +++ b/libdap/src/win32/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.0) + +project (dap_core_win32 C) + +file(GLOB CORE_SRCS *.c) +file(GLOB CORE_HEADERS *.h) + +add_library(${PROJECT_NAME} STATIC ${CORE_SRCS} ${CORE_HEADERS}) + +target_include_directories(${PROJECT_NAME} INTERFACE .) \ No newline at end of file diff --git a/libdap/src/win32/dap_console_manager.c b/libdap/src/win32/dap_console_manager.c new file mode 100644 index 0000000000000000000000000000000000000000..80f8dbd4a4b651f728f94118f4979536c75a4536 --- /dev/null +++ b/libdap/src/win32/dap_console_manager.c @@ -0,0 +1,242 @@ +/* + Copyright (c) 2017-2019 (c) Project "DeM Labs Inc" https://gitlab.demlabs.net/cellframe + All rights reserved. + + This file is part of DAP (Deus Applications Prototypes) the open source project + + DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DAP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with any DAP based project. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include <stdlib.h> +#include <stdio.h> +#include <stdlib.h> +#include <stddef.h> +#include <stdint.h> +#include <memory.h> + +#include <windows.h> + +#define WM_SETCONSOLEINFO (WM_USER + 201) + +#pragma pack(push, 1) +typedef struct _CONSOLE_INFO +{ + DWORD Length; + COORD ScreenBufferSize; + COORD WindowSize; + DWORD WindowPosX; + DWORD WindowPosY; + COORD FontSize; + DWORD FontFamily; + DWORD FontWeight; + WCHAR FaceName[32]; + DWORD CursorSize; + DWORD FullScreen; + DWORD QuickEdit; + DWORD AutoPosition; + DWORD InsertMode; + USHORT ScreenColors; + USHORT PopupColors; + DWORD HistoryNoDup; + DWORD HistoryBufferSize; + DWORD NumberOfHistoryBuffers; + COLORREF ColorTable[16]; + DWORD CodePage; + HWND Hwnd; + WCHAR ConsoleTitle[0x100]; +} CONSOLE_INFO; +#pragma pack(pop) + +static uint32_t palette[ 16 ] = { + + RGB( 0, 0, 0 ), // 0 black + RGB( 0, 0, 128 ), // 1 blue + RGB( 0, 128, 0 ), // 2 green + RGB( 128, 128, 0 ), // 3 cyan + RGB( 128, 0, 0 ), // 4 red + RGB( 128, 0, 128 ), // 5 magenta + RGB( 0, 128, 128 ), // 6 yellow / brown + RGB( 192, 192, 192 ), // 7 white / light gray + RGB( 128, 128, 128 ), // 8 dark gray / bright black + RGB( 0, 0, 255 ), // 9 bright blue + RGB( 0, 255, 0 ), // 10 bright green + RGB( 0, 255, 255 ), // 11 bright cyan + RGB( 255, 0, 0 ), // 12 bright red + RGB( 255, 0, 255 ), // 13 bright magenta + RGB( 255, 255, 0 ), // 14 bright yellow + RGB( 255, 255, 255 ) // 15 bright white +}; + +static void GetConsoleSizeInfo( CONSOLE_INFO *pci, HANDLE hConOut ) +{ + CONSOLE_SCREEN_BUFFER_INFO csbi; + + GetConsoleScreenBufferInfo( hConOut, &csbi ); + + pci->ScreenBufferSize = csbi.dwSize; + pci->WindowSize.X = csbi.srWindow.Right - csbi.srWindow.Left + 1; + pci->WindowSize.Y = csbi.srWindow.Bottom - csbi.srWindow.Top + 1; + pci->WindowPosX = csbi.srWindow.Left; + pci->WindowPosY = csbi.srWindow.Top; +} + +static BOOL SetConsoleInfo( HWND hwndConsole, CONSOLE_INFO *pci ) +{ + DWORD dwConsoleOwnerPid; + HANDLE hProcess; + HANDLE hSection, hDupSection; + PVOID ptrView = 0; + HANDLE hThread; + + GetWindowThreadProcessId( hwndConsole, &dwConsoleOwnerPid ); + + hProcess = OpenProcess( MAXIMUM_ALLOWED, FALSE, dwConsoleOwnerPid ); + hSection = CreateFileMapping( INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, pci->Length, 0 ); + ptrView = MapViewOfFile( hSection, FILE_MAP_WRITE|FILE_MAP_READ, 0, 0, pci->Length ); + + memcpy( ptrView, pci, pci->Length ); + UnmapViewOfFile( ptrView ); + + DuplicateHandle( GetCurrentProcess(), hSection, hProcess, &hDupSection, 0, FALSE, DUPLICATE_SAME_ACCESS ); + + SendMessage( hwndConsole, WM_SETCONSOLEINFO, (WPARAM)hDupSection, 0 ); + + hThread = CreateRemoteThread( hProcess, 0, 0, (LPTHREAD_START_ROUTINE)CloseHandle, hDupSection, 0, 0 ); + + CloseHandle( hThread ); + CloseHandle( hSection ); + CloseHandle( hProcess ); + + return TRUE; +} + +typedef BOOL (WINAPI *PGetCurrentConsoleFontEx)(HANDLE hConsoleOutput, BOOL bMaximumWindow, PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx); +typedef BOOL (WINAPI *PSetCurrentConsoleFontEx)(HANDLE hConsoleOutput, BOOL bMaximumWindow, PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx); +typedef BOOL (WINAPI *PGetConsoleScreenBufferInfoEx)(HANDLE hConsoleOutput, PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx); +typedef BOOL (WINAPI *PSetConsoleScreenBufferInfoEx)(HANDLE hConsoleOutput, PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx); + +////Lucida Console 12 20 + +void SetupConsole( const char *title, const uint16_t *fontName, int fontx, int fonty ) +{ + HANDLE hConOut; + HANDLE hConIn; + + HWND hwndConsole = GetConsoleWindow( ); + if ( !hwndConsole ) { // daemon ? + return; + } + + uint32_t console_owner_proc_id; + + GetWindowThreadProcessId( hwndConsole, (LPDWORD)&console_owner_proc_id ); + + if ( console_owner_proc_id != GetCurrentProcessId() ) { + return; + } + + SetConsoleTitleA( (LPCSTR)title ); + + hConOut = GetStdHandle( STD_OUTPUT_HANDLE ); + hConIn = GetStdHandle( STD_INPUT_HANDLE ); + + int sx = GetSystemMetrics( SM_CXSCREEN ); + int sy = GetSystemMetrics( SM_CYSCREEN ); + +// COORD conmax = GetLargestConsoleWindowSize( hConOut ); + + PGetCurrentConsoleFontEx pGetCurrentConsoleFontEx = (PGetCurrentConsoleFontEx) + GetProcAddress( GetModuleHandleA("kernel32.dll"), "GetCurrentConsoleFontEx" ); + PSetCurrentConsoleFontEx pSetCurrentConsoleFontEx = (PSetCurrentConsoleFontEx) + GetProcAddress( GetModuleHandleA("kernel32.dll"), "SetCurrentConsoleFontEx" ); + PGetConsoleScreenBufferInfoEx pGetConsoleScreenBufferInfoEx = (PGetConsoleScreenBufferInfoEx) + GetProcAddress( GetModuleHandleA("kernel32.dll"), "GetConsoleScreenBufferInfoEx" ); + PSetConsoleScreenBufferInfoEx pSetConsoleScreenBufferInfoEx = (PSetConsoleScreenBufferInfoEx) + GetProcAddress( GetModuleHandleA("kernel32.dll"), "SetConsoleScreenBufferInfoEx" ); + + if ( pGetCurrentConsoleFontEx && pSetCurrentConsoleFontEx && + pGetConsoleScreenBufferInfoEx && pSetConsoleScreenBufferInfoEx ) + { + CONSOLE_SCREEN_BUFFER_INFOEX conBufferInfo; + CONSOLE_FONT_INFOEX conFontInfo = {sizeof(CONSOLE_FONT_INFOEX)}; + + conFontInfo.cbSize = sizeof( CONSOLE_FONT_INFOEX ); + pGetCurrentConsoleFontEx( hConOut, TRUE, &conFontInfo ); + +// printf("conFontInfo.nFont %u \n", conFontInfo.nFont ); +// printf("conFontInfo.dwFontSize.X %u \n", conFontInfo.dwFontSize.X ); +// printf("conFontInfo.dwFontSize.Y %u \n", conFontInfo.dwFontSize.Y ); +// printf("conFontInfo.FontFamily %u \n", conFontInfo.FontFamily ); +// printf("conFontInfo.FontWeight %u \n", conFontInfo.FontWeight ); + + conFontInfo.nFont = 20; + conFontInfo.dwFontSize.X = 12; + conFontInfo.dwFontSize.Y = 20; + conFontInfo.FontFamily = 0; + conFontInfo.FontWeight = 0; + lstrcpyW( conFontInfo.FaceName, fontName ); + + pSetCurrentConsoleFontEx( hConOut, TRUE, &conFontInfo ); + + conBufferInfo.cbSize = sizeof( CONSOLE_SCREEN_BUFFER_INFOEX ); + pGetConsoleScreenBufferInfoEx( hConOut, &conBufferInfo ); + + memcpy( &conBufferInfo.ColorTable[0], &palette[0], 4 * 16 ); + pSetConsoleScreenBufferInfoEx( hConOut, &conBufferInfo ); + } + else { +// printf("XP ?...\n" ); + + CONSOLE_INFO ci = { sizeof(ci) }; + + GetConsoleSizeInfo( &ci, hConOut ); + + ci.FontSize.X = 12; + ci.FontSize.Y = 20; + ci.FontFamily = 0; + ci.FontWeight = 0; + + lstrcpyW( ci.FaceName, fontName ); + +// ci.CursorSize = 100; + ci.FullScreen = FALSE; + ci.QuickEdit = FALSE; + ci.AutoPosition = 0x10000; + ci.InsertMode = TRUE; + ci.ScreenColors = MAKEWORD(0x7, 0x0); + ci.PopupColors = MAKEWORD(0x5, 0xf); + ci.HistoryNoDup = TRUE; + ci.HistoryBufferSize = 50; + ci.NumberOfHistoryBuffers = 4; + + memcpy( &ci.ColorTable[0], &palette[0], 4 * 16 ); + + ci.CodePage = 0; + ci.Hwnd = hwndConsole; + + SetConsoleInfo( hwndConsole, &ci ); + } + + int bx = sx / 12; + int by = sy / 20; + + SMALL_RECT Rect = { 0, 0, bx, by }; + COORD coord = { bx, by }; + + SetConsoleWindowInfo( hConOut, TRUE, &Rect ); + SetConsoleScreenBufferSize( hConOut, coord ); + + SetWindowPos( hwndConsole, HWND_TOP, 0, 0, sx-1, sy-1, SWP_NOSIZE ); + ShowWindow( hwndConsole, SW_MAXIMIZE ); +} diff --git a/libdap/src/win32/dap_console_manager.h b/libdap/src/win32/dap_console_manager.h new file mode 100644 index 0000000000000000000000000000000000000000..a1508068f047d8de04d810ccbcbedf5d7be97a1e --- /dev/null +++ b/libdap/src/win32/dap_console_manager.h @@ -0,0 +1,11 @@ +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +void SetupConsole( const char *title, const uint16_t *fontName, int fontx, int fonty ); + +#ifdef __cplusplus +} +#endif diff --git a/libdap/src/win32/dap_cpu_monitor.c b/libdap/src/win32/dap_cpu_monitor.c new file mode 100644 index 0000000000000000000000000000000000000000..1857e8f408945f2622e6a99bafe1a9b5db6915cb --- /dev/null +++ b/libdap/src/win32/dap_cpu_monitor.c @@ -0,0 +1,149 @@ +/* + Copyright (c) 2017-2019 (c) Project "DeM Labs Inc" https://gitlab.demlabs.net/cellframe + All rights reserved. + + This file is part of DAP (Deus Applications Prototypes) the open source project + + DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DAP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with any DAP based project. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include <windows.h> +//#include <winnt.h> +#include <winternl.h> + +#include <stdio.h> +#include <stdint.h> +#include <string.h> +#include <stdlib.h> + +#include "dap_cpu_monitor.h" +#include "dap_common.h" + +#define LOG_TAG "dap_cpu_monitor" + +//static FILE * _proc_stat = NULL; +static dap_cpu_stats_t _cpu_stats = {0}; + +static dap_cpu_t _cpu_old_stats[MAX_CPU_COUNT] = {0}; +static dap_cpu_t _cpu_summary_old = {0}; + +typedef struct proc_stat_line +{ + /* http://man7.org/linux/man-pages/man5/proc.5.html */ + char cpu[10]; + uint64_t user; + uint64_t nice; + uint64_t system; + uint64_t idle; + uint64_t iowait; + uint64_t irq; + uint64_t softirq; + uint64_t steal; + uint64_t guest; + uint64_t guest_nice; + uint64_t total; // summary all parameters +} proc_stat_line_t; + +int dap_cpu_monitor_init() +{ + SYSTEM_INFO si; + + GetSystemInfo( &si ); + _cpu_stats.cpu_cores_count = si.dwNumberOfProcessors; + + log_it( L_DEBUG, "dap_cpu_monitor_init(): Cpu core count: %d", _cpu_stats.cpu_cores_count ); + + dap_cpu_get_stats( ); // init prev parameters + + return 0; +} + +void dap_cpu_monitor_deinit() +{ + +} +/* +static void _deserealize_proc_stat(char *line, proc_stat_line_t *stat) +{ + sscanf(line,"%s %zu %zu %zu %zu %zu %zu %zu %zu %zu %zu", + stat->cpu, &stat->user, &stat->nice, &stat->system, &stat->idle, + &stat->iowait, &stat->irq, &stat->softirq, &stat->steal, + &stat->guest, &stat->guest_nice); + + stat->total = stat->user + stat->system + stat->idle + + stat->iowait + stat->irq + stat->softirq + + stat->steal + stat->guest + stat->guest_nice; +} +*/ +static float _calculate_load( uint64_t idle_time, uint64_t prev_idle_time, + uint64_t total_time, uint64_t prev_total_time ) { + return ( 1 - (1.0 * idle_time - prev_idle_time) / (total_time - prev_total_time) ) * 100.0; +} + +dap_cpu_stats_t dap_cpu_get_stats() +{ + FILETIME idleTime, kernelTime, userTime; + GetSystemTimes( &idleTime, &kernelTime, &userTime ); + + #define WINNT_FILETIME_TO_UINT64(t) (((uint64_t)(t.dwHighDateTime)<<32) | (uint64_t)(t.dwLowDateTime)) + _cpu_stats.cpu_summary.idle_time = WINNT_FILETIME_TO_UINT64(idleTime); + _cpu_stats.cpu_summary.total_time = WINNT_FILETIME_TO_UINT64(kernelTime) + WINNT_FILETIME_TO_UINT64(userTime); + + /*********************************************/ + + SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION pinfo[64]; + ULONG outsize; + uint32_t ntstatus_error; + + /*ntstatus_error = NtQuerySystemInformation( SystemProcessorPerformanceInformation, &pinfo, + sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION) * 64, &outsize );*/ // ! ! ! Legacy method, must be replaced + ntstatus_error = 0; + + if ( ntstatus_error ) { + log_it(L_ERROR, "NtQuerySystemInformation returned an error %u", ntstatus_error ); + return (dap_cpu_stats_t){0}; + } + + if ( outsize < sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION) * _cpu_stats.cpu_cores_count ) { + log_it(L_WARNING, "NtQuerySystemInformation: data size less than expected"); + } + + for( uint32_t i = 0; i < _cpu_stats.cpu_cores_count; i++ ) { + + _cpu_stats.cpus[i].idle_time = pinfo[i].IdleTime.QuadPart; + _cpu_stats.cpus[i].total_time = pinfo[i].KernelTime.QuadPart + pinfo[i].UserTime.QuadPart; + _cpu_stats.cpus[i].ncpu = i; + + _cpu_stats.cpus[i].load = _calculate_load(_cpu_stats.cpus[i].idle_time, + _cpu_old_stats[i].idle_time, + _cpu_stats.cpus[i].total_time, + _cpu_old_stats[i].total_time); + + // log_it(L_WARNING, "CPU %d %f", i, _cpu_stats.cpus[i].load); + } + + _cpu_stats.cpu_summary.load = _calculate_load(_cpu_stats.cpu_summary.idle_time, + _cpu_summary_old.idle_time, + _cpu_stats.cpu_summary.total_time, + _cpu_summary_old.total_time); + + // log_it(L_WARNING, "%f", _cpu_stats.cpu_summary.load); + + memcpy(&_cpu_summary_old, &_cpu_stats.cpu_summary, sizeof (dap_cpu_t)); + + memcpy(_cpu_old_stats, _cpu_stats.cpus, + sizeof (dap_cpu_t) * _cpu_stats.cpu_cores_count); + + return _cpu_stats; +} diff --git a/libdap/src/win32/dap_cpu_monitor.h b/libdap/src/win32/dap_cpu_monitor.h new file mode 100644 index 0000000000000000000000000000000000000000..efec16511a597a4bb970d20f463d55f64c76a2aa --- /dev/null +++ b/libdap/src/win32/dap_cpu_monitor.h @@ -0,0 +1,34 @@ +#pragma once + +#define MAX_CPU_COUNT 64 + +typedef struct dap_cpu { + uint32_t ncpu; // number of cpu core + float load; // percent of load + uint64_t total_time; + uint64_t idle_time; +} dap_cpu_t; + +typedef struct dap_cpu_stats +{ + uint32_t cpu_cores_count; + dap_cpu_t cpu_summary; // average statistic for all cpu + dap_cpu_t cpus[MAX_CPU_COUNT]; // list of cpu with stat +} dap_cpu_stats_t; + +/** + * @brief dap_cpu_monitor_init Monitor CPU initialization + * @return + */ +int dap_cpu_monitor_init(void); + +/** + * @brief dap_cpu_monitor_deinit Monitor CPU deinitialization + */ +void dap_cpu_monitor_deinit(void); + +/** + * @brief dap_cpu_get_stats Getting processor information + * @return + */ +dap_cpu_stats_t dap_cpu_get_stats(void); diff --git a/libdap/src/win32/dap_process_manager.c b/libdap/src/win32/dap_process_manager.c new file mode 100644 index 0000000000000000000000000000000000000000..2051da95e27008ada9e2bc102db12ad971b7b24e --- /dev/null +++ b/libdap/src/win32/dap_process_manager.c @@ -0,0 +1,169 @@ +/* + Copyright (c) 2017-2019 (c) Project "DeM Labs Inc" https://gitlab.demlabs.net/cellframe + All rights reserved. + + This file is part of DAP (Deus Applications Prototypes) the open source project + + DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DAP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with any DAP based project. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include <windows.h> +//#include <winnt.h> +#include <winternl.h> + +#include <stdio.h> +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include <stdbool.h> + +#include "dap_process_manager.h" +#include "dap_common.h" + +#undef LOG_TAG +#define LOG_TAG "dap_process_manager" + +/** + * @brief is_process_running Check whether the process is running + * @param[in] pid PID + * @return + */ +bool is_process_running( pid_t pid ) { + + DWORD ExitCode = 0; + + HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid ); + + if ( !hProcess ) + return false; + + if ( !GetExitCodeProcess( hProcess, &ExitCode ) || ExitCode != STILL_ACTIVE ) { + CloseHandle( hProcess ); + return false; + } + + CloseHandle( hProcess ); + + return true; +} + +/** + * @brief save_process_pid_in_file Saves process pid into file by file_path + * @param[in] file_path File path + * @return Execution result + * + * Saves process pid into file by file_path. + * If file exists he will be overwritten + */ +bool save_process_pid_in_file( const char* file_path ) +{ + FILE *fpid = fopen( file_path, "wb" ); + + if ( fpid == NULL ) { + log_it( L_ERROR, "Cant create/open file by path %s",file_path ); + return false; + } + + fprintf( fpid, "%u", GetCurrentProcessId() ); + fclose( fpid ); + + return true; +} + +/** + * @brief get_pid_from_file File must consist only PID. Return 0 if file is clear. + * @param[in] file_path File path + * @return Execution result + */ +pid_t get_pid_from_file( const char* file_path ) { + + FILE *fpid = fopen( file_path, "rb"); + + if ( fpid == NULL ) { + log_it( L_ERROR, "Cant create/open file by path %s", file_path ); + return false; + } + + pid_t f_pid = 0; + + fscanf( fpid, "%u", &f_pid ); + fclose( fpid ); + + return f_pid; +} + +/** + * @brief daemonize_process Demonizes current process and exit from program + * @return + */ +bool daemonize_process( ) { + + STARTUPINFO start_info; + PROCESS_INFORMATION proc_info; + char fn_exe[256]; + DWORD status; + + memset( &start_info, 0, sizeof(STARTUPINFO) ); + memset( &proc_info, 0, sizeof(PROCESS_INFORMATION) ); + memset( &fn_exe[0], 0, 256 ); + + status = GetModuleFileName( NULL, fn_exe, sizeof(fn_exe) ); + + if ( !status || status == sizeof(fn_exe) ) { + return false; + } + + GetStartupInfo( &start_info ); + + if ( CreateProcess(fn_exe, NULL, NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &start_info, &proc_info) ) { + + CloseHandle( proc_info.hThread ); + CloseHandle( proc_info.hProcess ); + ExitProcess( 0 ); + } + + return false; +} + +/** + * @brief kill_process Sends SIGKILL to process + * @param[in] pid + * @return + */ +bool kill_process( pid_t pid ) { + + DWORD ExitCode; + bool rezult = false; + + HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATION | PROCESS_TERMINATE, FALSE, pid ); + + if ( !hProcess ) { + + return false; + } + + if ( !GetExitCodeProcess( hProcess, &ExitCode ) ) { + + return false; + CloseHandle( hProcess ); + } + + if ( ExitCode == STILL_ACTIVE ) { + rezult = TerminateProcess( hProcess, 0 ); + } + + CloseHandle( hProcess ); + + return rezult; +} diff --git a/libdap/src/win32/dap_process_manager.h b/libdap/src/win32/dap_process_manager.h new file mode 100644 index 0000000000000000000000000000000000000000..4627c84f0a8062dfd734d8835d5f326b042410fb --- /dev/null +++ b/libdap/src/win32/dap_process_manager.h @@ -0,0 +1,21 @@ + +#include <stdbool.h> +#include <unistd.h> +#include <stdint.h> + +/* Saves process pid into file by file_path. + * If file exists he will be overwritten */ +extern bool save_process_pid_in_file( const char* file_path ); + +/* File must consist only PID. Return 0 if file is clear. */ +extern pid_t get_pid_from_file( const char* file_path ); + +/* Return true if process running */ +extern bool is_process_running( pid_t pid ); + +/* Demonizes current process and exit from program */ +extern bool daemonize_process( void ); + +/* Sends SIGKILL to process */ +extern bool kill_process( pid_t pid ); + diff --git a/libdap/src/win32/dap_process_memory.c b/libdap/src/win32/dap_process_memory.c new file mode 100644 index 0000000000000000000000000000000000000000..3614165e49912b0ef9f0b92b77d253443e76027d --- /dev/null +++ b/libdap/src/win32/dap_process_memory.c @@ -0,0 +1,64 @@ +/* + Copyright (c) 2017-2019 (c) Project "DeM Labs Inc" https://gitlab.demlabs.net/cellframe + All rights reserved. + + This file is part of DAP (Deus Applications Prototypes) the open source project + + DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DAP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with any DAP based project. If not, see <http://www.gnu.org/licenses/>. +*/ + +//#include <windows.h> +//#include <winnt.h> +#include <winternl.h> +#include <stdint.h> +#include <pdh.h> +#include <stdio.h> +#include <psapi.h> + +#include "dap_process_memory.h" +#include "dap_common.h" + +#define LOG_TAG "dap_process_mem" + +static dap_process_memory_t _get_process_memory( uint32_t pid ) +{ + HANDLE hProcess; + PROCESS_MEMORY_COUNTERS pmc; + dap_process_memory_t proc_mem = { 0, 0 }; + + hProcess = OpenProcess( PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid ); + if ( !hProcess ) + return proc_mem; + + if ( !GetProcessMemoryInfo( hProcess, &pmc, sizeof(pmc)) ) { + CloseHandle( hProcess ); + return proc_mem; + } + + proc_mem.vsz = pmc.PagefileUsage; + proc_mem.rss = pmc.WorkingSetSize; + + CloseHandle( hProcess ); + return proc_mem; +} + +dap_process_memory_t get_proc_mem_current( void ) +{ + return _get_process_memory( GetCurrentProcessId() ); +} + +dap_process_memory_t get_proc_mem_by_pid( uint32_t pid ) +{ + return _get_process_memory( pid ); +} diff --git a/libdap/src/win32/dap_process_memory.h b/libdap/src/win32/dap_process_memory.h new file mode 100644 index 0000000000000000000000000000000000000000..d2f13c86a851a6e9654d6317ff16454d283bef26 --- /dev/null +++ b/libdap/src/win32/dap_process_memory.h @@ -0,0 +1,23 @@ + +//#include <stdint.h> +//#include <sys/types.h> + + +typedef struct dap_process_memory { + size_t vsz; // virtual memory (kb) + size_t rss; // physical memory (kb) +} dap_process_memory_t; + + +/** + * @brief get_proc_mem_current Get information about the amount of RAM consumed for the current process + * @return + */ +dap_process_memory_t get_proc_mem_current(void); + +/** + * @brief get_proc_mem_by_pid Obtain information about the amount of RAM consumed for a particular process + * @param[in] pid PID + * @return + */ +dap_process_memory_t get_proc_mem_by_pid( uint32_t pid ); diff --git a/libdap/src/win32/registry.c b/libdap/src/win32/registry.c new file mode 100644 index 0000000000000000000000000000000000000000..cead0908150a65972869f763a5ee7a0fac3eb206 --- /dev/null +++ b/libdap/src/win32/registry.c @@ -0,0 +1,141 @@ +#include "registry.h" +#include <shlobj.h> + +wchar_t* readRegKey(HKEY hKey, LPCWSTR regSubKey, LPCWSTR val) { + wchar_t *wret = (wchar_t*)malloc(MAX_PATH); + DWORD dwSize = MAX_PATH; + LSTATUS err = RegGetValueW(hKey, regSubKey, val, RRF_RT_REG_SZ, NULL, (void*)wret, &dwSize); + if (err == ERROR_SUCCESS) { + return wret; + } else { + free(wret); + return NULL; + } +} + +char* regGetUsrPath() { + static char path[MAX_PATH] = {'\0'}; + if (strlen(path) > 3) { return path; } + HKEY hKey; + const char keyPath[] = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"; + LSTATUS err = RegOpenKeyExA(HKEY_LOCAL_MACHINE, + keyPath, + 0, KEY_READ, &hKey ); + if (err != ERROR_SUCCESS) { return NULL; } + DWORD len = MAX_PATH; + err = RegGetValueA(hKey, NULL, "Common Documents", RRF_RT_REG_SZ, NULL, (void*)path, &len); + RegCloseKey(hKey); + return path; +} + +wchar_t* regWGetUsrPath() { + static wchar_t path[MAX_PATH] = {'\0'}; + if (wcslen(path) > 3) { return path; } + HKEY hKey; + const char keyPath[] = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"; + LSTATUS err = RegOpenKeyExA(HKEY_LOCAL_MACHINE, + keyPath, + 0, KEY_READ, &hKey ); + if (err != ERROR_SUCCESS) { return NULL; } + DWORD len = MAX_PATH; + err = RegGetValueW(hKey, NULL, L"Common Documents", RRF_RT_REG_SZ, NULL, (void*)path, &len); + RegCloseKey(hKey); + return path; +} + +wchar_t* getTapGUID() { + static wchar_t guid[MAX_PATH] = {}; + if (wcslen(guid) > 2) { return guid; } + + const wchar_t keyPath[] = L"SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}"; + HKEY baseKey; + LSTATUS err = RegOpenKeyExW(HKEY_LOCAL_MACHINE, keyPath, 0 + ,KEY_ENUMERATE_SUB_KEYS | KEY_WOW64_64KEY | KEY_READ + ,&baseKey); + if (err != ERROR_SUCCESS) { return NULL; } + DWORD index; + for (index = 0; ; ++index) { + wchar_t hKey[MAX_PATH]; + DWORD len = MAX_PATH; + if (RegEnumKeyExW(baseKey, index, hKey, &len, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) { + break; + } + wchar_t *tmp = readRegKey(baseKey, hKey, L"ComponentId"); + if (tmp && wcscmp(tmp, L"tap0901") == 0) { + wchar_t *tmp2 = readRegKey(baseKey, hKey, L"NetCfgInstanceId"); + wcscpy(guid, tmp2); + free(tmp); + free(tmp2); + return guid; + } + if (tmp) free(tmp); + } + return NULL; +} + +wchar_t* getTapName() { + static wchar_t name[MAX_PATH] = {}; + if (wcslen(name) > 2) return name; + + wchar_t *guid = getTapGUID(); + if (guid == NULL) return NULL; + wchar_t keyPath[MAX_PATH] = L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}"; + wcscat(keyPath, L"\\"); + wcscat(keyPath, guid); + + HKEY baseKey; + LSTATUS err = RegOpenKeyExW(HKEY_LOCAL_MACHINE, keyPath, 0 + ,KEY_ENUMERATE_SUB_KEYS | KEY_WOW64_64KEY | KEY_READ + ,&baseKey); + if (err != ERROR_SUCCESS) { return NULL; } + DWORD index; + for (index = 0; ; ++index) { + wchar_t hKey[MAX_PATH]; + DWORD len = MAX_PATH; + if (RegEnumKeyExW(baseKey, index, hKey, &len, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) { + break; + } + wchar_t *tmp = readRegKey(baseKey, hKey, L"Name"); + if (tmp) { + wcscpy(name, tmp); + free(tmp); + return name; + } + } + return NULL; +} + +wchar_t* getUserSID(LPCWSTR homePath) { + static wchar_t sid[MAX_PATH] = {}; + if (wcslen(sid) > 2) return sid; + + const wchar_t keyPath[] = L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList"; + HKEY baseKey; + LSTATUS err = RegOpenKeyExW(HKEY_LOCAL_MACHINE, keyPath, 0 + ,KEY_ENUMERATE_SUB_KEYS | KEY_WOW64_64KEY | KEY_READ + ,&baseKey); + if (err != ERROR_SUCCESS) { return NULL; } + DWORD index; + for (index = 0; ; ++index) { + wchar_t hKey[MAX_PATH]; + DWORD len = MAX_PATH; + if (RegEnumKeyExW(baseKey, index, hKey, &len, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) { + break; + } + wchar_t *tmp = readRegKey(baseKey, hKey, L"ProfileImagePath"); + if (tmp && wcscmp(tmp, homePath) == 0) { + wcscpy(sid, hKey); + free(tmp); + return sid; + } + if (tmp) free(tmp); + } + return NULL; +} + +wchar_t* shGetUsrPath(){ + static WCHAR path[MAX_PATH]; + memset(path, L'\0', MAX_PATH); + SHGetFolderPathW(NULL, CSIDL_PROFILE, NULL, 0, path); + return path; +} diff --git a/libdap/src/win32/registry.h b/libdap/src/win32/registry.h new file mode 100644 index 0000000000000000000000000000000000000000..f184223fd4ee3d49fd17d1e7749a13d42f2077b6 --- /dev/null +++ b/libdap/src/win32/registry.h @@ -0,0 +1,25 @@ +#ifndef REGISTRY_H +#define REGISTRY_H + +#include <stdio.h> +#include <windows.h> +#include <tchar.h> + +#ifdef __cplusplus +extern "C" { +#endif + +wchar_t* readRegKey(HKEY hKey, LPCWSTR regSubKey, LPCWSTR val); +wchar_t* getTapGUID(); +wchar_t* getTapName(); +wchar_t* getUserSID(LPCWSTR homePath); +wchar_t* shGetUsrPath(); + +wchar_t* regWGetUsrPath(); +char* regGetUsrPath(); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/libdap/src/win32/win32.pri b/libdap/src/win32/win32.pri new file mode 100644 index 0000000000000000000000000000000000000000..f88a1c36451d0380eb3b7f911176ba1aacefed87 --- /dev/null +++ b/libdap/src/win32/win32.pri @@ -0,0 +1,13 @@ +HEADERS += $$PWD/dap_console_manager.h \ + $$PWD/dap_cpu_monitor.h \ + $$PWD/dap_process_manager.h \ + $$PWD/dap_process_memory.h \ + $$PWD/registry.h + +SOURCES += $$PWD/dap_console_manager.c \ + $$PWD/dap_cpu_monitor.c \ + $$PWD/dap_process_manager.c \ + $$PWD/dap_process_memory.c \ + $$PWD/registry.c + +INCLUDEPATH += $$PWD diff --git a/libdap/test/CMakeLists.txt b/libdap/test/CMakeLists.txt new file mode 100755 index 0000000000000000000000000000000000000000..c9ef63ebb3d691543f98993ee2483497de6301c9 --- /dev/null +++ b/libdap/test/CMakeLists.txt @@ -0,0 +1,66 @@ +cmake_minimum_required(VERSION 3.0) + +project(core_test) + +set(CMAKE_C_STANDARD 11) +file(GLOB SRCS *.c) + +add_subdirectory(libdap-test) + +if(UNIX) + file(GLOB PLATROFM_DEP_SRC unix/*.c unix/*.h) +endif() + +add_executable(${PROJECT_NAME} ${SRCS} ${PLATROFM_DEP_SRC}) +target_link_libraries(core_test dap_test dap_core pthread) + +add_executable(rpmalloc_test + rpmalloc/test/main.c + rpmalloc/test/thread.c + rpmalloc/test/timer.c +) +target_link_libraries(rpmalloc_test dap_core pthread) +target_include_directories(rpmalloc_test PRIVATE rpmalloc/test/) + +add_executable(rpmalloc_bench + rpmalloc/benchmark/main.c + rpmalloc/benchmark/benchmark.c + rpmalloc/test/thread.c + rpmalloc/test/timer.c +) +if(WIN32) + target_link_libraries(rpmalloc_bench dap_core m pthread ntdll psapi Shlwapi) +endif() +if(UNIX) + target_link_libraries(rpmalloc_bench dap_core m pthread) +endif() + target_include_directories(rpmalloc_bench PRIVATE rpmalloc/benchmark/ rpmalloc/test/) + +add_executable(crtmalloc_bench + rpmalloc/benchmark/main.c + rpmalloc/benchmark/crt_benchmark.c + rpmalloc/test/thread.c + rpmalloc/test/timer.c +) +if(WIN32) + target_link_libraries(crtmalloc_bench dap_core m pthread ntdll psapi Shlwapi) +endif() +if(UNIX) + target_link_libraries(crtmalloc_bench dap_core m pthread) +endif() +target_include_directories(crtmalloc_bench PRIVATE rpmalloc/benchmark/ rpmalloc/test/) + +add_test( + NAME core-test + COMMAND core_test +) + +add_test( + NAME rpm-test + COMMAND rpmalloc +) + +if(UNIX) + target_include_directories(${PROJECT_NAME} PRIVATE unix) + target_include_directories(${PROJECT_NAME} PRIVATE unix/linux) +endif() diff --git a/libdap/test/dap_circular_test.c b/libdap/test/dap_circular_test.c new file mode 100755 index 0000000000000000000000000000000000000000..d3cb9f43e9aa9dd3ed3a394701a68f768b017989 --- /dev/null +++ b/libdap/test/dap_circular_test.c @@ -0,0 +1,216 @@ +#ifndef _WIN32 +#include "dap_circular_test.h" +#include "dap_circular_buffer.h" + +#include <string.h> +#include <sys/socket.h> +#include <unistd.h> + + +static char *chars_string = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + +#define MAX_RESULT_BUF_LEN 8096 +void dap_circular_test_simple() +{ + const int buf_size = 8; + circular_buffer_t cb = circular_buffer_create(buf_size); + + circular_buffer_push(cb, chars_string, buf_size); + + int fd[2]; + socketpair(PF_LOCAL, SOCK_STREAM, 0, fd); + + int ret = circular_buffer_write_In_socket(cb, fd[0]); + dap_assert(ret == buf_size, "Check ret write in socket"); + + ret = circular_buffer_write_In_socket(cb, fd[0]); + dap_assert(ret == 0, "Check ret write in socket"); + char result_buff[MAX_RESULT_BUF_LEN] = {0}; + ssize_t res = read(fd[1], result_buff, 44); + + dap_assert(res == buf_size, "Check buf size"); + + dap_assert(dap_strn_equals(result_buff, chars_string, buf_size), + "Check result buf"); + dap_assert(circular_buffer_get_data_size(cb) == 0, "Check data size"); + + close(fd[0]); + close(fd[1]); + circular_buffer_free(cb); + dap_pass_msg("Test simple"); +} + +void dap_circular_test_double_write() +{ + const int buf_size = 8; + const char* expected_string = "0123456701"; + int expected_string_len = strlen(expected_string); + circular_buffer_t cb = circular_buffer_create(buf_size); + + circular_buffer_push(cb, chars_string, buf_size); + + int fd[2]; + socketpair(PF_LOCAL, SOCK_STREAM, 0, fd); + + int ret = circular_buffer_write_In_socket(cb, fd[0]); + + circular_buffer_push(cb, chars_string, 2); + + ret = circular_buffer_write_In_socket(cb, fd[0]); + dap_assert(ret == 2, "Check ret write in socket"); + + char result_buff[MAX_RESULT_BUF_LEN] = {0}; + ssize_t res = read(fd[1], result_buff, 44); + + dap_assert(res == expected_string_len, "Check buf size"); + + dap_assert(dap_str_equals(result_buff, expected_string), + "Check result buf"); + dap_assert(circular_buffer_get_data_size(cb) == 0, "Check data size"); + dap_pass_msg("Double write"); + + circular_buffer_free(cb); + close(fd[0]); + close(fd[1]); +} + +void dap_circular_test_defrag_write() +{ + const int buf_size = 8; + const char* expected_string = "56701201"; + int expected_string_len = strlen(expected_string); + circular_buffer_t cb = circular_buffer_create(buf_size); + + circular_buffer_push(cb, chars_string, buf_size); + circular_buffer_pop(cb, 5, NULL); + circular_buffer_push(cb, chars_string, 3); + // expected string here 567012 + + + int fd[2]; + socketpair(PF_LOCAL, SOCK_STREAM, 0, fd); + + // write 567012 + int ret = circular_buffer_write_In_socket(cb, fd[0]); + dap_assert(ret == 6, "Check ret write in socket"); + + // push 01 + circular_buffer_push(cb, chars_string, 2); + + // write 01 + ret = circular_buffer_write_In_socket(cb, fd[0]); + dap_assert(ret == 2, "Check ret write in socket"); + + char result_buff[MAX_RESULT_BUF_LEN] = {0}; + ssize_t res = read(fd[1], result_buff, MAX_RESULT_BUF_LEN); + + dap_assert(res == expected_string_len, "Check buf size"); + + dap_assert(dap_str_equals(result_buff, expected_string), + "Check result buf"); + + dap_pass_msg("Double write"); + dap_assert(circular_buffer_get_data_size(cb) == 0, "Check data size"); + circular_buffer_free(cb); + close(fd[0]); + close(fd[1]); +} + +void dap_circular_test_write_bad_socket() +{ + const int buf_size = 8; + circular_buffer_t cb = circular_buffer_create(buf_size); + + circular_buffer_push(cb, chars_string, buf_size); + + int fd[2]; + socketpair(PF_LOCAL, SOCK_STREAM, 0, fd); + int fd2[2]; + socketpair(PF_LOCAL, SOCK_STREAM, 0, fd2); + + close(fd[0]); + int ret = circular_buffer_write_In_socket(cb, fd[0]); + dap_assert(ret == -1, "Check ret write in socket"); + + ret = circular_buffer_write_In_socket(cb, fd2[0]); + dap_assert(ret == 8, "Check ret write in socket"); + char result_buff[MAX_RESULT_BUF_LEN] = {0}; + ssize_t res = read(fd2[1], result_buff, MAX_RESULT_BUF_LEN); + + dap_assert(res == buf_size, "Check buf size"); + + dap_assert(dap_strn_equals(result_buff, chars_string, buf_size), + "Check result buf"); + + ret = circular_buffer_write_In_socket(cb, fd2[0]); + dap_assert(ret == 0, "Check zero write"); + dap_assert(circular_buffer_get_data_size(cb) == 0, "Check data size"); + close(fd[1]); + close(fd2[0]); + close(fd2[1]); + circular_buffer_free(cb); + dap_pass_msg("Test simple"); +} + +void dap_circular_load_test() +{ + srand(time(NULL)); + + int iterations = 230; + + const char *digits = "123456789"; + + const int buf_size = strlen(digits); + circular_buffer_t cb = circular_buffer_create(buf_size); + + int fd[2]; + socketpair(PF_LOCAL, SOCK_STREAM, 0, fd); + + int count_writed_bytes = 0; + + // defrag buffer + circular_buffer_push(cb, (void*)digits, strlen(digits)); + circular_buffer_pop(cb, strlen(digits) - 1, NULL); + circular_buffer_push(cb, (void*)digits, 3); + count_writed_bytes = 4; + + char expectedBuffer[MAX_RESULT_BUF_LEN]; + memset(expectedBuffer, 0, MAX_RESULT_BUF_LEN); + circular_buffer_read(cb, count_writed_bytes, expectedBuffer); + + int count_write_bytes = 4; + do { + int r = circular_buffer_write_In_socket(cb, fd[0]); + dap_assert_PIF(r == count_write_bytes, "Check write bytes"); + dap_assert_PIF(circular_buffer_get_data_size(cb) == 0, "buf size must be 0!"); + + count_write_bytes = rand() % strlen(digits); + circular_buffer_push(cb, (void*)digits, count_write_bytes); + strncat(expectedBuffer, digits, count_write_bytes); + count_writed_bytes += count_write_bytes; + } while (--iterations); + count_writed_bytes -= count_write_bytes; // last bytes will not be writed + + char result_buff[MAX_RESULT_BUF_LEN] = {0}; + ssize_t res = read(fd[1], result_buff, MAX_RESULT_BUF_LEN); + dap_assert(res == count_writed_bytes, "Check count writed and readed from socket bytes"); + + dap_assert(memcmp(expectedBuffer, result_buff, res) == 0, "Check expected and result buffer"); + + circular_buffer_free(cb); + close(fd[0]); + close(fd[1]); +} +void dap_circular_test_run() +{ + dap_print_module_name("dap_circular"); + + dap_circular_test_simple(); + dap_circular_test_double_write(); + dap_circular_test_defrag_write(); +#ifdef __linux__ + dap_circular_test_write_bad_socket(); + dap_circular_load_test(); +#endif +} +#endif \ No newline at end of file diff --git a/libdap/test/dap_circular_test.h b/libdap/test/dap_circular_test.h new file mode 100755 index 0000000000000000000000000000000000000000..51a73aea4edd2719b5614d1187c5d855918d1c80 --- /dev/null +++ b/libdap/test/dap_circular_test.h @@ -0,0 +1,5 @@ +#pragma once +#include "dap_test.h" +#include "dap_common.h" + +extern void dap_circular_test_run(void); diff --git a/libdap/test/dap_common_test.c b/libdap/test/dap_common_test.c new file mode 100755 index 0000000000000000000000000000000000000000..5301d2f4b9a65f827753000ae730e23dc11580d4 --- /dev/null +++ b/libdap/test/dap_common_test.c @@ -0,0 +1,14 @@ +#include "dap_common_test.h" + +void test_put_int() { + const int INT_VAL = 10; + const char * EXPECTED_RESULT = "10"; + char * result_arr = dap_itoa(INT_VAL); + dap_assert(strcmp(result_arr, EXPECTED_RESULT) == 0, + "Check string result from itoa"); +} + +void dap_common_test_run() { + dap_print_module_name("dap_common"); + test_put_int(); +} diff --git a/libdap/test/dap_common_test.h b/libdap/test/dap_common_test.h new file mode 100755 index 0000000000000000000000000000000000000000..3934603b16c0648e11bd40865e28cf960cdd5cb6 --- /dev/null +++ b/libdap/test/dap_common_test.h @@ -0,0 +1,5 @@ +#pragma once +#include "dap_test.h" +#include "dap_common.h" + +extern void dap_common_test_run(void); diff --git a/libdap/test/dap_config_test.c b/libdap/test/dap_config_test.c new file mode 100755 index 0000000000000000000000000000000000000000..38744b0ecd7e03c302d4834ee074b9b7b49d0785 --- /dev/null +++ b/libdap/test/dap_config_test.c @@ -0,0 +1,184 @@ +#include "dap_config_test.h" + +static const char * testconfigName = "test_dap_config.cfg"; +static const char * config_data = "[db_options]\n" + "db_type=mongoDb\n" + "[server_options]\n" + "timeout=1,0\n" + "vpn_enable=true\n" + "proxy_enable=false\n" + "TTL_session_key=600\n" + "str_arr=[vasya, petya, grisha, petushok@microsoft.com]\n" + "int_arr=[1, 3, 5]\n"; + +static const size_t STR_ARR_LEN = 4; +static const char * str_add_test_case[] = { + "vasya", + "petya", + "grisha", + "petushok@microsoft.com" +}; +static const size_t INT_ARR_LEN = 3; +static const int32_t int_arr_test_cases[] = {1, 3, 5}; + + +static FILE * config_file; +static dap_config_t * config; + +void create_test_config_file() { + config_file = fopen(testconfigName, "w+"); + dap_assert(config_file != NULL, "Create config file"); + + fwrite(config_data, sizeof(char), + strlen(config_data), config_file); + + fclose(config_file); +} + +void init_test_case() { + create_test_config_file(); + + // init dir path for configs files + dap_config_init("."); + + config = dap_config_open("test_dap_config"); +} + +void cleanup_test_case() { + dap_assert(remove("test_dap_config.cfg") == 0, + "Remove config file"); + dap_config_close(config); + dap_config_deinit(); +} + +void test_config_open_fail() { + dap_assert(dap_config_open("RandomNeverExistName") == NULL, + "Try open not exists config file"); +} + +void test_get_int() { + int32_t resultTTL = dap_config_get_item_int32(config, + "server_options", + "TTL_session_key"); + dap_assert(resultTTL == 600, "Get int from config"); + +} + +void test_get_int_default() +{ + int32_t resultTTLDefault = dap_config_get_item_int32_default(config, + "server_options", + "TTL_session_key", + 650); + dap_assert(resultTTLDefault == 600, "The correct valid int value is obtained from the default function"); + + int32_t resultTTLDefault1 = dap_config_get_item_int32_default(config, + "server_options", + "TTL_session_key2", + 650); + dap_assert(resultTTLDefault1 == 650, "The correct default value of int from the default function is obtained"); +} + +void test_get_double() { + double timeout = dap_config_get_item_double(config, + "server_options", + "timeout"); + dap_assert(timeout == 1.0, "Get double from config"); +} + +void test_get_double_default() +{ + double timeoutDefault = dap_config_get_item_double_default(config, + "server_options", + "timeout", + 1.0); + dap_assert(timeoutDefault == 1.0, "The correct valid double value is obtained from the default function"); + + double timeoutDefault2 = dap_config_get_item_double_default(config, + "server_options", + "ghsdgfyhj", + 1.5); + dap_assert(timeoutDefault2 == 1.5, "The correct default value of double from the default function is obtained"); +} + +void test_get_bool() { + bool rBool = dap_config_get_item_bool(config, "server_options", "vpn_enable"); + dap_assert(rBool == true, "Get bool from config"); + rBool = dap_config_get_item_bool(config, "server_options", "proxy_enable"); + dap_assert(rBool == false, "Get bool from config"); +} + +void test_get_bool_default() +{ + bool rBool = dap_config_get_item_bool_default(config, "server_options", "proxy_enable", true); + dap_assert(rBool == false, "received true true bool value from a function default"); + rBool = dap_config_get_item_bool_default(config, "server_options", "proxy_enable2", false); + dap_assert(rBool == false, "the correct default value of bool is obtained from the default function"); +} + +void test_array_str() +{ + uint16_t arraySize; + char ** result_arr = dap_config_get_array_str(config, "server_options", "str_arr", &arraySize); + + dap_assert(result_arr != NULL, "Get array str from config"); + dap_assert(arraySize == STR_ARR_LEN, "Check array length"); + + for(uint32_t i = 0; i < arraySize; i++) { + assert(strcmp(result_arr[i], str_add_test_case[i]) == 0 && "test_array_str failed"); + } +} + +void test_array_int() { + uint16_t arraySize; + char ** result_arr = dap_config_get_array_str(config, "server_options", "int_arr", &arraySize); + + dap_assert(result_arr != NULL, "Get array int"); + dap_assert(arraySize == INT_ARR_LEN, "Check array int length"); + + dap_test_msg("Testing array int values."); + for(uint32_t i = 0; i < arraySize; i++) { + dap_assert_PIF(atoi(result_arr[i]) == int_arr_test_cases[i], "Check array int"); + } +} + +void test_get_item_str() +{ + const char* dct = dap_config_get_item_str(config, "db_options", "db_type"); + const char* E1 = "mongoDb"; + dap_assert(memcmp(dct,E1,7) == 0, "The function returns const char*"); +} + +void test_get_item_str_default() +{ + const char* E1 = "mongoDb"; + const char* E2 = "EDb"; + + const char* dct2 = dap_config_get_item_str_default(config, "db_options", "db_type", "EDb"); + dap_assert(memcmp(dct2,E1,7) == 0, "The function returns the true value of const char *"); + + const char* dct3 = dap_config_get_item_str_default(config, "db_options", "db_type2", "EDb"); + dap_assert(memcmp(dct3,E2,3) == 0, "The function returns the default const char *"); +} + + +void dap_config_tests_run() +{ + dap_print_module_name("dap_config"); + + init_test_case(); + + test_config_open_fail(); + test_get_int(); + test_get_int_default(); + test_get_bool(); + test_get_bool_default(); + test_array_str(); + test_array_int(); + test_get_item_str(); + test_get_item_str_default(); + test_get_double(); + test_get_double_default(); + + cleanup_test_case(); +} diff --git a/libdap/test/dap_config_test.h b/libdap/test/dap_config_test.h new file mode 100755 index 0000000000000000000000000000000000000000..0fd0c131b4e93d1900cb21c403c7b843686719fa --- /dev/null +++ b/libdap/test/dap_config_test.h @@ -0,0 +1,5 @@ +#pragma once +#include "dap_test.h" +#include "dap_config.h" + +extern void dap_config_tests_run(void); diff --git a/libdap/test/dap_strfuncs_test.c b/libdap/test/dap_strfuncs_test.c new file mode 100755 index 0000000000000000000000000000000000000000..010da4e0be4ce627b95a1ef905463a9acad33a75 --- /dev/null +++ b/libdap/test/dap_strfuncs_test.c @@ -0,0 +1,145 @@ +#include "dap_common.h" +#include "dap_strfuncs_test.h" +#include "dap_list.h" +#include "dap_string.h" + +void dap_str_dup_test(void) +{ + int l_a = rand(), l_b = rand(); + const char *l_s = "test string"; + char l_str0[1024]; + sprintf(l_str0, "a=%d b=%d s=%s", l_a, l_b, l_s); + char *l_str1 = dap_strdup_printf("a=%d b=%d s=%s", l_a, l_b, l_s); + size_t str_size0 = strlen(l_str0); + size_t str_size1 = strlen(l_str1); + + char *l_str2 = DAP_NEW_SIZE(char, str_size1 + 1); + dap_stpcpy(l_str2, l_str1); + + size_t str_size2 = strlen(l_str2); + dap_assert_PIF(str_size0 == str_size1, "Strings sizes must be equal"); + dap_assert_PIF(str_size1 == str_size2, "Strings sizes must be equal"); + + dap_assert(!strcmp(l_str0, l_str1), "Test dap_strdup_printf()"); + dap_assert(!strcmp(l_str1, l_str2), "Test dap_stpcpy()"); + DAP_DELETE(l_str1); + DAP_DELETE(l_str2); +} + +void dap_str_modify_test(void) +{ + const char *l_s_in = "Test String"; + const char *l_s_up_check = "TEST STRING"; + const char *l_s_down_check = "test string"; + char *l_s_out; + + l_s_out = dap_strup(l_s_in, -1); + dap_assert(!strcmp(l_s_out, l_s_up_check), "Test dap_strup()"); + DAP_DELETE(l_s_out); + + l_s_out = dap_strdown(l_s_in, -1); + dap_assert(!strcmp(l_s_out, l_s_down_check), "Test dap_strdown()"); + DAP_DELETE(l_s_out); + + l_s_out = dap_strdup(l_s_in); + dap_strreverse(l_s_out); + dap_assert_PIF(strcmp(l_s_out, l_s_in), "String not modified"); + dap_strreverse(l_s_out); + dap_assert(!strcmp(l_s_out, l_s_in), "Test dap_strreverse()"); + DAP_DELETE(l_s_out); + + l_s_out = dap_strdup_printf(" %s ", l_s_in); + dap_strstrip(l_s_out); + dap_assert(!strcmp(l_s_out, l_s_in), "Test dap_strstrip()"); + DAP_DELETE(l_s_out); +} + +void dap_str_array_test(void) +{ + const char *l_s_in = "1:23:: Test: :\n:String:"; + char **l_s_array = dap_strsplit(l_s_in, ":", -1); + + size_t l_count = 1; + char *l_s_tmp = dap_strstr_len(l_s_in, -1, ":"); + while(l_s_tmp) { + l_s_tmp = dap_strstr_len(l_s_tmp + 1, -1, ":"); + l_count++; + } + + char **l_s_array_copy = dap_strdupv((const char**)l_s_array); + + dap_assert_PIF(dap_str_countv(l_s_array) == l_count, "String split"); + dap_assert_PIF(dap_str_countv(l_s_array_copy) == l_count, "String copy"); + char *l_s_out = dap_strjoinv(":", l_s_array); + dap_assert(!strcmp(l_s_out, l_s_in), "Test string array functions"); + + dap_strfreev(l_s_array); + dap_strfreev(l_s_array_copy); + DAP_DELETE(l_s_out); +} + +static void list_delete(void* a_pointer) +{ + DAP_DELETE(a_pointer); +} + +void dap_list_test(void) +{ + dap_list_t *l_list = NULL; + l_list = dap_list_append(l_list, "item 1"); + l_list = dap_list_append(l_list, "item 2"); + l_list = dap_list_append(l_list, "item 3"); + l_list = dap_list_prepend(l_list, "item 0"); + + dap_list_t *l_list_tmp = dap_list_find(l_list, "item 2"); + unsigned int l_count = dap_list_length(l_list); + dap_list_remove(l_list, "item 3"); + unsigned int l_count_after = dap_list_length(l_list); + + dap_assert_PIF(l_count == 4, "Test dap_list_length()"); + dap_assert_PIF(l_count_after == 3, "Test dap_list_remove()"); + dap_assert_PIF(!strcmp(l_list_tmp->data, "item 2"), "Test dap_list_find()"); + dap_list_free(l_list); + + // for test dap_list_free_full() + l_list = NULL; + l_list = dap_list_append(l_list, dap_strdup("item 1")); + l_list = dap_list_append(l_list, dap_strdup("item 2")); + + dap_assert(l_list, "Test dap_list_t"); + dap_list_free_full(l_list, list_delete); +} + +void dap_string_test(void) +{ + dap_string_t *l_str = dap_string_new(NULL); + dap_string_append(l_str, "str=string 1"); + dap_assert_PIF(!strcmp(l_str->str, "str=string 1"), "Test dap_string_append()"); + + dap_string_append_printf(l_str, " int=%d", 123); + dap_assert_PIF(!strcmp(l_str->str, "str=string 1 int=123"), "Test dap_string_append()"); + + dap_string_erase(l_str, 3, 9); + dap_assert_PIF(!strcmp(l_str->str, "str int=123"), "Test dap_string_erase()"); + + dap_string_append_len(l_str, " string2", strlen(" string2")); + dap_assert_PIF(!strcmp(l_str->str, "str int=123 string2"), "Test dap_string_append_len()"); + + dap_assert(l_str, "Test dap_string_t"); + dap_string_free(l_str, true); +} + +void dap_strfuncs_tests_run(void) +{ + dap_print_module_name("dap_strfuncs"); + + dap_str_dup_test(); + dap_str_modify_test(); + dap_str_array_test(); + dap_list_test(); + dap_string_test(); + + dap_usleep(0.5 * DAP_USEC_PER_SEC); + dap_assert(1, "Test dap_usleep(0.5 sec.)"); + +} diff --git a/libdap/test/dap_strfuncs_test.h b/libdap/test/dap_strfuncs_test.h new file mode 100755 index 0000000000000000000000000000000000000000..ef2e7963d900896e007b6cd96040f75e8e7ea122 --- /dev/null +++ b/libdap/test/dap_strfuncs_test.h @@ -0,0 +1,5 @@ +#pragma once +#include "dap_test.h" +#include "dap_strfuncs.h" + +extern void dap_strfuncs_tests_run(void); diff --git a/libdap/test/libdap-test b/libdap/test/libdap-test new file mode 160000 index 0000000000000000000000000000000000000000..b76175acc517f085c319c8e66c62bd143f96bf94 --- /dev/null +++ b/libdap/test/libdap-test @@ -0,0 +1 @@ +Subproject commit b76175acc517f085c319c8e66c62bd143f96bf94 diff --git a/libdap/test/main.c b/libdap/test/main.c new file mode 100755 index 0000000000000000000000000000000000000000..d68193229e3da5393fbdaf70898e8de2515dc9ee --- /dev/null +++ b/libdap/test/main.c @@ -0,0 +1,26 @@ +#include "dap_config_test.h" +#include "dap_common_test.h" +#ifndef _WIN32 +#include "dap_network_monitor_test.h" +#endif +#include "dap_strfuncs_test.h" +#include "dap_common.h" + + +int main(void) { + // switch off debug info from library + dap_log_level_set(L_CRITICAL); + dap_strfuncs_tests_run(); + dap_config_tests_run(); + dap_common_test_run(); +#ifdef __unix__ +#include "dap_process_mem_test.h" +#include "dap_cpu_monitor_test.h" +#include "dap_network_monitor.h" +#include "dap_circular_test.h" + dap_circular_test_run(); + dap_process_mem_test_run(); + dap_cpu_monitor_test_run(); + dap_network_monitor_test_run(); +#endif +} diff --git a/libdap/test/rpmalloc/benchmark/benchmark.c b/libdap/test/rpmalloc/benchmark/benchmark.c new file mode 100644 index 0000000000000000000000000000000000000000..a62db3e51ab41361e301886fe6f5cc8883cc303b --- /dev/null +++ b/libdap/test/rpmalloc/benchmark/benchmark.c @@ -0,0 +1,55 @@ + +#include <rpmalloc.h> +#include <benchmark.h> + +int +benchmark_initialize() { + return rpmalloc_initialize(); +} + +int +benchmark_finalize(void) { + rpmalloc_finalize(); + return 0; +} + +int +benchmark_thread_initialize(void) { + rpmalloc_thread_initialize(); + return 0; +} + +int +benchmark_thread_finalize(void) { + rpmalloc_thread_finalize(); + return 0; +} + +void +benchmark_thread_collect(void) { + rpmalloc_thread_collect(); +} + +void* +benchmark_malloc(size_t alignment, size_t size) { + //return rpmemalign(alignment, size); + return rpmalloc(size); +} + +extern void +benchmark_free(void* ptr) { + rpfree(ptr); +} + +const char* +benchmark_name(void) { +#if defined(ENABLE_UNLIMITED_CACHE) + return "rpmalloc-unlimit"; +#elif defined(DISABLE_CACHE) + return "rpmalloc-nocache"; +#elif defined(ENABLE_SPACE_PRIORITY_CACHE) + return "rpmalloc-size"; +#else + return "rpmalloc"; +#endif +} diff --git a/libdap/test/rpmalloc/benchmark/benchmark.h b/libdap/test/rpmalloc/benchmark/benchmark.h new file mode 100644 index 0000000000000000000000000000000000000000..26fb264f5a92174b1a3789fb4211b8bf6308ce27 --- /dev/null +++ b/libdap/test/rpmalloc/benchmark/benchmark.h @@ -0,0 +1,43 @@ + +#include <stdint.h> +#include <stddef.h> + +#ifdef _MSC_VER +# define FORCENOINLINE __declspec(noinline) +#else +# define FORCENOINLINE __attribute__((__noinline__)) +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +extern FORCENOINLINE int +benchmark_initialize(void); + +extern FORCENOINLINE int +benchmark_finalize(void); + +extern FORCENOINLINE int +benchmark_thread_initialize(void); + +extern FORCENOINLINE int +benchmark_thread_finalize(void); + +extern FORCENOINLINE void +benchmark_thread_collect(void); + +extern FORCENOINLINE void* +benchmark_malloc(size_t alignment, size_t size); + +extern FORCENOINLINE void +benchmark_free(void* ptr); + +extern FORCENOINLINE const char* +benchmark_name(void); + +#undef FORCENOINLINE + +#ifdef __cplusplus +} +#endif diff --git a/libdap/test/rpmalloc/benchmark/crt_benchmark.c b/libdap/test/rpmalloc/benchmark/crt_benchmark.c new file mode 100644 index 0000000000000000000000000000000000000000..4dac2165c7ec40f34da23e9e0b6938cd7e52fea9 --- /dev/null +++ b/libdap/test/rpmalloc/benchmark/crt_benchmark.c @@ -0,0 +1,68 @@ + +#include <benchmark.h> +#include <string.h> +#include <stdlib.h> + +#ifndef __APPLE__ +# include <malloc.h> +#endif + +int +benchmark_initialize() { + return 0; +} + +int +benchmark_finalize(void) { + return 0; +} + +int +benchmark_thread_initialize(void) { + return 0; +} + +int +benchmark_thread_finalize(void) { + return 0; +} + +void* +benchmark_malloc(size_t alignment, size_t size) { + /* +#ifdef _WIN32 + return _aligned_malloc(size, alignment ? alignment : 4); +#elif defined(__APPLE__) + if (alignment) { + void* ptr = 0; + posix_memalign(&ptr, alignment, size); + return ptr; + } + return malloc(size); +#else + return alignment ? memalign(alignment, size) : malloc(size); +#endif + */ + return malloc(size); +} + +extern void +benchmark_free(void* ptr) { + /* +#ifdef _WIN32 + _aligned_free(ptr); +#else + free(ptr); +#endif + */ + free(ptr); +} + +const char* +benchmark_name(void) { + return "crt"; +} + +void +benchmark_thread_collect(void) { +} diff --git a/libdap/test/rpmalloc/benchmark/main.c b/libdap/test/rpmalloc/benchmark/main.c new file mode 100644 index 0000000000000000000000000000000000000000..67f5d3710cd30ca052fa4c8eaccc8340e39bf8d7 --- /dev/null +++ b/libdap/test/rpmalloc/benchmark/main.c @@ -0,0 +1,920 @@ + +#if defined(_WIN32) && !defined(_CRT_SECURE_NO_WARNINGS) +# define _CRT_SECURE_NO_WARNINGS +#endif + +#include <benchmark.h> +#include <thread.h> +#include <timer.h> +#include <atomic.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <math.h> + +#ifdef _MSC_VER +# define PRIsize "Iu" +#else +# define PRIsize "zu" +#endif + +#define MODE_RANDOM 0 +#define MODE_FIXED 1 + +#define SIZE_MODE_EVEN 0 +#define SIZE_MODE_LINEAR 1 +#define SIZE_MODE_EXP 2 + +typedef struct benchmark_arg benchmark_arg; +typedef struct thread_pointers thread_pointers; + +struct benchmark_arg { + size_t numthreads; + size_t index; + size_t mode; + size_t size_mode; + size_t cross_rate; + size_t loop_count; + size_t alloc_count; + size_t min_size; + size_t max_size; + size_t accumulator; + uint64_t ticks; + uint64_t mops; + atomicptr_t foreign; + atomic32_t allocated; + int32_t peak_allocated; + thread_arg thread_arg; + benchmark_arg* args; +}; + +struct thread_pointers { + void** pointers; + size_t count; + void* next; + atomic32_t* allocated; +}; + +static int benchmark_start; +static atomic32_t benchmark_threads_sync; +static atomic32_t cross_thread_counter; +static size_t alloc_scatter; +static size_t free_scatter; + +//Fixed set of random numbers +static size_t random_size[2000] = { + 42301, 6214, 74627, 93605, 82351, 93731, 23458, 99146, 63110, 22890, 29895, 62570, 91269, 60237, 99940, 64028, 95252, 82540, 20157, 90844, + 80126, 82425, 74582, 70716, 69905, 55267, 81755, 85685, 17895, 97983, 39747, 45772, 71311, 84679, 10633, 96622, 15408, 38774, 31383, 79884, + 59907, 69840, 70483, 1296, 30221, 32374, 1250, 6347, 55189, 30819, 88155, 18121, 34568, 90285, 27466, 21037, 54054, 3219, 32951, 78141, + 45307, 29446, 68281, 95416, 58882, 67815, 98134, 2339, 97192, 32586, 89181, 84327, 21090, 73236, 34831, 66699, 98076, 76431, 82647, 94073, + 97868, 72757, 1078, 60005, 57151, 30003, 22000, 71102, 87440, 77764, 28581, 20434, 10655, 3167, 50417, 88166, 76793, 14801, 90802, 74376, + 31055, 49270, 1811, 99060, 66802, 94820, 37732, 40916, 89868, 46639, 91529, 74982, 44250, 89547, 91703, 93058, 71578, 85890, 77997, 36514, + 31241, 56600, 45720, 69069, 83887, 4396, 91279, 86956, 69816, 79329, 94753, 80730, 71401, 34363, 28333, 90214, 54635, 78220, 89331, 46985, + 57244, 31825, 55509, 56620, 53052, 93569, 5047, 96610, 39491, 66722, 42181, 58022, 47908, 48366, 50190, 25365, 77605, 87328, 33861, 95641, + 17634, 5996, 23188, 97862, 14954, 47887, 39062, 43748, 21261, 68198, 33379, 84240, 73622, 80466, 11015, 56289, 79325, 49658, 79713, 43863, + 60814, 24277, 19592, 89493, 82630, 95915, 48588, 16, 52733, 90874, 13240, 10894, 53813, 36264, 52999, 63240, 24143, 14198, 49899, 49364, + 6764, 24958, 92996, 64150, 15801, 51305, 24669, 29519, 25870, 1776, 58258, 6464, 87940, 20386, 25, 70486, 98172, 11585, 10171, 5157, + 7026, 38703, 63684, 86195, 95216, 78626, 79196, 67688, 56185, 8529, 41126, 16917, 70005, 82329, 67929, 68971, 10460, 29003, 8395, 24405, + 3895, 93557, 34560, 71824, 44131, 48196, 87466, 34517, 17289, 67171, 47857, 98431, 34300, 75002, 32113, 46694, 50866, 31554, 46622, 83785, + 79479, 58018, 58379, 28308, 97161, 67403, 85605, 60156, 82077, 9349, 8124, 76999, 99456, 17139, 91334, 932, 6836, 87864, 36635, 67900, + 1529, 25061, 99041, 29110, 13974, 6517, 25337, 62714, 70512, 26081, 51977, 73938, 33913, 37983, 62940, 35631, 58798, 28189, 24009, 43543, + 70222, 27381, 52259, 73386, 76069, 44347, 20046, 77165, 16347, 71345, 22879, 50230, 37429, 68115, 70002, 89613, 69316, 60787, 58923, 51295, + 40284, 96998, 35508, 87173, 30133, 12407, 28667, 40805, 74633, 43303, 45342, 37778, 20934, 42910, 52266, 90173, 90947, 92460, 48039, 74023, + 72091, 69029, 18019, 4521, 18104, 93795, 52380, 75881, 74698, 22760, 74315, 47044, 98770, 3146, 20657, 8725, 53817, 23967, 84651, 36005, + 5331, 90981, 94529, 14026, 70400, 50286, 96587, 50844, 81796, 61110, 36776, 22624, 93962, 12909, 2490, 63451, 16560, 72472, 73436, 52307, + 3521, 21280, 4160, 41326, 118, 52625, 78163, 91680, 97730, 44749, 72617, 6735, 38840, 30276, 21979, 3013, 98953, 38592, 63622, 14286, + 26609, 45281, 96512, 1266, 15845, 13075, 63503, 55194, 57552, 347, 28896, 66327, 27818, 18314, 36467, 32685, 79917, 67475, 6482, 27502, + 27895, 81645, 88851, 63447, 97801, 59402, 61663, 62266, 11723, 53664, 31123, 50583, 52561, 93801, 60911, 95186, 1523, 13959, 75972, 83397, + 98867, 13677, 26462, 60373, 50646, 29253, 69891, 23620, 97227, 70196, 685, 46204, 72222, 76264, 79291, 32699, 88327, 950, 86803, 67946, + 65417, 68473, 34521, 81124, 29656, 78884, 84, 11889, 93078, 63564, 93310, 73297, 11835, 14176, 9106, 51926, 49470, 90576, 54176, 79782, + 68503, 65790, 25873, 71786, 48914, 1729, 81335, 59162, 96305, 46442, 19220, 64437, 80518, 59209, 56079, 83046, 2171, 11606, 65951, 44268, + 75604, 75013, 336, 46693, 56101, 69968, 26795, 55351, 2926, 51530, 4574, 65148, 36917, 70077, 82638, 53513, 36907, 4469, 94792, 1248, + 62907, 93233, 44798, 35998, 28031, 86786, 15581, 9546, 3067, 65953, 42127, 93017, 73500, 47493, 34152, 42566, 99077, 63233, 43072, 12191, + 94924, 46953, 3641, 58957, 2971, 11982, 13551, 69306, 82293, 25723, 36647, 71048, 76501, 58174, 33792, 14359, 6882, 46120, 14201, 36645, + 61886, 99622, 58258, 70316, 66228, 53947, 32478, 36276, 43902, 37878, 67333, 764, 83139, 86356, 7510, 61421, 45025, 9383, 38610, 93338, + 36981, 85186, 53596, 18730, 11841, 79036, 61283, 86019, 87281, 71951, 95833, 84380, 19627, 9626, 97079, 72846, 20890, 29832, 93108, 7976, + 62701, 17762, 21406, 70085, 40096, 19644, 57467, 25989, 32652, 23781, 591, 17087, 98696, 22640, 89961, 48544, 52682, 85931, 44827, 84419, + 13891, 82403, 25915, 64876, 1092, 63868, 85965, 92472, 90590, 6645, 82417, 12635, 44125, 17017, 28025, 98728, 21429, 83742, 74565, 94388, + 64814, 56266, 5530, 82469, 32833, 78753, 76171, 82758, 44987, 58705, 75785, 22708, 26724, 77955, 84443, 55066, 44605, 92125, 1225, 78907, + 92345, 27374, 74731, 66764, 16133, 18429, 82040, 57794, 75229, 63230, 84688, 40516, 64711, 52314, 88591, 45887, 24727, 89863, 48026, 60643, + 89466, 74838, 84712, 87291, 9805, 38722, 26550, 88896, 12322, 89245, 97273, 26602, 68253, 42065, 13831, 80784, 63967, 10057, 48370, 90991, + 22164, 36692, 74691, 99469, 45153, 92702, 71622, 24003, 37475, 34155, 49983, 42747, 95163, 38986, 16633, 71055, 64068, 51835, 90775, 64181, + 41674, 52152, 86065, 5176, 34552, 11045, 95891, 37901, 50122, 85359, 78631, 67931, 37636, 86730, 25850, 61677, 40015, 71019, 44850, 40945, + 41041, 35159, 424, 53685, 97795, 77347, 31533, 94160, 27348, 63354, 26319, 40107, 93098, 87100, 85148, 95354, 7848, 26932, 59006, 12235, + 17688, 81474, 78287, 84516, 61413, 68919, 38238, 57286, 54401, 18562, 25023, 88031, 54460, 58083, 83677, 18915, 31861, 85374, 87576, 59732, + 38534, 65960, 54797, 77939, 38196, 87986, 75270, 10987, 96933, 43058, 82075, 75153, 13907, 74334, 35358, 53207, 83535, 54154, 70746, 2441, + 51129, 32650, 97619, 91451, 76454, 16015, 40537, 14889, 16211, 63991, 97437, 32730, 5189, 79601, 67330, 95751, 62744, 19292, 75233, 18084, + 37573, 40609, 42724, 93700, 33349, 20980, 40936, 94332, 22383, 1416, 72096, 52578, 50442, 30252, 11023, 46171, 36137, 65402, 99112, 67145, + 22003, 54711, 69025, 10911, 26043, 60371, 38943, 23493, 88350, 71488, 58854, 18883, 21344, 86625, 58563, 41158, 18495, 48188, 942, 66045, + 31255, 60368, 97474, 57619, 71639, 33064, 46735, 35467, 20637, 5041, 83609, 38123, 49670, 76412, 66878, 68287, 85916, 91311, 60061, 36099, + 28495, 90856, 80025, 43741, 69408, 83471, 36181, 95935, 35330, 50544, 62083, 43570, 89033, 33867, 36027, 15254, 30197, 34458, 39364, 74865, + 24812, 37022, 5954, 72980, 17251, 38420, 25210, 22888, 98643, 24684, 21543, 61874, 33534, 3202, 52652, 9661, 54900, 57117, 10607, 65871, + 36892, 96446, 73068, 42280, 98969, 18166, 92463, 14979, 89072, 87142, 70769, 19354, 28149, 4840, 80852, 6332, 82116, 76515, 31224, 98426, + 49973, 14581, 41012, 67269, 13159, 17895, 23331, 89950, 33053, 59052, 75888, 37680, 33410, 64278, 86775, 58344, 56445, 94767, 73347, 68064, + 15906, 55708, 90978, 50676, 8131, 78335, 18423, 42033, 16784, 77371, 1779, 48452, 68259, 20383, 84196, 99516, 24988, 39436, 84941, 53532, + 82934, 56012, 86532, 26276, 50102, 95350, 92394, 72824, 91468, 51207, 46677, 74147, 17396, 73951, 61050, 84191, 83137, 53207, 71850, 73087, + 60066, 58680, 40205, 40903, 88778, 70023, 52889, 58243, 33085, 94965, 57111, 99423, 67011, 83618, 95835, 20599, 11034, 24152, 25380, 27540, + 73219, 64152, 42450, 45985, 75245, 86575, 70394, 62669, 51370, 96295, 59743, 85700, 64532, 3403, 50481, 60582, 54875, 92772, 74427, 75038, + 30668, 93071, 8085, 14688, 67282, 80982, 5324, 94615, 19268, 218, 63596, 74942, 8766, 48092, 7247, 35807, 1617, 67115, 39693, 31807, + 50062, 43147, 24706, 80094, 75012, 10409, 4959, 51613, 24339, 41384, 68303, 29069, 9971, 66575, 71694, 54059, 47732, 76043, 13003, 71451, + 72224, 31273, 66756, 52916, 73991, 22734, 41818, 15810, 28867, 44316, 74895, 60210, 92030, 54114, 98692, 92327, 60861, 64847, 44885, 53175, + 40713, 66802, 194, 58710, 76645, 20203, 66546, 98777, 5418, 38879, 5263, 25406, 77388, 20914, 53056, 73849, 19265, 22355, 39435, 85914, + 494, 19760, 20364, 903, 31617, 85835, 9835, 42381, 2442, 29412, 69033, 84184, 91987, 64246, 75227, 25048, 7900, 45999, 10019, 41123, + 90308, 72412, 90235, 47141, 93995, 76257, 96004, 52493, 91642, 30038, 85834, 57092, 50095, 66871, 3419, 41040, 80452, 92769, 61837, 30941, + 46436, 67831, 82636, 82534, 31242, 19962, 61308, 19447, 37538, 28143, 49442, 418, 5697, 91278, 75828, 23803, 99969, 95404, 54686, 10389, + 49364, 57913, 23776, 37305, 99796, 52566, 55563, 34806, 81928, 74742, 59961, 8783, 78909, 5754, 53610, 46793, 75199, 39462, 41905, 86633, + 2510, 17823, 11402, 57000, 71562, 57163, 12648, 73365, 24722, 1369, 33470, 24342, 60541, 98872, 83077, 28367, 28518, 17001, 76839, 48127, + 98368, 49622, 21930, 59294, 81371, 14056, 20446, 90327, 9004, 31843, 35487, 93502, 19142, 17218, 43677, 42361, 8538, 24342, 45545, 17763, + 95904, 83989, 93051, 86548, 17700, 40673, 30548, 25636, 84204, 85583, 48442, 45686, 57349, 67781, 99236, 60399, 26916, 20719, 12654, 29727, + 54503, 21347, 15072, 65239, 73085, 97065, 34856, 57254, 20993, 87740, 2358, 7401, 34081, 84586, 77782, 38801, 66088, 71230, 97174, 50108, + 25173, 62865, 87387, 90522, 60616, 82589, 19470, 66429, 72246, 30131, 99837, 38489, 83145, 87510, 78816, 99793, 1713, 93034, 63952, 14964, + 99553, 6925, 8645, 90572, 49178, 38455, 97624, 91051, 39833, 11584, 50823, 52915, 37241, 38347, 51895, 97465, 37295, 86221, 69851, 12563, + 63686, 6783, 23498, 9999, 48545, 99429, 36814, 20903, 13473, 89449, 55533, 30269, 92525, 78863, 32798, 98799, 6993, 37376, 24058, 82949, + 19363, 26898, 58435, 40545, 21173, 24598, 74477, 80100, 82134, 10642, 91659, 45488, 77142, 12812, 5135, 30842, 52189, 38228, 57309, 17403, + 11373, 21568, 60916, 36950, 55835, 55785, 23423, 89045, 42861, 98577, 27943, 75686, 59340, 20697, 23929, 59319, 87107, 34460, 71684, 26064, + 77777, 89852, 7287, 31625, 35375, 92061, 43376, 26687, 44255, 28676, 97442, 55313, 31523, 65877, 9220, 55068, 99424, 18327, 66865, 37648, + 28095, 61967, 28769, 81395, 3143, 90859, 37048, 40894, 64647, 23697, 79689, 62952, 28921, 37991, 21013, 86140, 1116, 56753, 93196, 16310, + 98576, 72886, 46453, 8654, 50373, 99234, 6113, 97632, 62708, 61101, 33931, 87983, 30152, 45779, 98494, 55851, 76132, 32239, 87613, 55196, + 2918, 12991, 44375, 69565, 49627, 17472, 60832, 5379, 47572, 45556, 74889, 95921, 62036, 96059, 3909, 52552, 55285, 20199, 25930, 99967, + 68458, 7181, 61674, 18479, 80956, 29791, 25413, 91060, 99125, 23566, 51800, 50744, 89097, 31911, 70605, 42816, 66700, 46028, 48770, 63851, + 64023, 35792, 27000, 52926, 1263, 87504, 42319, 90060, 22659, 6024, 99993, 88029, 99170, 72740, 15197, 90232, 59519, 92011, 84116, 17503, + 33985, 45034, 2771, 59768, 20541, 76922, 97173, 59769, 70795, 10877, 25759, 64087, 96456, 76387, 25410, 82611, 47991, 94311, 18423, 23087, + 20096, 59066, 7965, 29232, 37590, 32338, 74190, 16061, 87403, 86026, 26953, 24574, 18596, 53276, 81813, 84669, 59980, 26175, 35430, 10620, + 50992, 46236, 57904, 56494, 23357, 93792, 42763, 43735, 39952, 53049, 94826, 68957, 62419, 30629, 72587, 76494, 66848, 95907, 6380, 98019, + 81166, 82102, 86605, 15449, 6687, 69255, 56751, 52925, 84112, 67773, 59353, 15543, 36601, 3387, 79601, 83257, 49246, 76874, 56185, 793, + 59738, 52149, 26613, 66307, 8234, 24065, 92988, 71189, 79064, 71518, 32203, 67702, 9543, 98621, 93075, 34932, 15937, 87714, 71486, 75270, + 35729, 41826, 34535, 41952, 14408, 89411, 25440, 34547, 64653, 1052, 2091, 55795, 24536, 50576, 61768, 25630, 48362, 74274, 82782, 37429, + 26345, 45185, 69504, 68905, 64931, 44057, 69869, 76963, 38003, 25727, 93730, 4799, 87357, 88156, 95203, 33217, 45889, 57727, 37421, 89580, + 18862, 49760, 11881, 41838, 35387, 83063, 26361, 328, 6753, 87380, 70890, 28029, 74084, 42224, 8151, 29816, 90197, 76425, 14733, 82706, + 59843, 98843, 74236, 7062, 61936, 69254, 64153, 72080, 72850, 88695, 5871, 72131, 1032, 4002, 99201, 7426, 88307, 3533, 34065, 72500, + 44972, 97675, 72795, 8365, 37366, 62425, 22108, 83202, 29045, 1772, 88598, 81519, 41398, 16707, 34486, 2272, 92916, 47652, 99365, 95005, + 39416, 77780, 28778, 75294, 81891, 95050, 37955, 28803, 19527, 67, 69492, 28635, 96926, 59073, 4874, 75644, 68338, 41368, 71873, 71289, + 67924, 4733, 14164, 17892, 38828, 84141, 66764, 69505, 95978, 65222, 58685, 848, 24990, 72158, 34250, 66702, 16290, 41201, 48260, 62154, + 34092, 30249, 20908, 54756, 93067, 45932, 58912, 4959, 61289, 46612, 36779, 97765, 59802, 43280, 39452, 6689, 36436, 32689, 27298, 90154, + 52142, 27957, 32314, 41858, 50225, 88155, 84872, 66423, 47164, 50056, 70331, 45054, 35502, 41234, 95896, 41575, 14100, 4617, 68543, 37829, + 5296, 11231, 89156, 86146, 72106, 83030, 35808, 64542, 28741, 15339, 26443, 10559, 52283, 56443, 45477, 37830, 28763, 98269, 47644, 20443, + 14448, 44861, 6370, 80492, 85001, 72737, 51720, 31424, 99527, 22420, 38776, 62662, 27502, 36580, 3307, 83960, 81721, 51624, 64182, 45836, + 1142, 33260, 75913, 94960, 16724, 92842, 89870, 92244, 24408, 19935, 94145, 25952, 60513, 98704, 69713, 46450, 9281, 16864, 7195, 96912, + 24452, 93864, 23523, 10910, 71732, 27237, 25286, 40790, 66746, 88387, 35004, 99859, 70027, 31707, 41359, 59875, 52986, 24154, 39601, 13952, + 14845, 36397, 78033, 97093, 43471, 79587, 17740, 2334, 20975, 70433, 48316, 20809, 89126, 346, 53303, 95290, 46100, 98972, 25761, 56374, + 72548, 522, 60873, 56778, 69867, 58418, 11277, 6346, 76779, 35626, 41615, 77473, 41372, 27889, 38640, 64797, 74422, 59716, 6530, 17798, + 86356, 6037, 51450, 32010, 5755, 56904, 35165, 5598, 17784, 92297, 61238, 76340, 53938, 93742, 25511, 33923, 77947, 91562, 99162, 90512, + 96749, 60367, 32742, 47696, 35649, 35581, 91908, 23524, 73036, 58325, 1642, 84646, 91901, 25729, 82064, 81835, 19387, 61543, 68288, 95618, + 86715, 75797, 29530, 40875, 68019, 23736, 46328, 47927, 7882, 77085, 20355, 74989, 71929, 24800, 13585, 29510, 81173, 53946, 12017, 57628, + 67465, 1584, 68135, 48915, 36062, 15397, 32156, 98903, 63257, 92838, 39730, 51909, 86167, 3358, 1553, 54615, 83915, 4448, 25246, 28089, + 7795, 71271, 7179, 37688, 76932, 54541, 9356, 95744, 60661, 31195, 17491, 43766, 45565, 17181, 47779, 22976, 32372, 30265, 10905, 21731 +}; +static size_t random_size_lin[2000]; +static size_t random_size_exp[2000]; +static size_t* random_size_arr; + +static size_t num_alloc_ops[311] = { + 58, 56, 65, 85, 83, 70, 33, 58, 69, 32, + 70, 88, 58, 81, 98, 91, 57, 32, 42, 88, + 84, 93, 80, 89, 34, 83, 86, 48, 32, 70, + 77, 72, 56, 50, 81, 59, 95, 69, 96, 38, + 44, 97, 74, 64, 85, 53, 85, 78, 58, 48, + 61, 91, 89, 57, 68, 61, 64, 74, 46, 34, + 48, 82, 86, 93, 37, 66, 59, 50, 47, 36, + 79, 33, 71, 43, 63, 80, 57, 87, 65, 76, + 59, 81, 50, 85, 75, 93, 95, 45, 61, 55, + 32, 52, 68, 62, 97, 34, 65, 88, 97, 85, + 88, 39, 44, 39, 55, 45, 40, 50, 44, 96, + 94, 99, 91, 84, 48, 54, 35, 76, 91, 47, + 59, 34, 69, 78, 71, 67, 81, 91, 43, 78, + 41, 47, 49, 65, 77, 62, 31, 56, 50, 94, + 40, 48, 42, 96, 63, 33, 42, 99, 81, 67, + 74, 65, 83, 47, 46, 44, 41, 46, 50, 42, + 31, 38, 79, 85, 47, 65, 94, 73, 49, 96, + 30, 95, 59, 50, 32, 94, 71, 89, 85, 94, + 83, 80, 68, 41, 84, 42, 64, 72, 96, 34, + 67, 58, 79, 87, 80, 57, 95, 67, 99, 38, + 81, 93, 65, 67, 35, 61, 80, 81, 59, 72, + 46, 49, 39, 64, 51, 66, 36, 72, 78, 46, + 61, 99, 32, 74, 78, 68, 34, 91, 65, 89, + 74, 37, 38, 76, 30, 68, 58, 36, 39, 92, + 73, 41, 57, 68, 68, 61, 64, 71, 58, 42, + 36, 53, 58, 82, 67, 78, 59, 75, 96, 64, + 92, 68, 89, 75, 73, 97, 72, 67, 32, 85, + 47, 61, 36, 43, 86, 43, 68, 99, 43, 87, + 39, 66, 78, 94, 60, 45, 35, 98, 36, 76, + 91, 98, 87, 41, 35, 85, 55, 93, 60, 59, + 34, 96, 86, 44, 84, 50, 89, 81, 56, 88, + 74 +}; + +static size_t num_free_ops[257] = { + 94, 51, 88, 47, 51, 76, 99, 47, 48, 96, + 74, 61, 51, 40, 76, 31, 41, 61, 93, 55, + 78, 87, 83, 35, 35, 59, 58, 86, 97, 80, + 35, 44, 83, 30, 98, 35, 71, 55, 54, 93, + 95, 78, 49, 51, 89, 42, 85, 81, 47, 82, + 32, 40, 38, 52, 98, 30, 86, 91, 91, 84, + 65, 62, 93, 33, 93, 67, 59, 81, 96, 91, + 70, 69, 42, 81, 94, 80, 66, 58, 71, 35, + 40, 89, 42, 45, 68, 91, 40, 33, 57, 42, + 61, 55, 54, 74, 88, 60, 84, 32, 49, 92, + 69, 41, 82, 38, 93, 32, 74, 67, 32, 40, + 35, 90, 99, 81, 43, 51, 92, 72, 49, 90, + 54, 58, 88, 62, 66, 30, 52, 82, 84, 99, + 58, 77, 95, 79, 50, 32, 45, 31, 98, 45, + 38, 96, 37, 40, 69, 58, 65, 79, 44, 66, + 60, 45, 83, 40, 55, 62, 58, 33, 39, 64, + 56, 53, 64, 95, 47, 70, 73, 75, 98, 41, + 77, 91, 32, 56, 35, 77, 73, 93, 60, 32, + 47, 45, 30, 88, 68, 43, 32, 89, 57, 44, + 38, 42, 52, 88, 65, 42, 40, 55, 65, 47, + 31, 35, 64, 88, 63, 59, 61, 84, 52, 40, + 67, 97, 92, 61, 93, 30, 87, 96, 96, 93, + 76, 47, 43, 41, 49, 83, 69, 52, 82, 54, + 50, 57, 79, 62, 85, 49, 98, 66, 34, 34, + 65, 34, 44, 38, 87, 69, 82, 41, 74, 59, + 97, 40, 56, 66, 91, 64, 93 +}; + +static size_t primes[] = { + 7, 11, 13, 17, 19, 23, 29, + 31, 37, 41, 43, 47, 53, 59, + 61, 67, 71, 73, 79, 83, 89, 97, + 101, 103, 107, 109, 113, 127, + 131, 137, 139, 149, 151, 157, + 163, 167, 173, 179, 181, 191, + 193, 197, 199 +}; + +#if defined(_WIN32) +#include <windows.h> +#include <psapi.h> +#elif defined(__APPLE__) +#include <mach/mach.h> +#include <mach/task.h> +#else +#include <unistd.h> +#include <sys/resource.h> +#endif + +int +benchmark_run(int argc, char** argv); + +static size_t +get_process_memory_usage(void) { +#if defined(_WIN32) + PROCESS_MEMORY_COUNTERS counters; + memset(&counters, 0, sizeof(counters)); + counters.cb = sizeof(counters); + GetProcessMemoryInfo(GetCurrentProcess(), &counters, sizeof(counters)); + return counters.WorkingSetSize; +#elif defined(__APPLE__) + struct task_basic_info info; + mach_msg_type_number_t info_count = TASK_BASIC_INFO_COUNT; + if (task_info(mach_task_self(), TASK_BASIC_INFO, + (task_info_t)&info, &info_count) != KERN_SUCCESS) + return 0; + return info.resident_size; +#else + long rss = 0L; + FILE* fp = fopen("/proc/self/statm", "r"); + if (!fp) + return 0; + if (fscanf(fp, "%*s%ld", &rss) != 1) + rss = 0; + fclose(fp); + return (size_t)rss * (size_t)sysconf(_SC_PAGESIZE); +#endif +} + +static size_t +get_process_peak_memory_usage(void) { +#if defined(_WIN32) + PROCESS_MEMORY_COUNTERS counters; + memset(&counters, 0, sizeof(counters)); + counters.cb = sizeof(counters); + GetProcessMemoryInfo(GetCurrentProcess(), &counters, sizeof(counters)); + return counters.PeakWorkingSetSize; +#else + struct rusage rusage; + getrusage(RUSAGE_SELF, &rusage); +#if defined(__APPLE__) + return (size_t)rusage.ru_maxrss; +#else + return (size_t)rusage.ru_maxrss * 1024; +#endif +#endif +} + +static void +put_cross_thread_memory(atomicptr_t* ptr, thread_pointers* pointers) { + void* prev; + uintptr_t newval; + do { + prev = atomic_load_ptr(ptr); + pointers->next = (void*)((uintptr_t)prev & ~(uintptr_t)0xF); + newval = (uintptr_t)pointers | (atomic_incr32(&cross_thread_counter) & 0xF); + } while (!atomic_cas_ptr(ptr, (void*)newval, prev)); +} + +static thread_pointers* +get_cross_thread_memory(atomicptr_t* ptr) { + void* prev; + thread_pointers* current; + do { + prev = atomic_load_ptr(ptr); + current = (void*)((uintptr_t)prev & ~(uintptr_t)0xF); + } while (current && !atomic_cas_ptr(ptr, (void*)((uintptr_t)atomic_incr32(&cross_thread_counter) & 0xF), prev)); + return current; +} + +static void +benchmark_worker(void* argptr) { + benchmark_arg* arg = argptr; + thread_pointers* foreign = 0; + void** pointers; + const size_t random_size_count = (sizeof(random_size) / sizeof(random_size[0])); + const size_t alloc_ops_count = (sizeof(num_alloc_ops) / sizeof(num_alloc_ops[0])); + const size_t free_ops_count = (sizeof(num_free_ops) / sizeof(num_free_ops[0])); + const size_t alignment[3] = { 0, 8, 16 }; + + size_t alloc_idx = 0; + size_t free_idx = 0; + size_t iop; + uint64_t tick_start, ticks_elapsed; + int32_t allocated; + size_t cross_index = 0; + int aborted = 0; + + benchmark_thread_initialize(); + + size_t pointers_size = sizeof(void*) * arg->alloc_count; + pointers = benchmark_malloc(16, pointers_size); + memset(pointers, 0, pointers_size); + atomic_add32(&arg->allocated, (int32_t)pointers_size); + + while (!benchmark_start) + thread_sleep(10); + + arg->ticks = 0; + arg->mops = 0; + for (size_t iter = 0; iter < 2; ++iter) { + size_t size_index = ((arg->index + 1) * ((iter + 1) * 37)) % random_size_count; + + uint64_t iter_ticks_elapsed = 0; + int do_foreign = 1; + + for (size_t iloop = 0; iloop < arg->loop_count; ++iloop) { + + foreign = get_cross_thread_memory(&arg->foreign); + + allocated = 0; + tick_start = timer_current(); + + const size_t free_op_count = num_free_ops[(iter + iloop) % free_ops_count]; + const size_t alloc_op_count = num_alloc_ops[(iter + iloop) % alloc_ops_count]; + + for (iop = 0; iop < free_op_count; ++iop) { + if (pointers[free_idx]) { + allocated -= *(int32_t*)pointers[free_idx]; + benchmark_free(pointers[free_idx]); + ++arg->mops; + pointers[free_idx] = 0; + } + + free_idx = (free_idx + free_scatter) % arg->alloc_count; + } + + while (foreign) { + int32_t foreign_allocated = 0; + for (iop = 0; iop < foreign->count; ++iop) { + foreign_allocated -= *(int32_t*)foreign->pointers[iop]; + benchmark_free(foreign->pointers[iop]); + ++arg->mops; + } + + void* next = foreign->next; + foreign_allocated -= (int32_t)(foreign->count * sizeof(void*) + sizeof(thread_pointers)); + atomic_add32(foreign->allocated, foreign_allocated); + benchmark_free(foreign->pointers); + benchmark_free(foreign); + arg->mops += 2; + foreign = next; + } + + for (iop = 0; iop < alloc_op_count; ++iop) { + if (pointers[alloc_idx]) { + allocated -= *(int32_t*)pointers[alloc_idx]; + benchmark_free(pointers[alloc_idx]); + ++arg->mops; + } + size_t size = arg->min_size; + if (arg->mode == MODE_RANDOM) + size = random_size_arr[(size_index + 2) % random_size_count]; + pointers[alloc_idx] = benchmark_malloc((size < 4096) ? alignment[(size_index + iop) % 3] : 0, size); + //Make sure to write to each page to commit it for measuring memory usage + *(int32_t*)pointers[alloc_idx] = (int32_t)size; + size_t num_pages = (size - 1) / 4096; + for (size_t page = 1; page < num_pages; ++page) + *((char*)(pointers[alloc_idx]) + (page * 4096)) = 1; + *((char*)(pointers[alloc_idx]) + (size - 1)) = 1; + allocated += (int32_t)size; + ++arg->mops; + + alloc_idx = (alloc_idx + alloc_scatter) % arg->alloc_count; + size_index = (size_index + 1) % random_size_count; + } + + foreign = 0; + if (arg->cross_rate && ((iloop % arg->cross_rate) == 0) && (do_foreign > 0)) { + foreign = benchmark_malloc(16, sizeof(thread_pointers)); + foreign->count = alloc_op_count; + foreign->pointers = benchmark_malloc(16, sizeof(void*) * alloc_op_count); + foreign->allocated = &arg->allocated; + allocated += (int32_t)(alloc_op_count * sizeof(void*) + sizeof(thread_pointers)); + arg->mops += 2; + + for (iop = 0; iop < alloc_op_count; ++iop) { + size_t size = arg->min_size; + if (arg->mode == MODE_RANDOM) + size = random_size_arr[(size_index + 2) % random_size_count]; + foreign->pointers[iop] = benchmark_malloc((size < 4096) ? alignment[(size_index + iop) % 3] : 0, size); + *(int32_t*)foreign->pointers[iop] = (int32_t)size; + size_t num_pages = (size - 1) / 4096; + for (size_t page = 1; page < num_pages; ++page) + *((char*)(foreign->pointers[iop]) + (page * 4096)) = 1; + *((char*)(foreign->pointers[iop]) + (size - 1)) = 1; + allocated += (int32_t)size; + ++arg->mops; + + size_index = (size_index + 1) % random_size_count; + } + } + + ticks_elapsed = timer_current() - tick_start; + iter_ticks_elapsed += ticks_elapsed; + arg->ticks += ticks_elapsed; + + int32_t current_allocated = atomic_add32(&arg->allocated, allocated); + if (arg->peak_allocated < current_allocated) + arg->peak_allocated = current_allocated; + + if (foreign) { + cross_index = (cross_index + 1) % arg->numthreads; + if ((arg->numthreads > 1) && (cross_index == arg->index)) + cross_index = (cross_index + 1) % arg->numthreads; + benchmark_arg* cross_arg = &arg->args[cross_index]; + put_cross_thread_memory(&cross_arg->foreign, foreign); + foreign = 0; + } + + if (atomic_load32(&benchmark_threads_sync) > 0) + do_foreign = 0; //one thread completed + + if (timer_ticks_to_seconds(iter_ticks_elapsed) > 120) { + aborted = 1; + break; + } + } + + /* + allocated = 0; + tick_start = timer_current(); + for (size_t iptr = 0; iptr < arg->alloc_count; ++iptr) { + if (!pointers[iptr]) { + size_t size = arg->min_size; + if (arg->mode == MODE_RANDOM) + size = random_size_exp[(size_index + 2) % random_size_count]; + pointers[iptr] = benchmark_malloc((size < 4096) ? alignment[size_index % 3] : 0, size); + *(int32_t*)pointers[iptr] = (int32_t)size; + size_t num_pages = (size - 1) / 4096; + for (size_t page = 1; page < num_pages; ++page) + *((char*)(pointers[iptr]) + (page * 4096)) = 1; + *((char*)(pointers[iptr]) + (size - 1)) = 1; + allocated += (int32_t)size; + ++arg->mops; + + size_index = (size_index + 1) % random_size_count; + } + } + ticks_elapsed = timer_current() - tick_start; + + atomic_add32(&arg->allocated, allocated); + + iter_ticks_elapsed += ticks_elapsed; + arg->ticks += ticks_elapsed; + */ + + //Sync and allow main thread to gather allocation stats + atomic_incr32(&benchmark_threads_sync); + do { + foreign = get_cross_thread_memory(&arg->foreign); + if (foreign) { + tick_start = timer_current(); + while (foreign) { + allocated = 0; + for (iop = 0; iop < foreign->count; ++iop) { + allocated -= *(int32_t*)foreign->pointers[iop]; + benchmark_free(foreign->pointers[iop]); + ++arg->mops; + } + + void* next = foreign->next; + allocated -= (int32_t)(foreign->count * sizeof(void*) + sizeof(thread_pointers)); + atomic_add32(foreign->allocated, allocated); + benchmark_free(foreign->pointers); + benchmark_free(foreign); + arg->mops += 2; + foreign = next; + } + ticks_elapsed = timer_current() - tick_start; + arg->ticks += ticks_elapsed; + } + + thread_sleep(1); + thread_fence(); + } while (atomic_load32(&benchmark_threads_sync)); + + allocated = 0; + tick_start = timer_current(); + for (size_t iptr = 0; iptr < arg->alloc_count; ++iptr) { + if (pointers[iptr]) { + allocated -= *(int32_t*)pointers[iptr]; + benchmark_free(pointers[iptr]); + ++arg->mops; + pointers[iptr] = 0; + } + } + ticks_elapsed = timer_current() - tick_start; + atomic_add32(&arg->allocated, allocated); + + iter_ticks_elapsed += ticks_elapsed; + arg->ticks += ticks_elapsed; + + thread_sleep(10); + + foreign = get_cross_thread_memory(&arg->foreign); + while (foreign) { + for (iop = 0; iop < foreign->count; ++iop) + benchmark_free(foreign->pointers[iop]); + + void* next = foreign->next; + benchmark_free(foreign->pointers); + benchmark_free(foreign); + foreign = next; + } + + printf("."); + fflush(stdout); + + //printf(" %.2f ", timer_ticks_to_seconds(iter_ticks_elapsed)); + //if (aborted) + // printf("(aborted) "); + //fflush(stdout); + aborted = 0; + } + + //Sync threads + thread_sleep(1000); + thread_fence(); + atomic_incr32(&benchmark_threads_sync); + do { + foreign = get_cross_thread_memory(&arg->foreign); + if (foreign) { + tick_start = timer_current(); + while (foreign) { + allocated = 0; + for (iop = 0; iop < foreign->count; ++iop) { + allocated -= *(int32_t*)foreign->pointers[iop]; + benchmark_free(foreign->pointers[iop]); + ++arg->mops; + } + + void* next = foreign->next; + allocated -= (int32_t)(foreign->count * sizeof(void*) + sizeof(thread_pointers)); + atomic_add32(foreign->allocated, allocated); + benchmark_free(foreign->pointers); + benchmark_free(foreign); + arg->mops += 2; + foreign = next; + } + ticks_elapsed = timer_current() - tick_start; + arg->ticks += ticks_elapsed; + } + + thread_sleep(1); + thread_fence(); + } while (atomic_load32(&benchmark_threads_sync)); + + benchmark_free(pointers); + atomic_add32(&arg->allocated, -(int32_t)pointers_size); + + benchmark_thread_finalize(); + + arg->accumulator += arg->mops; + + thread_exit(0); +} + +int +benchmark_run(int argc, char** argv) { + + if (timer_initialize() < 0) + return -1; + if (benchmark_initialize() < 0) + return -2; + +/** + if ((argc < 9) || (argc > 10)) { + printf("Usage: benchmark <thread count> <mode> <size mode> <cross rate> <loops> <allocs> <op count> <min size> <max size>\n" + " <thread count> Number of execution threads\n" + " <mode> 0 for random size [min, max], 1 for fixed size (min)\n" + " <size mode> 0 for even distribution, 1 for linear dropoff, 2 for exp dropoff\n" + " <cross rate> Rate of cross-thread deallocations (every n iterations), 0 for none\n" + " <loops> Number of loops in each iteration (0 for default, 800k)\n" + " <allocs> Number of concurrent allocations in each thread, (0 for default, 10k)\n" + " <op count> Iteration operation count\n" + " <min size> Minimum size for random mode, fixed size for fixed mode\n" + " <max size> Maximum size for random mode, ignored for fixed mode\n"); + return -3; + } +**/ + +// size_t thread_count = (size_t)strtol(argv[1], 0, 10); +// size_t mode = (size_t)strtol(argv[2], 0, 10); +// size_t size_mode = (size_t)strtol(argv[3], 0, 10); +// size_t cross_rate = (size_t)strtol(argv[4], 0, 10); +// size_t loop_count = (size_t)strtol(argv[5], 0, 10); +// size_t alloc_count = (size_t)strtol(argv[6], 0, 10); +// size_t op_count = (size_t)strtol(argv[7], 0, 10); +// size_t min_size = (size_t)strtol(argv[8], 0, 10); +// size_t max_size = (argc > 9) ? (size_t)strtol(argv[9], 0, 10) : 0; + + size_t thread_count = 1; + + size_t mode = 0; // rand + size_t size_mode = 0; // + size_t cross_rate = 0; + size_t loop_count = 0; + size_t alloc_count = 0; + size_t op_count = 0; + size_t min_size = 16; + size_t max_size = 1024; + +// if ((thread_count < 1) || (thread_count > 64)) { +// printf("Invalid thread count: %s\n", argv[1]); +// return -3; +// } + +// if ((mode != MODE_RANDOM) && (mode != MODE_FIXED)) { +// printf("Invalid mode: %s\n", argv[2]); +// return -3; +// } + +// if ((size_mode != SIZE_MODE_EVEN) && (size_mode != SIZE_MODE_LINEAR) && (size_mode != SIZE_MODE_EXP)) { +// printf("Invalid size mode: %s\n", argv[3]); +// return -3; +// } + + if (!loop_count || (loop_count > 0x00FFFFFF)) + loop_count = 32*1024; + + if (!alloc_count || (alloc_count > 0x00FFFFFF)) + alloc_count = 10*1024; + + if (!op_count || (op_count > 0x00FFFFFF)) + op_count = 1000; + +// if ((mode == MODE_RANDOM) && (!max_size || (max_size < min_size))) { +// printf("Invalid min/max size for random mode: %s %s\n", argv[7], (argc > 8) ? argv[8] : "<missing>"); +// printf("Invalid min/max size for random mode: max_size%u min_size %u\n", max_size, min_size ); +// return -3; +// } + +// if ((mode == MODE_FIXED) && !min_size) { +// printf("Invalid size for fixed mode: %s\n", argv[7]); +// return -3; +// } + + if (thread_count == 1) + cross_rate = 0; + + size_t iprime = 0; + alloc_scatter = primes[iprime]; + while ((alloc_count % alloc_scatter) == 0) + alloc_scatter = primes[++iprime]; + free_scatter = primes[++iprime]; + while ((alloc_count % free_scatter) == 0) + free_scatter = primes[++iprime]; + + //Setup the random size tables + size_t size_range = max_size - min_size; + const size_t random_size_count = (sizeof(random_size) / sizeof(random_size[0])); + for (size_t ir = 0; ir < random_size_count; ++ir) + random_size[ir] = min_size + (size_t)round((double)size_range * ((double)random_size[ir] / 100000.0)); + + if (!size_range) + ++size_range; + for (size_t ir = 0; ir < random_size_count; ++ir) { + double w0 = 1.0 - (double)(random_size[ir] - min_size) / (double)size_range; + double w1 = 1.0 - (double)(random_size[(ir + 1) % random_size_count] - min_size) / (double)size_range; + double even = (double)(random_size[(ir + 2) % random_size_count] - min_size); + random_size_lin[ir] = min_size + (size_t)(even * fabs((w0 + w1) - 1.0)); + random_size_exp[ir] = min_size + (size_t)(even * (w0 * w1)); + } + + //Setup operation count + size_t alloc_op_count = (sizeof(num_alloc_ops) / sizeof(num_alloc_ops[0])); + for (size_t ic = 0; ic < alloc_op_count; ++ic) + num_alloc_ops[ic] = (size_t)((double)op_count * ((double)num_alloc_ops[ic] / 100.0)); + size_t free_op_count = (sizeof(num_free_ops) / sizeof(num_free_ops[0])); + for (size_t ic = 0; ic < free_op_count; ++ic) + num_free_ops[ic] = (size_t)(0.8 * (double)op_count * ((double)num_free_ops[ic] / 100.0)); + + if (size_mode == SIZE_MODE_EVEN) + random_size_arr = random_size; + if (size_mode == SIZE_MODE_LINEAR) + random_size_arr = random_size_lin; + if (size_mode == SIZE_MODE_EXP) + random_size_arr = random_size_exp; + + benchmark_arg* arg; + uintptr_t* thread_handle; + + arg = benchmark_malloc(0, sizeof(benchmark_arg) * thread_count); + thread_handle = benchmark_malloc(0, sizeof(thread_handle) * thread_count); + + benchmark_start = 0; + + if (mode == MODE_RANDOM) + printf("%-12s %u threads random %s size [%u,%u] %u loops %u allocs %u ops: ", + benchmark_name(), + (unsigned int)thread_count, + (size_mode == SIZE_MODE_EVEN) ? "even" : ((size_mode == SIZE_MODE_LINEAR) ? "linear" : "exp"), + (unsigned int)min_size, (unsigned int)max_size, + (unsigned int)loop_count, (unsigned int)alloc_count, (unsigned int)op_count); + else + printf("%-12s %u threads fixed size [%u] %u loops %u allocs %u ops: ", + benchmark_name(), + (unsigned int)thread_count, + (unsigned int)min_size, + (unsigned int)loop_count, (unsigned int)alloc_count, (unsigned int)op_count); + fflush(stdout); + + size_t memory_usage = 0; + size_t cur_memory_usage = 0; + size_t sample_allocated = 0; + size_t cur_allocated = 0; + uint64_t mops = 0; + uint64_t ticks = 0; + + for (size_t iter = 0; iter < 2; ++iter) { + benchmark_start = 0; + atomic_store32(&benchmark_threads_sync, 0); + thread_fence(); + + for (size_t ithread = 0; ithread < thread_count; ++ithread) { + arg[ithread].numthreads = thread_count; + arg[ithread].index = ithread; + arg[ithread].mode = mode; + arg[ithread].size_mode = size_mode; + arg[ithread].cross_rate = cross_rate; + arg[ithread].loop_count = loop_count; + arg[ithread].alloc_count = alloc_count; + arg[ithread].min_size = min_size; + arg[ithread].max_size = max_size; + arg[ithread].thread_arg.fn = benchmark_worker; + arg[ithread].thread_arg.arg = &arg[ithread]; + atomic_store_ptr(&arg[ithread].foreign, 0); + atomic_store32(&arg[ithread].allocated, 0); + arg[ithread].peak_allocated = 0; + arg[ithread].args = arg; + thread_fence(); + thread_handle[ithread] = thread_run(&arg[ithread].thread_arg); + } + + thread_sleep(1000); + + benchmark_start = 1; + thread_fence(); + + while (atomic_load32(&benchmark_threads_sync) < (int32_t)thread_count) { + thread_sleep(1000); + thread_fence(); + } + thread_sleep(1000); + thread_fence(); + + cur_allocated = 0; + for (size_t ithread = 0; ithread < thread_count; ++ithread) { + size_t thread_allocated = (size_t)atomic_load32(&arg[ithread].allocated); + cur_allocated += thread_allocated; + } + cur_memory_usage = get_process_memory_usage(); + if ((cur_allocated > sample_allocated) || (cur_memory_usage > memory_usage)) { + sample_allocated = cur_allocated; + memory_usage = cur_memory_usage; + } + + atomic_store32(&benchmark_threads_sync, 0); + thread_fence(); + + thread_sleep(1000); + while (atomic_load32(&benchmark_threads_sync) < (int32_t)thread_count) { + thread_sleep(1000); + thread_fence(); + } + thread_sleep(1000); + thread_fence(); + + cur_allocated = 0; + for (size_t ithread = 0; ithread < thread_count; ++ithread) { + size_t thread_allocated = (size_t)atomic_load32(&arg[ithread].allocated); + cur_allocated += thread_allocated; + } + cur_memory_usage = get_process_memory_usage(); + if ((cur_allocated > sample_allocated) || (cur_memory_usage > memory_usage)) { + sample_allocated = cur_allocated; + memory_usage = cur_memory_usage; + } + + atomic_store32(&benchmark_threads_sync, 0); + thread_fence(); + + thread_sleep(1000); + while (atomic_load32(&benchmark_threads_sync) < (int32_t)thread_count) { + thread_sleep(1000); + thread_fence(); + } + thread_sleep(1000); + thread_fence(); + + atomic_store32(&benchmark_threads_sync, 0); + thread_fence(); + + for (size_t ithread = 0; ithread < thread_count; ++ithread) { + thread_join(thread_handle[ithread]); + ticks += arg[ithread].ticks; + mops += arg[ithread].mops; + if (!arg[ithread].accumulator) + exit(-1); + } + } + + if (!ticks) + ticks = 1; + + benchmark_free(thread_handle); + benchmark_free(arg); + + FILE* fd; + char filebuf[64]; + if (mode == 0) + sprintf(filebuf, "benchmark-random-%u-%u-%u-%s.txt", + (unsigned int)thread_count, (unsigned int)min_size, + (unsigned int)max_size, benchmark_name()); + else + sprintf(filebuf, "benchmark-fixed-%u-%u-%s.txt", + (unsigned int)thread_count, (unsigned int)min_size, + benchmark_name()); + fd = fopen(filebuf, "w+b"); + + size_t peak_allocated = get_process_peak_memory_usage(); + double time_elapsed = timer_ticks_to_seconds(ticks); + double average_mops = (double)mops / time_elapsed; + char linebuf[128]; + int len = snprintf(linebuf, sizeof(linebuf), "%u,%" PRIsize ",%" PRIsize ",%" PRIsize "\n", + (unsigned int)average_mops, + peak_allocated, + sample_allocated, + memory_usage); + if (fd) { + fwrite(linebuf, (len > 0) ? (size_t)len : 0, 1, fd); + fflush(fd); + } + + printf("%u memory ops/CPU second (%uMiB peak, %uMiB -> %uMiB bytes sample, %.0f%% overhead)\n", + (unsigned int)average_mops, (unsigned int)(peak_allocated / (1024 * 1024)), + (unsigned int)(sample_allocated / (1024 * 1024)), (unsigned int)(memory_usage / (1024 * 1024)), + 100.0 * ((double)memory_usage - (double)sample_allocated) / (double)sample_allocated); + fflush(stdout); + + if (fd) + fclose(fd); + + if (benchmark_finalize() < 0) + return -4; + + return 0; +} + +#if ( defined( __APPLE__ ) && __APPLE__ ) +# include <TargetConditionals.h> +# if defined( __IPHONE__ ) || ( defined( TARGET_OS_IPHONE ) && TARGET_OS_IPHONE ) || ( defined( TARGET_IPHONE_SIMULATOR ) && TARGET_IPHONE_SIMULATOR ) +# define NO_MAIN 1 +# endif +#endif + +#if !defined(NO_MAIN) + +int main(int argc, char** argv) { + return benchmark_run(argc, argv); +} + +#endif diff --git a/libdap/test/rpmalloc/test/atomic.h b/libdap/test/rpmalloc/test/atomic.h new file mode 100644 index 0000000000000000000000000000000000000000..7b49a58d7508e47b7de42f7f737b8aeb7f01735e --- /dev/null +++ b/libdap/test/rpmalloc/test/atomic.h @@ -0,0 +1,82 @@ + +#include <stdint.h> + +#if defined( __x86_64__ ) || defined( _M_AMD64 ) || defined( _M_X64 ) || defined( _AMD64_ ) || defined( __arm64__ ) || defined( __aarch64__ ) +# define ARCH_64BIT 1 +#else +# define ARCH_64BIT 0 +#endif + +#ifdef _MSC_VER +# define ALIGNED_STRUCT(name, alignment) __declspec(align(alignment)) struct name +#else +# define ALIGNED_STRUCT(name, alignment) struct __attribute__((__aligned__(alignment))) name +#endif + +ALIGNED_STRUCT(atomicptr_t, 8) { + void* nonatomic; +}; +typedef struct atomicptr_t atomicptr_t; + +static void* +atomic_load_ptr(atomicptr_t* src) { + return src->nonatomic; +} + +static void +atomic_store_ptr(atomicptr_t* dst, void* val) { + dst->nonatomic = val; +} + +ALIGNED_STRUCT(atomic32_t, 4) { + int32_t nonatomic; +}; +typedef struct atomic32_t atomic32_t; + +static int32_t +atomic_load32(atomic32_t* src) { + return src->nonatomic; +} + +static void +atomic_store32(atomic32_t* dst, int32_t val) { + dst->nonatomic = val; +} + +static int32_t +atomic_incr32(atomic32_t* val) { +#ifdef _MSC_VER + int32_t old = (int32_t)_InterlockedExchangeAdd((volatile long*)&val->nonatomic, 1); + return (old + 1); +#else + return __sync_add_and_fetch(&val->nonatomic, 1); +#endif +} + +static int32_t +atomic_add32(atomic32_t* val, int32_t add) { +#ifdef _MSC_VER + int32_t old = (int32_t)_InterlockedExchangeAdd((volatile long*)&val->nonatomic, add); + return (old + add); +#else + return __sync_add_and_fetch(&val->nonatomic, add); +#endif +} + +static int +atomic_cas_ptr(atomicptr_t* dst, void* val, void* ref) { +#ifdef _MSC_VER +# if ARCH_64BIT + return (_InterlockedCompareExchange64((volatile long long*)&dst->nonatomic, + (long long)val, (long long)ref) == (long long)ref) ? 1 : 0; +# else + return (_InterlockedCompareExchange((volatile long*)&dst->nonatomic, + (long)val, (long)ref) == (long)ref) ? 1 : 0; +# endif +#else + return __sync_bool_compare_and_swap(&dst->nonatomic, ref, val); +#endif +} + +#undef ARCH_64BIT +#undef ALIGNED_STRUCT diff --git a/libdap/test/rpmalloc/test/main.c b/libdap/test/rpmalloc/test/main.c new file mode 100644 index 0000000000000000000000000000000000000000..f8fccef20dfb68072c7381ba149226f7367be704 --- /dev/null +++ b/libdap/test/rpmalloc/test/main.c @@ -0,0 +1,839 @@ + +#if defined(_WIN32) && !defined(_CRT_SECURE_NO_WARNINGS) +# define _CRT_SECURE_NO_WARNINGS +#endif + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + +#include <stdint.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <math.h> + +#include <rpmalloc.h> +#include <pthread.h> +#include "thread.h" + +#include <sched.h> +#include <test.h> + +#define pointer_offset(ptr, ofs) (void*)((char*)(ptr) + (ptrdiff_t)(ofs)) +#define pointer_diff(first, second) (ptrdiff_t)((const char*)(first) - (const char*)(second)) + +static size_t _hardware_threads; + +static void +test_initialize(void); + +static int +test_fail(const char* reason) { + fprintf(stderr, "FAIL: %s\n", reason); + return -1; +} + +static int +test_alloc(void) { + unsigned int iloop = 0; + unsigned int ipass = 0; + unsigned int icheck = 0; + unsigned int id = 0; + void* addr[8142]; + char data[20000]; + unsigned int datasize[7] = { 473, 39, 195, 24, 73, 376, 245 }; + + rpmalloc_initialize(); + + for (id = 0; id < 20000; ++id) + data[id] = (char)(id % 139 + id % 17); + + //Verify that blocks are 16 byte size aligned + void* testptr = rpmalloc(16); + if (rpmalloc_usable_size(testptr) != 16) + return test_fail("Bad base alloc usable size"); + rpfree(testptr); + testptr = rpmalloc(32); + if (rpmalloc_usable_size(testptr) != 32) + return test_fail("Bad base alloc usable size"); + rpfree(testptr); + testptr = rpmalloc(128); + if (rpmalloc_usable_size(testptr) != 128) + return test_fail("Bad base alloc usable size"); + rpfree(testptr); + for (iloop = 0; iloop <= 1024; ++iloop) { + testptr = rpmalloc(iloop); + size_t wanted_usable_size = 16 * ((iloop / 16) + ((!iloop || (iloop % 16)) ? 1 : 0)); + if (rpmalloc_usable_size(testptr) != wanted_usable_size) + return test_fail("Bad base alloc usable size"); + rpfree(testptr); + } + + //Verify medium block sizes (until class merging kicks in) + for (iloop = 1025; iloop <= 6000; ++iloop) { + testptr = rpmalloc(iloop); + size_t wanted_usable_size = 512 * ((iloop / 512) + ((iloop % 512) ? 1 : 0)); + if (rpmalloc_usable_size(testptr) != wanted_usable_size) + return test_fail("Bad medium alloc usable size"); + rpfree(testptr); + } + + //Large reallocation test + testptr = rpmalloc(253000); + testptr = rprealloc(testptr, 151); + if (rpmalloc_usable_size(testptr) != 160) + return test_fail("Bad usable size"); + if (rpmalloc_usable_size(pointer_offset(testptr, 16)) != 144) + return test_fail("Bad offset usable size"); + rpfree(testptr); + + //Reallocation tests + for (iloop = 1; iloop < 24; ++iloop) { + size_t size = 37 * iloop; + testptr = rpmalloc(size); + *((uintptr_t*)testptr) = 0x12345678; + size_t wanted_usable_size = 16 * ((size / 16) + ((size % 16) ? 1 : 0)); + if (rpmalloc_usable_size(testptr) != wanted_usable_size) + return test_fail("Bad usable size (alloc)"); + testptr = rprealloc(testptr, size + 16); + if (rpmalloc_usable_size(testptr) < (wanted_usable_size + 16)) + return test_fail("Bad usable size (realloc)"); + if (*((uintptr_t*)testptr) != 0x12345678) + return test_fail("Data not preserved on realloc"); + rpfree(testptr); + + testptr = rpaligned_alloc(128, size); + *((uintptr_t*)testptr) = 0x12345678; + wanted_usable_size = 16 * ((size / 16) + ((size % 16) ? 1 : 0)); + if (rpmalloc_usable_size(testptr) < wanted_usable_size) + return test_fail("Bad usable size (aligned alloc)"); + if (rpmalloc_usable_size(testptr) > (wanted_usable_size + 128)) + return test_fail("Bad usable size (aligned alloc)"); + testptr = rpaligned_realloc(testptr, 128, size + 32, 0, 0); + if (rpmalloc_usable_size(testptr) < (wanted_usable_size + 32)) + return test_fail("Bad usable size (aligned realloc)"); + if (*((uintptr_t*)testptr) != 0x12345678) + return test_fail("Data not preserved on realloc"); + void* unaligned = rprealloc(testptr, size); + if (unaligned != testptr) { + ptrdiff_t diff = pointer_diff(testptr, unaligned); + if (diff < 0) + return test_fail("Bad realloc behaviour"); + if (diff >= 128) + return test_fail("Bad realloc behaviour"); + } + rpfree(testptr); + } + + static size_t alignment[3] = { 0, 64, 256 }; + for (iloop = 0; iloop < 64; ++iloop) { + for (ipass = 0; ipass < 8142; ++ipass) { + size_t size = iloop + ipass + datasize[(iloop + ipass) % 7]; + char* baseptr = rpaligned_alloc(alignment[ipass % 3], size); + for (size_t ibyte = 0; ibyte < size; ++ibyte) + baseptr[ibyte] = (char)(ibyte & 0xFF); + + size_t resize = (iloop * ipass + datasize[(iloop + ipass) % 7]) & 0x2FF; + size_t capsize = (size > resize ? resize : size); + baseptr = rprealloc(baseptr, resize); + for (size_t ibyte = 0; ibyte < capsize; ++ibyte) { + if (baseptr[ibyte] != (char)(ibyte & 0xFF)) + return test_fail("Data not preserved on realloc"); + } + + size_t alignsize = (iloop * ipass + datasize[(iloop + ipass * 3) % 7]) & 0x2FF; + capsize = (capsize > alignsize ? alignsize : capsize); + baseptr = rpaligned_realloc(baseptr, 128, alignsize, resize, 0); + for (size_t ibyte = 0; ibyte < capsize; ++ibyte) { + if (baseptr[ibyte] != (char)(ibyte & 0xFF)) + return test_fail("Data not preserved on realloc"); + } + + rpfree(baseptr); + } + } + + for (iloop = 0; iloop < 64; ++iloop) { + for (ipass = 0; ipass < 8142; ++ipass) { + addr[ipass] = rpmalloc(500); + if (addr[ipass] == 0) + return test_fail("Allocation failed"); + + memcpy(addr[ipass], data + ipass, 500); + + for (icheck = 0; icheck < ipass; ++icheck) { + if (addr[icheck] == addr[ipass]) + return test_fail("Bad allocation result"); + if (addr[icheck] < addr[ipass]) { + if (pointer_offset(addr[icheck], 500) > addr[ipass]) + return test_fail("Bad allocation result"); + } + else if (addr[icheck] > addr[ipass]) { + if (pointer_offset(addr[ipass], 500) > addr[icheck]) + return test_fail("Bad allocation result"); + } + } + } + + for (ipass = 0; ipass < 8142; ++ipass) { + if (memcmp(addr[ipass], data + ipass, 500)) + return test_fail("Data corruption"); + } + + for (ipass = 0; ipass < 8142; ++ipass) + rpfree(addr[ipass]); + } + + for (iloop = 0; iloop < 64; ++iloop) { + for (ipass = 0; ipass < 1024; ++ipass) { + unsigned int cursize = datasize[ipass%7] + ipass; + + addr[ipass] = rpmalloc(cursize); + if (addr[ipass] == 0) + return test_fail("Allocation failed"); + + memcpy(addr[ipass], data + ipass, cursize); + + for (icheck = 0; icheck < ipass; ++icheck) { + if (addr[icheck] == addr[ipass]) + return test_fail("Identical pointer returned from allocation"); + if (addr[icheck] < addr[ipass]) { + if (pointer_offset(addr[icheck], rpmalloc_usable_size(addr[icheck])) > addr[ipass]) + return test_fail("Invalid pointer inside another block returned from allocation"); + } + else if (addr[icheck] > addr[ipass]) { + if (pointer_offset(addr[ipass], rpmalloc_usable_size(addr[ipass])) > addr[icheck]) + return test_fail("Invalid pointer inside another block returned from allocation"); + } + } + } + + for (ipass = 0; ipass < 1024; ++ipass) { + unsigned int cursize = datasize[ipass%7] + ipass; + if (memcmp(addr[ipass], data + ipass, cursize)) + return test_fail("Data corruption"); + } + + for (ipass = 0; ipass < 1024; ++ipass) + rpfree(addr[ipass]); + } + + for (iloop = 0; iloop < 128; ++iloop) { + for (ipass = 0; ipass < 1024; ++ipass) { + addr[ipass] = rpmalloc(500); + if (addr[ipass] == 0) + return test_fail("Allocation failed"); + + memcpy(addr[ipass], data + ipass, 500); + + for (icheck = 0; icheck < ipass; ++icheck) { + if (addr[icheck] == addr[ipass]) + return test_fail("Identical pointer returned from allocation"); + if (addr[icheck] < addr[ipass]) { + if (pointer_offset(addr[icheck], 500) > addr[ipass]) + return test_fail("Invalid pointer inside another block returned from allocation"); + } + else if (addr[icheck] > addr[ipass]) { + if (pointer_offset(addr[ipass], 500) > addr[icheck]) + return test_fail("Invalid pointer inside another block returned from allocation"); + } + } + } + + for (ipass = 0; ipass < 1024; ++ipass) { + if (memcmp(addr[ipass], data + ipass, 500)) + return test_fail("Data corruption"); + } + + for (ipass = 0; ipass < 1024; ++ipass) + rpfree(addr[ipass]); + } + + rpmalloc_finalize(); + + for (iloop = 0; iloop < 2048; iloop += 16) { + rpmalloc_initialize(); + addr[0] = rpmalloc(iloop); + if (!addr[0]) + return test_fail("Allocation failed"); + rpfree(addr[0]); + rpmalloc_finalize(); + } + + for (iloop = 2048; iloop < (64 * 1024); iloop += 512) { + rpmalloc_initialize(); + addr[0] = rpmalloc(iloop); + if (!addr[0]) + return test_fail("Allocation failed"); + rpfree(addr[0]); + rpmalloc_finalize(); + } + + for (iloop = (64 * 1024); iloop < (2 * 1024 * 1024); iloop += 4096) { + rpmalloc_initialize(); + addr[0] = rpmalloc(iloop); + if (!addr[0]) + return test_fail("Allocation failed"); + rpfree(addr[0]); + rpmalloc_finalize(); + } + + rpmalloc_initialize(); + for (iloop = 0; iloop < (2 * 1024 * 1024); iloop += 16) { + addr[0] = rpmalloc(iloop); + if (!addr[0]) + return test_fail("Allocation failed"); + rpfree(addr[0]); + } + rpmalloc_finalize(); + + printf("Memory allocation tests passed\n"); + + return 0; +} + +static int +test_superalign(void) { + + rpmalloc_initialize(); + + size_t alignment[] = { 2048, 4096, 8192, 16384, 32768 }; + size_t sizes[] = { 187, 1057, 2436, 5234, 9235, 17984, 35783, 72436 }; + + for (size_t ipass = 0; ipass < 8; ++ipass) { + for (size_t iloop = 0; iloop < 4096; ++iloop) { + for (size_t ialign = 0, asize = sizeof(alignment) / sizeof(alignment[0]); ialign < asize; ++ialign) { + for (size_t isize = 0, ssize = sizeof(sizes) / sizeof(sizes[0]); isize < ssize; ++isize) { + size_t alloc_size = sizes[isize] + iloop + ipass; + uint8_t* ptr = rpaligned_alloc(alignment[ialign], alloc_size); + if (!ptr || ((uintptr_t)ptr & (alignment[ialign] - 1))) + return test_fail("Super alignment allocation failed"); + ptr[0] = 1; + ptr[alloc_size - 1] = 1; + rpfree(ptr); + } + } + } + } + + rpmalloc_finalize(); + + printf("Memory super aligned tests passed\n"); + + return 0; +} + +typedef struct _allocator_thread_arg { + unsigned int loops; + unsigned int passes; //max 4096 + unsigned int datasize[32]; + unsigned int num_datasize; //max 32 + void** pointers; + void** crossthread_pointers; +} allocator_thread_arg_t; + +static void +allocator_thread(void* argp) { + allocator_thread_arg_t arg = *(allocator_thread_arg_t*)argp; + unsigned int iloop = 0; + unsigned int ipass = 0; + unsigned int icheck = 0; + unsigned int id = 0; + void** addr; + uint32_t* data; + unsigned int cursize; + unsigned int iwait = 0; + int ret = 0; + + rpmalloc_thread_initialize(); + + addr = rpmalloc(sizeof(void*) * arg.passes); + data = rpmalloc(512 * 1024); + for (id = 0; id < 512 * 1024 / 4; ++id) + data[id] = id; + + thread_sleep(1); + + for (iloop = 0; iloop < arg.loops; ++iloop) { + for (ipass = 0; ipass < arg.passes; ++ipass) { + cursize = 4 + arg.datasize[(iloop + ipass + iwait) % arg.num_datasize] + ((iloop + ipass) % 1024); + + addr[ipass] = rpmalloc(4 + cursize); + if (addr[ipass] == 0) { + ret = test_fail("Allocation failed"); + goto end; + } + + *(uint32_t*)addr[ipass] = (uint32_t)cursize; + memcpy(pointer_offset(addr[ipass], 4), data, cursize); + + for (icheck = 0; icheck < ipass; ++icheck) { + if (addr[icheck] == addr[ipass]) { + ret = test_fail("Identical pointer returned from allocation"); + goto end; + } + if (addr[icheck] < addr[ipass]) { + if (pointer_offset(addr[icheck], *(uint32_t*)addr[icheck] + 4) > addr[ipass]) { + ret = test_fail("Invalid pointer inside another block returned from allocation"); + goto end; + } + } + else if (addr[icheck] > addr[ipass]) { + if (pointer_offset(addr[ipass], *(uint32_t*)addr[ipass] + 4) > addr[icheck]) { + ret = test_fail("Invalid pointer inside another block returned from allocation"); + goto end; + } + } + } + } + + for (ipass = 0; ipass < arg.passes; ++ipass) { + cursize = *(uint32_t*)addr[ipass]; + + if (memcmp(pointer_offset(addr[ipass], 4), data, cursize)) { + ret = test_fail("Data corrupted"); + goto end; + } + + rpfree(addr[ipass]); + } + } + + rpfree(data); + rpfree(addr); + + rpmalloc_thread_finalize(); + +end: + thread_exit((uintptr_t)ret); +} + +static void +crossallocator_thread(void* argp) { + allocator_thread_arg_t arg = *(allocator_thread_arg_t*)argp; + unsigned int iloop = 0; + unsigned int ipass = 0; + unsigned int cursize; + unsigned int iextra = 0; + int ret = 0; + + rpmalloc_thread_initialize(); + + thread_sleep(10); + + size_t next_crossthread = 0; + size_t end_crossthread = arg.loops * arg.passes; + + void** extra_pointers = rpmalloc(sizeof(void*) * arg.loops * arg.passes); + + for (iloop = 0; iloop < arg.loops; ++iloop) { + for (ipass = 0; ipass < arg.passes; ++ipass) { + size_t iarg = (iloop + ipass + iextra++) % arg.num_datasize; + cursize = arg.datasize[iarg] + ((iloop + ipass) % 21); + void* first_addr = rpmalloc(cursize); + if (first_addr == 0) { + ret = test_fail("Allocation failed"); + goto end; + } + + iarg = (iloop + ipass + iextra++) % arg.num_datasize; + cursize = arg.datasize[iarg] + ((iloop + ipass) % 71); + void* second_addr = rpmalloc(cursize); + if (second_addr == 0) { + ret = test_fail("Allocation failed"); + goto end; + } + + iarg = (iloop + ipass + iextra++) % arg.num_datasize; + cursize = arg.datasize[iarg] + ((iloop + ipass) % 17); + void* third_addr = rpmalloc(cursize); + if (third_addr == 0) { + ret = test_fail("Allocation failed"); + goto end; + } + + rpfree(first_addr); + arg.pointers[iloop * arg.passes + ipass] = second_addr; + extra_pointers[iloop * arg.passes + ipass] = third_addr; + + while ((next_crossthread < end_crossthread) && + arg.crossthread_pointers[next_crossthread]) { + rpfree(arg.crossthread_pointers[next_crossthread]); + arg.crossthread_pointers[next_crossthread] = 0; + ++next_crossthread; + } + } + } + + for (iloop = 0; iloop < arg.loops; ++iloop) { + for (ipass = 0; ipass < arg.passes; ++ipass) { + rpfree(extra_pointers[(iloop * arg.passes) + ipass]); + } + } + + rpfree(extra_pointers); + + while (next_crossthread < end_crossthread) { + if (arg.crossthread_pointers[next_crossthread]) { + rpfree(arg.crossthread_pointers[next_crossthread]); + arg.crossthread_pointers[next_crossthread] = 0; + ++next_crossthread; + } else { + thread_yield(); + } + } + +end: + rpmalloc_thread_finalize(); + + thread_exit((uintptr_t)ret); +} + +static void +initfini_thread(void* argp) { + allocator_thread_arg_t arg = *(allocator_thread_arg_t*)argp; + unsigned int iloop = 0; + unsigned int ipass = 0; + unsigned int icheck = 0; + unsigned int id = 0; + void* addr[4096]; + char data[8192]; + unsigned int cursize; + unsigned int iwait = 0; + int ret = 0; + + for (id = 0; id < 8192; ++id) + data[id] = (char)id; + + thread_yield(); + + for (iloop = 0; iloop < arg.loops; ++iloop) { + rpmalloc_thread_initialize(); + + unsigned int max_datasize = 0; + for (ipass = 0; ipass < arg.passes; ++ipass) { + cursize = arg.datasize[(iloop + ipass + iwait) % arg.num_datasize] + ((iloop + ipass) % 1024); + if (cursize > max_datasize) + max_datasize = cursize; + + addr[ipass] = rpmalloc(4 + cursize); + if (addr[ipass] == 0) { + ret = test_fail("Allocation failed"); + goto end; + } + + *(uint32_t*)addr[ipass] = (uint32_t)cursize; + memcpy(pointer_offset(addr[ipass], 4), data, cursize); + + for (icheck = 0; icheck < ipass; ++icheck) { + size_t this_size = *(uint32_t*)addr[ipass]; + size_t check_size = *(uint32_t*)addr[icheck]; + if (this_size != cursize) { + ret = test_fail("Data corrupted in this block (size)"); + goto end; + } + if (check_size > max_datasize) { + ret = test_fail("Data corrupted in previous block (size)"); + goto end; + } + if (addr[icheck] == addr[ipass]) { + ret = test_fail("Identical pointer returned from allocation"); + goto end; + } + if (addr[icheck] < addr[ipass]) { + if (pointer_offset(addr[icheck], check_size + 4) > addr[ipass]) { + ret = test_fail("Invalid pointer inside another block returned from allocation"); + goto end; + } + } + else if (addr[icheck] > addr[ipass]) { + if (pointer_offset(addr[ipass], cursize + 4) > addr[icheck]) { + ret = test_fail("Invalid pointer inside another block returned from allocation"); + goto end; + } + } + } + } + + for (ipass = 0; ipass < arg.passes; ++ipass) { + cursize = *(uint32_t*)addr[ipass]; + if (cursize > max_datasize) { + ret = test_fail("Data corrupted (size)"); + goto end; + } + + if (memcmp(pointer_offset(addr[ipass], 4), data, cursize)) { + ret = test_fail("Data corrupted"); + goto end; + } + + rpfree(addr[ipass]); + } + + rpmalloc_thread_finalize(); + thread_yield(); + } + +end: + rpmalloc_thread_finalize(); + thread_exit((uintptr_t)ret); +} + +static int +test_threaded(void) { + uintptr_t thread[32]; + uintptr_t threadres[32]; + unsigned int i; + size_t num_alloc_threads; + allocator_thread_arg_t arg; + + rpmalloc_initialize(); + + num_alloc_threads = _hardware_threads; + if (num_alloc_threads < 2) + num_alloc_threads = 2; + if (num_alloc_threads > 32) + num_alloc_threads = 32; + + arg.datasize[0] = 19; + arg.datasize[1] = 249; + arg.datasize[2] = 797; + arg.datasize[3] = 3058; + arg.datasize[4] = 47892; + arg.datasize[5] = 173902; + arg.datasize[6] = 389; + arg.datasize[7] = 19; + arg.datasize[8] = 2493; + arg.datasize[9] = 7979; + arg.datasize[10] = 3; + arg.datasize[11] = 79374; + arg.datasize[12] = 3432; + arg.datasize[13] = 548; + arg.datasize[14] = 38934; + arg.datasize[15] = 234; + arg.num_datasize = 16; + arg.loops = 100; + arg.passes = 4000; + + thread_arg targ; + targ.fn = allocator_thread; + targ.arg = &arg; + for (i = 0; i < num_alloc_threads; ++i) + thread[i] = thread_run(&targ); + + thread_sleep(1000); + + for (i = 0; i < num_alloc_threads; ++i) + threadres[i] = thread_join(thread[i]); + + rpmalloc_finalize(); + + for (i = 0; i < num_alloc_threads; ++i) { + if (threadres[i]) + return -1; + } + + printf("Memory threaded tests passed\n"); + + return 0; +} + +static int +test_crossthread(void) { + uintptr_t thread[8]; + allocator_thread_arg_t arg[8]; + thread_arg targ[8]; + + rpmalloc_initialize(); + + size_t num_alloc_threads = _hardware_threads; + if (num_alloc_threads < 2) + num_alloc_threads = 2; + if (num_alloc_threads > 4) + num_alloc_threads = 4; + + for (unsigned int ithread = 0; ithread < num_alloc_threads; ++ithread) { + unsigned int iadd = (ithread * (16 + ithread) + ithread) % 128; + arg[ithread].loops = 50; + arg[ithread].passes = 1024; + arg[ithread].pointers = rpmalloc(sizeof(void*) * arg[ithread].loops * arg[ithread].passes); + memset(arg[ithread].pointers, 0, sizeof(void*) * arg[ithread].loops * arg[ithread].passes); + arg[ithread].datasize[0] = 19 + iadd; + arg[ithread].datasize[1] = 249 + iadd; + arg[ithread].datasize[2] = 797 + iadd; + arg[ithread].datasize[3] = 3 + iadd; + arg[ithread].datasize[4] = 7923 + iadd; + arg[ithread].datasize[5] = 344 + iadd; + arg[ithread].datasize[6] = 3892 + iadd; + arg[ithread].datasize[7] = 19 + iadd; + arg[ithread].datasize[8] = 154 + iadd; + arg[ithread].datasize[9] = 39723 + iadd; + arg[ithread].datasize[10] = 15 + iadd; + arg[ithread].datasize[11] = 493 + iadd; + arg[ithread].datasize[12] = 34 + iadd; + arg[ithread].datasize[13] = 894 + iadd; + arg[ithread].datasize[14] = 193 + iadd; + arg[ithread].datasize[15] = 2893 + iadd; + arg[ithread].num_datasize = 16; + + targ[ithread].fn = crossallocator_thread; + targ[ithread].arg = &arg[ithread]; + } + + for (unsigned int ithread = 0; ithread < num_alloc_threads; ++ithread) { + arg[ithread].crossthread_pointers = arg[(ithread + 1) % num_alloc_threads].pointers; + } + + for (int iloop = 0; iloop < 32; ++iloop) { + for (unsigned int ithread = 0; ithread < num_alloc_threads; ++ithread) + thread[ithread] = thread_run(&targ[ithread]); + + thread_sleep(100); + + for (unsigned int ithread = 0; ithread < num_alloc_threads; ++ithread) { + if (thread_join(thread[ithread]) != 0) + return -1; + } + } + + for (unsigned int ithread = 0; ithread < num_alloc_threads; ++ithread) + rpfree(arg[ithread].pointers); + + rpmalloc_finalize(); + + printf("Memory cross thread free tests passed\n"); + + return 0; +} + +static int +test_threadspam(void) { + uintptr_t thread[64]; + uintptr_t threadres[64]; + unsigned int i, j; + size_t num_passes, num_alloc_threads; + allocator_thread_arg_t arg; + + rpmalloc_initialize(); + + num_passes = 100; + num_alloc_threads = _hardware_threads; + if (num_alloc_threads < 2) + num_alloc_threads = 2; + if (num_alloc_threads > 64) + num_alloc_threads = 64; + + arg.loops = 500; + arg.passes = 10; + arg.datasize[0] = 19; + arg.datasize[1] = 249; + arg.datasize[2] = 797; + arg.datasize[3] = 3; + arg.datasize[4] = 79; + arg.datasize[5] = 34; + arg.datasize[6] = 389; + arg.num_datasize = 7; + + thread_arg targ; + targ.fn = initfini_thread; + targ.arg = &arg; + for (i = 0; i < num_alloc_threads; ++i) + thread[i] = thread_run(&targ); + + for (j = 0; j < num_passes; ++j) { + thread_sleep(10); + thread_fence(); + + for (i = 0; i < num_alloc_threads; ++i) { + threadres[i] = thread_join(thread[i]); + if (threadres[i]) + return -1; + thread[i] = thread_run(&targ); + } + } + + thread_sleep(1000); + + for (i = 0; i < num_alloc_threads; ++i) + threadres[i] = thread_join(thread[i]); + + rpmalloc_finalize(); + + for (i = 0; i < num_alloc_threads; ++i) { + if (threadres[i]) + return -1; + } + + printf("Memory thread spam tests passed\n"); + + return 0; +} + +int test_run( void ) { + test_initialize(); + if (test_alloc()) + return -1; + if (test_superalign()) + return -1; + if (test_crossthread()) + return -1; + if (test_threadspam()) + return -1; + if (test_threaded()) + return -1; + printf("All tests passed\n"); + return 0; +} + +#if (defined(__APPLE__) && __APPLE__) +# include <TargetConditionals.h> +# if defined(__IPHONE__) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) || (defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR) +# define NO_MAIN 1 +# endif +#elif (defined(__linux__) || defined(__linux)) +# include <sched.h> +#endif + +#if !defined(NO_MAIN) + +int +main(int argc, char** argv) { + return test_run( ); +} + +#endif + +#ifdef _WIN32 +#include <Windows.h> + +static void +test_initialize(void) { + SYSTEM_INFO system_info; + GetSystemInfo(&system_info); + _hardware_threads = (size_t)system_info.dwNumberOfProcessors; +} + +#elif (defined(__linux__) || defined(__linux)) + +static void +test_initialize(void) { + cpu_set_t prevmask, testmask; + CPU_ZERO(&prevmask); + CPU_ZERO(&testmask); + sched_getaffinity(0, sizeof(prevmask), &prevmask); //Get current mask + sched_setaffinity(0, sizeof(testmask), &testmask); //Set zero mask + sched_getaffinity(0, sizeof(testmask), &testmask); //Get mask for all CPUs + sched_setaffinity(0, sizeof(prevmask), &prevmask); //Reset current mask + int num = CPU_COUNT(&testmask); + _hardware_threads = (size_t)(num > 1 ? num : 1); +} + +#else + +static void +test_initialize(void) { + _hardware_threads = 1; +} + +#endif diff --git a/libdap/test/rpmalloc/test/test.h b/libdap/test/rpmalloc/test/test.h new file mode 100644 index 0000000000000000000000000000000000000000..ec388a333d1601627290bb8984523a43cecc053b --- /dev/null +++ b/libdap/test/rpmalloc/test/test.h @@ -0,0 +1,4 @@ + +#pragma once + +extern int rpmalloc_test_run(void); diff --git a/libdap/test/rpmalloc/test/thread.c b/libdap/test/rpmalloc/test/thread.c new file mode 100644 index 0000000000000000000000000000000000000000..17b55035d1a54150db64cee553f516e9cf6f4850 --- /dev/null +++ b/libdap/test/rpmalloc/test/thread.c @@ -0,0 +1,117 @@ + +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> + +#include <thread.h> +#include <pthread.h> + +#ifdef _MSC_VER +# define ATTRIBUTE_NORETURN +#else +# define ATTRIBUTE_NORETURN __attribute__((noreturn)) +#endif + +#ifdef _WIN32 +# include <Windows.h> +# include <process.h> + +static unsigned __stdcall +thread_entry(void* argptr) { + thread_arg* arg = argptr; + arg->fn(arg->arg); + return 0; +} + +#else +# include <time.h> +# include <pthread.h> +# include <sched.h> + +#if !defined(__x86_64__) && !defined(_AMD64_) && !defined(_M_AMD64) && !defined(__i386__) +# define MEMORY_BARRIER __sync_synchronize() +#else +# define MEMORY_BARRIER __asm__ __volatile__("":::"memory") +#endif + +static void* +thread_entry(void* argptr) { + thread_arg* arg = argptr; + arg->fn(arg->arg); + return 0; +} + +#endif + +uintptr_t +thread_run(thread_arg* arg) { +#ifdef _WIN32 + return _beginthreadex(0, 0, thread_entry, arg, 0, 0); +#else + pthread_t id = 0; + int err = pthread_create(&id, 0, thread_entry, arg); + if (err) + return 0; + return (uintptr_t)id; +#endif +} + +void ATTRIBUTE_NORETURN +thread_exit(uintptr_t value) { +#ifdef _WIN32 + _endthreadex((unsigned)value); +#else + pthread_exit((void*)value); +#endif +} + +uintptr_t +thread_join(uintptr_t handle) { + if (!handle) + return (uintptr_t)-1; + uintptr_t ret; +#ifdef _WIN32 + DWORD exit_code = 0; + WaitForSingleObject((HANDLE)handle, INFINITE); + GetExitCodeThread((HANDLE)handle, &exit_code); + CloseHandle((HANDLE)handle); + ret = exit_code; +#else + void* result = 0; + pthread_join((pthread_t)handle, &result); + ret = (uintptr_t)result; +#endif + return ret; +} + +void +thread_sleep(int milliseconds) { +#ifdef _WIN32 + SleepEx((DWORD)milliseconds, 0); +#else + struct timespec ts; + ts.tv_sec = milliseconds / 1000; + ts.tv_nsec = (long)(milliseconds % 1000) * 1000000L; + nanosleep(&ts, 0); +#endif +} + +void +thread_yield(void) { +#ifdef _WIN32 + Sleep(0); + _ReadWriteBarrier(); +#else + sched_yield(); + MEMORY_BARRIER; +#endif +} + +void +thread_fence(void) { +#ifdef _WIN32 + _ReadWriteBarrier(); +#else + MEMORY_BARRIER; +#endif +} diff --git a/libdap/test/rpmalloc/test/thread.h b/libdap/test/rpmalloc/test/thread.h new file mode 100644 index 0000000000000000000000000000000000000000..5c0d873ca5e08ddaec35c2bddd4a4f63d47672cb --- /dev/null +++ b/libdap/test/rpmalloc/test/thread.h @@ -0,0 +1,34 @@ + +#include <stdint.h> + +#ifdef __cplusplus +extern "C" { +#endif + +struct thread_arg { + void (*fn)(void*); + void* arg; +}; +typedef struct thread_arg thread_arg; + +extern uintptr_t +thread_run(thread_arg* arg); + +extern void +thread_exit(uintptr_t value); + +extern uintptr_t +thread_join(uintptr_t handle); + +extern void +thread_sleep(int milliseconds); + +extern void +thread_yield(void); + +extern void +thread_fence(void); + +#ifdef __cplusplus +} +#endif diff --git a/libdap/test/rpmalloc/test/timer.c b/libdap/test/rpmalloc/test/timer.c new file mode 100644 index 0000000000000000000000000000000000000000..2ceb4b7ec9689ef6fe5118015d33fdc1e860c262 --- /dev/null +++ b/libdap/test/rpmalloc/test/timer.c @@ -0,0 +1,65 @@ + +#include <timer.h> + +#if defined(_WIN32) +# include <Windows.h> +#elif defined(__APPLE__) +# include <mach/mach_time.h> +static mach_timebase_info_data_t _time_info; +static void +absolutetime_to_nanoseconds(uint64_t mach_time, uint64_t* clock) { + *clock = (uint64_t)(mach_time * _time_info.numer / _time_info.denom); +} +#else +# include <time.h> +#endif + +static uint64_t _time_freq; + +int +timer_initialize(void) { +#if defined(_WIN32) + uint64_t unused; + if (!QueryPerformanceFrequency((LARGE_INTEGER*)&_time_freq) || + !QueryPerformanceCounter((LARGE_INTEGER*)&unused)) + return -1; +#elif defined(__APPLE__) + if (mach_timebase_info(&_time_info)) + return -1; + _time_freq = 1000000000LL; +#else + struct timespec ts = { .tv_sec = 0, .tv_nsec = 0 }; + if (clock_gettime(CLOCK_MONOTONIC, &ts)) + return -1; + _time_freq = 1000000000LL; +#endif + return 0; +} + +uint64_t +timer_current(void) { +#if defined(_WIN32) + uint64_t curclock; + QueryPerformanceCounter((LARGE_INTEGER*)&curclock); + return curclock; +#elif defined(__APPLE__) + uint64_t curclock = 0; + absolutetime_to_nanoseconds(mach_absolute_time(), &curclock); + return curclock; +#else + struct timespec ts = { .tv_sec = 0, .tv_nsec = 0 }; + clock_gettime(CLOCK_MONOTONIC, &ts); + return ((uint64_t)ts.tv_sec * 1000000000LL) + (uint64_t)ts.tv_nsec; +#endif +} + +uint64_t +timer_ticks_per_second(void) { + return _time_freq; +} + +double +timer_ticks_to_seconds(uint64_t ticks) { + uint64_t tps = timer_ticks_per_second(); + return (double)ticks / (double)tps; +} diff --git a/libdap/test/rpmalloc/test/timer.h b/libdap/test/rpmalloc/test/timer.h new file mode 100644 index 0000000000000000000000000000000000000000..6db070311b5d28591b5a2773de04046db472eefc --- /dev/null +++ b/libdap/test/rpmalloc/test/timer.h @@ -0,0 +1,14 @@ + +#include <stdint.h> + +extern int +timer_initialize(void); + +extern uint64_t +timer_current(void); + +extern uint64_t +timer_ticks_per_second(void); + +extern double +timer_ticks_to_seconds(uint64_t ticks); diff --git a/libdap/test/unix/dap_cpu_monitor_test.c b/libdap/test/unix/dap_cpu_monitor_test.c new file mode 100755 index 0000000000000000000000000000000000000000..513ec978f5ca0a8edc0105e5a9fff260cfd2ea04 --- /dev/null +++ b/libdap/test/unix/dap_cpu_monitor_test.c @@ -0,0 +1,38 @@ +#include "dap_cpu_monitor_test.h" +#include "dap_cpu_monitor.h" +#include "unistd.h" + +static void init_test_case() +{ + dap_assert(dap_cpu_monitor_init() == 0, "Cpu module init"); +} + +static void deinit_test_case() +{ + dap_cpu_monitor_deinit(); +} + +static void test_cpu_get_stats() +{ + dap_cpu_stats_t stat = dap_cpu_get_stats(); + dap_assert(stat.cpu_cores_count > 0, "Check cpu count"); + dap_assert(stat.cpu_summary.total_time > 0, "Check cpu summary total_time"); + dap_assert(stat.cpu_summary.total_time > 0, "Check cpu summary idle_time"); + dap_assert(stat.cpu_cores_count > 0, "Check cpu count"); + for(unsigned i = 0; i < stat.cpu_cores_count; i++) { + dap_assert_PIF(stat.cpus[i].ncpu == i, "Check ncpu and index in array"); + dap_assert_PIF(stat.cpus[i].idle_time > 0, "Check cpu idle_time"); + dap_assert_PIF(stat.cpus[i].total_time > 0, "Check cpu total_time"); + } +} + +void dap_cpu_monitor_test_run() +{ + dap_print_module_name("dap_cpu_monitor"); + init_test_case(); + usleep(1000); // wait for new cpu parameters + test_cpu_get_stats(); + + dap_cpu_get_stats(); + deinit_test_case(); +} diff --git a/libdap/test/unix/dap_cpu_monitor_test.h b/libdap/test/unix/dap_cpu_monitor_test.h new file mode 100755 index 0000000000000000000000000000000000000000..e961e83a458be0ebe65ca6008cd2773c17b0da3a --- /dev/null +++ b/libdap/test/unix/dap_cpu_monitor_test.h @@ -0,0 +1,6 @@ +#pragma once + +#include "dap_test.h" +#include "dap_common.h" + +void dap_cpu_monitor_test_run(void); diff --git a/libdap/test/unix/dap_network_monitor_test.c b/libdap/test/unix/dap_network_monitor_test.c new file mode 100755 index 0000000000000000000000000000000000000000..240b8a79a29c45ce14be82bf579e40add541df70 --- /dev/null +++ b/libdap/test/unix/dap_network_monitor_test.c @@ -0,0 +1,188 @@ +#include <arpa/inet.h> +#include "linux/rtnetlink.h" + +#include "dap_network_monitor.h" +#include "dap_network_monitor_test.h" + +enum events { + NEW_INTERFACE_EV, + NEW_GATEWAY_EV, + REMOVE_INTERFACE_EV, + REMOVE_GATEWAY_EV, + REMOVE_ROUTE_EV +}; + +#define COUNT_TEST_EVENT_CASES 5 + + +static dap_network_notification_t _test_event_cases[COUNT_TEST_EVENT_CASES]; + + +static bool list_events_done[COUNT_TEST_EVENT_CASES] = {0}; + +void _network_callback(const dap_network_notification_t result) +{ + if(result.type == IP_ADDR_ADD || result.type == IP_ADDR_REMOVE) + { + dap_test_msg("Interface %s %s has IP address %s", + result.addr.interface_name, (result.type == IP_ADDR_ADD ? "now" : "no longer"), + result.addr.s_ip); + enum events event; + if(result.type == IP_ADDR_ADD) { + event = NEW_INTERFACE_EV; + } else { + event = REMOVE_INTERFACE_EV; + } + + dap_test_msg("Checking %s" , (event == NEW_INTERFACE_EV ? + "add new interface callback" : "remove interface callback")); + + dap_assert(result.addr.ip == _test_event_cases[event].addr.ip, + "Check dest ip"); + + dap_assert(dap_str_equals(result.addr.s_ip, _test_event_cases[event].addr.s_ip), + "Check dest str ip"); + + dap_assert(dap_str_equals(result.addr.interface_name, + _test_event_cases[event].addr.interface_name), + "Check interface name"); + + list_events_done[event] = true; + + } else if(result.type == IP_ROUTE_ADD || result.type == IP_ROUTE_REMOVE) { + + if (result.type == IP_ROUTE_REMOVE) { + + if(result.route.destination_address == _test_event_cases[REMOVE_GATEWAY_EV].route.gateway_address) { + dap_pass_msg("Gateway addr removed"); + dap_assert(dap_str_equals(result.route.s_destination_address, + _test_event_cases[REMOVE_GATEWAY_EV].route.s_gateway_address), + "Check gateway str ip"); + + dap_assert(result.route.protocol == _test_event_cases[REMOVE_GATEWAY_EV].route.protocol, + "Check protocol"); + + list_events_done[REMOVE_GATEWAY_EV] = true; + } else if(result.route.destination_address == + _test_event_cases[REMOVE_ROUTE_EV].route.destination_address) { + dap_pass_msg("Destination address removed"); + + dap_assert(dap_str_equals(result.route.s_destination_address, + _test_event_cases[REMOVE_ROUTE_EV].route.s_destination_address), + "Check dest str ip"); + + dap_assert(result.route.protocol == _test_event_cases[REMOVE_ROUTE_EV].route.protocol, + "Check protocol"); + + list_events_done[REMOVE_ROUTE_EV] = true; + } + +// dap_test_msg("Deleting route to destination --> %s/%d proto %d and gateway %s\n", +// result.route.s_destination_address, +// result.route.netmask, +// result.route.protocol, +// result.route.s_gateway_address); + + } else if (result.type == IP_ROUTE_ADD) { + if(result.route.gateway_address != (uint64_t) -1) { // gateway address is present + dap_test_msg("Checking new gateway addr"); + dap_assert(result.route.gateway_address == + _test_event_cases[NEW_GATEWAY_EV].route.gateway_address, + "Check gateway ip"); + + dap_assert(dap_str_equals(result.route.s_gateway_address, + _test_event_cases[NEW_GATEWAY_EV].route.s_gateway_address), + "Check gateway str ip"); + + dap_assert(result.route.protocol == _test_event_cases[NEW_GATEWAY_EV].route.protocol, + "Check protocol"); + + list_events_done[NEW_GATEWAY_EV] = true; + } +// dap_test_msg("Adding route to destination --> %s/%d proto %d and gateway %s\n", +// result.route.s_destination_address, +// result.route.netmask, +// result.route.protocol, +// result.route.s_gateway_address); + } + } +} + + +static void init_test_case() +{ + bzero(_test_event_cases, sizeof (_test_event_cases)); + + dap_network_notification_t * res; + + // new_interface + res = &_test_event_cases[NEW_INTERFACE_EV]; + res->type = IP_ADDR_ADD; + strcpy(res->addr.s_ip, "10.1.0.111"); + strcpy(res->addr.interface_name, "tun10"); + res->addr.ip = 167837807; + + // new_gateway + res = &_test_event_cases[NEW_GATEWAY_EV]; + res->type = IP_ROUTE_ADD; + strcpy(res->route.s_gateway_address, "10.1.0.1"); + res->route.gateway_address = 167837697; + res->route.protocol = RTPROT_STATIC; + + res = &_test_event_cases[REMOVE_GATEWAY_EV]; + res->type = IP_ROUTE_REMOVE; + strcpy(res->route.s_gateway_address, "10.1.0.1"); + res->route.gateway_address = 167837697; + res->route.protocol = RTPROT_STATIC; + + + // remove interface + res = &_test_event_cases[REMOVE_INTERFACE_EV]; + res->type = IP_ADDR_REMOVE; + strcpy(res->addr.s_ip, "10.1.0.111"); + strcpy(res->addr.interface_name, "tun10"); + res->addr.ip = 167837807; + + // remote route + res = &_test_event_cases[REMOVE_ROUTE_EV]; + res->type = IP_ROUTE_REMOVE; + strcpy(res->route.s_destination_address, "10.1.0.111"); + res->route.destination_address = 167837807; + res->route.protocol = RTPROT_KERNEL; +} + +static void cleanup_test_case() +{ + +} + +void dap_network_monitor_test_run(void) +{ + dap_print_module_name("dap_network_monitor"); + + init_test_case(); + + dap_network_monitor_init(_network_callback); + + const char *add_test_interfece = "sudo nmcli connection add type tun con-name " + "DiveVPNTest autoconnect false ifname tun10 " + "mode tun ip4 10.1.0.111 gw4 10.1.0.1"; + const char *up_test_interfece = "sudo nmcli connection up DiveVPNTest"; + const char *down_test_interfece = "sudo nmcli connection down DiveVPNTest"; + const char *delete_test_interfece = "sudo nmcli connection delete DiveVPNTest 2> /dev/null"; + + system(delete_test_interfece); + system(add_test_interfece); + system(up_test_interfece); + system(down_test_interfece); + system(delete_test_interfece); + + for(int i = 0; i < COUNT_TEST_EVENT_CASES; i++) { + if(list_events_done[i] == false) { + dap_fail("Not all events were processed"); + } + } + + dap_network_monitor_deinit(); + cleanup_test_case(); +} diff --git a/libdap/test/unix/dap_network_monitor_test.h b/libdap/test/unix/dap_network_monitor_test.h new file mode 100755 index 0000000000000000000000000000000000000000..1dae52297d544c35e18d21ab6ac72f605dba6f5f --- /dev/null +++ b/libdap/test/unix/dap_network_monitor_test.h @@ -0,0 +1,4 @@ +#pragma once +#include "dap_test.h" +#include "dap_common.h" +void dap_network_monitor_test_run(void); diff --git a/libdap/test/unix/dap_process_mem_test.c b/libdap/test/unix/dap_process_mem_test.c new file mode 100755 index 0000000000000000000000000000000000000000..182d039f0bd2c6ff2d865f16a4ee53ccbb22f9c8 --- /dev/null +++ b/libdap/test/unix/dap_process_mem_test.c @@ -0,0 +1,23 @@ +#include "dap_process_mem_test.h" +#include "dap_process_memory.h" + +void test_current_process() +{ + dap_process_memory_t mem = get_proc_mem_current(); + dap_assert(mem.vsz != 0, "Check vsz current process"); + dap_assert(mem.rss != 0, "Check rss current process "); +} + +void test_nonexistent_process() +{ + dap_process_memory_t mem = get_proc_mem_by_pid(-1); + dap_assert(mem.vsz == 0, "Check vsz nonexistent process"); + dap_assert(mem.rss == 0, "Check rss nonexistent process"); +} + +void dap_process_mem_test_run() +{ + dap_print_module_name("dap_process_memory"); + test_current_process(); + test_nonexistent_process(); +} diff --git a/libdap/test/unix/dap_process_mem_test.h b/libdap/test/unix/dap_process_mem_test.h new file mode 100755 index 0000000000000000000000000000000000000000..b098a8a88b9bc60058a3afae2f48b9874a25991c --- /dev/null +++ b/libdap/test/unix/dap_process_mem_test.h @@ -0,0 +1,4 @@ +#pragma once +#include "dap_test.h" +#include "dap_common.h" +void dap_process_mem_test_run(void);