[med-svn] [libbpp-raa] 02/06: New upstream version 2.3.1

Andreas Tille tille at debian.org
Wed Jun 14 09:56:04 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository libbpp-raa.

commit 56807c250101d3c53e0737460898c1ea3ef52c3c
Author: Andreas Tille <tille at debian.org>
Date:   Wed Jun 14 11:44:10 2017 +0200

    New upstream version 2.3.1
---
 CMakeLists.txt                 |  194 +-
 ChangeLog                      |    4 +
 Doxyfile                       | 2662 +++++++++++--------
 INSTALL.txt                    |   19 +-
 bpp-raa.spec                   |  132 +-
 debian/changelog               |   42 -
 debian/compat                  |    1 -
 debian/control                 |   29 -
 debian/copyright               |   66 -
 debian/libbpp-raa-dev.install  |    3 -
 debian/libbpp-raa1.install     |    1 -
 debian/postinst                |   57 -
 debian/postrm                  |   59 -
 debian/prerm                   |   41 -
 debian/rules                   |  121 -
 debian/source/format           |    1 -
 header.html                    |   27 +
 package.cmake.in               |   26 +
 src/Bpp/Raa.all                |    6 -
 src/Bpp/Raa/RAA.cpp            |  958 ++++---
 src/Bpp/Raa/RAA.h              |  861 +++---
 src/Bpp/Raa/RAA_acnuc.c        | 5766 ++++++++++++++++++++++------------------
 src/Bpp/Raa/RAA_acnuc.h        |  421 +--
 src/Bpp/Raa/RaaList.cpp        |  103 +-
 src/Bpp/Raa/RaaList.h          |  270 +-
 src/Bpp/Raa/RaaSeqAttributes.h |  121 +-
 src/Bpp/Raa/RaaSpeciesTree.cpp |  131 +-
 src/Bpp/Raa/RaaSpeciesTree.h   |  237 +-
 src/Bpp/Raa/md5.c              |  409 +--
 src/Bpp/Raa/misc_acnuc.c       |   62 +-
 src/Bpp/Raa/parser.c           |  166 +-
 src/Bpp/Raa/parser.h           |   19 +-
 src/Bpp/Raa/zsockr.c           |  212 +-
 src/CMakeLists.txt             |   93 +-
 34 files changed, 7101 insertions(+), 6219 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ad80d2b..da7a9d8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,14 +1,22 @@
 # CMake script for Bio++ Remote Acnuc Access
-# Author: Sylvain Gaillard and Julien Dutheil
+# Authors:
+#   Sylvain Gaillard
+#   Julien Dutheil
+#   Francois Gindraud (2017)
 # Created: 11/09/2009
 
-# Global parameters
-cmake_minimum_required(VERSION 2.6)
-project(bpp-raa C CXX)
-if(NOT DEFINED CMAKE_BUILD_TYPE)
-  set(CMAKE_BUILD_TYPE "Release")
-endif(NOT DEFINED CMAKE_BUILD_TYPE)
-set(CMAKE_CXX_FLAGS "-Wall")
+cmake_minimum_required (VERSION 2.8.11)
+project (bpp-raa C CXX)
+
+# Compile options
+set (CMAKE_CXX_FLAGS "-std=c++11 -Wall")
+set (CMAKE_C_FLAGS "-Wall")
+
+IF(NOT CMAKE_BUILD_TYPE)
+  SET(CMAKE_BUILD_TYPE Release CACHE STRING
+      "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
+      FORCE)
+ENDIF(NOT CMAKE_BUILD_TYPE)
 
 IF(NOT NO_DEP_CHECK)
   SET(NO_DEP_CHECK FALSE CACHE BOOL
@@ -28,59 +36,58 @@ ELSE(NO_DEP_CHECK)
 #           library implements.
 # In other words, the library implements all the interface numbers in the
 # range from number current - age to current.
-set(BPPRAA_VERSION_CURRENT "2")
-set(BPPRAA_VERSION_REVISION "1")
-set(BPPRAA_VERSION_AGE "1")
+SET(${PROJECT_NAME}_VERSION_CURRENT "3")
+SET(${PROJECT_NAME}_VERSION_REVISION "0")
+SET(${PROJECT_NAME}_VERSION_AGE "0")
 
 # Effective version number computation
-math(EXPR BPPRAA_VERSION_MAJOR "${BPPRAA_VERSION_CURRENT} -
-${BPPRAA_VERSION_AGE}")
-set(BPPRAA_VERSION_MINOR ${BPPRAA_VERSION_AGE})
-set(BPPRAA_VERSION_PATCH ${BPPRAA_VERSION_REVISION})
-set(BPPRAA_VERSION "${BPPRAA_VERSION_MAJOR}.${BPPRAA_VERSION_MINOR}.${BPPRAA_VERSION_PATCH}")
-
-# Set the CMAKE_PREFIX_PATH for the find_library fonction when using non
-# standard install location
-IF(CMAKE_INSTALL_PREFIX)
-  SET(CMAKE_PREFIX_PATH "${CMAKE_INSTALL_PREFIX}" ${CMAKE_PREFIX_PATH})
-ENDIF(CMAKE_INSTALL_PREFIX)
-
-#here is a useful function:
-MACRO(IMPROVED_FIND_LIBRARY OUTPUT_LIBS lib_name include_to_find)
-  #start:
-  FIND_PATH(${lib_name}_INCLUDE_DIR ${include_to_find})
-  SET(${lib_name}_NAMES ${lib_name} ${lib_name}lib ${lib_name}dll)
-  FIND_LIBRARY(${lib_name}_LIBRARY NAMES ${${lib_name}_NAMES} PATH_SUFFIXES lib${LIB_SUFFIX})
-
-  IF(${lib_name}_LIBRARY)
-    MESSAGE("-- Library ${lib_name} found here:")
-    MESSAGE("   includes : ${${lib_name}_INCLUDE_DIR}")
-    MESSAGE("   libraries: ${${lib_name}_LIBRARY}")
-  ELSE(${lib_name}_LIBRARY)
-    MESSAGE(FATAL_ERROR "${lib_name} required but not found.")
-  ENDIF(${lib_name}_LIBRARY)
-  
-  #add the dependency:
-  INCLUDE_DIRECTORIES(${${lib_name}_INCLUDE_DIR})
-  SET(${OUTPUT_LIBS} ${${OUTPUT_LIBS}} ${${lib_name}_LIBRARY})
-ENDMACRO(IMPROVED_FIND_LIBRARY)
-
-#Find the Bio++ libraries:
-IMPROVED_FIND_LIBRARY(LIBS bpp-seq Bpp/Seq/Alphabet/Alphabet.h)
-#Not explicitely needed:
-#IMPROVED_FIND_LIBRARY(LIBS bpp-core Bpp/Clonable.h)
-
-# Find the zlib installation
+MATH(EXPR ${PROJECT_NAME}_VERSION_MAJOR "${${PROJECT_NAME}_VERSION_CURRENT} - ${${PROJECT_NAME}_VERSION_AGE}")
+SET(${PROJECT_NAME}_VERSION_MINOR ${${PROJECT_NAME}_VERSION_AGE})
+SET(${PROJECT_NAME}_VERSION_PATCH ${${PROJECT_NAME}_VERSION_REVISION})
+SET(${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}")
+
+set (PROJECT_VERSION ${${PROJECT_NAME}_VERSION})
+
+# Find dependencies (add install directory to search)
+if (CMAKE_INSTALL_PREFIX)
+  set (CMAKE_PREFIX_PATH "${CMAKE_INSTALL_PREFIX}" ${CMAKE_PREFIX_PATH})
+endif (CMAKE_INSTALL_PREFIX)
+
+include (GNUInstallDirs)
+find_package (bpp-seq 11.0.0 REQUIRED)
+
+# Find the zlib installation (define zlib imported target)
 find_package(ZLIB REQUIRED)
-include_directories(${ZLIB_INCLUDE_DIR})
-set(LIBS ${LIBS} ${ZLIB_LIBRARIES})
+add_library (zlib IMPORTED UNKNOWN)
+set_target_properties (zlib PROPERTIES
+  IMPORTED_LOCATION ${ZLIB_LIBRARIES}
+  INTERFACE_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIR}
+  )
+
+# CMake package
+set (cmake-package-location ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
+include (CMakePackageConfigHelpers)
+configure_package_config_file (
+  package.cmake.in
+  ${CMAKE_CURRENT_BINARY_DIR}/package.cmake
+  INSTALL_DESTINATION ${cmake-package-location}
+  )
+write_basic_package_version_file (
+  ${CMAKE_CURRENT_BINARY_DIR}/package-version.cmake
+  VERSION ${PROJECT_VERSION}
+  COMPATIBILITY SameMajorVersion
+  )
+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/package.cmake DESTINATION ${cmake-package-location}
+  RENAME ${PROJECT_NAME}-config.cmake)
+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/package-version.cmake DESTINATION ${cmake-package-location}
+  RENAME ${PROJECT_NAME}-config-version.cmake)
 
-# Subdirectories
-add_subdirectory(src)
+# Define the libraries
+add_subdirectory (src)
 
 # Doxygen
-find_package(Doxygen)
-if (DOXYGEN_FOUND)
+FIND_PACKAGE(Doxygen)
+IF (DOXYGEN_FOUND)
   ADD_CUSTOM_TARGET (apidoc cp Doxyfile ${CMAKE_BINARY_DIR}/Doxyfile-build
     COMMAND echo "OUTPUT_DIRECTORY=${CMAKE_BINARY_DIR}" >> ${CMAKE_BINARY_DIR}/Doxyfile-build
     COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile-build
@@ -90,55 +97,29 @@ if (DOXYGEN_FOUND)
     COMMAND echo "HTML_HEADER=header.html" >> ${CMAKE_BINARY_DIR}/Doxyfile-stable
     COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile-stable
     WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
-endif (DOXYGEN_FOUND)
+ENDIF (DOXYGEN_FOUND)
 
 ENDIF(NO_DEP_CHECK)
 
 # Packager
-set(CPACK_PACKAGE_NAME "libbpp-raa")
-set(CPACK_PACKAGE_VENDOR "Bio++ Development Team")
-set(CPACK_PACKAGE_VERSION "2.2.0")
-set(CPACK_PACKAGE_VERSION_MAJOR "2")
-set(CPACK_PACKAGE_VERSION_MINOR "2")
-set(CPACK_PACKAGE_VERSION_PATCH "0")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The Bio++ Remote Acnuc Access library")
-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING.txt")
-set(CPACK_RESOURCE_FILE_AUTHORS "${CMAKE_SOURCE_DIR}/AUTHORS.txt")
-set(CPACK_RESOURCE_FILE_INSTALL "${CMAKE_SOURCE_DIR}/INSTALL.txt")
-set(CPACK_SOURCE_GENERATOR "TGZ")
-SET(CPACK_SOURCE_IGNORE_FILES
- "CMakeFiles"
- "Makefile"
- "_CPack_Packages"
- "CMakeCache.txt"
- ".*\\\\.cmake"
- ".*\\\\.git"
- ".*\\\\.gz"
- ".*\\\\.deb"
- ".*\\\\.rpm"
- ".*\\\\.dmg"
- ".*\\\\.sh"
- ".*\\\\..*\\\\.swp"
- "src/\\\\..*"
- "src/libbpp*"
- "debian/tmp"
- "debian/libbpp.*/"
- "debian/libbpp.*\\\\.so.*"
- "debian/libbpp.*\\\\.a"
- "debian/libbpp.*\\\\.substvars"
- "debian/libbpp.*\\\\.debhelper"
- "debian/debhelper\\\\.log"
- "html"
- "Raa.tag"
- "Testing"
- "build-stamp"
- "install_manifest.txt"
- "DartConfiguration.tcl"
- ${CPACK_SOURCE_IGNORE_FILES}
-)
-IF (MACOS)
-  SET(CPACK_GENERATOR "Bundle")
-ENDIF()
+SET(CPACK_PACKAGE_NAME "libbpp-raa")
+SET(CPACK_PACKAGE_VENDOR "Bio++ Development Team")
+SET(CPACK_PACKAGE_VERSION "2.3.1")
+SET(CPACK_PACKAGE_VERSION_MAJOR "2")
+SET(CPACK_PACKAGE_VERSION_MINOR "3")
+SET(CPACK_PACKAGE_VERSION_PATCH "1")
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The Bio++ Remote Acnuc Access library")
+SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING.txt")
+SET(CPACK_RESOURCE_FILE_AUTHORS "${CMAKE_SOURCE_DIR}/AUTHORS.txt")
+SET(CPACK_RESOURCE_FILE_INSTALL "${CMAKE_SOURCE_DIR}/INSTALL.txt")
+SET(CPACK_SOURCE_GENERATOR "TGZ")
+# /!\ This assumes that an external build is used
+SET(CPACK_SOURCE_IGNORE_FILES 
+       "/build/" 
+       "/\\\\.git/" 
+       "/\\\\.gitignore" 
+       ${CPACK_SOURCE_IGNORE_FILES}
+       )
 
 SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
 SET(CPACK_DEBSOURCE_PACKAGE_FILE_NAME "lib${CMAKE_PROJECT_NAME}_${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}.orig")
@@ -146,22 +127,9 @@ INCLUDE(CPack)
 
 #This adds the 'dist' target
 ADD_CUSTOM_TARGET(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
-# 'clean' is not (yet) a first class target. However, we need to clean the directories before building the sources:
-IF("${CMAKE_GENERATOR}" MATCHES "Make")
-  ADD_CUSTOM_TARGET(make_clean
-  COMMAND ${CMAKE_MAKE_PROGRAM} clean
-  WORKING_DIRECTORY ${CMAKE_CURRENT_DIR}
-  )
-  ADD_DEPENDENCIES(dist make_clean)
-ENDIF()
 
 IF(NOT NO_DEP_CHECK)
 IF (UNIX)
-#This creates deb packages:
-ADD_CUSTOM_TARGET(origdist COMMAND cp ${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz ../${CPACK_DEBSOURCE_PACKAGE_FILE_NAME}.tar.gz)
-ADD_DEPENDENCIES(origdist dist)
-ADD_CUSTOM_TARGET(deb dpkg-buildpackage -uc -us -i${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz)
-ADD_DEPENDENCIES(deb origdist)
 
 #This creates rpm packages:
 ADD_CUSTOM_TARGET(rpm rpmbuild -ta ${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz)
diff --git a/ChangeLog b/ChangeLog
index ce44d20..fb18ab7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+10/05/17 -*- version 2.3.0 -*-
+
+28/09/14 -*- Version 2.2.0 -*-
+
 07/03/13 -*- version 2.1.0 -*-
 
 09/02/12 -*- version 2.0.3 -*-
diff --git a/Doxyfile b/Doxyfile
index 42a5ff6..3d69b7d 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -1,358 +1,406 @@
-# Doxyfile 1.8.3.1-20130209
+# Doxyfile 1.8.11
 
 # This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
+# doxygen (www.doxygen.org) for a project.
 #
-# All text after a hash (#) is considered a comment and will be ignored
+# 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 (" ")
+# 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.
+# 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 sequence of words) that should 
-# identify the project. Note that if you do not use Doxywizard you need 
-# to put quotes around the project name if it contains spaces.
+# 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           = bpp-raa
 
-# 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.
+# 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         = 2.2.0
+PROJECT_NUMBER         = 2.3.0
 
-# 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.
+# 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          = 
 
-# With the PROJECT_LOGO tag one can specify an logo or icon that is 
-# included in the documentation. The maximum height of the logo should not 
-# exceed 55 pixels and the maximum width should not exceed 200 pixels. 
-# Doxygen will copy the logo to the output directory.
+# 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) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
-# where doxygen was started. If left blank the current directory will be used.
+# 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       = 
 
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
-# 4096 sub-directories (in 2 levels) under the output directory of each output 
-# format and will distribute the generated files over these directories. 
-# Enabling this option can be useful when feeding doxygen a huge amount of 
-# source files, where putting all generated files in the same directory would 
-# otherwise cause performance problems for the file system.
+# 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
 
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 
-# messages), Korean, Korean-en, Latvian, Lithuanian, Norwegian, Macedonian, Persian, 
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, 
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+# 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 (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
-# Set to NO to disable this.
+# 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 (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# 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" "the"
+# 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 
+# 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 
+# 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  = YES
 
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
-# to NO the shortest path that makes the file name unique will be used.
+# 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
 
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. The tag can be used to show relative paths in the file list. 
-# If left blank the directory from which doxygen is run is used as the 
-# path to strip. Note that you specify absolute paths here, but also 
-# relative paths, which will be relative from the directory where doxygen is 
-# started.
+# 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        = ./src/
 
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
-# the path mentioned in the documentation of a class, which tells 
-# the reader which header file to include in order to use a class. 
-# If left blank only the name of the header file containing the class 
-# definition is used. Otherwise one should specify the include paths that 
-# are normally passed to the compiler using the -I flag.
+# 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    = ./src/
 
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful if your file system 
-# doesn't support long names like on DOS, Mac, or CD-ROM.
+# 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 
-# comments will behave just like regular Qt-style comments 
-# (thus requiring an explicit @brief command for a brief description.)
+# 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 comments 
-# will behave just like regular Qt-style comments (thus requiring 
-# an explicit \brief command for a brief description.)
+# 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 behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
-# description. Set this tag to YES if you prefer the old behaviour instead.
+# 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 (the default) then an undocumented 
-# member inherits the documentation from any documented member that it 
-# re-implements.
+# 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.
+# 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.
+# 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               = 2
 
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
-# You can put \n's in the value part of an alias to insert newlines.
+# 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.
+# 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.
+# 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  = NO
 
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
-# sources only. Doxygen will then generate output that is more tailored for 
-# Java. For instance, namespaces will be presented as packages, qualified 
-# scopes will look different, etc.
+# 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 only. Doxygen will then generate output that is more tailored for 
-# Fortran.
+# 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.
+# 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, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, 
-# C++. For instance to make doxygen treat .inc files as Fortran files (default 
-# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note 
-# that for custom extensions you also need to set FILE_PATTERNS otherwise the 
-# files are not read by doxygen.
+# 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 MARKDOWN_SUPPORT is enabled (the default) 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.
+# 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 by putting a % sign in front of the word or 
+# 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); v.s. 
-# func(std::string) {}). This also makes the inheritance and collaboration 
+# 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    = YES
 
-# If you use Microsoft's C++/CLI language, you should set this option to YES to 
+# 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 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.
+# 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 (the 
-# default) will make doxygen replace the get and set methods by a property in 
-# the documentation. This will only work if the methods are indeed getting or 
-# setting a simple type. If this is not the case, or you want to show the 
-# methods anyway, you should set this option to NO.
+# 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 
+# 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
 
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
-# the \nosubgrouping command.
+# 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).
+# 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 (the default), structs, classes, and unions are shown on a separate 
-# page (for HTML and Man pages) or section (for LaTeX and RTF).
+# 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 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 
+# 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 SYMBOL_CACHE_SIZE determines the size of the internal cache use to 
-# determine which symbols to keep in memory and which to flush to disk. 
-# When the cache is full, less often used symbols will be written to disk. 
-# For small to medium size projects (<1000 input files) the default value is 
-# probably good enough. For larger projects a too small cache size can cause 
-# doxygen to be busy swapping symbols to and from disk most of the time 
-# causing a significant performance penalty. 
-# If the system has enough physical memory increasing the cache will improve the 
-# performance by keeping more symbols in memory. Note that the value works on 
-# a logarithmic scale so increasing the size by one will roughly double the 
-# memory usage. The cache size is given by this formula: 
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-SYMBOL_CACHE_SIZE      = 0
-
-# Similar to the SYMBOL_CACHE_SIZE 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 appear 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.
+# 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
 
@@ -360,1196 +408,1577 @@ 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 and EXTRACT_STATIC tags are set to YES
+# 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.
+# 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 
+# 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.
+# 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.
+# 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  = NO
 
-# This flag is only useful for Objective-C code. When set to YES local 
-# methods, which are defined in the implementation section but not in 
-# the interface are included in the documentation. 
-# If set to NO (the default) only methods in the interface are included.
+# 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  = NO
 
-# If this flag is set to YES, the members of anonymous namespaces will be 
-# extracted and appear in the documentation as a namespace called 
-# 'anonymous_namespace{file}', where file will be replaced with the base 
-# name of the file that contains the anonymous namespace. By default 
-# anonymous namespaces are hidden.
+# 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 of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
-# This option has no effect if EXTRACT_ALL is enabled.
+# 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 (the default) these classes will be included in the various 
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
+# 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 (the default) these declarations will be included in the 
-# documentation.
+# 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 (the default) these blocks will be appended to the 
-# function's detailed documentation block.
+# 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 (the default) then the documentation will be excluded. 
-# Set it to YES to include the internal documentation.
+# 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 
+# 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 (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
-# documentation. If set to YES the scope will be hidden.
+# 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 SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
-# of that file.
+# 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 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.
+# 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 (the default) then a tag [inline] 
-# is inserted in the documentation for inline members.
+# 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 (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
-# declaration order.
+# 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 documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
-# declaration order.
+# 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 default) 
-# the constructors will appear in the respective orders defined by 
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. 
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO 
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+# 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 default) 
-# the group names will appear in their defined order.
+# 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 default), the class list will be sorted only by class name, 
-# not including the namespace part. 
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 
-# Note: This option applies only to the class list, not to the 
-# alphabetical list.
+# 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.
+# 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 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      = NO
 
-# 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 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      = NO
 
-# 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 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       = NO
 
-# 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 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= NO
 
-# The ENABLED_SECTIONS tag can be used to enable conditional 
-# documentation sections, marked by \if section-label ... \endif 
-# and \cond section-label ... \endcond blocks.
+# 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 
-# the initial value of a variable or macro consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and macros in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
-# command in the documentation regardless of this setting.
+# 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 
+# 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 is 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 is 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. See the manual for examples.
+# 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.
+# 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 references data. This must be a list of .bib files. The 
-# .bib extension is automatically appended if omitted. Using this command 
-# 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. Do not use 
-# file names with spaces, bibtex cannot handle them.
+# 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
+# Configuration options related to warning and progress messages
 #---------------------------------------------------------------------------
 
-# The QUIET tag can be used to turn on/off the messages that are generated 
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
+# 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 by doxygen. Possible values are YES and NO. If left blank 
-# NO is used.
+# 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 WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
-# automatically be disabled.
+# 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 WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
-# don't exist or using markup commands wrongly.
+# 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
 
-# The WARN_NO_PARAMDOC option can be enabled to get warnings for 
-# functions that are documented, but have no documentation for their parameters 
-# or return value. If set to NO (the default) doxygen will only warn about 
-# wrong or incomplete parameter documentation, but not about the absence of 
-# documentation.
+# 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
 
-# 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)
+# 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 stderr.
+# 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
+# Configuration options related to the input files
 #---------------------------------------------------------------------------
 
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
-# with spaces.
+# 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                  = src
 
-# This tag can be used to specify the character encoding of the source files 
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
-# also the default input encoding. Doxygen uses libiconv (or the iconv built 
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
-# the list of possible encodings.
+# 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 pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh 
-# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py 
-# *.f90 *.f *.for *.vhd *.vhdl
+# 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          = Raa*.h \
                          *.cpp \
                          RAA.h
 
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
-# If left blank NO is used.
+# 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              = YES
 
-# 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 
+# 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 
+# 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/*
+# 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, 
+# 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).
+# 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.
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
 
 EXAMPLE_PATTERNS       = 
 
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
-# Possible values are YES and NO. If left blank NO is used.
+# 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 image that are included in the documentation (see 
-# the \image command).
+# 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.
+# 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 
-# info on how filters are used. If FILTER_PATTERNS is empty or if 
-# non of the patterns match the file name, INPUT_FILTER is applied.
+# 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 be used to filter the input files when producing source 
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# 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 option only has effect when 
-# FILTER_SOURCE_FILES is enabled.
+# 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_MD_FILE_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 reuse 
-# the introduction page also for the doxygen output.
+# 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
+# Configuration options related to source browsing
 #---------------------------------------------------------------------------
 
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
-# VERBATIM_HEADERS is set to NO.
+# 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         = YES
 
-# Setting the INLINE_SOURCES tag to YES will include the body 
-# of functions and classes directly in the documentation.
+# 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 (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
-# fragments. Normal C, C++ and Fortran comments will always remain visible.
+# 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.
+# 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 = YES
 
-# 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.
+# 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    = YES
 
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 
-# link to the source code.  Otherwise they will link to the documentation.
+# 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 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.
+# 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 to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
-# which an include is specified. Set to NO to disable this.
+# 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
+# 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.
+# 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     = NO
 
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
-# in which this list will be split (can be a number in the range [1..20])
+# 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 one or more prefixes that 
-# should be ignored while generating the index headers.
+# 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
+# Configuration options related to the HTML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
-# generate 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. If left blank `html' will be used as the default path.
+# 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            = html
 
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
-# doxygen will generate files with .html extension.
+# 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 personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard header. Note that when using a custom header you are responsible  
-# for the proper inclusion of any scripts and style sheets that doxygen 
-# needs, which is dependent on the configuration options used. 
-# It is advised to generate a default header using "doxygen -w html 
-# header.html footer.html stylesheet.css YourConfigFile" and then modify 
-# that header. Note that the header is subject to change so you typically 
-# have to redo this when upgrading to a newer version of doxygen or when 
-# changing the value of configuration settings such as GENERATE_TREEVIEW!
+# 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 personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard footer.
+# 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. Note that it is recommended to use 
-# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this 
-# tag will in the future become obsolete.
+# 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 an additional 
-# user-defined cascading style sheet that is 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 therefor more 
-# robust against future updates. Doxygen will copy the style sheet file to 
-# the output directory.
+# 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.
+# 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. 
-# The allowed range is 0 to 359.
+# 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.
+# 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.
+# 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 NO can help when comparing the output of multiple runs.
+# 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         = YES
 
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
-# documentation will contain sections that can be hidden and shown after the 
+# 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  = YES
 
-# 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.
+# 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, 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 
+# 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        = YES
 
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
-# feed. A documentation feed provides an umbrella under which multiple 
-# documentation sets from a single provider (such as a company or product suite) 
-# can be grouped.
+# 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        = "Bio++ RAA"
 
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
-# should uniquely identify the documentation set bundle. This should be a 
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
-# will append .docset to the name.
+# 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       = bpp.RAA
 
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely 
-# identify the documentation publisher. This should be a reverse domain-name 
-# style string, e.g. com.mycompany.MyDocSet.documentation.
+# 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 GENERATE_PUBLISHER_NAME tag identifies the documentation 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, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
-# of the generated HTML documentation.
+# 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
 
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
+# 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               = 
 
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
-# the HTML help compiler on the generated index.hhp.
+# 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           = 
 
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
-# it should be included in the master .chm file (NO).
+# 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
 
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file 
-# content.
+# 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     = 
 
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
-# normal table of contents (NO) in the .chm file.
+# 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 contents of the HTML help documentation and to the tree view.
+# 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.
+# 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.
+# 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 
-# http://doc.trolltech.com/qthelpproject.html#namespace
+# 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 
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+# 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 QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to 
-# add. For more information please see 
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
+# 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_FILT_ATTRS tag specifies the list of the attributes of the 
-# custom filter to add. For more information please see 
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters"> 
-# Qt Help Project / Custom Filters</a>.
+# 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. 
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes"> 
-# Qt Help Project / Filter Attributes</a>.
+# 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  = 
 
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 
-# be used to specify the location of Qt's qhelpgenerator. 
-# If non-empty doxygen will try to run qhelpgenerator on the generated 
-# .qhp file.
+# 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, which together with the HTML files, form an Eclipse help 
-# plugin. To install this plugin and make it available under the help contents 
-# menu in Eclipse, the contents of the directory containing the HTML and XML 
-# files needs to be copied into the plugins directory of eclipse. The name of 
-# the directory within the plugins directory should be the same as 
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before 
-# the help appears.
+# 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.
+# 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
 
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) 
-# at top of each HTML page. The value NO (the default) enables the index and 
-# the value YES disables it. Since the tabs have the same information as the 
-# navigation tree you can set this option to NO if you already set 
-# GENERATE_TREEVIEW to YES.
+# 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. 
-# Since the tree basically has the same information as the tab index you 
-# could consider to set DISABLE_INDEX to NO when enabling this option.
+# 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      = YES
 
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values 
-# (range [0,1..20]) that doxygen will group on one line in the generated HTML 
-# documentation. Note that a value of 0 will completely suppress the enum 
-# values from appearing in the overview section.
+# 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.
+# 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
 
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open 
-# links to external symbols imported via tag files in a separate window.
+# 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. The default is 10. Note that 
-# when you change the font size after a successful doxygen run you need 
-# to manually remove any form_*.png images from the HTML output directory 
-# to force them to be regenerated.
+# 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 before the changes have effect.
+# 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 prerendered bitmaps. Use this if you do not 
-# have LaTeX installed or if you want to formulas look prettier in the HTML 
-# output. When enabled you may also need to install MathJax separately and 
-# configure the path to it using the MATHJAX_RELPATH option.
+# 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 
-# thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and 
-# SVG. The default value is HTML-CSS, which is slower, but has the best 
-# compatibility.
+# 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.
+# 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 MathJax extension 
-# names that should be enabled during MathJax rendering.
+# 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     = 
 
-# 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.
+# 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 flavours of web server based search 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 manual for details.
+# 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 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 the manual for configuration details.
+# 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 returned the search results when EXTERNAL_SEARCH is enabled. 
-# Doxygen ships with an example search engine (doxysearch) which is based on 
-# the open source search engine library Xapian. See the manual for configuration 
-# details.
+# 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 
+# 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 
+# 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 = id1=loc1 id2=loc2 ...
+# 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
+# Configuration options related to the LaTeX output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
-# generate 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. If left blank `latex' will be used as the default path.
+# 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. If left blank `latex' will be used as the default command name. 
-# Note that when enabling USE_PDFLATEX this option is only used for 
-# generating bitmaps for formulas in the HTML output, but not in the 
-# Makefile that is written to the output directory.
+# 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. If left blank `makeindex' will be used as the 
-# default command name.
+# 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.
+# 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, letter, legal and 
-# executive. If left blank a4wide will be used.
+# 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             = a4wide
 
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
-# packages that should be included in the LaTeX output.
+# 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         = amsmath
 
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
-# standard header. Notice: only use this tag if you know what you are doing!
+# 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. Notice: only use this tag if you know what you are doing!
+# 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_FILES tag can be used to specify one or more extra images 
-# or other source files which should be copied to the LaTeX output directory. 
-# Note that the files will be copied as-is; there are no commands or markers 
-# available.
+# 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). 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.
+# 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         = NO
 
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
+# 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           = NO
 
-# 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.
+# 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 LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
-# in the output.
+# 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 LATEX_SOURCE_CODE is set to YES then doxygen will include 
-# source code with syntax highlighting in the LaTeX output. 
-# Note that which sources are shown also depends on other settings 
-# such as SOURCE_BROWSER.
+# 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. The default style is "plain". See 
-# http://en.wikipedia.org/wiki/BibTeX for more info.
+# 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
+# Configuration options related to the RTF output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
-# other RTF readers or editors.
+# 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. If left blank `rtf' will be used as the default path.
+# 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.
+# 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 other 
-# programs which support those fields. 
-# Note: wordpad (write) and others do not support links.
+# 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 style sheet 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.
+# 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.
+# 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
+# Configuration options related to the man page output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
-# generate man pages
+# 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. If left blank `man' will be used as the default path.
+# 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 (default is the subroutine's section .3)
+# 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
 
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
-# would be unable to find the correct page. The default is NO.
+# 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
+# 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.
+# 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. If left blank `xml' will be used as the default path.
+# 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
 
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_SCHEMA             = 
-
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_DTD                = 
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
-# enabling this will significantly increase the size of the XML output.
+# 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
+# Configuration options related to the DOCBOOK output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_DOCBOOK tag is set to YES Doxygen will generate DOCBOOK files 
+# 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. If left blank docbook will be used as the default path.
+# 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
+# Configuration options for the AutoGen Definitions output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
-# and incomplete at the moment.
+# 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
+# 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.
+# 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.
+# 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.
+# 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.
+# 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 = 
 
@@ -1557,111 +1986,130 @@ PERLMOD_MAKEVAR_PREFIX =
 # Configuration options related to the preprocessor
 #---------------------------------------------------------------------------
 
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
-# files.
+# 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 (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
-# way by setting EXPAND_ONLY_PREDEF to 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.
+# 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 default) the includes files 
-# pointed to by INCLUDE_PATH will be searched when a #include is found.
+# 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.
+# 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.
+# 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 
-# 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.
+# 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.
+# 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 (the default) then 
-# doxygen's preprocessor will remove all references to function-like macros 
-# that are alone on a line, have an all uppercase name, and do not end with a 
-# semicolon, because these will confuse the parser if not removed.
+# 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::additions related to external references
+# Configuration options related to external references
 #---------------------------------------------------------------------------
 
-# The TAGFILES option can be used to specify one or more tagfiles. 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. Note that each tag file must have a unique name (where the name does 
-# NOT include the path). If a tag file is not located in the directory in which 
-# doxygen is run, you must also specify the path to the tagfile here.
+# 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               = ../bpp-core/BppCore.tag=../../bpp-core/html \
                          ../bpp-seq/BppSeq.tag=../../bpp-seq/html
 
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
-# a tag file that is based on the input files it reads.
+# 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       = BppRaa.tag
 
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
-# will be listed.
+# 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.
+# 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.
+# 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 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
 
@@ -1669,222 +2117,314 @@ PERL_PATH              = /usr/bin/perl
 # Configuration options related to the dot tool
 #---------------------------------------------------------------------------
 
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
-# or super classes. Setting the tag to NO turns the diagrams off. Note that 
-# this option also works with HAVE_DOT disabled, but it is recommended to 
-# install and use dot, since it yields more powerful graphs.
+# 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 
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
 # default search path.
 
 MSCGEN_PATH            = 
 
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
-# or is not a class.
+# 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, 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)
+# 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               = YES
 
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is 
-# allowed to run in parallel. When set to 0 (the default) doxygen will 
-# base this on the number of processors available in the system. You can set it 
-# explicitly to a value larger than 0 to get control over the balance 
-# between CPU load and processing speed.
+# 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
 
-# By default doxygen will use the Helvetica font for all dot files that 
-# doxygen generates. When you want a differently looking font you can specify 
-# the font name using DOT_FONTNAME. You need to make sure dot is able to find 
-# the font, which can be done by putting it in a standard location or by setting 
-# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the 
-# directory containing the font.
+# 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           = FreeSans
+DOT_FONTNAME           = Helvetica
 
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 
-# The default size is 10pt.
+# 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 Helvetica font. 
-# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to 
-# set the path where dot can find it.
+# 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 and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
-# CLASS_DIAGRAMS tag to NO.
+# 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            = YES
 
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
-# class references variables) of the class with other documented classes.
+# 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 and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for groups, showing the direct groups dependencies
+# 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 
+# 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 
-# managable. Set this to 0 for no limit. Note that the threshold may be 
-# exceeded by 50% before the limit is enforced.
+# 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 set to YES, the inheritance and collaboration graphs will show the 
-# relations between templates and their instances.
+# 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     = YES
 
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
-# other documented files.
+# 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 ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
-# indirectly include this file.
+# 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 and HAVE_DOT options are set to YES then 
-# doxygen will generate a call dependency graph for every global function 
-# or class method. Note that enabling this option will significantly increase 
-# the time of a run. So in most cases it will be better to enable call graphs 
-# for selected functions only using the \callgraph command.
+# 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 and HAVE_DOT tags are set to YES then 
-# doxygen will generate a caller dependency graph for every global function 
-# or class method. Note that enabling this option will significantly increase 
-# the time of a run. So in most cases it will be better to enable caller 
-# graphs for selected functions only using the \callergraph command.
+# 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 and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graphical hierarchy of all classes instead of a textual one.
+# 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 and HAVE_DOT tags are set to YES 
-# then doxygen will show the dependencies a directory has on other directories 
-# in a graphical way. The dependency relations are determined by the #include 
-# relations between the files in the directories.
+# 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. Possible values are svg, png, jpg, or gif. 
-# If left blank png will be used. 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).
+# 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. 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.
+# 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 tag DOT_PATH can be used to specify the path where the dot tool can be 
+# 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).
+# 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).
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
 
 MSCFILE_DIRS           = 
 
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
-# nodes that will be shown in the graph. If the number of nodes in a graph 
-# becomes larger than this value, doxygen will truncate the graph, which is 
-# visualized by representing a node as a red box. Note that doxygen if the 
-# number of direct children of the root node in a graph is already larger than 
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# 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 
+# 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).
+# 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 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.
+# 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      = YES
 
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
-# arrows in the dot generated graphs.
+# 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 (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
-# the various graphs.
+# 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/INSTALL.txt b/INSTALL.txt
index c8859da..8c499db 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -1,12 +1,23 @@
-This software needs cmake >= 2.6 to build.
+This software needs cmake >= 2.8.11 and a C++11 capable compiler to build
 
 After installing cmake, run it with the following command:
-cmake -DCMAKE_INSTALL_PREFIX=[where to install, for instance /usr/local or $HOME/.local] .
+$ cmake -DCMAKE_INSTALL_PREFIX=[where to install, for instance /usr/local or $HOME/.local] .
 
 If available, you can also use ccmake instead of cmake for a more user-friendly interface.
 
-Then compile and install the software with
-make install
+Then compile and install the software with:
+$ make install
 
 You may also consider installing and using the software checkinstall for easier system administration.
 
+If you install Bio++ in a non standard path (not /usr/), remember that:
+-> if you compile your project with CMake, give it the path with -DCMAKE_PREFIX_PATH=<path>
+-> if you compile with something else, give the path to the compiler (-I / -L options)
+-> if you use shared libraries, you must also tell programs where to find them at startup:
+  -> either by adding the path to LD_LIBRARY_PATH environment variable.
+  -> or by using RPATHs to hard code the path in the executable (generates NON PORTABLE executables !)
+    -> with CMake, see documentation in bpp-core/cmake/project-template
+    -> or see your compiler documentation ("-Wl,-rpath,<path>" for clang/gcc)
+    -> consider installing Bio++ with the "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" option
+
+Detailed documentation for using Bio++ with CMake are available in bpp-core/cmake/
diff --git a/bpp-raa.spec b/bpp-raa.spec
index 71752e0..87834ca 100644
--- a/bpp-raa.spec
+++ b/bpp-raa.spec
@@ -1,5 +1,5 @@
 %define _basename bpp-raa
-%define _version 2.2.0
+%define _version 2.3.1
 %define _release 1
 %define _prefix /usr
 
@@ -17,11 +17,11 @@ Requires: bpp-core = %{_version}
 Requires: bpp-seq = %{_version}
 
 BuildRoot: %{_builddir}/%{_basename}-root
-BuildRequires: cmake >= 2.6.0
-BuildRequires: gcc-c++ >= 4.0.0
-BuildRequires: libbpp-core2 = %{_version}
+BuildRequires: cmake >= 2.8.11
+BuildRequires: gcc-c++ >= 4.7.0
+BuildRequires: libbpp-core3 = %{_version}
 BuildRequires: libbpp-core-devel = %{_version}
-BuildRequires: libbpp-seq9 = %{_version}
+BuildRequires: libbpp-seq11 = %{_version}
 BuildRequires: libbpp-seq-devel = %{_version}
 BuildRequires: zlib >= 1.2.3
 BuildRequires: zlib-devel >= 1.2.3
@@ -33,21 +33,21 @@ AutoProv: yes
 This library contains utilitary and classes to query public database (GenBank, EMBL, SwissProt, etc) using acnuc.
 It is part of the Bio++ project.
 
-%package -n libbpp-raa1
+%package -n libbpp-raa3
 Summary: Bio++ Remote Acnuc Access library
 Group: Development/Libraries/C and C++
 
-%description -n libbpp-raa1
+%description -n libbpp-raa3
 This library contains utilitary and classes to query public database (GenBank, EMBL, SwissProt, etc) using acnuc.
 It is part of the Bio++ project.
 
 %package -n libbpp-raa-devel
 Summary: Libraries, includes to develop applications with %{_basename}
 Group: Development/Libraries/C and C++
-Requires: libbpp-raa1 = %{_version}
-Requires: libbpp-seq9 = %{_version}
+Requires: libbpp-raa3 = %{_version}
+Requires: libbpp-seq11 = %{_version}
 Requires: libbpp-seq-devel = %{_version}
-Requires: libbpp-core2 = %{_version}
+Requires: libbpp-core3 = %{_version}
 Requires: libbpp-core-devel = %{_version}
 Requires: zlib >= 1.2.3
 Requires: zlib-devel >= 1.2.3
@@ -62,9 +62,6 @@ building applications which use %{_basename}.
 %build
 CFLAGS="$RPM_OPT_FLAGS"
 CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=%{_prefix} -DBUILD_TESTING=OFF"
-if [ %{_lib} == 'lib64' ] ; then
-  CMAKE_FLAGS="$CMAKE_FLAGS -DLIB_SUFFIX=64"
-fi
 cmake $CMAKE_FLAGS .
 make
 
@@ -74,103 +71,11 @@ make DESTDIR=$RPM_BUILD_ROOT install
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post -n libbpp-raa1 -p /sbin/ldconfig
-
-%post -n libbpp-raa-devel
-createGeneric() {
-  echo "-- Creating generic include file: $1.all"
-  #Make sure we run into subdirectories first:
-  dirs=()
-  for file in "$1"/*
-  do
-    if [ -d "$file" ]
-    then
-      # Recursion:
-      dirs+=( "$file" )
-    fi
-  done
-  for dir in ${dirs[@]}
-  do
-    createGeneric $dir
-  done
-  #Now list all files, including newly created .all files:
-  if [ -f $1.all ]
-  then
-    rm $1.all
-  fi
-  dir=`basename $1`
-  for file in "$1"/*
-  do
-    if [ -f "$file" ] && ( [ "${file##*.}" == "h" ] || [ "${file##*.}" == "all" ] )
-    then
-      file=`basename $file`
-      echo "#include \"$dir/$file\"" >> $1.all
-    fi
-  done;
-}
-# Actualize .all files
-createGeneric %{_prefix}/include/Bpp
-exit 0
-
-%preun -n libbpp-raa-devel
-removeGeneric() {
-  if [ -f $1.all ]
-  then
-    echo "-- Remove generic include file: $1.all"
-    rm $1.all
-  fi
-  for file in "$1"/*
-  do
-    if [ -d "$file" ]
-    then
-      # Recursion:
-      removeGeneric $file
-    fi
-  done
-}
-# Actualize .all files
-removeGeneric %{_prefix}/include/Bpp
-exit 0
-
-%postun -n libbpp-raa1 -p /sbin/ldconfig
-
-%postun -n libbpp-raa-devel
-createGeneric() {
-  echo "-- Creating generic include file: $1.all"
-  #Make sure we run into subdirectories first:
-  dirs=()
-  for file in "$1"/*
-  do
-    if [ -d "$file" ]
-    then
-      # Recursion:
-      dirs+=( "$file" )
-    fi
-  done
-  for dir in ${dirs[@]}
-  do
-    createGeneric $dir
-  done
-  #Now list all files, including newly created .all files:
-  if [ -f $1.all ]
-  then
-    rm $1.all
-  fi
-  dir=`basename $1`
-  for file in "$1"/*
-  do
-    if [ -f "$file" ] && ( [ "${file##*.}" == "h" ] || [ "${file##*.}" == "all" ] )
-    then
-      file=`basename $file`
-      echo "#include \"$dir/$file\"" >> $1.all
-    fi
-  done;
-}
-# Actualize .all files
-createGeneric %{_prefix}/include/Bpp
-exit 0
-
-%files -n libbpp-raa1
+%post -n libbpp-raa3 -p /sbin/ldconfig
+
+%postun -n libbpp-raa3 -p /sbin/ldconfig
+
+%files -n libbpp-raa3
 %defattr(-,root,root)
 %doc AUTHORS.txt COPYING.txt INSTALL.txt ChangeLog
 %{_prefix}/%{_lib}/lib*.so.*
@@ -178,11 +83,18 @@ exit 0
 %files -n libbpp-raa-devel
 %defattr(-,root,root)
 %doc AUTHORS.txt COPYING.txt INSTALL.txt ChangeLog
+%dir %{_prefix}/%{_lib}/cmake/
+%dir %{_prefix}/%{_lib}/cmake/bpp-raa
 %{_prefix}/%{_lib}/lib*.so
 %{_prefix}/%{_lib}/lib*.a
+%{_prefix}/%{_lib}/cmake/bpp-raa/bpp-raa*.cmake
 %{_prefix}/include/*
 
 %changelog
+* Tue Jun 06 2017 Julien Dutheil <julien.dutheil at univ-montp2.fr> 2.3.1-1
+- Increased interface number
+* Wed May 10 2017 Julien Dutheil <julien.dutheil at univ-montp2.fr> 2.3.0-1
+- Compatibility update.
 * Mon Sep 22 2014 Julien Dutheil <julien.dutheil at univ-montp2.fr> 2.2.0-1
 - Compatibility update.
 * Thu Mar 07 2013 Julien Dutheil <julien.dutheil at univ-montp2.fr> 2.1.0-1
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index 34b9331..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,42 +0,0 @@
-libbpp-raa (2.2.0-1) unstable; urgency=low
-
-  * Recompilation because of dependencies.
-
- -- Julien Dutheil <julien.dutheil at univ-montp2.fr>  Mon, 22 Sep 2014 14:00:00 +0100
-
-libbpp-raa (2.1.0-1) unstable; urgency=low
-
-  * Recompilation because of dependencies.
-
- -- Julien Dutheil <julien.dutheil at univ-montp2.fr>  Thu, 07 Mar 2013 11:46:00 +0100
-
-libbpp-raa (2.0.3-1) unstable; urgency=low
-
-  * Recompilation because of dependencies.
-
- -- Julien Dutheil <julien.dutheil at univ-montp2.fr>  Thu, 09 Feb 2012 16:45:00 +0100
-
-libbpp-raa (2.0.2-1) unstable; urgency=low
-
-  * RFP: Bio++ -- The Bio++ bioinformatics libraries. (Closes: #616373).
-  * Packages are now non-native.
-
- -- Julien Dutheil <julien.dutheil at univ-montp2.fr>  Thu, 09 Jun 2011 11:00:00 +0100
-
-libbpp-raa (2.0.1) unstable; urgency=low
-
-   * Fixed copyright and rules issue in package.
-
- -- Julien Dutheil <julien.dutheil at univ-montp2.fr>  Mon, 28 Feb 2011 09:00:00 +0100
-
-libbpp-raa (2.0.0) unstable; urgency=low
-
-  * Compatibility with Bio++ 2.0.0.
-
- -- Julien Dutheil <julien.dutheil at univ-montp2.fr>  Mon, 07 Feb 2011 09:00:00 +0100
-
-libbpp-raa (1.0.0) unstable; urgency=low
-
-  * Initial Release.
-
- -- Julien Dutheil <julien.dutheil at univ-montp2.fr>  Thu, 25 Mar 2010 15:30:13 +0100
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index 7ed6ff8..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-5
diff --git a/debian/control b/debian/control
deleted file mode 100644
index afdd804..0000000
--- a/debian/control
+++ /dev/null
@@ -1,29 +0,0 @@
-Source: libbpp-raa
-Section: libs
-Priority: optional
-Maintainer: Loic Dachary <loic at dachary.org>
-Uploaders: Julien Dutheil <julien.dutheil at univ-montp2.fr>
-Build-Depends: debhelper (>= 5), cmake (>= 2.6),
-  zlib1g-dev (>= 1.2.3), libbpp-seq-dev (>= 2.2.0), zlib1g (>= 1.2.3)
-Standards-Version: 3.9.4
-
-Package: libbpp-raa-dev
-Section: libdevel
-Architecture: any
-Depends: libbpp-raa1 (= ${binary:Version}), ${misc:Depends},
-  zlib1g-dev (>= 1.2.3), libbpp-seq-dev (>= 2.2.0)
-Description: Bio++ Remote Acnuc Access library development files.
- This library contains utilitary and classes to query public databases
- (GenBank, EMBL, SwissProt, etc) using acnuc.
- It is part of the Bio++ project.
-
-Package: libbpp-raa1
-Section: libs
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends},
-  zlib1g (>= 1.2.3), libbpp-seq9 (>= 2.2.0)
-Description: Bio++ Remote Acnuc Access library.
- This library contains utilitary and classes to query public databases
- (GenBank, EMBL, SwissProt, etc) using acnuc.
- It is part of the Bio++ project.
-
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index f8e692e..0000000
--- a/debian/copyright
+++ /dev/null
@@ -1,66 +0,0 @@
-This package was debianized by Julien Dutheil <julien.dutheil at univ-montp2.fr> on
-Thu, 22 Sep 2014 14:00:00 +0100.
-
-It was downloaded from <http://kimura.univ-montp2.fr/Repositories/sources>
-
-Upstream Author: 
-
-    Julien Dutheil <julien.dutheil at univ-montp2.fr>
-
-Copyright: 
-
-    Copyright (C) 2014 Bio++ Development Team
-
-License:
-
-    This package is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
- 
-    This package is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
- 
-    You should have received a copy of the GNU General Public License
-    along with this package; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-
-On Debian systems, the complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL'.
-
-The Debian packaging is (C) 2014, Julien Dutheil <julien.dutheil at univ-montp2.fr> and
-is licensed under the GPL, see above.
-
-The provided software is distributed under the CeCILL license:
-
-    This software is governed by the CeCILL license under French law and
-    abiding by the rules of distribution of free software.  You can  use, 
-    modify and/ or redistribute the software under the terms of the CeCILL
-    license as circulated by CEA, CNRS and INRIA at the following URL
-    "http://www.cecill.info". 
-
-    As a counterpart to the access to the source code and  rights to copy,
-    modify and redistribute granted by the license, users are provided only
-    with a limited warranty  and the software's author,  the holder of the
-    economic rights,  and the successive licensors  have only  limited
-    liability. 
-
-    In this respect, the user's attention is drawn to the risks associated
-    with loading,  using,  modifying and/or developing or reproducing the
-    software by the user in light of its specific status of free software,
-    that may mean  that it is complicated to manipulate,  and  that  also
-    therefore means  that it is reserved for developers  and  experienced
-    professionals having in-depth computer knowledge. Users are therefore
-    encouraged to load and test the software's suitability as regards their
-    requirements in conditions enabling the security of their systems and/or 
-    data to be ensured and,  more generally, to use and operate it in the 
-    same conditions as regards security. 
-
-    The fact that you are presently reading this means that you have had
-    knowledge of the CeCILL license and that you accept its terms.
-    
-The complete text of the license may be found here:
-http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
-
diff --git a/debian/libbpp-raa-dev.install b/debian/libbpp-raa-dev.install
deleted file mode 100644
index 7d74f2b..0000000
--- a/debian/libbpp-raa-dev.install
+++ /dev/null
@@ -1,3 +0,0 @@
-debian/tmp/usr/include/*
-debian/tmp/usr/lib/lib*.a
-debian/tmp/usr/lib/lib*.so
diff --git a/debian/libbpp-raa1.install b/debian/libbpp-raa1.install
deleted file mode 100644
index c45ebcf..0000000
--- a/debian/libbpp-raa1.install
+++ /dev/null
@@ -1 +0,0 @@
-debian/tmp/usr/lib/lib*.so.*
diff --git a/debian/postinst b/debian/postinst
deleted file mode 100755
index cff89b1..0000000
--- a/debian/postinst
+++ /dev/null
@@ -1,57 +0,0 @@
-#! /bin/bash
-
-# Abort if any command returns an error value
-set -e
-
-createGeneric() {
-  echo "-- Creating generic include file: $1.all"
-  #Make sure we run into subdirectories first:
-  dirs=()
-  for file in "$1"/*
-  do
-    if [ -d "$file" ]
-    then
-      # Recursion:
-      dirs+=( "$file" )
-    fi
-  done
-  for dir in ${dirs[@]}
-  do
-    createGeneric $dir
-  done
-  #Now list all files, including newly created .all files:
-  if [ -f $1.all ]
-  then
-    rm $1.all
-  fi
-  dir=`basename $1`
-  for file in "$1"/*
-  do
-    if [ -f "$file" ] && ( [ "${file##*.}" == "h" ] || [ "${file##*.}" == "all" ] )
-    then
-      file=`basename $file`
-      echo "#include \"$dir/$file\"" >> $1.all
-    fi
-  done;
-}
-
-case "$1" in
-  configure)
-    # Actualize .all files
-    createGeneric /usr/include/Bpp
-  ;;
-  abort-upgrade|abort-remove|abort-deconfigure)
-    echo "$1"
-  ;;
-  *)
-    echo "postinst called with unknown argument \`\$1'" >&2
-    exit 0
-  ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/postrm b/debian/postrm
deleted file mode 100755
index 744f8b1..0000000
--- a/debian/postrm
+++ /dev/null
@@ -1,59 +0,0 @@
-#! /bin/bash
-
-# Abort if any command returns an error value
-set -e
-
-createGeneric() {
-  echo "-- Creating generic include file: $1.all"
-  #Make sure we run into subdirectories first:
-  dirs=()
-  for file in "$1"/*
-  do
-    if [ -d "$file" ]
-    then
-      # Recursion:
-      dirs+=( "$file" )
-    fi
-  done
-  for dir in ${dirs[@]}
-  do
-    createGeneric $dir
-  done
-  #Now list all files, including newly created .all files:
-  if [ -f $1.all ]
-  then
-    rm $1.all
-  fi
-  dir=`basename $1`
-  for file in "$1"/*
-  do
-    if [ -f "$file" ] && ( [ "${file##*.}" == "h" ] || [ "${file##*.}" == "all" ] )
-    then
-      file=`basename $file`
-      echo "#include \"$dir/$file\"" >> $1.all
-    fi
-  done;
-}
-
-case "$1" in
-  remove)
-    # Automatically added by dh_makeshlibs
-    ldconfig
-    # Actualize .all files
-    createGeneric /usr/include/Bpp
-  ;;
-  purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-    echo $1
-  ;;
-  *)
-    echo "postrm called with unknown argument \`\$1'" >&2
-    exit 0
-  ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/prerm b/debian/prerm
deleted file mode 100755
index 8fab52e..0000000
--- a/debian/prerm
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /bin/bash
-
-# Abort if any command returns an error value
-set -e
-
-removeGeneric() {
-  if [ -f $1.all ]
-  then
-    echo "-- Remove generic include file: $1.all"
-    rm $1.all
-  fi
-  for file in "$1"/*
-  do
-    if [ -d "$file" ]
-    then
-      # Recursion:
-      removeGeneric $file
-    fi
-  done
-}
-
-case "$1" in
-  remove|upgrade|deconfigure)
-    # Actualize .all files
-    removeGeneric /usr/include/Bpp
-  ;;
-  failed-upgrade)
-    echo "$1"
-  ;;
-  *)
-    echo "prerm called with unknown argument \`$1'" >&2
-    exit 1
-  ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index aa1aeed..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-
-# 24/01/10 Modification for use with CMake by Julien Dutheil.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-
-CFLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -O0
-else
-	CFLAGS += -O2
-endif
-
-# shared library versions
-version=`ls src/lib*.so.* | \
- awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
-major=`ls src/lib*.so.* | \
- awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
-
-configure:
-	cmake -DCMAKE_INSTALL_PREFIX=/usr .
-
-config.status: configure
-	dh_testdir
-
-build: build-arch build-indep
-build-arch: build-stamp
-build-indep: build-stamp
-build-stamp:  config.status
-	dh_testdir
-
-	# Add here commands to compile the package.
-	$(MAKE)
-
-	touch $@
-
-clean:
-	dh_testdir
-	dh_testroot
-
-	# Add here commands to clean up after the build process.
-	[ ! -f Makefile ] || $(MAKE) clean;
-	[ ! -f Makefile ] || rm Makefile;
-	[ ! -f src/Makefile ] || rm src/Makefile;
-	rm -f config.sub config.guess
-	rm -f build-stamp
-	rm -f CMakeCache.txt
-	rm -f *.cmake
-	rm -f src/*.cmake
-	#rm -f test/*.cmake
-	rm -rf CMakeFiles
-	rm -rf src/CMakeFiles
-	#rm -rf test/CMakeFiles
-	rm -rf _CPack_Packages
-	#rm -rf Testing
-	#rm -f DartConfiguration.tcl
-
-	dh_clean 
-
-install: build
-	dh_testdir
-	dh_testroot
-	dh_prep
-	dh_installdirs
-
-	# Add here commands to install the package into debian/tmp
-	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
-
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_installchangelogs ChangeLog
-	dh_installdocs
-	dh_installexamples
-	dh_install
-#	dh_installmenu
-#	dh_installdebconf	
-#	dh_installlogrotate
-#	dh_installemacsen
-#	dh_installpam
-#	dh_installmime
-#	dh_installinit
-#	dh_installcron
-#	dh_installinfo
-	dh_installman
-	dh_link
-	dh_strip
-	dh_compress
-	dh_fixperms
-#	dh_perl
-#	dh_python
-	dh_makeshlibs
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install 
diff --git a/debian/source/format b/debian/source/format
deleted file mode 100644
index 163aaf8..0000000
--- a/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (quilt)
diff --git a/header.html b/header.html
new file mode 100644
index 0000000..a32a5fc
--- /dev/null
+++ b/header.html
@@ -0,0 +1,27 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/xhtml;charset=utf-8" />
+    <meta http-equiv="Content-Style-Type" content="text/css" />
+    <meta http-equiv="Content-Language" content="en" />
+		<link href="doxygen.css" rel="stylesheet" type="text/css">
+    <link href="tabs.css" rel="stylesheet" type="text/css">
+	</head>
+
+	<body>
+		<div id="banner">	
+      <h1><a href="http://kimura.univ-montp2.fr/BioPP/" accesskey="1" target="_top">Bio++</a> Class documentation</h1>
+    </div>
+
+    <div class="tabs">
+      <ul>
+        <li><a href="http://kimura.univ-montp2.fr/BioPP/Documents/ClassDocumentation/Utils/html/index.html" target="_top"><span>Utils</span></a></li>
+        <li><a href="http://kimura.univ-montp2.fr/BioPP/Documents/ClassDocumentation/NumCalc/html/index.html" target="_top"><span>NumCalc</span></a></li>
+        <li><a href="http://kimura.univ-montp2.fr/BioPP/Documents/ClassDocumentation/Seq/html/index.html" target="_top"><span>SeqLib</span></a></li>
+        <li><a href="http://kimura.univ-montp2.fr/BioPP/Documents/ClassDocumentation/Phyl/html/index.html" target="_top"><span>PhylLib</span></a></li>
+        <li><a href="http://kimura.univ-montp2.fr/BioPP/Documents/ClassDocumentation/Pop/html/index.html" target="_top"><span>PopGenLib</span></a></li>
+        <li><a href="http://kimura.univ-montp2.fr/BioPP/Documents/ClassDocumentation/Raa/html/index.html" target="_top"><span>Raa</span></a></li>
+      </ul>
+    </div>
+
+		<br />
+
diff --git a/package.cmake.in b/package.cmake.in
new file mode 100644
index 0000000..55440a3
--- /dev/null
+++ b/package.cmake.in
@@ -0,0 +1,26 @@
+# CMake package file for Bio++ Remote Acnuc Access
+# Authors:
+#   Francois Gindraud (2017)
+# Created: 16/03/2017
+ at PACKAGE_INIT@
+
+if (NOT @PROJECT_NAME at _FOUND)
+  # Deps
+  find_package (bpp-seq @bpp-seq_VERSION@ REQUIRED)
+  # Add targets
+  include ("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME at -targets.cmake")
+  # Append targets to convenient lists
+  set (BPP_LIBS_STATIC "${BPP_LIBS_STATIC}" @PROJECT_NAME at -static)
+  set (BPP_LIBS_SHARED "${BPP_LIBS_SHARED}" @PROJECT_NAME at -shared)
+  # Print some path info for targets
+  get_property (static-location TARGET @PROJECT_NAME at -static PROPERTY LOCATION)
+  get_property (shared-location TARGET @PROJECT_NAME at -shared PROPERTY LOCATION)
+  get_property (header-location TARGET @PROJECT_NAME at -static PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
+  message (STATUS "@PROJECT_NAME@ @PROJECT_VERSION@ found:")
+  message (STATUS "  static lib: ${static-location}")
+  message (STATUS "  shared lib: ${shared-location}")
+  message (STATUS "  includes: ${header-location}")
+  unset (static-location)
+  unset (shared-location)
+  unset (header-location)
+endif (NOT @PROJECT_NAME at _FOUND)
diff --git a/src/Bpp/Raa.all b/src/Bpp/Raa.all
deleted file mode 100644
index 08ab51b..0000000
--- a/src/Bpp/Raa.all
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "Raa/RaaSpeciesTree.h"
-#include "Raa/parser.h"
-#include "Raa/RaaList.h"
-#include "Raa/RaaSeqAttributes.h"
-#include "Raa/RAA_acnuc.h"
-#include "Raa/RAA.h"
diff --git a/src/Bpp/Raa/RAA.cpp b/src/Bpp/Raa/RAA.cpp
index 4127f9c..9d5594a 100644
--- a/src/Bpp/Raa/RAA.cpp
+++ b/src/Bpp/Raa/RAA.cpp
@@ -1,6 +1,6 @@
 /*
  *  RAA.cpp
- *  
+ *
  *
  */
 
@@ -8,548 +8,638 @@
 #include "RAA.h"
 
 extern "C" {
-	int get_ncbi_gc_number(int gc);
-	int sock_printf(raa_db_access  *raa_current_db, const char *fmt, ...);
-	}
+int get_ncbi_gc_number(int gc);
+int sock_printf(raa_db_access* raa_current_db, const char* fmt, ...);
+}
 
 using namespace std;
 using namespace bpp;
 
-RAA::RAA(const string &dbname, int port, const string &server) throw (int)
+RAA::RAA(const string& dbname, int port, const string& server) throw (int)
 {
-	kw_pattern = NULL;
-	current_address.div = -1;
-	int error = raa_acnucopen_alt((char *)server.c_str(), port, (char *)dbname.c_str(), (char *)"Bio++", &raa_data);
-	if(error) {
-		throw error;
-		}
+  kw_pattern = NULL;
+  current_address.div = -1;
+  int error = raa_acnucopen_alt((char*)server.c_str(), port, (char*)dbname.c_str(), (char*)"Bio++", &raa_data);
+  if (error)
+  {
+    throw error;
+  }
 }
 
 
-RAA::RAA(int port, const string &server) throw(int)
+RAA::RAA(int port, const string& server) throw (int)
 {
-	kw_pattern = NULL;
-	int error = raa_open_socket((char *)server.c_str(), port, (char *)"Bio++", &raa_data);
-	if(error) {
-		throw error;
-	}
+  kw_pattern = NULL;
+  int error = raa_open_socket((char*)server.c_str(), port, (char*)"Bio++", &raa_data);
+  if (error)
+  {
+    throw error;
+  }
 }
 
 
 RAA::~RAA()
 {
-	if(raa_data != NULL) raa_acnucclose(raa_data);
-	if(kw_pattern) delete kw_pattern;
+  if (raa_data != NULL)
+    raa_acnucclose(raa_data);
+  if (kw_pattern)
+    delete kw_pattern;
 }
 
 
-Sequence *RAA::getSeq_both(const string &name_or_accno, int rank, int maxlength)
+Sequence* RAA::getSeq_both(const string& name_or_accno, int rank, int maxlength)
 {
-	int length;
-	char *name, *description;
-	if(rank == 0) name = raa_getattributes(raa_data, name_or_accno.c_str(), &rank, &length, NULL, NULL, NULL, 
-											  &description, NULL, NULL);
-	else name = raa_seqrank_attributes(raa_data, rank, &length, NULL, NULL, NULL, 
-								   &description, NULL, NULL);
-	if(length > maxlength) return NULL;
-	string sname = name;
-	vector<string> comment(1, string(description) );
-	string *cseq = new string(length + 1, ' ');
-	if(cseq == NULL) return NULL;
-	raa_gfrag(this->raa_data, rank, 1, length, (char *)cseq->data());
-	cseq->resize(length);
-	const Alphabet *alphab;
-	if(raa_data->swissprot || raa_data->nbrf) alphab = &AlphabetTools::PROTEIN_ALPHABET;
-	else alphab = &AlphabetTools::DNA_ALPHABET;
-	Sequence *seq = new BasicSequence(sname, *cseq, comment, alphab);
-	delete cseq;
-	return seq;
+  int length;
+  char* name, * description;
+  if (rank == 0)
+    name = raa_getattributes(raa_data, name_or_accno.c_str(), &rank, &length, NULL, NULL, NULL,
+                             &description, NULL, NULL);
+  else
+    name = raa_seqrank_attributes(raa_data, rank, &length, NULL, NULL, NULL,
+                                  &description, NULL, NULL);
+  if (length > maxlength)
+    return NULL;
+  string sname = name;
+  vector<string> comment(1, string(description) );
+  string* cseq = new string(length + 1, ' ');
+  if (cseq == NULL)
+    return NULL;
+  raa_gfrag(this->raa_data, rank, 1, length, (char*)cseq->data());
+  cseq->resize(length);
+  const Alphabet* alphab;
+  if (raa_data->swissprot || raa_data->nbrf)
+    alphab = &AlphabetTools::PROTEIN_ALPHABET;
+  else
+    alphab = &AlphabetTools::DNA_ALPHABET;
+  Sequence* seq = new BasicSequence(sname, *cseq, comment, alphab);
+  delete cseq;
+  return seq;
 }
 
 
-Sequence *RAA::getSeq(const string &name_or_accno, int maxlength)
+Sequence* RAA::getSeq(const string& name_or_accno, int maxlength)
+{
+  return getSeq_both(name_or_accno, 0, maxlength);
+}
+
+
+Sequence* RAA::getSeq(int seqrank, int maxlength)
 {
-	return getSeq_both(name_or_accno, 0, maxlength);
+  if (seqrank < 2 || seqrank > raa_data->nseq)
+    return NULL;
+  return getSeq_both(string(""), seqrank, maxlength);
 }
 
 
-Sequence *RAA::getSeq(int seqrank, int maxlength)
+int RAA::getSeqFrag(int seqrank, int first, int length, string& sequence)
 {
-	if(seqrank < 2 || seqrank > raa_data->nseq) return NULL;
-	return getSeq_both(string(""), seqrank, maxlength);
+  if (seqrank < 2 || seqrank > raa_data->nseq)
+    return 0;
+  sequence = "";
+  char* p = (char*)malloc(length + 1);
+  if (p == NULL)
+    return 0;
+  int l = raa_gfrag(this->raa_data, seqrank, first, length, p);
+  if (l > 0)
+  {
+    majuscules(p);
+    sequence = p;
+  }
+  free(p);
+  return l;
 }
 
 
-int RAA::getSeqFrag(int seqrank, int first, int length, string &sequence)
+int RAA::getSeqFrag(const string& name_or_accno, int first, int length, string& sequence)
 {
-	if(seqrank < 2 || seqrank > raa_data->nseq) return 0;
-	sequence = "";
-	char *p = (char *)malloc(length + 1);
-	if(p == NULL) return 0;
-	int l = raa_gfrag(this->raa_data, seqrank, first, length, p);
-	if(l > 0) {
-		majuscules(p);
-		sequence = p;
-		}
-	free(p);
-	return l;
+  int seqrank;
+  raa_getattributes(raa_data, name_or_accno.c_str(), &seqrank, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+  if (seqrank == 0)
+    return 0;
+  return getSeqFrag(seqrank, first, length, sequence);
 }
 
 
-int RAA::getSeqFrag(const string &name_or_accno, int first, int length, string &sequence)
+RaaSeqAttributes* RAA::getAttributes(const string& name_or_accno)
 {
-	int seqrank;
-	raa_getattributes(raa_data, name_or_accno.c_str(), &seqrank, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-	if(seqrank == 0) return 0;
-	return getSeqFrag(seqrank, first, length, sequence);
+  char* description, * species, * access;
+  int acnuc_gc, rank, length, frame;
+  char* name = raa_getattributes(this->raa_data, name_or_accno.c_str(), &rank, &length,
+                                 &frame, &acnuc_gc, &access, &description, &species, NULL);
+  if (!name)
+  {
+    return NULL;
+  }
+  RaaSeqAttributes* myattr = new RaaSeqAttributes();
+  myattr->raa = this;
+  myattr->rank = rank;
+  myattr->length = length;
+  myattr->frame = frame;
+  myattr->name = name;
+  myattr->description = description;
+  myattr->accno = access;
+  myattr->species = species;
+  myattr->ncbi_gc = get_ncbi_gc_number(acnuc_gc);
+  return myattr;
 }
 
 
-RaaSeqAttributes *RAA::getAttributes(const string &name_or_accno)
+RaaSeqAttributes* RAA::getAttributes(int seqrank)
 {
-	char *description, *species, *access;
-	int acnuc_gc;
-	RaaSeqAttributes *myattr = new RaaSeqAttributes();
-	char *name = raa_getattributes(this->raa_data, name_or_accno.c_str(), &myattr->rank, &myattr->length, 
-						&myattr->frame, &acnuc_gc, &access, &description, &species, NULL);
-	myattr->raa = this;
-	myattr->name = name;
-	myattr->description = description;
-	myattr->accno = access;
-	myattr->species = species;
-	myattr->ncbi_gc = get_ncbi_gc_number(acnuc_gc);
-	return myattr;
+  char* description, * species, * access;
+  int acnuc_gc;
+  if (seqrank < 2 || seqrank > raa_data->nseq)
+    return NULL;
+  RaaSeqAttributes* myattr = new RaaSeqAttributes();
+  char* name = raa_seqrank_attributes(this->raa_data, seqrank, &myattr->length,
+                                      &myattr->frame, &acnuc_gc, &access, &description, &species, NULL);
+  if (name == NULL)
+    return NULL;
+  myattr->rank = seqrank;
+  myattr->raa = this;
+  myattr->name =  name;
+  myattr->description = description;
+  myattr->accno = access;
+  myattr->species = species;
+  myattr->ncbi_gc = get_ncbi_gc_number(acnuc_gc);
+  return myattr;
 }
 
 
-RaaSeqAttributes *RAA::getAttributes(int seqrank)
+int RAA::knownDatabases(vector<string>& name, vector<string>& description)
 {
-	char *description, *species, *access;
-	int acnuc_gc;
-	if(seqrank < 2 || seqrank > raa_data->nseq) return NULL;
-	RaaSeqAttributes *myattr = new RaaSeqAttributes();
-	char *name = raa_seqrank_attributes(this->raa_data, seqrank, &myattr->length, 
-								   &myattr->frame, &acnuc_gc, &access, &description, &species, NULL);
-	if(name == NULL) return NULL;
-	myattr->rank =seqrank;
-	myattr->raa = this;
-	myattr->name=  name;
-	myattr->description = description;
-	myattr->accno = access;
-	myattr->species = species;
-	myattr->ncbi_gc = get_ncbi_gc_number(acnuc_gc);
-	return myattr;
-}
-
+  char** cname, ** cdescription;
 
-int RAA::knownDatabases(vector<string> &name, vector<string> &description)
-{
-	char **cname, **cdescription;
-	
-	int count = raa_knowndbs(raa_data, &cname, &cdescription);
-	name.resize(count);
-	description.resize(count);
-	for(int i = 0; i < count; i++) {
-		name[i] = cname[i]; free(cname[i]);
-		description[i] = cdescription[i]; free(cdescription[i]);
-		}
-	if(count > 0) { free(cname); free(cdescription); }
-	return count;
+  int count = raa_knowndbs(raa_data, &cname, &cdescription);
+  name.resize(count);
+  description.resize(count);
+  for (int i = 0; i < count; i++)
+  {
+    name[i] = cname[i]; free(cname[i]);
+    description[i] = cdescription[i]; free(cdescription[i]);
+  }
+  if (count > 0)
+  {
+    free(cname); free(cdescription);
+  }
+  return count;
 }
 
 
-int RAA::openDatabase(const string &dbname, char *(*getpasswordf)(void *), void *p)
+int RAA::openDatabase(const string& dbname, char*(*getpasswordf)(void*), void* p)
 {
-	current_address.div = -1;
-	return raa_opendb_pw(raa_data, (char *)dbname.c_str(), p, getpasswordf);
+  current_address.div = -1;
+  return raa_opendb_pw(raa_data, (char*)dbname.c_str(), p, getpasswordf);
 }
 
 
 void RAA::closeDatabase()
 {
-	sock_fputs(this->raa_data, (char *)"acnucclose\n"); 
-	read_sock(this->raa_data);
+  sock_fputs(this->raa_data, (char*)"acnucclose\n");
+  read_sock(this->raa_data);
 }
 
 
 string RAA::getFirstAnnotLine(int seqrank)
 {
-	if(seqrank < 2 || seqrank > raa_data->nseq) return "";
-	raa_seq_to_annots(raa_data, seqrank, &current_address.faddr, &current_address.div);
-	char *p = raa_read_annots(raa_data, current_address.faddr, current_address.div);
-	string retval(p);
-	return retval;
+  if (seqrank < 2 || seqrank > raa_data->nseq)
+    return "";
+  raa_seq_to_annots(raa_data, seqrank, &current_address.faddr, &current_address.div);
+  char* p = raa_read_annots(raa_data, current_address.faddr, current_address.div);
+  string retval(p);
+  return retval;
 }
 
 
 string RAA::getNextAnnotLine()
 {
-	if(current_address.div == -1) return NULL;
-	char *p = raa_next_annots(raa_data, &current_address.faddr);
-	if(p != NULL) {
-		string retval(p);
-		return retval;
-		}
-	else return NULL;
+  if (current_address.div == -1)
+    return NULL;
+  char* p = raa_next_annots(raa_data, &current_address.faddr);
+  if (p != NULL)
+  {
+    string retval(p);
+    return retval;
+  }
+  else
+    return NULL;
 }
 
 
 RaaAddress RAA::getCurrentAnnotAddress()
 {
-	return current_address;
+  return current_address;
 }
 
 
 string RAA::getAnnotLineAtAddress(RaaAddress address)
 {
-	current_address = address;
-	char *p = raa_read_annots(raa_data, current_address.faddr, current_address.div);
-	string retval(p);
-	return retval;
-}
-
-
-Sequence *RAA::translateCDS(int seqrank) throw(BadCharException)
-{
-	char *descript;
-	if(seqrank < 2 || seqrank > raa_data->nseq) return NULL;
-	char *prot = raa_translate_cds(raa_data, seqrank);
-	if(prot == NULL) return NULL;
-	int l = strlen(prot) - 1;
-	if(l >= 0 && prot[l] == '*') prot[l] = 0;
-	char *name = raa_seqrank_attributes(raa_data, seqrank, NULL, NULL, NULL, NULL, &descript, NULL, NULL);
-	string *sname = new string(name);
-	string *pstring = new string(prot);
-	if(sname == NULL || pstring == NULL) return NULL;
-	Sequence *Sprot;
-	try {
-		Sprot = new BasicSequence(*sname, *pstring, &AlphabetTools::PROTEIN_ALPHABET );
-		}
-	catch (BadCharException e){
-		delete sname;
+  current_address = address;
+  char* p = raa_read_annots(raa_data, current_address.faddr, current_address.div);
+  string retval(p);
+  return retval;
+}
+
+
+Sequence* RAA::translateCDS(int seqrank) throw (BadCharException)
+{
+  char* descript;
+  if (seqrank < 2 || seqrank > raa_data->nseq)
+    return NULL;
+  char* prot = raa_translate_cds(raa_data, seqrank);
+  if (prot == NULL)
+    return NULL;
+  int l = strlen(prot) - 1;
+  if (l >= 0 && prot[l] == '*')
+    prot[l] = 0;
+  char* name = raa_seqrank_attributes(raa_data, seqrank, NULL, NULL, NULL, NULL, &descript, NULL, NULL);
+  string* sname = new string(name);
+  string* pstring = new string(prot);
+  if (sname == NULL || pstring == NULL)
+    return NULL;
+  Sequence* Sprot;
+  try
+  {
+    Sprot = new BasicSequence(*sname, *pstring, &AlphabetTools::PROTEIN_ALPHABET );
+  }
+  catch (BadCharException e)
+  {
+    delete sname;
     delete pstring;
-		throw e;
-		}
-	delete sname;
+    throw e;
+  }
+  delete sname;
   delete pstring;
-	vector<string> comment(1, string(descript) );
-	Sprot->setComments(comment);
-	return Sprot;
+  vector<string> comment(1, string(descript) );
+  Sprot->setComments(comment);
+  return Sprot;
 }
 
 
-Sequence *RAA::translateCDS(const string &name) throw(BadCharException)
+Sequence* RAA::translateCDS(const string& name) throw (BadCharException)
 {
-	int rank;
-	rank = raa_isenum(raa_data, (char *)name.c_str());
-	if(rank == 0) return NULL;
-	Sequence *Sprot;
-	try {
-		Sprot = translateCDS(rank);
-		}
-	catch (BadCharException e){
-		throw e;
-		}
-	return Sprot;
+  int rank;
+  rank = raa_isenum(raa_data, (char*)name.c_str());
+  if (rank == 0)
+    return NULL;
+  Sequence* Sprot;
+  try
+  {
+    Sprot = translateCDS(rank);
+  }
+  catch (BadCharException e)
+  {
+    throw e;
+  }
+  return Sprot;
 }
 
 
 char RAA::translateInitCodon(int seqrank)
 {
-	if(seqrank < 2 || seqrank > raa_data->nseq) return 0;
-	return raa_translate_init_codon(raa_data, seqrank);
+  if (seqrank < 2 || seqrank > raa_data->nseq)
+    return 0;
+  return raa_translate_init_codon(raa_data, seqrank);
 }
 
 
-RaaList *RAA::processQuery(const string &query, const string &listname) throw(string)
+RaaList* RAA::processQuery(const string& query, const string& listname) throw (string)
 {
-	char *message;
-	int type, rank;
-	int err = raa_proc_query(raa_data, (char *)query.c_str(), &message, (char *)listname.c_str(), &rank, NULL, 
-							 NULL, &type);
-	if(err) {
-		string errmess = message;
-		free(message);
-		throw errmess;
-		}
-	RaaList *mylist = new RaaList();
-	mylist->myraa = this;
-	mylist->rank = rank;
-	mylist->name = listname;
-	if(type=='S') mylist->type = &RaaList::LIST_SEQUENCES;
-	else if(type=='K') mylist->type = &RaaList::LIST_KEYWORDS;
-	else mylist->type = &RaaList::LIST_SPECIES;
-	return mylist;
+  char* message;
+  int type, rank;
+  int err = raa_proc_query(raa_data, (char*)query.c_str(), &message, (char*)listname.c_str(), &rank, NULL,
+                           NULL, &type);
+  if (err)
+  {
+    string errmess = message;
+    free(message);
+    throw errmess;
+  }
+  RaaList* mylist = new RaaList();
+  mylist->myraa = this;
+  mylist->rank = rank;
+  mylist->name = listname;
+  if (type == 'S')
+    mylist->type = &RaaList::LIST_SEQUENCES;
+  else if (type == 'K')
+    mylist->type = &RaaList::LIST_KEYWORDS;
+  else
+    mylist->type = &RaaList::LIST_SPECIES;
+  return mylist;
 }
 
 
-RaaList *RAA::createEmptyList(const string &listname, const string &kind) throw(int)
+RaaList* RAA::createEmptyList(const string& listname, const string& kind) throw (int)
 {
-	int err, lrank;
-	char type, *p, *q;
-	sock_printf(raa_data, (char *)"getemptylist&name=%s\n", listname.c_str() );
-	char *reponse = read_sock(raa_data);
-	p = strchr(reponse, '=');
-	if(p) q = strchr(p+1, '=');
-	sscanf(p+1, "%d", &err);
-	
-	if(err != 0) {
-		throw err;
-		}
-	sscanf(q+1, "%d", &lrank);
-	if(kind == RaaList::LIST_SEQUENCES) type='S';
-	else if(kind == RaaList::LIST_KEYWORDS) type='K';
-	else type='E';
-	sock_printf(raa_data, "setliststate&lrank=%d&type=%c\n", lrank, type);
-	read_sock(raa_data);
-	RaaList *mylist = new RaaList();
-	mylist->myraa = this;
-	mylist->rank = lrank;
-	mylist->name = listname;
-	mylist->type = &kind;
-	return mylist;
-}
-
-
-void RAA::deleteList(RaaList *list)
+  int err, lrank;
+  char type, * p = 0, * q = 0;
+  sock_printf(raa_data, (char*)"getemptylist&name=%s\n", listname.c_str() );
+  char* reponse = read_sock(raa_data);
+  p = strchr(reponse, '=');
+  if (p)
+    q = strchr(p + 1, '=');
+  sscanf(p + 1, "%d", &err);
+
+  if (err != 0)
+  {
+    throw err;
+  }
+  sscanf(q + 1, "%d", &lrank);
+  if (kind == RaaList::LIST_SEQUENCES)
+    type = 'S';
+  else if (kind == RaaList::LIST_KEYWORDS)
+    type = 'K';
+  else
+    type = 'E';
+  sock_printf(raa_data, "setliststate&lrank=%d&type=%c\n", lrank, type);
+  read_sock(raa_data);
+  RaaList* mylist = new RaaList();
+  mylist->myraa = this;
+  mylist->rank = lrank;
+  mylist->name = listname;
+  mylist->type = &kind;
+  return mylist;
+}
+
+
+void RAA::deleteList(RaaList* list)
+{
+  raa_releaselist(raa_data, list->rank);
+  delete list;
+}
+
+
+int RAA::keywordPattern(const string& pattern)
+{
+  current_kw_match = 2;
+  if (kw_pattern)
+    delete kw_pattern;
+  kw_pattern = new string(pattern);
+  return raa_data->WIDTH_KW;
+}
+
+
+int RAA::nextMatchingKeyword(string& matching)
+{
+  char* keyword;
+  if (current_kw_match == 2)
+    current_kw_match = raa_nextmatchkey(raa_data, 2, (char*)kw_pattern->c_str(), &keyword);
+  else
+    current_kw_match = raa_nextmatchkey(raa_data, current_kw_match, NULL, &keyword);
+  if (current_kw_match)
+    matching = keyword;
+  return current_kw_match;
+}
+
+
+static int treeloadprogress(int percent, void* data)
+{
+  bool* first = (bool*)data;
+  if (*first)
+  {
+    cout << "Starting species tree download\n";
+    *first = false;
+  }
+  cout << '.'; fflush(stdout);
+  return false;
+}
+
+
+RaaSpeciesTree* RAA::loadSpeciesTree(bool showprogress)
+{
+  bool init_load_mess = true;
+  int err = raa_loadtaxonomy(raa_data, (char*)"ROOT", showprogress ? treeloadprogress : NULL, &init_load_mess, NULL, NULL);
+  if (err)
+    return NULL;
+  if (showprogress && (!init_load_mess) )
+    cout << "\nSpecies tree download completed\n";
+  RaaSpeciesTree* tree = new RaaSpeciesTree();
+  tree->raa_data = raa_data;
+  tree->sp_tree = raa_data->sp_tree;
+  tree->tid_to_rank = raa_data->tid_to_rank;
+  tree->max_tid = raa_data->max_tid;
+  tree->max_sp = raa_read_first_rec(raa_data, raa_spec);
+  return tree;
+}
+
+
+void RAA::freeSpeciesTree(RaaSpeciesTree* tree)
 {
-	raa_releaselist(raa_data, list->rank);
-	delete list;
+  int i;
+  struct raa_pair* p, * q;
+  for (i = 2; i <= tree->max_sp; i++)
+  {
+    if (raa_data->sp_tree[i] == NULL)
+      continue;
+    free(raa_data->sp_tree[i]->name);
+    if (raa_data->sp_tree[i]->libel != NULL)
+      free(raa_data->sp_tree[i]->libel);
+    if (raa_data->sp_tree[i]->libel_upcase != NULL)
+      free(raa_data->sp_tree[i]->libel_upcase);
+    p = raa_data->sp_tree[i]->list_desc;
+    while (p)
+    {
+      q = p->next;
+      free(p);
+      p = q;
+    }
+    free(raa_data->sp_tree[i]);
+  }
+  if (raa_data->tid_to_rank != NULL)
+    free(raa_data->tid_to_rank);
+  if (raa_data->sp_tree != NULL)
+    free(raa_data->sp_tree);
+  raa_data->sp_tree = NULL;
+  raa_data->tid_to_rank = NULL;
+  delete tree;
 }
 
 
-int RAA::keywordPattern(const string &pattern)
-{
-	current_kw_match = 2;
-	if(kw_pattern) delete kw_pattern;
-	kw_pattern = new string(pattern);
-	return raa_data->WIDTH_KW;
-}
-
-
-int RAA::nextMatchingKeyword(string &matching)
-{
-	char *keyword;
-	if(current_kw_match==2) current_kw_match = raa_nextmatchkey(raa_data, 2, (char*)kw_pattern->c_str(), &keyword);
-	else current_kw_match = raa_nextmatchkey(raa_data, current_kw_match, NULL, &keyword);
-	if(current_kw_match) matching = keyword;
-	return current_kw_match;
-}
-
-
-static int treeloadprogress(int percent, void *data)
-{
-	bool *first =(bool *)data;
-	if(*first) {
-		cout << "Starting species tree download\n"; 
-		*first = false;
-		}
-	cout << '.'; fflush(stdout);
-	return false;
-}
-
-
-RaaSpeciesTree *RAA::loadSpeciesTree(bool showprogress)
+vector<string> RAA::listDirectFeatureKeys()
 {
-	bool init_load_mess = true;
-	int err = raa_loadtaxonomy(raa_data, (char *)"ROOT", showprogress ? treeloadprogress : NULL, &init_load_mess, NULL, NULL); 
-	if(err) return NULL;
-	if( showprogress && (!init_load_mess) ) cout << "\nSpecies tree download completed\n";
-	RaaSpeciesTree *tree = new RaaSpeciesTree();
-	tree->raa_data = raa_data;
-	tree->sp_tree = raa_data->sp_tree;
-	tree->tid_to_rank = raa_data->tid_to_rank;
-	tree->max_tid = raa_data->max_tid;
-	tree->max_sp = raa_read_first_rec(raa_data, raa_spec); 
-	return tree;
-}
+  int total, num;
+  vector<string> ftkeys;
 
-
-void RAA::freeSpeciesTree(RaaSpeciesTree *tree)
-{
-	int i;
-	struct raa_pair *p, *q;
-	for(i = 2; i <= tree->max_sp; i++) {
-		if(raa_data->sp_tree[i] == NULL) continue;
-		free(raa_data->sp_tree[i]->name);
-		if(raa_data->sp_tree[i]->libel != NULL) free(raa_data->sp_tree[i]->libel);
-		if(raa_data->sp_tree[i]->libel_upcase != NULL) free(raa_data->sp_tree[i]->libel_upcase);
-		p = raa_data->sp_tree[i]->list_desc;
-		while(p) {
-			q = p->next;
-			free(p);
-			p = q;
-		}
-		free(raa_data->sp_tree[i]);
-	}
-	if(raa_data->tid_to_rank != NULL) free(raa_data->tid_to_rank);
-	if(raa_data->sp_tree != NULL) free(raa_data->sp_tree);
-	raa_data->sp_tree = NULL;
-	raa_data->tid_to_rank = NULL;
-	delete tree;
+  total = raa_read_first_rec(raa_data, raa_smj);
+  for (num = 2; num <= total; num++)
+  {
+    char* name = raa_readsmj(raa_data, num, NULL, NULL);
+    if (strncmp(name, "04", 2) != 0)
+      continue;
+    if (strcmp(name, "04ID") == 0)
+      continue;
+    if (strcmp(name, "04LOCUS") == 0)
+      continue;
+    ftkeys.push_back(name + 2);
+  }
+  return ftkeys;
 }
 
 
-vector<string> RAA::listDirectFeatureKeys()
+static void godownkey(raa_db_access* raa_data, unsigned int p3, vector<string>& ftkeys)
 {
-	int total, num;
-	vector<string> ftkeys;
-	
-	total = raa_read_first_rec(raa_data, raa_smj);
-	for(num = 2; num <= total; num++) {
-		char *name = raa_readsmj(raa_data, num, NULL, NULL);
-		if(strncmp(name, "04", 2) != 0) continue;
-		if(strcmp(name, "04ID") == 0) continue;
-		if(strcmp(name, "04LOCUS") == 0) continue;
-		ftkeys.push_back(name + 2);
-	}
-	return ftkeys;
-}
+  unsigned next;
+  int value;
+  char* name;
 
+  next = raa_readshrt(raa_data, p3, &value);
+  name = raa_readkey(raa_data, abs(value), NULL, NULL, NULL, NULL);
+  ftkeys.push_back(name);
 
-static void godownkey(raa_db_access *raa_data, unsigned int p3, vector<string>& ftkeys)
-{
-	unsigned next;
-	int value;
-	char *name;
-	
-	next = raa_readshrt(raa_data, p3, &value);
-	name = raa_readkey(raa_data, abs(value), NULL, NULL, NULL, NULL);
-	ftkeys.push_back(name);
-
-	while(next != 0) {
-		next = raa_readshrt(raa_data, next, &value);
-		godownkey(raa_data, value, ftkeys);
-		}
+  while (next != 0)
+  {
+    next = raa_readshrt(raa_data, next, &value);
+    godownkey(raa_data, value, ftkeys);
+  }
 }
 
 
 vector<string> RAA::listAllFeatureKeys()
 {
-	vector<string> ftkeys;
-	int rank, pdesc;
-	
-	rank = raa_iknum(raa_data, (char *)"misc_feature", raa_key);
-	raa_readkey(raa_data, rank, NULL, NULL, &pdesc, NULL);
-	godownkey(raa_data, pdesc, ftkeys);
-	return ftkeys;
-}
-
-
-RaaList *RAA::getDirectFeature(const string &seqname, const string &featurekey, const string &listname, const string &matching)
-{
-	char query[80];
-	RaaList *list1;
-	int matchinglist, err;
-	sprintf(query, "n=%s and t=%s", seqname.c_str(), featurekey.c_str());
-	string squery = query;
-	try {
-		list1 = processQuery(squery, listname);
-		}
-	catch (string s) {
-		return NULL;
-		}
-	if(matching.empty() || list1->getCount() == 0) return list1;
-	sock_printf(raa_data, "prep_getannots&nl=1\n%s|%s\n", raa_data->embl ? "FT" : "FEATURES", featurekey.c_str());
-	char *p = read_sock(raa_data);
-	if(strncmp(p, "code=0", 6) != 0) return NULL;
-	err = raa_modifylist(raa_data, list1->getRank(), (char *)"scan", (char *)matching.c_str(), &matchinglist, NULL, NULL);
-	if(err != 0 || raa_bcount(raa_data, matchinglist) == 0) {
-		delete list1;
-		if(err == 0)  raa_releaselist(raa_data, matchinglist);
-		return NULL;
-		}
-	raa_setlistname(raa_data, matchinglist, (char *)listname.c_str());
-	RaaList *list2 = new RaaList();
-	list2->rank = matchinglist;
-	list2->myraa = this;
-	list2->name = listname;
-	list2->type = &RaaList::LIST_SEQUENCES;
-	delete list1;
-	return list2;
-}
-
-
-struct extract_data {
-	char line[100];
+  vector<string> ftkeys;
+  int rank, pdesc;
+
+  rank = raa_iknum(raa_data, (char*)"misc_feature", raa_key);
+  raa_readkey(raa_data, rank, NULL, NULL, &pdesc, NULL);
+  godownkey(raa_data, pdesc, ftkeys);
+  return ftkeys;
+}
+
+
+RaaList* RAA::getDirectFeature(const string& seqname, const string& featurekey, const string& listname, const string& matching)
+{
+  char query[80];
+  RaaList* list1;
+  int matchinglist, err;
+  sprintf(query, "n=%s and t=%s", seqname.c_str(), featurekey.c_str());
+  string squery = query;
+  try
+  {
+    list1 = processQuery(squery, listname);
+  }
+  catch (string s)
+  {
+    return NULL;
+  }
+  if (matching.empty() || list1->getCount() == 0)
+    return list1;
+  sock_printf(raa_data, "prep_getannots&nl=1\n%s|%s\n", raa_data->embl ? "FT" : "FEATURES", featurekey.c_str());
+  char* p = read_sock(raa_data);
+  if (strncmp(p, "code=0", 6) != 0)
+    return NULL;
+  err = raa_modifylist(raa_data, list1->getRank(), (char*)"scan", (char*)matching.c_str(), &matchinglist, NULL, NULL);
+  if (err != 0 || raa_bcount(raa_data, matchinglist) == 0)
+  {
+    delete list1;
+    if (err == 0)
+      raa_releaselist(raa_data, matchinglist);
+    return NULL;
+  }
+  raa_setlistname(raa_data, matchinglist, (char*)listname.c_str());
+  RaaList* list2 = new RaaList();
+  list2->rank = matchinglist;
+  list2->myraa = this;
+  list2->name = listname;
+  list2->type = &RaaList::LIST_SEQUENCES;
+  delete list1;
+  return list2;
+}
+
+
+struct extract_data
+{
+  char line[100];
 };
 
 
-void *RAA::prepareGetAnyFeature(int seqrank, const string &featurekey) throw(string)
-{
-	char  *p, *line;
-	int l;
-	
-	if(seqrank < 2 || seqrank > raa_data->nseq) throw "Incorrect first argument";
-	struct extract_data *data = new struct extract_data;
-	sock_printf(raa_data, "extractseqs&seqnum=%d&format=fasta&operation=feature&feature=%s&zlib=F\n", seqrank, featurekey.c_str());
-	line = read_sock(raa_data);
-	if(strcmp(line, "code=0") == 0) {
-		p = read_sock(raa_data);
-		strcpy(data->line, p);
-		return (void *)data;
-	}
-	delete data;
-	p = strstr(line, "message=");
-	if(p == NULL) return NULL;
-	p += 8;
-	if(*p == '"') p++;
-	l = strlen(p);
-	if(p[l-1] == '"') p[l-1] = 0;
-	string message = p;
-	throw message;
-}
-
-
-Sequence *RAA::getNextFeature(void *v)
-{
-	char *p;
-	Sequence *seq;
-	string name;
-	struct extract_data *data = (struct extract_data *)v;
-	
-	while( data->line[0] == 27 /* esc */ ) {
-		p = read_sock(raa_data);
-		strcpy(data->line, p);
-	}
-	if(strcmp(data->line, "extractseqs END.") == 0) {
-		delete data;
-		return NULL;
-	}
-	p = strchr(data->line, ' ');
-	if(p != NULL)*p = 0;
-	name = data->line + 1;
-	p = read_sock(raa_data);
-	string seqdata = "";
-	while( p != NULL && strcmp(p, "extractseqs END.") != 0 && *p != 27 /* esc */  && *p != '>') {
-		seqdata += p;
-		p = read_sock(raa_data);
-	}
-	if(p == NULL) strcpy(data->line, "extractseqs END.");
-	else {
-		if( *p == 27 /* esc */ ) p = read_sock(raa_data);
-		strcpy(data->line, p);
-		}
-	seq = new BasicSequence(name, seqdata, &AlphabetTools::DNA_ALPHABET);
-	return seq;
-}
-
-
-void RAA::interruptGetAnyFeature(void *v)
-{
-	struct extract_data *data = (struct extract_data *)v;
-	char *p;
-	
-	if(data == NULL) return;
-	sock_fputs(raa_data, (char *)"\033" /* esc */); 
-	sock_flush(raa_data);
-	p = data->line;
-	while( strcmp(p, "extractseqs END.") != 0) {
-		p = read_sock(raa_data);
-		}
-	delete data;
-	/* just to consume ESC that may have arrived after extractseqs END. */
-	sock_fputs(raa_data, (char *)"null_command\n");
-	read_sock(raa_data);
+void* RAA::prepareGetAnyFeature(int seqrank, const string& featurekey) throw (string)
+{
+  char* p, * line;
+  int l;
+
+  if (seqrank < 2 || seqrank > raa_data->nseq)
+    throw "Incorrect first argument";
+  struct extract_data* data = new struct extract_data;
+  sock_printf(raa_data, "extractseqs&seqnum=%d&format=fasta&operation=feature&feature=%s&zlib=F\n", seqrank, featurekey.c_str());
+  line = read_sock(raa_data);
+  if (strcmp(line, "code=0") == 0)
+  {
+    p = read_sock(raa_data);
+    strcpy(data->line, p);
+    return (void*)data;
+  }
+  delete data;
+  p = strstr(line, "message=");
+  if (p == NULL)
+    return NULL;
+  p += 8;
+  if (*p == '"')
+    p++;
+  l = strlen(p);
+  if (p[l - 1] == '"')
+    p[l - 1] = 0;
+  string message = p;
+  throw message;
+}
+
+
+Sequence* RAA::getNextFeature(void* v)
+{
+  char* p;
+  Sequence* seq;
+  string name;
+  struct extract_data* data = (struct extract_data*)v;
+
+  while (data->line[0] == 27 /* esc */)
+  {
+    p = read_sock(raa_data);
+    strcpy(data->line, p);
+  }
+  if (strcmp(data->line, "extractseqs END.") == 0)
+  {
+    delete data;
+    return NULL;
+  }
+  p = strchr(data->line, ' ');
+  if (p != NULL)
+    *p = 0;
+  name = data->line + 1;
+  p = read_sock(raa_data);
+  string seqdata = "";
+  while (p != NULL && strcmp(p, "extractseqs END.") != 0 && *p != 27 /* esc */  && *p != '>')
+  {
+    seqdata += p;
+    p = read_sock(raa_data);
+  }
+  if (p == NULL)
+    strcpy(data->line, "extractseqs END.");
+  else
+  {
+    if (*p == 27 /* esc */)
+      p = read_sock(raa_data);
+    strcpy(data->line, p);
+  }
+  seq = new BasicSequence(name, seqdata, &AlphabetTools::DNA_ALPHABET);
+  return seq;
+}
+
+
+void RAA::interruptGetAnyFeature(void* v)
+{
+  struct extract_data* data = (struct extract_data*)v;
+  char* p;
+
+  if (data == NULL)
+    return;
+  sock_fputs(raa_data, (char*)"\033" /* esc */);
+  sock_flush(raa_data);
+  p = data->line;
+  while (strcmp(p, "extractseqs END.") != 0)
+  {
+    p = read_sock(raa_data);
+  }
+  delete data;
+  /* just to consume ESC that may have arrived after extractseqs END. */
+  sock_fputs(raa_data, (char*)"null_command\n");
+  read_sock(raa_data);
 }
-
diff --git a/src/Bpp/Raa/RAA.h b/src/Bpp/Raa/RAA.h
index f260e7a..adba6c7 100644
--- a/src/Bpp/Raa/RAA.h
+++ b/src/Bpp/Raa/RAA.h
@@ -11,7 +11,7 @@
  *
  * These classes provides network access to several nucleotide and protein sequence databases
  * structured for multi-criteria retrieval under the ACNUC system as described in
- * <a href=http://dx.doi.org/10.1016/j.biochi.2007.07.003>Remote access to ACNUC nucleotide 
+ * <a href=http://dx.doi.org/10.1016/j.biochi.2007.07.003>Remote access to ACNUC nucleotide
  * and protein sequence databases at PBIL</a>.
  *
  * The list of available databases is <a href=http://pbil.univ-lyon1.fr/databases/acnuc/banques_raa.php>here</a>.
@@ -24,11 +24,11 @@
 
 extern "C" {
 #include "RAA_acnuc.h"
-	}
+}
 
 #include <string>
 #include <Bpp/Seq/Sequence.h>
-#include <Bpp/Seq/Alphabet.all>
+#include <Bpp/Seq/Alphabet/AlphabetTools.h>
 
 #include "RaaList.h"
 #include "RaaSpeciesTree.h"
@@ -36,24 +36,24 @@ extern "C" {
 
 namespace bpp
 {
-	
-	
 /**
  * @brief Identifies an annotation line in a database.
  */
-class RaaAddress {
-	friend class RAA;
-	int div;
-	raa_long faddr;
+class RaaAddress
+{
+  friend class RAA;
+  int div;
+  raa_long faddr;
+
 public:
-	/**
-	 * @brief Gives the rank of the database file containing this annotation line.
-	 */
-	int getDiv() {return div; };
-	/**
-	 * @brief Gives, as a 64-bit int value, the offset of this annotation line within its database file.
-	 */
-	raa_long getAddr() {return faddr; };
+  /**
+   * @brief Gives the rank of the database file containing this annotation line.
+   */
+  int getDiv() {return div; }
+  /**
+   * @brief Gives, as a 64-bit int value, the offset of this annotation line within its database file.
+   */
+  raa_long getAddr() {return faddr; }
 };
 
 
@@ -65,425 +65,436 @@ public:
  * Access can be done to single sequences from their name or accession number
  * or to lists of sequences matching a query combining several retrieval criteria.
  * Any fragment of any sequence defined by coordinates or by feature table entries
- * can be retrieved. Access to sequence annotations is possible. Concurrent access 
+ * can be retrieved. Access to sequence annotations is possible. Concurrent access
  * to several databases is possible.
  *
- * Access is possible to database entries and also to subsequences, i.e., one or more fragments 
+ * Access is possible to database entries and also to subsequences, i.e., one or more fragments
  * of one or more parent sequences defined by a feature table entry.
  * Subsequences are named by adding an extension (e.g., .PE1) to the name of their parent sequence.
  */
-class RAA {
-	friend class RaaList;
+class RAA
+{
+  friend class RaaList;
+
 public:
-	
-	/**
-	 * @name Opening/closing database connections.
-	 *
-	 * @{
-	 */
-	
-	/**
-	 * @brief Direct constructor: opens a network connection to a database.
-	 *
-	 * @param dbname     The database name (e.g., "embl", "genbank", "swissprot").
-	 * @param port       The IP port number of the server (the default value is a safe choice; make sure that no
-	 * firewall blocks outbound connections on this port).
-	 * @param server     The IP name of the server (the default value is a safe choice).
-	 * @throw int    An error code as follows:\n
-	 *               1: incorrect server name\n
-	 *               2: cannot create connection with server\n
-	 *               3: unknown database name\n
-	 *               4: database is currently not available for remote connection\n
-	 *               7: not enough memory
-	 */
-	RAA(const std::string &dbname, int port = 5558, const std::string &server = "pbil.univ-lyon1.fr") throw(int);
-
-	/**
-	 * @brief Direct constructor: opens a network connection to a database server, without specifying a database.
-	 *
-	 * Typical usage is to ask with knownDatabases() for the list of served databases, and then to open the chosen
-	 * database with openDatabase().
-	 *
-	 * @param port       The IP port number of the server (the default value is a safe choice; make sure that no
-	 * firewall blocks outbound connections on this port).
-	 * @param server     The IP name of the server (the default value is a safe choice).
-	 * @throw int    An error code as follows:\n
-	 *               1: incorrect server name\n
-	 *               2: cannot create connection with server\n
-	 *               7: not enough memory
-	 */
-	RAA(int port=5558, const std::string &server = "pbil.univ-lyon1.fr") throw(int);
-
-	/**
-	 * @brief Destructor: closes both the database access, if any, and the network connection.
-     */
-	~RAA();
-	
-	/**
-	 * @brief Opens a database from its name.
-	 *
-	 * @param dbname         The database name (e.g., "embl", "genbank", "swissprot").
-	 * @param getpasswordf   NULL, or, for a password-protected database,  pointer to a password-providing function
-	 * that returns the password as a writable static char string.
-	 * @param p              NULL, or pointer to data transmitted as argument of getpasswordf.
-	 * @return       0 if OK, or an error code as follows:\n
-	 *               3: unknown database name\n
-	 *               4: database is currently not available for remote connection\n
-	 *               5: a database was previously opened on this RAA object and not closed\n
-	 *               6: incorrect password for password-protected database\n
-	 *               7: not enough memory
-	 */
-	int openDatabase(const std::string &dbname, char *(*getpasswordf)(void *) = NULL, void *p = NULL);
-	
-	/**
-	 * @brief Closes a database connection.
-	 
-	 * Allows to later open another database with openDatabase() using the same RAA object.
-	 */
-	void closeDatabase();
-	
-	/**
-	 * @brief Computes the list of names and descriptions of databases served by the server.
-	 
-	 * Typically used after creation of an RAA object without database and before openDatabase() call.
-	 *
-	 * @return              The number of served databases.
-	 * @param name          Vector of database names. Any of these names can be used 
-	 * in openDatabase() calls.
-	 * @param description   Vector of database descriptions. A description can
-	 * begin with "(offline)" to mean the database is currently not available.
-	 */
-	int knownDatabases(std::vector<std::string> &name, std::vector<std::string> &description);
-
-	/** @} */
-
-	/**
-	 * @name Access to sequence data and annotations.
-	 *
-	 * @{
-	 */
-		
-	/**
-	 * @brief Returns several attributes of a sequence from its name or accession number.
-	 *
-	 * @param  name_or_accno   A sequence name or accession number. Case is not significant.
-	 * @return  Several attributes (length, species, etc..., see: RaaSeqAttributes) of a sequence.
-	 */
-	RaaSeqAttributes *getAttributes(const std::string &name_or_accno);
-	
-	/**
-	 * @brief Returns several attributes of a sequence from its database rank.
-	 *
-	 * @param  seqrank  The database rank of a sequence.
-	 * @return  Several attributes (length, species, etc..., see: RaaSeqAttributes) of a sequence,
-	 * or NULL if seqrank is not a valid database sequence rank.
-	 */
-	RaaSeqAttributes *getAttributes(int seqrank);
-	
-	/**
-	 * @brief Returns a database sequence identified by name or accession number.
-	 *
-	 * Because nucleotide database sequences can be several megabases in length, the maxlength argument
-	 * avoids unexpected huge sequence downloads.
-	 *
-	 * @param name_or_accno   A sequence name or accession number. Case is not significant.
-	 * @param maxlength    The maximum sequence length beyond which the function returns NULL.
-	 * @return          The database sequence including a one-line comment, or NULL if name_or_accno 
-	 * does not match any sequence or if the sequence length exceeds maxlength.
-	 */
-	Sequence *getSeq(const std::string &name_or_accno, int maxlength=100000);
-	
-	/**
-	 * @brief Returns a sequence identified by its database rank.
-	 *
-	 * Because nucleotide database sequences can be several megabases in length, the maxlength argument
-	 * avoids unexpected huge sequence downloads.
-	 *
-	 * @param seqrank   The database rank of a sequence.
-	 * @param maxlength    The maximum sequence length beyond which the function returns NULL.
-	 * @return          The database sequence including a one-line comment, or NULL if seqrank 
-	 * does not match any sequence or if the sequence length exceeds maxlength.
-	 */
-	Sequence *getSeq(int seqrank, int maxlength=100000);
-	
-	/**
-	 * @brief Returns any part of a sequence identified by its database rank.
-	 *
-	 * @param seqrank   The database rank of a sequence.
-	 * @param first     The first desired position within the sequence (1 is the smallest valid value).
-	 * @param length    The desired number of residues (can be larger than what exists in the sequence).
-	 * @param sequence  Filled upon return with requested sequence data.
-	 * @return          The length of returned sequence data, or 0 if impossible.
-	 */
-	int getSeqFrag(int seqrank, int first, int length, std::string &sequence);
-	
-	/**
-	 * @brief Returns any part of a sequence identified by its name or accession number.
-	 *
-	 * @param name_or_accno   The name or accession number of a sequence. Case is not significant.
-	 * @param first     The first desired position within the sequence (1 is the smallest valid value).
-	 * @param length    The desired number of residues (can be larger than what exists in the sequence).
-	 * @param sequence  Filled upon return with requested sequence data.
-	 * @return          The length of returned sequence data, or 0 if impossible.
-	 */
-	int getSeqFrag(const std::string &name_or_accno, int first, int length, std::string &sequence);
-	
-	/**
-	 * @brief Returns the first annotation line of the sequence of given database rank.
-	 *
-	 * @param seqrank        Database rank of a sequence.
-	 * @return               The first annotation line of this sequence (without terminal \\n).
-	 */
-	std::string getFirstAnnotLine(int seqrank);
-	
-	/**
-	 * @brief Returns the next annotation line after that previously read, or NULL if the end of the
-	 * database file was reached.
-	 *
-	 * @return     The next annotation line after that previously read (without terminal \\n).
-	 */
-	std::string getNextAnnotLine();
-	
-	/**
-	 * @brief Returns information identifying the position of the last read annotation line.
-	 *
-	 * @return     Information identifying the position of the last read annotation line.
-	 */
-	RaaAddress getCurrentAnnotAddress();
-	
-	/**
-	 * @brief Returns the annotation line at the given address.
-	 *
-	 * @param address    Information identifying the position of an annotation line 
-	 * typically obtained from a previous call to getCurrentAnnotAddress().
-	 * @return           The annotation line at that position (in static memory, without terminal \\n).
-	 */
-	std::string getAnnotLineAtAddress(RaaAddress address);
-	
-	/**
-	 * @brief Returns the full protein translation of a protein-coding nucleotide database (sub)sequence.
-	 *
-	 * @param seqrank     The database rank of a protein-coding sequence. It can be either a subsequence
-	 * corresponding to a CDS feature table entry, or a sequence if all of it belongs to the CDS.
-	 * @return            The complete protein translation of this CDS, using the genetic code suggested
-	 * by the sequence annotations and with a one-line comment, or NULL if seqrank does not match a CDS 
-	 * or if not enough memory.
-	 * @throw BadCharException In rare cases, the CDS may contain an internal stop codon that raises an 
-	 * exception when translated to protein.
-	 */
-	Sequence *translateCDS(int seqrank) throw(BadCharException);//TODO add comment to Sequence
-	
-	/**
-	 * @brief Returns the full protein translation of a protein-coding nucleotide database (sub)sequence.
-	 *
-	 * @param name     The name of a protein-coding sequence. It can be either a subsequence
-	 * corresponding to a CDS feature table entry, or a sequence if all of it belongs to the CDS.
-	 * @return            The complete protein translation of this CDS, using the genetic code suggested
-	 * by the sequence annotations and with a one-line comment, or NULL if name does not match a CDS or 
-	 * if not enough memory.
-	 * @throw BadCharException In rare cases, the CDS may contain an internal stop codon that raises an 
-	 * exception when translated to protein.
-	 */
-	Sequence *translateCDS(const std::string &name) throw(BadCharException);
-	
-	/**
-	 * @brief Returns the amino acid translation of the first codon of a protein-coding (sub)sequence.
-	 *
-	 * @param seqrank     The database rank of a protein-coding sequence. It can be either a subsequence
-	 * corresponding to a CDS feature table entry, or a sequence if all of it belongs to the CDS.
-	 * @return            The amino acid corresponding to the start codon of this sequence, using the 
-	 * adequate initiation-codon-specific genetic code.
-	 */
-	char translateInitCodon(int seqrank);
-	
-	/** @} */
-
-	/**
-	 * @name Creation of lists of sequences, species or keywords.
-	 *
-	 * @{
-	 */
-	
-	/**
-	 * @brief Returns the list of database elements (often sequences) matching a query.
-	 *
-	 * Query examples:\n k=ribosomal protein L14 \n   sp=felis catus and t=cds              
-	 * @param query     A retrieval query following the syntax described 
-	 * <a href=http://pbil.univ-lyon1.fr/databases/acnuc/cfonctions.html#QUERYLANGUAGE>here</a>.
-	 * @param listname  A name to be given to the resulting list. Case is not significant. If a list with same 
-	 * name already exists, it is replaced by the new list.
-	 * @return          The resulting list of matching database elements.
-	 * @throw string    If error, the string is a message describing the error cause.
-	 */
-	RaaList *processQuery(const std::string &query, const std::string &listname) throw(std::string);
-
-	/**
-	 * @brief Creates an empty list with specified name.
-	 *
-	 * @param listname  A name to be given to the resulting list. Case is not significant.
-	 * @param kind      Nature of the resulting list. One of RaaList::LIST_SEQUENCES, RaaList::LIST_KEYWORDS,
-	 * RaaList::LIST_SPECIES.
-	 * @return          The resulting list, unless an exception was raised.
-	 * @throw int    3: a list with same name already existed; it is left unchanged.\n
-	 * 4: the server cannot create more lists.
-	 */
-	RaaList *createEmptyList(const std::string &listname, const std::string &kind=RaaList::LIST_SEQUENCES) throw(int);
-	
-	/**
-	 * @brief Deletes a list and calls its destructor.
-	 *
-	 * @param list	An RaaList object.
-	 */
-	void deleteList(RaaList *list);
-
-	
-	/** @} */
-
-	
-	/**
-	 * @name Access to feature table-defined sequences (nucleotide databases only).
-	 *
-	 * @{
-	 */
-	
-	/**
-	 * @brief    Computes the list of subsequences of a given sequence corresponding to a given feature key with 
-	 * optional annotation string matching.
-	 *
-	 * This function allows to retrieve all features of the given sequence corresponding to a given feature key
-	 * and whose annotation optionally contains a given string. \n
-	 * Example:\n
-	 * getDirectFeature("AE005174", "tRNA", "mytrnas", "anticodon: TTG")\n
-	 * retrieves all tRNA features present in the feature table of sequence AE005174 that contain the string 
-	 * "anticodon: TTG" in their annotations, and puts that in a sequence list called "mytrnas". This function is
-	 * meaningful with nucleotide sequence databases only (not with protein databases).
-	 *
-	 * @param seqname		The name of a database sequence. Case is not significant.
-	 * @param featurekey	A feature key (e.g., CDS, tRNA, ncRNA) that must be directly accessible, that is, one of those 
-	 * returned by listDirectFeatureKeys(). Case is not significant.
-	 * @param listname		The name to give to the resulting sequence list.
-	 * @param matching		An optional string required to be present in the feature's annotations. Case is not significant.
-	 * @return    The list of subsequences of <i>seqname</i> that correspond to the specified feature key and, optionally, whose
-	 * annotation contains the matching string, or NULL if no matching sequence exists.
-	 */
-	RaaList *getDirectFeature(const std::string &seqname, const std::string &featurekey, const std::string &listname, 
-							  const std::string &matching = "");
-	
-	/**
-	 * @brief    Gives all feature keys of the database that can be directly accessed.
-	 *
-	 * These feature keys (e.g., CDS, rRNA, tRNA) can be used with function getDirectFeature(). This function is
-	 * meaningful with nucleotide sequence databases only (not with protein databases).
-	 *
-	 * @return    A string vector listing all feature keys of the database that can be directly accessed.
-	 */
+  /**
+   * @name Opening/closing database connections.
+   *
+   * @{
+   */
+
+  /**
+   * @brief Direct constructor: opens a network connection to a database.
+   *
+   * @param dbname     The database name (e.g., "embl", "genbank", "swissprot").
+   * @param port       The IP port number of the server (the default value is a safe choice; make sure that no
+   * firewall blocks outbound connections on this port).
+   * @param server     The IP name of the server (the default value is a safe choice).
+   * @throw int    An error code as follows:\n
+   *               1: incorrect server name\n
+   *               2: cannot create connection with server\n
+   *               3: unknown database name\n
+   *               4: database is currently not available for remote connection\n
+   *               7: not enough memory
+   */
+  RAA(const std::string& dbname, int port = 5558, const std::string& server = "pbil.univ-lyon1.fr") throw (int);
+
+  /**
+   * @brief Direct constructor: opens a network connection to a database server, without specifying a database.
+   *
+   * Typical usage is to ask with knownDatabases() for the list of served databases, and then to open the chosen
+   * database with openDatabase().
+   *
+   * @param port       The IP port number of the server (the default value is a safe choice; make sure that no
+   * firewall blocks outbound connections on this port).
+   * @param server     The IP name of the server (the default value is a safe choice).
+   * @throw int    An error code as follows:\n
+   *               1: incorrect server name\n
+   *               2: cannot create connection with server\n
+   *               7: not enough memory
+   */
+  RAA(int port = 5558, const std::string& server = "pbil.univ-lyon1.fr") throw (int);
+
+  /**
+   * @brief Destructor: closes both the database access, if any, and the network connection.
+   */
+  ~RAA();
+
+  /**
+   * @brief Opens a database from its name.
+   *
+   * @param dbname         The database name (e.g., "embl", "genbank", "swissprot").
+   * @param getpasswordf   NULL, or, for a password-protected database,  pointer to a password-providing function
+   * that returns the password as a writable static char string.
+   * @param p              NULL, or pointer to data transmitted as argument of getpasswordf.
+   * @return       0 if OK, or an error code as follows:\n
+   *               3: unknown database name\n
+   *               4: database is currently not available for remote connection\n
+   *               5: a database was previously opened on this RAA object and not closed\n
+   *               6: incorrect password for password-protected database\n
+   *               7: not enough memory
+   */
+  int openDatabase(const std::string& dbname, char*(*getpasswordf)(void*) = NULL, void* p = NULL);
+
+  /**
+   * @brief Closes a database connection.
+
+   * Allows to later open another database with openDatabase() using the same RAA object.
+   */
+  void closeDatabase();
+
+  /**
+   * @brief Computes the list of names and descriptions of databases served by the server.
+
+   * Typically used after creation of an RAA object without database and before openDatabase() call.
+   *
+   * @return              The number of served databases.
+   * @param name          Vector of database names. Any of these names can be used
+   * in openDatabase() calls.
+   * @param description   Vector of database descriptions. A description can
+   * begin with "(offline)" to mean the database is currently not available.
+   */
+  int knownDatabases(std::vector<std::string>& name, std::vector<std::string>& description);
+
+  /** @} */
+
+  /**
+   * @name Access to sequence data and annotations.
+   *
+   * @{
+   */
+
+  /**
+   * @brief Returns several attributes of a sequence from its name or accession number.
+   *
+   * @param  name_or_accno   A sequence name or accession number. Case is not significant.
+   * @return  Several attributes (length, species, etc..., see: RaaSeqAttributes) of a sequence.
+   */
+  RaaSeqAttributes* getAttributes(const std::string& name_or_accno);
+
+  /**
+   * @brief Returns several attributes of a sequence from its database rank.
+   *
+   * @param  seqrank  The database rank of a sequence.
+   * @return  Several attributes (length, species, etc..., see: RaaSeqAttributes) of a sequence,
+   * or NULL if seqrank is not a valid database sequence rank.
+   */
+  RaaSeqAttributes* getAttributes(int seqrank);
+
+  /**
+   * @brief Returns a database sequence identified by name or accession number.
+   *
+   * Because nucleotide database sequences can be several megabases in length, the maxlength argument
+   * avoids unexpected huge sequence downloads.
+   *
+   * @param name_or_accno   A sequence name or accession number. Case is not significant.
+   * @param maxlength    The maximum sequence length beyond which the function returns NULL.
+   * @return          The database sequence including a one-line comment, or NULL if name_or_accno
+   * does not match any sequence or if the sequence length exceeds maxlength.
+   */
+  Sequence* getSeq(const std::string& name_or_accno, int maxlength = 100000);
+
+  /**
+   * @brief Returns a sequence identified by its database rank.
+   *
+   * Because nucleotide database sequences can be several megabases in length, the maxlength argument
+   * avoids unexpected huge sequence downloads.
+   *
+   * @param seqrank   The database rank of a sequence.
+   * @param maxlength    The maximum sequence length beyond which the function returns NULL.
+   * @return          The database sequence including a one-line comment, or NULL if seqrank
+   * does not match any sequence or if the sequence length exceeds maxlength.
+   */
+  Sequence* getSeq(int seqrank, int maxlength = 100000);
+
+  /**
+   * @brief Returns any part of a sequence identified by its database rank.
+   *
+   * @param seqrank   The database rank of a sequence.
+   * @param first     The first desired position within the sequence (1 is the smallest valid value).
+   * @param length    The desired number of residues (can be larger than what exists in the sequence).
+   * @param sequence  Filled upon return with requested sequence data.
+   * @return          The length of returned sequence data, or 0 if impossible.
+   */
+  int getSeqFrag(int seqrank, int first, int length, std::string& sequence);
+
+  /**
+   * @brief Returns any part of a sequence identified by its name or accession number.
+   *
+   * @param name_or_accno   The name or accession number of a sequence. Case is not significant.
+   * @param first     The first desired position within the sequence (1 is the smallest valid value).
+   * @param length    The desired number of residues (can be larger than what exists in the sequence).
+   * @param sequence  Filled upon return with requested sequence data.
+   * @return          The length of returned sequence data, or 0 if impossible.
+   */
+  int getSeqFrag(const std::string& name_or_accno, int first, int length, std::string& sequence);
+
+  /**
+   * @brief Returns the first annotation line of the sequence of given database rank.
+   *
+   * @param seqrank        Database rank of a sequence.
+   * @return               The first annotation line of this sequence (without terminal \\n).
+   */
+  std::string getFirstAnnotLine(int seqrank);
+
+  /**
+   * @brief Returns the next annotation line after that previously read, or NULL if the end of the
+   * database file was reached.
+   *
+   * @return     The next annotation line after that previously read (without terminal \\n).
+   */
+  std::string getNextAnnotLine();
+
+  /**
+   * @brief Returns information identifying the position of the last read annotation line.
+   *
+   * @return     Information identifying the position of the last read annotation line.
+   */
+  RaaAddress getCurrentAnnotAddress();
+
+  /**
+   * @brief Returns the annotation line at the given address.
+   *
+   * @param address    Information identifying the position of an annotation line
+   * typically obtained from a previous call to getCurrentAnnotAddress().
+   * @return           The annotation line at that position (in static memory, without terminal \\n).
+   */
+  std::string getAnnotLineAtAddress(RaaAddress address);
+
+  /**
+   * @brief Returns the full protein translation of a protein-coding nucleotide database (sub)sequence.
+   *
+   * @param seqrank     The database rank of a protein-coding sequence. It can be either a subsequence
+   * corresponding to a CDS feature table entry, or a sequence if all of it belongs to the CDS.
+   * @return            The complete protein translation of this CDS, using the genetic code suggested
+   * by the sequence annotations and with a one-line comment, or NULL if seqrank does not match a CDS
+   * or if not enough memory.
+   * @throw BadCharException In rare cases, the CDS may contain an internal stop codon that raises an
+   * exception when translated to protein.
+   */
+  Sequence* translateCDS(int seqrank) throw (BadCharException); // TODO add comment to Sequence
+
+  /**
+   * @brief Returns the full protein translation of a protein-coding nucleotide database (sub)sequence.
+   *
+   * @param name     The name of a protein-coding sequence. It can be either a subsequence
+   * corresponding to a CDS feature table entry, or a sequence if all of it belongs to the CDS.
+   * @return            The complete protein translation of this CDS, using the genetic code suggested
+   * by the sequence annotations and with a one-line comment, or NULL if name does not match a CDS or
+   * if not enough memory.
+   * @throw BadCharException In rare cases, the CDS may contain an internal stop codon that raises an
+   * exception when translated to protein.
+   */
+  Sequence* translateCDS(const std::string& name) throw (BadCharException);
+
+  /**
+   * @brief Returns the amino acid translation of the first codon of a protein-coding (sub)sequence.
+   *
+   * @param seqrank     The database rank of a protein-coding sequence. It can be either a subsequence
+   * corresponding to a CDS feature table entry, or a sequence if all of it belongs to the CDS.
+   * @return            The amino acid corresponding to the start codon of this sequence, using the
+   * adequate initiation-codon-specific genetic code.
+   */
+  char translateInitCodon(int seqrank);
+
+  /** @} */
+
+  /**
+   * @name Creation of lists of sequences, species or keywords.
+   *
+   * @{
+   */
+
+  /**
+   * @brief Returns the list of database elements (often sequences) matching a query.
+   *
+   * Query examples:\n k=ribosomal protein L14 \n   sp=felis catus and t=cds
+   * @param query     A retrieval query following the syntax described
+   * <a href=http://pbil.univ-lyon1.fr/databases/acnuc/cfonctions.html#QUERYLANGUAGE>here</a>.
+   * @param listname  A name to be given to the resulting list. Case is not significant. If a list with same
+   * name already exists, it is replaced by the new list.
+   * @return          The resulting list of matching database elements.
+   * @throw string    If error, the string is a message describing the error cause.
+   */
+  RaaList* processQuery(const std::string& query, const std::string& listname) throw (std::string);
+
+  /**
+   * @brief Creates an empty list with specified name.
+   *
+   * @param listname  A name to be given to the resulting list. Case is not significant.
+   * @param kind      Nature of the resulting list. One of RaaList::LIST_SEQUENCES, RaaList::LIST_KEYWORDS,
+   * RaaList::LIST_SPECIES.
+   * @return          The resulting list, unless an exception was raised.
+   * @throw int    3: a list with same name already existed; it is left unchanged.\n
+   * 4: the server cannot create more lists.
+   */
+  RaaList* createEmptyList(const std::string& listname, const std::string& kind = RaaList::LIST_SEQUENCES) throw (int);
+
+  /**
+   * @brief Deletes a list and calls its destructor.
+   *
+   * @param list	An RaaList object.
+   */
+  void deleteList(RaaList* list);
+
+
+  /** @} */
+
+
+  /**
+   * @name Access to feature table-defined sequences (nucleotide databases only).
+   *
+   * @{
+   */
+
+  /**
+   * @brief    Computes the list of subsequences of a given sequence corresponding to a given feature key with
+   * optional annotation string matching.
+   *
+   * This function allows to retrieve all features of the given sequence corresponding to a given feature key
+   * and whose annotation optionally contains a given string. \n
+   * Example:\n
+   * getDirectFeature("AE005174", "tRNA", "mytrnas", "anticodon: TTG")\n
+   * retrieves all tRNA features present in the feature table of sequence AE005174 that contain the string
+   * "anticodon: TTG" in their annotations, and puts that in a sequence list called "mytrnas". This function is
+   * meaningful with nucleotide sequence databases only (not with protein databases).
+   *
+   * @param seqname		The name of a database sequence. Case is not significant.
+   * @param featurekey	A feature key (e.g., CDS, tRNA, ncRNA) that must be directly accessible, that is, one of those
+   * returned by listDirectFeatureKeys(). Case is not significant.
+   * @param listname		The name to give to the resulting sequence list.
+   * @param matching		An optional string required to be present in the feature's annotations. Case is not significant.
+   * @return    The list of subsequences of <i>seqname</i> that correspond to the specified feature key and, optionally, whose
+   * annotation contains the matching string, or NULL if no matching sequence exists.
+   */
+  RaaList* getDirectFeature(const std::string& seqname, const std::string& featurekey, const std::string& listname,
+                            const std::string& matching = "");
+
+  /**
+   * @brief    Gives all feature keys of the database that can be directly accessed.
+   *
+   * These feature keys (e.g., CDS, rRNA, tRNA) can be used with function getDirectFeature(). This function is
+   * meaningful with nucleotide sequence databases only (not with protein databases).
+   *
+   * @return    A string vector listing all feature keys of the database that can be directly accessed.
+   */
   std::vector<std::string> listDirectFeatureKeys();
-	
-	/**
-	 * @brief    Gives all feature keys of the database.
-	 *
-	 * These feature keys (e.g., CDS, conflict, misc_feature) can be used with function prepareGetAnyFeature(). This function is
-	 * meaningful with nucleotide sequence databases only (not with protein databases).
-	 *
-	 * @return    A string vector listing all feature keys of the database.
-	 */
+
+  /**
+   * @brief    Gives all feature keys of the database.
+   *
+   * These feature keys (e.g., CDS, conflict, misc_feature) can be used with function prepareGetAnyFeature(). This function is
+   * meaningful with nucleotide sequence databases only (not with protein databases).
+   *
+   * @return    A string vector listing all feature keys of the database.
+   */
   std::vector<std::string> listAllFeatureKeys();
 
-	
-	/**
-	 * @brief	Starts extraction of all features of a specified key present in the feature table of a database sequence.
-	 *
-	 * A database sequence can contain many instances of a given feature key in its feature table. Thus, feature extraction
-	 * is done by first preparing the desired feature extraction, and by then successively extracting features 
-	 * by getNextFeature() calls until no more exist in the feature table or until a call to interruptGetAnyFeature() is done.
-	 * Any successful prepareGetAnyFeature() call must be followed by getNextFeature() calls until
-	 * it returns NULL or by a call to interruptGetAnyFeature(); any call to other RAA member functions in between is prohibited.
-	 *
-	 * @param seqrank	The database rank of a sequence.
-	 * @param featurekey	Any feature key (direct or not) defined in 
-	 * <a href=http://www.ebi.ac.uk/embl/WebFeat/>EMBL/GenBank/DDBJ feature tables</a>. These are also returned by listAllFeatureKeys().
-	 * @return	An opaque pointer to be transmitted to functions getNextFeature() or interruptGetAnyFeature().
-	 * @throw string	A message indicating the cause of the error.
-	 */
-	void *prepareGetAnyFeature(int seqrank, const std::string &featurekey) throw(std::string);
-	
-	/**
-	 * @brief	Successively returns features specified in a previous prepareGetAnyFeature() call.
-	 *
-	 * This function must be called repetitively until it returns NULL or until function interruptGetAnyFeature() is called.
-	 * Features are processed in their order of appearance in the feature table.
-	 * @param opaque	A pointer returned by a previous prepareGetAnyFeature() call.
-	 * @return	A sequence corresponding to one of the features specified in the prepareGetAnyFeature() call, or NULL
-	 * if no more such feature exists.
-	 */
-	Sequence *getNextFeature(void *opaque);
-	
-	/**
-	 * @brief	Terminates a features extraction session initiated by a prepareGetAnyFeature() call before getNextFeature() call
-	 * returned NULL.
-	 *
-	 * @param opaque	A pointer returned by a previous prepareGetAnyFeature() call.
-	 */
-	void interruptGetAnyFeature(void *opaque);
-
-	/** @} */
-
-	
-	
-	/**
-	 * @name Browsing database species and keywords.
-	 *
-	 * @{
-	 */
-	 
-	 /**
-	 * @brief Loads the database's full species tree classification.
-	 *
-	 * This call takes a few seconds to run on large databases because much data get downloaded from the server.
-	 *
-	 * @param showprogress    If true, progress information gets sent to stdout.
-	 * @return   An object allowing work with the full species tree (see RaaSpeciesTree), or NULL if error.
-	 */
-	RaaSpeciesTree *loadSpeciesTree(bool showprogress=true);
-	
-	/**
-	 * @brief    Frees the memory occupied by the species tree classification.
-	 *
-	 * @param tree    An object previously returned by a loadSpeciesTree() call. It is deleted upon return.
-	 */
-	void freeSpeciesTree(RaaSpeciesTree *tree);
-
-	
-	/**
-	 * @brief    Initializes pattern-matching in database keywords. Matching keywords are then returned by successive nextMatchingKeyword() calls.
-	 *
-	 * @param pattern    A pattern-matching string using @ as wildcard (example: RNA\@polymerase\@). 
-	 * Case is not significant.
-	 * @return   The maximum length of any database keyword.
-	 */
-	int keywordPattern(const std::string &pattern);
-	
-	/**
-	 * @brief    Finds next matching keyword in database.
-	 *
-	 * @param matching    Set to the next matching keyword upon return.
-	 * @return    The database rank of the next matching keyword, or 0 if no more matching keyword.
-	 */
-	int nextMatchingKeyword(std::string &matching);	
-	
-	/** @} */
-
-	
+
+  /**
+   * @brief	Starts extraction of all features of a specified key present in the feature table of a database sequence.
+   *
+   * A database sequence can contain many instances of a given feature key in its feature table. Thus, feature extraction
+   * is done by first preparing the desired feature extraction, and by then successively extracting features
+   * by getNextFeature() calls until no more exist in the feature table or until a call to interruptGetAnyFeature() is done.
+   * Any successful prepareGetAnyFeature() call must be followed by getNextFeature() calls until
+   * it returns NULL or by a call to interruptGetAnyFeature(); any call to other RAA member functions in between is prohibited.
+   *
+   * @param seqrank	The database rank of a sequence.
+   * @param featurekey	Any feature key (direct or not) defined in
+   * <a href=http://www.ebi.ac.uk/embl/WebFeat/>EMBL/GenBank/DDBJ feature tables</a>. These are also returned by listAllFeatureKeys().
+   * @return	An opaque pointer to be transmitted to functions getNextFeature() or interruptGetAnyFeature().
+   * @throw string	A message indicating the cause of the error.
+   */
+  void* prepareGetAnyFeature(int seqrank, const std::string& featurekey) throw (std::string);
+
+  /**
+   * @brief	Successively returns features specified in a previous prepareGetAnyFeature() call.
+   *
+   * This function must be called repetitively until it returns NULL or until function interruptGetAnyFeature() is called.
+   * Features are processed in their order of appearance in the feature table.
+   * @param opaque	A pointer returned by a previous prepareGetAnyFeature() call.
+   * @return	A sequence corresponding to one of the features specified in the prepareGetAnyFeature() call, or NULL
+   * if no more such feature exists.
+   */
+  Sequence* getNextFeature(void* opaque);
+
+  /**
+   * @brief	Terminates a features extraction session initiated by a prepareGetAnyFeature() call before getNextFeature() call
+   * returned NULL.
+   *
+   * @param opaque	A pointer returned by a previous prepareGetAnyFeature() call.
+   */
+  void interruptGetAnyFeature(void* opaque);
+
+  /** @} */
+
+
+  /**
+   * @name Browsing database species and keywords.
+   *
+   * @{
+   */
+
+  /**
+   * @brief Loads the database's full species tree classification.
+   *
+   * This call takes a few seconds to run on large databases because much data get downloaded from the server.
+   *
+   * @param showprogress    If true, progress information gets sent to stdout.
+   * @return   An object allowing work with the full species tree (see RaaSpeciesTree), or NULL if error.
+   */
+  RaaSpeciesTree* loadSpeciesTree(bool showprogress = true);
+
+  /**
+   * @brief    Frees the memory occupied by the species tree classification.
+   *
+   * @param tree    An object previously returned by a loadSpeciesTree() call. It is deleted upon return.
+   */
+  void freeSpeciesTree(RaaSpeciesTree* tree);
+
+
+  /**
+   * @brief    Initializes pattern-matching in database keywords. Matching keywords are then returned by successive nextMatchingKeyword() calls.
+   *
+   * @param pattern    A pattern-matching string using @ as wildcard (example: RNA\@polymerase\@).
+   * Case is not significant.
+   * @return   The maximum length of any database keyword.
+   */
+  int keywordPattern(const std::string& pattern);
+
+  /**
+   * @brief    Finds next matching keyword in database.
+   *
+   * @param matching    Set to the next matching keyword upon return.
+   * @return    The database rank of the next matching keyword, or 0 if no more matching keyword.
+   */
+  int nextMatchingKeyword(std::string& matching);
+
+  /** @} */
+
+  /**
+   * @brief    returns a pointer to a structure containing various information about the database.
+   *
+   * See http://doua.prabi.fr/databases/acnuc_data/raa_acnuc#raa_db_access for a description of the raa_db_access structure.
+   * Usage example:
+   * @code
+     RAA *mydb = new RAA("swissprot");
+     cout << "mydb is" << (mydb->get_raa_data()->swissprot ? " " : " not ") << "a protein database." << endl;
+   * @endcode
+   * @return    A pointer to a structure of type raa_db_access.
+   */
+  raa_db_access* get_raa_data() { return raa_data; }
+
 protected:
-	raa_db_access *raa_data;
+  raa_db_access* raa_data;
+
 private:
-	RaaAddress current_address;
-	int current_kw_match;
-	std::string *kw_pattern;
-	Sequence *getSeq_both(const std::string &name_or_accno, int rank, int maxlength);
+  RaaAddress current_address;
+  int current_kw_match;
+  std::string* kw_pattern;
+  Sequence* getSeq_both(const std::string& name_or_accno, int rank, int maxlength);
 };
-
-} //end of namespace bpp.
+} // end of namespace bpp.
 
 #endif // _RAA_H_
-
diff --git a/src/Bpp/Raa/RAA_acnuc.c b/src/Bpp/Raa/RAA_acnuc.c
index 8599773..09d1047 100644
--- a/src/Bpp/Raa/RAA_acnuc.c
+++ b/src/Bpp/Raa/RAA_acnuc.c
@@ -14,707 +14,757 @@
 #include <sys/time.h>
 #include <termios.h>
 #elif defined(WIN32)
-#include <Ws2tcpip.h>
-#include <Wspiapi.h>
+#if _WIN32_WINNT < 0x0501
+#define _WIN32_WINNT  0x0501
+#endif
+#include <Winsock2.h>
+#include <Ws2tcpip.h>  // for getaddrinfo, freeaddrinfo, struct addrinfo
+// #include <Wspiapi.h>
 #endif
 
 
 #define SERVER_UPDATE_MESSAGE "acnuc stop for update\n"
 /* seules fctions utilisables hors de ce fichier pour ecrire sur socket */
-int sock_fputs(raa_db_access *f, char *l);
-int sock_flush(raa_db_access *f);
+int sock_fputs(raa_db_access* f, const char* l);
+int sock_flush(raa_db_access* f);
 
 /* some prototypes */
-void raa_acnucclose(raa_db_access *raa_current_db);
-void list_open_dbs_remove(raa_db_access *raa_current_db);
+void raa_acnucclose(raa_db_access* raa_current_db);
+static char* protect_quotes(char* name);
+static void raa_free_matchkeys(raa_db_access* raa_current_db);
 
 /* needed functions */
-extern char init_codon_to_aa(char *codon, int gc);
-char codaa(char *codon, int code);
-void *prepare_sock_gz_r(FILE *sockr);
-char *z_read_sock(void *v);
-int close_sock_gz_r(void *v);
-char *unprotect_quotes(char *name);
+extern char init_codon_to_aa(char* codon, int gc);
+char codaa(char* codon, int code);
+void* prepare_sock_gz_r(FILE* sockr);
+char* z_read_sock(void* v);
+int close_sock_gz_r(void* v);
+char* unprotect_quotes(char* name);
 
 
 /* global variables */
-void (*raa_error_mess_proc)(raa_db_access *, char *) = NULL;
+void (* raa_error_mess_proc)(raa_db_access*, char*) = NULL;
 
 #define MAX_RDSHRT 50 /* max short list length read in one time */
 
-
-
-static raa_db_access *init_raa_db_access(void);
-static struct chain_void *raa_list_open_dbs = NULL;
-
 #if defined(WIN32)
 
-static int socket_getc(raa_db_access *raa_current_db, SOCKET f)
+static int socket_getc(raa_db_access* raa_current_db, SOCKET f)
 {
-int q;
+  int q;
 
-if(raa_current_db->sock_input_pos < raa_current_db->sock_input_end) {
-	return *(raa_current_db->sock_input_pos++);
-	}
-q = recv(f, raa_current_db->sock_input, SOCKBUFS, 0);
-if(q == 0 || q == SOCKET_ERROR) return EOF;
-raa_current_db->sock_input_end = raa_current_db->sock_input + q;
-raa_current_db->sock_input_pos = raa_current_db->sock_input;
-return *(raa_current_db->sock_input_pos++);
+  if (raa_current_db->sock_input_pos < raa_current_db->sock_input_end)
+  {
+    return *(raa_current_db->sock_input_pos++);
+  }
+  q = recv(f, raa_current_db->sock_input, SOCKBUFS, 0);
+  if (q == 0 || q == SOCKET_ERROR)
+    return EOF;
+  raa_current_db->sock_input_end = raa_current_db->sock_input + q;
+  raa_current_db->sock_input_pos = raa_current_db->sock_input;
+  return *(raa_current_db->sock_input_pos++);
 }
 
 
-static char *sock_fgets(raa_db_access  *raa_current_db, char *line, int len)
+static char* sock_fgets(raa_db_access* raa_current_db, char* line, int len)
 {
-int c;
-char *p;
+  int c;
+  char* p;
 
-p = line;
-while(len > 1) {
-	c = socket_getc(raa_current_db,  (SOCKET)(raa_current_db->raa_sockfdr) );
-	if(c == EOF) {
-		if(p == line) return NULL;
-		break;
-		}
-	*(p++) = c;
-	if(c == '\n') break;
-	len--;
-	}
-*p = 0;
-return line;
+  p = line;
+  while (len > 1)
+  {
+    c = socket_getc(raa_current_db,  (SOCKET)(raa_current_db->raa_sockfdr) );
+    if (c == EOF)
+    {
+      if (p == line)
+        return NULL;
+      break;
+    }
+    *(p++) = c;
+    if (c == '\n')
+      break;
+    len--;
+  }
+  *p = 0;
+  return line;
 }
 
 
-static int mswin_sock_flush(raa_db_access  *raa_current_db)
+static int mswin_sock_flush(raa_db_access* raa_current_db)
 {
-int w;
-char *p;
+  int w;
+  char* p;
 
-p = raa_current_db->sock_output;
-while(raa_current_db->sock_output_lbuf > 0) {
-	w = send((SOCKET)raa_current_db->raa_sockfdw, p, raa_current_db->sock_output_lbuf, 0);
-	raa_current_db->sock_output_lbuf -= w;
-	p += w;
-	}
-return 0;
+  p = raa_current_db->sock_output;
+  while (raa_current_db->sock_output_lbuf > 0)
+  {
+    w = send((SOCKET)raa_current_db->raa_sockfdw, p, raa_current_db->sock_output_lbuf, 0);
+    raa_current_db->sock_output_lbuf -= w;
+    p += w;
+  }
+  return 0;
 }
 
 
-int sock_flush(raa_db_access  *raa_current_db)
+int sock_flush(raa_db_access* raa_current_db)
 {
-if(raa_current_db == NULL) return 0;
-return mswin_sock_flush(raa_current_db);
+  if (raa_current_db == NULL)
+    return 0;
+  return mswin_sock_flush(raa_current_db);
 }
 
 
-int sock_fputs(raa_db_access  *raa_current_db, char *s)
+int sock_fputs(raa_db_access* raa_current_db, const char* s)
 {
-int l, r;
+  int l, r;
 
-if(raa_current_db == NULL) return 0;
-l = strlen(s);
-while(raa_current_db->sock_output_lbuf + l > SOCKBUFS) {
-	r = SOCKBUFS - raa_current_db->sock_output_lbuf;
-	memcpy(raa_current_db->sock_output + raa_current_db->sock_output_lbuf, s, r);
-	raa_current_db->sock_output_lbuf += r;
-	l -= r;
-	s += r;
-	mswin_sock_flush(raa_current_db);
-	}
-if(l > 0) {
-	memcpy(raa_current_db->sock_output + raa_current_db->sock_output_lbuf, s, l);
-	raa_current_db->sock_output_lbuf += l;
-	}
-return 0;
+  if (raa_current_db == NULL)
+    return 0;
+  l = strlen(s);
+  while (raa_current_db->sock_output_lbuf + l > SOCKBUFS)
+  {
+    r = SOCKBUFS - raa_current_db->sock_output_lbuf;
+    memcpy(raa_current_db->sock_output + raa_current_db->sock_output_lbuf, s, r);
+    raa_current_db->sock_output_lbuf += r;
+    l -= r;
+    s += r;
+    mswin_sock_flush(raa_current_db);
+  }
+  if (l > 0)
+  {
+    memcpy(raa_current_db->sock_output + raa_current_db->sock_output_lbuf, s, l);
+    raa_current_db->sock_output_lbuf += l;
+  }
+  return 0;
 }
 
 
-
 #else
 
-int sock_fputs(raa_db_access  *raa_current_db, char *s)
+int sock_fputs(raa_db_access* raa_current_db, const char* s)
 {
-if(raa_current_db == NULL) return EOF;
-return fputs(s, raa_current_db->raa_sockfdw);
+  if (raa_current_db == NULL)
+    return EOF;
+  return fputs(s, raa_current_db->raa_sockfdw);
 }
 
-int sock_flush(raa_db_access  *raa_current_db)
+int sock_flush(raa_db_access* raa_current_db)
 {
-if(raa_current_db == NULL) return EOF;
-return fflush(raa_current_db->raa_sockfdw);
+  if (raa_current_db == NULL)
+    return EOF;
+  return fflush(raa_current_db->raa_sockfdw);
 }
 
-#endif /* WIN32 */
+#endif/* WIN32 */
 
 
-int sock_printf(raa_db_access  *raa_current_db, const char *fmt, ...)
+int sock_printf(raa_db_access* raa_current_db, const char* fmt, ...)
 {
-va_list ap;
-int retval;
-static char buffer[1000];
+  va_list ap;
+  int retval;
 
-va_start(ap, fmt);
-vsprintf(buffer, fmt, ap);
-retval = sock_fputs(raa_current_db, buffer);
-va_end(ap);
-return retval;
+  va_start(ap, fmt);
+  vsprintf(raa_current_db->buffer, fmt, ap);
+  retval = sock_fputs(raa_current_db, raa_current_db->buffer);
+  va_end(ap);
+  return retval;
 }
 
 
-
 /******************************************************************/
 /* lit une ligne au plus de la socket et transfere le resultat dans une chaine char *   */
 
-static char *read_sock_tell(raa_db_access *raa_current_db, int *wascompleteline) {
-#define RSOCKBUFS 5000
-  int lnbuf, isfull;  
-  char *p ;
-  static char buffer[RSOCKBUFS];
-  static int was_here = FALSE;
-  
-  if(raa_current_db == NULL || was_here) return NULL;
+static char* read_sock_tell(raa_db_access* raa_current_db, int* wascompleteline)
+{
+  int lnbuf, isfull;
+  char* p;
+
+  if (raa_current_db == NULL || raa_current_db->was_here)
+    return NULL;
   sock_flush(raa_current_db); /* tres important */
   isfull = FALSE;
 #if defined(WIN32)
-  p = sock_fgets(raa_current_db, buffer, RSOCKBUFS);
+  p = sock_fgets(raa_current_db, raa_current_db->buffer, sizeof(raa_current_db->buffer));
 #else
-  p = fgets(buffer, RSOCKBUFS, raa_current_db->raa_sockfdr);
+  p = fgets(raa_current_db->buffer, sizeof(raa_current_db->buffer), raa_current_db->raa_sockfdr);
 #endif
-  if(p == NULL || strcmp(p, SERVER_UPDATE_MESSAGE) == 0) {
-	if(!was_here) {
-		was_here = TRUE;
-		*buffer = 0;
-		if(raa_current_db != NULL && raa_current_db->dbname != NULL) {
-			sprintf(buffer, "%s: ", raa_current_db->dbname);
-			}
-		strcat(buffer, ( p == NULL ?
-  			"Error: connection to acnuc server is down. Please try again."
-  			:
-			"Error: acnuc server is down for database update. Please try again later." )
-			);
-		if(raa_error_mess_proc == NULL) {
-			fprintf(stderr, "%s: %s\n", raa_current_db->dbname, buffer);
-			/*raa_acnucclose(raa_current_db);
-			exit(ERREUR);*/
-		        return NULL;
-			}
-		else (*raa_error_mess_proc)(raa_current_db, buffer);/*this function sd call raa_acnucclose*/
-		was_here = FALSE;
-		}
-	return NULL;
-	}
-	
-  was_here = FALSE;
-  lnbuf = strlen(buffer);
-  p = buffer + lnbuf - 1;
-  if(*p ==  '\n') isfull = TRUE;
-  while(p >= buffer && (*p ==  '\n' || *p == '\r') ) *(p--) = 0;
-  if(wascompleteline != NULL) *wascompleteline = isfull;
-  return buffer; 
-}
-
-
-char *read_sock(raa_db_access *raa_current_db) /* lit une ligne entiere, rend ligne dans memoire privee */
-{
-int wasfull, l2, l = 0;
-char *p;
-static char *reponse = NULL;
-static int lr = 0;
-
-do	{
-	p = read_sock_tell(raa_current_db, &wasfull);
-	if(p == NULL) return NULL;
-	l2 = strlen(p);
-	if(l + l2 +  1 > lr) {
-		lr = l + l2 +  1;
-		reponse = (char *)realloc(reponse, lr);
-		}
-	memcpy(reponse + l, p, l2);
-	l += l2;
-	}
-while(! wasfull);
-reponse[l] = 0;
-return reponse;
-}
-
-
-char *read_sock_timeout(raa_db_access *raa_current_db, int timeout_ms)
-{
-fd_set readfds;
-struct timeval tout;
-int err;
+  if (p == NULL || strcmp(p, SERVER_UPDATE_MESSAGE) == 0)
+  {
+    if (!raa_current_db->was_here)
+    {
+      raa_current_db->was_here = TRUE;
+      *raa_current_db->buffer = 0;
+      if (raa_current_db != NULL && raa_current_db->dbname != NULL)
+      {
+        sprintf(raa_current_db->buffer, "%s: ", raa_current_db->dbname);
+      }
+      strcat(raa_current_db->buffer, ( p == NULL ?
+                                       "Error: connection to acnuc server is down. Please try again."
+                                       :
+                                       "Error: acnuc server is down for database update. Please try again later." )
+             );
+      if (raa_error_mess_proc == NULL)
+      {
+        fprintf(stderr, "%s\n", raa_current_db->buffer);
+      }
+      else
+        (*raa_error_mess_proc)(raa_current_db, raa_current_db->buffer);
+    }
+    return NULL;
+  }
+
+  raa_current_db->was_here = FALSE;
+  lnbuf = strlen(raa_current_db->buffer);
+  p = raa_current_db->buffer + lnbuf - 1;
+  if (*p ==  '\n')
+    isfull = TRUE;
+  while (p >= raa_current_db->buffer && (*p ==  '\n' || *p == '\r') )
+    *(p--) = 0;
+  if (wascompleteline != NULL)
+    *wascompleteline = isfull;
+  return raa_current_db->buffer;
+}
+
+
+char* read_sock(raa_db_access* raa_current_db) /* lit une ligne entiere, rend ligne dans memoire privee */
+{
+  int wasfull, l2, l = 0;
+  char* p;
+
+  do
+  {
+    p = read_sock_tell(raa_current_db, &wasfull);
+    if (p == NULL)
+      return NULL;
+    l2 = strlen(p);
+    if (l + l2 +  1 > raa_current_db->max_full_line)
+    {
+      raa_current_db->max_full_line = l + l2 +  100;
+      raa_current_db->full_line = (char*)realloc(raa_current_db->full_line, raa_current_db->max_full_line);
+    }
+    memcpy(raa_current_db->full_line + l, p, l2);
+    l += l2;
+  }
+  while (!wasfull);
+  raa_current_db->full_line[l] = 0;
+  return raa_current_db->full_line;
+}
+
+
+char* read_sock_timeout(raa_db_access* raa_current_db, int timeout_ms)
+{
+  fd_set readfds;
+  struct timeval tout;
+  int err;
 
 #if defined(WIN32)
-SOCKET fd;
-if(raa_current_db == NULL) return NULL;
-fd = (SOCKET)(raa_current_db->raa_sockfdr);
+  SOCKET fd;
+  if (raa_current_db == NULL)
+    return NULL;
+  fd = (SOCKET)(raa_current_db->raa_sockfdr);
 #else
-int fd;
-if(raa_current_db == NULL) return NULL;
-fd = fileno(raa_current_db->raa_sockfdr);
+  int fd;
+  if (raa_current_db == NULL)
+    return NULL;
+  fd = fileno(raa_current_db->raa_sockfdr);
 #endif
-FD_ZERO(&readfds);
-FD_SET(fd, &readfds);
-tout.tv_sec = timeout_ms / 1000; tout.tv_usec = 1000*(timeout_ms % 1000);
-err = select(fd + 1, &readfds, NULL, NULL, &tout);
-if(err > 0 && FD_ISSET(fd, &readfds) ) {
-	return read_sock(raa_current_db);
-	}
-return NULL;
-}
-
-enum {errservname=1, /* bad server name */
-cantopensocket,  /* 2 error opening socket */
-unknowndb,  /* 3 not in list of known dbs */
-unavailabledb,  /* 4 db is currently unavailable */
-dbisopen,  /* 5 a db is already open and was not closed */
-badpsswd,  /* 6 bad password for protected db */
-nomemory,  /* 7 not enough memory */
-badracnuc,  /* 8 enviroment variables racnuc or acnuc undefined or inadequate */
-nosocket /* 9 no socket was opened yet */
+  FD_ZERO(&readfds);
+  FD_SET(fd, &readfds);
+  tout.tv_sec = timeout_ms / 1000; tout.tv_usec = 1000 * (timeout_ms % 1000);
+  err = select(fd + 1, &readfds, NULL, NULL, &tout);
+  if (err > 0 && FD_ISSET(fd, &readfds) )
+  {
+    return read_sock(raa_current_db);
+  }
+  return NULL;
+}
+
+enum {errservname = 1, /* bad server name */
+      cantopensocket,  /* 2 error opening socket */
+      unknowndb,  /* 3 not in list of known dbs */
+      unavailabledb,  /* 4 db is currently unavailable */
+      dbisopen,  /* 5 a db is already open and was not closed */
+      badpsswd,  /* 6 bad password for protected db */
+      nomemory,  /* 7 not enough memory */
+      badracnuc,  /* 8 enviroment variables racnuc or acnuc undefined or inadequate */
+      nosocket /* 9 no socket was opened yet */
 };
 
-int raa_acnucopen (char *clientid, raa_db_access **psock) 
+int raa_acnucopen (const char* clientid, raa_db_access** psock)
 /* opens the acnuc db using the environment variable racnuc, or, if undefined, acnuc,
-that should be defined to an url of the form
-raa://pbil.univ-lyon1.fr:5558/embl
-clientid: NULL or a string identifying the client
-*/
+   that should be defined to an url of the form
+   raa://pbil.univ-lyon1.fr:5558/embl
+   clientid: NULL or a string identifying the client
+ */
 {
-char *serveurName, *db_name, *p;
-int port, err;
+  char* serveurName, * db_name, * p;
+  int port, err;
 
-if( (p = getenv("racnuc")) == NULL) p = getenv("acnuc");
-if(p == NULL) return badracnuc;
-err = raa_decode_address(p, &serveurName, &port, &db_name);
-if(err) return badracnuc;
-err = raa_acnucopen_alt (serveurName,  port, db_name, clientid, psock);
-return err;
+  if ( (p = getenv("racnuc")) == NULL)
+    p = getenv("acnuc");
+  if (p == NULL)
+    return badracnuc;
+  err = raa_decode_address(p, &serveurName, &port, &db_name);
+  if (err)
+    return badracnuc;
+  err = raa_acnucopen_alt (serveurName,  port, db_name, clientid, psock);
+  free(serveurName);
+  if (db_name)
+    free(db_name);
+  return err;
 }
 
 
-int raa_acnucopen_alt (char *serveurName, int port, char *db_name, char *clientid, raa_db_access **p) 
+int raa_acnucopen_alt (const char* serveurName, int port, const char* db_name, const char* clientid, raa_db_access** p)
 /*
-clientid: NULL or a string identifying the client
-*/
-{
-int err;
- 
- err = raa_open_socket(serveurName, port, clientid, p);
- if(err != 0) return err;
- err = raa_opendb(*p, db_name);
- if(err != 0) {
-  	list_open_dbs_remove(*p);
- 	}
- return err;
- }
-
-
-int raa_open_socket(char *serveurName, int port, char *clientid, raa_db_access **psock)
+   clientid: NULL or a string identifying the client
+ */
+{
+  int err;
+
+  err = raa_open_socket(serveurName, port, clientid, p);
+  if (err != 0)
+    return err;
+  err = raa_opendb(*p, db_name);
+  if (err != 0)
+  {
+    free(*p);
+  }
+  return err;
+}
+
+
+int raa_open_socket(const char* serveurName, int port, const char* clientid, raa_db_access** psock)
 /*
-clientid: NULL or a string identifying the client
-*/
+   clientid: NULL or a string identifying the client
+ */
 {
-  raa_db_access *raa_current_db;
-  struct addrinfo *ai;
-  char *reponse, portstring[10];
+  raa_db_access* raa_current_db;
+  struct addrinfo* ai;
+  char* reponse, portstring[10];
   int err;
 #ifdef WIN32
-WSADATA mywsadata;
-SOCKET raa_snum;
+  WSADATA mywsadata;
+  SOCKET raa_snum;
 #else
-int raa_snum;
+  int raa_snum;
 #endif
 
-raa_current_db = init_raa_db_access();
-if(raa_current_db == NULL) return nomemory; /* not enough memory */
+  raa_current_db = (raa_db_access*)calloc(1, sizeof(raa_db_access));
+  if (raa_current_db == NULL)
+    return nomemory;  /* not enough memory */
   /* cr�ation de la socket */
 #ifdef WIN32
-  err = WSAStartup(MAKEWORD(2,2), &mywsadata); /* indispensable avant utilisation socket */
-  if (err == 0) raa_snum = WSASocket(AF_INET, SOCK_STREAM, IPPROTO_TCP, NULL, (GROUP)0, 0);
-  if (err != 0 || raa_snum == INVALID_SOCKET) {
-  	list_open_dbs_remove(raa_current_db);
-  	return cantopensocket;
-  	}
+  err = WSAStartup(MAKEWORD(2, 2), &mywsadata); /* indispensable avant utilisation socket */
+  if (err == 0)
+    raa_snum = WSASocket(AF_INET, SOCK_STREAM, IPPROTO_TCP, NULL, (GROUP)0, 0);
+  if (err != 0 || raa_snum == INVALID_SOCKET)
+  {
+    free(raa_current_db);
+    return cantopensocket;
+  }
 #else
   raa_snum = socket(AF_INET, SOCK_STREAM, 0);
-  if (raa_snum == -1) {
-  	list_open_dbs_remove(raa_current_db);
-  	return cantopensocket;
-  	}
+  if (raa_snum == -1)
+  {
+    free(raa_current_db);
+    return cantopensocket;
+  }
 #endif
 /* cr�ation de deux flux type FILE * */
 #if defined(WIN32)
-raa_current_db->raa_sockfdr = (FILE *)raa_snum;
-raa_current_db->raa_sockfdw = (FILE *)raa_snum;
+  raa_current_db->raa_sockfdr = (FILE*)raa_snum;
+  raa_current_db->raa_sockfdw = (FILE*)raa_snum;
 #else
-raa_current_db->raa_sockfdr = fdopen(raa_snum,"r");
-raa_current_db->raa_sockfdw = fdopen(raa_snum,"a");
+  raa_current_db->raa_sockfdr = fdopen(raa_snum, "r");
+  raa_current_db->raa_sockfdw = fdopen(raa_snum, "a");
 #endif
 
   sprintf(portstring, "%d", port);
   err = getaddrinfo(serveurName, portstring, NULL, &ai);
-  if (err) {
-    list_open_dbs_remove(raa_current_db);
+  if (err)
+  {
+    free(raa_current_db);
     return errservname;
-    }
+  }
   err = connect(raa_snum, ai->ai_addr, ai->ai_addrlen);
-  freeaddrinfo(ai); 
-  
- if (err != 0) {
-  	list_open_dbs_remove(raa_current_db);
- 	return cantopensocket;
- 	}
+  freeaddrinfo(ai);
+
+  if (err != 0)
+  {
+    free(raa_current_db);
+    return cantopensocket;
+  }
   // read first reply from the server
-  reponse = read_sock_timeout(raa_current_db, 1000*60 /* 1 min */);
-  if(reponse == NULL || strcmp(reponse, "OK acnuc socket started") != 0) {
-  	list_open_dbs_remove(raa_current_db);
- 	return cantopensocket;
- 	}
- if(clientid != NULL) {
- 	sock_printf(raa_current_db, "clientid&id=\"%s\"\n", clientid);
-	reponse=read_sock(raa_current_db);
-	if(reponse == NULL) {
-  		list_open_dbs_remove(raa_current_db);
-		return cantopensocket;
-		}
-	}
-*psock = raa_current_db;
- return 0;
-}
-
-
-extern void raa_MD5String (char *in_string, char out_digest[33]);
-
-int raa_opendb_pw(raa_db_access *raa_current_db, char *db_name, void *ptr, char *(*getpasswordf)(void *) )
+  reponse = read_sock_timeout(raa_current_db, 1000 * 60 /* 1 min */);
+  if (reponse == NULL || strcmp(reponse, "OK acnuc socket started") != 0)
+  {
+    free(raa_current_db);
+    return cantopensocket;
+  }
+  if (clientid != NULL)
+  {
+    sock_printf(raa_current_db, "clientid&id=\"%s\"\n", clientid);
+    reponse = read_sock(raa_current_db);
+    if (reponse == NULL)
+    {
+      free(raa_current_db);
+      return cantopensocket;
+    }
+  }
+  *psock = raa_current_db;
+  return 0;
+}
+
+
+extern void raa_MD5String (char* in_string, char out_digest[33]);
+
+int raa_opendb_pw(raa_db_access* raa_current_db, const char* db_name, void* ptr, char*(*getpasswordf)(void*) )
 /*
-getpasswordf: pointer to function that gets called if a password is needed
-ptr: pointer to data passed to the getpasswordf function
-return values :
+   getpasswordf: pointer to function that gets called if a password is needed
+   ptr: pointer to data passed to the getpasswordf function
+   return values :
     3    not in list of known dbs
     4    db is unavailable
     5    a db is already open
     6    failed password-based authorization
 
-*/
-{
-Reponse *rep;
-char *reponse, *code, *p, *challenge;
-int codret, totspecs, totkeys;
-
-if(raa_current_db == NULL) return nosocket;
- sock_printf(raa_current_db, "acnucopen&db=%s\n", db_name);
- reponse=read_sock(raa_current_db);
- if(reponse == NULL) return nosocket;
- rep=initreponse();
- parse(reponse,rep);
- code=val(rep,"code");
- codret=atoi(code);
- free(code);
- if(codret == 6) {
-	static char reply[33], tmp[300];
-	char *password = NULL;
-	clear_reponse(rep);
-	if(getpasswordf != NULL) password = getpasswordf(ptr);
-	if(password == NULL) return badpsswd;
-	challenge = reponse + 17;
-	/* reply = MD5 of challenge:db_name:MD5(password) */
-	raa_MD5String(password, reply);
-	memset(password, 0, strlen(password));
-	sprintf(tmp, "%s:%s:%s", challenge, db_name, reply);
-	raa_MD5String(tmp, reply);
-	memset(tmp, 0, strlen(tmp));
-	sock_printf(raa_current_db, "reply=%s\n", reply);
-	reponse = read_sock(raa_current_db);
-	rep=initreponse();
-	parse(reponse,rep);
-	code=val(rep,"code");
-	codret=atoi(code);
-	free(code);
-	}
-if (codret != 0) { 
-	clear_reponse(rep);
- 	return codret;
- 	} 
- 
-p = val(rep,"type");
-raa_current_db->dbname = strdup(db_name);
-raa_current_db->genbank = raa_current_db->embl = raa_current_db->swissprot = 
-	raa_current_db->nbrf = FALSE;
-if(p != NULL) {
- 	if(strcmp(p, "GENBANK") == 0) raa_current_db->genbank = TRUE;
- 	else if(strcmp(p, "EMBL") == 0) raa_current_db->embl = TRUE;
- 	else if(strcmp(p, "SWISSPROT") == 0) raa_current_db->swissprot = TRUE;
- 	else if(strcmp(p, "NBRF") == 0) raa_current_db->nbrf = TRUE;
- 	free(p);
- 	}
-p = val(rep,"totseqs");
-raa_current_db->nseq = atoi(p);
-free(p);
-p = val(rep,"totspecs");
-totspecs = atoi(p);
-free(p);
-p = val(rep,"totkeys");
-totkeys = atoi(p);
-free(p);
-raa_current_db->maxa=(totspecs > totkeys ? totspecs : totkeys);
-raa_current_db->longa=(raa_current_db->maxa-1)/(8 * sizeof(int))+1;
+ */
+{
+  Reponse* rep;
+  char* reponse, * code, * p, * challenge;
+  int codret, totspecs, totkeys, i;
 
-/* default values useful if talking to old server */
-	raa_current_db->WIDTH_SMJ = 20; 
-	raa_current_db->L_MNEMO = 16; 
-	raa_current_db->WIDTH_BIB = 40;
-	raa_current_db->WIDTH_AUT = 20;
-	raa_current_db->WIDTH_SP = 40;
-	raa_current_db->WIDTH_KW = 40;
-	raa_current_db->lrtxt = 60;
-	raa_current_db->SUBINLNG=63;
-	raa_current_db->ACC_LENGTH=13; /* conservative value */
-p = val(rep,"L_MNEMO");
-if(p != NULL) { raa_current_db->L_MNEMO = atoi(p); free(p); }
-p = val(rep,"WIDTH_SP");
-if(p != NULL) { raa_current_db->WIDTH_SP = atoi(p); free(p); }
-p = val(rep,"WIDTH_KW");
-if(p != NULL) { raa_current_db->WIDTH_KW = atoi(p); free(p); }
-p = val(rep,"WIDTH_AUT");
-if(p != NULL) { raa_current_db->WIDTH_AUT = atoi(p); free(p); }
-p = val(rep,"WIDTH_BIB");
-if(p != NULL) { raa_current_db->WIDTH_BIB = atoi(p); free(p); }
-p = val(rep,"WIDTH_SMJ");
-if(p != NULL) { raa_current_db->WIDTH_SMJ = atoi(p); free(p); }
-p = val(rep,"ACC_LENGTH");
-if(p != NULL) { raa_current_db->ACC_LENGTH = atoi(p); free(p); }
-p = val(rep,"lrtxt");
-if(p != NULL) { raa_current_db->lrtxt = atoi(p); free(p); }
-p = val(rep,"SUBINLNG");
-if(p != NULL) { 
-	raa_current_db->SUBINLNG = atoi(p); 
-	free(p); 
-	raa_current_db->rlng_buffer = (struct rlng *)realloc(raa_current_db->rlng_buffer, 
-		(raa_current_db->SUBINLNG + 1) * sizeof(int));
-	}
-
-clear_reponse(rep);
-return 0;
-}
-
-
-int raa_opendb(raa_db_access *raa_current_db, char *db_name)
-{
-return raa_opendb_pw(raa_current_db, db_name, NULL, NULL);
-}
-
-
-int raa_decode_address(char *url, char **p_ip_name, int *socket, char **p_remote_db)
-/* decode syntax such as raa://pbil.univ-lyon1.fr:5557/embl
-return !=0 if error
-*/
-{
-char *p, *q;
-static char ip_name[200];
-static char remote_db[100];
-
-p = url;
-if(p == NULL) return 1;
-if( (q = strstr(url, "://") ) != NULL ) p = q + 3;
-q = strchr(p, ':');
-if(q == NULL) return 1;
-memcpy(ip_name, p, q - p); ip_name[q - p] = 0;
-if(p_ip_name != NULL) *p_ip_name = ip_name;
-if(socket != NULL) *socket = atoi(q+1);
-if(p_remote_db == NULL) return 0;
-q = strchr(p, '/');
-if(q != NULL) {
-	q++;
-	while(*q == ' ') q++;
-	if(*q == 0) *p_remote_db = NULL;
-	else 	{
-		strcpy(remote_db, q);
-		*p_remote_db = remote_db;
-		}
-	}
-else *p_remote_db = NULL;
-return 0;
-}
-
-
-#define maxSUBINLNG 512
-static raa_db_access *init_raa_db_access(void)
-{
-raa_db_access *data;
-struct chain_void *elt;
-
-data = (raa_db_access *)calloc(1, sizeof(raa_db_access));
-elt = (struct chain_void *)malloc(sizeof(struct chain_void));
-if(data == NULL || elt == NULL) return NULL;
-data->rlng_buffer = (struct rlng *)malloc((maxSUBINLNG+1)*sizeof(int));
-if(data->rlng_buffer == NULL) return NULL;
-/* ajouter un elt a liste ds db ouvertes */
-elt->data = data;
-elt->next = raa_list_open_dbs;
-raa_list_open_dbs = elt;
-
-/* initialiser les champs non nuls */
-data->gfrag_data.l_nseq_buf = INT_MAX;
-data->nextelt_data.current_rank = -1;
-data->nextelt_data.previous = -2;
-data->readshrt_data.shrt_begin = S_BUF_SHRT - 1;
+  if (raa_current_db == NULL)
+    return nosocket;
+  sock_printf(raa_current_db, "acnucopen&db=%s\n", db_name);
+  reponse = read_sock(raa_current_db);
+  if (reponse == NULL)
+    return nosocket;
+  rep = initreponse();
+  parse(reponse, rep);
+  code = val(rep, "code");
+  codret = atoi(code);
+  free(code);
+  if (codret == 6)
+  {
+    char reply[33], tmp[300];
+    char* password = NULL;
+    clear_reponse(rep);
+    if (getpasswordf != NULL)
+      password = getpasswordf(ptr);
+    if (password == NULL)
+      return badpsswd;
+    challenge = reponse + 17;
+    /* reply = MD5 of challenge:db_name:MD5(password) */
+    raa_MD5String(password, reply);
+    memset(password, 0, strlen(password));
+    sprintf(tmp, "%s:%s:%s", challenge, db_name, reply);
+    raa_MD5String(tmp, reply);
+    memset(tmp, 0, strlen(tmp));
+    sock_printf(raa_current_db, "reply=%s\n", reply);
+    reponse = read_sock(raa_current_db);
+    rep = initreponse();
+    parse(reponse, rep);
+    code = val(rep, "code");
+    codret = atoi(code);
+    free(code);
+  }
+  if (codret != 0)
+  {
+    clear_reponse(rep);
+    return codret;
+  }
+
+  /* initialiser les champs non nuls */
+  raa_current_db->gfrag_data.l_nseq_buf = INT_MAX;
+  raa_current_db->nextelt_data.current_rank = -1;
+  raa_current_db->nextelt_data.previous = -2;
+  raa_current_db->readshrt_data.shrt_begin = S_BUF_SHRT - 1;
 #ifdef WIN32
-data->sock_input_pos = data->sock_input; data->sock_input_end = data->sock_input;
+  raa_current_db->sock_input_pos = raa_current_db->sock_input; raa_current_db->sock_input_end = raa_current_db->sock_input;
 #endif
-return data;
+  p = val(rep, "type");
+  raa_current_db->dbname = strdup(db_name);
+  raa_current_db->genbank = raa_current_db->embl = raa_current_db->swissprot =
+                                                     raa_current_db->nbrf = FALSE;
+  if (p != NULL)
+  {
+    if (strcmp(p, "GENBANK") == 0)
+      raa_current_db->genbank = TRUE;
+    else if (strcmp(p, "EMBL") == 0)
+      raa_current_db->embl = TRUE;
+    else if (strcmp(p, "SWISSPROT") == 0)
+      raa_current_db->swissprot = TRUE;
+    else if (strcmp(p, "NBRF") == 0)
+      raa_current_db->nbrf = TRUE;
+    free(p);
+  }
+  p = val(rep, "totseqs");
+  raa_current_db->nseq = atoi(p);
+  free(p);
+  p = val(rep, "totspecs");
+  totspecs = atoi(p);
+  free(p);
+  p = val(rep, "totkeys");
+  totkeys = atoi(p);
+  free(p);
+  raa_current_db->maxa = (totspecs > totkeys ? totspecs : totkeys);
+  raa_current_db->longa = (raa_current_db->maxa - 1) / (8 * sizeof(int)) + 1;
+
+/* default values useful if talking to old server */
+  raa_current_db->WIDTH_SMJ = 20;
+  raa_current_db->L_MNEMO = 16;
+  raa_current_db->WIDTH_BIB = 40;
+  raa_current_db->WIDTH_AUT = 20;
+  raa_current_db->WIDTH_SP = 40;
+  raa_current_db->WIDTH_KW = 40;
+  raa_current_db->lrtxt = 60;
+  raa_current_db->SUBINLNG = 63;
+  raa_current_db->VALINSHRT2 = 0;
+  raa_current_db->ACC_LENGTH = 13; /* conservative value */
+  p = val(rep, "L_MNEMO");
+  if (p != NULL)
+  {
+    raa_current_db->L_MNEMO = atoi(p); free(p);
+  }
+  p = val(rep, "WIDTH_SP");
+  if (p != NULL)
+  {
+    raa_current_db->WIDTH_SP = atoi(p); free(p);
+  }
+  p = val(rep, "WIDTH_KW");
+  if (p != NULL)
+  {
+    raa_current_db->WIDTH_KW = atoi(p); free(p);
+  }
+  p = val(rep, "WIDTH_AUT");
+  if (p != NULL)
+  {
+    raa_current_db->WIDTH_AUT = atoi(p); free(p);
+  }
+  p = val(rep, "WIDTH_BIB");
+  if (p != NULL)
+  {
+    raa_current_db->WIDTH_BIB = atoi(p); free(p);
+  }
+  p = val(rep, "WIDTH_SMJ");
+  if (p != NULL)
+  {
+    raa_current_db->WIDTH_SMJ = atoi(p); free(p);
+  }
+  p = val(rep, "ACC_LENGTH");
+  if (p != NULL)
+  {
+    raa_current_db->ACC_LENGTH = atoi(p); free(p);
+  }
+  p = val(rep, "lrtxt");
+  if (p != NULL)
+  {
+    raa_current_db->lrtxt = atoi(p); free(p);
+  }
+  p = val(rep, "SUBINLNG");
+  if (p != NULL)
+  {
+    raa_current_db->SUBINLNG = atoi(p);
+    free(p);
+    raa_current_db->rlng_buffer = (struct rlng*)calloc((raa_current_db->SUBINLNG + 1), sizeof(int));
+  }
+  p = val(rep, "VALINSHRT2");
+  if (p != NULL)
+  {
+    raa_current_db->VALINSHRT2 = atoi(p); free(p);
+  }
+  if (raa_current_db->VALINSHRT2)
+  {
+    for (i = raa_sub_of_bib; i <= raa_acc_of_loc; i++)
+    {
+      int size = 100 * raa_current_db->VALINSHRT2;
+      raa_current_db->readshrt2_data[i] = (struct shrt2_list*)malloc(sizeof(int) * (size + 4));
+      raa_current_db->readshrt2_data[i]->size = size;
+      raa_current_db->readshrt2_data[i]->length = 0;
+      raa_current_db->readshrt2_data[i]->point = 0;
+      raa_current_db->readshrt2_data[i]->next = 0;
+    }
+  }
+
+  clear_reponse(rep);
+  return 0;
+}
+
+
+int raa_opendb(raa_db_access* raa_current_db, const char* db_name)
+{
+  return raa_opendb_pw(raa_current_db, db_name, NULL, NULL);
+}
+
+
+int raa_decode_address(char* url, char** p_ip_name, int* socket, char** p_remote_db)
+/* decode syntax such as raa://pbil.univ-lyon1.fr:5557/embl
+   return !=0 if error
+ */
+{
+  char* p, * q;
+  char* ip_name;
+  char* remote_db;
+
+  p = url;
+  if (p == NULL)
+    return 1;
+  if ( (q = strstr(url, "://") ) != NULL)
+    p = q + 3;
+  q = strchr(p, ':');
+  if (q == NULL)
+    return 1;
+  ip_name = (char*)malloc(q - p + 1);
+  memcpy(ip_name, p, q - p); ip_name[q - p] = 0;
+  if (p_ip_name != NULL)
+    *p_ip_name = ip_name;
+  if (socket != NULL)
+    *socket = atoi(q + 1);
+  if (p_remote_db == NULL)
+    return 0;
+  q = strchr(p, '/');
+  if (q != NULL)
+  {
+    q++;
+    while (*q == ' ')
+      q++;
+    if (*q == 0)
+      *p_remote_db = NULL;
+    else
+    {
+      remote_db = strdup(q);
+      *p_remote_db = remote_db;
+    }
+  }
+  else
+    *p_remote_db = NULL;
+  return 0;
 }
 
 
-static int fill_gfrag_buf(raa_db_access *raa_current_db, int nsub, int first)
+static int fill_gfrag_buf(raa_db_access* raa_current_db, int nsub, int first)
 {
-char *p, *line;
-int lu, l, length, wasfull;
+  char* p, * line;
+  int lu, l, wasfull;
 
-sock_printf(raa_current_db,"gfrag&number=%d&start=%d&length=%d\n", nsub, first, RAA_GFRAG_BSIZE);
+  sock_printf(raa_current_db, "gfrag&number=%d&start=%d&length=%d\n", nsub, first, RAA_GFRAG_BSIZE);
 /* retour:  length=xx&...the seq...\n */
-line = read_sock_tell(raa_current_db, &wasfull);
-if(line == NULL) return 0;
-if(strncmp(line, "length=", 7) != 0 || (p = strchr(line, '&')) == NULL ) {
-	return 0;
-	}
-length = atoi(line + 7);
-lu = strlen(++p);
-memcpy(raa_current_db->gfrag_data.buffer, p, lu);
-while(! wasfull) {
-	line = read_sock_tell(raa_current_db, &wasfull);
-	if(line == NULL) break;
-	l = strlen(line);
-	if(lu+l <= RAA_GFRAG_BSIZE) memcpy(raa_current_db->gfrag_data.buffer + lu, line, l);
-	lu += l;
-	}
-raa_current_db->gfrag_data.buffer[lu] = 0;
-return lu;
-}
-
-
-
-int raa_gfrag(raa_db_access *raa_current_db, int nsub, int first, int lfrag, char *dseq) 
-{
-int lu, piece;
-char *debut;
-
-if(raa_current_db == NULL) return 0;
-if(raa_current_db->gfrag_data.lbuf == 0 || nsub != raa_current_db->gfrag_data.nseq_buf || 
-		first >= raa_current_db->gfrag_data.first_buf + raa_current_db->gfrag_data.lbuf || 
-		first < raa_current_db->gfrag_data.first_buf) {
-	if( nsub == raa_current_db->gfrag_data.nseq_buf && first > raa_current_db->gfrag_data.l_nseq_buf) 
-		lu = 0;
-	else
-		lu = fill_gfrag_buf(raa_current_db, nsub, first);	
-	
-	if(lu == 0) return 0;
-	raa_current_db->gfrag_data.lbuf = lu;
-	if(raa_current_db->gfrag_data.lbuf < RAA_GFRAG_BSIZE) 
-		raa_current_db->gfrag_data.l_nseq_buf = first + raa_current_db->gfrag_data.lbuf - 1;
-	else raa_current_db->gfrag_data.l_nseq_buf = INT_MAX;
-	raa_current_db->gfrag_data.first_buf = first;
-	raa_current_db->gfrag_data.nseq_buf = nsub;
-	}
-debut = raa_current_db->gfrag_data.buffer + (first - raa_current_db->gfrag_data.first_buf);
-lu = raa_current_db->gfrag_data.lbuf + raa_current_db->gfrag_data.first_buf-1 - first+1;
-if( lu > lfrag) lu = lfrag;
-memcpy(dseq, debut, lu);
-while(lfrag > lu) {
-	piece = raa_gfrag(raa_current_db, nsub, first + lu, lfrag - lu, dseq + lu);
-	if(piece == 0) break;
-	lu += piece;
-	}
-dseq[lu] = 0;
-return lu;
-}
-
-
-void list_open_dbs_remove(raa_db_access *raa_current_db)
-/* enlever de liste des db ouvertes */
-{
-struct chain_void *elt, *elt2;
-int i;
-
-if(raa_current_db == NULL) return; /* should not happen */
-if(raa_current_db->dbname != NULL) free(raa_current_db->dbname);
-if(raa_current_db->rlng_buffer != NULL) free(raa_current_db->rlng_buffer);
-if(raa_current_db->readsub_data.name != NULL) free(raa_current_db->readsub_data.name);
-for(i = 0; i < raa_current_db->annot_data.annotcount; i++) 
-	free(raa_current_db->annot_data.annotline[i]);
-for(i = 0; i < BLOCK_ELTS_IN_LIST; i++) if(raa_current_db->nextelt_data.tabname[i] != NULL) 
-			free(raa_current_db->nextelt_data.tabname[i]);
-if(raa_current_db->readsmj_data.lastrec > 0) {
-		free(raa_current_db->readsmj_data.plongs);
-		for(i=2; i <= raa_current_db->readsmj_data.lastrec; i++) {
-			if(raa_current_db->readsmj_data.names[i] != NULL) free(raa_current_db->readsmj_data.names[i]);
-			if(raa_current_db->readsmj_data.libels[i] != NULL) free(raa_current_db->readsmj_data.libels[i]);
-			}
-		free(raa_current_db->readsmj_data.names); free(raa_current_db->readsmj_data.libels);
-		raa_current_db->readsmj_data.lastrec = 0;
-		}
-
-if(raa_list_open_dbs == NULL) return; /* should not happen */
-if(raa_list_open_dbs->data == raa_current_db) {
-	elt = raa_list_open_dbs;
-	raa_list_open_dbs = raa_list_open_dbs->next;
-	free(elt);
-	}
-else {
-	elt = raa_list_open_dbs;
-	while(elt->next != NULL) {
-		if(elt->next->data == raa_current_db) {
-			elt2 = elt->next;
-			elt->next = elt2->next;
-			free(elt2);
-			break;
-			}
-		elt = elt->next;
-		}
-	}
-free(raa_current_db);
-}
-
-
-static void raa_free_sp_tree(raa_node *pere)
-{
-raa_node *next, *tmp_n;
-struct raa_pair *liste, *tmp_p;
-
-liste = pere->list_desc;
-while(liste != NULL) {
-	tmp_p = liste->next;
-	raa_free_sp_tree(liste->value);
-	free(liste);
-	liste = tmp_p;
-	}
-next = pere->syno;
-while(next != NULL && next != pere) {
-	tmp_n = next->syno;
-	free(next->name);
-	free(next);
-	next = tmp_n;
-	}
-free(pere->name);
-if(pere->libel != NULL) free(pere->libel);
-if(pere->libel_upcase != NULL) free(pere->libel_upcase);
-free(pere);
-}
-
-
-void raa_acnucclose(raa_db_access *raa_current_db) {
-char *reponse;
-int i;
-
-if(raa_current_db == NULL) return;
-
-sock_fputs(raa_current_db, "acnucclose\n"); 
-  
-reponse=read_sock(raa_current_db);
-if(reponse != NULL) {
-	sock_fputs(raa_current_db, "quit\n"); 
-	sock_flush(raa_current_db);
-	}
+  line = read_sock_tell(raa_current_db, &wasfull);
+  if (line == NULL)
+    return 0;
+  if (strncmp(line, "length=", 7) != 0 || (p = strchr(line, '&')) == NULL)
+  {
+    return 0;
+  }
+  lu = strlen(++p);
+  memcpy(raa_current_db->gfrag_data.buffer, p, lu);
+  while (!wasfull)
+  {
+    line = read_sock_tell(raa_current_db, &wasfull);
+    if (line == NULL)
+      break;
+    l = strlen(line);
+    if (lu + l <= RAA_GFRAG_BSIZE)
+      memcpy(raa_current_db->gfrag_data.buffer + lu, line, l);
+    lu += l;
+  }
+  raa_current_db->gfrag_data.buffer[lu] = 0;
+  return lu;
+}
+
+
+int raa_gfrag(raa_db_access* raa_current_db, int nsub, int first, int lfrag, char* dseq)
+{
+  int lu, piece;
+  char* debut;
+
+  if (raa_current_db == NULL)
+    return 0;
+  if (raa_current_db->gfrag_data.lbuf == 0 || nsub != raa_current_db->gfrag_data.nseq_buf ||
+      first >= raa_current_db->gfrag_data.first_buf + raa_current_db->gfrag_data.lbuf ||
+      first < raa_current_db->gfrag_data.first_buf)
+  {
+    if (nsub == raa_current_db->gfrag_data.nseq_buf && first > raa_current_db->gfrag_data.l_nseq_buf)
+      lu = 0;
+    else
+      lu = fill_gfrag_buf(raa_current_db, nsub, first);
+
+    if (lu == 0)
+      return 0;
+    raa_current_db->gfrag_data.lbuf = lu;
+    if (raa_current_db->gfrag_data.lbuf < RAA_GFRAG_BSIZE)
+      raa_current_db->gfrag_data.l_nseq_buf = first + raa_current_db->gfrag_data.lbuf - 1;
+    else
+      raa_current_db->gfrag_data.l_nseq_buf = INT_MAX;
+    raa_current_db->gfrag_data.first_buf = first;
+    raa_current_db->gfrag_data.nseq_buf = nsub;
+  }
+  debut = raa_current_db->gfrag_data.buffer + (first - raa_current_db->gfrag_data.first_buf);
+  lu = raa_current_db->gfrag_data.lbuf + raa_current_db->gfrag_data.first_buf - 1 - first + 1;
+  if (lu > lfrag)
+    lu = lfrag;
+  memcpy(dseq, debut, lu);
+  while (lfrag > lu)
+  {
+    piece = raa_gfrag(raa_current_db, nsub, first + lu, lfrag - lu, dseq + lu);
+    if (piece == 0)
+      break;
+    lu += piece;
+  }
+  dseq[lu] = 0;
+  return lu;
+}
+
+
+static void raa_free_sp_tree(raa_node* pere)
+{
+  raa_node* next, * tmp_n;
+  struct raa_pair* liste, * tmp_p;
+
+  liste = pere->list_desc;
+  while (liste != NULL)
+  {
+    tmp_p = liste->next;
+    raa_free_sp_tree(liste->value);
+    free(liste);
+    liste = tmp_p;
+  }
+  next = pere->syno;
+  while (next != NULL && next != pere)
+  {
+    tmp_n = next->syno;
+    free(next->name);
+    free(next);
+    next = tmp_n;
+  }
+  free(pere->name);
+  if (pere->libel != NULL)
+    free(pere->libel);
+  if (pere->libel_upcase != NULL)
+    free(pere->libel_upcase);
+  free(pere);
+}
+
+
+void raa_acnucclose(raa_db_access* raa_current_db)
+{
+  char* reponse;
+  int i;
+
+  if (raa_current_db == NULL)
+    return;
+
+  sock_fputs(raa_current_db, "acnucclose\n");
+
+  reponse = read_sock(raa_current_db);
+  if (reponse != NULL)
+  {
+    sock_fputs(raa_current_db, "quit\n");
+    sock_flush(raa_current_db);
+  }
 #ifdef WIN32
   closesocket( (SOCKET) (raa_current_db->raa_sockfdw) );
 #else
@@ -722,2371 +772,2901 @@ if(reponse != NULL) {
   fclose(raa_current_db->raa_sockfdw);
 #endif
 
-if(raa_current_db->tot_key_annots > 0) {
-	for(i = 0; i < raa_current_db->tot_key_annots; i++) {
-		free(raa_current_db->key_annots[i]);
-		free(raa_current_db->key_annots_min[i]);
-		}
-	free(raa_current_db->key_annots);
-	free(raa_current_db->key_annots_min);
-	free(raa_current_db->want_key_annots);
-	raa_current_db->tot_key_annots = 0;
-	}
-if(raa_current_db->tid_to_rank != NULL) free(raa_current_db->tid_to_rank);
-if(raa_current_db->sp_tree != NULL) {
-	raa_free_sp_tree(raa_current_db->sp_tree[2]);
-	free(raa_current_db->sp_tree);
-	}
+  if (raa_current_db->tot_key_annots > 0)
+  {
+    for (i = 0; i < raa_current_db->tot_key_annots; i++)
+    {
+      free(raa_current_db->key_annots[i]);
+      free(raa_current_db->key_annots_min[i]);
+    }
+    free(raa_current_db->key_annots);
+    free(raa_current_db->key_annots_min);
+    free(raa_current_db->want_key_annots);
+    raa_current_db->tot_key_annots = 0;
+  }
+  if (raa_current_db->tid_to_rank != NULL)
+    free(raa_current_db->tid_to_rank);
+  if (raa_current_db->sp_tree != NULL)
+  {
+    raa_free_sp_tree(raa_current_db->sp_tree[2]);
+    free(raa_current_db->sp_tree);
+  }
+  if (raa_current_db->dbname != NULL)
+    free(raa_current_db->dbname);
+  if (raa_current_db->rlng_buffer != NULL)
+    free(raa_current_db->rlng_buffer);
+  if (raa_current_db->readsub_data.name != NULL)
+    free(raa_current_db->readsub_data.name);
+  for (i = 0; i < raa_current_db->annot_data.annotcount; i++)
+  {
+    free(raa_current_db->annot_data.annotline[i]);
+  }
+  for (i = 0; i < BLOCK_ELTS_IN_LIST; i++)
+  {
+    if (raa_current_db->nextelt_data.tabname[i] != NULL)
+      free(raa_current_db->nextelt_data.tabname[i]);
+  }
+  if (raa_current_db->readsmj_data.lastrec > 0)
+  {
+    free(raa_current_db->readsmj_data.plongs);
+    for (i = 2; i <= raa_current_db->readsmj_data.lastrec; i++)
+    {
+      if (raa_current_db->readsmj_data.names[i] != NULL)
+        free(raa_current_db->readsmj_data.names[i]);
+      if (raa_current_db->readsmj_data.libels[i] != NULL)
+        free(raa_current_db->readsmj_data.libels[i]);
+    }
+    free(raa_current_db->readsmj_data.names); free(raa_current_db->readsmj_data.libels);
+    raa_current_db->readsmj_data.lastrec = 0;
+  }
+  raa_free_matchkeys(raa_current_db);
+  if (raa_current_db->full_line)
+    free(raa_current_db->full_line);
+  if (raa_current_db->namestr)
+    free(raa_current_db->namestr);
+  if (raa_current_db->help)
+    free(raa_current_db->help);
+  if (raa_current_db->tmp_prelist)
+    free(raa_current_db->tmp_prelist);
+  if (raa_current_db->translate_buffer)
+    free(raa_current_db->translate_buffer);
 
-list_open_dbs_remove(raa_current_db);
+  free(raa_current_db);
 }
 
 
-int raa_prep_acnuc_query(raa_db_access *raa_current_db) {
+int raa_prep_acnuc_query(raa_db_access* raa_current_db)
+{
 /* returns -1 if error or number of free bit lists
-*/
-  char *reponse, *p, *q, *annotlines;
+ */
+  char* reponse, * p, * q, * annotlines;
   int codret, i;
-  Reponse *rep;
+  Reponse* rep;
 
-if(raa_current_db == NULL) return -1;
+  if (raa_current_db == NULL)
+    return -1;
   rep = initreponse();
 
   sock_fputs(raa_current_db, "countfreelists\n");
-  reponse=read_sock(raa_current_db);
-if(reponse == NULL) return -1;
-  parse(reponse,rep);
-  reponse=val(rep,"code");
-  if(reponse == NULL) return -1;
-  codret=atoi(reponse);
+  reponse = read_sock(raa_current_db);
+  if (reponse == NULL)
+    return -1;
+  parse(reponse, rep);
+  reponse = val(rep, "code");
+  if (reponse == NULL)
+    return -1;
+  codret = atoi(reponse);
   free(reponse);
-  if(codret != 0) return -1;
-  reponse=val(rep,"free");
-  if(reponse != NULL) {
-	codret = atoi(reponse);
-  	free(reponse);
-  	}
-annotlines = val(rep, "annotlines");
-raa_current_db->tot_key_annots = 0;
-if(annotlines != NULL) {
-	p = annotlines - 1;
-	do 	{
-		p++;
-		raa_current_db->tot_key_annots++;
-		}
-	while((p = strchr(p, '|')) != NULL);
-	raa_current_db->want_key_annots = (unsigned char *)malloc(raa_current_db->tot_key_annots * 
-		sizeof(unsigned char));
-	raa_current_db->key_annots = (char **)malloc(raa_current_db->tot_key_annots * sizeof(char *));
-	raa_current_db->key_annots_min = (char **)malloc(raa_current_db->tot_key_annots * sizeof(char *));
-	p = annotlines;
-	for(i = 0; i < raa_current_db->tot_key_annots; i++) {
-		q = strchr(p, '|');
-		if(q == NULL) q = p + strlen(p);
-		raa_current_db->key_annots[i] = malloc(q - p + 1);
-		raa_current_db->key_annots_min[i] = malloc(q - p + 1);
-		memcpy(raa_current_db->key_annots_min[i], p, q - p);
-		raa_current_db->key_annots_min[i][q - p] = 0;
-		strcpy(raa_current_db->key_annots[i], raa_current_db->key_annots_min[i]);
-		majuscules(raa_current_db->key_annots[i]);
-		compact(raa_current_db->key_annots[i]);
-		p = q + 1;
-		}
-	free(annotlines);
-	}
-else codret = -1;
+  if (codret != 0)
+    return -1;
+  reponse = val(rep, "free");
+  if (reponse != NULL)
+  {
+    codret = atoi(reponse);
+    free(reponse);
+  }
+  annotlines = val(rep, "annotlines");
+  raa_current_db->tot_key_annots = 0;
+  if (annotlines != NULL)
+  {
+    p = annotlines - 1;
+    do
+    {
+      p++;
+      raa_current_db->tot_key_annots++;
+    }
+    while ((p = strchr(p, '|')) != NULL);
+    raa_current_db->want_key_annots = (unsigned char*)malloc(raa_current_db->tot_key_annots *
+                                                             sizeof(unsigned char));
+    raa_current_db->key_annots = (char**)malloc(raa_current_db->tot_key_annots * sizeof(char*));
+    raa_current_db->key_annots_min = (char**)malloc(raa_current_db->tot_key_annots * sizeof(char*));
+    p = annotlines;
+    for (i = 0; i < raa_current_db->tot_key_annots; i++)
+    {
+      q = strchr(p, '|');
+      if (q == NULL)
+        q = p + strlen(p);
+      raa_current_db->key_annots[i] = malloc(q - p + 1);
+      raa_current_db->key_annots_min[i] = malloc(q - p + 1);
+      memcpy(raa_current_db->key_annots_min[i], p, q - p);
+      raa_current_db->key_annots_min[i][q - p] = 0;
+      strcpy(raa_current_db->key_annots[i], raa_current_db->key_annots_min[i]);
+      majuscules(raa_current_db->key_annots[i]);
+      compact(raa_current_db->key_annots[i]);
+      p = q + 1;
+    }
+    free(annotlines);
+  }
+  else
+    codret = -1;
   clear_reponse(rep);
   return codret;
 }
 
 
-static char *raa_requete_remote_file(raa_db_access *raa_current_db, char *oldrequete, int **plist, char **); 
+static char* raa_requete_remote_file(raa_db_access* raa_current_db, char* oldrequete, int** plist, char**);
+
+int raa_proc_query(raa_db_access* raa_current_db, char* requete, char** message,
+                   char* nomliste, int* numlist, int* count, int* locus, int* type)
+{
+  char* reponse, * code, * numlistchr, * countchr, * locuschr, * typechr, * badfname, * p;
+  int codret, * tmp_blists;
+  Reponse* rep;
 
-int raa_proc_query(raa_db_access *raa_current_db, char *requete, char **message, 
-	char *nomliste, int *numlist, int *count, int *locus, int *type) {
-  char *reponse, *code, *numlistchr, *countchr, *locuschr, *typechr, *badfname;
-  int codret, *tmp_blists;
-  Reponse *rep;
-  
-if(raa_current_db == NULL) return -1;
+  if (raa_current_db == NULL)
+    return -1;
   requete = raa_requete_remote_file(raa_current_db, requete, &tmp_blists, &badfname);
-  if(requete == NULL) {
-  	if(message != NULL) {
-  		static char fmt[] = "problem accessing file: %s";
-  		*message = (char *)malloc(strlen(fmt) + strlen(badfname) + 1);
-  		sprintf(*message, fmt, badfname);
-  		}
-  	return 1;
-  	}
-  sock_printf(raa_current_db,"proc_query&query=\"%s\"&name=\"%s\"\n", 
-  	protect_quotes(requete), nomliste);
+  if (requete == NULL)
+  {
+    if (message != NULL)
+    {
+      char fmt[] = "problem accessing file: %s";
+      *message = (char*)malloc(strlen(fmt) + strlen(badfname) + 1);
+      sprintf(*message, fmt, badfname);
+    }
+    return 1;
+  }
+  p = protect_quotes(requete);
+  sock_printf(raa_current_db, "proc_query&query=\"%s\"&name=\"%s\"\n", p, nomliste);
+  free(p);
   free(requete);
-  reponse=read_sock(raa_current_db);
-  if(reponse == NULL) {
-  	 if(message != NULL) *message = strdup("connection with server is down");
-	 return -1;
-	 }
-  rep=initreponse();
-  parse(reponse,rep);
-  code=val(rep,"code");
-  codret=atoi(code);
-  if(codret == 0) {
-    	numlistchr=val(rep,"lrank");
- 	 *numlist=atoi(numlistchr);
-  	countchr=val(rep,"count");
- 	if(count != NULL) *count=atoi(countchr);
-  	typechr=val(rep,"type");
-  	locuschr=val(rep,"locus");
-  	if(type != NULL) {
-  		if (strcmp(typechr,"SQ")==0) *type='S';
-  		else if (strcmp(typechr,"KW")==0) *type='K';
-  		else if (strcmp(typechr,"SP")==0) *type='E';
-  		}
-  	if(locus != NULL) *locus = strcmp(locuschr,"T") == 0;
-	  free(countchr);
-	  free(locuschr);
-	  free(typechr);
-	  free(numlistchr);
-  	}
- else if(message != NULL) {
- 	*message = val(rep, "message");
- 	}
+  reponse = read_sock(raa_current_db);
+  if (reponse == NULL)
+  {
+    if (message != NULL)
+      *message = strdup("connection with server is down");
+    return -1;
+  }
+  rep = initreponse();
+  parse(reponse, rep);
+  code = val(rep, "code");
+  codret = atoi(code);
+  if (codret == 0)
+  {
+    numlistchr = val(rep, "lrank");
+    *numlist = atoi(numlistchr);
+    countchr = val(rep, "count");
+    if (count != NULL)
+      *count = atoi(countchr);
+    typechr = val(rep, "type");
+    locuschr = val(rep, "locus");
+    if (type != NULL)
+    {
+      if (strcmp(typechr, "SQ") == 0)
+        *type = 'S';
+      else if (strcmp(typechr, "KW") == 0)
+        *type = 'K';
+      else if (strcmp(typechr, "SP") == 0)
+        *type = 'E';
+    }
+    if (locus != NULL)
+      *locus = strcmp(locuschr, "T") == 0;
+    free(countchr);
+    free(locuschr);
+    free(typechr);
+    free(numlistchr);
+  }
+  else if (message != NULL)
+  {
+    *message = val(rep, "message");
+  }
   free(code);
   clear_reponse(rep);
-  if(tmp_blists != NULL) {
- 	 while(*tmp_blists != 0) raa_releaselist(raa_current_db, *(tmp_blists++) );
- 	 }
+  if (tmp_blists != NULL)
+  {
+    while (*tmp_blists != 0)
+      raa_releaselist(raa_current_db, *(tmp_blists++) );
+  }
   return codret;
 }
 
 
-int raa_nexteltinlist(raa_db_access *raa_current_db, int first, int lrank, char **pname, int *plength) 
+int raa_nexteltinlist(raa_db_access* raa_current_db, int first, int lrank, char** pname, int* plength)
 {
-return raa_nexteltinlist_annots(raa_current_db, first, lrank, pname, plength, NULL, NULL);
+  return raa_nexteltinlist_annots(raa_current_db, first, lrank, pname, plength, NULL, NULL);
 }
 
 
-int raa_nexteltinlist_annots(raa_db_access *raa_current_db, int first, int lrank, char **pname, int *plength, 
-	raa_long *paddr, int *pdiv)
+int raa_nexteltinlist_annots(raa_db_access* raa_current_db, int first, int lrank, char** pname, int* plength,
+                             raa_long* paddr, int* pdiv)
 {
-int num, next, count;
-char *p;
-Reponse *rep;
+  int num, next, count;
+  char* p;
+  Reponse* rep;
 
-if(raa_current_db == NULL) return 0;
-if(lrank == raa_current_db->nextelt_data.current_rank && 
-		raa_current_db->nextelt_data.previous < raa_current_db->nextelt_data.total - 1 && 
-	(raa_current_db->nextelt_data.previous == -1 || 
-		first == raa_current_db->nextelt_data.tabnum[raa_current_db->nextelt_data.previous] ) ) {
-	raa_current_db->nextelt_data.previous++;
-	next = raa_current_db->nextelt_data.tabnum[raa_current_db->nextelt_data.previous];
-	if(next != 0) {
-		if(pname != NULL) *pname = raa_current_db->nextelt_data.tabname[raa_current_db->nextelt_data.previous];
-		if(plength != NULL) *plength = raa_current_db->nextelt_data.tablength[raa_current_db->nextelt_data.previous];
-		if(paddr != NULL) *paddr = raa_current_db->nextelt_data.taboffset[raa_current_db->nextelt_data.previous];
-		if(pdiv != NULL) *pdiv = raa_current_db->nextelt_data.tabdiv[raa_current_db->nextelt_data.previous];
-		}
-	return next;
-	}
+  if (raa_current_db == NULL)
+    return 0;
+  if (lrank == raa_current_db->nextelt_data.current_rank &&
+      raa_current_db->nextelt_data.previous < raa_current_db->nextelt_data.total - 1 &&
+      (raa_current_db->nextelt_data.previous == -1 ||
+       first == raa_current_db->nextelt_data.tabnum[raa_current_db->nextelt_data.previous] ) )
+  {
+    raa_current_db->nextelt_data.previous++;
+    next = raa_current_db->nextelt_data.tabnum[raa_current_db->nextelt_data.previous];
+    if (next != 0)
+    {
+      if (pname != NULL)
+        *pname = raa_current_db->nextelt_data.tabname[raa_current_db->nextelt_data.previous];
+      if (plength != NULL)
+        *plength = raa_current_db->nextelt_data.tablength[raa_current_db->nextelt_data.previous];
+      if (paddr != NULL)
+        *paddr = raa_current_db->nextelt_data.taboffset[raa_current_db->nextelt_data.previous];
+      if (pdiv != NULL)
+        *pdiv = raa_current_db->nextelt_data.tabdiv[raa_current_db->nextelt_data.previous];
+    }
+    return next;
+  }
 
-count = BLOCK_ELTS_IN_LIST; 
-for(num = 0; num < count; num++) {
-	if(raa_current_db->nextelt_data.tabname[num] != NULL) free(raa_current_db->nextelt_data.tabname[num]);
-	}
-memset(raa_current_db->nextelt_data.tabname, 0, count * sizeof(char *));
-sock_printf(raa_current_db,"nexteltinlist&lrank=%d&first=%d&count=%d\n",lrank,first, count);
-num = 0; raa_current_db->nextelt_data.current_rank = lrank;
-raa_current_db->nextelt_data.total = 0;
-do {
-  p = read_sock(raa_current_db);
-  if(p == NULL) return 0;
-  rep = initreponse();
-  parse(p, rep);
-  p = val(rep,"next");
-  if(p == NULL) {
-	clear_reponse(rep);
-	return 0;
-	}
-  next = atoi(p);
-  free(p);
-  raa_current_db->nextelt_data.total++;
-  raa_current_db->nextelt_data.tabnum[num] = next;
-  if(next != 0) {
-	  raa_current_db->nextelt_data.tabname[num] = val(rep, "name");
-	  if( (p= val(rep, "length")) != NULL) {
-		raa_current_db->nextelt_data.tablength[num] = atoi(p);
-		free(p);
-		}
-	  if((p= val(rep, "offset")) != NULL) {
-		raa_current_db->nextelt_data.taboffset[num] = scan_raa_long(p);
-		free(p);
-		}
-	  if((p= val(rep, "div")) != NULL) {
-		raa_current_db->nextelt_data.tabdiv[num] = atoi(p);
-		free(p);
-		}
-	}
-  clear_reponse(rep);
-  num++;
+  count = BLOCK_ELTS_IN_LIST;
+  for (num = 0; num < count; num++)
+  {
+    if (raa_current_db->nextelt_data.tabname[num] != NULL)
+      free(raa_current_db->nextelt_data.tabname[num]);
+  }
+  memset(raa_current_db->nextelt_data.tabname, 0, count * sizeof(char*));
+  sock_printf(raa_current_db, "nexteltinlist&lrank=%d&first=%d&count=%d\n", lrank, first, count);
+  num = 0; raa_current_db->nextelt_data.current_rank = lrank;
+  raa_current_db->nextelt_data.total = 0;
+  do
+  {
+    p = read_sock(raa_current_db);
+    if (p == NULL)
+      return 0;
+    rep = initreponse();
+    parse(p, rep);
+    p = val(rep, "next");
+    if (p == NULL)
+    {
+      clear_reponse(rep);
+      return 0;
+    }
+    next = atoi(p);
+    free(p);
+    raa_current_db->nextelt_data.total++;
+    raa_current_db->nextelt_data.tabnum[num] = next;
+    if (next != 0)
+    {
+      raa_current_db->nextelt_data.tabname[num] = val(rep, "name");
+      if ( (p = val(rep, "length")) != NULL)
+      {
+        raa_current_db->nextelt_data.tablength[num] = atoi(p);
+        free(p);
+      }
+      if ((p = val(rep, "offset")) != NULL)
+      {
+        raa_current_db->nextelt_data.taboffset[num] = scan_raa_long(p);
+        free(p);
+      }
+      if ((p = val(rep, "div")) != NULL)
+      {
+        raa_current_db->nextelt_data.tabdiv[num] = atoi(p);
+        free(p);
+      }
+    }
+    clear_reponse(rep);
+    num++;
   }
-while(next != 0 && --count > 0);
-raa_current_db->nextelt_data.previous = -1;
-return raa_nexteltinlist_annots(raa_current_db, first, lrank, pname, plength, paddr, pdiv);
+  while (next != 0 && --count > 0);
+  raa_current_db->nextelt_data.previous = -1;
+  return raa_nexteltinlist_annots(raa_current_db, first, lrank, pname, plength, paddr, pdiv);
 }
 
 
-raa_long scan_raa_long(char *txt)
+raa_long scan_raa_long(char* txt)
 {
-raa_long val;
+  raa_long val;
 
-sscanf(txt, RAA_LONG_FORMAT, &val);
-return val;
+  sscanf(txt, RAA_LONG_FORMAT, &val);
+  return val;
 }
 
 
-char *print_raa_long(raa_long val)
+char* print_raa_long(raa_long val, char* buffer)
 {
-static char buffer[50];
-sprintf(buffer, RAA_LONG_FORMAT, val);
-return buffer;
+  sprintf(buffer, RAA_LONG_FORMAT, val);
+  return buffer;
 }
 
 
-
-
-static char *load_annots_buf(raa_db_access *raa_current_db, raa_long faddr, int div, int was_nextannots)
+static char* load_annots_buf(raa_db_access* raa_current_db, raa_long faddr, int div, int was_nextannots)
 /* appeler juste apr�s avoir envoye sur socket
-read_annots&... ou  next_annots&... : 
-retour attendu sur socket : nl=xx[&offset=xx]&...nl lines each with \n     */
+   read_annots&... ou  next_annots&... :
+   retour attendu sur socket : nl=xx[&offset=xx]&...nl lines each with \n     */
 {
-int i, nl;
-char *firstline, *p, *q;
+  int i, nl;
+  char* firstline, * p, * q;
 
-  if(raa_current_db == NULL) return NULL;
-  for(i=0; i < raa_current_db->annot_data.annotcount; i++) 
-  	free(raa_current_db->annot_data.annotline[i]);
+  if (raa_current_db == NULL)
+    return NULL;
+  for (i = 0; i < raa_current_db->annot_data.annotcount; i++)
+  {
+    free(raa_current_db->annot_data.annotline[i]);
+  }
   raa_current_db->annot_data.annotcount = 0;
   raa_current_db->annot_data.annotaddrlast = faddr;
   firstline = read_sock(raa_current_db);
-  if(firstline == NULL) return NULL;
-  if(strncmp(firstline, "nl=", 3) != 0 || (p = strchr(firstline, '&')) == NULL ) return NULL;
+  if (firstline == NULL)
+    return NULL;
+  if (strncmp(firstline, "nl=", 3) != 0 || (p = strchr(firstline, '&')) == NULL)
+    return NULL;
   nl = atoi(firstline + 3);
-  if(nl == 0) return NULL;
+  if (nl == 0)
+    return NULL;
   p++;
-  if(was_nextannots && strncmp(p, "offset=", 7) == 0) {
-  	p = strchr(p, '&');
-  	if(p == NULL) return NULL;
-  	p++;
-  	}
+  if (was_nextannots && strncmp(p, "offset=", 7) == 0)
+  {
+    p = strchr(p, '&');
+    if (p == NULL)
+      return NULL;
+    p++;
+  }
   i = strlen(p);
-  raa_current_db->annot_data.annotline[0] = (char *)malloc(i+1);
+  raa_current_db->annot_data.annotline[0] = (char*)malloc(i + 1);
   strcpy(raa_current_db->annot_data.annotline[0], p);
   raa_current_db->annot_data.annotaddrlast += strlen(raa_current_db->annot_data.annotline[0]) + 1;
-  for(i = 1; i < nl; i++) {
-  	q = read_sock(raa_current_db);
-  	if(q == NULL) return NULL;
-  	raa_current_db->annot_data.annotline[i] = strdup( q );
-  	raa_current_db->annot_data.annotaddrlast += strlen(raa_current_db->annot_data.annotline[i]) + 1;
-  	} 
-  raa_current_db->annot_data.annotcurrent = 1; raa_current_db->annot_data.annotcount = nl; 
-  raa_current_db->annot_data.annotaddr = faddr; raa_current_db->annot_data.annotdiv = div; 
+  for (i = 1; i < nl; i++)
+  {
+    q = read_sock(raa_current_db);
+    if (q == NULL)
+      return NULL;
+    raa_current_db->annot_data.annotline[i] = strdup( q );
+    raa_current_db->annot_data.annotaddrlast += strlen(raa_current_db->annot_data.annotline[i]) + 1;
+  }
+  raa_current_db->annot_data.annotcurrent = 1; raa_current_db->annot_data.annotcount = nl;
+  raa_current_db->annot_data.annotaddr = faddr; raa_current_db->annot_data.annotdiv = div;
   raa_current_db->annot_data.annotaddrfirst = faddr;
   strcpy(raa_current_db->annot_data.annotsbuffer, raa_current_db->annot_data.annotline[0]);
   return raa_current_db->annot_data.annotsbuffer;
 }
 
 
-char *raa_read_annots(raa_db_access *raa_current_db, raa_long faddr, int div)
+char* raa_read_annots(raa_db_access* raa_current_db, raa_long faddr, int div)
 {
   int i;
   raa_long debut;
-  char *p;
-
-if(raa_current_db == NULL) return NULL;
-  if(raa_current_db->annot_data.annotcount > 0 && 
-  		div == raa_current_db->annot_data.annotdiv && 
-  		faddr >= raa_current_db->annot_data.annotaddrfirst && 
-  		faddr < raa_current_db->annot_data.annotaddrlast ) {
-	debut = raa_current_db->annot_data.annotaddrfirst;
-  	for(i = 1; i <= raa_current_db->annot_data.annotcount; i++) {
-  		if(debut == faddr) {
-  			raa_current_db->annot_data.annotcurrent = i;
-  			raa_current_db->annot_data.annotaddr = debut;
-  			strcpy(raa_current_db->annot_data.annotsbuffer, raa_current_db->annot_data.annotline[raa_current_db->annot_data.annotcurrent - 1]);
-  			return raa_current_db->annot_data.annotsbuffer;
-  			}
-  		debut += strlen(raa_current_db->annot_data.annotline[i - 1]) + 1;
-  		} 
-	}
-  sock_printf(raa_current_db,"read_annots&offset=%s&div=%d&nl=%d\n", 
-  		print_raa_long(faddr), div, ANNOTCOUNT);
+  char* p, buffer[40];
+
+  if (raa_current_db == NULL)
+    return NULL;
+  if (raa_current_db->annot_data.annotcount > 0 &&
+      div == raa_current_db->annot_data.annotdiv &&
+      faddr >= raa_current_db->annot_data.annotaddrfirst &&
+      faddr < raa_current_db->annot_data.annotaddrlast)
+  {
+    debut = raa_current_db->annot_data.annotaddrfirst;
+    for (i = 1; i <= raa_current_db->annot_data.annotcount; i++)
+    {
+      if (debut == faddr)
+      {
+        raa_current_db->annot_data.annotcurrent = i;
+        raa_current_db->annot_data.annotaddr = debut;
+        strcpy(raa_current_db->annot_data.annotsbuffer, raa_current_db->annot_data.annotline[raa_current_db->annot_data.annotcurrent - 1]);
+        return raa_current_db->annot_data.annotsbuffer;
+      }
+      debut += strlen(raa_current_db->annot_data.annotline[i - 1]) + 1;
+    }
+  }
+  sock_printf(raa_current_db, "read_annots&offset=%s&div=%d&nl=%d\n",
+              print_raa_long(faddr, buffer), div, ANNOTCOUNT);
   p = load_annots_buf(raa_current_db, faddr, div, FALSE);
   return p;
 }
 
 
-char *raa_next_annots(raa_db_access *raa_current_db, raa_long *paddr)
+char* raa_next_annots(raa_db_access* raa_current_db, raa_long* paddr)
 {
   raa_long faddr;
-  char *p;
-  
-if(raa_current_db == NULL) return NULL;
-  if(raa_current_db->annot_data.annotcurrent < raa_current_db->annot_data.annotcount) {
-  	raa_current_db->annot_data.annotaddr += 
-  		strlen(raa_current_db->annot_data.annotline[raa_current_db->annot_data.annotcurrent - 1]) + 1;
-  	if(paddr != NULL) *paddr = raa_current_db->annot_data.annotaddr;
-  	raa_current_db->annot_data.annotcurrent++;
-  	strcpy(raa_current_db->annot_data.annotsbuffer, 
-  		raa_current_db->annot_data.annotline[raa_current_db->annot_data.annotcurrent - 1]);
-  	return raa_current_db->annot_data.annotsbuffer;
-  	}
+  char* p;
+
+  if (raa_current_db == NULL)
+    return NULL;
+  if (raa_current_db->annot_data.annotcurrent < raa_current_db->annot_data.annotcount)
+  {
+    raa_current_db->annot_data.annotaddr +=
+      strlen(raa_current_db->annot_data.annotline[raa_current_db->annot_data.annotcurrent - 1]) + 1;
+    if (paddr != NULL)
+      *paddr = raa_current_db->annot_data.annotaddr;
+    raa_current_db->annot_data.annotcurrent++;
+    strcpy(raa_current_db->annot_data.annotsbuffer,
+           raa_current_db->annot_data.annotline[raa_current_db->annot_data.annotcurrent - 1]);
+    return raa_current_db->annot_data.annotsbuffer;
+  }
   faddr = raa_current_db->annot_data.annotaddrlast;
-  if(paddr != NULL) *paddr = faddr;
+  if (paddr != NULL)
+    *paddr = faddr;
   sock_printf(raa_current_db, "next_annots&nl=%d\n", ANNOTCOUNT);
   p = load_annots_buf(raa_current_db, faddr, raa_current_db->annot_data.annotdiv, TRUE);
   return p;
 }
 
 
-int raa_iknum(raa_db_access *raa_current_db, char *name, raa_file cas)
+int raa_iknum(raa_db_access* raa_current_db, char* name, raa_file cas)
 {
-char *reponse, *p;
-int val;
+  char* reponse, * p;
+  int val;
 
-if(raa_current_db == NULL) return 0;
-  sock_printf(raa_current_db,"iknum&name=\"%s\"&type=%s\n", protect_quotes(name), 
-  	(cas == raa_key ? "KW" : "SP") );
+  if (raa_current_db == NULL)
+    return 0;
+  p = protect_quotes(name);
+  sock_printf(raa_current_db, "iknum&name=\"%s\"&type=%s\n", p, (cas == raa_key ? "KW" : "SP") );
+  free(p);
   reponse = read_sock(raa_current_db);
-  if(reponse == NULL) return 0;
+  if (reponse == NULL)
+    return 0;
   p = strchr(reponse, '=');
-  if(p == NULL) return 0;
+  if (p == NULL)
+    return 0;
   p++;
   sscanf(p, "%u", &val);
   return val;
 }
 
 
-int raa_isenum(raa_db_access *raa_current_db, char *name)
+int raa_isenum(raa_db_access* raa_current_db, char* name)
 {
-char *reponse, *p;
-int val;
+  char* reponse, * p;
+  int val;
 
-if(raa_current_db == NULL) return 0;
-  sock_printf(raa_current_db,"isenum&name=\"%s\"\n", protect_quotes(name) );
+  if (raa_current_db == NULL)
+    return 0;
+  p = protect_quotes(name);
+  sock_printf(raa_current_db, "isenum&name=\"%s\"\n", p );
+  free(p);
   reponse = read_sock(raa_current_db);
-  if(reponse == NULL) return 0;
+  if (reponse == NULL)
+    return 0;
   p = strchr(reponse, '=');
-  if(p == NULL) return 0;
+  if (p == NULL)
+    return 0;
   p++;
   sscanf(p, "%u", &val);
   return val;
 }
 
 
-int raa_bcount(raa_db_access *raa_current_db, int lrank)
+int raa_bcount(raa_db_access* raa_current_db, int lrank)
 {
-  Reponse *rep;
-  char *reponse, *code, *countstr;
+  Reponse* rep;
+  char* reponse, * code, * countstr;
   int count = 0;
-  
-if(raa_current_db == NULL) return 0;
-  rep=initreponse();
-  sock_printf(raa_current_db,"bcount&lrank=%d\n",lrank);
-  reponse=read_sock(raa_current_db);
-  if(reponse == NULL) return 0;
+
+  if (raa_current_db == NULL)
+    return 0;
+  rep = initreponse();
+  sock_printf(raa_current_db, "bcount&lrank=%d\n", lrank);
+  reponse = read_sock(raa_current_db);
+  if (reponse == NULL)
+    return 0;
   parse(reponse, rep);
-  code = val(rep,"code");
-  if(*code == '0') {
-  	countstr = val(rep,"count");
-	count = atoi(countstr);
-	free(countstr); 
-  	}
+  code = val(rep, "code");
+  if (*code == '0')
+  {
+    countstr = val(rep, "count");
+    count = atoi(countstr);
+    free(countstr);
+  }
   free(code);
   clear_reponse(rep);
   return count;
 }
 
-void raa_bit1(raa_db_access *raa_current_db, int lrank, int num)
+void raa_bit1(raa_db_access* raa_current_db, int lrank, int num)
 {
-char *reponse;
-
-if(raa_current_db == NULL) return;
-  sock_printf(raa_current_db,"bit1&lrank=%d&num=%d\n", lrank, num);
-  reponse=read_sock(raa_current_db);
+  if (raa_current_db == NULL)
+    return;
+  sock_printf(raa_current_db, "bit1&lrank=%d&num=%d\n", lrank, num);
+  read_sock(raa_current_db); //memory leak?
 }
 
 
-void raa_bit0(raa_db_access *raa_current_db, int lrank, int num)
+void raa_bit0(raa_db_access* raa_current_db, int lrank, int num)
 {
-char *reponse;
-
-if(raa_current_db == NULL) return;
-  sock_printf(raa_current_db,"bit0&lrank=%d&num=%d\n", lrank, num);
-  reponse=read_sock(raa_current_db);
+  if (raa_current_db == NULL)
+    return;
+  sock_printf(raa_current_db, "bit0&lrank=%d&num=%d\n", lrank, num);
+  read_sock(raa_current_db); //memory leak?
 }
 
 
-int raa_btest(raa_db_access *raa_current_db, int lrank, int num)
+int raa_btest(raa_db_access* raa_current_db, int lrank, int num)
 {
-char *reponse;
-
-if(raa_current_db == NULL) return 0;
-  sock_printf(raa_current_db,"btest&lrank=%d&num=%d\n", lrank, num);
-  reponse=read_sock(raa_current_db);
-  if(reponse == NULL) return 0;
+  if (raa_current_db == NULL)
+    return 0;
+  sock_printf(raa_current_db, "btest&lrank=%d&num=%d\n", lrank, num);
+  char* reponse = read_sock(raa_current_db);
+  if (reponse == NULL)
+    return 0;
   return strcmp(reponse, "code=0&on") == 0;
 }
 
-void raa_copylist(raa_db_access *raa_current_db, int from, int to)
+void raa_copylist(raa_db_access* raa_current_db, int from, int to)
 {
-char *reponse;
-
-if(raa_current_db == NULL) return;
-  sock_printf(raa_current_db,"copylist&lfrom=%d&lto=%d\n", from, to);
-  reponse=read_sock(raa_current_db);
+  if (raa_current_db == NULL)
+    return;
+  sock_printf(raa_current_db, "copylist&lfrom=%d&lto=%d\n", from, to);
+  read_sock(raa_current_db); //memory leak?
 }
 
 
-void raa_zerolist(raa_db_access *raa_current_db, int rank)
+void raa_zerolist(raa_db_access* raa_current_db, int rank)
 {
-char *reponse;
-
-if(raa_current_db == NULL) return;
-  sock_printf(raa_current_db,"zerolist&lrank=%d\n", rank);
-  reponse=read_sock(raa_current_db);
+  if (raa_current_db == NULL)
+    return;
+  sock_printf(raa_current_db, "zerolist&lrank=%d\n", rank);
+  read_sock(raa_current_db); //memory leak?
 }
 
 
-void raa_setliststate(raa_db_access *raa_current_db, int lrank, int locus, int type)
+void raa_setliststate(raa_db_access* raa_current_db, int lrank, int locus, int type)
 {
-char *reponse, str_type[3];
+  char str_type[3];
 
-if(raa_current_db == NULL) return;
-if(type == 'S') strcpy(str_type, "SQ");
-else if(type == 'K') strcpy(str_type, "KW");
-else  strcpy(str_type, "SP");
+  if (raa_current_db == NULL)
+    return;
+  if (type == 'S')
+    strcpy(str_type, "SQ");
+  else if (type == 'K')
+    strcpy(str_type, "KW");
+  else
+    strcpy(str_type, "SP");
 
-  sock_printf(raa_current_db,"setliststate&lrank=%d&locus=%c&type=%s\n", lrank, (locus ? 'T' : 'F'),
-  	str_type );
-  reponse=read_sock(raa_current_db);
+  sock_printf(raa_current_db, "setliststate&lrank=%d&locus=%c&type=%s\n", lrank, (locus ? 'T' : 'F'),
+              str_type );
+  read_sock(raa_current_db); //memory leak?
 }
 
 
-char *raa_getliststate(raa_db_access *raa_current_db, int lrank, int *locus, int *type, int *count)
-/* list name is returned in static memory */
+char* raa_getliststate(raa_db_access* raa_current_db, int lrank, int* locus, int* type, int* count)
 {
-  Reponse *rep;
-  char *reponse, *code, *countstr, *locusstr, *typestr, *retp = NULL;
-  static char *namestr = NULL;
-  
-if(raa_current_db == NULL) return NULL;
-  rep=initreponse();
-  sock_printf(raa_current_db,"getliststate&lrank=%d\n",lrank);
-  reponse=read_sock(raa_current_db);
-  if(reponse == NULL) return NULL;
+  Reponse* rep;
+  char* reponse, * code, * countstr, * locusstr, * typestr, * retp = NULL;
+
+  if (raa_current_db == NULL)
+    return NULL;
+  rep = initreponse();
+  sock_printf(raa_current_db, "getliststate&lrank=%d\n", lrank);
+  reponse = read_sock(raa_current_db);
+  if (reponse == NULL)
+    return NULL;
   parse(reponse, rep);
-  code = val(rep,"code");
-  if(code != NULL && *code == '0') {
-  	typestr = val(rep,"type");
-  	if(type != NULL) {
-  		if(strcmp(typestr, "SQ") == 0) *type = 'S';
-  		else if(strcmp(typestr, "KW") == 0) *type = 'K';
-  		else *type = 'E';
-  		}
-  	if(namestr != NULL) free(namestr); /* allocation precedante */
-  	namestr = val(rep, "name");
-  	countstr = val(rep, "count");
-	if(count != NULL) *count = atoi(countstr);
-  	locusstr = val(rep, "locus");
-  	if(locus != NULL) *locus = (*locusstr == 'T');
-	free(countstr); 
-	free(locusstr); 
-	free(typestr); 
-	retp = namestr;
-  	}
-  if(code != NULL) free(code);
+  code = val(rep, "code");
+  if (code != NULL && *code == '0')
+  {
+    typestr = val(rep, "type");
+    if (type != NULL)
+    {
+      if (strcmp(typestr, "SQ") == 0)
+        *type = 'S';
+      else if (strcmp(typestr, "KW") == 0)
+        *type = 'K';
+      else
+        *type = 'E';
+    }
+    if (raa_current_db->namestr != NULL)
+      free(raa_current_db->namestr);  /* allocation precedante */
+    raa_current_db->namestr = val(rep, "name");
+    countstr = val(rep, "count");
+    if (count != NULL)
+      *count = atoi(countstr);
+    locusstr = val(rep, "locus");
+    if (locus != NULL)
+      *locus = (*locusstr == 'T');
+    free(countstr);
+    free(locusstr);
+    free(typestr);
+    retp = raa_current_db->namestr;
+  }
+  if (code != NULL)
+    free(code);
   clear_reponse(rep);
   return retp;
 }
 
 
-char *raa_residuecount(raa_db_access *raa_current_db, int lrank)
+char* raa_residuecount(raa_db_access* raa_current_db, int lrank)
 {
-Reponse *rep;
-char *reponse, *code;
-static char total[30];
+  Reponse* rep;
+  char* reponse, * code;
 
-if(raa_current_db == NULL) return 0;
-  rep=initreponse();
-  sock_printf(raa_current_db,"residuecount&lrank=%d\n",lrank);
-  reponse=read_sock(raa_current_db);
-  if(reponse == NULL) return 0;
+  if (raa_current_db == NULL)
+    return 0;
+  rep = initreponse();
+  sock_printf(raa_current_db, "residuecount&lrank=%d\n", lrank);
+  reponse = read_sock(raa_current_db);
+  if (reponse == NULL)
+    return 0;
   parse(reponse, rep);
-  code = val(rep,"code");
-  strcpy(total, "0");
-  if(code != NULL && *code == '0') {
-	free(code);
-  	code = val(rep,"count");
- 	if(code != NULL) {
-		strcpy(total, code);
-		free(code);
-		}
-	}
-clear_reponse(rep);
-return total;
+  code = val(rep, "code");
+  strcpy(raa_current_db->residuecount, "0");
+  if (code != NULL && *code == '0')
+  {
+    free(code);
+    code = val(rep, "count");
+    if (code != NULL)
+    {
+      strcpy(raa_current_db->residuecount, code);
+      free(code);
+    }
+  }
+  clear_reponse(rep);
+  return raa_current_db->residuecount;
 }
 
 
-int raa_getemptylist(raa_db_access *raa_current_db, char *name)
+int raa_getemptylist(raa_db_access* raa_current_db, char* name)
 {
-  Reponse *rep;
-  char *reponse, *code, *rankstr;
+  Reponse* rep;
+  char* reponse, * code, * rankstr, * p;
   int rank = 0;
-  
-if(raa_current_db == NULL) return 0;
-  rep=initreponse();
-  sock_printf(raa_current_db, "getemptylist&name=\"%s\"\n", protect_quotes(name));
-  reponse=read_sock(raa_current_db);
-  if(reponse == NULL) return 0;
+
+  if (raa_current_db == NULL)
+    return 0;
+  rep = initreponse();
+  p = protect_quotes(name);
+  sock_printf(raa_current_db, "getemptylist&name=\"%s\"\n", p);
+  free(p);
+  reponse = read_sock(raa_current_db);
+  if (reponse == NULL)
+    return 0;
   parse(reponse, rep);
-  code = val(rep,"code");
-  if(code != NULL && (*code == '0' || *code == '3') ) {
-  	rankstr = val(rep, "lrank");
-	rank = atoi(rankstr);
-	free(rankstr); 
-  	}
-  if(code != NULL) free(code);
+  code = val(rep, "code");
+  if (code != NULL && (*code == '0' || *code == '3') )
+  {
+    rankstr = val(rep, "lrank");
+    rank = atoi(rankstr);
+    free(rankstr);
+  }
+  if (code != NULL)
+    free(code);
   clear_reponse(rep);
   return rank;
 }
 
 
-int raa_setlistname(raa_db_access *raa_current_db, int lrank, char *name)
+int raa_setlistname(raa_db_access* raa_current_db, int lrank, char* name)
 {
-  Reponse *rep;
-char *reponse, *code;
-int retval;
+  Reponse* rep;
+  char* reponse, * code;
+  int retval;
 
-if(raa_current_db == NULL) return -1;
-  rep=initreponse();
+  if (raa_current_db == NULL)
+    return -1;
+  rep = initreponse();
   sock_printf(raa_current_db, "setlistname&lrank=%d&name=\"%s\"\n", lrank, name);
-  reponse=read_sock(raa_current_db);
-  if(reponse == NULL) return -1;
+  reponse = read_sock(raa_current_db);
+  if (reponse == NULL)
+    return -1;
   parse(reponse, rep);
-  code = val(rep,"code");
-  if(*code == '0') retval = 0;
-  else if(*code == '3') retval = 1;
-  else retval = -1;
+  code = val(rep, "code");
+  if (*code == '0')
+    retval = 0;
+  else if (*code == '3')
+    retval = 1;
+  else
+    retval = -1;
   free(code);
   clear_reponse(rep);
-return retval;  
+  return retval;
 }
 
 
-int raa_getlistrank(raa_db_access *raa_current_db, char *name)
+int raa_getlistrank(raa_db_access* raa_current_db, char* name)
 {
-  Reponse *rep;
-char *reponse, *rankstr;
-int rank;
+  Reponse* rep;
+  char* reponse, * rankstr;
+  int rank;
 
-if(raa_current_db == NULL) return 0;
-  rep=initreponse();
+  if (raa_current_db == NULL)
+    return 0;
+  rep = initreponse();
   sock_printf(raa_current_db, "getlistrank&name=\"%s\"\n", name);
-  reponse=read_sock(raa_current_db);
-  if(reponse == NULL) return 0;
+  reponse = read_sock(raa_current_db);
+  if (reponse == NULL)
+    return 0;
   parse(reponse, rep);
-  rankstr = val(rep,"lrank");
-  if(rankstr == NULL) return 0;
+  rankstr = val(rep, "lrank");
+  if (rankstr == NULL)
+    return 0;
   rank = atoi(rankstr);
   free(rankstr);
   clear_reponse(rep);
-  return rank;  
+  return rank;
 }
 
 
-
-int raa_releaselist(raa_db_access *raa_current_db, int lrank)
+int raa_releaselist(raa_db_access* raa_current_db, int lrank)
 {
-  Reponse *rep;
-char *reponse, *rankstr;
-int rank;
+  Reponse* rep;
+  char* reponse, * rankstr;
+  int rank;
 
-if(raa_current_db == NULL) return 1;
-  rep=initreponse();
+  if (raa_current_db == NULL)
+    return 1;
+  rep = initreponse();
   sock_printf(raa_current_db, "releaselist&lrank=%d\n", lrank);
-  reponse=read_sock(raa_current_db);
-  if(reponse == NULL) return 1;
+  reponse = read_sock(raa_current_db);
+  if (reponse == NULL)
+    return 1;
   parse(reponse, rep);
-  rankstr = val(rep,"code");
-  if(rankstr == NULL) return 1;
+  rankstr = val(rep, "code");
+  if (rankstr == NULL)
+    return 1;
   rank = atoi(rankstr);
   free(rankstr);
   clear_reponse(rep);
-  return rank;  
+  return rank;
 }
 
 
-
-int raa_countfilles(raa_db_access *raa_current_db, int lrank)
+int raa_countfilles(raa_db_access* raa_current_db, int lrank)
 {
-  Reponse *rep;
-char *reponse, *rankstr;
-int rank;
+  Reponse* rep;
+  char* reponse, * rankstr;
+  int rank;
 
-if(raa_current_db == NULL) return 0;
-  rep=initreponse();
+  if (raa_current_db == NULL)
+    return 0;
+  rep = initreponse();
   sock_printf(raa_current_db, "countsubseqs&lrank=%d\n", lrank);
-  reponse=read_sock(raa_current_db);
-  if(reponse == NULL) return 0;
+  reponse = read_sock(raa_current_db);
+  if (reponse == NULL)
+    return 0;
   parse(reponse, rep);
-  rankstr = val(rep,"count");
-  if(rankstr == NULL) return 0;
+  rankstr = val(rep, "count");
+  if (rankstr == NULL)
+    return 0;
   rank = atoi(rankstr);
   free(rankstr);
   clear_reponse(rep);
-  return rank;  
+  return rank;
 }
 
 
-int raa_alllistranks(raa_db_access *raa_current_db, int **pranks)
+int raa_alllistranks(raa_db_access* raa_current_db, int** pranks)
 {
-  Reponse *rep;
-char *reponse, *rankstr, *p;
-int count, *ranks, i;
+  Reponse* rep;
+  char* reponse, * rankstr, * p;
+  int count, * ranks, i;
 
-if(raa_current_db == NULL) return 0;
-  rep=initreponse();
+  if (raa_current_db == NULL)
+    return 0;
+  rep = initreponse();
   sock_fputs(raa_current_db, "alllistranks\n");
-  reponse=read_sock(raa_current_db);
-  if(reponse == NULL) return 0;
+  reponse = read_sock(raa_current_db);
+  if (reponse == NULL)
+    return 0;
   parse(reponse, rep);
-  rankstr = val(rep,"count");
+  rankstr = val(rep, "count");
   p = strchr(reponse, '&');
-  if(rankstr == NULL || p == NULL) return 0;
+  if (rankstr == NULL || p == NULL)
+    return 0;
   count = atoi(rankstr);
-  ranks = (int *)malloc(count * sizeof(int));
-  if(ranks == NULL ) return 0;
+  ranks = (int*)malloc(count * sizeof(int));
+  if (ranks == NULL)
+    return 0;
   p++;
-  for(i=0; i< count; i++) {
-  	sscanf(p, "%d", &ranks[i]);
-  	p = strchr(p, ',');
-  	if(p == NULL) break;
-  	p++;
-  	}
+  for (i = 0; i < count; i++)
+  {
+    sscanf(p, "%d", &ranks[i]);
+    p = strchr(p, ',');
+    if (p == NULL)
+      break;
+    p++;
+  }
   *pranks = ranks;
   free(rankstr);
   clear_reponse(rep);
-  return count;  
+  return count;
 }
 
 
-
-int raa_fcode(raa_db_access *raa_current_db, raa_file cas, char *name)
-{
-char *reponse, *p, type[5];
-int value;
-
-if(raa_current_db == NULL) return 0;
-if(cas == raa_aut) strcpy(type, "AUT");
-else if(cas == raa_bib) strcpy(type, "BIB");
-else if(cas == raa_acc) strcpy(type, "ACC");
-else if(cas == raa_smj) strcpy(type, "SMJ");
-else if(cas == raa_sub) strcpy(type, "SUB");
-else return 0;
-  sock_printf(raa_current_db,"fcode&name=\"%s\"&type=%s\n", protect_quotes(name), type );
+int raa_fcode(raa_db_access* raa_current_db, raa_file cas, char* name)
+{
+  char* reponse, * p, type[5];
+  int value;
+
+  if (raa_current_db == NULL)
+    return 0;
+  if (cas == raa_aut)
+    strcpy(type, "AUT");
+  else if (cas == raa_bib)
+    strcpy(type, "BIB");
+  else if (cas == raa_acc)
+    strcpy(type, "ACC");
+  else if (cas == raa_smj)
+    strcpy(type, "SMJ");
+  else if (cas == raa_sub)
+    strcpy(type, "SUB");
+  else
+    return 0;
+  p = protect_quotes(name);
+  sock_printf(raa_current_db, "fcode&name=\"%s\"&type=%s\n", p, type );
+  free(p);
   reponse = read_sock(raa_current_db);
-  if(reponse == NULL) return 0;
+  if (reponse == NULL)
+    return 0;
   p = strchr(reponse, '=');
-  if(p == NULL) return 0;
+  if (p == NULL)
+    return 0;
   p++;
   sscanf(p, "%u", &value);
   return value;
 }
 
 
+int raa_read_first_rec(raa_db_access* raa_current_db, raa_file cas)
+{
+  int value;
+  char type[5], * p, * reponse;
+
+  if (raa_current_db == NULL)
+    return 1;
+  if (raa_current_db->first_recs[cas] != 0)
+    return raa_current_db->first_recs[cas];
+
+  if (cas == raa_aut)
+    strcpy(type, "AUT");
+  else if (cas == raa_bib)
+    strcpy(type, "BIB");
+  else if (cas == raa_acc)
+    strcpy(type, "ACC");
+  else if (cas == raa_smj)
+    strcpy(type, "SMJ");
+  else if (cas == raa_sub)
+    strcpy(type, "SUB");
+
+
+  else if (cas == raa_loc)
+    strcpy(type, "LOC");
+  else if (cas == raa_key)
+    strcpy(type, "KEY");
+  else if (cas == raa_spec)
+    strcpy(type, "SPEC");
+  else if (cas == raa_shrt)
+    strcpy(type, "SHRT");
+  else if (cas == raa_lng)
+    strcpy(type, "LNG");
+  else if (cas == raa_ext)
+    strcpy(type, "EXT");
+  else if (cas == raa_txt)
+    strcpy(type, "TXT");
+  else
+    return 0;
+  sock_printf(raa_current_db, "readfirstrec&type=%s\n", type );
+  reponse = read_sock(raa_current_db);
+  if (reponse == NULL)
+    return 1;
+  p = strstr(reponse, "count=");
+  if (p == NULL)
+    return 0;
+  sscanf(p + 6, "%u", &value);
+  raa_current_db->first_recs[cas] = value;
+  return value;
+}
+
 
-int raa_read_first_rec(raa_db_access *raa_current_db, raa_file cas)
+char* raa_readsub_pannots(raa_db_access* raa_current_db, int num, int* plength, int* ptype, int* pext, int* plkey, int* plocus,
+                          int* pframe, int* pgencode, raa_long* paddr, int* pdiv)
+/* do both seq_to_annots and readsub and buffer result for one seq */
 {
-int value;
-char type[5], *p, *reponse;
+  Reponse* rep;
+  char* p, * reponse;
+  int code, l;
+
+  if (raa_current_db == NULL)
+    return NULL;
+  if (num < 2 || num > raa_current_db->nseq)
+    return NULL;
+  if (num != raa_current_db->readsub_data.previous)
+  {
+    sock_printf(raa_current_db, "seq_to_annots&number=%d\nreadsub&num=%u\n", num, num);
+    reponse = read_sock(raa_current_db);
+    if (reponse == NULL)
+      return NULL;
+    /* process reply to seq_to_annots */
+    rep = initreponse();
+    parse(reponse, rep);
+    p = val(rep, "code");
+    code = atoi(p);
+    free(p);
+    if (code == 0)
+    {
+      p = val(rep, "offset");
+      raa_current_db->readsub_data.addr = scan_raa_long(p);
+      free(p);
+      p = val(rep, "div");
+      raa_current_db->readsub_data.div = atoi(p);
+      free(p);
+    }
+    clear_reponse(rep);
+    /* process reply to readsub */
+    reponse = read_sock(raa_current_db);
+    if (reponse == NULL)
+      return NULL;
+    rep = initreponse();
+    parse(reponse, rep);
+    p = val(rep, "code");
+    if (p == NULL)
+      return NULL;
+    code = atoi(p);
+    free(p);
+    if (code != 0)
+    {
+      clear_reponse(rep);
+      return NULL;
+    }
+    p = val(rep, "name");
+    l = strlen(p) + 1;
+    if (l > raa_current_db->readsub_data.lname)
+    {
+      raa_current_db->readsub_data.lname = l;
+      raa_current_db->readsub_data.name = (char*)realloc(raa_current_db->readsub_data.name,
+                                                         raa_current_db->readsub_data.lname);
+    }
+    strcpy(raa_current_db->readsub_data.name, p);
+    free(p);
+    p = val(rep, "length");
+    raa_current_db->readsub_data.length = atoi(p);
+    free(p);
+    p = val(rep, "type");
+    raa_current_db->readsub_data.type = atoi_u(p);
+    free(p);
+    p = val(rep, "is_sub");
+    raa_current_db->readsub_data.locus = atoi_u(p);
+    free(p);
+    p = val(rep, "toext");
+    raa_current_db->readsub_data.toext = atoi_u(p);
+    if (raa_current_db->readsub_data.locus > 0)
+      raa_current_db->readsub_data.toext = -raa_current_db->readsub_data.toext;
+    free(p);
+    p = val(rep, "plkey");
+    raa_current_db->readsub_data.lkey = atoi_u(p);
+    free(p);
+    p = val(rep, "frame");
+    raa_current_db->readsub_data.frame = atoi_u(p);
+    free(p);
+    p = val(rep, "genet");
+    raa_current_db->readsub_data.gencode = atoi_u(p);
+    free(p);
+    raa_current_db->readsub_data.previous = num;
+    clear_reponse(rep);
+  }
+  if (plength != NULL)
+    *plength = raa_current_db->readsub_data.length;
+  if (ptype != NULL)
+    *ptype = raa_current_db->readsub_data.type;
+  if (plocus != NULL)
+    *plocus = raa_current_db->readsub_data.locus;
+  if (pext != NULL)
+    *pext = raa_current_db->readsub_data.toext;
+  if (plkey != NULL)
+    *plkey = raa_current_db->readsub_data.lkey;
+  if (pframe != NULL)
+    *pframe = raa_current_db->readsub_data.frame;
+  if (pgencode != NULL)
+    *pgencode = raa_current_db->readsub_data.gencode;
+  if (paddr != NULL)
+    *paddr = raa_current_db->readsub_data.addr;
+  if (pdiv != NULL)
+    *pdiv = raa_current_db->readsub_data.div;
+  return raa_current_db->readsub_data.name;
+}
 
-if(raa_current_db == NULL) return 1;
-if(raa_current_db->first_recs[cas] != 0) return raa_current_db->first_recs[cas];
 
-if(cas == raa_aut) strcpy(type, "AUT");
-else if(cas == raa_bib) strcpy(type, "BIB");
-else if(cas == raa_acc) strcpy(type, "ACC");
-else if(cas == raa_smj) strcpy(type, "SMJ");
-else if(cas == raa_sub) strcpy(type, "SUB");
+int raa_seq_to_annots(raa_db_access* raa_current_db, int numseq, raa_long* faddr, int* div)
+{
+  char* p;
+
+  p = raa_readsub_pannots(raa_current_db, numseq, NULL, NULL, NULL, NULL, NULL, NULL, NULL, faddr, div);
+  return p == NULL;
+}
 
 
-else if(cas == raa_loc) strcpy(type, "LOC");
-else if(cas == raa_key) strcpy(type, "KEY");
-else if(cas == raa_spec) strcpy(type, "SPEC");
-else if(cas == raa_shrt) strcpy(type, "SHRT");
-else if(cas == raa_lng) strcpy(type, "LNG");
-else if(cas == raa_ext) strcpy(type, "EXT");
-else if(cas == raa_txt) strcpy(type, "TXT");
-else return 0;
-sock_printf(raa_current_db,"readfirstrec&type=%s\n", type );
-reponse = read_sock(raa_current_db);
-if(reponse == NULL) return 1;
-p = strstr(reponse, "count=");
-if(p == NULL) return 0;
-sscanf(p + 6, "%u", &value);
-raa_current_db->first_recs[cas] = value;
-return value;
+char* raa_readsub(raa_db_access* raa_current_db, int num, int* plength, int* ptype, int* pext, int* plkey, int* plocus,
+                  int* pframe, int* pgencode)
+{
+  return raa_readsub_pannots(raa_current_db, num, plength, ptype, pext, plkey, plocus, pframe, pgencode, NULL, NULL);
 }
 
 
-char *raa_readsub_pannots(raa_db_access *raa_current_db, int num, int *plength, int *ptype, int *pext, int *plkey, int *plocus, 
-	int *pframe, int *pgencode, raa_long *paddr, int *pdiv)
-/* do both seq_to_annots and readsub and buffer result for one seq */
+char* raa_readloc(raa_db_access* raa_current_db, int num, int* sub, int* pnuc, int* spec, int* host, int* plref,
+                  int* molec, int* placc, int* org)
 {
-  Reponse *rep;
-  char *p, *reponse;
-  int code, l;
-  
-if(raa_current_db == NULL) return NULL;
-  if(num < 2 || num > raa_current_db->nseq) return NULL;
-  if(num != raa_current_db->readsub_data.previous) {
-  	sock_printf(raa_current_db,"seq_to_annots&number=%d\nreadsub&num=%u\n", num, num);
-  	reponse = read_sock(raa_current_db);
-    if(reponse == NULL) return NULL;
-  	/* process reply to seq_to_annots */
-  	rep=initreponse();
-  	parse(reponse, rep);
- 	p = val(rep,"code");
-	code = atoi(p);
-  	free(p);
-  	if(code == 0) {
-  		p = val(rep,"offset");
-  		raa_current_db->readsub_data.addr = scan_raa_long(p);
-  		free(p);
-  		p = val(rep,"div");
-		raa_current_db->readsub_data.div = atoi(p);
-  		free(p);
-  		}
-  	clear_reponse(rep);
-  	/* process reply to readsub */
-  	reponse = read_sock(raa_current_db);
-    if(reponse == NULL) return NULL;
-  	rep=initreponse();
-  	parse(reponse, rep);
-  	p = val(rep,"code");
-  	if(p == NULL) return NULL;
-  	code = atoi(p);
-  	free(p);
-  	if(code != 0) {
-  		clear_reponse(rep);
-  		return NULL;
-  		}
-  	p = val(rep, "name");
-  	l = strlen(p) + 1;
-  	if(l > raa_current_db->readsub_data.lname) {
-  		raa_current_db->readsub_data.lname = l;
-  		raa_current_db->readsub_data.name = (char *)realloc(raa_current_db->readsub_data.name, 
-  			raa_current_db->readsub_data.lname);
-  		}
-  	strcpy(raa_current_db->readsub_data.name, p);
-  	free(p);
-  	p = val(rep, "length");
-  	raa_current_db->readsub_data.length = atoi(p);
-  	free(p);
-  	p = val(rep, "type");
-  	raa_current_db->readsub_data.type = atoi_u(p);
-  	free(p);
-  	p = val(rep, "is_sub");
-  	raa_current_db->readsub_data.locus = atoi_u(p);
-  	free(p);
-  	p = val(rep, "toext");
-  	raa_current_db->readsub_data.toext = atoi_u(p);
-  	if(raa_current_db->readsub_data.locus > 0) 
-  			raa_current_db->readsub_data.toext = - raa_current_db->readsub_data.toext;
-  	free(p);
-  	p = val(rep, "plkey");
-  	raa_current_db->readsub_data.lkey = atoi_u(p);
-  	free(p);
-  	p = val(rep, "frame");
-  	raa_current_db->readsub_data.frame = atoi_u(p);
-  	free(p);
-  	p = val(rep, "genet");
-  	raa_current_db->readsub_data.gencode = atoi_u(p);
-  	free(p);
-  	raa_current_db->readsub_data.previous = num;
-  	clear_reponse(rep);
-  	}
-  if(plength != NULL) *plength = raa_current_db->readsub_data.length;
-  if(ptype != NULL) *ptype = raa_current_db->readsub_data.type;
-  if(plocus != NULL) *plocus = raa_current_db->readsub_data.locus;
-  if(pext != NULL) *pext = raa_current_db->readsub_data.toext;
-  if(plkey != NULL) *plkey = raa_current_db->readsub_data.lkey;
-  if(pframe != NULL) *pframe = raa_current_db->readsub_data.frame;
-  if(pgencode != NULL) *pgencode = raa_current_db->readsub_data.gencode;
-  if(paddr != NULL) *paddr = raa_current_db->readsub_data.addr;
-  if(pdiv != NULL) *pdiv = raa_current_db->readsub_data.div;
-  return raa_current_db->readsub_data.name;  
-}
-
-
-int raa_seq_to_annots(raa_db_access *raa_current_db, int numseq, raa_long *faddr, int *div)
-{
-char *p;
-
-p = raa_readsub_pannots(raa_current_db, numseq,NULL,NULL,NULL,NULL,NULL,NULL,NULL,faddr,div);
-return p == NULL;
-}
-
-
-char *raa_readsub(raa_db_access *raa_current_db, int num, int *plength, int *ptype, int *pext, int *plkey, int *plocus, 
-	int *pframe, int *pgencode)
-{
-return raa_readsub_pannots(raa_current_db, num,plength,ptype,pext,plkey,plocus,pframe,pgencode,NULL,NULL);
-}
-
-
-char *raa_readloc(raa_db_access *raa_current_db, int num, int *sub, int *pnuc, int *spec, int *host, int *plref, 
-	int *molec, int *placc, int *org)
-{
-  Reponse *rep;
-  char *p, *reponse;
+  Reponse* rep;
+  char* p, * reponse;
   int code;
-  static char date[50];
 
-if(raa_current_db == NULL) return NULL;
-  rep=initreponse();
-  sock_printf(raa_current_db,"readloc&num=%u\n", num);
+  if (raa_current_db == NULL)
+    return NULL;
+  rep = initreponse();
+  sock_printf(raa_current_db, "readloc&num=%u\n", num);
   reponse = read_sock(raa_current_db);
-  if(reponse == NULL) return NULL;
+  if (reponse == NULL)
+    return NULL;
   parse(reponse, rep);
-  p = val(rep,"code");
-  if(p == NULL) return NULL;
+  p = val(rep, "code");
+  if (p == NULL)
+    return NULL;
   code = atoi(p);
   free(p);
-  if(code == 0) {
-  	if(sub != NULL) {
-  		p = val(rep, "sub");
-  		*sub = atoi_u(p);
-  		free(p);
-  		}
-  	if(pnuc != NULL) {
-  		p = val(rep, "pnuc");
-  		*pnuc = atoi_u(p);
-  		free(p);
-  		}
-  	if(spec != NULL) {
-  		p = val(rep, "spec");
-  		*spec = atoi_u(p);
-  		free(p);
-  		}
-  	if(host != NULL) {
-  		p = val(rep, "host");
-  		*host = atoi_u(p);
-  		free(p);
-  		}
-  	if(plref != NULL) {
-  		p = val(rep, "plref");
-  		*plref = atoi_u(p);
-  		free(p);
-  		}
-  	if(molec != NULL) {
-  		p = val(rep, "molec");
-  		*molec = atoi_u(p);
-  		free(p);
-  		}
-  	if(placc != NULL) {
-  		p = val(rep, "placc");
-  		*placc = atoi_u(p);
-  		free(p);
-  		}
-  	if(org != NULL) {
-  		p = val(rep, "org");
-  		*org = atoi_u(p);
-  		free(p);
-  		}
-  	p = val(rep, "date");
-  	strcpy(date, p);
-  	free(p);
-  	p = date;
-  	}
-  else p = NULL;
+  if (code == 0)
+  {
+    if (sub != NULL)
+    {
+      p = val(rep, "sub");
+      *sub = atoi_u(p);
+      free(p);
+    }
+    if (pnuc != NULL)
+    {
+      p = val(rep, "pnuc");
+      *pnuc = atoi_u(p);
+      free(p);
+    }
+    if (spec != NULL)
+    {
+      p = val(rep, "spec");
+      *spec = atoi_u(p);
+      free(p);
+    }
+    if (host != NULL)
+    {
+      p = val(rep, "host");
+      *host = atoi_u(p);
+      free(p);
+    }
+    if (plref != NULL)
+    {
+      p = val(rep, "plref");
+      *plref = atoi_u(p);
+      free(p);
+    }
+    if (molec != NULL)
+    {
+      p = val(rep, "molec");
+      *molec = atoi_u(p);
+      free(p);
+    }
+    if (placc != NULL)
+    {
+      p = val(rep, "placc");
+      *placc = atoi_u(p);
+      free(p);
+    }
+    if (org != NULL)
+    {
+      p = val(rep, "org");
+      *org = atoi_u(p);
+      free(p);
+    }
+    p = val(rep, "date");
+    strcpy(raa_current_db->date, p);
+    free(p);
+    p = raa_current_db->date;
+  }
+  else
+    p = NULL;
   clear_reponse(rep);
-  return p;  
+  return p;
 }
 
 
-char *raa_readspec(raa_db_access *raa_current_db, int num, char **plibel, int *plsub, int *pdesc, int *psyno, int *plhost)
+char* raa_readspec(raa_db_access* raa_current_db, int num, char** plibel, int* plsub, int* pdesc, int* psyno, int* plhost)
 {
-  Reponse *rep;
-  char *p, *reponse;
+  Reponse* rep;
+  char* p, * reponse;
   int code;
-  
-if(raa_current_db == NULL) return NULL;
-  if(num == raa_current_db->readspec_data.previous && raa_current_db->readspec_data.previous != 0) {
-  	if(plibel != NULL) {
-  		if(*(raa_current_db->readspec_data.libel) != 0) *plibel = raa_current_db->readspec_data.libel;
-  		else *plibel = NULL;
-  		}
-  	if(plsub != NULL) *plsub = raa_current_db->readspec_data.lsub;
-  	if(pdesc != NULL) *pdesc = raa_current_db->readspec_data.desc;
-  	if(psyno != NULL) *psyno = raa_current_db->readspec_data.syno;
-  	if(plhost != NULL) *plhost = raa_current_db->readspec_data.host;
-  	return raa_current_db->readspec_data.name;
-  	}
-
-  rep=initreponse();
+
+  if (raa_current_db == NULL)
+    return NULL;
+  if (num == raa_current_db->readspec_data.previous && raa_current_db->readspec_data.previous != 0)
+  {
+    if (plibel != NULL)
+    {
+      if (*(raa_current_db->readspec_data.libel) != 0)
+        *plibel = raa_current_db->readspec_data.libel;
+      else
+        *plibel = NULL;
+    }
+    if (plsub != NULL)
+      *plsub = raa_current_db->readspec_data.lsub;
+    if (pdesc != NULL)
+      *pdesc = raa_current_db->readspec_data.desc;
+    if (psyno != NULL)
+      *psyno = raa_current_db->readspec_data.syno;
+    if (plhost != NULL)
+      *plhost = raa_current_db->readspec_data.host;
+    return raa_current_db->readspec_data.name;
+  }
+
+  rep = initreponse();
   sock_printf(raa_current_db, "readspec&num=%u\n", num);
   reponse = read_sock(raa_current_db);
-  if(reponse == NULL) return NULL;
+  if (reponse == NULL)
+    return NULL;
   parse(reponse, rep);
-  p = val(rep,"code");
-  if(p == NULL) return NULL;
+  p = val(rep, "code");
+  if (p == NULL)
+    return NULL;
   code = atoi(p);
   free(p);
-  if(code != 0) {
-  	  clear_reponse(rep);
-  	  return NULL;
-  	  }
+  if (code != 0)
+  {
+    clear_reponse(rep);
+    return NULL;
+  }
 
   raa_current_db->readspec_data.previous = num;
-  	p = val(rep, "plsub");
-  	raa_current_db->readspec_data.lsub = atoi_u(p);
-  	free(p);
-  	p = val(rep, "desc");
-  	raa_current_db->readspec_data.desc = atoi_u(p);
-  	free(p);
-  	p = val(rep, "syno");
-  	raa_current_db->readspec_data.syno = atoi_u(p);
-  	free(p);
-  	p = val(rep, "host");
-  	raa_current_db->readspec_data.host = atoi_u(p);
-  	free(p);
-  	p = val(rep, "libel");
-  	if(p != NULL) {
-  		strcpy(raa_current_db->readspec_data.libel, p);
-  		free(p);
-  		}
-  	else *(raa_current_db->readspec_data.libel) = 0;
-  	p = val(rep, "name");
-  	strcpy(raa_current_db->readspec_data.name, p );
-  	free(p);
+  p = val(rep, "plsub");
+  raa_current_db->readspec_data.lsub = atoi_u(p);
+  free(p);
+  p = val(rep, "desc");
+  raa_current_db->readspec_data.desc = atoi_u(p);
+  free(p);
+  p = val(rep, "syno");
+  raa_current_db->readspec_data.syno = atoi_u(p);
+  free(p);
+  p = val(rep, "host");
+  raa_current_db->readspec_data.host = atoi_u(p);
+  free(p);
+  p = val(rep, "libel");
+  if (p != NULL)
+  {
+    strcpy(raa_current_db->readspec_data.libel, p);
+    free(p);
+  }
+  else
+    *(raa_current_db->readspec_data.libel) = 0;
+  p = val(rep, "name");
+  strcpy(raa_current_db->readspec_data.name, p );
+  free(p);
   clear_reponse(rep);
-  return raa_readspec(raa_current_db, num, plibel, plsub, pdesc, psyno, plhost);  
+  return raa_readspec(raa_current_db, num, plibel, plsub, pdesc, psyno, plhost);
 }
 
 
-char *raa_readkey(raa_db_access *raa_current_db, int num, char **plibel, int *plsub, int *pdesc, int *psyno)
+char* raa_readkey(raa_db_access* raa_current_db, int num, char** plibel, int* plsub, int* pdesc, int* psyno)
 {
-  Reponse *rep;
-  char *p, *reponse;
+  Reponse* rep;
+  char* p, * reponse;
   int code;
-  
-if(raa_current_db == NULL) return NULL;
-  if(num == raa_current_db->readkey_data.previous && raa_current_db->readkey_data.previous != 0) {
-  	if(plibel != NULL) {
-  		if(*(raa_current_db->readkey_data.libel) != 0) *plibel = raa_current_db->readkey_data.libel;
-  		else *plibel = NULL;
-  		}
-  	if(plsub != NULL) *plsub = raa_current_db->readkey_data.lsub;
-  	if(pdesc != NULL) *pdesc = raa_current_db->readkey_data.desc;
-  	if(psyno != NULL) *psyno = raa_current_db->readkey_data.syno;
-  	return raa_current_db->readkey_data.name;
-  	}
-
-  rep=initreponse();
+
+  if (raa_current_db == NULL)
+    return NULL;
+  if (num == raa_current_db->readkey_data.previous && raa_current_db->readkey_data.previous != 0)
+  {
+    if (plibel != NULL)
+    {
+      if (*(raa_current_db->readkey_data.libel) != 0)
+        *plibel = raa_current_db->readkey_data.libel;
+      else
+        *plibel = NULL;
+    }
+    if (plsub != NULL)
+      *plsub = raa_current_db->readkey_data.lsub;
+    if (pdesc != NULL)
+      *pdesc = raa_current_db->readkey_data.desc;
+    if (psyno != NULL)
+      *psyno = raa_current_db->readkey_data.syno;
+    return raa_current_db->readkey_data.name;
+  }
+
+  rep = initreponse();
   sock_printf(raa_current_db, "readkey&num=%u\n", num);
   reponse = read_sock(raa_current_db);
-  if(reponse == NULL) return NULL;
+  if (reponse == NULL)
+    return NULL;
   parse(reponse, rep);
-  p = val(rep,"code");
-  if(p == NULL) return NULL;
+  p = val(rep, "code");
+  if (p == NULL)
+    return NULL;
   code = atoi(p);
   free(p);
-  if(code != 0) {
-  	  clear_reponse(rep);
-  	  return NULL;
-  	  }
-
-    raa_current_db->readkey_data.previous = num;
-  	p = val(rep, "plsub");
-  	raa_current_db->readkey_data.lsub = atoi_u(p);
-  	free(p);
-  	p = val(rep, "desc");
-  	raa_current_db->readkey_data.desc = atoi_u(p);
-  	free(p);
-  	p = val(rep, "syno");
-  	raa_current_db->readkey_data.syno = atoi_u(p);
-  	free(p);
-  	p = val(rep, "libel");
-  	if(p != NULL) {
-  		strcpy(raa_current_db->readkey_data.libel, p);
-  		free(p);
-  		}
-  	else *(raa_current_db->readkey_data.libel) = 0;
-  	p = val(rep, "name");
-  	strcpy(raa_current_db->readkey_data.name, p);
-  	free(p);
-  clear_reponse(rep);
-  return raa_readkey(raa_current_db, num, plibel, plsub, pdesc, psyno);  
-}
-
+  if (code != 0)
+  {
+    clear_reponse(rep);
+    return NULL;
+  }
+
+  raa_current_db->readkey_data.previous = num;
+  p = val(rep, "plsub");
+  raa_current_db->readkey_data.lsub = atoi_u(p);
+  free(p);
+  p = val(rep, "desc");
+  raa_current_db->readkey_data.desc = atoi_u(p);
+  free(p);
+  p = val(rep, "syno");
+  raa_current_db->readkey_data.syno = atoi_u(p);
+  free(p);
+  p = val(rep, "libel");
+  if (p != NULL)
+  {
+    strcpy(raa_current_db->readkey_data.libel, p);
+    free(p);
+  }
+  else
+    *(raa_current_db->readkey_data.libel) = 0;
+  p = val(rep, "name");
+  strcpy(raa_current_db->readkey_data.name, p);
+  free(p);
+  clear_reponse(rep);
+  return raa_readkey(raa_current_db, num, plibel, plsub, pdesc, psyno);
+}
 
-static int load_smj(raa_db_access *raa_current_db, char ***names, unsigned **plongs, char ***libels)
-{
-  Reponse *rep;
-  char *reponse, *p;
-  int nl, i, code, totsmj, recnum;
 
-if(raa_current_db == NULL) return 0;
-totsmj = raa_read_first_rec(raa_current_db, raa_smj);
-  rep=initreponse();
-  sock_printf(raa_current_db,"readsmj&num=2&nl=%d\n", totsmj - 1);
+static int load_smj(raa_db_access* raa_current_db, char*** names, unsigned** plongs, char*** libels)
+{
+  Reponse* rep;
+  char* reponse, * p;
+  int nl, i, code, totsmj, recnum;
+
+  if (raa_current_db == NULL)
+    return 0;
+  totsmj = raa_read_first_rec(raa_current_db, raa_smj);
+  rep = initreponse();
+  sock_printf(raa_current_db, "readsmj&num=2&nl=%d\n", totsmj - 1);
 /* ==>readsmj&num=..&nl=..
-code=0&nl=..
-recnum=..&name=".."&plong=..{&libel=".."}   nl times
-*/
+   code=0&nl=..
+   recnum=..&name=".."&plong=..{&libel=".."}   nl times
+ */
   reponse = read_sock(raa_current_db);
-  if(reponse == NULL) return 0;
+  if (reponse == NULL)
+    return 0;
   parse(reponse, rep);
-  p = val(rep,"code");
-  if(p == NULL) return 0;
+  p = val(rep, "code");
+  if (p == NULL)
+    return 0;
   code = atoi(p);
   free(p);
-  if(code != 0) return 0;
-  p = val(rep,"nl");
-  if(p == NULL) return 0;
+  if (code != 0)
+    return 0;
+  p = val(rep, "nl");
+  if (p == NULL)
+    return 0;
   nl = atoi(p);
   free(p);
   clear_reponse(rep);
-  if(nl == 0) return 0;
-  *names = (char **)calloc(totsmj + 1 , sizeof(char *));
-  *plongs = (unsigned *)calloc(totsmj + 1 , sizeof(unsigned));
-  *libels = (char **)calloc(totsmj + 1 , sizeof(char *));
-  for(i = 0; i < nl; i++) {
-   	reponse = read_sock(raa_current_db);
-    if(reponse == NULL) return 0;
- 	rep=initreponse();
-    	parse(reponse, rep);
-  	p = val(rep, "recnum");
-  	recnum = atoi(p);
-  	free(p);
-  	p = val(rep, "plong");
-  	(*plongs)[recnum] = atoi_u(p);
-  	free(p);
-  	p = val(rep, "name");
-  	(*names)[recnum] = p;
-  	p = val(rep, "libel");
-  	(*libels)[recnum] = p;
-  	clear_reponse(rep);
-  	}
-return totsmj;
-}
-
-
-char *raa_readsmj(raa_db_access *raa_current_db, int num, char **plibel, int *plong)
-{
-if(raa_current_db == NULL) return NULL;
-if(raa_current_db->readsmj_data.lastrec == 0) {
-	raa_current_db->readsmj_data.lastrec = load_smj(raa_current_db,  
-		&raa_current_db->readsmj_data.names, &raa_current_db->readsmj_data.plongs, 
-		&raa_current_db->readsmj_data.libels);
-	}
-if(num <= 1 || num > raa_current_db->readsmj_data.lastrec) return NULL;
-if(plong != NULL) *plong = raa_current_db->readsmj_data.plongs[num];
-if(plibel != NULL) *plibel = raa_current_db->readsmj_data.libels[num];
-return raa_current_db->readsmj_data.names[num];
-}
-
-
-char *raa_readacc(raa_db_access *raa_current_db, int num, int *plsub)
-{
-  Reponse *rep;
-  char *p, *reponse;
+  if (nl == 0)
+    return 0;
+  *names = (char**)calloc(totsmj + 1, sizeof(char*));
+  *plongs = (unsigned*)calloc(totsmj + 1, sizeof(unsigned));
+  *libels = (char**)calloc(totsmj + 1, sizeof(char*));
+  for (i = 0; i < nl; i++)
+  {
+    reponse = read_sock(raa_current_db);
+    if (reponse == NULL)
+      return 0;
+    rep = initreponse();
+    parse(reponse, rep);
+    p = val(rep, "recnum");
+    recnum = atoi(p);
+    free(p);
+    p = val(rep, "plong");
+    (*plongs)[recnum] = atoi_u(p);
+    free(p);
+    p = val(rep, "name");
+    (*names)[recnum] = p;
+    p = val(rep, "libel");
+    (*libels)[recnum] = p;
+    clear_reponse(rep);
+  }
+  return totsmj;
+}
+
+
+char* raa_readsmj(raa_db_access* raa_current_db, int num, char** plibel, int* plong)
+{
+  if (raa_current_db == NULL)
+    return NULL;
+  if (raa_current_db->readsmj_data.lastrec == 0)
+  {
+    raa_current_db->readsmj_data.lastrec = load_smj(raa_current_db,
+                                                    &raa_current_db->readsmj_data.names, &raa_current_db->readsmj_data.plongs,
+                                                    &raa_current_db->readsmj_data.libels);
+  }
+  if (num <= 1 || num > raa_current_db->readsmj_data.lastrec)
+    return NULL;
+  if (plong != NULL)
+    *plong = raa_current_db->readsmj_data.plongs[num];
+  if (plibel != NULL)
+    *plibel = raa_current_db->readsmj_data.libels[num];
+  return raa_current_db->readsmj_data.names[num];
+}
+
+
+char* raa_readacc(raa_db_access* raa_current_db, int num, int* plsub)
+{
+  Reponse* rep;
+  char* p, * reponse;
   int code;
-  static char name[100];
 
-if(raa_current_db == NULL) return NULL;
-  rep=initreponse();
-  sock_printf(raa_current_db,"readacc&num=%u\n", num);
+  if (raa_current_db == NULL)
+    return NULL;
+  rep = initreponse();
+  sock_printf(raa_current_db, "readacc&num=%u\n", num);
   reponse = read_sock(raa_current_db);
-  if(reponse == NULL) return NULL;
+  if (reponse == NULL)
+    return NULL;
   parse(reponse, rep);
-  p = val(rep,"code");
-  if(p == NULL) return NULL;
+  p = val(rep, "code");
+  if (p == NULL)
+    return NULL;
   code = atoi(p);
   free(p);
-  if(code == 0) {
-  	if(plsub != NULL) {
-  		p = val(rep, "plsub");
-  		*plsub = atoi_u(p);
-  		free(p);
-  		}
-  	p = val(rep, "name");
-  	strcpy(name, p);
-  	free(p);
-  	p = name;
-  	}
-  else p = NULL;
+  if (code == 0)
+  {
+    if (plsub != NULL)
+    {
+      p = val(rep, "plsub");
+      *plsub = atoi_u(p);
+      free(p);
+    }
+    p = val(rep, "name");
+    strcpy(raa_current_db->access, p);
+    free(p);
+    p = raa_current_db->access;
+  }
+  else
+    p = NULL;
   clear_reponse(rep);
-  return p;  
+  return p;
 }
 
 
-int raa_readext(raa_db_access *raa_current_db, int num, int *mere, int *deb, int *fin)
+int raa_readext(raa_db_access* raa_current_db, int num, int* mere, int* deb, int* fin)
 {
-  Reponse *rep;
-  char *p, *reponse;
+  Reponse* rep;
+  char* p, * reponse;
   int code, next;
 
-if(raa_current_db == NULL) return 0;
-  rep=initreponse();
-  sock_printf(raa_current_db,"readext&num=%u\n", num);
+  if (raa_current_db == NULL)
+    return 0;
+  rep = initreponse();
+  sock_printf(raa_current_db, "readext&num=%u\n", num);
   reponse = read_sock(raa_current_db);
-  if(reponse == NULL) return 0;
+  if (reponse == NULL)
+    return 0;
   parse(reponse, rep);
-  p = val(rep,"code");
-  if(p == NULL) return 0;
+  p = val(rep, "code");
+  if (p == NULL)
+    return 0;
   code = atoi(p);
   free(p);
-  if(code == 0) {
-  	if(mere != NULL) {
-  		p = val(rep, "mere");
-  		*mere = atoi_u(p);
-  		free(p);
-  		}
-  	if(deb != NULL) {
-  		p = val(rep, "debut");
-  		*deb = atoi_u(p);
-  		free(p);
-  		}
-  	if(fin != NULL) {
-  		p = val(rep, "fin");
-  		*fin = atoi_u(p);
-  		free(p);
-  		}
-  	p = val(rep, "next");
-  	next = atoi_u(p);
-  	free(p);
-  	}
-  else next = 0;
+  if (code == 0)
+  {
+    if (mere != NULL)
+    {
+      p = val(rep, "mere");
+      *mere = atoi_u(p);
+      free(p);
+    }
+    if (deb != NULL)
+    {
+      p = val(rep, "debut");
+      *deb = atoi_u(p);
+      free(p);
+    }
+    if (fin != NULL)
+    {
+      p = val(rep, "fin");
+      *fin = atoi_u(p);
+      free(p);
+    }
+    p = val(rep, "next");
+    next = atoi_u(p);
+    free(p);
+  }
+  else
+    next = 0;
   clear_reponse(rep);
-  return next;  
+  return next;
 }
 
 
-int raa_readlng(raa_db_access *raa_current_db, int num)
+int raa_readlng(raa_db_access* raa_current_db, int num)
 /* fills the rlng_buffer structure */
 {
-  char *p, *reponse;
+  char* p, * reponse;
   int count, i;
 
-if(raa_current_db == NULL) return 0;
-  memset(raa_current_db->rlng_buffer, 0, (raa_current_db->SUBINLNG+1)*sizeof(int));
-  sock_printf(raa_current_db,"readlng&num=%u\n", num);
+  if (raa_current_db == NULL)
+    return 0;
+  memset(raa_current_db->rlng_buffer, 0, (raa_current_db->SUBINLNG + 1) * sizeof(int));
+  sock_printf(raa_current_db, "readlng&num=%u\n", num);
 /* retour code=0&n=xx&x1,x2,...{&next=xx}  */
   reponse = read_sock(raa_current_db);
-  if(reponse == NULL) return 0;
-  if(strncmp(reponse, "code=0&n=", 9) != 0 || (count = atoi(reponse+9)) == 0) {
-  	return 0;
-  	}
-  p = strchr(reponse+9, '&');
-  for(i=0; i < count && i < raa_current_db->SUBINLNG; i++) {
-  	raa_current_db->rlng_buffer->sub[i] = atoi_u(p+1);
-  	p = strchr(p+1, ',');
-  	if(p == NULL) break;
-  	}
+  if (reponse == NULL)
+    return 0;
+  if (strncmp(reponse, "code=0&n=", 9) != 0 || (count = atoi(reponse + 9)) == 0)
+  {
+    return 0;
+  }
+  p = strchr(reponse + 9, '&');
+  for (i = 0; i < count && i < raa_current_db->SUBINLNG; i++)
+  {
+    raa_current_db->rlng_buffer->sub[i] = atoi_u(p + 1);
+    p = strchr(p + 1, ',');
+    if (p == NULL)
+      break;
+  }
   p = strstr(reponse, "next=");
-  if(p!= NULL) raa_current_db->rlng_buffer->next = atoi_u(p+5);
-  else raa_current_db->rlng_buffer->next=0;
-  return raa_current_db->rlng_buffer->next;  
+  if (p != NULL)
+    raa_current_db->rlng_buffer->next = atoi_u(p + 5);
+  else
+    raa_current_db->rlng_buffer->next = 0;
+  return raa_current_db->rlng_buffer->next;
 }
 
 
-
-static void load_shrt_buffer(raa_db_access *raa_current_db, unsigned point)
+static void load_shrt_buffer(raa_db_access* raa_current_db, unsigned point)
 {
-char *reponse, *p, *q;
-int n, i;
-unsigned val, next, previous;
+  char* reponse, * p, * q;
+  int n, i;
+  unsigned val, next, previous;
 
-if(raa_current_db == NULL) return;
-sock_printf(raa_current_db, "readshrt&num=%u&max=%d\n", point, MAX_RDSHRT);
+  if (raa_current_db == NULL)
+    return;
+  sock_printf(raa_current_db, "readshrt&num=%u&max=%d\n", point, MAX_RDSHRT);
 /* reponse is:  code=0&n=xx&val,next,.... n times ...\n  */
-reponse = read_sock(raa_current_db);
-
-if(reponse == NULL || strncmp(reponse, "code=0&n=", 9) != 0) {
-	return;
-	}
-n = atoi(reponse + 9);
-if (n == 0) return;
-p = strchr(reponse+9, '&');
-if(p == NULL) return;
-q = p + 1;
-previous = point;
-for(i = 0; i < n; i++) {
-	p = strtok(q, ",");
-	q = NULL;
-	sscanf(p, "%u", &val);
-	p = strtok(NULL, ",");
-	sscanf(p, "%u", &next);
-	raa_current_db->readshrt_data.shrt_begin = (raa_current_db->readshrt_data.shrt_begin + 1) % S_BUF_SHRT;
-	raa_current_db->readshrt_data.shrt_buffer[raa_current_db->readshrt_data.shrt_begin][0] = previous;
-	raa_current_db->readshrt_data.shrt_buffer[raa_current_db->readshrt_data.shrt_begin][1] = val;
-	raa_current_db->readshrt_data.shrt_buffer[raa_current_db->readshrt_data.shrt_begin][2] = next;
-	previous = next;
-	}
-if(raa_current_db->readshrt_data.shrt_begin > raa_current_db->readshrt_data.shrt_max - 1) {
-	raa_current_db->readshrt_data.shrt_max = raa_current_db->readshrt_data.shrt_begin + 1;
-	}
-return;	
-}
-
-
-unsigned raa_readshrt(raa_db_access *raa_current_db, unsigned point, int *pval)
-{
-int i;
-
-if(raa_current_db == NULL) return 0;
-if(raa_current_db->readshrt_data.total == 0) 
-	raa_current_db->readshrt_data.total = (unsigned)raa_read_first_rec(raa_current_db, raa_shrt);
-if(point < 2 || point > raa_current_db->readshrt_data.total) return 0;
-
-for(i = 0; i < raa_current_db->readshrt_data.shrt_max; i++) {
-	if(raa_current_db->readshrt_data.shrt_buffer[i][0] == point) {
-		if(pval != NULL) *pval = raa_current_db->readshrt_data.shrt_buffer[i][1];
-		return raa_current_db->readshrt_data.shrt_buffer[i][2];
-		}
-	}
-load_shrt_buffer(raa_current_db, point);
-return raa_readshrt(raa_current_db, point, pval);
-}
-
-
-
-char *raa_ghelp(raa_db_access *raa_current_db, char *fname, char *topic)
+  reponse = read_sock(raa_current_db);
+
+  if (reponse == NULL || strncmp(reponse, "code=0&n=", 9) != 0)
+  {
+    return;
+  }
+  n = atoi(reponse + 9);
+  if (n == 0)
+    return;
+  p = strchr(reponse + 9, '&');
+  if (p == NULL)
+    return;
+  q = p + 1;
+  previous = point;
+  for (i = 0; i < n; i++)
+  {
+    p = strtok(q, ",");
+    q = NULL;
+    sscanf(p, "%u", &val);
+    p = strtok(NULL, ",");
+    sscanf(p, "%u", &next);
+    raa_current_db->readshrt_data.shrt_begin = (raa_current_db->readshrt_data.shrt_begin + 1) % S_BUF_SHRT;
+    raa_current_db->readshrt_data.shrt_buffer[raa_current_db->readshrt_data.shrt_begin][0] = previous;
+    raa_current_db->readshrt_data.shrt_buffer[raa_current_db->readshrt_data.shrt_begin][1] = val;
+    raa_current_db->readshrt_data.shrt_buffer[raa_current_db->readshrt_data.shrt_begin][2] = next;
+    previous = next;
+  }
+  if (raa_current_db->readshrt_data.shrt_begin > raa_current_db->readshrt_data.shrt_max - 1)
+  {
+    raa_current_db->readshrt_data.shrt_max = raa_current_db->readshrt_data.shrt_begin + 1;
+  }
+  return;
+}
+
+
+unsigned raa_readshrt(raa_db_access* raa_current_db, unsigned point, int* pval)
+{
+  int i;
+
+  if (raa_current_db == NULL)
+    return 0;
+  if (raa_current_db->readshrt_data.total == 0)
+    raa_current_db->readshrt_data.total = (unsigned)raa_read_first_rec(raa_current_db, raa_shrt);
+  if (point < 2 || point > raa_current_db->readshrt_data.total)
+    return 0;
+
+  for (i = 0; i < raa_current_db->readshrt_data.shrt_max; i++)
+  {
+    if (raa_current_db->readshrt_data.shrt_buffer[i][0] == point)
+    {
+      if (pval != NULL)
+        *pval = raa_current_db->readshrt_data.shrt_buffer[i][1];
+      return raa_current_db->readshrt_data.shrt_buffer[i][2];
+    }
+  }
+  load_shrt_buffer(raa_current_db, point);
+  return raa_readshrt(raa_current_db, point, pval);
+}
+
+
+static void load_shrt2_aux(raa_db_access* raa_current_db, unsigned point, raa_shortl2_kind kind)
+{
+  static const char kind_name[][11] = {"sub_of_bib", "spc_of_loc", "bib_of_loc", "aut_of_bib", "bib_of_aut",
+                                       "sub_of_acc", "key_of_sub", "acc_of_loc"};
+  char* p, * reponse;
+  int i;
+
+  if (raa_current_db == NULL)
+    return;
+  sock_printf(raa_current_db, "followshrt2&num=%u&kind=%s&rank=0&max=%d\n", point, kind_name[kind],
+              raa_current_db->readshrt2_data[kind]->size);
+  /* reponse is:  code=0&num=xx&rank=xx&n=xx&val,.... n times ...\n  */
+  reponse = read_sock(raa_current_db);
+
+  if (reponse == NULL || strncmp(reponse, "code=0&", 7) != 0)
+  {
+    return;
+  }
+  raa_current_db->readshrt2_data[kind]->point = point;
+  p = strstr(reponse, "num=");
+  raa_current_db->readshrt2_data[kind]->next = atoi(p + 4);
+  p = strstr(reponse, "n=");
+  raa_current_db->readshrt2_data[kind]->length = atoi(p + 2);
+  p = strchr(p, '&') + 1;
+  for (i = 0; i < raa_current_db->readshrt2_data[kind]->length; i++)
+  {
+    sscanf(p, "%u", raa_current_db->readshrt2_data[kind]->vals + i);
+    p = strchr(p, ',') + 1;
+  }
+}
+
+
+unsigned raa_followshrt2(raa_db_access* raa_current_db, int* p_point, int* p_rank, raa_shortl2_kind kind)
+{
+  int rank = *p_rank;
+  unsigned retval;
+
+  if (raa_current_db->readshrt2_data[kind]->point == *p_point &&
+      rank < raa_current_db->readshrt2_data[kind]->length)
+  {
+    retval = raa_current_db->readshrt2_data[kind]->vals[rank++];
+    if (rank >= raa_current_db->readshrt2_data[kind]->length)
+    {
+      *p_rank = 0;
+      *p_point = raa_current_db->readshrt2_data[kind]->next;
+    }
+    else
+      *p_rank = rank;
+    return retval;
+  }
+  load_shrt2_aux(raa_current_db, *p_point, kind);
+  return raa_followshrt2(raa_current_db, p_point, p_rank, kind);
+}
+
+
+char* raa_ghelp(raa_db_access* raa_current_db, char* fname, char* topic)
 /* returns all help topic in one string in private memory
-*/
+ */
 {
-char *reponse, *p, *fintext, *tmp;
-int nl, l, i;
-static char *text = NULL;
-static int ltext = 0;
+  char* reponse, * p, * fintext, * tmp;
+  int nl, l, i;
 
-if(raa_current_db == NULL) return NULL;
-  sock_printf(raa_current_db,"ghelp&file=%s&item=%s\n", fname, topic);
+  if (raa_current_db == NULL)
+    return NULL;
+  sock_printf(raa_current_db, "ghelp&file=%s&item=%s\n", fname, topic);
   reponse = read_sock(raa_current_db);
-  if(reponse == NULL) return NULL;
+  if (reponse == NULL)
+    return NULL;
   nl = 0;
-  if(strncmp(reponse, "nl=", 3) == 0) nl = atoi(reponse+3);
+  if (strncmp(reponse, "nl=", 3) == 0)
+    nl = atoi(reponse + 3);
   p = strchr(reponse, '&');
-  if(nl <= 0 || p == NULL) return NULL;
-  fintext = text; p++;
-  for(i = 0; i < nl; i++) {
-  	l = strlen(p) + 1; /* +1 pour ajouter \n */
-  	if( (fintext - text) + l > ltext) {
-  		ltext += 1000;
-  		tmp = (char *)realloc(text, ltext + 1);
-  		if(tmp == NULL) {
-  			if(text != NULL) free(text);
-  			text = NULL; ltext = 0;
-  			return NULL;
-  			}
-  		fintext = tmp + (fintext - text);
-  		text = tmp;
-  		}
-  	memcpy(fintext, p, l -1);
-  	fintext += l;
-  	*(fintext - 1) = '\n';
-  	if(i + 1 < nl) reponse = read_sock(raa_current_db);
-    if(reponse == NULL) return NULL;
-  	p = reponse;
-  	}
+  if (nl <= 0 || p == NULL)
+    return NULL;
+  fintext = raa_current_db->help; p++;
+  for (i = 0; i < nl; i++)
+  {
+    l = strlen(p) + 1; /* +1 pour ajouter \n */
+    if ( (fintext - raa_current_db->help) + l > raa_current_db->lhelp)
+    {
+      raa_current_db->lhelp += 1000;
+      tmp = (char*)realloc(raa_current_db->help, raa_current_db->lhelp + 1);
+      if (tmp == NULL)
+      {
+        if (raa_current_db->help != NULL)
+          free(raa_current_db->help);
+        raa_current_db->help = NULL; raa_current_db->lhelp = 0;
+        return NULL;
+      }
+      fintext = tmp + (fintext - raa_current_db->help);
+      raa_current_db->help = tmp;
+    }
+    memcpy(fintext, p, l - 1);
+    fintext += l;
+    *(fintext - 1) = '\n';
+    if (i + 1 < nl)
+      reponse = read_sock(raa_current_db);
+    if (reponse == NULL)
+      return NULL;
+    p = reponse;
+  }
   *fintext = 0;
-  return text;	
-}
-
-
-struct raa_matchkey {
-	int *ranks;
-	char **names;
-	int count;
-	int current;
-	int no_more;
-	};
-
-static void raa_free_matchkeys(raa_db_access *raa_current_db)
-{
-int i;
-struct raa_matchkey *data = (struct raa_matchkey *)(raa_current_db->matchkey_data);
-
-if(data == NULL) return;
-if(data->count > 0) {
-	for(i = 0; i < data->count; i++) free(data->names[i]);
-	free(data->names);
-	free(data->ranks);
-	}
-free(data);
-raa_current_db->matchkey_data = NULL;
-}
-
-
-static void next_block_matchkeys(raa_db_access *raa_current_db, int num, char *pattern)
-{
-const int blocksize = 2001;
-char *reponse, *p;
-int count, i;
-struct raa_matchkey *data;
-
-if(raa_current_db == NULL) return;
-raa_free_matchkeys(raa_current_db);
-sock_printf(raa_current_db, "nextmatchkey&num=%d", num );
-if(num == 2) sock_printf(raa_current_db, "&pattern=\"%s\"", protect_quotes(pattern) );
-sock_printf(raa_current_db, "&count=%d\n", blocksize);
-reponse = read_sock(raa_current_db);
-if(reponse == NULL || strncmp(reponse, "code=0&count=", 13) != 0) return;
-sscanf(reponse + 13, "%d", &count);
-data = (struct raa_matchkey *)calloc(1, sizeof(struct raa_matchkey));
-raa_current_db->matchkey_data = data;
-if(data == NULL || count == 0) return;
-data->ranks = (int *)malloc(count * sizeof(int));
-data->names = (char **)malloc(count * sizeof(char *));
-data->current = 0;
-data->no_more = (count < blocksize);
-data->count = count;
-if(data->ranks == NULL || data->names == NULL) data->count = 0;
-for(i = 0; i < data->count; i++) {
-	reponse = read_sock(raa_current_db);
-	sscanf(reponse + 4, "%d", &(data->ranks[i]) );
-	p = strchr(reponse, '&');
-	p = strchr(p, '=') + 1;
-	data->names[i] = strdup(unprotect_quotes(p));
-	if(data->names[i] == NULL) {
-		data->count = i;
-		break;
-		}
-	}
-for(i = data->count; i < count; i++) {
-	read_sock(raa_current_db);
-	}
-return;
-}
-
-
-int raa_nextmatchkey(raa_db_access *raa_current_db, int num, char *pattern, char **matching)
+  return raa_current_db->help;
+}
+
+
+struct raa_matchkey
+{
+  int* ranks;
+  char** names;
+  int count;
+  int current;
+  int no_more;
+};
+
+static void raa_free_matchkeys(raa_db_access* raa_current_db)
+{
+  int i;
+  struct raa_matchkey* data = (struct raa_matchkey*)(raa_current_db->matchkey_data);
+
+  if (data == NULL)
+    return;
+  if (data->count > 0)
+  {
+    for (i = 0; i < data->count; i++)
+    {
+      free(data->names[i]);
+    }
+    free(data->names);
+    free(data->ranks);
+  }
+  free(data);
+  raa_current_db->matchkey_data = NULL;
+}
+
+
+static void next_block_matchkeys(raa_db_access* raa_current_db, int num, char* pattern)
+{
+  const int blocksize = 2001;
+  char* reponse, * p;
+  int count, i;
+  struct raa_matchkey* data;
+
+  if (raa_current_db == NULL)
+    return;
+  raa_free_matchkeys(raa_current_db);
+  sock_printf(raa_current_db, "nextmatchkey&num=%d", num );
+  p = protect_quotes(pattern);
+  if (num == 2)
+    sock_printf(raa_current_db, "&pattern=\"%s\"", p );
+  free(p);
+  sock_printf(raa_current_db, "&count=%d\n", blocksize);
+  reponse = read_sock(raa_current_db);
+  if (reponse == NULL || strncmp(reponse, "code=0&count=", 13) != 0)
+    return;
+  sscanf(reponse + 13, "%d", &count);
+  data = (struct raa_matchkey*)calloc(1, sizeof(struct raa_matchkey));
+  raa_current_db->matchkey_data = data;
+  if (data == NULL || count == 0)
+    return;
+  data->ranks = (int*)malloc(count * sizeof(int));
+  data->names = (char**)malloc(count * sizeof(char*));
+  data->current = 0;
+  data->no_more = (count < blocksize);
+  data->count = count;
+  if (data->ranks == NULL || data->names == NULL)
+    data->count = 0;
+  for (i = 0; i < data->count; i++)
+  {
+    reponse = read_sock(raa_current_db);
+    sscanf(reponse + 4, "%d", &(data->ranks[i]) );
+    p = strchr(reponse, '&');
+    p = strchr(p, '=') + 1;
+    data->names[i] = strdup(unprotect_quotes(p));
+    if (data->names[i] == NULL)
+    {
+      data->count = i;
+      break;
+    }
+  }
+  for (i = data->count; i < count; i++)
+  {
+    read_sock(raa_current_db);
+  }
+  return;
+}
+
+
+int raa_nextmatchkey(raa_db_access* raa_current_db, int num, char* pattern, char** matching)
 /*  *matching returned in static memory */
 {
-struct raa_matchkey *data;
-int no_more, count;
+  struct raa_matchkey* data;
+  int no_more = 0, count;
 
-if(raa_current_db == NULL) return 0;
-if(num == 2) {
-	next_block_matchkeys(raa_current_db, 2, pattern);
-	}
-data = (struct raa_matchkey *)(raa_current_db->matchkey_data);
-if(data == NULL) return 0;
-if(data->current < data->count) {
-	if(matching != NULL) *matching = data->names[data->current];
-	return data->ranks[(data->current)++];
-	}
-count = data->count;
-if(count > 0) {
-	no_more = data->no_more;
-	}
-raa_free_matchkeys(raa_current_db);
-if(count == 0 || no_more) return 0;
-next_block_matchkeys(raa_current_db, num, NULL);
-return raa_nextmatchkey(raa_current_db, num, NULL, matching);
+  if (raa_current_db == NULL)
+    return 0;
+  if (num == 2)
+  {
+    next_block_matchkeys(raa_current_db, 2, pattern);
+  }
+  data = (struct raa_matchkey*)(raa_current_db->matchkey_data);
+  if (data == NULL)
+    return 0;
+  if (data->current < data->count)
+  {
+    if (matching != NULL)
+      *matching = data->names[data->current];
+    return data->ranks[(data->current)++];
+  }
+  count = data->count;
+  if (count > 0)
+  {
+    no_more = data->no_more;
+  }
+  raa_free_matchkeys(raa_current_db);
+  if (count == 0 || no_more)
+    return 0;
+  next_block_matchkeys(raa_current_db, num, NULL);
+  return raa_nextmatchkey(raa_current_db, num, NULL, matching);
 }
 
 
-int atoi_u(const char *p)
+int atoi_u(const char* p)
 {
-unsigned value;
+  unsigned value;
 
-sscanf(p, "%u", &value);
-return (int)value;
+  sscanf(p, "%u", &value);
+  return (int)value;
 }
 
 
-char *protect_quotes(char *name)
+static char* protect_quotes(char* name)
 /* remplacer tous les " par \"
-name : une chaine inchangee
-retourne un pointeur vers la chaine rendue privee pour cette fonction
-*/
-{
-char *p, *q;
-int l, count;
-static char *bis = NULL;
-static int lbis = 0;
-
-count = 0; p = name - 1;
-while( (p=strchr(p+1, '"')) != NULL) count++;
-if(count == 0) return name;
-
-l = strlen(name);
-if(l + count > lbis) {
-	lbis = l + count;
-	bis = (char *)realloc(bis, lbis + 1);
-	}
-p = name; q = bis;
-while(TRUE) {
-	if(*p == '"') *(q++) = '\\';
-	*q = *p;
-	if(*p == 0) break;
-	q++; p++;
-	}
-return bis;
-}
-
-
-static char *prepare_remote_file(raa_db_access *raa_current_db, char *oldrequete, char *debut, char *type, int *plrank, 
-	char **badfname)
-{
-char *p, *q, *reponse, *fin;
-static char line[200];
-int nl, l, code;
-FILE *in;
-Reponse *rep;
-
-*plrank = 0; *badfname = line;
-p = strchr(debut, '=') + 1;
-while(isspace(*p)) p++;
-if(*p == '"') { /* if filename is bracketed by " */
-	*(p++) = ' ';
-	fin = strchr(p, '"');
-	if(fin == NULL) return NULL;
-	*fin = ' ';
-	}
-else	{
-	fin = p;
-	do ++fin; while( *fin != 0 && *fin != ')' && !isspace(*fin) );
-	}
-l = fin - p;
-if(l >= sizeof(line)) l = sizeof(line) - 1;
-memcpy(line, p, l); line[l] = 0;
-if(fin - p >= sizeof(line)) return NULL;
-in = fopen(line, "r");
-if(in == NULL) return NULL;
-nl = 0;
-while( fgets(line, sizeof(line), in) != NULL) nl++;
-rewind(in);
-sock_printf(raa_current_db, "crelistfromclientdata&type=%s&nl=%d\n", type, nl);
-if(nl > 0) {
-	while( fgets(line, sizeof(line), in) != NULL) {
-		l = strlen(line);
-		if(line[l - 1] != '\n')  strcpy(line + l, "\n");
-		sock_fputs(raa_current_db, line);
-		}
-	}
-fclose(in);
-
-reponse = read_sock(raa_current_db);
-if(reponse == NULL) {
-	strcpy(line, "connection with server is down");
-	return NULL;
-	}
-rep = initreponse();
-parse(reponse, rep);
-q = val(rep,"code");
-code = atoi(q);
-free(q);
-if(code != 0) {
-	if(code == 3) strcpy(line, "too many lists, delete a few");
-	else sprintf(line, "code=%d", code);
-	return NULL;
-	}
-q = val(rep,"name");
-l = strlen(q);
-reponse = (char *)malloc( (debut - oldrequete) + 1 + l + 1 + strlen(fin) + 1);
-p = reponse;
-memcpy(p, oldrequete, debut - oldrequete);
-p += debut - oldrequete;
-*(p++) = ' ';
-memcpy(p, q, l);
-p += l;
-*(p++) = ' ';
-free(q);
-strcpy(p, fin);
-free(oldrequete);
-q = val(rep,"lrank");
-if(q != NULL) {
-	*plrank = atoi(q);
-	free(q);
-	}
-
-clear_reponse(rep);
-return reponse;
-}
-
-
-static int *add_tmp_blist(int lrank, int *list)
-{
-static int total = 0, current, *prelist = NULL; /* need not be specific to each opened db */
-
-if(list == NULL) { /* initialisation */
-	if(prelist != NULL) free(prelist);
-	total = 10; current = 0;
-	list = (int *)malloc(total*sizeof(int));
-	prelist = list;
-	return list;
-	}
-if(current >= total) {
-	int *tmp;
-	tmp = (int *)realloc(list, (total + 10)*sizeof(int));
-	if(tmp == NULL) return list;
-	total += 10;
-	list = tmp;
-	}
-list[current++] = lrank;
-prelist = list;
-return list;
-}
-
-
-char *maj_strstr(char *in, char *target)
-{
-static char *buffer = NULL;
-static int lbuf = 0;
-int l;
-char *p;
-
-l = strlen(in);
-if(l > lbuf) {
-	lbuf = l;
-	buffer = (char *)realloc(buffer, lbuf + 1);
-	}
-strcpy(buffer, in);
-majuscules(buffer);
-p = strstr(buffer, target);
-if(p != NULL) p = in + (p - buffer);
-return p;
-}
-
-
-static char *raa_requete_remote_file(raa_db_access *raa_current_db, char *oldrequete, int **plist, char **pbadfname)
+   name : une chaine inchangee
+   retourne un pointeur vers la chaine rendue allouee par malloc
+ */
+{
+  char* p, * q;
+  int count;
+  char* bis;
+
+  count = 0; p = name - 1;
+  while ( (p = strchr(p + 1, '"')) != NULL)
+    count++;
+  if (count == 0)
+    return strdup(name);
+
+  bis = (char*)malloc(strlen(name) + count + 1);
+  p = name; q = bis;
+  while (TRUE)
+  {
+    if (*p == '"')
+      *(q++) = '\\';
+    *q = *p;
+    if (*p == 0)
+      break;
+    q++; p++;
+  }
+  return bis;
+}
+
+
+static char* prepare_remote_file(raa_db_access* raa_current_db, char* oldrequete, char* debut, char* type, int* plrank,
+                                 char** badfname)
+{
+  char* p, * q, * reponse, * fin;
+  char* line = raa_current_db->remote_file;
+  int nl, l, code;
+  FILE* in;
+  Reponse* rep;
+
+  *plrank = 0; *badfname = line;
+  p = strchr(debut, '=') + 1;
+  while (isspace(*p))
+    p++;
+  if (*p == '"')   /* if filename is bracketed by " */
+  {
+    *(p++) = ' ';
+    fin = strchr(p, '"');
+    if (fin == NULL)
+      return NULL;
+    *fin = ' ';
+  }
+  else
+  {
+    fin = p;
+    do
+      ++fin;
+    while (*fin != 0 && *fin != ')' && !isspace(*fin) );
+  }
+  l = fin - p;
+  if (l >= sizeof(raa_current_db->remote_file))
+    l = sizeof(raa_current_db->remote_file) - 1;
+  memcpy(line, p, l); line[l] = 0;
+  if (fin - p >= sizeof(raa_current_db->remote_file))
+    return NULL;
+  in = fopen(line, "r");
+  if (in == NULL)
+    return NULL;
+  nl = 0;
+  while (fgets(line, sizeof(raa_current_db->remote_file), in) != NULL)
+    nl++;
+  rewind(in);
+  sock_printf(raa_current_db, "crelistfromclientdata&type=%s&nl=%d\n", type, nl);
+  if (nl > 0)
+  {
+    while (fgets(line, sizeof(raa_current_db->remote_file), in) != NULL)
+    {
+      l = strlen(line);
+      if (line[l - 1] != '\n')
+        strcpy(line + l, "\n");
+      sock_fputs(raa_current_db, line);
+    }
+  }
+  fclose(in);
+
+  reponse = read_sock(raa_current_db);
+  if (reponse == NULL)
+  {
+    strcpy(line, "connection with server is down");
+    return NULL;
+  }
+  rep = initreponse();
+  parse(reponse, rep);
+  q = val(rep, "code");
+  code = atoi(q);
+  free(q);
+  if (code != 0)
+  {
+    if (code == 3)
+      strcpy(line, "too many lists, delete a few");
+    else
+      sprintf(line, "code=%d", code);
+    return NULL;
+  }
+  q = val(rep, "name");
+  l = strlen(q);
+  reponse = (char*)malloc( (debut - oldrequete) + 1 + l + 1 + strlen(fin) + 1);
+  p = reponse;
+  memcpy(p, oldrequete, debut - oldrequete);
+  p += debut - oldrequete;
+  *(p++) = ' ';
+  memcpy(p, q, l);
+  p += l;
+  *(p++) = ' ';
+  free(q);
+  strcpy(p, fin);
+  free(oldrequete);
+  q = val(rep, "lrank");
+  if (q != NULL)
+  {
+    *plrank = atoi(q);
+    free(q);
+  }
+
+  clear_reponse(rep);
+  return reponse;
+}
+
+
+static int* add_tmp_blist(raa_db_access* raa_current_db, int lrank, int* list)
+{
+  if (list == NULL)   /* initialisation */
+  {
+    if (raa_current_db->tmp_prelist != NULL)
+      free(raa_current_db->tmp_prelist);
+    raa_current_db->tmp_total = 10; raa_current_db->tmp_current = 0;
+    list = (int*)malloc(raa_current_db->tmp_total * sizeof(int));
+    raa_current_db->tmp_prelist = list;
+    return list;
+  }
+  if (raa_current_db->tmp_current >= raa_current_db->tmp_total)
+  {
+    int* tmp;
+    tmp = (int*)realloc(list, (raa_current_db->tmp_total + 10) * sizeof(int));
+    if (tmp == NULL)
+      return list;
+    raa_current_db->tmp_total += 10;
+    list = tmp;
+  }
+  list[raa_current_db->tmp_current++] = lrank;
+  raa_current_db->tmp_prelist = list;
+  return list;
+}
+
+
+static char* maj_strstr(char* in, char* target)
+{
+  char* p, * buffer;
+
+  buffer = strdup(in);
+  majuscules(buffer);
+  p = strstr(buffer, target);
+  if (p != NULL)
+    p = in + (p - buffer);
+  free(buffer);
+  return p;
+}
+
+
+static char* raa_requete_remote_file(raa_db_access* raa_current_db, char* oldrequete, int** plist, char** pbadfname)
 /*
-rend NULL ou une requete dont les F= FA= FS= FK= ont ete changes en list-name
-et qui a ete creee par malloc
-*/
-{
-char *oldori, *p;
-int lrank, *list;
-
-oldori = strdup(oldrequete);
-if(maj_strstr(oldori, "F=") == NULL && maj_strstr(oldori, "FA=") == NULL && 
-   maj_strstr(oldori, "FK=") == NULL && maj_strstr(oldori, "FS=") == NULL) {
-	*plist = NULL;
-	return oldori;
-	}
-list = add_tmp_blist(0, NULL); /* initialisation a vide */
-while(oldori != NULL && (p = maj_strstr(oldori, "F=")) != NULL) {
-	oldori = prepare_remote_file(raa_current_db, oldori, p, "SQ", &lrank, pbadfname);
-	if(lrank != 0) list = add_tmp_blist(lrank, list);
-	}
-while(oldori != NULL && (p = maj_strstr(oldori, "FA=")) != NULL) {
-	oldori = prepare_remote_file(raa_current_db, oldori, p, "AC", &lrank, pbadfname);
-	if(lrank != 0) list = add_tmp_blist(lrank, list);
-	}
-while(oldori != NULL && (p = maj_strstr(oldori, "FS=")) != NULL) {
-	oldori = prepare_remote_file(raa_current_db, oldori, p, "SP", &lrank, pbadfname);
-	if(lrank != 0) list = add_tmp_blist(lrank, list);
-	}
-while(oldori != NULL && (p = maj_strstr(oldori, "FK=")) != NULL) {
-	oldori = prepare_remote_file(raa_current_db, oldori, p, "KW", &lrank, pbadfname);
-	if(lrank != 0) list = add_tmp_blist(lrank, list);
-	}
-list = add_tmp_blist(0, list); /* marquage fin de liste par zero */
-if(oldori == NULL && list != NULL) {
- 	 while(*list != 0) raa_releaselist(raa_current_db,  *(list++) );
- 	 list = NULL;
- 	 }
-*plist = list;
-return oldori;
-}
-
-
-int raa_savelist(raa_db_access *raa_current_db, int lrank, FILE *out, int use_acc, char *prefix)
-{
-char *reponse;
-int err;
-
-if(raa_current_db == NULL) return 1;
-sock_printf(raa_current_db, "savelist&lrank=%d&type=%c\n", lrank, (use_acc ? 'A' : 'N') );
-reponse = read_sock(raa_current_db);
-if(reponse == NULL) return 1;
-err = strcmp(reponse, "code=0");
-if(err != 0) {
-	return 1;
-	}
-while(TRUE) {
-	reponse = read_sock(raa_current_db);
-	if(reponse == NULL) return 1;
-	if(strcmp(reponse, "savelist END.") == 0) break;
-	if(prefix != NULL) fputs(prefix, out);
-	fprintf(out, "%s\n", reponse);
-	}
-return 0;
-}
-
-
-int raa_modifylist(raa_db_access *raa_current_db, int lrank, char *type, char *operation, int *pnewlist, int (*check_interrupt)(void), 
-	int *p_processed )
-{
-Reponse *rep;
-char *p, *reponse;
-int code;
-
-if(raa_current_db == NULL) return 3;
-sock_printf(raa_current_db, "modifylist&lrank=%d&type=%s&operation=\"%s\"\n", lrank, 
-	type, operation );
-sock_flush(raa_current_db); /* tres important */
-if(check_interrupt == NULL) {
-	reponse = read_sock(raa_current_db);
-	if(reponse == NULL) return 3;
-	}
-else	{
-	while(TRUE) {
-		reponse = read_sock_timeout(raa_current_db, 500 /* msec */);
-		if(raa_current_db == NULL) return 3;
-		if(reponse != NULL) break;
-		if( check_interrupt() ) {
-			sock_fputs(raa_current_db, "\033" /* esc */ );
-			sock_flush(raa_current_db);
-			}
-		}
-	}
-	
-rep = initreponse();
-parse(reponse, rep);
-p = val(rep,"code");
-code = atoi(p);
-free(p);
-if(code != 0) return code;
-p = val(rep,"lrank");
-*pnewlist = atoi(p);
-free(p);
-p = val(rep,"processed");
-if(p != NULL && p_processed != NULL) *p_processed = atoi(p);
-if(p != NULL) free(p);
-clear_reponse(rep);
-return 0;
-}
-
-
-int raa_knowndbs(raa_db_access *raa_current_db, char ***pnames, char ***pdescriptions)
-{
-int nl;
-char **names = NULL, **descriptions = NULL;
-char *reponse, *p, *q, *r;
-int l, i;
-
-if(raa_current_db == NULL) return 0;
-sock_printf(raa_current_db, "knowndbs\n" );
-reponse = read_sock(raa_current_db);
-if(reponse == NULL || strncmp(reponse, "nl=", 3) != 0) {
-	return 0;
-	}
-nl = atoi(reponse + 3);
-if(nl == 0) return 0;
-names = (char **) malloc(nl * sizeof(char *));
-descriptions = (char **) malloc(nl * sizeof(char *));
-for(i = 0; i < nl; i++) {
-	reponse = read_sock(raa_current_db);
-	if(reponse == NULL) return 0;
-	p = strchr(reponse, '|');
-	if(p != NULL)  {
-		*(p++) = 0;
-		q = strchr(p, '|');
-		if(q != NULL)  *(q++) = 0;
-		}
-	l = strlen(reponse);
-	names[i] = (char *)malloc(l+1);
-	strcpy(names[i], reponse);
-	compact(names[i]);
-	if(p != NULL && q != NULL) {
-		while( (r=strchr(p, '\t')) != NULL) *r = ' ';
-		majuscules(p); compact(p);
-		l = strlen(q);
-		descriptions[i] = (char *)malloc(l+20);
-		descriptions[i][0] = 0;
-		if(strcmp(p, "OFF") == 0) strcpy(descriptions[i], "(offline) ");
-		strcat(descriptions[i], q);
-		}
-	else descriptions[i] = NULL;
-	}
-*pnames = names; *pdescriptions = descriptions;
-return nl;
-}
-
-
-char *raa_short_descr(raa_db_access *raa_current_db, int seqnum, char *text, int maxlen, raa_long pinf, int div, char *name)
+   rend NULL ou une requete dont les F= FA= FS= FK= ont ete changes en list-name
+   et qui a ete creee par malloc
+ */
+{
+  char* oldori, * p;
+  int lrank, * list;
+
+  oldori = strdup(oldrequete);
+  if (maj_strstr(oldori, "F=") == NULL && maj_strstr(oldori, "FA=") == NULL &&
+      maj_strstr(oldori, "FK=") == NULL && maj_strstr(oldori, "FS=") == NULL)
+  {
+    *plist = NULL;
+    return oldori;
+  }
+  list = add_tmp_blist(raa_current_db, 0, NULL); /* initialisation a vide */
+  while (oldori != NULL && (p = maj_strstr(oldori, "F=")) != NULL)
+  {
+    oldori = prepare_remote_file(raa_current_db, oldori, p, "SQ", &lrank, pbadfname);
+    if (lrank != 0)
+      list = add_tmp_blist(raa_current_db, lrank, list);
+  }
+  while (oldori != NULL && (p = maj_strstr(oldori, "FA=")) != NULL)
+  {
+    oldori = prepare_remote_file(raa_current_db, oldori, p, "AC", &lrank, pbadfname);
+    if (lrank != 0)
+      list = add_tmp_blist(raa_current_db, lrank, list);
+  }
+  while (oldori != NULL && (p = maj_strstr(oldori, "FS=")) != NULL)
+  {
+    oldori = prepare_remote_file(raa_current_db, oldori, p, "SP", &lrank, pbadfname);
+    if (lrank != 0)
+      list = add_tmp_blist(raa_current_db, lrank, list);
+  }
+  while (oldori != NULL && (p = maj_strstr(oldori, "FK=")) != NULL)
+  {
+    oldori = prepare_remote_file(raa_current_db, oldori, p, "KW", &lrank, pbadfname);
+    if (lrank != 0)
+      list = add_tmp_blist(raa_current_db, lrank, list);
+  }
+  list = add_tmp_blist(raa_current_db, 0, list); /* marquage fin de liste par zero */
+  if (oldori == NULL && list != NULL)
+  {
+    while (*list != 0)
+      raa_releaselist(raa_current_db,  *(list++) );
+    list = NULL;
+  }
+  *plist = list;
+  return oldori;
+}
+
+
+int raa_savelist(raa_db_access* raa_current_db, int lrank, FILE* out, int use_acc, char* prefix)
+{
+  char* reponse;
+  int err;
+
+  if (raa_current_db == NULL)
+    return 1;
+  sock_printf(raa_current_db, "savelist&lrank=%d&type=%c\n", lrank, (use_acc ? 'A' : 'N') );
+  reponse = read_sock(raa_current_db);
+  if (reponse == NULL)
+    return 1;
+  err = strcmp(reponse, "code=0");
+  if (err != 0)
+  {
+    return 1;
+  }
+  while (TRUE)
+  {
+    reponse = read_sock(raa_current_db);
+    if (reponse == NULL)
+      return 1;
+    if (strcmp(reponse, "savelist END.") == 0)
+      break;
+    if (prefix != NULL)
+      fputs(prefix, out);
+    fprintf(out, "%s\n", reponse);
+  }
+  return 0;
+}
+
+
+int raa_modifylist(raa_db_access* raa_current_db, int lrank, char* type, char* operation, int* pnewlist, int (* check_interrupt)(void),
+                   int* p_processed )
+{
+  Reponse* rep;
+  char* p, * reponse;
+  int code;
+
+  if (raa_current_db == NULL)
+    return 3;
+  sock_printf(raa_current_db, "modifylist&lrank=%d&type=%s&operation=\"%s\"\n", lrank,
+              type, operation );
+  sock_flush(raa_current_db); /* tres important */
+  if (check_interrupt == NULL)
+  {
+    reponse = read_sock(raa_current_db);
+    if (reponse == NULL)
+      return 3;
+  }
+  else
+  {
+    while (TRUE)
+    {
+      reponse = read_sock_timeout(raa_current_db, 500 /* msec */);
+      if (raa_current_db == NULL)
+        return 3;
+      if (reponse != NULL)
+        break;
+      if (check_interrupt() )
+      {
+        sock_fputs(raa_current_db, "\033" /* esc */ );
+        sock_flush(raa_current_db);
+      }
+    }
+  }
+
+  rep = initreponse();
+  parse(reponse, rep);
+  p = val(rep, "code");
+  code = atoi(p);
+  free(p);
+  if (code != 0)
+    return code;
+  p = val(rep, "lrank");
+  *pnewlist = atoi(p);
+  free(p);
+  p = val(rep, "processed");
+  if (p != NULL && p_processed != NULL)
+    *p_processed = atoi(p);
+  if (p != NULL)
+    free(p);
+  clear_reponse(rep);
+  return 0;
+}
+
+
+int raa_knowndbs(raa_db_access* raa_current_db, char*** pnames, char*** pdescriptions)
+{
+  int nl;
+  char** names = NULL, ** descriptions = NULL;
+  char* reponse, * p, * q, * r;
+  int l, i;
+
+  if (raa_current_db == NULL)
+    return 0;
+  sock_printf(raa_current_db, "knowndbs\n" );
+  reponse = read_sock(raa_current_db);
+  if (reponse == NULL || strncmp(reponse, "nl=", 3) != 0)
+  {
+    return 0;
+  }
+  nl = atoi(reponse + 3);
+  if (nl == 0)
+    return 0;
+  names = (char**) malloc(nl * sizeof(char*));
+  descriptions = (char**) malloc(nl * sizeof(char*));
+  for (i = 0; i < nl; i++)
+  {
+    reponse = read_sock(raa_current_db);
+    if (reponse == NULL)
+      return 0;
+    p = strchr(reponse, '|');
+    if (p != NULL)
+    {
+      *(p++) = 0;
+      q = strchr(p, '|');
+      if (q != NULL)
+        *(q++) = 0;
+    }
+    l = strlen(reponse);
+    names[i] = (char*)malloc(l + 1);
+    strcpy(names[i], reponse);
+    compact(names[i]);
+    if (p != NULL && q != NULL)
+    {
+      while ( (r = strchr(p, '\t')) != NULL)
+        *r = ' ';
+      majuscules(p); compact(p);
+      l = strlen(q);
+      descriptions[i] = (char*)malloc(l + 20);
+      descriptions[i][0] = 0;
+      if (strcmp(p, "OFF") == 0)
+        strcpy(descriptions[i], "(offline) ");
+      strcat(descriptions[i], q);
+    }
+    else
+      descriptions[i] = NULL;
+  }
+  *pnames = names; *pdescriptions = descriptions;
+  return nl;
+}
+
+
+char* raa_short_descr(raa_db_access* raa_current_db, int seqnum, char* text, int maxlen, raa_long pinf, int div, char* name)
 /*
-to get a description of a sequence or of a subsequence
-seqnum	the sequence number
-text	the string to be loaded with description
-maxlen	the max # of chars allowed in text (\0 is put but not counted in maxlen)
-return value	a pointer to text 
-*/
-{
-int l, deb;
-char *p;
-
-text[maxlen]=0;
-strcpy(text, name);
-l=strlen(text);
-if(strchr(name, '.') != NULL) { /* subsequence */
-	if( (p = raa_read_annots(raa_current_db, pinf, div)) == NULL) return text;
-	p[20]=0;
-	strcat(text,p+4);
-	l=strlen(text);
-	while(text[l-1]==' ') l--;
-	text[l]=0;
-	if( ( p = strchr(p + 21, '/') ) != NULL) {
-		strncat(text, p, maxlen - l);
-		l = strlen(text);
-		if(l > 75) return text;
-		}
-	do	{
-		p = raa_next_annots(raa_current_db, NULL);
-		if( strcmptrail(p,20,NULL,0) && 
-			strncmp(p,"FT        ",10) ) return text;
-		}
-	while(p[21]!='/');
-	do	{
-		strncat(text,p+20,maxlen-l);
-		l=strlen(text);
-		if(l>75) return text;
-		p = raa_next_annots(raa_current_db, NULL);
-		}
-	while ( !strcmptrail(p,20,NULL,0) || 
-				!strncmp(p,"FT        ",10) );
-	}
-else	{ /* parent sequence */
-	if( (p = raa_read_annots(raa_current_db, pinf, div)) == NULL) return text;
-	p = raa_next_annots(raa_current_db, NULL);
-	if(raa_current_db->nbrf) {
-		deb=17;
-		}
-	else	{
-		deb=13;
-		if(raa_current_db->embl || raa_current_db->swissprot) {
-			while (strncmp(p,"DE",2)) {
-				p = raa_next_annots(raa_current_db, NULL);
-				}
-			deb=6;
-			}
-		}
-	do	{
-		strncat(text,p+deb-2,maxlen-l);
-		l=strlen(text);
-		if(l>=77) return text;
-		p = raa_next_annots(raa_current_db, NULL);
-		}
-	while( !strncmp(p,"  ",2) || !strncmp(p,"DE",2) );
-	}
-return text;
-}
-
-
-struct chain_void *raa_get_list_open_dbs(void)
-{
-return raa_list_open_dbs;
+   to get a description of a sequence or of a subsequence
+   seqnum	the sequence number
+   text	the string to be loaded with description
+   maxlen	the max # of chars allowed in text (\0 is put but not counted in maxlen)
+   return value	a pointer to text
+ */
+{
+  int l, deb;
+  char* p;
+
+  text[maxlen] = 0;
+  strcpy(text, name);
+  l = strlen(text);
+  if (strchr(name, '.') != NULL)   /* subsequence */
+  {
+    if ( (p = raa_read_annots(raa_current_db, pinf, div)) == NULL)
+      return text;
+    p[20] = 0;
+    strcat(text, p + 4);
+    l = strlen(text);
+    while (text[l - 1] == ' ')
+      l--;
+    text[l] = 0;
+    if ( ( p = strchr(p + 21, '/') ) != NULL)
+    {
+      strncat(text, p, maxlen - l);
+      l = strlen(text);
+      if (l > 75)
+        return text;
+    }
+    do
+    {
+      p = raa_next_annots(raa_current_db, NULL);
+      if (strcmptrail(p, 20, NULL, 0) &&
+          strncmp(p, "FT        ", 10) )
+        return text;
+    }
+    while (p[21] != '/');
+    do
+    {
+      strncat(text, p + 20, maxlen - l);
+      l = strlen(text);
+      if (l > 75)
+        return text;
+      p = raa_next_annots(raa_current_db, NULL);
+    }
+    while (!strcmptrail(p, 20, NULL, 0) ||
+           !strncmp(p, "FT        ", 10) );
+  }
+  else    /* parent sequence */
+  {
+    if (raa_read_annots(raa_current_db, pinf, div) == NULL)
+      return text;
+    p = raa_next_annots(raa_current_db, NULL);
+    if (raa_current_db->nbrf)
+    {
+      deb = 17;
+    }
+    else
+    {
+      deb = 13;
+      if (raa_current_db->embl || raa_current_db->swissprot)
+      {
+        while (strncmp(p, "DE", 2))
+        {
+          p = raa_next_annots(raa_current_db, NULL);
+        }
+        deb = 6;
+      }
+    }
+    do
+    {
+      strncat(text, p + deb - 2, maxlen - l);
+      l = strlen(text);
+      if (l >= 77)
+        return text;
+      p = raa_next_annots(raa_current_db, NULL);
+    }
+    while (!strncmp(p, "  ", 2) || !strncmp(p, "DE", 2) );
+  }
+  return text;
 }
 
 
 #define END_COORDINATE_TEST(line) strncmp(line, "extractseqs END.", 16)
 
-static int *next_1_coordinate_set(raa_db_access *raa_current_db)
-{
-char  *p, *line, *q;
-int  start, last, seqnum, elt, i, count;
-int *table = NULL;
-
-line = read_sock(raa_current_db);
-if(END_COORDINATE_TEST(line) == 0) return NULL;
-count = 0; p = line;
-while(TRUE) {
-	p = strchr(p+1, '|');
-	if( p == NULL) break;
-	count++;
-	}
-table = (int *)malloc( (3 * count + 1) * sizeof(int));
-if(table == NULL) {
-	do line = read_sock(raa_current_db);
-	while(END_COORDINATE_TEST(line) != 0) ;
-	return NULL;
-	}
-table[0] = count;
-elt = 1;
-for(i = 0; i < count; i++) {
-	p = strchr(line, '|');
-	if(p == NULL) break;
-	q = strchr(line, '=');
-	if(q == NULL || q > p) break;
-	sscanf(q+1, "%d", &seqnum);
-	q = strchr(q+1, '=');
-	if(q == NULL || q > p) break;
-	sscanf(q+1, "%d", &start);
-	q = strchr(q+1, '=');
-	if(q == NULL || q > p) break;
-	sscanf(q+1, "%d", &last);
-	table[elt++] = seqnum;
-	table[elt++] = start;
-	table[elt++] = last;
-	line = p + 1;
-	}
-return table;
-}
-
-
-struct coord_series_struct {
-	int count;
-	int **table;
-	int next;
-	} ;
-
-void *raa_prep_coordinates(raa_db_access *raa_current_db, int lrank, int seqnum, 
-	char *operation, /* "simple","fragment","feature","region" */
-	char *feature_name, char *bounds, char *min_bounds)
+static int* next_1_coordinate_set(raa_db_access* raa_current_db)
+{
+  char* p, * line, * q;
+  int start, last, seqnum, elt, i, count;
+  int* table = NULL;
+
+  line = read_sock(raa_current_db);
+  if (END_COORDINATE_TEST(line) == 0)
+    return NULL;
+  count = 0; p = line;
+  while (TRUE)
+  {
+    p = strchr(p + 1, '|');
+    if (p == NULL)
+      break;
+    count++;
+  }
+  table = (int*)malloc( (3 * count + 1) * sizeof(int));
+  if (table == NULL)
+  {
+    do
+      line = read_sock(raa_current_db);
+    while (END_COORDINATE_TEST(line) != 0);
+    return NULL;
+  }
+  table[0] = count;
+  elt = 1;
+  for (i = 0; i < count; i++)
+  {
+    p = strchr(line, '|');
+    if (p == NULL)
+      break;
+    q = strchr(line, '=');
+    if (q == NULL || q > p)
+      break;
+    sscanf(q + 1, "%d", &seqnum);
+    q = strchr(q + 1, '=');
+    if (q == NULL || q > p)
+      break;
+    sscanf(q + 1, "%d", &start);
+    q = strchr(q + 1, '=');
+    if (q == NULL || q > p)
+      break;
+    sscanf(q + 1, "%d", &last);
+    table[elt++] = seqnum;
+    table[elt++] = start;
+    table[elt++] = last;
+    line = p + 1;
+  }
+  return table;
+}
+
+
+struct coord_series_struct
+{
+  int count;
+  int** table;
+  int next;
+};
+
+void* raa_prep_coordinates(raa_db_access* raa_current_db, int lrank, int seqnum,
+                           char* operation, /* "simple","fragment","feature","region" */
+                           char* feature_name, char* bounds, char* min_bounds)
 /*
-only one of lrank and seqnum is != 0 to work on a sequence list or on an individual sequence
-feature_name: used for operations feature and region, NULL otherwise
-bounds: used for operations fragment and region, NULL otherwise
+   only one of lrank and seqnum is != 0 to work on a sequence list or on an individual sequence
+   feature_name: used for operations feature and region, NULL otherwise
+   bounds: used for operations fragment and region, NULL otherwise
         syntax by examples "45,155"  "-100,100"  "-10,e+100"  "E-10,e+100"
-min_bounds: NULL for operations other than fragment and region
+   min_bounds: NULL for operations other than fragment and region
             can be NULL for fragment and region and means min_bounds same as bounds
             if not NULL, same syntax as bounds
-pcount: upon return, set to number of coordinate series
-
-return value: NULL if error, or pointer to opaque data
-*/
-{
-char message[200];
-char *line;
-int *v, maxi, **table, rank;
-struct coord_series_struct *retval;
-	
-sprintf(message, "extractseqs&%s=%d&format=coordinates&operation=%s", 
-	seqnum == 0 ? "lrank" : "seqnum", 
-	seqnum == 0 ? lrank : seqnum, 
-	operation);
-sock_fputs(raa_current_db, message);
-if(strcmp(operation, "feature") == 0 || strcmp(operation, "region") == 0) {
-	sprintf(message, "&feature=%s", feature_name);
-	sock_fputs(raa_current_db, message);
-	}
-if(strcmp(operation, "fragment") == 0 || strcmp(operation, "region") == 0) {
-	sprintf(message, "&bounds=%s", bounds);
-	sock_fputs(raa_current_db, message);
-	}
-if(min_bounds != NULL) {
-	sprintf(message, "&minbounds=%s", min_bounds);
-	sock_fputs(raa_current_db, message);
-	}
-sock_fputs(raa_current_db, "\n"); sock_flush(raa_current_db);
-line = read_sock(raa_current_db);
-if(strcmp(line, "code=0") != 0) {
-	return NULL;
-	}
-
-maxi = 100; rank = 0;
-table = (int **)malloc(maxi*sizeof(int *));
-if(table == NULL) {
-	do line = read_sock(raa_current_db);
-	while(END_COORDINATE_TEST(line) != 0) ;
-	return NULL;
-	}
-while( (v = next_1_coordinate_set(raa_current_db)) != NULL) {
-	if(rank >= maxi) {
-		int **vv;
-		vv = (int **)realloc(table, 2*maxi*sizeof(int *));
-		if(vv == NULL) {
-			do line = read_sock(raa_current_db);
-			while(END_COORDINATE_TEST(line) != 0) ;
-			break;
-			}
-		maxi = 2*maxi;
-		table = vv;
-		}
-	table[rank++] = v;
-	}
-table = realloc(table, rank*sizeof(int *));
-retval = (struct coord_series_struct *)malloc(sizeof(struct coord_series_struct));
-if(retval == NULL) return NULL;
-retval->count = rank;
-retval->table = table;
-retval->next = 0;
-return retval;
-}
-
-
-int *raa_1_coordinate_set(void *v)
+   pcount: upon return, set to number of coordinate series
+
+   return value: NULL if error, or pointer to opaque data
+ */
+{
+  char message[200];
+  char* line;
+  int* v, maxi, ** table, rank;
+  struct coord_series_struct* retval;
+
+  sprintf(message, "extractseqs&%s=%d&format=coordinates&operation=%s",
+          seqnum == 0 ? "lrank" : "seqnum",
+          seqnum == 0 ? lrank : seqnum,
+          operation);
+  sock_fputs(raa_current_db, message);
+  if (strcmp(operation, "feature") == 0 || strcmp(operation, "region") == 0)
+  {
+    sprintf(message, "&feature=%s", feature_name);
+    sock_fputs(raa_current_db, message);
+  }
+  if (strcmp(operation, "fragment") == 0 || strcmp(operation, "region") == 0)
+  {
+    sprintf(message, "&bounds=%s", bounds);
+    sock_fputs(raa_current_db, message);
+  }
+  if (min_bounds != NULL)
+  {
+    sprintf(message, "&minbounds=%s", min_bounds);
+    sock_fputs(raa_current_db, message);
+  }
+  sock_fputs(raa_current_db, "\n"); sock_flush(raa_current_db);
+  line = read_sock(raa_current_db);
+  if (strcmp(line, "code=0") != 0)
+  {
+    return NULL;
+  }
+
+  maxi = 100; rank = 0;
+  table = (int**)malloc(maxi * sizeof(int*));
+  if (table == NULL)
+  {
+    do
+      line = read_sock(raa_current_db);
+    while (END_COORDINATE_TEST(line) != 0);
+    return NULL;
+  }
+  while ( (v = next_1_coordinate_set(raa_current_db)) != NULL)
+  {
+    if (rank >= maxi)
+    {
+      int** vv;
+      vv = (int**)realloc(table, 2 * maxi * sizeof(int*));
+      if (vv == NULL)
+      {
+        do
+          line = read_sock(raa_current_db);
+        while (END_COORDINATE_TEST(line) != 0);
+        break;
+      }
+      maxi = 2 * maxi;
+      table = vv;
+    }
+    table[rank++] = v;
+  }
+  table = realloc(table, rank * sizeof(int*));
+  retval = (struct coord_series_struct*)malloc(sizeof(struct coord_series_struct));
+  if (retval == NULL)
+    return NULL;
+  retval->count = rank;
+  retval->table = table;
+  retval->next = 0;
+  return retval;
+}
+
+
+int* raa_1_coordinate_set(void* v)
 /*
-to be called repetitively as
-table = raa_1_coordinate_set(v);
-until returns NULL
-with the opaque pointer returned by the raa_prep_coordinates call
-
-returns int array table in private memory containing 1 + 3*table[0] elements
-count = table[0] ; 
-j = 0;
-for(i=0; i < count; i++) {
-	table[j+1] is the acnuc number of the sequence
-	table[j+2] is the start position in this sequence
-	table[j+3] is the end position in this sequence
-	j += 3;
-	}
-start position > end position <==> fragment is on the complementary strand of the acnuc seq
-returns NULL when all coordinate series have been processed
-*/
-{
-int *retval, i;
-struct coord_series_struct *s = (struct coord_series_struct *)v;
-
-if(s->next >= s->count) {
-	for(i=0; i < s->count; i++) free(s->table[i]);
-	free(s->table);
-	free(s);
-	return NULL;
-	}	
-retval = s->table[(s->next)++];
-return retval;
-}
-
-
-char *raa_translate_cds(raa_db_access *raa_current_db, int seqnum)
+   to be called repetitively as
+   table = raa_1_coordinate_set(v);
+   until returns NULL
+   with the opaque pointer returned by the raa_prep_coordinates call
+
+   returns int array table in private memory containing 1 + 3*table[0] elements
+   count = table[0] ;
+   j = 0;
+   for(i=0; i < count; i++) {
+   table[j+1] is the acnuc number of the sequence
+   table[j+2] is the start position in this sequence
+   table[j+3] is the end position in this sequence
+   j += 3;
+   }
+   start position > end position <==> fragment is on the complementary strand of the acnuc seq
+   returns NULL when all coordinate series have been processed
+ */
+{
+  int* retval, i;
+  struct coord_series_struct* s = (struct coord_series_struct*)v;
+
+  if (s->next >= s->count)
+  {
+    for (i = 0; i < s->count; i++)
+    {
+      free(s->table[i]);
+    }
+    free(s->table);
+    free(s);
+    return NULL;
+  }
+  retval = s->table[(s->next)++];
+  return retval;
+}
+
+
+char* raa_translate_cds(raa_db_access* raa_current_db, int seqnum)
 /* traduction d'un cds avec codon initiateur traite et * internes ==> X
-rendue dans memoire allouee ici qu'il ne faut pas modifier
-retour NULL si pb lecture de la seq
-*/
-{
-static char *buffer = NULL;
-static int lbuffer = 0;
-int debut_codon, longueur, pos, code, phase;
-char codon[4], *p;
-
-raa_readsub(raa_current_db, seqnum,&longueur,NULL,NULL,NULL,NULL,&phase,&code);
-debut_codon = phase + 1;
-longueur = (longueur - debut_codon + 1)/3;
-if(longueur > lbuffer) {
-	if(buffer != NULL) free(buffer);
-	buffer = (char *)malloc(longueur + 1);
-	lbuffer = longueur;
-	}
-if(buffer == NULL) {lbuffer = 0; return NULL; }
-buffer[0] = raa_translate_init_codon(raa_current_db, seqnum);
-debut_codon += 3;
-for(pos = 1; pos < longueur; pos++) {
-	if( raa_gfrag(raa_current_db, seqnum, debut_codon, 3, codon) == 0) return NULL;
-	buffer[pos] = codaa(codon,code);
-	debut_codon += 3;
-	}
-buffer[longueur] = 0;
-while( (p = strchr(buffer, '*') ) != NULL && p - buffer < longueur - 1 )
-	*p = 'X';
-return buffer;
-}
-
-
-char raa_translate_init_codon(raa_db_access *raa_current_db, int numseq)
-{
-char codon[4];
-int point, special_init = TRUE, val, gc, phase;
-static int num_5_partial = 0;
-
-if(num_5_partial == 0) num_5_partial = raa_iknum(raa_current_db, "5'-PARTIAL", raa_key);
-raa_readsub(raa_current_db, numseq, NULL, NULL,NULL, &point, NULL, &phase, &gc);
-if(phase != 0) special_init = FALSE;
-else	{ /* la seq est-elle 5'-PARTIAL ? */
-	while(point != 0) {
-		point = raa_readshrt(raa_current_db, point, &val);
-		if(val == num_5_partial) {
-			special_init = FALSE;
-			break;
-			}
-		}
-	}
-raa_gfrag(raa_current_db, numseq, phase + 1, 3, codon);
-if(special_init)  /* traduction speciale du codon initiateur */
-	return init_codon_to_aa(codon, gc);
-else	return codaa(codon, gc);
-}
-
-
-static void ajout_synonyme(raa_node *secondaire, raa_node *principal)
-{
-raa_node *next;
-
-if(principal->syno == NULL) {
-	principal->syno = secondaire;
-	secondaire->syno = principal;
-	}
-else	{
-	next = principal->syno;
-	principal->syno = secondaire;
-	secondaire->syno = next;
-	}	
-}
-
-static void redresse_branches(raa_node *pere)
+   rendue dans memoire allouee ici qu'il ne faut pas modifier
+   retour NULL si pb lecture de la seq
+ */
+{
+  int debut_codon, longueur, pos, code, phase;
+  char codon[4], * p;
+
+  raa_readsub(raa_current_db, seqnum, &longueur, NULL, NULL, NULL, NULL, &phase, &code);
+  debut_codon = phase + 1;
+  longueur = (longueur - debut_codon + 1) / 3;
+  raa_current_db->translate_buffer = (char*)realloc(raa_current_db->translate_buffer, longueur + 1);
+  if (raa_current_db->translate_buffer == NULL)
+  {
+    return NULL;
+  }
+  raa_current_db->translate_buffer[0] = raa_translate_init_codon(raa_current_db, seqnum);
+  debut_codon += 3;
+  for (pos = 1; pos < longueur; pos++)
+  {
+    if (raa_gfrag(raa_current_db, seqnum, debut_codon, 3, codon) == 0)
+      return NULL;
+    raa_current_db->translate_buffer[pos] = codaa(codon, code);
+    debut_codon += 3;
+  }
+  raa_current_db->translate_buffer[longueur] = 0;
+  while ( (p = strchr(raa_current_db->translate_buffer, '*') ) != NULL && p - raa_current_db->translate_buffer < longueur - 1)
+    *p = 'X';
+  return raa_current_db->translate_buffer;
+}
+
+
+char raa_translate_init_codon(raa_db_access* raa_current_db, int numseq)
+{
+  char codon[4];
+  int point, special_init = TRUE, val, gc, phase, rank = 0;
+
+  if (raa_current_db->num_5_partial == 0)
+    raa_current_db->num_5_partial = raa_iknum(raa_current_db, "5'-PARTIAL", raa_key);
+  raa_readsub(raa_current_db, numseq, NULL, NULL, NULL, &point, NULL, &phase, &gc);
+  if (phase != 0)
+    special_init = FALSE;
+  else    /* la seq est-elle 5'-PARTIAL ? */
+  {
+    while (point != 0)
+    {
+      val = raa_followshrt2(raa_current_db, &point, &rank, raa_key_of_sub);
+      if (val == raa_current_db->num_5_partial)
+      {
+        special_init = FALSE;
+        break;
+      }
+    }
+  }
+  raa_gfrag(raa_current_db, numseq, phase + 1, 3, codon);
+  if (special_init) /* traduction speciale du codon initiateur */
+    return init_codon_to_aa(codon, gc);
+  else
+    return codaa(codon, gc);
+}
+
+
+static void ajout_synonyme(raa_node* secondaire, raa_node* principal)
+{
+  raa_node* next;
+
+  if (principal->syno == NULL)
+  {
+    principal->syno = secondaire;
+    secondaire->syno = principal;
+  }
+  else
+  {
+    next = principal->syno;
+    principal->syno = secondaire;
+    secondaire->syno = next;
+  }
+}
+
+static void redresse_branches(raa_node* pere)
 /* Recursively reverse the order of descendants because it has been reversed
  */
 {
-  struct raa_pair *point, *next1, *next2, *last;
+  struct raa_pair* point, * next1, * next2, * last;
   point = pere->list_desc;
-  if (!point) return;
+  if (!point)
+    return;
   next1 = point->next;
-  if (next1) point->next = NULL;
-  while (TRUE) {
+  if (next1)
+    point->next = NULL;
+  while (TRUE)
+  {
     last = point;
     redresse_branches(point->value);
-    if (!next1) break;
+    if (!next1)
+      break;
     next2 = next1->next;
     next1->next = point;
     point = next1;
     next1 = next2;
-    }
+  }
   pere->list_desc = last;
 }
 
 
-static void ajout_branche(raa_node *pere, raa_node *fils)
+static void ajout_branche(raa_node* pere, raa_node* fils)
 /* adds a pere->fils branch. The last added branch is the first child of pere.
  */
 {
-struct raa_pair *point, *nouveau;
+  struct raa_pair* nouveau;
 
-nouveau = (struct raa_pair *)calloc(1,sizeof(struct raa_pair));
-nouveau->value = fils;
-if( (point = pere->list_desc) == NULL) {
-	pere->list_desc = nouveau;
-	}
-else	{
-  nouveau->next = pere->list_desc;
-  pere->list_desc = nouveau;
-	}
+  nouveau = (struct raa_pair*)calloc(1, sizeof(struct raa_pair));
+  nouveau->value = fils;
+  if (pere->list_desc == NULL)
+  {
+    pere->list_desc = nouveau;
+  }
+  else
+  {
+    nouveau->next = pere->list_desc;
+    pere->list_desc = nouveau;
+  }
 }
 
 
-static void raa_decode_desc_arbre(char *reponse, raa_node **tab_noeud)
+static void raa_decode_desc_arbre(char* reponse, raa_node** tab_noeud)
 /* reponse contient
-rank&pere&count&"...name..."&"...libel..."
-synonyme est identifie par pere < 0 et -pere = son principal
-*/
-{ 
-int num, pere, count, l;
-char *p, *q, *name, *libel;
-
-num = atoi(reponse);
-p = strchr(reponse, '&');
-pere = atoi(p + 1);
-p = strchr(p+1, '&');
-count = atoi(p + 1);
+   rank&pere&count&"...name..."&"...libel..."
+   synonyme est identifie par pere < 0 et -pere = son principal
+ */
+{
+  int num, pere, count, l;
+  char* p, * q, * name, * libel;
+
+  num = atoi(reponse);
+  p = strchr(reponse, '&');
+  pere = atoi(p + 1);
+  p = strchr(p + 1, '&');
+  count = atoi(p + 1);
 /* ne pas brancher un noeud deja branche ailleurs auparavant */
-if(tab_noeud[num] != NULL ) return;
-tab_noeud[num] = (raa_node *)calloc(1, sizeof(raa_node));
-tab_noeud[num]->rank = num;
-if(pere < 0) { /* un synonyme */
-	ajout_synonyme(tab_noeud[num], tab_noeud[-pere]);
-	}
-else 	{
-	tab_noeud[num]->count = count;
-	tab_noeud[num]->parent = tab_noeud[pere];
-	if(num != 2) ajout_branche(tab_noeud[pere], tab_noeud[num]);
-	}
-
-p = strchr(p+1, '&') + 1;
-q = p;
-do 	{
-	q++;
-    	if(*q == 0) break;
-	}
-while(*q != '"' || *(q-1) == '\\');
-l = q-p+1;
-name = (char *)malloc(l+1);
-strncpy(name, p, l); name[l] = 0;
-unprotect_quotes(name);
-tab_noeud[num]->name = name;
-q++;
-if(*q == '&') {
-	p = q+1;
-	q = p;
-	do 	{
-		q++;
-    		if(*q == 0) break;
-		}
-	while(*q != '"' || *(q-1) == '\\');
-	l = q-p+1;
-	libel = (char *)malloc(l+1);
-	strncpy(libel, p, l); libel[l] = 0;
-	unprotect_quotes(libel);
-	tab_noeud[num]->libel = libel;
-	p = (char *)malloc(l+1);
-	strcpy(p, libel);
-	majuscules(p);
-	tab_noeud[num]->libel_upcase = p;
-	if(strncmp(p, "ID:", 3) == 0 || (p = strstr(p, "|ID:")) != NULL) {
-		p += 2; if(*p != ':') p++;
-		sscanf(p + 1, "%d", &(tab_noeud[num]->tid) );
-		}
-	}
-}
-
-
-static void raa_calc_taxo_count(raa_node *racine)
-{
-struct raa_pair *paire;
-int count = 0;
-
-paire = racine->list_desc;
-while(paire != NULL) {
-	raa_calc_taxo_count(paire->value);
-	count += paire->value->count;
-	paire = paire->next;
-	}
-racine->count += count;
-}
-
-
-int raa_loadtaxonomy(raa_db_access  *raa_current_db, char *rootname, 
-	int (*progress_function)(int, void *), void *progress_arg, 
-	int (*need_interrupt_f)(void *), void *interrupt_arg)
+  if (tab_noeud[num] != NULL)
+    return;
+  tab_noeud[num] = (raa_node*)calloc(1, sizeof(raa_node));
+  tab_noeud[num]->rank = num;
+  if (pere < 0)   /* un synonyme */
+  {
+    ajout_synonyme(tab_noeud[num], tab_noeud[-pere]);
+  }
+  else
+  {
+    tab_noeud[num]->count = count;
+    tab_noeud[num]->parent = tab_noeud[pere];
+    if (num != 2)
+      ajout_branche(tab_noeud[pere], tab_noeud[num]);
+  }
+
+  p = strchr(p + 1, '&') + 1;
+  q = p;
+  do
+  {
+    q++;
+    if (*q == 0)
+      break;
+  }
+  while (*q != '"' || *(q - 1) == '\\');
+  l = q - p + 1;
+  name = (char*)malloc(l + 1);
+  strncpy(name, p, l); name[l] = 0;
+  unprotect_quotes(name);
+  tab_noeud[num]->name = name;
+  q++;
+  if (*q == '&')
+  {
+    p = q + 1;
+    q = p;
+    do
+    {
+      q++;
+      if (*q == 0)
+        break;
+    }
+    while (*q != '"' || *(q - 1) == '\\');
+    l = q - p + 1;
+    libel = (char*)malloc(l + 1);
+    strncpy(libel, p, l); libel[l] = 0;
+    unprotect_quotes(libel);
+    tab_noeud[num]->libel = libel;
+    p = (char*)malloc(l + 1);
+    strcpy(p, libel);
+    majuscules(p);
+    tab_noeud[num]->libel_upcase = p;
+    if (strncmp(p, "ID:", 3) == 0 || (p = strstr(p, "|ID:")) != NULL)
+    {
+      p += 2; if (*p != ':')
+        p++;
+      sscanf(p + 1, "%d", &(tab_noeud[num]->tid) );
+    }
+  }
+}
+
+
+static void raa_calc_taxo_count(raa_node* racine)
+{
+  struct raa_pair* paire;
+  int count = 0;
+
+  paire = racine->list_desc;
+  while (paire != NULL)
+  {
+    raa_calc_taxo_count(paire->value);
+    count += paire->value->count;
+    paire = paire->next;
+  }
+  racine->count += count;
+}
+
+
+int raa_loadtaxonomy(raa_db_access* raa_current_db, char* rootname,
+                     int (* progress_function)(int, void*), void* progress_arg,
+                     int (* need_interrupt_f)(void*), void* interrupt_arg)
 /* charge la taxo complete dans raa_current_db->sp_tree et rend 0 ssi OK */
 {
-int totspec, i, maxtid;
-raa_node **tab_noeud;
-struct raa_pair *pair, *pair2;
-char *reponse;
-int count, pourcent, prev_pourcent = 0;
-void *opaque;
-int interrupted;
-
-if(raa_current_db == NULL) return 1;
-if(raa_current_db->sp_tree != NULL) return 0;
-interrupted = FALSE;
-sock_fputs(raa_current_db, "zlibloadtaxonomy\n");
-sock_flush(raa_current_db);
-/* reply: 
-<start of compressed data using zlib >
-code=0&total=xx
-rank&pere&count&"...name..."&"...libel..."
-loadtaxonomy END.
-<end of compressed data, back to normal data >
-*/
-opaque = prepare_sock_gz_r( raa_current_db->raa_sockfdr );
-reponse = z_read_sock(opaque);
-if(reponse == NULL || strncmp(reponse, "code=0&total=", 13) != 0) {
-	return 1;
-	}
-totspec = atoi(reponse + 13);
-tab_noeud = (raa_node **)calloc(totspec + 1, sizeof(raa_node *));
-count = 0;
-while(TRUE) {
-	reponse = z_read_sock(opaque);
-	if(strcmp(reponse, "loadtaxonomy END.") == 0) {
-		if(interrupted && (tab_noeud != NULL) ) {
-			for(i = 2; i <= totspec; i++) {
-				if(tab_noeud[i] == NULL) continue;
-				if(tab_noeud[i]->name != NULL) free(tab_noeud[i]->name);
-				if(tab_noeud[i]->libel != NULL) free(tab_noeud[i]->libel);
-				if(tab_noeud[i]->libel_upcase != NULL) free(tab_noeud[i]->libel_upcase);
-				pair = tab_noeud[i]->list_desc; 
-				while(pair != NULL) {
-					pair2 = pair->next;
-					free(pair);
-					pair = pair2;
-					}
-				free(tab_noeud[i]);
-				}
-			free(tab_noeud);
-			tab_noeud = NULL;
-			/* just to consume ESC that may have arrived after loadtaxonomy END. */
-			sock_fputs(raa_current_db, "null_command\n");
-			read_sock(raa_current_db);
-			}
-		break;
-		}
-	if(tab_noeud != NULL) raa_decode_desc_arbre(reponse, tab_noeud);
-	pourcent = ((++count) * 100) / totspec; 
-	if(pourcent > prev_pourcent) {
-		prev_pourcent = pourcent;
-		if( progress_function != NULL && progress_function(pourcent, progress_arg) ) {
-			if( need_interrupt_f != NULL && (! interrupted) && need_interrupt_f(interrupt_arg) ) {
-				sock_fputs(raa_current_db, "\033" /* esc */);
-				sock_flush(raa_current_db);
-				interrupted = TRUE;
-				}
-			}
-		}
-	}
-close_sock_gz_r(opaque);
-if(tab_noeud != NULL) {
-	redresse_branches(tab_noeud[2]);
-	raa_calc_taxo_count(tab_noeud[2]);
-	free(tab_noeud[2]->name);
-	tab_noeud[2]->name = strdup(rootname);
-	maxtid = 0;
-	for(i = 2; i <= totspec; i++) if(tab_noeud[i] != NULL && tab_noeud[i]->tid > maxtid) maxtid = tab_noeud[i]->tid;
-	raa_current_db->tid_to_rank = (int *)calloc(maxtid + 1, sizeof(int));
-	if(raa_current_db->tid_to_rank != NULL) {
-		raa_current_db->max_tid = maxtid;
-		for(i = 2; i <= totspec; i++) {
-			if(tab_noeud[i] != NULL && tab_noeud[i]->tid != 0) raa_current_db->tid_to_rank[tab_noeud[i]->tid] = 
-				tab_noeud[i]->rank;
-			}
-		}
-	raa_current_db->sp_tree = tab_noeud;
-	}
-return (tab_noeud == NULL ? 1 : 0);
-}
-
-
-char *raa_get_taxon_info(raa_db_access *raa_current_db, char *name, int rank, int tid, int *p_rank, 
-	int *p_tid, int *p_parent, struct raa_pair **p_desc_list)
+  int totspec, i, maxtid;
+  raa_node** tab_noeud;
+  struct raa_pair* pair, * pair2;
+  char* reponse;
+  int count, pourcent, prev_pourcent = 0;
+  void* opaque;
+  int interrupted;
+
+  if (raa_current_db == NULL)
+    return 1;
+  if (raa_current_db->sp_tree != NULL)
+    return 0;
+  interrupted = FALSE;
+  sock_fputs(raa_current_db, "zlibloadtaxonomy\n");
+  sock_flush(raa_current_db);
+/* reply:
+   <start of compressed data using zlib >
+   code=0&total=xx
+   rank&pere&count&"...name..."&"...libel..."
+   loadtaxonomy END.
+   <end of compressed data, back to normal data >
+ */
+  opaque = prepare_sock_gz_r( raa_current_db->raa_sockfdr );
+  reponse = z_read_sock(opaque);
+  if (reponse == NULL || strncmp(reponse, "code=0&total=", 13) != 0)
+  {
+    return 1;
+  }
+  totspec = atoi(reponse + 13);
+  tab_noeud = (raa_node**)calloc(totspec + 1, sizeof(raa_node*));
+  count = 0;
+  while (TRUE)
+  {
+    reponse = z_read_sock(opaque);
+    if (strcmp(reponse, "loadtaxonomy END.") == 0)
+    {
+      if (interrupted && (tab_noeud != NULL) )
+      {
+        for (i = 2; i <= totspec; i++)
+        {
+          if (tab_noeud[i] == NULL)
+            continue;
+          if (tab_noeud[i]->name != NULL)
+            free(tab_noeud[i]->name);
+          if (tab_noeud[i]->libel != NULL)
+            free(tab_noeud[i]->libel);
+          if (tab_noeud[i]->libel_upcase != NULL)
+            free(tab_noeud[i]->libel_upcase);
+          pair = tab_noeud[i]->list_desc;
+          while (pair != NULL)
+          {
+            pair2 = pair->next;
+            free(pair);
+            pair = pair2;
+          }
+          free(tab_noeud[i]);
+        }
+        free(tab_noeud);
+        tab_noeud = NULL;
+        /* just to consume ESC that may have arrived after loadtaxonomy END. */
+        sock_fputs(raa_current_db, "null_command\n");
+        read_sock(raa_current_db);
+      }
+      break;
+    }
+    if (tab_noeud != NULL)
+      raa_decode_desc_arbre(reponse, tab_noeud);
+    pourcent = ((++count) * 100) / totspec;
+    if (pourcent > prev_pourcent)
+    {
+      prev_pourcent = pourcent;
+      if (progress_function != NULL && progress_function(pourcent, progress_arg) )
+      {
+        if (need_interrupt_f != NULL && (!interrupted) && need_interrupt_f(interrupt_arg) )
+        {
+          sock_fputs(raa_current_db, "\033" /* esc */);
+          sock_flush(raa_current_db);
+          interrupted = TRUE;
+        }
+      }
+    }
+  }
+  close_sock_gz_r(opaque);
+  if (tab_noeud != NULL)
+  {
+    redresse_branches(tab_noeud[2]);
+    raa_calc_taxo_count(tab_noeud[2]);
+    free(tab_noeud[2]->name);
+    tab_noeud[2]->name = strdup(rootname);
+    maxtid = 0;
+    for (i = 2; i <= totspec; i++)
+    {
+      if (tab_noeud[i] != NULL && tab_noeud[i]->tid > maxtid)
+        maxtid = tab_noeud[i]->tid;
+    }
+    raa_current_db->tid_to_rank = (int*)calloc(maxtid + 1, sizeof(int));
+    if (raa_current_db->tid_to_rank != NULL)
+    {
+      raa_current_db->max_tid = maxtid;
+      for (i = 2; i <= totspec; i++)
+      {
+        if (tab_noeud[i] != NULL && tab_noeud[i]->tid != 0)
+          raa_current_db->tid_to_rank[tab_noeud[i]->tid] =
+            tab_noeud[i]->rank;
+      }
+    }
+    raa_current_db->sp_tree = tab_noeud;
+  }
+  return tab_noeud == NULL ? 1 : 0;
+}
+
+
+char* raa_get_taxon_info(raa_db_access* raa_current_db, char* name, int rank, int tid, int* p_rank,
+                         int* p_tid, int* p_parent, struct raa_pair** p_desc_list)
 /*
-from a taxon identified by its name or, if name is NULL, by its rank or, if rank is 0, by its taxon ID (tid)
-computes :
-- if p_rank != NULL, the taxon rank in *p_rank 
-- if p_tid != NULL, the taxon ID in *p_tid 
-- if p_parent != NULL, the taxon's parent rank in *p_parent (2 indicates that taxon is at top level)
-- if p_desc_list != NULL, the start of the linked chain of taxon's descending taxa in *p_desc_list
-returns the taxon name, or NULL if any error
-*/
-{
-int totspec;
-
-if(raa_current_db == NULL) return NULL;
-if(raa_current_db->sp_tree == NULL) raa_loadtaxonomy(raa_current_db, "root", NULL, NULL, NULL, NULL);
-if(raa_current_db->sp_tree == NULL) return NULL;
-totspec = raa_read_first_rec(raa_current_db, raa_spec);
-if(name != NULL) {
-	name = strdup(name);
-	if(name == NULL) return NULL;
-	trim_key(name); majuscules(name);
-	for(rank = 3; rank <= totspec; rank++) {
-		if(raa_current_db->sp_tree[rank] != NULL && strcmp(name, raa_current_db->sp_tree[rank]->name) == 0) break;
-		}
-	free(name);
-	}
-if(name == NULL && rank == 0 && tid >= 1 && tid <= raa_current_db->max_tid) rank = raa_current_db->tid_to_rank[tid];
-if(rank > totspec || rank < 2 || raa_current_db->sp_tree[rank] == NULL) return NULL;
-if(rank != 2) {
-	while(raa_current_db->sp_tree[rank]->parent == NULL) {
-		rank = raa_current_db->sp_tree[rank]->syno->rank;
-		}
-	}
-if(p_rank != NULL) *p_rank = rank;
-if(p_tid != NULL) *p_tid = raa_current_db->sp_tree[rank]->tid;
-if(p_parent != NULL) *p_parent = ( raa_current_db->sp_tree[rank]->parent != NULL ? 
-										raa_current_db->sp_tree[rank]->parent->rank : 0);
-if(p_desc_list != NULL) *p_desc_list = raa_current_db->sp_tree[rank]->list_desc;
-return raa_current_db->sp_tree[rank]->name;
-}
-
-
-char *raa_getattributes_both(raa_db_access *raa_current_db, const char *id, int rank,
-	int *prank, int *plength, int *pframe, int *pgc, char **pacc, char **pdesc, char **pspecies, char **pseq)
+   from a taxon identified by its name or, if name is NULL, by its rank or, if rank is 0, by its taxon ID (tid)
+   computes :
+   - if p_rank != NULL, the taxon rank in *p_rank
+   - if p_tid != NULL, the taxon ID in *p_tid
+   - if p_parent != NULL, the taxon's parent rank in *p_parent (2 indicates that taxon is at top level)
+   - if p_desc_list != NULL, the start of the linked chain of taxon's descending taxa in *p_desc_list
+   returns the taxon name, or NULL if any error
+ */
+{
+  int totspec;
+
+  if (raa_current_db == NULL)
+    return NULL;
+  if (raa_current_db->sp_tree == NULL)
+    raa_loadtaxonomy(raa_current_db, "root", NULL, NULL, NULL, NULL);
+  if (raa_current_db->sp_tree == NULL)
+    return NULL;
+  totspec = raa_read_first_rec(raa_current_db, raa_spec);
+  if (name != NULL)
+  {
+    name = strdup(name);
+    if (name == NULL)
+      return NULL;
+    trim_key(name); majuscules(name);
+    for (rank = 3; rank <= totspec; rank++)
+    {
+      if (raa_current_db->sp_tree[rank] != NULL && strcmp(name, raa_current_db->sp_tree[rank]->name) == 0)
+        break;
+    }
+    free(name);
+  }
+  if (name == NULL && rank == 0 && tid >= 1 && tid <= raa_current_db->max_tid)
+    rank = raa_current_db->tid_to_rank[tid];
+  if (rank > totspec || rank < 2 || raa_current_db->sp_tree[rank] == NULL)
+    return NULL;
+  if (rank != 2)
+  {
+    while (raa_current_db->sp_tree[rank]->parent == NULL)
+    {
+      rank = raa_current_db->sp_tree[rank]->syno->rank;
+    }
+  }
+  if (p_rank != NULL)
+    *p_rank = rank;
+  if (p_tid != NULL)
+    *p_tid = raa_current_db->sp_tree[rank]->tid;
+  if (p_parent != NULL)
+    *p_parent = ( raa_current_db->sp_tree[rank]->parent != NULL ?
+                  raa_current_db->sp_tree[rank]->parent->rank : 0);
+  if (p_desc_list != NULL)
+    *p_desc_list = raa_current_db->sp_tree[rank]->list_desc;
+  return raa_current_db->sp_tree[rank]->name;
+}
+
+
+static char* raa_getattributes_both(raa_db_access* raa_current_db, const char* id, int rank,
+                                    int* prank, int* plength, int* pframe, int* pgc, char** pacc, char** pdesc, char** pspecies, char** pseq)
 /*
-for a sequence identified by name or acc. no. (id != NULL) or by rank
-returns rank, name, accession, length, frame, acnuc genetic code ID,
-one-line description, species, and full sequence.
-return value: NULL if not found or name (in private memory)
-pacc, pdesc, pspecies and pseq point to private memory upon return
-prank, plength, pframe, pgc, pacc, pdesc, pspecies, pseq can be NULL is no such information is needed
-*/
-{
-Reponse *rep;
-char *p, *reponse;
-int err;
-static char mnemo[WIDTH_MAX], species[WIDTH_MAX], access[WIDTH_MAX], descript[WIDTH_MAX];
-
-if(raa_current_db == NULL) return NULL;
-if(id != NULL) sock_printf(raa_current_db, "getattributes&id=%s&seq=%c\n", id, pseq == NULL ? 'F' : 'T');
-else sock_printf(raa_current_db, "getattributes&rank=%d&seq=%c\n", rank, pseq == NULL ? 'F' : 'T');
-reponse = read_sock(raa_current_db);
-if(reponse == NULL) {
-	return NULL;
-	}
-rep=initreponse();
-parse(reponse,rep);
-p=val(rep,"code");
-err = atoi(p);
-free(p);
-if(err == 0) {
-	if(prank != NULL) {
-		p=val(rep,"rank");
-		*prank = atoi(p);
-		free(p);
-		}
-	if(plength != NULL) {
-		p=val(rep,"length");
-		*plength = atoi(p);
-		free(p);
-		}
-	if(pframe != NULL) {
-		p=val(rep,"fr");
-		if(p != NULL) {
-			*pframe = atoi(p);
-			free(p);
-			}
-		else *pframe = 0;
-		}
-	if(pgc != NULL) {
-		p=val(rep,"gc");
-		if(p != NULL) {
-			*pgc = atoi(p);
-			free(p);
-			}
-		else *pgc = 0;
-		}
-	p = val(rep, "name");
-	strcpy(mnemo, p);
-	free(p);
-	if(pacc != NULL) {
-		p = val(rep, "acc");
-		strcpy(access, p);
-		free(p);
-		*pacc = access;
-		}
-	if(pspecies != NULL) {
-		p = val(rep, "spec");
-		strcpy(species, p);
-		free(p);
-		*pspecies = species;
-		p = species;
-		while(*(++p) != 0) *p = tolower(*p);
-		}
-	if(pdesc != NULL) {
-		p = val(rep, "descr");
-		strcpy(descript, p);
-		free(p);
-		*pdesc = descript;
-		}
-	if(pseq != NULL) {
-		*pseq = read_sock(raa_current_db); 
-		if(*pseq != NULL) {
-			*pseq += 4; /* seq=xxxx */
-			}
-		}
-	err = 0;
-	}
-clear_reponse(rep);
-return (err ? NULL : mnemo);
-}
-
-
-char *raa_getattributes(raa_db_access *raa_current_db, const char *id,
-						int *prank, int *plength, int *pframe, int *pgc, char **pacc, char **pdesc, char **pspecies, char **pseq)
-{
-	return raa_getattributes_both(raa_current_db, id, 0, prank, plength, pframe, pgc, pacc, pdesc, pspecies, pseq);
-}
-
-
-char *raa_seqrank_attributes(raa_db_access *raa_current_db, int rank,
-							 int *plength, int *pframe, int *pgc, char **pacc, char **pdesc, char **pspecies, char **pseq)
-{
-	return raa_getattributes_both(raa_current_db, NULL, rank, NULL, plength, pframe, pgc, pacc, pdesc, pspecies, pseq);
+   for a sequence identified by name or acc. no. (id != NULL) or by rank
+   returns rank, name, accession, length, frame, acnuc genetic code ID,
+   one-line description, species, and full sequence.
+   return value: NULL if not found or name (in private memory)
+   pacc, pdesc, pspecies and pseq point to private memory upon return
+   prank, plength, pframe, pgc, pacc, pdesc, pspecies, pseq can be NULL is no such information is needed
+ */
+{
+  Reponse* rep;
+  char* p, * reponse;
+  int err;
+
+  if (raa_current_db == NULL)
+    return NULL;
+  if (id != NULL)
+    sock_printf(raa_current_db, "getattributes&id=%s&seq=%c\n", id, pseq == NULL ? 'F' : 'T');
+  else
+    sock_printf(raa_current_db, "getattributes&rank=%d&seq=%c\n", rank, pseq == NULL ? 'F' : 'T');
+  reponse = read_sock(raa_current_db);
+  if (reponse == NULL)
+  {
+    return NULL;
+  }
+  rep = initreponse();
+  parse(reponse, rep);
+  p = val(rep, "code");
+  err = atoi(p);
+  free(p);
+  if (err == 0)
+  {
+    if (prank != NULL)
+    {
+      p = val(rep, "rank");
+      *prank = atoi(p);
+      free(p);
+    }
+    if (plength != NULL)
+    {
+      p = val(rep, "length");
+      *plength = atoi(p);
+      free(p);
+    }
+    if (pframe != NULL)
+    {
+      p = val(rep, "fr");
+      if (p != NULL)
+      {
+        *pframe = atoi(p);
+        free(p);
+      }
+      else
+        *pframe = 0;
+    }
+    if (pgc != NULL)
+    {
+      p = val(rep, "gc");
+      if (p != NULL)
+      {
+        *pgc = atoi(p);
+        free(p);
+      }
+      else
+        *pgc = 0;
+    }
+    p = val(rep, "name");
+    strcpy(raa_current_db->mnemo, p);
+    free(p);
+    if (pacc != NULL)
+    {
+      p = val(rep, "acc");
+      strcpy(raa_current_db->access, p);
+      free(p);
+      *pacc = raa_current_db->access;
+    }
+    if (pspecies != NULL)
+    {
+      p = val(rep, "spec");
+      strcpy(raa_current_db->species, p);
+      free(p);
+      *pspecies = raa_current_db->species;
+      p = raa_current_db->species;
+      while (*(++p) != 0)
+        *p = tolower(*p);
+    }
+    if (pdesc != NULL)
+    {
+      p = val(rep, "descr");
+      strcpy(raa_current_db->descript, p);
+      free(p);
+      *pdesc = raa_current_db->descript;
+    }
+    if (pseq != NULL)
+    {
+      *pseq = read_sock(raa_current_db);
+      if (*pseq != NULL)
+      {
+        *pseq += 4; /* seq=xxxx */
+      }
+    }
+    err = 0;
+  }
+  clear_reponse(rep);
+  return err ? NULL : raa_current_db->mnemo;
 }
 
 
+char* raa_getattributes(raa_db_access* raa_current_db, const char* id,
+                        int* prank, int* plength, int* pframe, int* pgc, char** pacc, char** pdesc, char** pspecies, char** pseq)
+{
+  return raa_getattributes_both(raa_current_db, id, 0, prank, plength, pframe, pgc, pacc, pdesc, pspecies, pseq);
+}
+
 
+char* raa_seqrank_attributes(raa_db_access* raa_current_db, int rank,
+                             int* plength, int* pframe, int* pgc, char** pacc, char** pdesc, char** pspecies, char** pseq)
+{
+  return raa_getattributes_both(raa_current_db, NULL, rank, NULL, plength, pframe, pgc, pacc, pdesc, pspecies, pseq);
+}
diff --git a/src/Bpp/Raa/RAA_acnuc.h b/src/Bpp/Raa/RAA_acnuc.h
index 30efaa6..c59d773 100644
--- a/src/Bpp/Raa/RAA_acnuc.h
+++ b/src/Bpp/Raa/RAA_acnuc.h
@@ -7,7 +7,6 @@
 #include <ctype.h>
 #if defined(WIN32)
 #define SOCKBUFS 8192
-#include <winsock2.h>
 #endif
 #ifdef __alpha
 typedef long raa_long;
@@ -25,209 +24,247 @@ typedef long long raa_long;
 #define ERREUR 1
 #endif
 
-struct rlng {         /* LONGL series of linked records containing lists of SUBSEQ ranks */
-	int next; /* to LONGL for next element of the long list, or 0 when list is finished */
-	int sub[1]; /* array (length given by global SUBINLNG) of ranks of SUBSEQ records or of 0s */
-	};
+struct rlng       /* LONGL series of linked records containing lists of SUBSEQ ranks */
+{int next; /* to LONGL for next element of the long list, or 0 when list is finished */
+ int sub[1]; /* array (length given by global SUBINLNG) of ranks of SUBSEQ records or of 0s */
+};
 
 #define RAA_GFRAG_BSIZE 10000
-struct gfrag_aux {
-	char buffer[RAA_GFRAG_BSIZE + 1];
-	int lbuf, nseq_buf, first_buf, l_nseq_buf;
-	};
+struct gfrag_aux
+{
+  char buffer[RAA_GFRAG_BSIZE + 1];
+  int lbuf, nseq_buf, first_buf, l_nseq_buf;
+};
 
-struct readsub_aux {
-	char *name;
-	int lname, previous, length, type, toext, lkey, locus, frame, gencode, div;
-	raa_long addr;
-	};
+struct readsub_aux
+{
+  char* name;
+  int lname, previous, length, type, toext, lkey, locus, frame, gencode, div;
+  raa_long addr;
+};
 
 #define ANNOTCOUNT 40
-struct annot_aux {
-	 char *annotline[ANNOTCOUNT + 1];
-	 int annotcurrent, annotcount, annotdiv;
-	 raa_long annotaddr, annotaddrfirst, annotaddrlast;
-	 char annotsbuffer[ 300 ];
-	 };
-
-struct readsp_kw_aux {
-	char name[150], libel[200];
-	int lsub, desc, syno, host, previous;
-	};
+struct annot_aux
+{
+  char* annotline[ANNOTCOUNT + 1];
+  int annotcurrent, annotcount, annotdiv;
+  raa_long annotaddr, annotaddrfirst, annotaddrlast;
+  char annotsbuffer[ 300 ];
+};
+
+struct readsp_kw_aux
+{
+  char name[150], libel[200];
+  int lsub, desc, syno, host, previous;
+};
 
 #define BLOCK_ELTS_IN_LIST 500
-struct nextelt_aux {
-	 int current_rank, previous, total;
-	 int tabnum[BLOCK_ELTS_IN_LIST];
-	 char *tabname[BLOCK_ELTS_IN_LIST];
-	 int tablength[BLOCK_ELTS_IN_LIST];
-	 raa_long taboffset[BLOCK_ELTS_IN_LIST];
-	 int tabdiv[BLOCK_ELTS_IN_LIST];
-	 };
-	
+struct nextelt_aux
+{
+  int current_rank, previous, total;
+  int tabnum[BLOCK_ELTS_IN_LIST];
+  char* tabname[BLOCK_ELTS_IN_LIST];
+  int tablength[BLOCK_ELTS_IN_LIST];
+  raa_long taboffset[BLOCK_ELTS_IN_LIST];
+  int tabdiv[BLOCK_ELTS_IN_LIST];
+};
+
 #define S_BUF_SHRT 5000 /* number of memorized SHORTL records */
-struct readshrt_aux {
-	 unsigned shrt_buffer[S_BUF_SHRT][3]; /* [0]=SHORTL_rank [1]=val [2]=next */
-	 int shrt_max, shrt_begin, total;
-	};
-
-struct readsmj_aux {
-	 int lastrec;
-	 char **names, **libels;
-	 unsigned *plongs;
-	};
-
-typedef struct raa_node {
-	char *name;
-	char *libel;
-	char *libel_upcase;
-	int rank;
-	int tid;
-	int count;
-	struct raa_node *parent;
-	struct raa_pair *list_desc;
-	struct raa_node *syno;
-	} raa_node;
-struct raa_pair {
-	raa_node *value;
-	struct raa_pair *next;
-	};
-
-typedef struct _raa_db_access {
-	char *dbname;
-	FILE *raa_sockfdr, *raa_sockfdw;
-	int genbank, embl, swissprot, nbrf;
-	int nseq, longa, maxa;
-	int L_MNEMO, WIDTH_SP, WIDTH_KW, WIDTH_SMJ, WIDTH_AUT, WIDTH_BIB, ACC_LENGTH, SUBINLNG, lrtxt;
-	raa_node **sp_tree; /* NULL or the full taxonomy tree */
-	int max_tid; /* largest correct taxon ID value */
-	int *tid_to_rank; /* NULL or tid-to-rank table */
-	struct rlng *rlng_buffer;
-	struct gfrag_aux gfrag_data;
-	struct readsub_aux readsub_data;
-	int first_recs[20];
-	struct annot_aux annot_data;
-	struct readsp_kw_aux readspec_data, readkey_data;
-	struct nextelt_aux nextelt_data;
-	struct readshrt_aux readshrt_data;
-	struct readsmj_aux readsmj_data;
-	void *matchkey_data;
-	/* mostly for raa_query/raa_query_win usage */
-	int tot_key_annots;
-	char **key_annots, **key_annots_min;
-	unsigned char *want_key_annots;
+struct readshrt_aux
+{
+  unsigned shrt_buffer[S_BUF_SHRT][3]; /* [0]=SHORTL_rank [1]=val [2]=next */
+  int shrt_max, shrt_begin, total;
+};
+
+typedef struct shrt2_list
+{
+  int length;
+  int size;
+  unsigned point;
+  unsigned next;
+  unsigned vals[1];
+} shrt2_list;
+
+struct readsmj_aux
+{
+  int lastrec;
+  char** names, ** libels;
+  unsigned* plongs;
+};
+
+typedef struct raa_node
+{
+  char* name;
+  char* libel;
+  char* libel_upcase;
+  int rank;
+  int tid;
+  int count;
+  struct raa_node* parent;
+  struct raa_pair* list_desc;
+  struct raa_node* syno;
+} raa_node;
+struct raa_pair
+{
+  raa_node* value;
+  struct raa_pair* next;
+};
+
+#define WIDTH_MAX 150
+
+typedef enum { raa_sub_of_bib = 0, raa_spec_of_loc, raa_bib_of_loc, raa_aut_of_bib, raa_bib_of_aut,
+               raa_sub_of_acc, raa_key_of_sub, raa_acc_of_loc } raa_shortl2_kind;
+
+typedef struct _raa_db_access
+{
+  char* dbname;
+  FILE* raa_sockfdr, * raa_sockfdw;
+  int genbank, embl, swissprot, nbrf;
+  int nseq, longa, maxa;
+  int L_MNEMO, WIDTH_SP, WIDTH_KW, WIDTH_SMJ, WIDTH_AUT, WIDTH_BIB, ACC_LENGTH, SUBINLNG, lrtxt, VALINSHRT2;
+  raa_node** sp_tree; /* NULL or the full taxonomy tree */
+  int max_tid; /* largest correct taxon ID value */
+  int* tid_to_rank; /* NULL or tid-to-rank table */
+  struct rlng* rlng_buffer;
+  struct gfrag_aux gfrag_data;
+  struct readsub_aux readsub_data;
+  int first_recs[20];
+  struct annot_aux annot_data;
+  struct readsp_kw_aux readspec_data, readkey_data;
+  struct nextelt_aux nextelt_data;
+  struct readshrt_aux readshrt_data;
+  struct shrt2_list* readshrt2_data[raa_acc_of_loc + 1];
+  struct readsmj_aux readsmj_data;
+  void* matchkey_data;
+  /* mostly for raa_query/raa_query_win usage */
+  int tot_key_annots;
+  char** key_annots, ** key_annots_min;
+  unsigned char* want_key_annots;
 #ifdef WIN32
-	char sock_input[SOCKBUFS]; /* WIN32 socket input buffer */
-	char *sock_input_pos, *sock_input_end;
-	char sock_output[SOCKBUFS]; /* WIN32 socket output buffer */
-	DWORD sock_output_lbuf;
+  char sock_input[SOCKBUFS]; /* WIN32 socket input buffer */
+  char* sock_input_pos, * sock_input_end;
+  char sock_output[SOCKBUFS]; /* WIN32 socket output buffer */
+  unsigned sock_output_lbuf;
 #endif
-	} raa_db_access;
+  char buffer[5000];
+  char remote_file[300];
+  char* full_line;
+  int max_full_line;
+  int was_here;
+  char* namestr;
+  char residuecount[30];
+  char* help;
+  int lhelp;
+  int tmp_total;
+  int tmp_current;
+  int* tmp_prelist;
+  char* translate_buffer;
+  int num_5_partial;
+  char mnemo[WIDTH_MAX];
+  char species[WIDTH_MAX];
+  char access[WIDTH_MAX];
+  char descript[WIDTH_MAX];
+  char date[12];
+} raa_db_access;
 
-#define WIDTH_MAX 150
 
 typedef enum { raa_sub = 0, raa_loc, raa_key, raa_spec, raa_shrt, raa_lng, raa_ext, raa_smj,
-	raa_aut, raa_bib, raa_txt, raa_acc } raa_file;
-typedef void (*raa_char_void_function)(raa_db_access *, char *);
-struct chain_void {
-	void *data;
-	struct chain_void *next;
-	};
+               raa_aut, raa_bib, raa_txt, raa_acc } raa_file;
+typedef void (*raa_char_void_function)(raa_db_access*, char*);
 
 /* global variables */
-extern raa_char_void_function raa_error_mess_proc;/*this function sd call raa_acnucclose*/
-
-
-extern int raa_acnucopen (char *clientid, raa_db_access **psock) ;
-extern int raa_decode_address(char *url, char **p_ip_name, int *socket, char **p_remote_db);
-extern int raa_acnucopen_alt (char *serveurName, int port, char *db_name, char *clientid, raa_db_access **psock);
-extern int raa_open_socket(char *serveurName, int port, char *clientid, raa_db_access **psock);
-extern int raa_opendb(raa_db_access *raa_current_db, char *db_name);
-int raa_opendb_pw(raa_db_access  *raa_current_db, char *db_name, void *ptr, char *(*getpasswordf)(void *) );
-extern int raa_gfrag(raa_db_access  *raa_current_db, int nsub, int first, int lfrag, char *dseq) ;
-extern void raa_acnucclose(raa_db_access  *raa_current_db) ;
-extern int raa_prep_acnuc_query(raa_db_access  *raa_current_db) ; 
-extern int raa_proc_query(raa_db_access  *raa_current_db, char *query, char **message, char *nomliste, int *numlist, 
-	int *count, int *locus, int *type) ;
-int raa_nexteltinlist(raa_db_access  *raa_current_db, int first, int lrank, char **pname, int *plength) ;
-int raa_nexteltinlist_annots(raa_db_access  *raa_current_db, int first, int lrank, char **pname, int *plength, 
-	raa_long *paddr, int *pdiv);
-raa_long scan_raa_long(char *txt);
-int raa_seq_to_annots(raa_db_access  *raa_current_db, int numseq, raa_long *faddr, int *div);
-char *print_raa_long(raa_long val);
-char *raa_read_annots(raa_db_access  *raa_current_db, raa_long faddr, int div);
-char *raa_next_annots(raa_db_access  *raa_current_db, raa_long *faddr);
-char *raa_translate_cds(raa_db_access  *raa_current_db, int seqnum);
-char raa_translate_init_codon(raa_db_access  *raa_current_db, int numseq);
-int raa_iknum(raa_db_access  *raa_current_db, char *name, raa_file cas);
-int raa_isenum(raa_db_access  *raa_current_db, char *name);
-int raa_bcount(raa_db_access  *raa_current_db, int lrank);
-void raa_bit1(raa_db_access  *raa_current_db, int lrank, int num);
-void raa_bit0(raa_db_access  *raa_current_db, int lrank, int num);
-int raa_btest(raa_db_access  *raa_current_db, int lrank, int num);
-void raa_copylist(raa_db_access  *raa_current_db, int from, int to);
-void raa_zerolist(raa_db_access  *raa_current_db, int rank);
-void raa_setliststate(raa_db_access  *raa_current_db, int lrank, int locus, int type);
-char *raa_getliststate(raa_db_access  *raa_current_db, int lrank, int *locus, int *type, int *count);
-char *raa_residuecount(raa_db_access  *raa_current_db, int lrank);
-int raa_getemptylist(raa_db_access  *raa_current_db, char *name);
-int raa_setlistname(raa_db_access  *raa_current_db, int lrank, char *name);
-int raa_getlistrank(raa_db_access  *raa_current_db, char *name);
-int raa_releaselist(raa_db_access  *raa_current_db, int lrank);
-int raa_countfilles(raa_db_access  *raa_current_db, int lrank);
-int raa_alllistranks(raa_db_access  *raa_current_db, int **pranks);
-int raa_fcode(raa_db_access  *raa_current_db, raa_file cas, char *name);
-int raa_read_first_rec(raa_db_access  *raa_current_db, raa_file cas);
-char *raa_readsub(raa_db_access  *raa_current_db, int num, int *plength, int *ptype, int *pext, int *plkey, int *plocus, 
-	int *pframe, int *pgencode);
-char *raa_readsub_pannots(raa_db_access  *raa_current_db, int num, int *plength, int *ptype, int *pext, int *plkey, int *plocus, 
-	int *pframe, int *pgencode, raa_long *paddr, int *pdiv);
-char *raa_readloc(raa_db_access  *raa_current_db, int num, int *sub, int *pnuc, int *spec, int *host, int *plref, 
-	int *molec, int *placc, int *org);
-char *raa_readspec(raa_db_access  *raa_current_db, int num, char **plibel, int *plsub, int *desc, int *syno, int *plhost);
-char *raa_readkey(raa_db_access  *raa_current_db, int num, char **plibel, int *plsub, int *desc, int *syno);
-char *raa_readsmj(raa_db_access  *raa_current_db, int num, char **plibel, int *plong);
-char *raa_readacc(raa_db_access  *raa_current_db, int num, int *plsub);
-int raa_readext(raa_db_access  *raa_current_db, int num, int *mere, int *deb, int *fin);
-int raa_readlng(raa_db_access  *raa_current_db, int num);
-unsigned raa_readshrt(raa_db_access  *raa_current_db, unsigned point, int *val);
-char *raa_ghelp(raa_db_access  *raa_current_db, char *fname, char *topic);
-int raa_nextmatchkey(raa_db_access  *raa_current_db, int num, char *pattern, char **matching);
-int raa_savelist(raa_db_access  *raa_current_db, int lrank, FILE *out, int use_acc, char *prefix);
-int raa_modifylist(raa_db_access  *raa_current_db, int lrank, char *type /* "length" or "date" */, char *operation /* ">2000" */, 
-	int *pnewlrank, int (*check_interrupt)(void) , int *p_processed);
-int raa_knowndbs(raa_db_access  *raa_current_db, char ***pnames, char ***pdescriptions);
-char *raa_short_descr(raa_db_access  *raa_current_db, int seqnum, char *text, int maxlen, raa_long pinf, int div, char *name);
-struct chain_void *raa_get_list_open_dbs(void);
-void *raa_prep_extract(raa_db_access *raa_current_db, char *format, FILE *outstream, char *choix,
-	 char *feature_name, char *bornes, char *min_bornes, char **message, int lrank);
-int raa_extract_1_seq(void *opaque);
-int raa_extract_interrupt(raa_db_access *raa_current_db, void *opaque);
-void *raa_prep_coordinates(raa_db_access  *raa_current_db, int lrank, int seqnum, 
-	char *operation, /* "simple","fragment","feature","region" */
-	char *feature_name, char *bounds, char *min_bounds);
-int *raa_1_coordinate_set(void *);
-int raa_loadtaxonomy(raa_db_access *raa_current_db, char *rootname, 
-	int (*progress_function)(int, void *), void *progress_arg, 
-	int (*need_interrupt_f)(void *), void *interrupt_arg);
-char *raa_get_taxon_info(raa_db_access *raa_current_db, char *name, int rank, int tid, int *p_rank, 
-	int *p_tid, int *p_parent, struct raa_pair **p_desc_list);
-char *raa_getattributes(raa_db_access *raa_current_db, const char *id,
-	int *prank, int *plength, int *pframe, int *pgc, char **pacc, char **pdesc, char **pspecies, char **pseq);
-char *raa_seqrank_attributes(raa_db_access *raa_current_db, int rank,
-	int *plength, int *pframe, int *pgc, char **pacc, char **pdesc, char **pspecies, char **pseq);
-
-int sock_fputs(raa_db_access  *raa_current_db, char *line);
-int sock_flush(raa_db_access  *raa_current_db);
-char *read_sock(raa_db_access  *raa_current_db);
-
-
-int trim_key(char *name); /* remove trailing spaces */
-void majuscules(char *name);
-int atoi_u(const char *p);
-char *protect_quotes(char *name); /* replace " by \" returns in static memory */
-void compact(char *chaine);
-int strcmptrail(char *s1, int l1, char *s2, int l2);
-
-
-#endif  /* RAA_ACNUC_H  */
+extern raa_char_void_function raa_error_mess_proc; /*this function sd call raa_acnucclose*/
+
+
+extern int raa_acnucopen (const char* clientid, raa_db_access** psock);
+extern int raa_decode_address(char* url, char** p_ip_name, int* socket, char** p_remote_db);
+extern int raa_acnucopen_alt (const char* serveurName, int port, const char* db_name, const char* clientid, raa_db_access** psock);
+extern int raa_open_socket(const char* serveurName, int port, const char* clientid, raa_db_access** psock);
+extern int raa_opendb(raa_db_access* raa_current_db, const char* db_name);
+int raa_opendb_pw(raa_db_access* raa_current_db, const char* db_name, void* ptr, char*(*getpasswordf)(void*) );
+extern int raa_gfrag(raa_db_access* raa_current_db, int nsub, int first, int lfrag, char* dseq);
+extern void raa_acnucclose(raa_db_access* raa_current_db);
+extern int raa_prep_acnuc_query(raa_db_access* raa_current_db);
+extern int raa_proc_query(raa_db_access* raa_current_db, char* query, char** message, char* nomliste, int* numlist,
+                          int* count, int* locus, int* type);
+int raa_nexteltinlist(raa_db_access* raa_current_db, int first, int lrank, char** pname, int* plength);
+int raa_nexteltinlist_annots(raa_db_access* raa_current_db, int first, int lrank, char** pname, int* plength,
+                             raa_long* paddr, int* pdiv);
+raa_long scan_raa_long(char* txt);
+int raa_seq_to_annots(raa_db_access* raa_current_db, int numseq, raa_long* faddr, int* div);
+char* print_raa_long(raa_long val, char* buffer);
+char* raa_read_annots(raa_db_access* raa_current_db, raa_long faddr, int div);
+char* raa_next_annots(raa_db_access* raa_current_db, raa_long* faddr);
+char* raa_translate_cds(raa_db_access* raa_current_db, int seqnum);
+char raa_translate_init_codon(raa_db_access* raa_current_db, int numseq);
+int raa_iknum(raa_db_access* raa_current_db, char* name, raa_file cas);
+int raa_isenum(raa_db_access* raa_current_db, char* name);
+int raa_bcount(raa_db_access* raa_current_db, int lrank);
+void raa_bit1(raa_db_access* raa_current_db, int lrank, int num);
+void raa_bit0(raa_db_access* raa_current_db, int lrank, int num);
+int raa_btest(raa_db_access* raa_current_db, int lrank, int num);
+void raa_copylist(raa_db_access* raa_current_db, int from, int to);
+void raa_zerolist(raa_db_access* raa_current_db, int rank);
+void raa_setliststate(raa_db_access* raa_current_db, int lrank, int locus, int type);
+char* raa_getliststate(raa_db_access* raa_current_db, int lrank, int* locus, int* type, int* count);
+char* raa_residuecount(raa_db_access* raa_current_db, int lrank);
+int raa_getemptylist(raa_db_access* raa_current_db, char* name);
+int raa_setlistname(raa_db_access* raa_current_db, int lrank, char* name);
+int raa_getlistrank(raa_db_access* raa_current_db, char* name);
+int raa_releaselist(raa_db_access* raa_current_db, int lrank);
+int raa_countfilles(raa_db_access* raa_current_db, int lrank);
+int raa_alllistranks(raa_db_access* raa_current_db, int** pranks);
+int raa_fcode(raa_db_access* raa_current_db, raa_file cas, char* name);
+int raa_read_first_rec(raa_db_access* raa_current_db, raa_file cas);
+char* raa_readsub(raa_db_access* raa_current_db, int num, int* plength, int* ptype, int* pext, int* plkey, int* plocus,
+                  int* pframe, int* pgencode);
+char* raa_readsub_pannots(raa_db_access* raa_current_db, int num, int* plength, int* ptype, int* pext, int* plkey, int* plocus,
+                          int* pframe, int* pgencode, raa_long* paddr, int* pdiv);
+char* raa_readloc(raa_db_access* raa_current_db, int num, int* sub, int* pnuc, int* spec, int* host, int* plref,
+                  int* molec, int* placc, int* org);
+char* raa_readspec(raa_db_access* raa_current_db, int num, char** plibel, int* plsub, int* desc, int* syno, int* plhost);
+char* raa_readkey(raa_db_access* raa_current_db, int num, char** plibel, int* plsub, int* desc, int* syno);
+char* raa_readsmj(raa_db_access* raa_current_db, int num, char** plibel, int* plong);
+char* raa_readacc(raa_db_access* raa_current_db, int num, int* plsub);
+int raa_readext(raa_db_access* raa_current_db, int num, int* mere, int* deb, int* fin);
+int raa_readlng(raa_db_access* raa_current_db, int num);
+unsigned raa_readshrt(raa_db_access* raa_current_db, unsigned point, int* val);
+unsigned raa_followshrt2(raa_db_access* raa_current_db, int* p_point, int* p_rank, raa_shortl2_kind kind);
+char* raa_ghelp(raa_db_access* raa_current_db, char* fname, char* topic);
+int raa_nextmatchkey(raa_db_access* raa_current_db, int num, char* pattern, char** matching);
+int raa_savelist(raa_db_access* raa_current_db, int lrank, FILE* out, int use_acc, char* prefix);
+int raa_modifylist(raa_db_access* raa_current_db, int lrank, char* type /* "length" or "date" */, char* operation /* ">2000" */,
+                   int* pnewlrank, int (* check_interrupt)(void), int* p_processed);
+int raa_knowndbs(raa_db_access* raa_current_db, char*** pnames, char*** pdescriptions);
+char* raa_short_descr(raa_db_access* raa_current_db, int seqnum, char* text, int maxlen, raa_long pinf, int div, char* name);
+void* raa_prep_extract(raa_db_access* raa_current_db, char* format, FILE* outstream, char* choix,
+                       char* feature_name, char* bornes, char* min_bornes, char** message, int lrank);
+int raa_extract_1_seq(void* opaque);
+int raa_extract_interrupt(raa_db_access* raa_current_db, void* opaque);
+void* raa_prep_coordinates(raa_db_access* raa_current_db, int lrank, int seqnum,
+                           char* operation, /* "simple","fragment","feature","region" */
+                           char* feature_name, char* bounds, char* min_bounds);
+int* raa_1_coordinate_set(void*);
+int raa_loadtaxonomy(raa_db_access* raa_current_db, char* rootname,
+                     int (* progress_function)(int, void*), void* progress_arg,
+                     int (* need_interrupt_f)(void*), void* interrupt_arg);
+char* raa_get_taxon_info(raa_db_access* raa_current_db, char* name, int rank, int tid, int* p_rank,
+                         int* p_tid, int* p_parent, struct raa_pair** p_desc_list);
+char* raa_getattributes(raa_db_access* raa_current_db, const char* id,
+                        int* prank, int* plength, int* pframe, int* pgc, char** pacc, char** pdesc, char** pspecies, char** pseq);
+char* raa_seqrank_attributes(raa_db_access* raa_current_db, int rank,
+                             int* plength, int* pframe, int* pgc, char** pacc, char** pdesc, char** pspecies, char** pseq);
+
+int sock_fputs(raa_db_access* raa_current_db, const char* line);
+int sock_flush(raa_db_access* raa_current_db);
+char* read_sock(raa_db_access* raa_current_db);
+
+
+int trim_key(char* name); /* remove trailing spaces */
+void majuscules(char* name);
+int atoi_u(const char* p);
+void compact(char* chaine);
+int strcmptrail(char* s1, int l1, char* s2, int l2);
+
+
+#endif/* RAA_ACNUC_H  */
diff --git a/src/Bpp/Raa/RaaList.cpp b/src/Bpp/Raa/RaaList.cpp
index 4b4658f..a77635f 100644
--- a/src/Bpp/Raa/RaaList.cpp
+++ b/src/Bpp/Raa/RaaList.cpp
@@ -1,4 +1,3 @@
-
 #include "RAA.h"
 
 using namespace std;
@@ -6,14 +5,14 @@ using namespace bpp;
 
 RaaList::RaaList()
 {
-	myraa = NULL;
-	from = 1;
+  myraa = NULL;
+  from = 1;
 }
 
 
 int RaaList::getCount(void)
 {
-	return raa_bcount(myraa->raa_data, rank);
+  return raa_bcount(myraa->raa_data, rank);
 }
 
 const string RaaList::LIST_SEQUENCES = "sequence list";
@@ -23,97 +22,103 @@ const string RaaList::LIST_SPECIES = "species list";
 
 int RaaList::firstElement()
 {
-	from = 1;
-	return nextElement();
+  from = 1;
+  return nextElement();
 }
 
 
 int RaaList::nextElement()
 {
-	char *sname;
-	int seqrank = raa_nexteltinlist(myraa->raa_data, from, rank, &sname, &elementlength);
-	if(seqrank) {
-		elementname = sname;
-		from = seqrank;
-	}
-	return seqrank;
+  char* sname;
+  int seqrank = raa_nexteltinlist(myraa->raa_data, from, rank, &sname, &elementlength);
+  if (seqrank)
+  {
+    elementname = sname;
+    from = seqrank;
+  }
+  return seqrank;
 }
 
 
 void RaaList::setFrom(int element_rank)
 {
-	from = element_rank;
+  from = element_rank;
 }
 
 
 string RaaList::residueCount()
 {
-	char *count = raa_residuecount(myraa->raa_data, rank);
-	string retval(count);
-	return retval;
+  char* count = raa_residuecount(myraa->raa_data, rank);
+  string retval(count);
+  return retval;
 }
 
 
 void RaaList::addElement(int elt_rank)
 {
-	raa_bit1(myraa->raa_data, rank, elt_rank);
+  raa_bit1(myraa->raa_data, rank, elt_rank);
 }
 
 
 bool RaaList::parentsOnly(void)
 {
-	if(*type == RaaList::LIST_SEQUENCES) return true;
-	int isloc;
-	raa_getliststate(myraa->raa_data, rank, &isloc, NULL, NULL); 
-	return (bool)isloc;
+  if (*type == RaaList::LIST_SEQUENCES)
+    return true;
+  int isloc;
+  raa_getliststate(myraa->raa_data, rank, &isloc, NULL, NULL);
+  return (bool)isloc;
 }
 
 
 void RaaList::removeElement(int elt_rank)
 {
-	raa_bit0(myraa->raa_data, rank, elt_rank);
+  raa_bit0(myraa->raa_data, rank, elt_rank);
 }
 
 
 void RaaList::zeroList(void)
 {
-	raa_zerolist(myraa->raa_data, rank);
+  raa_zerolist(myraa->raa_data, rank);
 }
 
 
 bool RaaList::isInList(int elt_rank)
 {
-	return (bool)raa_btest(myraa->raa_data, rank, elt_rank);
+  return (bool)raa_btest(myraa->raa_data, rank, elt_rank);
 }
 
 
-RaaList *RaaList::modifyByLength(const string &criterion, const string &listname)
+RaaList* RaaList::modifyByLength(const string& criterion, const string& listname)
 {
-	int err, newlistrank;
-	if(getType() != RaaList::LIST_SEQUENCES) return NULL;
-	err = raa_modifylist(myraa->raa_data, rank, (char *)"length", (char *)criterion.c_str(), &newlistrank, NULL, NULL); 
-	if(err) return NULL;
-	raa_setlistname(myraa->raa_data, newlistrank, (char *)listname.c_str());
-	RaaList *list = new RaaList();
-	list->rank = newlistrank;
-	list->myraa = myraa;
-	list->name = listname;
-	list->type = &RaaList::LIST_SEQUENCES;
-	return list;
+  int err, newlistrank;
+  if (getType() != RaaList::LIST_SEQUENCES)
+    return NULL;
+  err = raa_modifylist(myraa->raa_data, rank, (char*)"length", (char*)criterion.c_str(), &newlistrank, NULL, NULL);
+  if (err)
+    return NULL;
+  raa_setlistname(myraa->raa_data, newlistrank, (char*)listname.c_str());
+  RaaList* list = new RaaList();
+  list->rank = newlistrank;
+  list->myraa = myraa;
+  list->name = listname;
+  list->type = &RaaList::LIST_SEQUENCES;
+  return list;
 }
 
 
-RaaList *RaaList::modifyByDate(const string &criterion, const string &listname)
+RaaList* RaaList::modifyByDate(const string& criterion, const string& listname)
 {
-	int err, newlistrank;
-	if(getType() != RaaList::LIST_SEQUENCES) return NULL;
-	err = raa_modifylist(myraa->raa_data, rank, (char *)"date", (char *)criterion.c_str(), &newlistrank, NULL, NULL); 
-	if(err) return NULL;
-	raa_setlistname(myraa->raa_data, newlistrank, (char *)listname.c_str());
-	RaaList *list = new RaaList();
-	list->rank = newlistrank;
-	list->myraa = myraa;
-	list->name = listname;
-	list->type = &RaaList::LIST_SEQUENCES;
-	return list;
+  int err, newlistrank;
+  if (getType() != RaaList::LIST_SEQUENCES)
+    return NULL;
+  err = raa_modifylist(myraa->raa_data, rank, (char*)"date", (char*)criterion.c_str(), &newlistrank, NULL, NULL);
+  if (err)
+    return NULL;
+  raa_setlistname(myraa->raa_data, newlistrank, (char*)listname.c_str());
+  RaaList* list = new RaaList();
+  list->rank = newlistrank;
+  list->myraa = myraa;
+  list->name = listname;
+  list->type = &RaaList::LIST_SEQUENCES;
+  return list;
 }
diff --git a/src/Bpp/Raa/RaaList.h b/src/Bpp/Raa/RaaList.h
index 950a7ba..1611e74 100644
--- a/src/Bpp/Raa/RaaList.h
+++ b/src/Bpp/Raa/RaaList.h
@@ -2,8 +2,8 @@
 #define _RAALIST_H_
 #include <string>
 
-namespace bpp {
-
+namespace bpp
+{
 class RAA;
 
 /**
@@ -13,140 +13,140 @@ class RAA;
  * one or several elements that are often sequences, but can also be species or keywords.
  * Iteration through all elements of the list is possible.
  */
-class RaaList {
-	friend class RAA;
-	RAA *myraa;
-	int rank;
-	std::string name;
-	const std::string *type;
-	int from;
-	std::string elementname;
-	int elementlength;
+class RaaList
+{
+  friend class RAA;
+  RAA* myraa;
+  int rank;
+  std::string name;
+  const std::string* type;
+  int from;
+  std::string elementname;
+  int elementlength;
+
 public:
-	
-	/**
-	 * @brief Refers to a sequence list.
-	 */
-	static const std::string LIST_SEQUENCES;
-	
-	/**
-	 * @brief Refers to a keyword list.
-	 */
-	static const std::string LIST_KEYWORDS;
-	
-	/**
-	 * @brief Refers to a species list.
-	 */
-	static const std::string LIST_SPECIES;
-	
-	/**
-	 * @brief Gives the number of elements (often sequences) in the list.
-	 */
-	int getCount();
-	
-	/**
-	 * @brief   Gives the database rank of the first element of the list.
-	 */
-	int firstElement();
-	
-	/**
-	 * @brief   Gives the database rank of the list element following the last considered element.
-	 */
-	int nextElement();
-	
-	/**
-	 * @brief   Sets an element of the list from which nextElement() will start.
-	 *
-	 * @param  element_rank   The database rank of an element of the list, typically returned by 
-	 * a previous nextElement() call.
-	 */
-	void setFrom(int element_rank);
-	
-	/**
-	 * @brief   Gives the name of the last considered list element.
-	 */
-	std::string elementName() {return elementname; };
-	
-	/**
-	 * @brief   Gives the length of the last considered list element (meaningful only for sequence lists).
-	 */
-	int elementLength() {return elementlength; };
-	
-	/**
-	 * @brief   Returns the total # of residues in all sequences of list (meaningful only for sequence lists).
-	 *
-	 * Because this count can exceed a long integer, it is returned as a string.
-	 */
-	std::string residueCount();
-	
-	/**
-	 * @brief   Adds an element identified by its database rank to the list.
-	 */
-	void addElement(int rank);
-	
-	/**
-	 * @brief   Removes an element identified by its database rank from the list.
-	 */
-	void removeElement(int rank);
-	
-	/**
-	 * @brief   Tests whether an element identified by its database rank belongs to the list.
-	 */
-	bool isInList(int rank);
-	
-	/**
-	 * @brief   Removes all elements from the list.
-	 */
-	void zeroList();
-	
-	/**
-	 * @brief Gives the rank of the list.
-	 */
-	int getRank() {return rank; };
-	
-	/**
-	 * @brief true means that list contains only parent sequences (does not contain any subsequence).
-	 */
-	bool parentsOnly();
-	
-	/**
-	 * @brief Indicates whether the list contains sequences, species or keywords.
-	 *
-	 * @return  can be "sequence list", "species list", or "keyword list"
-	 */
-	std::string getType() {return *type; };
-	
-	/**
-	 * @brief   Gives the list name.
-	 */
-	std::string getName() {return name; };
-	
-	/**
-	 * @brief   Modifies a sequence list by a length criterion.
-	 *
-	 * @param criterion		Length criterion such as "> 1000" or "<5000".
-	 * @param listname		Name to be given to created list of sequences matching the length criterion.
-	 * @return				A new list of sequences matching the length criterion, or NULL if error.
-	 */
-	RaaList *modifyByLength(const std::string &criterion, const std::string &listname);
-	
-	/**
-	 * @brief   Modifies a sequence list by a database insertion date criterion.
-	 *
-	 * The database insertion date of each sequence is that of the last DT record for the embl/swissprot format, 
-	 * or that of the LOCUS record for the GenBank format.
-	 *
-	 * @param criterion		Date criterion such as "> 1/jun/98" or "<10/DEC/2004". Year can be expressed with 2 or 4 digits.
-	 * Case is not significant.
-	 * @param listname		Name to be given to the created list of sequences matching the date criterion.
-	 * @return				A new list of sequences matching the date criterion, or NULL if error.
-	 */
-	RaaList *modifyByDate(const std::string &criterion, const std::string &listname);
-private:
-	RaaList();
-};
+  /**
+   * @brief Refers to a sequence list.
+   */
+  static const std::string LIST_SEQUENCES;
+
+  /**
+   * @brief Refers to a keyword list.
+   */
+  static const std::string LIST_KEYWORDS;
+
+  /**
+   * @brief Refers to a species list.
+   */
+  static const std::string LIST_SPECIES;
+
+  /**
+   * @brief Gives the number of elements (often sequences) in the list.
+   */
+  int getCount();
+
+  /**
+   * @brief   Gives the database rank of the first element of the list.
+   */
+  int firstElement();
+
+  /**
+   * @brief   Gives the database rank of the list element following the last considered element.
+   */
+  int nextElement();
+
+  /**
+   * @brief   Sets an element of the list from which nextElement() will start.
+   *
+   * @param  element_rank   The database rank of an element of the list, typically returned by
+   * a previous nextElement() call.
+   */
+  void setFrom(int element_rank);
+
+  /**
+   * @brief   Gives the name of the last considered list element.
+   */
+  std::string elementName() {return elementname; }
+
+  /**
+   * @brief   Gives the length of the last considered list element (meaningful only for sequence lists).
+   */
+  int elementLength() {return elementlength; }
 
-} //end of namespace bpp.
+  /**
+   * @brief   Returns the total # of residues in all sequences of list (meaningful only for sequence lists).
+   *
+   * Because this count can exceed a long integer, it is returned as a string.
+   */
+  std::string residueCount();
 
-#endif  //_RAALIST_H_
+  /**
+   * @brief   Adds an element identified by its database rank to the list.
+   */
+  void addElement(int rank);
+
+  /**
+   * @brief   Removes an element identified by its database rank from the list.
+   */
+  void removeElement(int rank);
+
+  /**
+   * @brief   Tests whether an element identified by its database rank belongs to the list.
+   */
+  bool isInList(int rank);
+
+  /**
+   * @brief   Removes all elements from the list.
+   */
+  void zeroList();
+
+  /**
+   * @brief Gives the rank of the list.
+   */
+  int getRank() {return rank; }
+
+  /**
+   * @brief true means that list contains only parent sequences (does not contain any subsequence).
+   */
+  bool parentsOnly();
+
+  /**
+   * @brief Indicates whether the list contains sequences, species or keywords.
+   *
+   * @return  can be "sequence list", "species list", or "keyword list"
+   */
+  std::string getType() {return *type; }
+
+  /**
+   * @brief   Gives the list name.
+   */
+  std::string getName() {return name; }
+
+  /**
+   * @brief   Modifies a sequence list by a length criterion.
+   *
+   * @param criterion		Length criterion such as "> 1000" or "<5000".
+   * @param listname		Name to be given to created list of sequences matching the length criterion.
+   * @return				A new list of sequences matching the length criterion, or NULL if error.
+   */
+  RaaList* modifyByLength(const std::string& criterion, const std::string& listname);
+
+  /**
+   * @brief   Modifies a sequence list by a database insertion date criterion.
+   *
+   * The database insertion date of each sequence is that of the last DT record for the embl/swissprot format,
+   * or that of the LOCUS record for the GenBank format.
+   *
+   * @param criterion		Date criterion such as "> 1/jun/98" or "<10/DEC/2004". Year can be expressed with 2 or 4 digits.
+   * Case is not significant.
+   * @param listname		Name to be given to the created list of sequences matching the date criterion.
+   * @return				A new list of sequences matching the date criterion, or NULL if error.
+   */
+  RaaList* modifyByDate(const std::string& criterion, const std::string& listname);
+
+private:
+  RaaList();
+};
+} // end of namespace bpp.
 
+#endif  // _RAALIST_H_
diff --git a/src/Bpp/Raa/RaaSeqAttributes.h b/src/Bpp/Raa/RaaSeqAttributes.h
index a81b0d0..bbedbc8 100644
--- a/src/Bpp/Raa/RaaSeqAttributes.h
+++ b/src/Bpp/Raa/RaaSeqAttributes.h
@@ -5,73 +5,76 @@
 
 namespace bpp
 {
-	
-	
 /**
  * @brief Contains various attributes of a sequence (length, name, species name, genetic code, etc...).
  *
  */
 
 
-class RaaSeqAttributes {
-	friend class RAA;
+class RaaSeqAttributes
+{
+  friend class RAA;
+
 public:
-	/**
-	 * @brief    Returns the sequence name.
-	 */
-	std::string getName() {return name; };
-	
-	/**
-	 * @brief    Returns the sequence length.
-	 */
-	int getLength() {return length; };
-	
-	/**
-	 * @brief    Returns the sequence database rank.
-	 */
-	int getRank() {return rank; };
-	
-	/**
-	 * @brief    Returns the sequence's NCBI genetic code number (1 is universal). Meaningful only for CDS sequences.
-	 */
-	int getGeneticCode() {return ncbi_gc; };
-	
-	/**
-	 * @brief    Returns the sequence reading frame (0, 1, or 2). Meaningful only for CDS sequences.
-	 */
-	int getReadingFrame() {return frame; };
-	
-	/**
-	 * @brief    Returns the sequence species name.
-	 */
-	std::string getSpeciesName() {return species; };
-	
-	/**
-	 * @brief    Returns the sequence primary accession number.
-	 */
-	std::string getAccessionNumber() {return accno; };
-	
-	/**
-	 * @brief    Returns a one-line description of the sequence.
-	 */
-	std::string getDescription() {return description; };
+  /**
+   * @brief    Returns the sequence name.
+   */
+  std::string getName() {return name; }
+
+  /**
+   * @brief    Returns the sequence length.
+   */
+  int getLength() {return length; }
+
+  /**
+   * @brief    Returns the sequence database rank.
+   */
+  int getRank() {return rank; }
+
+  /**
+   * @brief    Returns the sequence's NCBI genetic code number (1 is universal).
+
+     Meaningful only for CDS sequences.
+     See <a href=http://doua.prabi.fr/databases/acnuc_data/glossary#GCODE> a description of NCBI-defined genetic codes</a>.
+   */
+  int getGeneticCode() {return ncbi_gc; }
+
+  /**
+   * @brief    Returns the sequence reading frame (0, 1, or 2). Meaningful only for CDS sequences.
+   */
+  int getReadingFrame() {return frame; }
+
+  /**
+   * @brief    Returns the sequence species name.
+   */
+  std::string getSpeciesName() {return species; }
+
+  /**
+   * @brief    Returns the sequence primary accession number.
+   */
+  std::string getAccessionNumber() {return accno; }
+
+  /**
+   * @brief    Returns a one-line description of the sequence.
+   */
+  std::string getDescription() {return description; }
+
 protected:
-	
-	/**
-	 * @brief    The database connection of this sequence.
-	 */
-	RAA *raa;
+  /**
+   * @brief    The database connection of this sequence.
+   */
+  RAA* raa;
+
 private:
-	std::string name;
-	int rank;
-	int length;
-	int ncbi_gc;
-	int frame;
-	std::string species;
-	std::string accno;
-	std::string description;
-	};
-	
+  std::string name;
+  int rank;
+  int length;
+  int ncbi_gc;
+  int frame;
+  std::string species;
+  std::string accno;
+  std::string description;
+};
 }  // namespace bpp
 
-#endif   //_RAASEQATTRIBUTES_H_
+#endif   // _RAASEQATTRIBUTES_H_
diff --git a/src/Bpp/Raa/RaaSpeciesTree.cpp b/src/Bpp/Raa/RaaSpeciesTree.cpp
index 99d3333..e38a8e7 100644
--- a/src/Bpp/Raa/RaaSpeciesTree.cpp
+++ b/src/Bpp/Raa/RaaSpeciesTree.cpp
@@ -1,4 +1,3 @@
-
 #include "RaaSpeciesTree.h"
 #include <string>
 using namespace std;
@@ -6,110 +5,136 @@ using namespace bpp;
 
 string RaaSpeciesTree::getName(int rank)
 {
-	if(rank >= 2 && rank <= max_sp && sp_tree[rank] != NULL) {
-		string name(sp_tree[rank]->name);
-		return name;
-		}
-	else {
-		string name("");
-		return name;
-		}
+  if (rank >= 2 && rank <= max_sp && sp_tree[rank] != NULL)
+  {
+    string name(sp_tree[rank]->name);
+    return name;
+  }
+  else
+  {
+    string name("");
+    return name;
+  }
 }
 
 
 int RaaSpeciesTree::parent(int rank)
 {
-	if(!(rank > 2 && rank <= max_sp && sp_tree[rank] != NULL)) return 0;
-	while(sp_tree[rank]->parent == NULL) rank = sp_tree[rank]->syno->rank;
-	return sp_tree[rank]->parent->rank;
+  if (!(rank > 2 && rank <= max_sp && sp_tree[rank] != NULL))
+    return 0;
+  while (sp_tree[rank]->parent == NULL)
+    rank = sp_tree[rank]->syno->rank;
+  return sp_tree[rank]->parent->rank;
 }
 
 
 int RaaSpeciesTree::getTid(int rank)
 {
-	if(rank >= 2 && rank <= max_sp && sp_tree[rank] != NULL) return sp_tree[rank]->parent->tid;
-	else return 0;
+  if (rank >= 2 && rank <= max_sp && sp_tree[rank] != NULL)
+    return sp_tree[rank]->parent->tid;
+  else
+    return 0;
 }
 
 
 int RaaSpeciesTree::findNode(int tid)
 {
-	if(tid >= 0 && tid <= max_tid) return tid_to_rank[tid];
-	else return 0;
+  if (tid >= 0 && tid <= max_tid)
+    return tid_to_rank[tid];
+  else
+    return 0;
 }
 
 
-int RaaSpeciesTree::findNode(const string &taxon, bool allowsynonym)
+int RaaSpeciesTree::findNode(const string& taxon, bool allowsynonym)
 {
-	if(taxon == string("ROOT")) return 2;
-	int num = raa_iknum(raa_data, (char*)taxon.c_str(), raa_spec);
-	if(num != 0 && !allowsynonym) while(sp_tree[num]->parent == NULL) num = sp_tree[num]->syno->rank;
-	return num;
+  if (taxon == string("ROOT"))
+    return 2;
+  int num = raa_iknum(raa_data, (char*)taxon.c_str(), raa_spec);
+  if (num != 0 && !allowsynonym)
+    while (sp_tree[num]->parent == NULL)
+      num = sp_tree[num]->syno->rank;
+  return num;
 }
 
 
 int RaaSpeciesTree::count(int rank)
 {
-	if(rank >= 2 && rank <= max_sp && sp_tree[rank] != NULL) return sp_tree[rank]->count;
-	else return 0;
+  if (rank >= 2 && rank <= max_sp && sp_tree[rank] != NULL)
+    return sp_tree[rank]->count;
+  else
+    return 0;
 }
 
 
 string RaaSpeciesTree::label(int rank)
 {
-	char *p;
-	if(rank > 2 && rank <= max_sp && sp_tree[rank] != NULL && (p = sp_tree[rank]->libel) != NULL) {
-		string retval(p);
-		return retval;
-		}
-	else {
-		string retval("");
-		return retval;
-		}
+  char* p;
+  if (rank > 2 && rank <= max_sp && sp_tree[rank] != NULL && (p = sp_tree[rank]->libel) != NULL)
+  {
+    string retval(p);
+    return retval;
+  }
+  else
+  {
+    string retval("");
+    return retval;
+  }
 }
 
 
 int RaaSpeciesTree::firstChild(int rank)
 {
-	if(rank >= 2 && rank <= max_sp && sp_tree[rank] != NULL) return sp_tree[rank]->list_desc->value->rank;
-	else return 0;
+  if (rank >= 2 && rank <= max_sp && sp_tree[rank] != NULL)
+    return sp_tree[rank]->list_desc->value->rank;
+  else
+    return 0;
 }
 
 
 int RaaSpeciesTree::nextChild(int rank, int child)
 {
-	if(!(rank >= 2 && rank <= max_sp && child > 2 && child <= max_sp && sp_tree[rank] != NULL && 
-		 sp_tree[child] != NULL)) return 0;
-	struct raa_pair *pair = sp_tree[rank]->list_desc;
-	while(pair != NULL && pair->value->rank != child) {
-		pair = pair->next;
-		}
-	return pair == NULL || pair->next == NULL ? 0 : pair->next->value->rank;
+  if (!(rank >= 2 && rank <= max_sp && child > 2 && child <= max_sp && sp_tree[rank] != NULL &&
+        sp_tree[child] != NULL))
+    return 0;
+  struct raa_pair* pair = sp_tree[rank]->list_desc;
+  while (pair != NULL && pair->value->rank != child)
+  {
+    pair = pair->next;
+  }
+  return pair == NULL || pair->next == NULL ? 0 : pair->next->value->rank;
 }
 
 
 bool RaaSpeciesTree::isChild(int parent, int child)
 {
-	while(child != parent) {
-		child = this->parent(child);
-		if(child == 0) return false;
-		}
-	return true;
+  while (child != parent)
+  {
+    child = this->parent(child);
+    if (child == 0)
+      return false;
+  }
+  return true;
 }
 
 
 int RaaSpeciesTree::nextSynonym(int rank)
 {
-	if(!(rank >= 2 && rank <= max_sp && sp_tree[rank] != NULL)) return 0;
-	struct raa_node *mynode =  sp_tree[rank]->syno;
-	if(mynode == NULL) return 0;
-	else return mynode->rank;
+  if (!(rank >= 2 && rank <= max_sp && sp_tree[rank] != NULL))
+    return 0;
+  struct raa_node* mynode =  sp_tree[rank]->syno;
+  if (mynode == NULL)
+    return 0;
+  else
+    return mynode->rank;
 }
 
 
 int RaaSpeciesTree::getMajor(int rank)
 {
-	if(!(rank >= 2 && rank <= max_sp && sp_tree[rank] != NULL)) return 0;
-	while(sp_tree[rank]->parent == NULL) rank = sp_tree[rank]->syno->rank;
-	return rank;
+  if (!(rank >= 2 && rank <= max_sp && sp_tree[rank] != NULL))
+    return 0;
+  while (sp_tree[rank]->parent == NULL)
+    rank = sp_tree[rank]->syno->rank;
+  return rank;
 }
diff --git a/src/Bpp/Raa/RaaSpeciesTree.h b/src/Bpp/Raa/RaaSpeciesTree.h
index a85a2e8..b77ec6b 100644
--- a/src/Bpp/Raa/RaaSpeciesTree.h
+++ b/src/Bpp/Raa/RaaSpeciesTree.h
@@ -7,8 +7,8 @@ extern "C" {
 
 #include <string>
 
-namespace bpp {
-
+namespace bpp
+{
 /**
  * @brief   To work with the species tree classification of the database.
  *
@@ -17,125 +17,124 @@ namespace bpp {
  * The root of the tree is named "ROOT" and has database rank 2.
  */
 
-	
-class RaaSpeciesTree {
-	friend class RAA;
+
+class RaaSpeciesTree
+{
+  friend class RAA;
+
 public:
-	
-	/**
-	 * @brief Returns the database rank of a taxon identified by its name.
-	 *
-	 * @param  taxon    A taxon name. Case is not significant.
-	 * @param allowsynonym  If true, the return value will give the synonym's rank rather than the rank of its
-	 * major taxon.
-	 * @return The database rank of this taxon, or 0 if no such taxon exists in tree.
-	 */
-	int findNode(const std::string &taxon, bool allowsynonym = false);
-	
-	/**
-	 * @brief Returns the database rank of a taxon identified by a TID.
-	 *
-	 * @param  tid     A TID value.
-	 * @return The database rank of this taxon, or 0 if no such taxon exists in tree.
-	 */
-	int findNode(int tid);
-	
-	/**
-	 * @brief Returns the name of a taxon identified by its database rank.
-	 *
-	 * @param  rank  The database rank of a taxon.
-	 * @return The name of this taxon.
-	 */
-	std::string getName(int rank);
-	
-	/**
-	 * @brief Returns the database rank of the parent of a taxon in the tree.
-	 *
-	 * @param  rank  The database rank of a taxon.
-	 * @return The database rank of the parent of this taxon in the tree, or 0 if no such taxon exists in tree.
-	 */
-	int parent(int rank);
-	
-	/**
-	 * @brief Returns the TID of a taxon.
-	 *
-	 * @param  rank  The database rank of a taxon.
-	 * @return The TID of this taxon, or 0 if no such taxon exists in tree.
-	 */
-	int getTid(int rank);
-	
-	/**
-	 * @brief Returns the number of sequences attached to a taxon or to taxa below it in the species tree.
-	 *
-	 * @param  rank  The database rank of a taxon.
-	 * @return The number of sequences attached to this taxon or to taxa below it, or 0 if no such taxon exists in tree.
-	 */
-	int count(int rank);
-	
-	/**
-	 * @brief Returns the label of a taxon of given rank.
-	 *
-	 * Labels may contain taxon common names, genetic code information, TID values, and taxonomic 
-	 * level information (e.g., genus, order).
-	 * @param  rank  The database rank of a taxon.
-	 * @return The label of this taxon, or "" if no such taxon or label exists in tree. 
-	 */
-	std::string label(int rank);
-	
-	/**
-	 * @brief Returns the rank of the first child taxon of a given taxon.
-	 *
-	 * @param  rank  The database rank of a taxon.
-	 * @return The rank of its first child taxon, or 0 if no child taxon exists in tree.
-	 */
-	int firstChild(int rank);
-	
-	/**
-	 * @brief Allows to loop around all child taxa of a given taxon.
-	 *
-	 * @param  parent  The database rank of a taxon.
-	 * @param  child  The database rank of a child of taxon of rank parent.
-	 * @return The rank of the next child taxon of parent after taxon child, or 0 if no more child taxon exists in tree.
-	 */
-	int nextChild(int parent, int child);
-	
-	/**
-	 * @brief Tells whether there is a downward path from taxon parent to taxon child in the species tree.
-	 *
-	 * @param  parent  The database rank of a taxon.
-	 * @param  child  The database rank of another taxon.
-	 * @return true iff child is below parent (possibly with intermediate nodes) in the species tree.
-	 */
-	bool isChild(int parent, int child);
-	
-	/**
-	 * @brief Allows to loop around all synonymous taxa of a given taxon.
-	 *
-	 * Synonymous taxa of a taxon are chained in a closed loop, among which only one, the major taxon,
-	 * has a parent taxon.
-	 *
-	 * @param  rank  The database rank of a taxon.
-	 * @return  The rank of the next synonymous taxon, or 0 if taxon rank has no synonymous taxon.
-	 */
-	int nextSynonym(int rank);
-	
-	/**
-	 * @brief Gives the major taxon among all synonyms of a given taxon.
-	 *
-	 * @param  rank  The database rank of a taxon.
-	 * @return  The rank of the major taxon of taxon rank (can be itself).
-	 */
-	 int getMajor(int rank);
-	
+  /**
+   * @brief Returns the database rank of a taxon identified by its name.
+   *
+   * @param  taxon    A taxon name. Case is not significant.
+   * @param allowsynonym  If true, the return value will give the synonym's rank rather than the rank of its
+   * major taxon.
+   * @return The database rank of this taxon, or 0 if no such taxon exists in tree.
+   */
+  int findNode(const std::string& taxon, bool allowsynonym = false);
+
+  /**
+   * @brief Returns the database rank of a taxon identified by a TID.
+   *
+   * @param  tid     A TID value.
+   * @return The database rank of this taxon, or 0 if no such taxon exists in tree.
+   */
+  int findNode(int tid);
+
+  /**
+   * @brief Returns the name of a taxon identified by its database rank.
+   *
+   * @param  rank  The database rank of a taxon.
+   * @return The name of this taxon.
+   */
+  std::string getName(int rank);
+
+  /**
+   * @brief Returns the database rank of the parent of a taxon in the tree.
+   *
+   * @param  rank  The database rank of a taxon.
+   * @return The database rank of the parent of this taxon in the tree, or 0 if no such taxon exists in tree.
+   */
+  int parent(int rank);
+
+  /**
+   * @brief Returns the TID of a taxon.
+   *
+   * @param  rank  The database rank of a taxon.
+   * @return The TID of this taxon, or 0 if no such taxon exists in tree.
+   */
+  int getTid(int rank);
+
+  /**
+   * @brief Returns the number of sequences attached to a taxon or to taxa below it in the species tree.
+   *
+   * @param  rank  The database rank of a taxon.
+   * @return The number of sequences attached to this taxon or to taxa below it, or 0 if no such taxon exists in tree.
+   */
+  int count(int rank);
+
+  /**
+   * @brief Returns the label of a taxon of given rank.
+   *
+   * Labels may contain taxon common names, genetic code information, TID values, and taxonomic
+   * level information (e.g., genus, order).
+   * @param  rank  The database rank of a taxon.
+   * @return The label of this taxon, or "" if no such taxon or label exists in tree.
+   */
+  std::string label(int rank);
+
+  /**
+   * @brief Returns the rank of the first child taxon of a given taxon.
+   *
+   * @param  rank  The database rank of a taxon.
+   * @return The rank of its first child taxon, or 0 if no child taxon exists in tree.
+   */
+  int firstChild(int rank);
+
+  /**
+   * @brief Allows to loop around all child taxa of a given taxon.
+   *
+   * @param  parent  The database rank of a taxon.
+   * @param  child  The database rank of a child of taxon of rank parent.
+   * @return The rank of the next child taxon of parent after taxon child, or 0 if no more child taxon exists in tree.
+   */
+  int nextChild(int parent, int child);
+
+  /**
+   * @brief Tells whether there is a downward path from taxon parent to taxon child in the species tree.
+   *
+   * @param  parent  The database rank of a taxon.
+   * @param  child  The database rank of another taxon.
+   * @return true iff child is below parent (possibly with intermediate nodes) in the species tree.
+   */
+  bool isChild(int parent, int child);
+
+  /**
+   * @brief Allows to loop around all synonymous taxa of a given taxon.
+   *
+   * Synonymous taxa of a taxon are chained in a closed loop, among which only one, the major taxon,
+   * has a parent taxon.
+   *
+   * @param  rank  The database rank of a taxon.
+   * @return  The rank of the next synonymous taxon, or 0 if taxon rank has no synonymous taxon.
+   */
+  int nextSynonym(int rank);
+
+  /**
+   * @brief Gives the major taxon among all synonyms of a given taxon.
+   *
+   * @param  rank  The database rank of a taxon.
+   * @return  The rank of the major taxon of taxon rank (can be itself).
+   */
+  int getMajor(int rank);
+
 private:
-	raa_db_access *raa_data;
-	raa_node **sp_tree;
-	int *tid_to_rank;
-	int max_tid;
-	int max_sp;
+  raa_db_access* raa_data;
+  raa_node** sp_tree;
+  int* tid_to_rank;
+  int max_tid;
+  int max_sp;
 };
-
-} //namespace bpp.
+} // namespace bpp.
 
 #endif // _RAASPECIESTREE_H_
-
diff --git a/src/Bpp/Raa/md5.c b/src/Bpp/Raa/md5.c
index f98774c..eddd16f 100644
--- a/src/Bpp/Raa/md5.c
+++ b/src/Bpp/Raa/md5.c
@@ -16,7 +16,7 @@
  * needed on buffers full of bytes, and then call MD5_Final, which
  * will fill a supplied 16-byte array with the digest.
  *
- * Modified 12 June 2003 Jeremy Katz <katzj at redhat.com> to handle 
+ * Modified 12 June 2003 Jeremy Katz <katzj at redhat.com> to handle
  *    endianness better
  *
  */
@@ -37,30 +37,33 @@
 
 typedef unsigned int uint32;
 
-struct MD5Context {
-	uint32 buf[4];
-	uint32 bits[2];
-	unsigned char in[64];
-	int doByteReverse;
+struct MD5Context
+{
+  uint32 buf[4];
+  uint32 bits[2];
+  unsigned char in[64];
+  int doByteReverse;
 };
 
-static void MD5_Transform(uint32 *buf, uint32 const *in);
+static void MD5_Transform(uint32* buf, uint32 const* in);
 
-static void byteReverse(unsigned char *buf, unsigned longs);
+static void byteReverse(unsigned char* buf, unsigned longs);
 
 #ifndef ASM_MD5
 /*
  * Note: this code is harmless on little-endian machines.
  */
-static void byteReverse(unsigned char *buf, unsigned longs)
+static void byteReverse(unsigned char* buf, unsigned longs)
 {
-	uint32 t;
-	do {
-		t = (uint32) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
-		    ((unsigned) buf[1] << 8 | buf[0]);
-		*(uint32 *) buf = t;
-		buf += 4;
-	} while (--longs);
+  uint32 t;
+  do
+  {
+    t = (uint32) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
+        ((unsigned) buf[1] << 8 | buf[0]);
+    *(uint32*) buf = t;
+    buf += 4;
+  }
+  while (--longs);
 }
 #endif
 
@@ -68,114 +71,125 @@ static void byteReverse(unsigned char *buf, unsigned longs)
  * Start MD5 accumulation.  Set bit count to 0 and buffer to mysterious
  * initialization constants.
  */
-static void MD5_Init(struct MD5Context *ctx)
+static void MD5_Init(struct MD5Context* ctx)
 {
-	ctx->buf[0] = 0x67452301U;
-	ctx->buf[1] = 0xefcdab89U;
-	ctx->buf[2] = 0x98badcfeU;
-	ctx->buf[3] = 0x10325476U;
+  ctx->buf[0] = 0x67452301U;
+  ctx->buf[1] = 0xefcdab89U;
+  ctx->buf[2] = 0x98badcfeU;
+  ctx->buf[3] = 0x10325476U;
 
-	ctx->bits[0] = 0;
-	ctx->bits[1] = 0;
+  ctx->bits[0] = 0;
+  ctx->bits[1] = 0;
 
 
-	if (IS_BIG_ENDIAN)
-	     ctx->doByteReverse = 1;
-	else 
-	     ctx->doByteReverse = 0;
+  if (IS_BIG_ENDIAN)
+    ctx->doByteReverse = 1;
+  else
+    ctx->doByteReverse = 0;
 }
 
 /*
  * Update context to reflect the concatenation of another buffer full
  * of bytes.
  */
-static void MD5_Update(struct MD5Context *ctx, unsigned const char *buf, unsigned len)
+static void MD5_Update(struct MD5Context* ctx, unsigned const char* buf, unsigned len)
 {
-	uint32 t;
-
-	/* Update bitcount */
-
-	t = ctx->bits[0];
-	if ((ctx->bits[0] = t + ((uint32) len << 3)) < t)
-		ctx->bits[1]++;	/* Carry from low to high */
-	ctx->bits[1] += len >> 29;
-
-	t = (t >> 3) & 0x3f;	/* Bytes already in shsInfo->data */
-
-	/* Handle any leading odd-sized chunks */
-
-	if (t) {
-		unsigned char *p = (unsigned char *) ctx->in + t;
-
-		t = 64 - t;
-		if (len < t) {
-			memcpy(p, buf, len);
-			return;
-		}
-		memcpy(p, buf, t);
-		if (ctx->doByteReverse) byteReverse(ctx->in, 16);
-		MD5_Transform(ctx->buf, (uint32 *) ctx->in);
-		buf += t;
-		len -= t;
-	}
-	/* Process data in 64-byte chunks */
-
-	while (len >= 64) {
-		memcpy(ctx->in, buf, 64);
-		if (ctx->doByteReverse) byteReverse(ctx->in, 16);
-		MD5_Transform(ctx->buf, (uint32 *) ctx->in);
-		buf += 64;
-		len -= 64;
-	}
-
-	/* Handle any remaining bytes of data. */
-
-	memcpy(ctx->in, buf, len);
+  uint32 t;
+
+  /* Update bitcount */
+
+  t = ctx->bits[0];
+  if ((ctx->bits[0] = t + ((uint32) len << 3)) < t)
+    ctx->bits[1]++;  /* Carry from low to high */
+  ctx->bits[1] += len >> 29;
+
+  t = (t >> 3) & 0x3f;  /* Bytes already in shsInfo->data */
+
+  /* Handle any leading odd-sized chunks */
+
+  if (t)
+  {
+    unsigned char* p = (unsigned char*) ctx->in + t;
+
+    t = 64 - t;
+    if (len < t)
+    {
+      memcpy(p, buf, len);
+      return;
+    }
+    memcpy(p, buf, t);
+    if (ctx->doByteReverse)
+      byteReverse(ctx->in, 16);
+    MD5_Transform(ctx->buf, (uint32*) ctx->in);
+    buf += t;
+    len -= t;
+  }
+  /* Process data in 64-byte chunks */
+
+  while (len >= 64)
+  {
+    memcpy(ctx->in, buf, 64);
+    if (ctx->doByteReverse)
+      byteReverse(ctx->in, 16);
+    MD5_Transform(ctx->buf, (uint32*) ctx->in);
+    buf += 64;
+    len -= 64;
+  }
+
+  /* Handle any remaining bytes of data. */
+
+  memcpy(ctx->in, buf, len);
 }
 
 /*
- * Final wrapup - pad to 64-byte boundary with the bit pattern 
+ * Final wrapup - pad to 64-byte boundary with the bit pattern
  * 1 0* (64-bit count of bits processed, MSB-first)
  */
-static void MD5_Final(unsigned char digest[16], struct MD5Context *ctx)
+static void MD5_Final(unsigned char digest[16], struct MD5Context* ctx)
 {
-	unsigned count;
-	unsigned char *p;
-
-	/* Compute number of bytes mod 64 */
-	count = (ctx->bits[0] >> 3) & 0x3F;
-
-	/* Set the first char of padding to 0x80.  This is safe since there is
-	   always at least one byte free */
-	p = ctx->in + count;
-	*p++ = 0x80;
-
-	/* Bytes of padding needed to make 64 bytes */
-	count = 64 - 1 - count;
-
-	/* Pad out to 56 mod 64 */
-	if (count < 8) {
-		/* Two lots of padding:  Pad the first block to 64 bytes */
-		memset(p, 0, count);
-		if (ctx->doByteReverse) byteReverse(ctx->in, 16);
-		MD5_Transform(ctx->buf, (uint32 *) ctx->in);
-
-		/* Now fill the next block with 56 bytes */
-		memset(ctx->in, 0, 56);
-	} else {
-		/* Pad block to 56 bytes */
-		memset(p, 0, count - 8);
-	}
-	if (ctx->doByteReverse) byteReverse(ctx->in, 14);
-
-	/* Append length in bits and transform */
-	((uint32 *) ctx->in)[14] = ctx->bits[0];
-	((uint32 *) ctx->in)[15] = ctx->bits[1];
-
-	MD5_Transform(ctx->buf, (uint32 *) ctx->in);
-	if (ctx->doByteReverse) byteReverse((unsigned char *) ctx->buf, 4);
-	memcpy(digest, ctx->buf, 16);
-	memset(ctx, 0, sizeof(ctx));	/* In case it's sensitive */
+  unsigned count;
+  unsigned char* p;
+
+  /* Compute number of bytes mod 64 */
+  count = (ctx->bits[0] >> 3) & 0x3F;
+
+  /* Set the first char of padding to 0x80.  This is safe since there is
+     always at least one byte free */
+  p = ctx->in + count;
+  *p++ = 0x80;
+
+  /* Bytes of padding needed to make 64 bytes */
+  count = 64 - 1 - count;
+
+  /* Pad out to 56 mod 64 */
+  if (count < 8)
+  {
+    /* Two lots of padding:  Pad the first block to 64 bytes */
+    memset(p, 0, count);
+    if (ctx->doByteReverse)
+      byteReverse(ctx->in, 16);
+    MD5_Transform(ctx->buf, (uint32*) ctx->in);
+
+    /* Now fill the next block with 56 bytes */
+    memset(ctx->in, 0, 56);
+  }
+  else
+  {
+    /* Pad block to 56 bytes */
+    memset(p, 0, count - 8);
+  }
+  if (ctx->doByteReverse)
+    byteReverse(ctx->in, 14);
+
+  /* Append length in bits and transform */
+  ((uint32*) ctx->in)[14] = ctx->bits[0];
+  ((uint32*) ctx->in)[15] = ctx->bits[1];
+
+  MD5_Transform(ctx->buf, (uint32*) ctx->in);
+  if (ctx->doByteReverse)
+    byteReverse((unsigned char*) ctx->buf, 4);
+  memcpy(digest, ctx->buf, 16);
+  memset(ctx, 0, sizeof(struct MD5Context));  /* In case it's sensitive */
 }
 
 #ifndef ASM_MD5
@@ -190,7 +204,7 @@ static void MD5_Final(unsigned char digest[16], struct MD5Context *ctx)
 
 /* This is the central step in the MD5 algorithm. */
 #define MD5STEP(f, w, x, y, z, data, s) \
-	( w += f(x, y, z) + data,  w = w<<s | w>>(32-s),  w += x )
+  ( w += f(x, y, z) + data,  w = w << s | w >> (32 - s),  w += x )
 
 /*
  * The core of the MD5 algorithm, this alters an existing MD5 hash to
@@ -199,112 +213,113 @@ static void MD5_Final(unsigned char digest[16], struct MD5Context *ctx)
  */
 static void MD5_Transform(uint32 buf[4], uint32 const in[16])
 {
-	register uint32 a, b, c, d;
-
-	a = buf[0];
-	b = buf[1];
-	c = buf[2];
-	d = buf[3];
-
-	MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478U, 7);
-	MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756U, 12);
-	MD5STEP(F1, c, d, a, b, in[2] + 0x242070dbU, 17);
-	MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceeeU, 22);
-	MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0fafU, 7);
-	MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62aU, 12);
-	MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613U, 17);
-	MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501U, 22);
-	MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8U, 7);
-	MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7afU, 12);
-	MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1U, 17);
-	MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7beU, 22);
-	MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122U, 7);
-	MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193U, 12);
-	MD5STEP(F1, c, d, a, b, in[14] + 0xa679438eU, 17);
-	MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821U, 22);
-
-	MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562U, 5);
-	MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340U, 9);
-	MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51U, 14);
-	MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aaU, 20);
-	MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105dU, 5);
-	MD5STEP(F2, d, a, b, c, in[10] + 0x02441453U, 9);
-	MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681U, 14);
-	MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8U, 20);
-	MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6U, 5);
-	MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6U, 9);
-	MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87U, 14);
-	MD5STEP(F2, b, c, d, a, in[8] + 0x455a14edU, 20);
-	MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905U, 5);
-	MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8U, 9);
-	MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9U, 14);
-	MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8aU, 20);
-
-	MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942U, 4);
-	MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681U, 11);
-	MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122U, 16);
-	MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380cU, 23);
-	MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44U, 4);
-	MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9U, 11);
-	MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60U, 16);
-	MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70U, 23);
-	MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6U, 4);
-	MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127faU, 11);
-	MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085U, 16);
-	MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05U, 23);
-	MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039U, 4);
-	MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5U, 11);
-	MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8U, 16);
-	MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665U, 23);
-
-	MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244U, 6);
-	MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97U, 10);
-	MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7U, 15);
-	MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039U, 21);
-	MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3U, 6);
-	MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92U, 10);
-	MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47dU, 15);
-	MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1U, 21);
-	MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4fU, 6);
-	MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0U, 10);
-	MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314U, 15);
-	MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1U, 21);
-	MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82U, 6);
-	MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235U, 10);
-	MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bbU, 15);
-	MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391U, 21);
-
-	buf[0] += a;
-	buf[1] += b;
-	buf[2] += c;
-	buf[3] += d;
+  register uint32 a, b, c, d;
+
+  a = buf[0];
+  b = buf[1];
+  c = buf[2];
+  d = buf[3];
+
+  MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478U, 7);
+  MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756U, 12);
+  MD5STEP(F1, c, d, a, b, in[2] + 0x242070dbU, 17);
+  MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceeeU, 22);
+  MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0fafU, 7);
+  MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62aU, 12);
+  MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613U, 17);
+  MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501U, 22);
+  MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8U, 7);
+  MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7afU, 12);
+  MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1U, 17);
+  MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7beU, 22);
+  MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122U, 7);
+  MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193U, 12);
+  MD5STEP(F1, c, d, a, b, in[14] + 0xa679438eU, 17);
+  MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821U, 22);
+
+  MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562U, 5);
+  MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340U, 9);
+  MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51U, 14);
+  MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aaU, 20);
+  MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105dU, 5);
+  MD5STEP(F2, d, a, b, c, in[10] + 0x02441453U, 9);
+  MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681U, 14);
+  MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8U, 20);
+  MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6U, 5);
+  MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6U, 9);
+  MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87U, 14);
+  MD5STEP(F2, b, c, d, a, in[8] + 0x455a14edU, 20);
+  MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905U, 5);
+  MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8U, 9);
+  MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9U, 14);
+  MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8aU, 20);
+
+  MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942U, 4);
+  MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681U, 11);
+  MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122U, 16);
+  MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380cU, 23);
+  MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44U, 4);
+  MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9U, 11);
+  MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60U, 16);
+  MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70U, 23);
+  MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6U, 4);
+  MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127faU, 11);
+  MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085U, 16);
+  MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05U, 23);
+  MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039U, 4);
+  MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5U, 11);
+  MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8U, 16);
+  MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665U, 23);
+
+  MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244U, 6);
+  MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97U, 10);
+  MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7U, 15);
+  MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039U, 21);
+  MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3U, 6);
+  MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92U, 10);
+  MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47dU, 15);
+  MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1U, 21);
+  MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4fU, 6);
+  MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0U, 10);
+  MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314U, 15);
+  MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1U, 21);
+  MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82U, 6);
+  MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235U, 10);
+  MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bbU, 15);
+  MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391U, 21);
+
+  buf[0] += a;
+  buf[1] += b;
+  buf[2] += c;
+  buf[3] += d;
 }
 
 #endif
 
 
 /*  function for very simple interface */
-void raa_MD5String (char *in_string, char out_digest[33])
+void raa_MD5String (char* in_string, char out_digest[33])
 /*
-in_string: string to be MD5-digested
-out_digest: resulting digest as 32 hexadecimal digits plus final NULL
-*/
+   in_string: string to be MD5-digested
+   out_digest: resulting digest as 32 hexadecimal digits plus final NULL
+ */
 {
   struct MD5Context context;
   unsigned int len = strlen (in_string);
-  char *p;
+  char* p;
   int i;
   unsigned char digest[16];
 
   MD5_Init (&context);
-  MD5_Update (&context, (unsigned const char *)in_string, len);
+  MD5_Update (&context, (unsigned const char*)in_string, len);
   MD5_Final (digest, &context);
 
   p = out_digest;
-  for (i = 0; i < 16; i++) {
-	 sprintf (p, "%02x", digest[i]);
-	 p += 2;
-	 }
+  for (i = 0; i < 16; i++)
+  {
+    sprintf (p, "%02x", digest[i]);
+    p += 2;
+  }
 
   memset(&context, 0, sizeof(struct MD5Context));
 }
diff --git a/src/Bpp/Raa/misc_acnuc.c b/src/Bpp/Raa/misc_acnuc.c
index 0c1d802..be2e887 100644
--- a/src/Bpp/Raa/misc_acnuc.c
+++ b/src/Bpp/Raa/misc_acnuc.c
@@ -18,9 +18,10 @@ int calc_codon_number(char* codon);
 char codaa(char* codon, int code);
 int get_ncbi_gc_number(int gc);
 int get_acnuc_gc_number(int ncbi_gc);
-int strcmptrail(char *s1, int l1, char *s2, int l2);
-void majuscules(char *name);
-void compact(char *chaine);
+int strcmptrail(char* s1, int l1, char* s2, int l2);
+void majuscules(char* name);
+void compact(char* chaine);
+void* mycalloc(int nbr, size_t taille);
 char complementer_base(char nucl);
 void complementer_seq(char* deb_ch, int l);
 char init_codon_to_aa(char* codon, int gc);
@@ -34,11 +35,11 @@ void gets_no_echo(char* password, size_t lpw);
 int trim_key(char* name) /* remove trailing spaces */
 {
   char* p;
-  int l = strlen(name);
+  int l = (int)strlen(name);
   p = name + l - 1;
   while (p >= name && *p == ' ')
     *(p--) = 0;
-  return (p + 1) - name;
+  return (int)((p + 1) - name);
 }
 
 
@@ -47,14 +48,14 @@ void padtosize(char* pname, char* name, int length)
   int i;
   strncpy(pname, name, length);
   pname[length] = 0;
-  for (i = strlen(pname); i < length; i++)
+  for (i = (int)strlen(pname); i < length; i++)
   {
     pname[i] = ' ';
   }
 }
 
 
-#define TOTCODES 18  /* nbre total de codes definis, 0 inclus */
+#define TOTCODES 19  /* nbre total de codes definis, 0 inclus */
 int totcodes = TOTCODES;
 
 char aminoacids[] = "RLSTPAGVKNQHEDYCFIMW*X";
@@ -303,6 +304,19 @@ struct genetic_code_libel genetic_code[TOTCODES] =
           0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
           0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0} /* UUG */
   }
+  ,
+  { /* 18: Candidate Division SR1 and Gracilibacteria */
+    {"UGA=G"},
+    /*ANN*/ {9, 10, 9, 10, 4, 4, 4, 4, 1, 3, 1, 3, 18, 18, 19, 18,
+             /*CNN*/ 11, 12, 11, 12, 5, 5, 5, 5, 1, 1, 1, 1, 2, 2, 2, 2,
+             /*GNN*/ 13, 14, 13, 14, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8,
+             /*TNN*/ 21, 15, 21, 15, 3, 3, 3, 3, 7, 16, 20, 16, 2, 17, 2, 17, 22},
+    /*ncbi*/ 25,
+    /*init*/ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, /* AUG */
+              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, /* CUG */
+              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0} /* UUG */
+  }
 
 
 /*       1         2
@@ -342,7 +356,7 @@ int calc_codon_number(char* codon)
       break;
     }
     else
-      base = (p - nucleotides) / 2;
+      base = (int)(p - nucleotides) / 2;
     num = num * 4 + nucnum[base];
     codon++;
   }
@@ -400,12 +414,12 @@ int strcmptrail(char* s1, int l1, char* s2, int l2)
   if (l1 > 0)
   {
     if ( (fin = (char*)memchr(s1, 0, l1) ) != NULL)
-      l1 = fin - s1;
+      l1 = (int)(fin - s1);
   }
   if (l2 > 0)
   {
     if ( (fin = (char*)memchr(s2, 0, l2) ) != NULL)
-      l2 = fin - s2;
+      l2 = (int)(fin - s2);
   }
 
   if (l2 > l1)
@@ -446,7 +460,7 @@ void compact(char* chaine)
   int l;
   char* p, * q;
 
-  l = strlen(chaine); p = chaine + l;
+  l = (int)strlen(chaine); p = chaine + l;
   while (*(--p) == ' ' && p >= chaine)
     *p = 0;
   while ((p = strchr(chaine, ' ')) != NULL)
@@ -454,7 +468,7 @@ void compact(char* chaine)
     q = p + 1;
     while (*q == ' ')
       q++;
-    l = q - p;
+    l = (int)(q - p);
     while (*q != 0)
     {
       *(q - l) = *q; q++;
@@ -464,6 +478,20 @@ void compact(char* chaine)
 }
 
 
+void* mycalloc(int nbre, size_t size)
+{
+  void* point;
+
+  point = calloc(nbre, size);
+  if (point == NULL)
+  {
+    fprintf(stderr, "Error: problem allocating memory.\n");
+    exit(1);
+  }
+  return point;
+}
+
+
 char complementer_base(char nucl)
 {
   switch (nucl)
@@ -602,7 +630,7 @@ int compch(char* cible, int lcible, char** posmot, int nbrmots)
   pos = cible + lcible - 1;
   while (pos >= cible && *pos == ' ')
     pos--;
-  lcible = pos - cible + 1;
+  lcible = (int)(pos - cible + 1);
   memcpy(vcible, cible, lcible);
   vcible[lcible] = 0;
   cible = vcible;
@@ -613,7 +641,7 @@ int compch(char* cible, int lcible, char** posmot, int nbrmots)
 
   if (posmot[0] != NULL)   /* comparaison avec mot initial */
   {
-    l = strlen(posmot[0]);
+    l = (int)strlen(posmot[0]);
     if (strncmp(cible, posmot[0], l) != 0)
       return 0;
     cible += l;
@@ -625,14 +653,14 @@ int compch(char* cible, int lcible, char** posmot, int nbrmots)
     pos = strstr(cible, posmot[num]);
     if (pos == NULL)
       return 0;
-    l = strlen(posmot[num]);
+    l = (int)strlen(posmot[num]);
     cible = pos + l;
     num++;
   }
   if (total == nbrmots - 1)
     return 1;  /* template se termine par @ */
 /* test si cible se termine par dernier mot du template */
-  l = strlen(posmot[nbrmots - 1]);
+  l = (int)strlen(posmot[nbrmots - 1]);
   if (strcmp(vcible + lcible - l, posmot[nbrmots - 1]) == 0)
     return 1;
   return 0;
@@ -750,5 +778,3 @@ void gets_no_echo(char* password, size_t lpw)
 #endif
   return;
 }
-
-
diff --git a/src/Bpp/Raa/parser.c b/src/Bpp/Raa/parser.c
index 39376be..6a1b581 100644
--- a/src/Bpp/Raa/parser.c
+++ b/src/Bpp/Raa/parser.c
@@ -1,114 +1,128 @@
 #include "parser.h"
 
-char *unprotect_quotes(char *name);
-
+char* unprotect_quotes(char* name);
 
 
 /** initialisation d'une r�ponse **/
-Reponse * initreponse(void) {
-  Reponse *rep;
-  rep = (Reponse *) malloc (sizeof(Reponse));
+Reponse* initreponse(void)
+{
+  Reponse* rep;
+  rep = (Reponse*) malloc (sizeof(Reponse));
   rep->nbarguments = 0;
   rep->arg = NULL;
   return rep;
 }
 
 
-void clear_reponse(Reponse * rep) { 
+void clear_reponse(Reponse* rep)
+{
   int pti;
-  
-  for(pti=0; pti < rep->nbarguments; pti++) {
+
+  for (pti = 0; pti < rep->nbarguments; pti++)
+  {
     free(rep->arg[pti]);
   }
-  if(rep->arg != NULL) free(rep->arg);
+  if (rep->arg != NULL)
+    free(rep->arg);
   free(rep);
 }
 
 
-void ajout_reponse(Reponse *rep, char *pile, int len) {
+void ajout_reponse(Reponse* rep, char* pile, int len)
+{
   int pti;
 
-    if (rep->nbarguments==0)
-      rep->arg = (char **)malloc(1 * sizeof(char *));
-    else
-      rep->arg= (char**) realloc(rep->arg,(rep->nbarguments+1)* sizeof(char *)) ; /* ici j'ai deja alloue donc realloc (plus de ligne) */
-	
-    rep->arg[rep->nbarguments]=(char *) malloc(len + 1); /* j'alloue l'espace pour l'argument */
-    
-    pti=rep->nbarguments;
-    memcpy(rep->arg[pti], pile, len); /* je stocke l'argument */
-    rep->arg[pti][len] = 0;
-    
-    rep->nbarguments++;
-    
-  }
+  if (rep->nbarguments == 0)
+    rep->arg = (char**)malloc(1 * sizeof(char*));
+  else
+    rep->arg = (char**) realloc(rep->arg, (rep->nbarguments + 1) * sizeof(char*));  /* ici j'ai deja alloue donc realloc (plus de ligne) */
+
+  rep->arg[rep->nbarguments] = (char*) malloc(len + 1); /* j'alloue l'espace pour l'argument */
 
+  pti = rep->nbarguments;
+  memcpy(rep->arg[pti], pile, len); /* je stocke l'argument */
+  rep->arg[pti][len] = 0;
 
+  rep->nbarguments++;
+}
 
 
 /** le parseur qui rempli la structure Reponse **/
-void parse(char *chaine, Reponse *rep) {
-char *ori;
-
-ori=chaine;
-while(*chaine != 0) {
-    if (*chaine == '"' ) {
-    	do 	{ /* chercher le prochain " en ignorant les \" sauf si en fin de partie entre " " */
-    		chaine++;
-    		if(*chaine == 0) break;
-    		}
-    	while(*chaine != '"' || ( *(chaine-1) == '\\' && *(chaine+1) != '&' && *(chaine+1) != 0) );
-    	if(*chaine == 0) break;
-    	chaine++;
-    	} 
-    if(*chaine == '&') { 
-      	ajout_reponse(rep, ori, chaine-ori);
-      	ori=chaine+1;
-    	}
-    chaine++;
+void parse(char* chaine, Reponse* rep)
+{
+  char* ori;
+
+  ori = chaine;
+  while (*chaine != 0)
+  {
+    if (*chaine == '"')
+    {
+      do    /* chercher le prochain " en ignorant les \" sauf si en fin de partie entre " " */
+      {
+        chaine++;
+        if (*chaine == 0)
+          break;
+      }
+      while (*chaine != '"' || ( *(chaine - 1) == '\\' && *(chaine + 1) != '&' && *(chaine + 1) != 0) );
+      if (*chaine == 0)
+        break;
+      chaine++;
     }
-ajout_reponse(rep, ori, chaine-ori); 
+    if (*chaine == '&')
+    {
+      ajout_reponse(rep, ori, chaine - ori);
+      ori = chaine + 1;
+    }
+    chaine++;
+  }
+  ajout_reponse(rep, ori, chaine - ori);
 }
 
 
-
 /** pour rechercher la valeur d'un argument dans la structure **/
-char *val(Reponse *Mono, char *argument) 
+char* val(Reponse* Mono, char* argument)
 {
-int count, num, l, larg;
-char *retval = NULL, *debut, *p;
-
-count = Mono->nbarguments;
-larg = strlen(argument);
-for(num=0; num < count; num++) {
-	debut = Mono->arg[num];
-	p = strchr(debut, '=');
-	if(p == NULL || larg != p - debut) continue;
-	p++;
-	if(strncmp(argument, debut, larg) != 0) continue;
-	l = strlen(p);
-	retval = (char *)malloc(l+1);
-	strcpy(retval, p);
-	unprotect_quotes(retval);
-	break;
-	}
-return retval;
+  int count, num, l, larg;
+  char* retval = NULL, * debut, * p;
+
+  count = Mono->nbarguments;
+  larg = strlen(argument);
+  for (num = 0; num < count; num++)
+  {
+    debut = Mono->arg[num];
+    p = strchr(debut, '=');
+    if (p == NULL || larg != p - debut)
+      continue;
+    p++;
+    if (strncmp(argument, debut, larg) != 0)
+      continue;
+    l = strlen(p);
+    retval = (char*)malloc(l + 1);
+    strcpy(retval, p);
+    unprotect_quotes(retval);
+    break;
+  }
+  return retval;
 }
 
 
-char *unprotect_quotes(char *name)
+char* unprotect_quotes(char* name)
 /*  enlever les " " encadrantes et decoder les \" internes en " */
 {
-char *p;
-int l;
-
-l = strlen(name);
-if(*name == '"') {
-	memmove(name, name+1, l--); /* enlever la " initiale */
-	if( *(name+l-1) == '"') *(name + --l) = 0; /* enlever la " terminale */
-	}
+  char* p;
+  int l;
+
+  l = strlen(name);
+  if (*name == '"')
+  {
+    memmove(name, name + 1, l--); /* enlever la " initiale */
+    if (*(name + l - 1) == '"')
+      *(name + --l) = 0;  /* enlever la " terminale */
+  }
 
-while ((p = strstr(name, "\\\"" /* la chaine \"  */ )) != NULL) { memmove(p, p+1, name + l - p); l--; }
-return name;
+  while ((p = strstr(name, "\\\"" /* la chaine \"  */ )) != NULL)
+  {
+    memmove(p, p + 1, name + l - p); l--;
+  }
+  return name;
 }
-
diff --git a/src/Bpp/Raa/parser.h b/src/Bpp/Raa/parser.h
index ad738ef..e38dbca 100644
--- a/src/Bpp/Raa/parser.h
+++ b/src/Bpp/Raa/parser.h
@@ -1,15 +1,14 @@
 #include <stdlib.h>
 #include <string.h>
 
-typedef struct ThisReponse{
-  
-  char **arg; /* je stocke les arguments */
+typedef struct ThisReponse
+{
+  char** arg; /* je stocke les arguments */
   int nbarguments; /* je stocke le nombre d'arguments */
-  
-} Reponse ;
+} Reponse;
 
-extern Reponse * initreponse(void) ;
-extern void clear_reponse(Reponse * rep) ;
-void ajout_reponse(Reponse *rep, char *pile, int len) ;
-extern void parse(char *chaine, Reponse *rep) ;
-extern char *val(Reponse *Mono, char *argument) ;
+extern Reponse* initreponse(void);
+extern void clear_reponse(Reponse* rep);
+void ajout_reponse(Reponse* rep, char* pile, int len);
+extern void parse(char* chaine, Reponse* rep);
+extern char* val(Reponse* Mono, char* argument);
diff --git a/src/Bpp/Raa/zsockr.c b/src/Bpp/Raa/zsockr.c
index 1778818..d8813f7 100644
--- a/src/Bpp/Raa/zsockr.c
+++ b/src/Bpp/Raa/zsockr.c
@@ -1,5 +1,5 @@
 /* functions to handle zlib-compressed data read from socket
-*/
+ */
 #include <zlib.h>
 #include <unistd.h>
 #include <stdlib.h>
@@ -11,135 +11,147 @@
 
 
 /* included functions */
-void *prepare_sock_gz_r(FILE *sockr);
-int z_getc(void *v);
-char *z_gets(void *v, char *line, size_t len);
-char *z_read_sock(void *v);
-int close_sock_gz_r(void *v);
-
+void* prepare_sock_gz_r(FILE* sockr);
+int z_getc(void* v);
+char* z_gets(void* v, char* line, size_t len);
+char* z_read_sock(void* v);
+int close_sock_gz_r(void* v);
 
 
 #define ZBSIZE 100000
-typedef struct {
-	z_stream stream;
-	char z_buffer[ZBSIZE]; /* compressed input buffer */
-	char text_buffer[4 * ZBSIZE]; /* decompressed buffer */
-	char *pos, *endbuf;
+typedef struct
+{
+  z_stream stream;
+  char z_buffer[ZBSIZE]; /* compressed input buffer */
+  char text_buffer[4 * ZBSIZE]; /* decompressed buffer */
+  char* pos, * endbuf;
 #ifdef WIN32
-	SOCKET fd;
+  SOCKET fd;
 #else
-	int fd;
+  int fd;
 #endif
-	} sock_gz_r;
+} sock_gz_r;
 
 
-
-void *prepare_sock_gz_r(FILE *sockr)
+void* prepare_sock_gz_r(FILE* sockr)
 {
-int err;
-sock_gz_r *big;
-
-big = (sock_gz_r *)malloc(sizeof(sock_gz_r));
-if(big == NULL) return NULL;
-big->stream.next_in = Z_NULL;
-big->stream.avail_in = 0;
-big->stream.avail_out = 0;
-big->stream.zalloc = Z_NULL;
-big->stream.zfree = Z_NULL;
-big->stream.opaque = NULL;
-big->pos = big->text_buffer;
-big->endbuf = big->pos;
+  int err;
+  sock_gz_r* big;
+
+  big = (sock_gz_r*)malloc(sizeof(sock_gz_r));
+  if (big == NULL)
+    return NULL;
+  big->stream.next_in = Z_NULL;
+  big->stream.avail_in = 0;
+  big->stream.avail_out = 0;
+  big->stream.zalloc = Z_NULL;
+  big->stream.zfree = Z_NULL;
+  big->stream.opaque = NULL;
+  big->pos = big->text_buffer;
+  big->endbuf = big->pos;
 #ifdef WIN32
-big->fd = (SOCKET)sockr;
+  big->fd = (SOCKET)sockr;
 #else
-big->fd = fileno(sockr);
+  big->fd = fileno(sockr);
 #endif
-err = inflateInit(&big->stream);
-return err == Z_OK ? (void *)big : NULL;
+  err = inflateInit(&big->stream);
+  return err == Z_OK ? (void*)big : NULL;
 }
 
 
-int z_getc(void *v)
+int z_getc(void* v)
 {
-int q;
-sock_gz_r *big = (sock_gz_r *)v;
-z_streamp zs;
-
-if(big->pos < big->endbuf) {
-	return *(big->pos++);
-	}
-zs = &(big->stream);
-zs->next_out = (Bytef *)big->text_buffer;
-zs->avail_out = sizeof(big->text_buffer);
-big->pos = (char *)zs->next_out;
-do	{
-	if(zs->avail_in == 0) {
-		int lu;
+  int q;
+  sock_gz_r* big = (sock_gz_r*)v;
+  z_streamp zs;
+
+  if (big->pos < big->endbuf)
+  {
+    return *(big->pos++);
+  }
+  zs = &(big->stream);
+  zs->next_out = (Bytef*)big->text_buffer;
+  zs->avail_out = sizeof(big->text_buffer);
+  big->pos = (char*)zs->next_out;
+  do
+  {
+    if (zs->avail_in == 0)
+    {
+      int lu;
 #ifdef WIN32
-		lu = recv( big->fd , big->z_buffer, ZBSIZE, 0 );
+      lu = recv( big->fd, big->z_buffer, ZBSIZE, 0 );
 #else
-		lu = read( big->fd , big->z_buffer, ZBSIZE );
+      lu = read( big->fd, big->z_buffer, ZBSIZE );
 #endif
-		if(lu == -1) return EOF;
-		zs->next_in = (Bytef *)big->z_buffer;
-		zs->avail_in = lu;
-		}
-	q = inflate(zs, Z_NO_FLUSH);	
-	if(q == Z_STREAM_END) break;	
-	if(q != Z_OK) {
-		break;
-		}
-	}
-while ( (char *)zs->next_out == big->pos);
-big->endbuf = (char *)zs->next_out;
-if(big->pos < big->endbuf) return *(big->pos++);
-else 
-	return EOF;
+      if (lu == -1)
+        return EOF;
+      zs->next_in = (Bytef*)big->z_buffer;
+      zs->avail_in = lu;
+    }
+    q = inflate(zs, Z_NO_FLUSH);
+    if (q == Z_STREAM_END)
+      break;
+    if (q != Z_OK)
+    {
+      break;
+    }
+  }
+  while ( (char*)zs->next_out == big->pos);
+  big->endbuf = (char*)zs->next_out;
+  if (big->pos < big->endbuf)
+    return *(big->pos++);
+  else
+    return EOF;
 }
 
 
-char *z_gets(void *v, char *line, size_t len)
+char* z_gets(void* v, char* line, size_t len)
 {
-int c;
-char *p;
-
-p = line;
-while(len > 1) {
-	c = z_getc( v );
-	if(c == EOF) {
-		if(p == line) return NULL;
-		break;
-		}
-	*(p++) = c;
-	if(c == '\n') break;
-	len--;
-	}
-*p = 0;
-return line;
+  int c;
+  char* p;
+
+  p = line;
+  while (len > 1)
+  {
+    c = z_getc( v );
+    if (c == EOF)
+    {
+      if (p == line)
+        return NULL;
+      break;
+    }
+    *(p++) = c;
+    if (c == '\n')
+      break;
+    len--;
+  }
+  *p = 0;
+  return line;
 }
 
 
-char *z_read_sock(void *v)
+char* z_read_sock(void* v)
 {
-static char line[500];
-char *p;
-int l;
-
-p = z_gets(v, line, sizeof(line));
-if(p == NULL) return NULL;
-l = strlen(line);
-if(l > 0 && line[l-1] == '\n') line[l-1] = 0;
-return line;
+  static char line[500];
+  char* p;
+  int l;
+
+  p = z_gets(v, line, sizeof(line));
+  if (p == NULL)
+    return NULL;
+  l = strlen(line);
+  if (l > 0 && line[l - 1] == '\n')
+    line[l - 1] = 0;
+  return line;
 }
 
 
-int close_sock_gz_r(void *v)
+int close_sock_gz_r(void* v)
 {
-sock_gz_r *big = (sock_gz_r *)v;
-int val;
+  sock_gz_r* big = (sock_gz_r*)v;
+  int val;
 
-val = inflateEnd(&(big->stream));
-free(big);
-return val;
+  val = inflateEnd(&(big->stream));
+  free(big);
+  return val;
 }
-
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 29d8c29..d3b565f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,54 +1,59 @@
 # CMake script for Bio++ Remote Acnuc Access
-# Author: Sylvain Gaillard and Julien Dutheil
+# Authors:
+#   Sylvain Gaillard
+#   Julien Dutheil
+#   Francois Gindraud (2017)
 # Created: 11/09/2009
 
-# File list
-set(C_FILES
- Bpp/Raa/md5.c
- Bpp/Raa/parser.c
- Bpp/Raa/zsockr.c
- Bpp/Raa/misc_acnuc.c
- Bpp/Raa/RAA_acnuc.c
-)
-
-set(CPP_FILES
- Bpp/Raa/RAA.cpp
- Bpp/Raa/RaaList.cpp
- Bpp/Raa/RaaSpeciesTree.cpp
-)
+set (C_FILES
+  Bpp/Raa/RAA_acnuc.c
+  Bpp/Raa/md5.c
+  Bpp/Raa/misc_acnuc.c
+  Bpp/Raa/parser.c
+  Bpp/Raa/zsockr.c
+  )
 
-set(H_FILES
- Bpp/Raa/parser.h
- Bpp/Raa/RAA.h
- Bpp/Raa/RaaSeqAttributes.h
- Bpp/Raa/RAA_acnuc.h
- Bpp/Raa/RaaList.h
- Bpp/Raa/RaaSpeciesTree.h
-)
+set (CPP_FILES
+  Bpp/Raa/RAA.cpp
+  Bpp/Raa/RaaList.cpp
+  Bpp/Raa/RaaSpeciesTree.cpp
+  )
 
 # Build the static lib
-add_library(bppraa-static STATIC ${CPP_FILES} ${C_FILES})
-set_target_properties(bppraa-static
-  PROPERTIES OUTPUT_NAME bpp-raa
-  CLEAN_DIRECT_OUTPUT 1
+add_library (${PROJECT_NAME}-static STATIC ${CPP_FILES} ${C_FILES})
+target_include_directories (${PROJECT_NAME}-static PUBLIC
+  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+  $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>
   )
-target_link_libraries(bppraa-static ${LIBS})
+set_target_properties (${PROJECT_NAME}-static PROPERTIES OUTPUT_NAME ${PROJECT_NAME})
+target_link_libraries (${PROJECT_NAME}-static ${BPP_LIBS_STATIC} zlib)
 
 # Build the shared lib
-add_library(bppraa-shared SHARED ${CPP_FILES} ${C_FILES})
-set_target_properties(bppraa-shared
-  PROPERTIES OUTPUT_NAME bpp-raa
-  CLEAN_DIRECT_OUTPUT 1
-  VERSION ${BPPRAA_VERSION}
-  SOVERSION ${BPPRAA_VERSION_MAJOR}
+add_library (${PROJECT_NAME}-shared SHARED ${CPP_FILES} ${C_FILES})
+target_include_directories (${PROJECT_NAME}-shared PUBLIC
+  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+  $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>
   )
-target_link_libraries(bppraa-shared ${LIBS})
-
-# Install libs
-install(TARGETS bppraa-static bppraa-shared DESTINATION lib${LIB_SUFFIX})
-
-# Install headers
-install(DIRECTORY Bpp/ DESTINATION include/Bpp FILES_MATCHING PATTERN "*.h")
-
-# Generate generic include files (.all)
-INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_SOURCE_DIR}/genIncludes.sh ${CMAKE_PREFIX_PATH}/include/Bpp)")
+set_target_properties (${PROJECT_NAME}-shared
+  PROPERTIES OUTPUT_NAME ${PROJECT_NAME}
+  MACOSX_RPATH 1
+  VERSION ${${PROJECT_NAME}_VERSION}
+  SOVERSION ${${PROJECT_NAME}_VERSION_MAJOR}
+  )
+target_link_libraries (${PROJECT_NAME}-shared ${BPP_LIBS_SHARED} zlib)
+
+# Install libs and headers
+install (
+  TARGETS ${PROJECT_NAME}-static ${PROJECT_NAME}-shared
+  EXPORT ${PROJECT_NAME}-targets
+  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+  RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
+  )
+install (
+  DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Bpp
+  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+  FILES_MATCHING PATTERN "*.h"
+  )
+# Install cmake file representing targets
+install (EXPORT ${PROJECT_NAME}-targets DESTINATION ${cmake-package-location})

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/libbpp-raa.git



More information about the debian-med-commit mailing list