├── .gitignore ├── AUTHORS ├── CMakeLists.txt ├── LICENSE ├── README.md ├── contrib └── libs │ ├── fmath │ ├── fmath.hpp │ ├── readme.md │ └── readme.txt │ └── tclap │ ├── AUTHORS │ ├── COPYING │ ├── ChangeLog │ ├── INSTALL │ ├── Makefile.am │ ├── Makefile.in │ ├── NEWS │ ├── README │ ├── aclocal.m4 │ ├── config │ ├── Makefile.am │ ├── Makefile.in │ ├── ac_cxx_have_long_long.m4 │ ├── ac_cxx_have_sstream.m4 │ ├── ac_cxx_have_strstream.m4 │ ├── ac_cxx_namespaces.m4 │ ├── ac_cxx_warn_effective_cxx.m4 │ ├── bb_enable_doxygen.m4 │ ├── config.h.in │ ├── depcomp │ ├── install-sh │ ├── missing │ ├── mkinstalldirs │ └── test-driver │ ├── configure │ ├── configure.in │ ├── docs │ ├── Doxyfile.in │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── index.html │ ├── manual.html │ ├── manual.xml │ └── style.css │ ├── examples │ ├── Makefile.am │ ├── Makefile.in │ ├── test1.cpp │ ├── test10.cpp │ ├── test11.cpp │ ├── test12.cpp │ ├── test13.cpp │ ├── test14.cpp │ ├── test15.cpp │ ├── test16.cpp │ ├── test17-a.cpp │ ├── test17.cpp │ ├── test18.cpp │ ├── test19.cpp │ ├── test2.cpp │ ├── test20.cpp │ ├── test21.cpp │ ├── test3.cpp │ ├── test4.cpp │ ├── test5.cpp │ ├── test6.cpp │ ├── test7.cpp │ ├── test8.cpp │ └── test9.cpp │ ├── include │ ├── Makefile.am │ ├── Makefile.in │ └── tclap │ │ ├── Arg.h │ │ ├── ArgException.h │ │ ├── ArgTraits.h │ │ ├── CmdLine.h │ │ ├── CmdLineInterface.h │ │ ├── CmdLineOutput.h │ │ ├── Constraint.h │ │ ├── DocBookOutput.h │ │ ├── HelpVisitor.h │ │ ├── IgnoreRestVisitor.h │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── MultiArg.h │ │ ├── MultiSwitchArg.h │ │ ├── OptionalUnlabeledTracker.h │ │ ├── StandardTraits.h │ │ ├── StdOutput.h │ │ ├── SwitchArg.h │ │ ├── UnlabeledMultiArg.h │ │ ├── UnlabeledValueArg.h │ │ ├── ValueArg.h │ │ ├── ValuesConstraint.h │ │ ├── VersionVisitor.h │ │ ├── Visitor.h │ │ ├── XorHandler.h │ │ ├── ZshCompletionOutput.h │ │ └── sstream.h │ ├── msc │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── examples │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── test1.vcproj │ │ ├── test2.vcproj │ │ ├── test3.vcproj │ │ ├── test4.vcproj │ │ ├── test5.vcproj │ │ ├── test6.vcproj │ │ ├── test7.vcproj │ │ └── test8.vcproj │ ├── tclap-beta.ncb │ ├── tclap-beta.sln │ ├── tclap-beta.suo │ └── tclap-beta.vcproj │ ├── tclap.pc.in │ └── tests │ ├── Makefile.am │ ├── Makefile.in │ ├── test1.out │ ├── test1.sh │ ├── test10.out │ ├── test10.sh │ ├── test11.out │ ├── test11.sh │ ├── test12.out │ ├── test12.sh │ ├── test13.out │ ├── test13.sh │ ├── test14.out │ ├── test14.sh │ ├── test15.out │ ├── test15.sh │ ├── test16.out │ ├── test16.sh │ ├── test17.out │ ├── test17.sh │ ├── test18.out │ ├── test18.sh │ ├── test19.out │ ├── test19.sh │ ├── test2.out │ ├── test2.sh │ ├── test20.out │ ├── test20.sh │ ├── test21.out │ ├── test21.sh │ ├── test22.out │ ├── test22.sh │ ├── test23.out │ ├── test23.sh │ ├── test24.out │ ├── test24.sh │ ├── test25.out │ ├── test25.sh │ ├── test26.out │ ├── test26.sh │ ├── test27.out │ ├── test27.sh │ ├── test28.out │ ├── test28.sh │ ├── test29.out │ ├── test29.sh │ ├── test3.out │ ├── test3.sh │ ├── test30.out │ ├── test30.sh │ ├── test31.out │ ├── test31.sh │ ├── test32.out │ ├── test32.sh │ ├── test33.out │ ├── test33.sh │ ├── test34.out │ ├── test34.sh │ ├── test35.out │ ├── test35.sh │ ├── test36.out │ ├── test36.sh │ ├── test37.out │ ├── test37.sh │ ├── test38.out │ ├── test38.sh │ ├── test39.out │ ├── test39.sh │ ├── test4.out │ ├── test4.sh │ ├── test40.out │ ├── test40.sh │ ├── test41.out │ ├── test41.sh │ ├── test42.out │ ├── test42.sh │ ├── test43.out │ ├── test43.sh │ ├── test44.out │ ├── test44.sh │ ├── test45.out │ ├── test45.sh │ ├── test46.out │ ├── test46.sh │ ├── test47.out │ ├── test47.sh │ ├── test48.out │ ├── test48.sh │ ├── test49.out │ ├── test49.sh │ ├── test5.out │ ├── test5.sh │ ├── test50.out │ ├── test50.sh │ ├── test51.out │ ├── test51.sh │ ├── test52.out │ ├── test52.sh │ ├── test53.out │ ├── test53.sh │ ├── test54.out │ ├── test54.sh │ ├── test55.out │ ├── test55.sh │ ├── test56.out │ ├── test56.sh │ ├── test57.out │ ├── test57.sh │ ├── test58.out │ ├── test58.sh │ ├── test59.out │ ├── test59.sh │ ├── test6.out │ ├── test6.sh │ ├── test60.out │ ├── test60.sh │ ├── test61.out │ ├── test61.sh │ ├── test62.out │ ├── test62.sh │ ├── test63.out │ ├── test63.sh │ ├── test64.out │ ├── test64.sh │ ├── test65.out │ ├── test65.sh │ ├── test66.out │ ├── test66.sh │ ├── test67.out │ ├── test67.sh │ ├── test68.out │ ├── test68.sh │ ├── test69.out │ ├── test69.sh │ ├── test7.out │ ├── test7.sh │ ├── test70.out │ ├── test70.sh │ ├── test71.out │ ├── test71.sh │ ├── test72.out │ ├── test72.sh │ ├── test73.out │ ├── test73.sh │ ├── test74.out │ ├── test74.sh │ ├── test75.out │ ├── test75.sh │ ├── test76.out │ ├── test76.sh │ ├── test77.out │ ├── test77.sh │ ├── test78.out │ ├── test78.sh │ ├── test79.out │ ├── test79.sh │ ├── test8.out │ ├── test8.sh │ ├── test9.out │ └── test9.sh ├── fastops ├── CMakeLists.txt ├── avx │ ├── CMakeLists.txt │ ├── ops_avx.cpp │ └── ops_avx.h ├── avx2 │ ├── CMakeLists.txt │ ├── ops_avx2.cpp │ └── ops_avx2.h ├── core │ ├── FastIntrinsics.h │ ├── SIMDFunctions.h │ ├── avx_id.cpp │ └── avx_id.h ├── fastops.cpp ├── fastops.h ├── plain │ ├── CMakeLists.txt │ ├── ops_plain.cpp │ └── ops_plain.h └── ut │ ├── CMakeLists.txt │ └── fastops_ut.cpp └── tools ├── CMakeLists.txt ├── benchmark ├── CMakeLists.txt ├── benchmark.cpp ├── opts.h └── opts_tclap.cpp └── eval ├── CMakeLists.txt ├── eval.cpp ├── opts.h └── opts_tclap.cpp /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignoring build files 2 | /build/ -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | The following authors have created the source code of "Vector operations library" published and distributed by YANDEX LLC as the owner: 2 | 3 | Mikhail Parakhin -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.6) 2 | 3 | project(fastops) 4 | 5 | include_directories("${PROJECT_SOURCE_DIR}") 6 | set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/install) 7 | 8 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O3") 9 | 10 | # Specify the C++ 17 language standard for 11 | # any version of Microsoft Visual C++ Compiler 12 | if (MSVC) 13 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17") 14 | endif() 15 | 16 | add_subdirectory(fastops) 17 | add_subdirectory(tools) -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2019 YANDEX LLC 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /contrib/libs/fmath/readme.md: -------------------------------------------------------------------------------- 1 | 2 | fast approximate function of exponential function exp and log 3 | ================= 4 | 5 | How to use 6 | ----------- 7 | 8 | include fmath.hpp and use fmath::log, fmath::exp, fmath::expd. 9 | 10 | fmath::PowGenerator is a class to generate a function to compute pow(x, y) 11 | of x >= 0 for a given fixed y > 0. 12 | 13 | eg. 14 | fmath::PowGenerator f(1.234); 15 | f.get(x) returns pow(x, 1.234); 16 | 17 | Prototpye of function 18 | ----------- 19 | 20 | * float fmath::exp(float); 21 | * float fmath::log(float); 22 | * double fmath::logd(double); 23 | * 24 | * __m128 fmath::exp_ps(__m128); 25 | * __m128 fmath::log_ps(__m128); 26 | * void fmath::expv_d(double *p, size_t n); // for double p[n]; 27 | 28 | Experimental 29 | ----------- 30 | 31 | If you install [xbyak](https://github.com/herumi/xbyak/) 32 | and define FMATH_USE_XBYAK before including fmath.hpp, 33 | then fmath::exp() and fmath::exp_ps() will be about 10~20 % faster. 34 | Xbyak version uses SSE4.1 if available. 35 | 36 | ### AVX version of fmath::exp is experimental 37 | 38 | Remark 39 | ----------- 40 | 41 | gcc puts warnings such as "dereferencing type-punned pointer will break strict-aliasing rules." 42 | It is no problem. 43 | Please change #if 1 in fmath.hpp:423 if you worry about it. But it causes a little slower. 44 | 45 | -ffast-math option of gcc may generate bad code for fmath::expd. 46 | 47 | License 48 | ----------- 49 | 50 | >modified new BSD License 51 | >http://opensource.org/licenses/BSD-3-Clause 52 | 53 | History 54 | ----------- 55 | 56 | * 2012/Oct/30 fix fmath::expd for small value 57 | * 2011/Aug/26 add fmath::expd_v 58 | * 2011/Mar/25 exp supports AVX 59 | * 2011/Mar/25 exp, exp_ps support avx 60 | * 2010/Feb/16 add fmath::exp_ps, log_ps and optimize functions 61 | * 2010/Jan/10 add fmath::PowGenerator 62 | * 2009/Dec/28 add fmath::log() 63 | * 2009/Dec/09 support cygwin 64 | * 2009/Dec/08 first version 65 | 66 | Author 67 | ----------- 68 | 69 | MITSUNARI Shigeo(herumi@nifty.com) 70 | http://herumi.in.coocan.jp/ 71 | 72 | 73 | Benchmark 74 | ----------- 75 | ### compiler 76 | * Visual Studio 2010RC 77 | * icc 11.1 78 | * gcc 4.3.2 on cygwin 79 | * gcc 4.4.1 on 64bit Linux 80 | 81 | ### option 82 | 83 | * cl(icl): 84 | > /Ox /Ob2 /GS- /Zi /D_SECURE_SCL=0 /MD /Oy /arch:SSE2 /fp:fast /DNOMINMAX 85 | 86 | * gcc: 87 | > -O3 -fomit-frame-pointer -DNDEBUG -fno-operator-names -msse2 -mfpmath=sse -march=native 88 | 89 | see fastexp.cpp 90 | -------------------------------------------------------------------------------- /contrib/libs/tclap/AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | original author: Michael E. Smoot 3 | invaluable contributions: Daniel Aarno 4 | more contributions: Erik Zeek 5 | more contributions: Fabien Carmagnac (Tinbergen-AM) 6 | outstanding editing: Carol Smoot 7 | -------------------------------------------------------------------------------- /contrib/libs/tclap/COPYING: -------------------------------------------------------------------------------- 1 | 2 | 3 | Copyright (c) 2003 Michael E. Smoot 4 | Copyright (c) 2004 Daniel Aarno 5 | Copyright (c) 2017 Google Inc. 6 | 7 | Permission is hereby granted, free of charge, to any person 8 | obtaining a copy of this software and associated documentation 9 | files (the "Software"), to deal in the Software without restriction, 10 | including without limitation the rights to use, copy, modify, merge, 11 | publish, distribute, sublicense, and/or sell copies of the Software, 12 | and to permit persons to whom the Software is furnished to do so, 13 | subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 20 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 21 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 22 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 23 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | THE SOFTWARE. 26 | 27 | 28 | -------------------------------------------------------------------------------- /contrib/libs/tclap/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | ACLOCAL_AMFLAGS = -I config 3 | 4 | SUBDIRS = include examples docs tests msc config 5 | 6 | pkgconfigdir = $(libdir)/pkgconfig 7 | pkgconfig_DATA = $(PACKAGE).pc 8 | EXTRA_DIST = $(PACKAGE).pc.in 9 | 10 | DISTCLEANFILES = $(PACKAGE).pc 11 | -------------------------------------------------------------------------------- /contrib/libs/tclap/README: -------------------------------------------------------------------------------- 1 | 2 | TCLAP - Templatized Command Line Argument Parser 3 | 4 | This is a simple C++ library that facilitates parsing command line 5 | arguments in a type independent manner. It doesn't conform exactly 6 | to either the GNU or POSIX standards, although it is close. See 7 | docs/manual.html for descriptions of how things work or look at the 8 | simple examples in the examples dir. 9 | 10 | To find out what the latest changes are read the NEWS file in this directory. 11 | 12 | 13 | Any and all feedback is welcome to: Mike Smoot 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /contrib/libs/tclap/config/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | EXTRA_DIST = ac_cxx_have_sstream.m4\ 3 | ac_cxx_have_strstream.m4\ 4 | ac_cxx_namespaces.m4\ 5 | bb_enable_doxygen.m4 6 | 7 | 8 | -------------------------------------------------------------------------------- /contrib/libs/tclap/config/ac_cxx_have_long_long.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis AC_CXX_HAVE_LONG_LONG 2 | dnl 3 | dnl If the C++ implementation have a long long type 4 | dnl 5 | AC_DEFUN([AC_CXX_HAVE_LONG_LONG], 6 | [AC_LANG_SAVE 7 | AC_LANG_CPLUSPLUS 8 | AC_TRY_COMPILE([],[long long x = 1; return 0;], 9 | ac_cv_cxx_have_long_long=yes, ac_cv_cxx_have_long_long=no) 10 | 11 | if test "$ac_cv_cxx_have_long_long" = yes; then 12 | AC_DEFINE(HAVE_LONG_LONG, 1, 13 | [define if the C++ implementation have long long]) 14 | else 15 | AC_DEFINE(HAVE_LONG_LONG, 0, 16 | [define if the C++ implementation have long long]) 17 | fi 18 | AC_LANG_RESTORE 19 | ]) 20 | -------------------------------------------------------------------------------- /contrib/libs/tclap/config/ac_cxx_have_sstream.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis AC_CXX_HAVE_SSTREAM 2 | dnl 3 | dnl If the C++ library has a working stringstream, define HAVE_SSTREAM. 4 | dnl 5 | dnl @author Ben Stanley 6 | dnl @version $Id: ac_cxx_have_sstream.m4,v 1.2 2006/02/22 02:10:28 zeekec Exp $ 7 | dnl 8 | AC_DEFUN([AC_CXX_HAVE_SSTREAM], 9 | [AC_REQUIRE([AC_CXX_NAMESPACES]) 10 | AC_LANG_SAVE 11 | AC_LANG_CPLUSPLUS 12 | AC_CHECK_HEADERS(sstream) 13 | AC_CACHE_CHECK([whether the STL defines stringstream], 14 | [ac_cv_cxx_have_sstream], 15 | [AC_TRY_COMPILE([#include 16 | #ifdef HAVE_NAMESPACES 17 | using namespace std; 18 | #endif],[stringstream message; message << "Hello"; return 0;], 19 | ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no) 20 | ]) 21 | if test "$ac_cv_cxx_have_sstream" = yes; then 22 | AC_DEFINE(HAVE_SSTREAM,1,[define if the compiler has stringstream]) 23 | fi 24 | AC_LANG_RESTORE 25 | ]) 26 | -------------------------------------------------------------------------------- /contrib/libs/tclap/config/ac_cxx_have_strstream.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis AC_CXX_HAVE_STRSTREAM 2 | dnl 3 | dnl If the C++ library has a working strstream, define HAVE_CLASS_STRSTREAM. 4 | dnl 5 | dnl Adapted from ac_cxx_have_sstream.m4 by Steve Robbins 6 | dnl 7 | AC_DEFUN([AC_CXX_HAVE_STRSTREAM], 8 | [AC_REQUIRE([AC_CXX_NAMESPACES]) 9 | AC_LANG_SAVE 10 | AC_LANG_CPLUSPLUS 11 | AC_CHECK_HEADERS(strstream) 12 | AC_CACHE_CHECK([whether the STL defines strstream], 13 | [ac_cv_cxx_have_class_strstream], 14 | [AC_TRY_COMPILE([#if HAVE_STRSTREAM 15 | # include 16 | #else 17 | # include 18 | #endif 19 | #ifdef HAVE_NAMESPACES 20 | using namespace std; 21 | #endif],[ostrstream message; message << "Hello"; return 0;], 22 | ac_cv_cxx_have_class_strstream=yes, ac_cv_cxx_have_class_strstream=no) 23 | ]) 24 | if test "$ac_cv_cxx_have_class_strstream" = yes; then 25 | AC_DEFINE(HAVE_CLASS_STRSTREAM,1,[define if the library defines strstream]) 26 | fi 27 | AC_LANG_RESTORE 28 | ]) 29 | -------------------------------------------------------------------------------- /contrib/libs/tclap/config/ac_cxx_namespaces.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis AC_CXX_NAMESPACES 2 | dnl 3 | dnl If the compiler can prevent names clashes using namespaces, define 4 | dnl HAVE_NAMESPACES. 5 | dnl 6 | dnl @version $Id: ac_cxx_namespaces.m4,v 1.1 2003/03/19 02:40:00 mes5k Exp $ 7 | dnl @author Luc Maisonobe 8 | dnl 9 | AC_DEFUN([AC_CXX_NAMESPACES], 10 | [AC_CACHE_CHECK(whether the compiler implements namespaces, 11 | ac_cv_cxx_namespaces, 12 | [AC_LANG_SAVE 13 | AC_LANG_CPLUSPLUS 14 | AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], 15 | [using namespace Outer::Inner; return i;], 16 | ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) 17 | AC_LANG_RESTORE 18 | ]) 19 | if test "$ac_cv_cxx_namespaces" = yes; then 20 | AC_DEFINE(HAVE_NAMESPACES,1,[define to 1 if the compiler implements namespaces]) 21 | fi 22 | ]) 23 | -------------------------------------------------------------------------------- /contrib/libs/tclap/config/ac_cxx_warn_effective_cxx.m4: -------------------------------------------------------------------------------- 1 | dnl HAVE_WARN_EFFECTIVE_CXX 2 | dnl ---------------------- 3 | dnl 4 | dnl If the C++ compiler accepts the `-Weffc++' flag, 5 | dnl set output variable `WARN_EFFECTIVE_CXX' to `-Weffc++' and 6 | dnl `WARN_NO_EFFECTIVE_CXX' to `-Wno-effc++'. Otherwise, 7 | dnl leave both empty. 8 | dnl 9 | AC_DEFUN([HAVE_WARN_EFFECTIVE_CXX], 10 | [ 11 | AC_REQUIRE([AC_PROG_CXX]) 12 | AC_MSG_CHECKING([whether the C++ compiler (${CXX}) accepts -Weffc++]) 13 | AC_CACHE_VAL([cv_warn_effective_cxx], 14 | [ 15 | AC_LANG_SAVE 16 | AC_LANG_CPLUSPLUS 17 | save_cxxflags="$CXXFLAGS" 18 | CXXFLAGS="$CXXFLAGS -Weffc++" 19 | AC_TRY_COMPILE([],[main();], 20 | [cv_warn_effective_cxx=yes], [cv_warn_effective_cxx=no]) 21 | CXXFLAGS="$save_cxxflags" 22 | AC_LANG_RESTORE 23 | ]) 24 | AC_MSG_RESULT([$cv_warn_effective_cxx]) 25 | if test "$cv_warn_effective_cxx" = yes; then 26 | WARN_EFFECTIVE_CXX=-Weffc++ 27 | WARN_NO_EFFECTIVE_CXX=-Wno-effc++ 28 | fi 29 | AC_SUBST([WARN_EFFECTIVE_CXX]) 30 | AC_SUBST([WARN_NO_EFFECTIVE_CXX]) 31 | ]) 32 | -------------------------------------------------------------------------------- /contrib/libs/tclap/config/bb_enable_doxygen.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([BB_ENABLE_DOXYGEN], 2 | [ 3 | AC_ARG_ENABLE(doxygen, [--enable-doxygen enable documentation generation with doxygen (auto)]) 4 | if test "x$enable_doxygen" = xno; then 5 | enable_doc=no 6 | else 7 | AC_PATH_PROG(DOXYGEN, doxygen, , $PATH) 8 | if test x$DOXYGEN = x; then 9 | if test "x$enable_doxygen" = xyes; then 10 | AC_MSG_ERROR([could not find doxygen]) 11 | fi 12 | enable_doc=no 13 | else 14 | enable_doc=yes 15 | fi 16 | fi 17 | AM_CONDITIONAL(DOC, test x$enable_doc = xyes) 18 | ]) 19 | -------------------------------------------------------------------------------- /contrib/libs/tclap/config/config.h.in: -------------------------------------------------------------------------------- 1 | /* config/config.h.in. Generated from configure.in by autoheader. */ 2 | 3 | /* define if the library defines strstream */ 4 | #undef HAVE_CLASS_STRSTREAM 5 | 6 | /* Define to 1 if you have the header file. */ 7 | #undef HAVE_INTTYPES_H 8 | 9 | /* define if the C++ implementation have long long */ 10 | #undef HAVE_LONG_LONG 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #undef HAVE_MEMORY_H 14 | 15 | /* define to 1 if the compiler implements namespaces */ 16 | #undef HAVE_NAMESPACES 17 | 18 | /* define if the compiler has stringstream */ 19 | #undef HAVE_SSTREAM 20 | 21 | /* Define to 1 if you have the header file. */ 22 | #undef HAVE_STDINT_H 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #undef HAVE_STDLIB_H 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_STRINGS_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_STRING_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #undef HAVE_STRSTREAM 35 | 36 | /* Define to 1 if you have the header file. */ 37 | #undef HAVE_SYS_STAT_H 38 | 39 | /* Define to 1 if you have the header file. */ 40 | #undef HAVE_SYS_TYPES_H 41 | 42 | /* Define to 1 if you have the header file. */ 43 | #undef HAVE_UNISTD_H 44 | 45 | /* Name of package */ 46 | #undef PACKAGE 47 | 48 | /* Define to the address where bug reports for this package should be sent. */ 49 | #undef PACKAGE_BUGREPORT 50 | 51 | /* Define to the full name of this package. */ 52 | #undef PACKAGE_NAME 53 | 54 | /* Define to the full name and version of this package. */ 55 | #undef PACKAGE_STRING 56 | 57 | /* Define to the one symbol short name of this package. */ 58 | #undef PACKAGE_TARNAME 59 | 60 | /* Define to the home page for this package. */ 61 | #undef PACKAGE_URL 62 | 63 | /* Define to the version of this package. */ 64 | #undef PACKAGE_VERSION 65 | 66 | /* Define to 1 if you have the ANSI C header files. */ 67 | #undef STDC_HEADERS 68 | 69 | /* Version number of package */ 70 | #undef VERSION 71 | -------------------------------------------------------------------------------- /contrib/libs/tclap/config/mkinstalldirs: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # mkinstalldirs --- make directory hierarchy 3 | # Author: Noah Friedman 4 | # Created: 1993-05-16 5 | # Public domain 6 | 7 | # $Id: mkinstalldirs,v 1.1 2003/04/03 18:13:41 mes5k Exp $ 8 | 9 | errstatus=0 10 | 11 | for file 12 | do 13 | set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` 14 | shift 15 | 16 | pathcomp= 17 | for d 18 | do 19 | pathcomp="$pathcomp$d" 20 | case "$pathcomp" in 21 | -* ) pathcomp=./$pathcomp ;; 22 | esac 23 | 24 | if test ! -d "$pathcomp"; then 25 | echo "mkdir $pathcomp" 26 | 27 | mkdir "$pathcomp" || lasterr=$? 28 | 29 | if test ! -d "$pathcomp"; then 30 | errstatus=$lasterr 31 | fi 32 | fi 33 | 34 | pathcomp="$pathcomp/" 35 | done 36 | done 37 | 38 | exit $errstatus 39 | 40 | # mkinstalldirs ends here 41 | -------------------------------------------------------------------------------- /contrib/libs/tclap/configure.in: -------------------------------------------------------------------------------- 1 | AC_INIT(Makefile.am) 2 | #AC_PREREQ(2.50) 3 | AC_CONFIG_AUX_DIR(config) 4 | AM_CONFIG_HEADER(config/config.h) 5 | AM_INIT_AUTOMAKE(tclap,1.2.2) 6 | AC_PROG_CXX 7 | AC_CXX_HAVE_SSTREAM 8 | AC_CXX_HAVE_STRSTREAM 9 | AC_CXX_HAVE_LONG_LONG 10 | AC_CHECK_PROG(DOT,dot,YES,NO) 11 | AC_PROG_RANLIB 12 | AC_PROG_INSTALL 13 | BB_ENABLE_DOXYGEN 14 | 15 | HAVE_WARN_EFFECTIVE_CXX 16 | CXXFLAGS="$CXXFLAGS $WARN_EFFECTIVE_CXX" 17 | 18 | AM_CONDITIONAL([HAVE_GNU_COMPILERS], [test x$ac_cv_cxx_compiler_gnu = xyes]) 19 | 20 | AC_OUTPUT([ Makefile \ 21 | tclap.pc \ 22 | examples/Makefile \ 23 | include/Makefile \ 24 | include/tclap/Makefile \ 25 | config/Makefile \ 26 | docs/Makefile \ 27 | docs/Doxyfile \ 28 | msc/Makefile \ 29 | msc/examples/Makefile \ 30 | tests/Makefile], \ 31 | [chmod a+x $ac_top_srcdir/tests/*.sh]) 32 | -------------------------------------------------------------------------------- /contrib/libs/tclap/docs/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | if DOC 3 | 4 | all: 5 | @DOXYGEN@ Doxyfile 6 | 7 | else 8 | 9 | all: 10 | 11 | endif 12 | 13 | EXTRA_DIST = manual.xml 14 | dist_doc_DATA = index.html manual.html style.css 15 | docdir = ${datadir}/doc/${PACKAGE} 16 | 17 | install-data-local : 18 | $(mkdir_p) $(DESTDIR)$(docdir) 19 | cp -R $(abs_srcdir)/html $(DESTDIR)$(docdir) 20 | 21 | uninstall-local : 22 | chmod -R o+w $(DESTDIR)$(docdir) 23 | rm -rf $(DESTDIR)$(docdir) 24 | 25 | dist-hook : 26 | $(mkdir_p) $(distdir) 27 | cp -R $(abs_srcdir)/html $(distdir) 28 | 29 | clean-local: 30 | $(RM) -rf $(abs_builddir)/html/* 31 | $(RM) -rf $(abs_builddir)/doxygen_sqlite3.db 32 | 33 | -------------------------------------------------------------------------------- /contrib/libs/tclap/docs/README: -------------------------------------------------------------------------------- 1 | 2 | To generate the manual from the docbook xml you need and xslt processor 3 | and an xsl file that defines the output. For example: 4 | 5 | xsltproc --stringparam html.stylesheet style.css /Users/mes/software/docbook-xsl-1.71.1/xhtml/docbook.xsl manual.xml > manual.html 6 | -------------------------------------------------------------------------------- /contrib/libs/tclap/docs/index.html: -------------------------------------------------------------------------------- 1 | 20 | 22 | 23 | 24 | 26 | tclap -- Templatized C++ Command Line Parser Library 27 | 28 | 29 | 30 | 31 | 32 | 35 | 38 | 39 |
33 |

Templatized C++ Command Line Parser Library

34 |
36 | Get Templatized C++ Command Line Parser at SourceForge.net. Fast, secure and Free Open Source software downloads 37 |
40 | 51 |
52 | 53 |

54 | TCLAP is a small, flexible library that provides a simple interface for 55 | defining and accessing command line arguments. It was intially 56 | inspired by the user friendly CLAP libary. The 58 | difference is that this library is templatized, so the argument 59 | class is type independent. Type independence avoids identical-except-for-type 60 | objects, such as IntArg, FloatArg, and StringArg. While the library is 61 | not strictly compliant with the GNU or POSIX standards, it is 62 | close. 63 |

64 | 65 |

66 | TCLAP is written in ANSI C++ and is meant to be compatible with any 67 | standards-compliant C++ compiler. It is known to work on Linux, MacOS X, 68 | Windows, and Solaris platforms. The library is implemented 69 | entirely in header files making it easy to use and distribute with other 70 | software. It is licensed under the 71 | MIT License 72 | for worry free distribution. 73 |

74 |

75 | TCLAP is now a mature, stable, and feature rich package. 76 | Unless I get really bored, it probably won't see much further 77 | development aside from bug fixes and compatibility updates. 78 | Please don't let any apparent project inactivity discourage you 79 | from using the software! 80 |

81 |

82 | Don't hesitate to 83 | send us your feedback! 84 |

85 | 86 |

87 | Happy coding! 88 |

89 |
90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /contrib/libs/tclap/docs/style.css: -------------------------------------------------------------------------------- 1 | /* 2 | color:#ffffff; white 3 | color:#e0e0e0; light gray 4 | color:#f8f8f8; light gray 5 | color:#003366; dark blue 6 | color:#555555; gray 7 | color:#ff9933; light orange 8 | color:#cc3300; red/brown/orange 9 | color:#660066; purple 10 | color:#669900; green 11 | */ 12 | 13 | a { 14 | color:#003366; 15 | text-decoration:underline; 16 | } 17 | 18 | a:hover { 19 | color:#ff9933; 20 | } 21 | 22 | body { 23 | font-family: verdana, tahoma, helvetica, arial, sans-serif; 24 | font-size: 90%; 25 | background-color:#ffffff; 26 | margin: 1em; 27 | } 28 | 29 | pre { 30 | font-family: courier, serif; 31 | background-color:#f8f8f8; 32 | margin: 1.5em; 33 | font-size:90%; 34 | } 35 | 36 | ul { 37 | list-style: circle outside; 38 | font-stretch:extra-expanded; 39 | /* font-size:90%;*/ 40 | } 41 | 42 | ul.menu { /* inherits from ul */ 43 | padding-left: 1em; 44 | } 45 | 46 | 47 | em { 48 | color:#ff9933; 49 | font-size:110%; 50 | } 51 | 52 | h1,h2,h3{ 53 | color:#ff9933; 54 | } 55 | 56 | h1 { 57 | border-color:#d0d0d0; 58 | border-style:solid; 59 | border-width:1px; 60 | font-weight:bold; 61 | padding: 0.2em; 62 | background-color:#f8f8f8 63 | } 64 | 65 | h2 { 66 | font-size:120%; 67 | font-weight:bold; 68 | border-bottom-style:solid; 69 | border-bottom-width:1px; 70 | border-bottom-color:#d0d0d0; 71 | } 72 | 73 | h3 { 74 | font-size:110%; 75 | font-weight:bold; 76 | font-style:italic; 77 | } 78 | 79 | tt { 80 | font-family: courier, serif; 81 | } 82 | 83 | tt.classname { 84 | font-weight:bold; 85 | } 86 | 87 | tt.constant { 88 | font-weight:bold; 89 | } 90 | 91 | 92 | p { 93 | line-height: 1.5em; 94 | } 95 | 96 | 97 | div.links{ 98 | float: left; 99 | clear: left; 100 | width: 12em; 101 | background-color:#f8f8f8; 102 | border-style:solid; 103 | border-width:1px; 104 | border-color:#d0d0d0; 105 | margin-bottom: 0.5em; 106 | padding: 0.5em 0.5em 0.5em 0.5em; 107 | margin: 0.5em 0.5em 0em 0em; 108 | } 109 | 110 | div.main{ 111 | border-style:solid; 112 | border-width:1px; 113 | border-color:#d0d0d0; 114 | margin: 0.5em 0em 0.5em 14em; 115 | padding: 0.5em 0.5em 0.5em 0.5em; 116 | } 117 | 118 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | noinst_PROGRAMS = test1 test2 test3 test4 test5 test6 test7 test8 test9 \ 3 | test10 test11 test12 test13 test14 test15 test16 \ 4 | test17 test18 test19 test20 test21 5 | 6 | test1_SOURCES = test1.cpp 7 | test2_SOURCES = test2.cpp 8 | test3_SOURCES = test3.cpp 9 | test4_SOURCES = test4.cpp 10 | test5_SOURCES = test5.cpp 11 | test6_SOURCES = test6.cpp 12 | test7_SOURCES = test7.cpp 13 | test8_SOURCES = test8.cpp 14 | test9_SOURCES = test9.cpp 15 | test10_SOURCES = test10.cpp 16 | test11_SOURCES = test11.cpp 17 | test12_SOURCES = test12.cpp 18 | test13_SOURCES = test13.cpp 19 | test14_SOURCES = test14.cpp 20 | test15_SOURCES = test15.cpp 21 | test16_SOURCES = test16.cpp 22 | test17_SOURCES = test17.cpp test17-a.cpp 23 | test18_SOURCES = test18.cpp 24 | test19_SOURCES = test19.cpp 25 | test20_SOURCES = test20.cpp 26 | test21_SOURCES = test21.cpp 27 | 28 | AM_CPPFLAGS = -I$(top_srcdir)/include 29 | 30 | if HAVE_GNU_COMPILERS 31 | AM_CXXFLAGS = -Wall -Wextra 32 | endif 33 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "tclap/CmdLine.h" 5 | 6 | using namespace TCLAP; 7 | using namespace std; 8 | 9 | int main(int argc, char** argv) 10 | { 11 | // Wrap everything in a try block. Do this every time, 12 | // because exceptions will be thrown for problems. 13 | try { 14 | 15 | // Define the command line object. 16 | CmdLine cmd("Command description message", ' ', "0.9"); 17 | 18 | // Define a value argument and add it to the command line. 19 | ValueArg nameArg("n","name","Name to print",true,"homer","string"); 20 | cmd.add( nameArg ); 21 | 22 | // Define a switch and add it to the command line. 23 | SwitchArg reverseSwitch("r","reverse","Print name backwards", false); 24 | cmd.add( reverseSwitch ); 25 | 26 | // Parse the args. 27 | cmd.parse( argc, argv ); 28 | 29 | // Get the value parsed by each arg. 30 | string name = nameArg.getValue(); 31 | bool reverseName = reverseSwitch.getValue(); 32 | 33 | // Do what you intend too... 34 | if ( reverseName ) 35 | { 36 | reverse(name.begin(),name.end()); 37 | cout << "My name (spelled backwards) is: " << name << endl; 38 | } 39 | else 40 | cout << "My name is: " << name << endl; 41 | 42 | 43 | } catch (ArgException &e) // catch any exceptions 44 | { cerr << "error: " << e.error() << " for arg " << e.argId() << endl; } 45 | } 46 | 47 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test10.cpp: -------------------------------------------------------------------------------- 1 | // Test only makes sure we can use different argv types for the 2 | // parser. Don't run, just compile. 3 | 4 | #include "tclap/CmdLine.h" 5 | 6 | using namespace TCLAP; 7 | int main() 8 | { 9 | char *argv5[] = {(char*)"Foo", 0}; 10 | const char *argv6[] = {"Foo", 0}; 11 | const char * const argv7[] = {"Foo", 0}; 12 | char **argv1 = argv5; 13 | const char **argv2 = argv6; 14 | const char * const * argv3 = argv7; 15 | const char * const * const argv4 = argv7; 16 | 17 | CmdLine cmd("Command description message", ' ', "0.9"); 18 | cmd.parse(0, argv1); 19 | cmd.parse(0, argv2); 20 | cmd.parse(0, argv3); 21 | cmd.parse(0, argv4); 22 | cmd.parse(0, argv5); 23 | cmd.parse(0, argv6); 24 | cmd.parse(0, argv7); 25 | } 26 | 27 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test11.cpp: -------------------------------------------------------------------------------- 1 | #include "tclap/CmdLine.h" 2 | #include 3 | 4 | #include 5 | 6 | using namespace TCLAP; 7 | 8 | // Define a simple 3D vector type 9 | struct Vect3D { 10 | double v[3]; 11 | 12 | // operator= will be used to assign to the vector 13 | Vect3D& operator=(const std::string &str) 14 | { 15 | std::istringstream iss(str); 16 | if (!(iss >> v[0] >> v[1] >> v[2])) 17 | throw TCLAP::ArgParseException(str + " is not a 3D vector"); 18 | 19 | return *this; 20 | } 21 | 22 | std::ostream& print(std::ostream &os) const 23 | { 24 | std::copy(v, v + 3, std::ostream_iterator(os, " ")); 25 | return os; 26 | } 27 | }; 28 | 29 | // Create an ArgTraits for the 3D vector type that declares it to be 30 | // of string like type 31 | namespace TCLAP { 32 | template<> 33 | struct ArgTraits { 34 | typedef StringLike ValueCategory; 35 | }; 36 | } 37 | 38 | int main(int argc, char *argv[]) 39 | { 40 | CmdLine cmd("Command description message", ' ', "0.9"); 41 | ValueArg vec("v", "vect", "vector", 42 | true, Vect3D(), "3D vector", cmd); 43 | 44 | try { 45 | cmd.parse(argc, argv); 46 | } catch(std::exception &e) { 47 | std::cout << e.what() << std::endl; 48 | return EXIT_FAILURE; 49 | } 50 | 51 | vec.getValue().print(std::cout); 52 | std::cout << std::endl; 53 | } 54 | 55 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test12.cpp: -------------------------------------------------------------------------------- 1 | #include "tclap/CmdLine.h" 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | using namespace TCLAP; 8 | 9 | // Define a simple 3D vector type 10 | struct Vect3D { 11 | double v[3]; 12 | 13 | // operator= will be used to assign to the vector 14 | Vect3D& operator=(const std::string &str) 15 | { 16 | std::istringstream iss(str); 17 | if (!(iss >> v[0] >> v[1] >> v[2])) 18 | throw TCLAP::ArgParseException(str + " is not a 3D vector"); 19 | 20 | return *this; 21 | } 22 | 23 | std::ostream& print(std::ostream &os) const 24 | { 25 | std::copy(v, v + 3, std::ostream_iterator(os, " ")); 26 | return os; 27 | } 28 | 29 | }; 30 | 31 | std::ostream& operator<<(std::ostream &os, const Vect3D &v) 32 | { 33 | return v.print(os); 34 | } 35 | 36 | // Create an ArgTraits for the 3D vector type that declares it to be 37 | // of string like type 38 | namespace TCLAP { 39 | template<> 40 | struct ArgTraits { 41 | typedef StringLike ValueCategory; 42 | }; 43 | } 44 | 45 | int main(int argc, char *argv[]) 46 | { 47 | CmdLine cmd("Command description message", ' ', "0.9"); 48 | MultiArg vec("v", "vect", "vector", 49 | true, "3D vector", cmd); 50 | 51 | try { 52 | cmd.parse(argc, argv); 53 | } catch(std::exception &e) { 54 | std::cout << e.what() << std::endl; 55 | return EXIT_FAILURE; 56 | } 57 | 58 | std::copy(vec.begin(), vec.end(), 59 | std::ostream_iterator(std::cout, "\n")); 60 | 61 | std::cout << "REVERSED" << std::endl; 62 | 63 | // use alt. form getValue() 64 | std::vector v(vec.getValue()); 65 | std::reverse(v.begin(), v.end()); 66 | 67 | std::copy(v.begin(), v.end(), 68 | std::ostream_iterator(std::cout, "\n")); 69 | } 70 | 71 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test13.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | 6 | using namespace TCLAP; 7 | 8 | // 9 | // This file tests that we can parse args from a vector 10 | // of strings rather than argv. This also tests a bug 11 | // where a single element in the vector contains both 12 | // the flag and value AND the value contains the flag 13 | // from another switch arg. This would fool the parser 14 | // into thinking that the string was a combined switches 15 | // string rather than a flag value combo. 16 | // 17 | // This should not print an error 18 | // 19 | // Contributed by Nico Lugil. 20 | // 21 | int main() 22 | { 23 | 24 | try 25 | { 26 | CmdLine cmd("Test", ' ', "not versioned",true); 27 | 28 | MultiArg Arg("X","fli","fli module",false,"string"); 29 | cmd.add(Arg); 30 | MultiSwitchArg ArgMultiSwitch("d","long_d","example"); 31 | cmd.add(ArgMultiSwitch); 32 | 33 | std::vector in; 34 | in.push_back("prog name"); 35 | in.push_back("-X module"); 36 | cmd.parse(in); 37 | 38 | std::vector s = Arg.getValue(); 39 | for(unsigned int i = 0 ; i < s.size() ; i++) 40 | { 41 | std::cout << s[i] << "\n"; 42 | } 43 | std::cout << "MultiSwtichArg was found " << ArgMultiSwitch.getValue() << " times.\n"; 44 | 45 | } 46 | catch (ArgException &e) // catch any exceptions 47 | { 48 | std::cerr << "error: " << e.error() << " for arg " << e.argId() << std::endl; 49 | } 50 | 51 | std::cout << "done...\n"; 52 | 53 | return 0; 54 | } 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test14.cpp: -------------------------------------------------------------------------------- 1 | #include "tclap/CmdLine.h" 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | // Define a simple 3D vector type 8 | template 9 | struct Vect : public TCLAP::StringLikeTrait { 10 | //typedef TCLAP::StringLike ValueCategory; 11 | T v[LEN]; 12 | 13 | // operator= will be used to assign to the vector 14 | Vect& operator=(const std::string &str) 15 | { 16 | std::istringstream iss(str); 17 | for (size_t n = 0; n < LEN; n++) { 18 | if (!(iss >> v[n])) { 19 | std::ostringstream oss; 20 | oss << " is not a vector of size " << LEN; 21 | throw TCLAP::ArgParseException(str + oss.str()); 22 | } 23 | } 24 | 25 | if (!iss.eof()) { 26 | std::ostringstream oss; 27 | oss << " is not a vector of size " << LEN; 28 | throw TCLAP::ArgParseException(str + oss.str()); 29 | } 30 | 31 | return *this; 32 | } 33 | 34 | std::ostream& print(std::ostream &os) const 35 | { 36 | std::copy(v, v + LEN, std::ostream_iterator(os, " ")); 37 | return os; 38 | } 39 | 40 | }; 41 | 42 | int main(int argc, char *argv[]) 43 | { 44 | TCLAP::CmdLine cmd("Command description message", ' ', "0.9"); 45 | TCLAP::ValueArg< Vect > vec("v", "vect", "vector", 46 | true, Vect(), 47 | "3D vector", cmd); 48 | 49 | try { 50 | cmd.parse(argc, argv); 51 | } catch(std::exception &e) { 52 | std::cout << e.what() << std::endl; 53 | return EXIT_FAILURE; 54 | } 55 | 56 | vec.getValue().print(std::cout); 57 | std::cout << std::endl; 58 | } 59 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test15.cpp: -------------------------------------------------------------------------------- 1 | #include "tclap/CmdLine.h" 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | // Define a simple 3D vector type 8 | template 9 | struct Vect { 10 | typedef TCLAP::StringLike ValueCategory; 11 | T v[LEN]; 12 | 13 | // operator= will be used to assign to the vector 14 | Vect& operator=(const std::string &str) 15 | { 16 | std::istringstream iss(str); 17 | for (size_t n = 0; n < LEN; n++) { 18 | if (!(iss >> v[n])) { 19 | std::ostringstream oss; 20 | oss << " is not a vector of size " << LEN; 21 | throw TCLAP::ArgParseException(str + oss.str()); 22 | } 23 | } 24 | 25 | if (!iss.eof()) { 26 | std::ostringstream oss; 27 | oss << " is not a vector of size " << LEN; 28 | throw TCLAP::ArgParseException(str + oss.str()); 29 | } 30 | 31 | return *this; 32 | } 33 | 34 | std::ostream& print(std::ostream &os) const 35 | { 36 | std::copy(v, v + LEN, std::ostream_iterator(os, " ")); 37 | return os; 38 | } 39 | 40 | }; 41 | 42 | int main(int argc, char *argv[]) 43 | { 44 | TCLAP::CmdLine cmd("Command description message", ' ', "0.9"); 45 | TCLAP::ValueArg< Vect > vec("v", "vect", "vector", 46 | true, Vect(), 47 | "3D vector", cmd); 48 | 49 | try { 50 | cmd.parse(argc, argv); 51 | } catch(std::exception &e) { 52 | std::cout << e.what() << std::endl; 53 | return EXIT_FAILURE; 54 | } 55 | 56 | vec.getValue().print(std::cout); 57 | std::cout << std::endl; 58 | } 59 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test16.cpp: -------------------------------------------------------------------------------- 1 | #include "tclap/CmdLine.h" 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | namespace TCLAP { 8 | template<> 9 | struct ArgTraits< std::vector > { 10 | typedef StringLike ValueCategory; 11 | }; 12 | 13 | template<> 14 | void SetString< std::vector >(std::vector &v, 15 | const std::string &s) 16 | { 17 | std::istringstream iss(s); 18 | while (iss) { 19 | double tmp; 20 | iss >> tmp; 21 | v.push_back(tmp); 22 | } 23 | } 24 | } 25 | 26 | int main(int argc, char *argv[]) 27 | { 28 | TCLAP::CmdLine cmd("Command description message", ' ', "0.9"); 29 | TCLAP::ValueArg< std::vector > vec("v", "vect", "vector", 30 | true, std::vector(), 31 | "3D vector", cmd); 32 | try { 33 | cmd.parse(argc, argv); 34 | } catch(std::exception &e) { 35 | std::cout << e.what() << std::endl; 36 | return EXIT_FAILURE; 37 | } 38 | 39 | const std::vector &v = vec.getValue(); 40 | std::copy(v.begin(), v.end(), 41 | std::ostream_iterator(std::cout, "\n")); 42 | std::cout << std::endl; 43 | } 44 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test17-a.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test17.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { } 4 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test18.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "tclap/CmdLine.h" 5 | 6 | using namespace TCLAP; 7 | using namespace std; 8 | 9 | int main(int argc, char** argv) 10 | { 11 | try { 12 | 13 | CmdLine cmd("Command description message", ' ', "0.9", true); 14 | 15 | cmd.setExceptionHandling(false); 16 | 17 | cmd.parse(argc, argv); 18 | 19 | } catch (ArgException &e) { // catch any exceptions 20 | cerr << "error: " << e.error() << " for arg " << e.argId() << endl; 21 | return 1; 22 | } catch (ExitException &e) { // catch any exceptions 23 | cerr << "Exiting on ExitException." << endl; 24 | return e.getExitStatus(); 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test19.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #define TCLAP_SETBASE_ZERO 1 4 | 5 | #include "tclap/CmdLine.h" 6 | #include 7 | #include 8 | 9 | 10 | using namespace TCLAP; 11 | using namespace std; 12 | 13 | int main(int argc, char** argv) 14 | { 15 | 16 | try { 17 | 18 | CmdLine cmd("this is a message", ' ', "0.99" ); 19 | 20 | ValueArg itest("i", "intTest", "integer test", true, 5, "int"); 21 | cmd.add( itest ); 22 | 23 | // 24 | // Parse the command line. 25 | // 26 | cmd.parse(argc,argv); 27 | 28 | // 29 | // Set variables 30 | // 31 | int _intTest = itest.getValue(); 32 | cout << "found int: " << _intTest << endl; 33 | 34 | } catch ( ArgException& e ) 35 | { cout << "ERROR: " << e.error() << " " << e.argId() << endl; } 36 | } 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test2.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "tclap/CmdLine.h" 4 | #include 5 | #include 6 | 7 | using namespace TCLAP; 8 | using namespace std; 9 | 10 | int _intTest; 11 | float _floatTest; 12 | bool _boolTestA; 13 | bool _boolTestB; 14 | bool _boolTestC; 15 | string _stringTest; 16 | string _utest; 17 | 18 | void parseOptions(int argc, char** argv); 19 | 20 | int main(int argc, char** argv) 21 | { 22 | 23 | parseOptions(argc,argv); 24 | 25 | cout << "for float we got : " << _floatTest << endl 26 | << "for int we got : " << _intTest<< endl 27 | << "for string we got : " << _stringTest<< endl 28 | << "for ulabeled we got : " << _utest << endl 29 | << "for bool A we got : " << _boolTestA << endl 30 | << "for bool B we got : " << _boolTestB << endl 31 | << "for bool C we got : " << _boolTestC << endl; 32 | 33 | } 34 | 35 | 36 | void parseOptions(int argc, char** argv) 37 | { 38 | try { 39 | 40 | CmdLine cmd("this is a message", ' ', "0.99" ); 41 | 42 | // 43 | // Define arguments 44 | // 45 | 46 | SwitchArg btest("B","existTestB", "tests for the existence of B", false); 47 | cmd.add( btest ); 48 | 49 | SwitchArg ctest("C","existTestC", "tests for the existence of C", false); 50 | cmd.add( ctest ); 51 | 52 | SwitchArg atest("A","existTestA", "tests for the existence of A", false); 53 | cmd.add( atest ); 54 | 55 | ValueArg stest("s","stringTest","string test",true,"homer", 56 | "string"); 57 | cmd.add( stest ); 58 | 59 | ValueArg itest("i", "intTest", "integer test", true, 5, "int"); 60 | cmd.add( itest ); 61 | 62 | ValueArg ftest("f", "floatTest", "float test", false, 3.7, "float"); 63 | cmd.add( ftest ); 64 | 65 | UnlabeledValueArg utest("unTest","unlabeld test", true, 66 | "default","string"); 67 | cmd.add( utest ); 68 | 69 | UnlabeledMultiArg mtest("fileName", "file names", false, "string"); 70 | cmd.add( mtest ); 71 | 72 | // 73 | // Parse the command line. 74 | // 75 | cmd.parse(argc,argv); 76 | 77 | // 78 | // Set variables 79 | // 80 | _intTest = itest.getValue(); 81 | _floatTest = ftest.getValue(); 82 | _stringTest = stest.getValue(); 83 | _boolTestB = btest.getValue(); 84 | _boolTestC = ctest.getValue(); 85 | _boolTestA = atest.getValue(); 86 | _utest = utest.getValue(); 87 | 88 | vector v = mtest.getValue(); 89 | for ( int i = 0; static_cast(i) < v.size(); i++ ) 90 | cout << i << " " << v[i] << endl; 91 | 92 | } catch ( ArgException& e ) 93 | { cout << "ERROR: " << e.error() << " " << e.argId() << endl; } 94 | } 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test20.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace TCLAP; 7 | using namespace std; 8 | 9 | int main(int argc, char** argv) 10 | { 11 | // Wrap everything in a try block. Do this every time, 12 | // because exceptions will be thrown for problems. 13 | try { 14 | 15 | // Define the command line object. 16 | CmdLine cmd("Command description message", '=', "0.9"); 17 | 18 | SwitchArg atmcSwitch("a", "atmc", "aContinuous time semantics", false); 19 | SwitchArg btmcSwitch("b", "btmc", "bDiscrete time semantics", false); 20 | cmd.xorAdd(atmcSwitch, btmcSwitch); 21 | 22 | // Parse the args. 23 | cmd.parse( argc, argv ); 24 | 25 | } catch (ArgException &e) // catch any exceptions 26 | { cerr << "error: " << e.error() << " for arg " << e.argId() << endl; } 27 | } 28 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test21.cpp: -------------------------------------------------------------------------------- 1 | 2 | // This illustrates how to change the flag and name start strings. 3 | // Note that these defines need to happen *before* tclap is included! 4 | #define TCLAP_NAMESTARTSTRING "~~" 5 | #define TCLAP_FLAGSTARTSTRING "/" 6 | 7 | #include 8 | #include 9 | #include 10 | #include "tclap/CmdLine.h" 11 | 12 | using namespace TCLAP; 13 | using namespace std; 14 | 15 | int main(int argc, char** argv) 16 | { 17 | // Wrap everything in a try block. Do this every time, 18 | // because exceptions will be thrown for problems. 19 | try { 20 | 21 | // Define the command line object. 22 | CmdLine cmd("Command description message", ' ', "0.9"); 23 | 24 | // Define a value argument and add it to the command line. 25 | ValueArg nameArg("n","name","Name to print",true,"homer","string"); 26 | cmd.add( nameArg ); 27 | 28 | // Define a switch and add it to the command line. 29 | SwitchArg reverseSwitch("r","reverse","Print name backwards", false); 30 | cmd.add( reverseSwitch ); 31 | 32 | // Parse the args. 33 | cmd.parse( argc, argv ); 34 | 35 | // Get the value parsed by each arg. 36 | string name = nameArg.getValue(); 37 | bool reverseName = reverseSwitch.getValue(); 38 | 39 | // Do what you intend too... 40 | if ( reverseName ) 41 | { 42 | reverse(name.begin(),name.end()); 43 | cout << "My name (spelled backwards) is: " << name << endl; 44 | } 45 | else 46 | cout << "My name is: " << name << endl; 47 | 48 | 49 | } catch (ArgException &e) // catch any exceptions 50 | { cerr << "error: " << e.error() << " for arg " << e.argId() << endl; } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test3.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "tclap/CmdLine.h" 4 | #include 5 | #include 6 | 7 | using namespace TCLAP; 8 | using namespace std; 9 | 10 | bool _boolTestB; 11 | string _stringTest; 12 | string _utest; 13 | string _ztest; 14 | 15 | void parseOptions(int argc, char** argv); 16 | 17 | int main(int argc, char** argv) 18 | { 19 | 20 | parseOptions(argc,argv); 21 | 22 | cout << "for string we got : " << _stringTest<< endl 23 | << "for ulabeled one we got : " << _utest << endl 24 | << "for ulabeled two we got : " << _ztest << endl 25 | << "for bool B we got : " << _boolTestB << endl; 26 | 27 | } 28 | 29 | 30 | void parseOptions(int argc, char** argv) 31 | { 32 | try { 33 | 34 | CmdLine cmd("this is a message", '=', "0.99" ); 35 | 36 | // 37 | // Define arguments 38 | // 39 | 40 | SwitchArg btest("B","existTestB", "exist Test B", false); 41 | cmd.add( btest ); 42 | 43 | ValueArg stest("", "stringTest", "string test", true, "homer", 44 | "string"); 45 | cmd.add( stest ); 46 | 47 | UnlabeledValueArg utest("unTest1","unlabeled test one", true, 48 | "default","string"); 49 | cmd.add( utest ); 50 | 51 | UnlabeledValueArg ztest("unTest2","unlabeled test two", true, 52 | "default","string"); 53 | cmd.add( ztest ); 54 | 55 | MultiArg itest("i", "intTest", "multi int test", false,"int" ); 56 | cmd.add( itest ); 57 | 58 | MultiArg ftest("f", "floatTest", "multi float test", false,"float" ); 59 | cmd.add( ftest ); 60 | 61 | UnlabeledMultiArg mtest("fileName","file names",false, 62 | "fileNameString"); 63 | cmd.add( mtest ); 64 | // 65 | // Parse the command line. 66 | // 67 | cmd.parse(argc,argv); 68 | 69 | 70 | // 71 | // Set variables 72 | // 73 | _stringTest = stest.getValue(); 74 | _boolTestB = btest.getValue(); 75 | _utest = utest.getValue(); 76 | _ztest = ztest.getValue(); 77 | 78 | vector vi = itest.getValue(); 79 | for ( int i = 0; static_cast(i) < vi.size(); i++ ) 80 | cout << "[-i] " << i << " " << vi[i] << endl; 81 | 82 | vector vf = ftest.getValue(); 83 | for ( int i = 0; static_cast(i) < vf.size(); i++ ) 84 | cout << "[-f] " << i << " " << vf[i] << endl; 85 | 86 | vector v = mtest.getValue(); 87 | for ( int i = 0; static_cast(i) < v.size(); i++ ) 88 | cout << "[ ] " << i << " " << v[i] << endl; 89 | 90 | } catch ( ArgException& e ) 91 | { cout << "ERROR: " << e.error() << " " << e.argId() << endl; } 92 | } 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test4.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "tclap/CmdLine.h" 4 | #include "tclap/DocBookOutput.h" 5 | #include "tclap/ZshCompletionOutput.h" 6 | #include 7 | #include 8 | 9 | using namespace TCLAP; 10 | using namespace std; 11 | 12 | 13 | // This exemplifies how the output class can be overridden to provide 14 | // user defined output. 15 | class MyOutput : public StdOutput 16 | { 17 | public: 18 | 19 | virtual void failure(CmdLineInterface& c, ArgException& e) 20 | { 21 | static_cast(c); // Ignore input, don't warn 22 | cerr << "my failure message: " << endl 23 | << e.what() << endl; 24 | exit(1); 25 | } 26 | 27 | virtual void usage(CmdLineInterface& c) 28 | { 29 | cout << "my usage message:" << endl; 30 | list args = c.getArgList(); 31 | for (ArgListIterator it = args.begin(); it != args.end(); it++) 32 | cout << (*it)->longID() 33 | << " (" << (*it)->getDescription() << ")" << endl; 34 | } 35 | 36 | virtual void version(CmdLineInterface& c) 37 | { 38 | static_cast(c); // Ignore input, don't warn 39 | cout << "my version message: 0.1" << endl; 40 | } 41 | }; 42 | 43 | 44 | bool _boolTestB; 45 | bool _boolTestA; 46 | string _stringTest; 47 | 48 | void parseOptions(int argc, char** argv); 49 | 50 | int main(int argc, char** argv) 51 | { 52 | 53 | parseOptions(argc,argv); 54 | 55 | cout << "for string we got : " << _stringTest<< endl 56 | << "for bool B we got : " << _boolTestB << endl 57 | << "for bool A we got : " << _boolTestA << endl; 58 | 59 | } 60 | 61 | 62 | void parseOptions(int argc, char** argv) 63 | { 64 | try { 65 | 66 | CmdLine cmd("this is a message", ' ', "0.99" ); 67 | 68 | // set the output 69 | MyOutput my; 70 | //ZshCompletionOutput my; 71 | //DocBookOutput my; 72 | cmd.setOutput(&my); 73 | 74 | // 75 | // Define arguments 76 | // 77 | 78 | SwitchArg btest("B","sB", "exist Test B", false); 79 | SwitchArg atest("A","sA", "exist Test A", false); 80 | 81 | ValueArg stest("s", "Bs", "string test", true, "homer", 82 | "string"); 83 | cmd.add( stest ); 84 | cmd.add( btest ); 85 | cmd.add( atest ); 86 | 87 | // 88 | // Parse the command line. 89 | // 90 | cmd.parse(argc,argv); 91 | 92 | 93 | // 94 | // Set variables 95 | // 96 | _stringTest = stest.getValue(); 97 | _boolTestB = btest.getValue(); 98 | _boolTestA = atest.getValue(); 99 | 100 | 101 | } catch ( ArgException& e ) 102 | { cout << "ERROR: " << e.error() << " " << e.argId() << endl; } 103 | } 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test5.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "tclap/CmdLine.h" 4 | #include 5 | #include 6 | 7 | using namespace TCLAP; 8 | using namespace std; 9 | 10 | string _orTest; 11 | string _orTest2; 12 | string _testc; 13 | bool _testd; 14 | 15 | void parseOptions(int argc, char** argv); 16 | 17 | int main(int argc, char** argv) 18 | { 19 | 20 | parseOptions(argc,argv); 21 | 22 | cout << "for A OR B we got : " << _orTest<< endl 23 | << "for string C we got : " << _testc << endl 24 | << "for string D we got : " << _testd << endl 25 | << "for E or F or G we got: " << _orTest2 << endl; 26 | 27 | } 28 | 29 | 30 | void parseOptions(int argc, char** argv) 31 | { 32 | try { 33 | 34 | CmdLine cmd("this is a message", ' ', "0.99" ); 35 | 36 | // 37 | // Define arguments 38 | // 39 | 40 | ValueArg atest("a", "aaa", "or test a", true, "homer", "string"); 41 | ValueArg btest("b", "bbb", "or test b", true, "homer", "string"); 42 | cmd.xorAdd( atest, btest ); 43 | 44 | ValueArg ctest("c", "ccc", "c test", true, "homer", "string"); 45 | cmd.add( ctest ); 46 | 47 | SwitchArg dtest("", "ddd", "d test", false); 48 | cmd.add( dtest ); 49 | 50 | ValueArg etest("", "eee", "e test", false, "homer", "string"); 51 | ValueArg ftest("", "fff", "f test", false, "homer", "string"); 52 | ValueArg gtest("g", "ggg", "g test", false, "homer", "string"); 53 | vector xorlist; 54 | xorlist.push_back(&etest); 55 | xorlist.push_back(&ftest); 56 | xorlist.push_back(>est); 57 | cmd.xorAdd( xorlist ); 58 | 59 | MultiArg itest("i", "iii", "or test i", true, "string"); 60 | MultiArg jtest("j", "jjj", "or test j", true, "string"); 61 | cmd.xorAdd( itest, jtest ); 62 | 63 | // 64 | // Parse the command line. 65 | // 66 | cmd.parse(argc,argv); 67 | 68 | 69 | // 70 | // Set variables 71 | // 72 | 73 | if ( atest.isSet() ) 74 | _orTest = atest.getValue(); 75 | else if ( btest.isSet() ) 76 | _orTest = btest.getValue(); 77 | else 78 | // Should never get here because TCLAP will note that one of the 79 | // required args above has not been set. 80 | throw("very bad things..."); 81 | 82 | _testc = ctest.getValue(); 83 | _testd = dtest.getValue(); 84 | 85 | if ( etest.isSet() ) 86 | _orTest2 = etest.getValue(); 87 | else if ( ftest.isSet() ) 88 | _orTest2 = ftest.getValue(); 89 | else if ( gtest.isSet() ) 90 | _orTest2 = gtest.getValue(); 91 | else 92 | throw("still bad"); 93 | 94 | if ( jtest.isSet() ) 95 | { 96 | cout << "for J:" << endl; 97 | vector v = jtest.getValue(); 98 | for ( int z = 0; static_cast(z) < v.size(); z++ ) 99 | cout << " " << z << " " << v[z] << endl; 100 | } 101 | else if ( itest.isSet() ) 102 | { 103 | cout << "for I:" << endl; 104 | vector v = itest.getValue(); 105 | for ( int z = 0; static_cast(z) < v.size(); z++ ) 106 | cout << " " << z << " " << v[z] << endl; 107 | } 108 | else 109 | throw("yup, still bad"); 110 | 111 | 112 | 113 | } catch ( ArgException& e ) 114 | { cout << "ERROR: " << e.error() << " " << e.argId() << endl; } 115 | } 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test6.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "tclap/CmdLine.h" 3 | 4 | using namespace TCLAP; 5 | using namespace std; 6 | 7 | int main(int argc, char** argv) 8 | { 9 | // Wrap everything in a try block. Do this every time, 10 | // because exceptions will be thrown for problems. 11 | try { 12 | 13 | // Define the command line object. 14 | CmdLine cmd("Command description message", ' ', "0.9"); 15 | 16 | vector allowed; 17 | allowed.push_back("homer"); 18 | allowed.push_back("marge"); 19 | allowed.push_back("bart"); 20 | allowed.push_back("lisa"); 21 | allowed.push_back("maggie"); 22 | ValuesConstraint allowedVals( allowed ); 23 | 24 | ValueArg nameArg("n","name","Name to print",true,"homer", 25 | &allowedVals); 26 | cmd.add( nameArg ); 27 | 28 | vector iallowed; 29 | iallowed.push_back(1); 30 | iallowed.push_back(2); 31 | iallowed.push_back(3); 32 | ValuesConstraint iallowedVals( iallowed ); 33 | 34 | UnlabeledValueArg intArg("times","Number of times to print",true,1, 35 | &iallowedVals,false); 36 | cmd.add( intArg ); 37 | 38 | // Parse the args. 39 | cmd.parse( argc, argv ); 40 | 41 | // Get the value parsed by each arg. 42 | int num = intArg.getValue(); 43 | string name = nameArg.getValue(); 44 | 45 | for ( int i = 0; i < num; i++ ) 46 | cout << "My name is " << name << endl; 47 | 48 | } catch ( ArgException& e) // catch any exceptions 49 | { cerr << "error: " << e.error() << " for arg " << e.argId() << endl; } 50 | } 51 | 52 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test7.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "tclap/CmdLine.h" 3 | 4 | using namespace TCLAP; 5 | using namespace std; 6 | 7 | int main(int argc, char **argv) 8 | { 9 | // Wrap everything in a try block. Do this every time, 10 | // because exceptions will be thrown for problems. 11 | try { 12 | 13 | // Define the command line object. 14 | CmdLine cmd("Command description message. This is a long multi-line message meant to test line wrapping. This is more text that doesn't really do anything besides take up lots of space that otherwise might be used for something real. That should be enough, don't you think?", ' ', "0.9"); 15 | 16 | vector allowed; 17 | allowed.push_back("homer"); 18 | allowed.push_back("marge"); 19 | allowed.push_back("bart"); 20 | allowed.push_back("lisa"); 21 | allowed.push_back("maggie"); 22 | ValuesConstraint vallowed( allowed ); 23 | 24 | MultiArg nameArg("n","name","Name to print. This is a long, nonsensical message to test line wrapping. Hopefully it works.",true,&vallowed); 25 | cmd.add( nameArg ); 26 | 27 | vector iallowed; 28 | iallowed.push_back(1); 29 | iallowed.push_back(2); 30 | iallowed.push_back(3); 31 | ValuesConstraint iiallowed( iallowed ); 32 | 33 | UnlabeledMultiArg intArg("times","Number of times to print",false, 34 | &iiallowed); 35 | cmd.add( intArg ); 36 | 37 | // Ignore the names and comments! These args mean nothing (to this 38 | // program) and are here solely to take up space. 39 | ValueArg gapCreate("f","gapCreate", "The cost of creating a gap", 40 | false, -10, "negative int"); 41 | cmd.add( gapCreate ); 42 | 43 | ValueArg gapExtend("g","gap-Extend", 44 | "The cost for each extension of a gap", false, -2, "negative int"); 45 | cmd.add( gapExtend ); 46 | 47 | SwitchArg dna("d","isDna","The input sequences are DNA", false); 48 | cmd.add( dna ); 49 | 50 | ValueArg scoringMatrixName("s","scoring--Matrix", 51 | "Scoring Matrix name", false,"BLOSUM50","name string"); 52 | cmd.add( scoringMatrixName ); 53 | 54 | ValueArg seq1Filename ("x","filename1", 55 | "Sequence 1 filename (FASTA format)", false,"","filename"); 56 | cmd.add( seq1Filename ); 57 | 58 | ValueArg seq2Filename ("z","filename2", 59 | "Sequence 2 filename (FASTA format)", false,"","filename"); 60 | cmd.add( seq2Filename ); 61 | 62 | ValueArg lowerBound("b","lowerBound", "lower percentage bound", 63 | false,1.0,"float lte 1"); 64 | cmd.add( lowerBound ); 65 | 66 | ValueArg upperBound("u","upperBound", "upper percentage bound", 67 | false,1.0,"float lte 1"); 68 | cmd.add( upperBound ); 69 | 70 | ValueArg limit("l","limit","Max number of alignments allowed", 71 | false, 1000,"int"); 72 | cmd.add( limit ); 73 | 74 | argv[0] = const_cast("ThisIsAVeryLongProgramNameDesignedToTestSpacePrintWhichUsedToHaveProblemsWithLongProgramNamesIThinkItIsNowLongEnough"); 75 | 76 | // Parse the args. 77 | cmd.parse( argc, argv ); 78 | 79 | // Get the value parsed by each arg. 80 | vector num = intArg.getValue(); 81 | 82 | for ( unsigned int i = 0; i < num.size(); i++ ) 83 | cout << "Got num " << num[i] << endl; 84 | 85 | vector name = nameArg.getValue(); 86 | 87 | for ( unsigned int i = 0; i < name.size(); i++ ) 88 | cout << "Got name " << name[i] << endl; 89 | 90 | 91 | } catch (ArgException& e) // catch any exceptions 92 | { cerr << "error: " << e.error() << " for arg " << e.argId() << endl; } 93 | } 94 | 95 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test8.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "tclap/CmdLine.h" 4 | #include 5 | #include 6 | 7 | using namespace TCLAP; 8 | using namespace std; 9 | 10 | bool _boolTestB; 11 | string _stringTest; 12 | string _utest; 13 | string _ztest; 14 | 15 | void parseOptions(int argc, char** argv); 16 | 17 | int main(int argc, char** argv) 18 | { 19 | 20 | parseOptions(argc,argv); 21 | 22 | cout << "for string we got : " << _stringTest<< endl 23 | << "for ulabeled one we got : " << _utest << endl 24 | << "for ulabeled two we got : " << _ztest << endl 25 | << "for bool B we got : " << _boolTestB << endl; 26 | 27 | } 28 | 29 | 30 | void parseOptions(int argc, char** argv) 31 | { 32 | try { 33 | 34 | CmdLine cmd("this is a message", '=', "0.99" ); 35 | 36 | // 37 | // Define arguments 38 | // 39 | 40 | SwitchArg btest("B","existTestB", "exist Test B", cmd, false); 41 | 42 | ValueArg stest("s", "stringTest", "string test", true, "homer", 43 | "string", cmd ); 44 | 45 | UnlabeledValueArg utest("unTest1","unlabeled test one", true, 46 | "default","string", cmd ); 47 | 48 | UnlabeledValueArg ztest("unTest2","unlabeled test two", true, 49 | "default","string", cmd ); 50 | 51 | MultiArg itest("i", "intTest", "multi int test", false,"int", cmd ); 52 | 53 | MultiArg ftest("f", "floatTest", "multi float test", false,"float", 54 | cmd ); 55 | 56 | UnlabeledMultiArg mtest("fileName","file names", false, 57 | "fileNameString", cmd); 58 | // 59 | // Parse the command line. 60 | // 61 | cmd.parse(argc,argv); 62 | 63 | 64 | // 65 | // Set variables 66 | // 67 | _stringTest = stest.getValue(); 68 | _boolTestB = btest.getValue(); 69 | _utest = utest.getValue(); 70 | _ztest = ztest.getValue(); 71 | 72 | vector vi = itest.getValue(); 73 | for ( int i = 0; static_cast(i) < vi.size(); i++ ) 74 | cout << "[-i] " << i << " " << vi[i] << endl; 75 | 76 | vector vf = ftest.getValue(); 77 | for ( int i = 0; static_cast(i) < vf.size(); i++ ) 78 | cout << "[-f] " << i << " " << vf[i] << endl; 79 | 80 | vector v = mtest.getValue(); 81 | for ( int i = 0; static_cast(i) < v.size(); i++ ) 82 | cout << "[ ] " << i << " " << v[i] << endl; 83 | 84 | } catch ( ArgException& e ) 85 | { cout << "ERROR: " << e.error() << " " << e.argId() << endl; } 86 | } 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /contrib/libs/tclap/examples/test9.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "tclap/CmdLine.h" 5 | 6 | using namespace TCLAP; 7 | using namespace std; 8 | 9 | int main(int argc, char** argv) 10 | { 11 | try { 12 | 13 | CmdLine cmd("Command description message", ' ', "0.9",false); 14 | 15 | SwitchArg reverseSwitch("r","reverse","REVERSE instead of FORWARDS", false); 16 | cmd.add( reverseSwitch ); 17 | 18 | MultiSwitchArg verbose("V","verbose","Level of verbosity"); 19 | cmd.add( verbose ); 20 | 21 | MultiSwitchArg noise("N","noise","Level of noise",5); 22 | cmd.add( noise ); 23 | 24 | UnlabeledValueArg word("word","a random word", false, "string", 25 | "won't see this",false); 26 | cmd.add( word ); 27 | 28 | // Uncommenting the next arg will (correctly) cause an exception 29 | // to be thrown. 30 | 31 | // UnlabeledMultiArg badword("badword","a bad word", false,"string"); 32 | // 33 | // cmd.add( badword ); 34 | 35 | cmd.parse( argc, argv ); 36 | 37 | bool reverseName = reverseSwitch.getValue(); 38 | 39 | if ( reverseName ) 40 | cout << "REVERSE" << endl; 41 | else 42 | cout << "FORWARD" << endl; 43 | 44 | if ( verbose.isSet() ) 45 | cout << "Verbose level: " << verbose.getValue() << endl; 46 | 47 | if ( noise.isSet() ) 48 | cout << "Noise level: " << noise.getValue() << endl; 49 | 50 | if ( word.isSet() ) 51 | cout << "Word: " << word.getValue() << endl; 52 | 53 | } catch (ArgException &e) // catch any exceptions 54 | { cerr << "error: " << e.error() << " for arg " << e.argId() << endl; } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /contrib/libs/tclap/include/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = tclap 2 | -------------------------------------------------------------------------------- /contrib/libs/tclap/include/tclap/ArgTraits.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | /****************************************************************************** 4 | * 5 | * file: ArgTraits.h 6 | * 7 | * Copyright (c) 2007, Daniel Aarno, Michael E. Smoot . 8 | * All rights reserved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | // This is an internal tclap file, you should probably not have to 24 | // include this directly 25 | 26 | #ifndef TCLAP_ARGTRAITS_H 27 | #define TCLAP_ARGTRAITS_H 28 | 29 | namespace TCLAP { 30 | 31 | // We use two empty structs to get compile type specialization 32 | // function to work 33 | 34 | /** 35 | * A value like argument value type is a value that can be set using 36 | * operator>>. This is the default value type. 37 | */ 38 | struct ValueLike { 39 | typedef ValueLike ValueCategory; 40 | virtual ~ValueLike() {} 41 | }; 42 | 43 | /** 44 | * A string like argument value type is a value that can be set using 45 | * operator=(string). Useful if the value type contains spaces which 46 | * will be broken up into individual tokens by operator>>. 47 | */ 48 | struct StringLike { 49 | virtual ~StringLike() {} 50 | }; 51 | 52 | /** 53 | * A class can inherit from this object to make it have string like 54 | * traits. This is a compile time thing and does not add any overhead 55 | * to the inherenting class. 56 | */ 57 | struct StringLikeTrait { 58 | typedef StringLike ValueCategory; 59 | virtual ~StringLikeTrait() {} 60 | }; 61 | 62 | /** 63 | * A class can inherit from this object to make it have value like 64 | * traits. This is a compile time thing and does not add any overhead 65 | * to the inherenting class. 66 | */ 67 | struct ValueLikeTrait { 68 | typedef ValueLike ValueCategory; 69 | virtual ~ValueLikeTrait() {} 70 | }; 71 | 72 | /** 73 | * Arg traits are used to get compile type specialization when parsing 74 | * argument values. Using an ArgTraits you can specify the way that 75 | * values gets assigned to any particular type during parsing. The two 76 | * supported types are StringLike and ValueLike. 77 | */ 78 | template 79 | struct ArgTraits { 80 | typedef typename T::ValueCategory ValueCategory; 81 | virtual ~ArgTraits() {} 82 | //typedef ValueLike ValueCategory; 83 | }; 84 | 85 | } // namespace 86 | 87 | #endif 88 | 89 | -------------------------------------------------------------------------------- /contrib/libs/tclap/include/tclap/CmdLineInterface.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: CmdLineInterface.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * Copyright (c) 2004, Michael E. Smoot, Daniel Aarno. 8 | * All rights reserved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | #ifndef TCLAP_COMMANDLINE_INTERFACE_H 24 | #define TCLAP_COMMANDLINE_INTERFACE_H 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | 33 | namespace TCLAP { 34 | 35 | class Arg; 36 | class CmdLineOutput; 37 | class XorHandler; 38 | 39 | /** 40 | * The base class that manages the command line definition and passes 41 | * along the parsing to the appropriate Arg classes. 42 | */ 43 | class CmdLineInterface 44 | { 45 | public: 46 | 47 | /** 48 | * Destructor 49 | */ 50 | virtual ~CmdLineInterface() {} 51 | 52 | /** 53 | * Adds an argument to the list of arguments to be parsed. 54 | * \param a - Argument to be added. 55 | */ 56 | virtual void add( Arg& a )=0; 57 | 58 | /** 59 | * An alternative add. Functionally identical. 60 | * \param a - Argument to be added. 61 | */ 62 | virtual void add( Arg* a )=0; 63 | 64 | /** 65 | * Add two Args that will be xor'd. 66 | * If this method is used, add does 67 | * not need to be called. 68 | * \param a - Argument to be added and xor'd. 69 | * \param b - Argument to be added and xor'd. 70 | */ 71 | virtual void xorAdd( Arg& a, Arg& b )=0; 72 | 73 | /** 74 | * Add a list of Args that will be xor'd. If this method is used, 75 | * add does not need to be called. 76 | * \param xors - List of Args to be added and xor'd. 77 | */ 78 | virtual void xorAdd( std::vector& xors )=0; 79 | 80 | /** 81 | * Parses the command line. 82 | * \param argc - Number of arguments. 83 | * \param argv - Array of arguments. 84 | */ 85 | virtual void parse(int argc, const char * const * argv)=0; 86 | 87 | /** 88 | * Parses the command line. 89 | * \param args - A vector of strings representing the args. 90 | * args[0] is still the program name. 91 | */ 92 | void parse(std::vector& args); 93 | 94 | /** 95 | * Returns the CmdLineOutput object. 96 | */ 97 | virtual CmdLineOutput* getOutput()=0; 98 | 99 | /** 100 | * \param co - CmdLineOutput object that we want to use instead. 101 | */ 102 | virtual void setOutput(CmdLineOutput* co)=0; 103 | 104 | /** 105 | * Returns the version string. 106 | */ 107 | virtual std::string& getVersion()=0; 108 | 109 | /** 110 | * Returns the program name string. 111 | */ 112 | virtual std::string& getProgramName()=0; 113 | 114 | /** 115 | * Returns the argList. 116 | */ 117 | virtual std::list& getArgList()=0; 118 | 119 | /** 120 | * Returns the XorHandler. 121 | */ 122 | virtual XorHandler& getXorHandler()=0; 123 | 124 | /** 125 | * Returns the delimiter string. 126 | */ 127 | virtual char getDelimiter()=0; 128 | 129 | /** 130 | * Returns the message string. 131 | */ 132 | virtual std::string& getMessage()=0; 133 | 134 | /** 135 | * Indicates whether or not the help and version switches were created 136 | * automatically. 137 | */ 138 | virtual bool hasHelpAndVersion()=0; 139 | 140 | /** 141 | * Resets the instance as if it had just been constructed so that the 142 | * instance can be reused. 143 | */ 144 | virtual void reset()=0; 145 | }; 146 | 147 | } //namespace 148 | 149 | 150 | #endif 151 | -------------------------------------------------------------------------------- /contrib/libs/tclap/include/tclap/CmdLineOutput.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /****************************************************************************** 4 | * 5 | * file: CmdLineOutput.h 6 | * 7 | * Copyright (c) 2004, Michael E. Smoot 8 | * All rights reserved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | #ifndef TCLAP_CMDLINEOUTPUT_H 24 | #define TCLAP_CMDLINEOUTPUT_H 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | namespace TCLAP { 34 | 35 | class CmdLineInterface; 36 | class ArgException; 37 | 38 | /** 39 | * The interface that any output object must implement. 40 | */ 41 | class CmdLineOutput 42 | { 43 | 44 | public: 45 | 46 | /** 47 | * Virtual destructor. 48 | */ 49 | virtual ~CmdLineOutput() {} 50 | 51 | /** 52 | * Generates some sort of output for the USAGE. 53 | * \param c - The CmdLine object the output is generated for. 54 | */ 55 | virtual void usage(CmdLineInterface& c)=0; 56 | 57 | /** 58 | * Generates some sort of output for the version. 59 | * \param c - The CmdLine object the output is generated for. 60 | */ 61 | virtual void version(CmdLineInterface& c)=0; 62 | 63 | /** 64 | * Generates some sort of output for a failure. 65 | * \param c - The CmdLine object the output is generated for. 66 | * \param e - The ArgException that caused the failure. 67 | */ 68 | virtual void failure( CmdLineInterface& c, 69 | ArgException& e )=0; 70 | 71 | }; 72 | 73 | } //namespace TCLAP 74 | #endif 75 | -------------------------------------------------------------------------------- /contrib/libs/tclap/include/tclap/Constraint.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: Constraint.h 5 | * 6 | * Copyright (c) 2005, Michael E. Smoot 7 | * All rights reserved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | #ifndef TCLAP_CONSTRAINT_H 23 | #define TCLAP_CONSTRAINT_H 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | namespace TCLAP { 33 | 34 | /** 35 | * The interface that defines the interaction between the Arg and Constraint. 36 | */ 37 | template 38 | class Constraint 39 | { 40 | 41 | public: 42 | /** 43 | * Returns a description of the Constraint. 44 | */ 45 | virtual std::string description() const =0; 46 | 47 | /** 48 | * Returns the short ID for the Constraint. 49 | */ 50 | virtual std::string shortID() const =0; 51 | 52 | /** 53 | * The method used to verify that the value parsed from the command 54 | * line meets the constraint. 55 | * \param value - The value that will be checked. 56 | */ 57 | virtual bool check(const T& value) const =0; 58 | 59 | /** 60 | * Destructor. 61 | * Silences warnings about Constraint being a base class with virtual 62 | * functions but without a virtual destructor. 63 | */ 64 | virtual ~Constraint() { ; } 65 | }; 66 | 67 | } //namespace TCLAP 68 | #endif 69 | -------------------------------------------------------------------------------- /contrib/libs/tclap/include/tclap/HelpVisitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: HelpVisitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reserved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | #ifndef TCLAP_HELP_VISITOR_H 23 | #define TCLAP_HELP_VISITOR_H 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | /** 32 | * A Visitor object that calls the usage method of the given CmdLineOutput 33 | * object for the specified CmdLine object. 34 | */ 35 | class HelpVisitor: public Visitor 36 | { 37 | private: 38 | /** 39 | * Prevent accidental copying. 40 | */ 41 | HelpVisitor(const HelpVisitor& rhs); 42 | HelpVisitor& operator=(const HelpVisitor& rhs); 43 | 44 | protected: 45 | 46 | /** 47 | * The CmdLine the output will be generated for. 48 | */ 49 | CmdLineInterface* _cmd; 50 | 51 | /** 52 | * The output object. 53 | */ 54 | CmdLineOutput** _out; 55 | 56 | public: 57 | 58 | /** 59 | * Constructor. 60 | * \param cmd - The CmdLine the output will be generated for. 61 | * \param out - The type of output. 62 | */ 63 | HelpVisitor(CmdLineInterface* cmd, CmdLineOutput** out) 64 | : Visitor(), _cmd( cmd ), _out( out ) { } 65 | 66 | /** 67 | * Calls the usage method of the CmdLineOutput for the 68 | * specified CmdLine. 69 | */ 70 | void visit() { (*_out)->usage(*_cmd); throw ExitException(0); } 71 | 72 | }; 73 | 74 | } 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /contrib/libs/tclap/include/tclap/IgnoreRestVisitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: IgnoreRestVisitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reserved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef TCLAP_IGNORE_REST_VISITOR_H 24 | #define TCLAP_IGNORE_REST_VISITOR_H 25 | 26 | #include 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | /** 32 | * A Visitor that tells the CmdLine to begin ignoring arguments after 33 | * this one is parsed. 34 | */ 35 | class IgnoreRestVisitor: public Visitor 36 | { 37 | public: 38 | 39 | /** 40 | * Constructor. 41 | */ 42 | IgnoreRestVisitor() : Visitor() {} 43 | 44 | /** 45 | * Sets Arg::_ignoreRest. 46 | */ 47 | void visit() { Arg::beginIgnoring(); } 48 | }; 49 | 50 | } 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /contrib/libs/tclap/include/tclap/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | libtclapincludedir = $(includedir)/tclap 3 | 4 | libtclapinclude_HEADERS = \ 5 | CmdLineInterface.h \ 6 | ArgException.h \ 7 | CmdLine.h \ 8 | XorHandler.h \ 9 | MultiArg.h \ 10 | UnlabeledMultiArg.h \ 11 | ValueArg.h \ 12 | UnlabeledValueArg.h \ 13 | Visitor.h Arg.h \ 14 | HelpVisitor.h \ 15 | SwitchArg.h \ 16 | MultiSwitchArg.h \ 17 | VersionVisitor.h \ 18 | IgnoreRestVisitor.h \ 19 | CmdLineOutput.h \ 20 | StdOutput.h \ 21 | DocBookOutput.h \ 22 | ZshCompletionOutput.h \ 23 | OptionalUnlabeledTracker.h \ 24 | Constraint.h \ 25 | ValuesConstraint.h \ 26 | ArgTraits.h \ 27 | StandardTraits.h \ 28 | sstream.h 29 | -------------------------------------------------------------------------------- /contrib/libs/tclap/include/tclap/OptionalUnlabeledTracker.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /****************************************************************************** 4 | * 5 | * file: OptionalUnlabeledTracker.h 6 | * 7 | * Copyright (c) 2005, Michael E. Smoot . 8 | * All rights reserved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | 24 | #ifndef TCLAP_OPTIONAL_UNLABELED_TRACKER_H 25 | #define TCLAP_OPTIONAL_UNLABELED_TRACKER_H 26 | 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | class OptionalUnlabeledTracker 32 | { 33 | 34 | public: 35 | 36 | static void check( bool req, const std::string& argName ); 37 | 38 | static void gotOptional() { alreadyOptionalRef() = true; } 39 | 40 | static bool& alreadyOptional() { return alreadyOptionalRef(); } 41 | 42 | private: 43 | 44 | static bool& alreadyOptionalRef() { static bool ct = false; return ct; } 45 | }; 46 | 47 | 48 | inline void OptionalUnlabeledTracker::check( bool req, const std::string& argName ) 49 | { 50 | if ( OptionalUnlabeledTracker::alreadyOptional() ) 51 | throw( SpecificationException( 52 | "You can't specify ANY Unlabeled Arg following an optional Unlabeled Arg", 53 | argName ) ); 54 | 55 | if ( !req ) 56 | OptionalUnlabeledTracker::gotOptional(); 57 | } 58 | 59 | 60 | } // namespace TCLAP 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /contrib/libs/tclap/include/tclap/ValuesConstraint.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /****************************************************************************** 4 | * 5 | * file: ValuesConstraint.h 6 | * 7 | * Copyright (c) 2005, Michael E. Smoot 8 | * All rights reserved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | #ifndef TCLAP_VALUESCONSTRAINT_H 24 | #define TCLAP_VALUESCONSTRAINT_H 25 | 26 | #ifdef HAVE_CONFIG_H 27 | #include 28 | #endif 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | namespace TCLAP { 36 | 37 | /** 38 | * A Constraint that constrains the Arg to only those values specified 39 | * in the constraint. 40 | */ 41 | template 42 | class ValuesConstraint : public Constraint 43 | { 44 | 45 | public: 46 | 47 | /** 48 | * Constructor. 49 | * \param allowed - vector of allowed values. 50 | */ 51 | ValuesConstraint(std::vector& allowed); 52 | 53 | /** 54 | * Virtual destructor. 55 | */ 56 | virtual ~ValuesConstraint() {} 57 | 58 | /** 59 | * Returns a description of the Constraint. 60 | */ 61 | virtual std::string description() const; 62 | 63 | /** 64 | * Returns the short ID for the Constraint. 65 | */ 66 | virtual std::string shortID() const; 67 | 68 | /** 69 | * The method used to verify that the value parsed from the command 70 | * line meets the constraint. 71 | * \param value - The value that will be checked. 72 | */ 73 | virtual bool check(const T& value) const; 74 | 75 | protected: 76 | 77 | /** 78 | * The list of valid values. 79 | */ 80 | std::vector _allowed; 81 | 82 | /** 83 | * The string used to describe the allowed values of this constraint. 84 | */ 85 | std::string _typeDesc; 86 | 87 | }; 88 | 89 | template 90 | ValuesConstraint::ValuesConstraint(std::vector& allowed) 91 | : _allowed(allowed), 92 | _typeDesc("") 93 | { 94 | for ( unsigned int i = 0; i < _allowed.size(); i++ ) 95 | { 96 | 97 | #if defined(HAVE_SSTREAM) 98 | std::ostringstream os; 99 | #elif defined(HAVE_STRSTREAM) 100 | std::ostrstream os; 101 | #else 102 | #error "Need a stringstream (sstream or strstream) to compile!" 103 | #endif 104 | 105 | os << _allowed[i]; 106 | 107 | std::string temp( os.str() ); 108 | 109 | if ( i > 0 ) 110 | _typeDesc += "|"; 111 | _typeDesc += temp; 112 | } 113 | } 114 | 115 | template 116 | bool ValuesConstraint::check( const T& val ) const 117 | { 118 | if ( std::find(_allowed.begin(),_allowed.end(),val) == _allowed.end() ) 119 | return false; 120 | else 121 | return true; 122 | } 123 | 124 | template 125 | std::string ValuesConstraint::shortID() const 126 | { 127 | return _typeDesc; 128 | } 129 | 130 | template 131 | std::string ValuesConstraint::description() const 132 | { 133 | return _typeDesc; 134 | } 135 | 136 | 137 | } //namespace TCLAP 138 | #endif 139 | 140 | -------------------------------------------------------------------------------- /contrib/libs/tclap/include/tclap/VersionVisitor.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | /****************************************************************************** 4 | * 5 | * file: VersionVisitor.h 6 | * 7 | * Copyright (c) 2003, Michael E. Smoot . 8 | * All rights reserved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | 24 | #ifndef TCLAP_VERSION_VISITOR_H 25 | #define TCLAP_VERSION_VISITOR_H 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | namespace TCLAP { 32 | 33 | /** 34 | * A Visitor that will call the version method of the given CmdLineOutput 35 | * for the specified CmdLine object and then exit. 36 | */ 37 | class VersionVisitor: public Visitor 38 | { 39 | private: 40 | /** 41 | * Prevent accidental copying 42 | */ 43 | VersionVisitor(const VersionVisitor& rhs); 44 | VersionVisitor& operator=(const VersionVisitor& rhs); 45 | 46 | protected: 47 | 48 | /** 49 | * The CmdLine of interest. 50 | */ 51 | CmdLineInterface* _cmd; 52 | 53 | /** 54 | * The output object. 55 | */ 56 | CmdLineOutput** _out; 57 | 58 | public: 59 | 60 | /** 61 | * Constructor. 62 | * \param cmd - The CmdLine the output is generated for. 63 | * \param out - The type of output. 64 | */ 65 | VersionVisitor( CmdLineInterface* cmd, CmdLineOutput** out ) 66 | : Visitor(), _cmd( cmd ), _out( out ) { } 67 | 68 | /** 69 | * Calls the version method of the output object using the 70 | * specified CmdLine. 71 | */ 72 | void visit() { 73 | (*_out)->version(*_cmd); 74 | throw ExitException(0); 75 | } 76 | 77 | }; 78 | 79 | } 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /contrib/libs/tclap/include/tclap/Visitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: Visitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reserved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef TCLAP_VISITOR_H 24 | #define TCLAP_VISITOR_H 25 | 26 | namespace TCLAP { 27 | 28 | /** 29 | * A base class that defines the interface for visitors. 30 | */ 31 | class Visitor 32 | { 33 | public: 34 | 35 | /** 36 | * Constructor. Does nothing. 37 | */ 38 | Visitor() { } 39 | 40 | /** 41 | * Destructor. Does nothing. 42 | */ 43 | virtual ~Visitor() { } 44 | 45 | /** 46 | * Does nothing. Should be overridden by child. 47 | */ 48 | virtual void visit() { } 49 | }; 50 | 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /contrib/libs/tclap/include/tclap/sstream.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | /****************************************************************************** 4 | * 5 | * file: sstream.h 6 | * 7 | * Copyright (c) 2003, Michael E. Smoot . 8 | * Copyright (c) 2004, Michael E. Smoot, Daniel Aarno . 9 | * Copyright (c) 2017 Google Inc. 10 | * All rights reserved. 11 | * 12 | * See the file COPYING in the top directory of this distribution for 13 | * more information. 14 | * 15 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | * DEALINGS IN THE SOFTWARE. 22 | * 23 | *****************************************************************************/ 24 | 25 | #ifndef TCLAP_SSTREAM_H 26 | #define TCLAP_SSTREAM_H 27 | 28 | #if !defined(HAVE_STRSTREAM) 29 | // Assume sstream is available if strstream is not specified 30 | // (https://sourceforge.net/p/tclap/bugs/23/) 31 | #define HAVE_SSTREAM 32 | #endif 33 | 34 | #if defined(HAVE_SSTREAM) 35 | #include 36 | namespace TCLAP { 37 | typedef std::istringstream istringstream; 38 | typedef std::ostringstream ostringstream; 39 | } 40 | #elif defined(HAVE_STRSTREAM) 41 | #include 42 | namespace TCLAP { 43 | typedef std::istrstream istringstream; 44 | typedef std::ostrstream ostringstream; 45 | } 46 | #else 47 | #error "Need a stringstream (sstream or strstream) to compile!" 48 | #endif 49 | 50 | #endif // TCLAP_SSTREAM_H 51 | -------------------------------------------------------------------------------- /contrib/libs/tclap/msc/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = examples 2 | 3 | EXTRA_DIST = README\ 4 | tclap-beta.ncb\ 5 | tclap-beta.sln\ 6 | tclap-beta.suo\ 7 | tclap-beta.vcproj 8 | 9 | 10 | -------------------------------------------------------------------------------- /contrib/libs/tclap/msc/README: -------------------------------------------------------------------------------- 1 | 2 | Disclaimer! 3 | =========== 4 | 5 | The various files included in the subdirectory for provided as a courtesy 6 | to Microsoft Visual Studio users. The files were contributed by a thoughtful 7 | user and were not created by the authors of this project. Moreover, the 8 | (current) authors have no way of maintaining, improving or even using the 9 | files. 10 | 11 | ** This means we can't answer any questions about the files! ** 12 | 13 | That said, we have several reports of people successfully using the TCLAP 14 | library on various Windows platforms. As long as you use a reasonably modern 15 | compiler (and Visual C++ apparently is), you shouldn't have any trouble. 16 | 17 | Good luck! 18 | -------------------------------------------------------------------------------- /contrib/libs/tclap/msc/examples/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | EXTRA_DIST = test1.vcproj\ 3 | test2.vcproj\ 4 | test3.vcproj\ 5 | test4.vcproj\ 6 | test5.vcproj\ 7 | test6.vcproj\ 8 | test7.vcproj\ 9 | test8.vcproj 10 | 11 | -------------------------------------------------------------------------------- /contrib/libs/tclap/msc/examples/test1.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 11 | 12 | 13 | 19 | 31 | 33 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 63 | 69 | 78 | 80 | 90 | 92 | 94 | 96 | 98 | 100 | 102 | 104 | 106 | 108 | 110 | 111 | 112 | 113 | 114 | 115 | 119 | 121 | 122 | 123 | 127 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /contrib/libs/tclap/msc/examples/test2.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 11 | 12 | 13 | 19 | 31 | 33 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 63 | 69 | 78 | 80 | 90 | 92 | 94 | 96 | 98 | 100 | 102 | 104 | 106 | 108 | 110 | 111 | 112 | 113 | 114 | 115 | 119 | 121 | 122 | 123 | 127 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /contrib/libs/tclap/msc/examples/test3.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 11 | 12 | 13 | 19 | 31 | 33 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 63 | 69 | 78 | 80 | 90 | 92 | 94 | 96 | 98 | 100 | 102 | 104 | 106 | 108 | 110 | 111 | 112 | 113 | 114 | 115 | 119 | 121 | 122 | 123 | 127 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /contrib/libs/tclap/msc/examples/test4.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 11 | 12 | 13 | 19 | 31 | 33 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 63 | 69 | 78 | 80 | 90 | 92 | 94 | 96 | 98 | 100 | 102 | 104 | 106 | 108 | 110 | 111 | 112 | 113 | 114 | 115 | 119 | 121 | 122 | 123 | 127 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /contrib/libs/tclap/msc/examples/test5.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 11 | 12 | 13 | 19 | 31 | 33 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 63 | 69 | 78 | 80 | 90 | 92 | 94 | 96 | 98 | 100 | 102 | 104 | 106 | 108 | 110 | 111 | 112 | 113 | 114 | 115 | 119 | 121 | 122 | 123 | 127 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /contrib/libs/tclap/msc/examples/test6.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 11 | 12 | 13 | 19 | 31 | 33 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 63 | 69 | 78 | 80 | 90 | 92 | 94 | 96 | 98 | 100 | 102 | 104 | 106 | 108 | 110 | 111 | 112 | 113 | 114 | 115 | 119 | 121 | 122 | 123 | 127 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /contrib/libs/tclap/msc/examples/test7.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 11 | 12 | 13 | 19 | 31 | 33 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 63 | 69 | 78 | 80 | 90 | 92 | 94 | 96 | 98 | 100 | 102 | 104 | 106 | 108 | 110 | 111 | 112 | 113 | 114 | 115 | 119 | 121 | 122 | 123 | 127 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /contrib/libs/tclap/msc/examples/test8.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 11 | 12 | 13 | 19 | 31 | 33 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 63 | 69 | 78 | 80 | 90 | 92 | 94 | 96 | 98 | 100 | 102 | 104 | 106 | 108 | 110 | 111 | 112 | 113 | 114 | 115 | 119 | 121 | 122 | 123 | 127 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /contrib/libs/tclap/msc/tclap-beta.ncb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/fastops/7049667e85d3aa7301f450aae00a014e7cedd5f1/contrib/libs/tclap/msc/tclap-beta.ncb -------------------------------------------------------------------------------- /contrib/libs/tclap/msc/tclap-beta.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/fastops/7049667e85d3aa7301f450aae00a014e7cedd5f1/contrib/libs/tclap/msc/tclap-beta.suo -------------------------------------------------------------------------------- /contrib/libs/tclap/msc/tclap-beta.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 11 | 12 | 13 | 19 | 30 | 32 | 40 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 61 | 67 | 75 | 77 | 86 | 88 | 90 | 92 | 94 | 96 | 98 | 100 | 102 | 104 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tclap.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | includedir=@includedir@ 3 | 4 | Name: tclap 5 | Description: Templatized C++ Command Line Parser 6 | Version: @VERSION@ 7 | Cflags: -I${includedir} 8 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | 3 | TESTS = test1.sh \ 4 | test2.sh \ 5 | test3.sh \ 6 | test4.sh \ 7 | test5.sh \ 8 | test6.sh \ 9 | test7.sh \ 10 | test8.sh \ 11 | test9.sh \ 12 | test10.sh \ 13 | test11.sh \ 14 | test12.sh \ 15 | test13.sh \ 16 | test14.sh \ 17 | test15.sh \ 18 | test16.sh \ 19 | test17.sh \ 20 | test18.sh \ 21 | test19.sh \ 22 | test20.sh \ 23 | test21.sh \ 24 | test22.sh \ 25 | test23.sh \ 26 | test24.sh \ 27 | test25.sh \ 28 | test26.sh \ 29 | test27.sh \ 30 | test28.sh \ 31 | test29.sh \ 32 | test30.sh \ 33 | test31.sh \ 34 | test32.sh \ 35 | test33.sh \ 36 | test34.sh \ 37 | test35.sh \ 38 | test36.sh \ 39 | test37.sh \ 40 | test38.sh \ 41 | test39.sh \ 42 | test40.sh \ 43 | test41.sh \ 44 | test42.sh \ 45 | test43.sh \ 46 | test44.sh \ 47 | test45.sh \ 48 | test46.sh \ 49 | test47.sh \ 50 | test48.sh \ 51 | test49.sh \ 52 | test50.sh \ 53 | test51.sh \ 54 | test52.sh \ 55 | test53.sh \ 56 | test54.sh \ 57 | test55.sh \ 58 | test56.sh \ 59 | test57.sh \ 60 | test58.sh \ 61 | test59.sh \ 62 | test60.sh \ 63 | test61.sh \ 64 | test62.sh \ 65 | test63.sh \ 66 | test64.sh \ 67 | test65.sh \ 68 | test66.sh \ 69 | test67.sh \ 70 | test68.sh \ 71 | test69.sh \ 72 | test70.sh \ 73 | test71.sh \ 74 | test72.sh \ 75 | test73.sh \ 76 | test74.sh \ 77 | test75.sh \ 78 | test76.sh \ 79 | test77.sh \ 80 | test78.sh \ 81 | test79.sh 82 | 83 | EXTRA_DIST = $(TESTS) \ 84 | test1.out \ 85 | test2.out \ 86 | test3.out \ 87 | test4.out \ 88 | test5.out \ 89 | test6.out \ 90 | test7.out \ 91 | test8.out \ 92 | test9.out \ 93 | test10.out \ 94 | test11.out \ 95 | test12.out \ 96 | test13.out \ 97 | test14.out \ 98 | test15.out \ 99 | test16.out \ 100 | test17.out \ 101 | test18.out \ 102 | test19.out \ 103 | test20.out \ 104 | test21.out \ 105 | test22.out \ 106 | test23.out \ 107 | test24.out \ 108 | test25.out \ 109 | test26.out \ 110 | test27.out \ 111 | test28.out \ 112 | test29.out \ 113 | test30.out \ 114 | test31.out \ 115 | test32.out \ 116 | test33.out \ 117 | test34.out \ 118 | test35.out \ 119 | test36.out \ 120 | test37.out \ 121 | test38.out \ 122 | test39.out \ 123 | test40.out \ 124 | test41.out \ 125 | test42.out \ 126 | test43.out \ 127 | test44.out \ 128 | test45.out \ 129 | test46.out \ 130 | test47.out \ 131 | test48.out \ 132 | test49.out \ 133 | test50.out \ 134 | test51.out \ 135 | test52.out \ 136 | test53.out \ 137 | test54.out \ 138 | test55.out \ 139 | test56.out \ 140 | test57.out \ 141 | test58.out \ 142 | test59.out \ 143 | test60.out \ 144 | test61.out \ 145 | test62.out \ 146 | test63.out \ 147 | test64.out \ 148 | test65.out \ 149 | test66.out \ 150 | test67.out \ 151 | test68.out \ 152 | test69.out \ 153 | test70.out \ 154 | test71.out \ 155 | test72.out \ 156 | test73.out \ 157 | test74.out \ 158 | test75.out \ 159 | test76.out \ 160 | test77.out \ 161 | test78.out \ 162 | test79.out 163 | 164 | CLEANFILES = tmp.out 165 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test1.out: -------------------------------------------------------------------------------- 1 | My name (spelled backwards) is: ekim 2 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test1 -r -n mike > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test1.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test10.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: 2 | Required argument missing: unTest 3 | 4 | Brief USAGE: 5 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 6 | [--version] [-h] ... 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test2 --help 10 | 11 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test10.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test2 -i 10 -s hello > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test10.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test11.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -i (--intTest) 2 | Argument already set! 3 | 4 | Brief USAGE: 5 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 6 | [--version] [-h] ... 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test2 --help 10 | 11 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test11.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test2 -i 10 -s hello -i 9 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test11.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test12.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -f (--floatTest) 2 | Couldn't read argument value from string 'nine' 3 | 4 | Brief USAGE: 5 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 6 | [--version] [-h] ... 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test2 --help 10 | 11 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test12.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test2 -i 10 -s hello -f nine > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test12.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test13.out: -------------------------------------------------------------------------------- 1 | [-i] 0 9 2 | [-i] 1 8 3 | [ ] 0 bart 4 | for string we got : bill 5 | for ulabeled one we got : homer 6 | for ulabeled two we got : marge 7 | for bool B we got : 1 8 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test13.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test3 --stringTest=bill -i=9 -i=8 -B homer marge bart > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test13.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test14.out: -------------------------------------------------------------------------------- 1 | [ ] 0 bart 2 | [ ] 1 one 3 | [ ] 2 two 4 | for string we got : aaa 5 | for ulabeled one we got : homer 6 | for ulabeled two we got : marge 7 | for bool B we got : 0 8 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test14.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test3 --stringTest=aaa homer marge bart -- one two > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test14.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test15.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: (--stringTest) 2 | Couldn't find delimiter for this argument! 3 | 4 | Brief USAGE: 5 | ../examples/test3 [-f=] ... [-i=] ... 6 | --stringTest= [-B] [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test3 --help 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test15.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test3 --stringTest bbb homer marge bart -- -hv two > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test15.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test16.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: (--stringTest) 2 | Couldn't find delimiter for this argument! 3 | 4 | Brief USAGE: 5 | ../examples/test3 [-f=] ... [-i=] ... 6 | --stringTest= [-B] [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test3 --help 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test16.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test3 --stringTest one homer -B -Bh > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test16.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test17.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: 2 | Required argument missing: unTest2 3 | 4 | Brief USAGE: 5 | ../examples/test3 [-f=] ... [-i=] ... 6 | --stringTest= [-B] [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test3 --help 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test17.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test3 --stringTest=one homer -B > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test17.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test18.out: -------------------------------------------------------------------------------- 1 | my failure message: 2 | -s -- Couldn't find match for argument 3 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test18.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test4 -Bs --Bs asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test18.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test19.out: -------------------------------------------------------------------------------- 1 | for string we got : asdf 2 | for bool B we got : 1 3 | for bool A we got : 1 4 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test19.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test4 -BA --Bs asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test19.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test2.out: -------------------------------------------------------------------------------- 1 | My name is: mike 2 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test1 -n mike > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test2.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test20.out: -------------------------------------------------------------------------------- 1 | for I: 2 | 0 sss 3 | 1 fdsf 4 | for A OR B we got : asdf 5 | for string C we got : fdas 6 | for string D we got : 0 7 | for E or F or G we got: blah 8 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test20.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test5 -a asdf -c fdas --eee blah -i sss -i fdsf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test20.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test21.out: -------------------------------------------------------------------------------- 1 | for J: 2 | 0 homer 3 | for A OR B we got : asdf 4 | for string C we got : fdas 5 | for string D we got : 0 6 | for E or F or G we got: asdf 7 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test21.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test5 -b asdf -c fdas -g asdf -j homer > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test21.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test22.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -b (--bbb) 2 | Mutually exclusive argument already set! 3 | 4 | Brief USAGE: 5 | ../examples/test5 {-a |-b } {--eee |--fff 6 | |-g } {-i ... |-j 7 | ... } [--ddd] -c [--] [--version] [-h] 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test5 --help 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test22.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test5 -a fdsa -b asdf -c fdas > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test22.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test23.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -d 2 | Couldn't find match for argument 3 | 4 | Brief USAGE: 5 | ../examples/test5 {-a |-b } {--eee |--fff 6 | |-g } {-i ... |-j 7 | ... } [--ddd] -c [--] [--version] [-h] 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test5 --help 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test23.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test5 -d junk -c fdas > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test23.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test24.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -b (--bbb) 2 | Mutually exclusive argument already set! 3 | 4 | Brief USAGE: 5 | ../examples/test5 {-a |-b } {--eee |--fff 6 | |-g } {-i ... |-j 7 | ... } [--ddd] -c [--] [--version] [-h] 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test5 --help 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test24.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test5 --aaa dilbert -b asdf -c fdas > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test24.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test25.out: -------------------------------------------------------------------------------- 1 | for I: 2 | 0 one 3 | 1 two 4 | for A OR B we got : asdf 5 | for string C we got : fdas 6 | for string D we got : 0 7 | for E or F or G we got: blah 8 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test25.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test5 --aaa asdf -c fdas --fff blah -i one -i two > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test25.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test26.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -f (--floatTest) 2 | More than one valid value parsed from string '4..2' 3 | 4 | Brief USAGE: 5 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 6 | [--version] [-h] ... 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test2 --help 10 | 11 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test26.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test2 -i 2 -f 4..2 -s asdf asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test26.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test27.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -f (--floatTest) 2 | More than one valid value parsed from string '4.0.2' 3 | 4 | Brief USAGE: 5 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 6 | [--version] [-h] ... 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test2 --help 10 | 11 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test27.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test2 -i 2 -f 4.0.2 -s asdf asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test27.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test28.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -i (--intTest) 2 | Couldn't read argument value from string '2a' 3 | 4 | Brief USAGE: 5 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 6 | [--version] [-h] ... 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test2 --help 10 | 11 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test28.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test2 -i 2a -f 4.2 -s asdf asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test28.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test29.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -i (--intTest) 2 | Couldn't read argument value from string '0xA' 3 | 4 | Brief USAGE: 5 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 6 | [--version] [-h] ... 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test2 --help 10 | 11 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test29.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure... no hex here, but see test19.cpp for how to use hex 4 | ../examples/test2 -i 0xA -f 4.2 -s asdf asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test29.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test3.out: -------------------------------------------------------------------------------- 1 | My name (spelled backwards) is: ekim 2 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test1 -n mike -r > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test3.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test30.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -i (--intTest) 2 | Couldn't read argument value from string '2.1' 3 | 4 | Brief USAGE: 5 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 6 | [--version] [-h] ... 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test2 --help 10 | 11 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test30.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test2 -i 2.1 -f 4.2 -s asdf asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test30.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test31.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -i (--intTest) 2 | Couldn't read argument value from string '9a' 3 | 4 | Brief USAGE: 5 | ../examples/test3 [-f=] ... [-i=] ... 6 | --stringTest= [-B] [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test3 --help 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test31.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test3 -i=9a -i=1 -s=asdf asdf asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test31.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test32.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -f (--floatTest) 2 | More than one valid value parsed from string '1.0.0' 3 | 4 | Brief USAGE: 5 | ../examples/test3 [-f=] ... [-i=] ... 6 | --stringTest= [-B] [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test3 --help 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test32.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test3 -f=9 -f=1.0.0 -s=asdf asdf asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test32.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test33.out: -------------------------------------------------------------------------------- 1 | for J: 2 | 0 o 3 | 1 t 4 | for A OR B we got : asdf 5 | for string C we got : fdas 6 | for string D we got : 1 7 | for E or F or G we got: blah 8 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test33.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test5 -a asdf -c fdas --eee blah --ddd -j o --jjj t > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test33.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test34.out: -------------------------------------------------------------------------------- 1 | My name is homer 2 | My name is homer 3 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test34.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test6 -n homer 2 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test34.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test35.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -n (--name) 2 | Value 'mike' does not meet constraint: homer|marge|bart|lisa|maggie 3 | 4 | Brief USAGE: 5 | ../examples/test6 -n [--] [--version] 6 | [-h] <1|2|3> 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test6 --help 10 | 11 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test35.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test6 -n mike 2 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test35.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test36.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: (--times) 2 | Value '6' does not meet constraint: 1|2|3 3 | 4 | Brief USAGE: 5 | ../examples/test6 -n [--] [--version] 6 | [-h] <1|2|3> 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test6 --help 10 | 11 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test36.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test6 -n homer 6 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test36.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test37.out: -------------------------------------------------------------------------------- 1 | Got num 2 2 | Got num 1 3 | Got num 3 4 | Got name homer 5 | Got name marge 6 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test37.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test7 -n homer 2 -n marge 1 3 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test37.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test38.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -n (--name) 2 | Value 'mike' does not meet constraint: homer|marge|bart|lisa|maggie 3 | 4 | Brief USAGE: 5 | ThisIsAVeryLongProgramNameDesignedToTestSpacePrintWhichUsedToHaveProblem 6 | sWithLongProgramNamesIThinkItIsNowL 7 | ongEnough [-l ] [-u ] [-b ] [-z 9 | ] [-x ] [-s 10 | ] [-d] [-g ] [-f ] -n ... [--] 13 | [--version] [-h] <1|2|3> ... 14 | 15 | For complete USAGE and HELP type: 16 | ThisIsAVeryLongProgramNameDesignedToTestSpacePrintWhichUsedToHaveProblemsWithLongProgramNamesIThinkItIsNowLongEnough --help 17 | 18 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test38.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test7 -n mike 2 1 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test38.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test39.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: (--times) 2 | Value '6' does not meet constraint: 1|2|3 3 | 4 | Brief USAGE: 5 | ThisIsAVeryLongProgramNameDesignedToTestSpacePrintWhichUsedToHaveProblem 6 | sWithLongProgramNamesIThinkItIsNowL 7 | ongEnough [-l ] [-u ] [-b ] [-z 9 | ] [-x ] [-s 10 | ] [-d] [-g ] [-f ] -n ... [--] 13 | [--version] [-h] <1|2|3> ... 14 | 15 | For complete USAGE and HELP type: 16 | ThisIsAVeryLongProgramNameDesignedToTestSpacePrintWhichUsedToHaveProblemsWithLongProgramNamesIThinkItIsNowLongEnough --help 17 | 18 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test39.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test7 2 -n homer -n bart 6 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test39.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test4.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: 2 | Required argument missing: name 3 | 4 | Brief USAGE: 5 | ../examples/test1 [-r] -n [--] [--version] [-h] 6 | 7 | For complete USAGE and HELP type: 8 | ../examples/test1 --help 9 | 10 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test4.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test1 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test4.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test40.out: -------------------------------------------------------------------------------- 1 | 2 | USAGE: 3 | 4 | ../examples/test1 [-r] -n [--] [--version] [-h] 5 | 6 | 7 | Where: 8 | 9 | -r, --reverse 10 | Print name backwards 11 | 12 | -n , --name 13 | (required) Name to print 14 | 15 | --, --ignore_rest 16 | Ignores the rest of the labeled arguments following this flag. 17 | 18 | --version 19 | Displays version information and exits. 20 | 21 | -h, --help 22 | Displays usage information and exits. 23 | 24 | 25 | Command description message 26 | 27 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test40.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test1 --help > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test40.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test41.out: -------------------------------------------------------------------------------- 1 | 2 | USAGE: 3 | 4 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 5 | [--version] [-h] ... 6 | 7 | 8 | Where: 9 | 10 | -f , --floatTest 11 | float test 12 | 13 | -i , --intTest 14 | (required) integer test 15 | 16 | -s , --stringTest 17 | (required) string test 18 | 19 | -A, --existTestA 20 | tests for the existence of A 21 | 22 | -C, --existTestC 23 | tests for the existence of C 24 | 25 | -B, --existTestB 26 | tests for the existence of B 27 | 28 | --, --ignore_rest 29 | Ignores the rest of the labeled arguments following this flag. 30 | 31 | --version 32 | Displays version information and exits. 33 | 34 | -h, --help 35 | Displays usage information and exits. 36 | 37 | 38 | (required) unlabeld test 39 | 40 | (accepted multiple times) 41 | file names 42 | 43 | 44 | this is a message 45 | 46 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test41.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test2 --help > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test41.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test42.out: -------------------------------------------------------------------------------- 1 | 2 | USAGE: 3 | 4 | ../examples/test3 [-f=] ... [-i=] ... 5 | --stringTest= [-B] [--] [--version] [-h] 6 | ... 7 | 8 | 9 | Where: 10 | 11 | -f=, --floatTest= (accepted multiple times) 12 | multi float test 13 | 14 | -i=, --intTest= (accepted multiple times) 15 | multi int test 16 | 17 | --stringTest= 18 | (required) string test 19 | 20 | -B, --existTestB 21 | exist Test B 22 | 23 | --, --ignore_rest 24 | Ignores the rest of the labeled arguments following this flag. 25 | 26 | --version 27 | Displays version information and exits. 28 | 29 | -h, --help 30 | Displays usage information and exits. 31 | 32 | 33 | (required) unlabeled test one 34 | 35 | 36 | (required) unlabeled test two 37 | 38 | (accepted multiple times) 39 | file names 40 | 41 | 42 | this is a message 43 | 44 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test42.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test3 --help > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test42.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test43.out: -------------------------------------------------------------------------------- 1 | my usage message: 2 | -A, --sA (exist Test A) 3 | -B, --sB (exist Test B) 4 | -s , --Bs ((required) string test) 5 | --, --ignore_rest (Ignores the rest of the labeled arguments following this flag.) 6 | --version (Displays version information and exits.) 7 | -h, --help (Displays usage information and exits.) 8 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test43.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test4 --help > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test43.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test44.out: -------------------------------------------------------------------------------- 1 | 2 | USAGE: 3 | 4 | ../examples/test5 {-a |-b } {--eee |--fff 5 | |-g } {-i ... |-j 6 | ... } [--ddd] -c [--] [--version] [-h] 7 | 8 | 9 | Where: 10 | 11 | -a , --aaa 12 | (OR required) or test a 13 | -- OR -- 14 | -b , --bbb 15 | (OR required) or test b 16 | 17 | 18 | --eee 19 | (OR required) e test 20 | -- OR -- 21 | --fff 22 | (OR required) f test 23 | -- OR -- 24 | -g , --ggg 25 | (OR required) g test 26 | 27 | 28 | -i , --iii (accepted multiple times) 29 | (OR required) or test i 30 | -- OR -- 31 | -j , --jjj (accepted multiple times) 32 | (OR required) or test j 33 | 34 | 35 | --ddd 36 | d test 37 | 38 | -c , --ccc 39 | (required) c test 40 | 41 | --, --ignore_rest 42 | Ignores the rest of the labeled arguments following this flag. 43 | 44 | --version 45 | Displays version information and exits. 46 | 47 | -h, --help 48 | Displays usage information and exits. 49 | 50 | 51 | this is a message 52 | 53 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test44.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test5 --help > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test44.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test45.out: -------------------------------------------------------------------------------- 1 | 2 | USAGE: 3 | 4 | ../examples/test6 -n [--] [--version] 5 | [-h] <1|2|3> 6 | 7 | 8 | Where: 9 | 10 | -n , --name 12 | (required) Name to print 13 | 14 | --, --ignore_rest 15 | Ignores the rest of the labeled arguments following this flag. 16 | 17 | --version 18 | Displays version information and exits. 19 | 20 | -h, --help 21 | Displays usage information and exits. 22 | 23 | <1|2|3> 24 | (required) Number of times to print 25 | 26 | 27 | Command description message 28 | 29 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test45.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test6 --help > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test45.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test46.out: -------------------------------------------------------------------------------- 1 | 2 | USAGE: 3 | 4 | ThisIsAVeryLongProgramNameDesignedToTestSpacePrintWhichUsedToHaveProblem 5 | sWithLongProgramNamesIThinkItIsNowL 6 | ongEnough [-l ] [-u ] [-b ] [-z 8 | ] [-x ] [-s 9 | ] [-d] [-g ] [-f ] -n ... [--] 12 | [--version] [-h] <1|2|3> ... 13 | 14 | 15 | Where: 16 | 17 | -l , --limit 18 | Max number of alignments allowed 19 | 20 | -u , --upperBound 21 | upper percentage bound 22 | 23 | -b , --lowerBound 24 | lower percentage bound 25 | 26 | -z , --filename2 27 | Sequence 2 filename (FASTA format) 28 | 29 | -x , --filename1 30 | Sequence 1 filename (FASTA format) 31 | 32 | -s , --scoring--Matrix 33 | Scoring Matrix name 34 | 35 | -d, --isDna 36 | The input sequences are DNA 37 | 38 | -g , --gap-Extend 39 | The cost for each extension of a gap 40 | 41 | -f , --gapCreate 42 | The cost of creating a gap 43 | 44 | -n , --name (accepted multiple times) 46 | (required) Name to print. This is a long, nonsensical message to test 47 | line wrapping. Hopefully it works. 48 | 49 | --, --ignore_rest 50 | Ignores the rest of the labeled arguments following this flag. 51 | 52 | --version 53 | Displays version information and exits. 54 | 55 | -h, --help 56 | Displays usage information and exits. 57 | 58 | <1|2|3> (accepted multiple times) 59 | Number of times to print 60 | 61 | 62 | Command description message. This is a long multi-line message meant to 63 | test line wrapping. This is more text that doesn't really do anything 64 | besides take up lots of space that otherwise might be used for something 65 | real. That should be enough, don't you think? 66 | 67 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test46.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test7 --help > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test46.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test47.out: -------------------------------------------------------------------------------- 1 | [-i] 0 9 2 | [-i] 1 8 3 | [ ] 0 bart 4 | for string we got : bill 5 | for ulabeled one we got : homer 6 | for ulabeled two we got : marge 7 | for bool B we got : 1 8 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test47.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test8 -s=bill -i=9 -i=8 -B homer marge bart > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test47.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test48.out: -------------------------------------------------------------------------------- 1 | [ ] 0 bart 2 | [ ] 1 one 3 | [ ] 2 two 4 | for string we got : aaa 5 | for ulabeled one we got : homer 6 | for ulabeled two we got : marge 7 | for bool B we got : 0 8 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test48.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test8 -s=aaa homer marge bart -- one two > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test48.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test49.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -s (--stringTest) 2 | Couldn't find delimiter for this argument! 3 | 4 | Brief USAGE: 5 | ../examples/test8 [-f=] ... [-i=] ... -s= [-B] 6 | [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test8 --help 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test49.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test8 -s bbb homer marge bart -- -hv two > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test49.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test5.out: -------------------------------------------------------------------------------- 1 | 0 bart 2 | 1 lisa 3 | for float we got : 3.7 4 | for int we got : 10 5 | for string we got : homer 6 | for ulabeled we got : marge 7 | for bool A we got : 0 8 | for bool B we got : 0 9 | for bool C we got : 0 10 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test2 -i 10 -s homer marge bart lisa > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test5.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test50.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -s (--stringTest) 2 | Couldn't find delimiter for this argument! 3 | 4 | Brief USAGE: 5 | ../examples/test8 [-f=] ... [-i=] ... -s= [-B] 6 | [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test8 --help 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test50.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test8 -s one homer -B -Bh > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test50.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test51.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: 2 | Required argument missing: unTest2 3 | 4 | Brief USAGE: 5 | ../examples/test8 [-f=] ... [-i=] ... -s= [-B] 6 | [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test8 --help 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test51.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test8 -s=one homer -B > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test51.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test52.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -i (--intTest) 2 | Couldn't read argument value from string '9a' 3 | 4 | Brief USAGE: 5 | ../examples/test8 [-f=] ... [-i=] ... -s= [-B] 6 | [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test8 --help 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test52.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test8 -i=9a -i=1 -s=asdf asdf asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test52.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test53.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -f (--floatTest) 2 | More than one valid value parsed from string '1.0.0' 3 | 4 | Brief USAGE: 5 | ../examples/test8 [-f=] ... [-i=] ... -s= [-B] 6 | [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test8 --help 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test53.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test8 -f=9 -f=1.0.0 -s=asdf asdf asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test53.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test54.out: -------------------------------------------------------------------------------- 1 | 2 | USAGE: 3 | 4 | ../examples/test8 [-f=] ... [-i=] ... -s= [-B] 5 | [--] [--version] [-h] 6 | ... 7 | 8 | 9 | Where: 10 | 11 | -f=, --floatTest= (accepted multiple times) 12 | multi float test 13 | 14 | -i=, --intTest= (accepted multiple times) 15 | multi int test 16 | 17 | -s=, --stringTest= 18 | (required) string test 19 | 20 | -B, --existTestB 21 | exist Test B 22 | 23 | --, --ignore_rest 24 | Ignores the rest of the labeled arguments following this flag. 25 | 26 | --version 27 | Displays version information and exits. 28 | 29 | -h, --help 30 | Displays usage information and exits. 31 | 32 | 33 | (required) unlabeled test one 34 | 35 | 36 | (required) unlabeled test two 37 | 38 | (accepted multiple times) 39 | file names 40 | 41 | 42 | this is a message 43 | 44 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test54.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test8 --help > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test54.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test55.out: -------------------------------------------------------------------------------- 1 | [ ] 0 zero 2 | [ ] 1 one 3 | for string we got : asdf 4 | for ulabeled one we got : - 5 | for ulabeled two we got : asdf 6 | for bool B we got : 0 7 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test55.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test3 --stringTest=asdf - asdf zero one > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test55.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test56.out: -------------------------------------------------------------------------------- 1 | 0 one 2 | 1 two 3 | for float we got : 3.7 4 | for int we got : 1 5 | for string we got : fdsa 6 | for ulabeled we got : - 7 | for bool A we got : 0 8 | for bool B we got : 0 9 | for bool C we got : 0 10 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test56.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test2 -i 1 - -s fdsa one two > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test56.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test57.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -i (--iii) 2 | Mutually exclusive argument already set! 3 | 4 | Brief USAGE: 5 | ../examples/test5 {-a |-b } {--eee |--fff 6 | |-g } {-i ... |-j 7 | ... } [--ddd] -c [--] [--version] [-h] 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test5 --help 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test57.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | # This used to fail on the "Too many arguments!" but now fails sooner, 5 | # and on a more approriate error. 6 | ../examples/test5 --aaa asdf -c fdas --fff blah -i one -i two -j huh > tmp.out 2>&1 7 | 8 | if cmp -s tmp.out $srcdir/test57.out; then 9 | exit 0 10 | else 11 | exit 1 12 | fi 13 | 14 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test58.out: -------------------------------------------------------------------------------- 1 | FORWARD 2 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test58.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test9 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test58.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test59.out: -------------------------------------------------------------------------------- 1 | REVERSE 2 | Verbose level: 3 3 | Noise level: 7 4 | Word: blah 5 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test59.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test9 -VVV -N --noise -r blah > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test59.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test6.out: -------------------------------------------------------------------------------- 1 | for float we got : 3.7 2 | for int we got : 10 3 | for string we got : hello 4 | for ulabeled we got : goodbye 5 | for bool A we got : 1 6 | for bool B we got : 1 7 | for bool C we got : 1 8 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test6.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test2 -i 10 -s hello goodbye -ABC > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test6.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test60.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -r (--reverse) 2 | Argument already set! 3 | 4 | 5 | USAGE: 6 | 7 | ../examples/test9 [-N] ... [-V] ... [-r] [--] 8 | 9 | 10 | Where: 11 | 12 | -N, --noise (accepted multiple times) 13 | Level of noise 14 | 15 | -V, --verbose (accepted multiple times) 16 | Level of verbosity 17 | 18 | -r, --reverse 19 | REVERSE instead of FORWARDS 20 | 21 | --, --ignore_rest 22 | Ignores the rest of the labeled arguments following this flag. 23 | 24 | 25 | a random word 26 | 27 | 28 | Command description message 29 | 30 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test60.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test9 -VVV -N --noise -rr > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test60.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test61.out: -------------------------------------------------------------------------------- 1 | for float we got : 3.7 2 | for int we got : 10 3 | for string we got : hello 4 | for ulabeled we got : -1 -1 5 | for bool A we got : 0 6 | for bool B we got : 0 7 | for bool C we got : 0 8 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test61.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this tests a bug in handling of - chars in Unlabeled args 4 | # success 5 | ../examples/test2 -i 10 -s hello "-1 -1" > tmp.out 2>&1 6 | 7 | if cmp -s tmp.out $srcdir/test61.out; then 8 | exit 0 9 | else 10 | exit 1 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test62.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: 2 | Required arguments missing: intTest, stringTest, unTest 3 | 4 | Brief USAGE: 5 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 6 | [--version] [-h] ... 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test2 --help 10 | 11 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test62.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this tests whether all required args are listed as 4 | # missing when no arguments are specified 5 | # failure 6 | ../examples/test2 > tmp.out 2>&1 7 | 8 | if cmp -s tmp.out $srcdir/test62.out; then 9 | exit 0 10 | else 11 | exit 1 12 | fi 13 | 14 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test63.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: 2 | Required argument missing: vect 3 | 4 | Brief USAGE: 5 | ../examples/test11 -v <3D vector> [--] [--version] [-h] 6 | 7 | For complete USAGE and HELP type: 8 | ../examples/test11 --help 9 | 10 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test63.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this tests whether all required args are listed as 4 | # missing when no arguments are specified 5 | # failure 6 | ../examples/test11 > tmp.out 2>&1 7 | 8 | if cmp -s tmp.out $srcdir/test63.out; then 9 | exit 0 10 | else 11 | exit 1 12 | fi 13 | 14 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test64.out: -------------------------------------------------------------------------------- 1 | 1 2 3 2 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this tests whether all required args are listed as 4 | # missing when no arguments are specified 5 | # failure 6 | ../examples/test11 -v "1 2 3" > tmp.out 2>&1 7 | 8 | if cmp -s tmp.out $srcdir/test64.out; then 9 | exit 0 10 | else 11 | exit 1 12 | fi 13 | 14 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test65.out: -------------------------------------------------------------------------------- 1 | 1 2 3 2 | 4 5 6 3 | 7 8 9 4 | -1 0.2 0.4 5 | REVERSED 6 | -1 0.2 0.4 7 | 7 8 9 8 | 4 5 6 9 | 1 2 3 10 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test65.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this tests whether all required args are listed as 4 | # missing when no arguments are specified 5 | # failure 6 | ../examples/test12 -v "1 2 3" -v "4 5 6" -v "7 8 9" -v "-1 0.2 0.4" \ 7 | > tmp.out 2>&1 8 | 9 | if cmp -s tmp.out $srcdir/test65.out; then 10 | exit 0 11 | else 12 | exit 1 13 | fi 14 | 15 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test66.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: 2 | Required argument missing: vect 3 | 4 | Brief USAGE: 5 | ../examples/test12 -v <3D vector> ... [--] [--version] [-h] 6 | 7 | For complete USAGE and HELP type: 8 | ../examples/test12 --help 9 | 10 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test66.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this tests whether all required args are listed as 4 | # missing when no arguments are specified 5 | # failure 6 | ../examples/test12 > tmp.out 2>&1 7 | 8 | if cmp -s tmp.out $srcdir/test66.out; then 9 | exit 0 10 | else 11 | exit 1 12 | fi 13 | 14 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test67.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -v (--vect) 2 | a 1 0.3 is not a 3D vector 3 | 4 | Brief USAGE: 5 | ../examples/test12 -v <3D vector> ... [--] [--version] [-h] 6 | 7 | For complete USAGE and HELP type: 8 | ../examples/test12 --help 9 | 10 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test67.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this tests whether all required args are listed as 4 | # missing when no arguments are specified 5 | # failure 6 | ../examples/test12 -v "a 1 0.3" > tmp.out 2>&1 7 | 8 | if cmp -s tmp.out $srcdir/test67.out; then 9 | exit 0 10 | else 11 | exit 1 12 | fi 13 | 14 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test68.out: -------------------------------------------------------------------------------- 1 | module 2 | MultiSwtichArg was found 0 times. 3 | done... 4 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test68.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this tests whether we can parse args from 4 | # a vector of strings and that combined switch 5 | # handling doesn't get fooled if the delimiter 6 | # is in the string 7 | # success 8 | ../examples/test13 > tmp.out 2>&1 9 | 10 | if cmp -s tmp.out $srcdir/test68.out; then 11 | exit 0 12 | else 13 | exit 1 14 | fi 15 | 16 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test69.out: -------------------------------------------------------------------------------- 1 | error: Couldn't find match for argument for arg Argument: --bob 2 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test69.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Checks that parsing exceptions are properly 4 | # propagated to the caller. 5 | ../examples/test18 --bob > tmp.out 2>&1 6 | 7 | if cmp -s tmp.out $srcdir/test69.out; then 8 | exit 0 9 | else 10 | exit 1 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test7.out: -------------------------------------------------------------------------------- 1 | 2 | USAGE: 3 | 4 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 5 | [--version] [-h] ... 6 | 7 | 8 | Where: 9 | 10 | -f , --floatTest 11 | float test 12 | 13 | -i , --intTest 14 | (required) integer test 15 | 16 | -s , --stringTest 17 | (required) string test 18 | 19 | -A, --existTestA 20 | tests for the existence of A 21 | 22 | -C, --existTestC 23 | tests for the existence of C 24 | 25 | -B, --existTestB 26 | tests for the existence of B 27 | 28 | --, --ignore_rest 29 | Ignores the rest of the labeled arguments following this flag. 30 | 31 | --version 32 | Displays version information and exits. 33 | 34 | -h, --help 35 | Displays usage information and exits. 36 | 37 | 38 | (required) unlabeld test 39 | 40 | (accepted multiple times) 41 | file names 42 | 43 | 44 | this is a message 45 | 46 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test7.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test2 -i 10 -s hello goodbye -hABC > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test7.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test70.out: -------------------------------------------------------------------------------- 1 | 2 | USAGE: 3 | 4 | ../examples/test18 [--] [--version] [-h] 5 | 6 | 7 | Where: 8 | 9 | --, --ignore_rest 10 | Ignores the rest of the labeled arguments following this flag. 11 | 12 | --version 13 | Displays version information and exits. 14 | 15 | -h, --help 16 | Displays usage information and exits. 17 | 18 | 19 | Command description message 20 | 21 | Exiting on ExitException. 22 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test70.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Checks that parsing exceptions are properly 4 | # propagated to the caller. 5 | ../examples/test18 --help > tmp.out 2>&1 6 | 7 | if cmp -s tmp.out $srcdir/test70.out; then 8 | exit 0 9 | else 10 | exit 1 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test71.out: -------------------------------------------------------------------------------- 1 | found int: 10 2 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test71.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success test hex 4 | ../examples/test19 -i 0xA > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test71.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test72.out: -------------------------------------------------------------------------------- 1 | found int: 10 2 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test72.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success test octal 4 | ../examples/test19 -i 012 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test72.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test73.out: -------------------------------------------------------------------------------- 1 | for float we got : 3.7 2 | for int we got : 1 3 | for string we got : asdf 4 | for ulabeled we got : fff*fff 5 | for bool A we got : 0 6 | for bool B we got : 0 7 | for bool C we got : 0 8 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test73.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success tests whether * in UnlabeledValueArg passes 4 | ../examples/test2 -i 1 -s asdf fff*fff > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test73.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test74.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -b (--btmc) 2 | Mutually exclusive argument already set! 3 | 4 | Brief USAGE: 5 | ../examples/test20 {-a|-b} [--] [--version] [-h] 6 | 7 | For complete USAGE and HELP type: 8 | ../examples/test20 --help 9 | 10 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test74.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure validates that the correct error message 4 | # is displayed for XOR'd args 5 | ../examples/test20 -a -b > tmp.out 2>&1 6 | 7 | if cmp -s tmp.out $srcdir/test74.out; then 8 | exit 0 9 | else 10 | exit 1 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test75.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -a (--atmc) 2 | Mutually exclusive argument already set! 3 | 4 | Brief USAGE: 5 | ../examples/test20 {-a|-b} [--] [--version] [-h] 6 | 7 | For complete USAGE and HELP type: 8 | ../examples/test20 --help 9 | 10 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test75.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure validates that the correct error message 4 | # is displayed for XOR'd args 5 | ../examples/test20 -b -a > tmp.out 2>&1 6 | 7 | if cmp -s tmp.out $srcdir/test75.out; then 8 | exit 0 9 | else 10 | exit 1 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test76.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -b (--btmc) 2 | Mutually exclusive argument already set! 3 | 4 | Brief USAGE: 5 | ../examples/test20 {-a|-b} [--] [--version] [-h] 6 | 7 | For complete USAGE and HELP type: 8 | ../examples/test20 --help 9 | 10 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test76.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure validates that the correct error message 4 | # is displayed for XOR'd args 5 | ../examples/test20 -ba > tmp.out 2>&1 6 | 7 | if cmp -s tmp.out $srcdir/test76.out; then 8 | exit 0 9 | else 10 | exit 1 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test77.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -b (--btmc) 2 | Mutually exclusive argument already set! 3 | 4 | Brief USAGE: 5 | ../examples/test20 {-a|-b} [--] [--version] [-h] 6 | 7 | For complete USAGE and HELP type: 8 | ../examples/test20 --help 9 | 10 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test77.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure validates that the correct error message 4 | # is displayed for XOR'd args 5 | ../examples/test20 -ab > tmp.out 2>&1 6 | 7 | if cmp -s tmp.out $srcdir/test77.out; then 8 | exit 0 9 | else 10 | exit 1 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test78.out: -------------------------------------------------------------------------------- 1 | My name (spelled backwards) is: ekim 2 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test78.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test21 ~~reverse /n mike > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test78.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test79.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: 2 | Required argument missing: name 3 | 4 | Brief USAGE: 5 | ../examples/test21 [/r] /n [//] [~~version] [/h] 6 | 7 | For complete USAGE and HELP type: 8 | ../examples/test21 ~~help 9 | 10 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test79.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test21 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test79.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test8.out: -------------------------------------------------------------------------------- 1 | 2 | ../examples/test2 version: 0.99 3 | 4 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test8.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test2 --version > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test8.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test9.out: -------------------------------------------------------------------------------- 1 | 0 -hv 2 | 1 one 3 | 2 two 4 | for float we got : 3.7 5 | for int we got : 10 6 | for string we got : hello 7 | for ulabeled we got : goodbye 8 | for bool A we got : 0 9 | for bool B we got : 0 10 | for bool C we got : 0 11 | -------------------------------------------------------------------------------- /contrib/libs/tclap/tests/test9.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test2 -i 10 -s hello goodbye -- -hv one two > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test9.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /fastops/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(avx) 2 | add_subdirectory(avx2) 3 | add_subdirectory(plain) 4 | 5 | add_library(fastops fastops.cpp core/avx_id.cpp) 6 | target_link_libraries(fastops avx avx2 plain) 7 | 8 | install(TARGETS fastops DESTINATION lib) 9 | install(FILES fastops.h DESTINATION include) 10 | install(FILES avx/ops_avx.h DESTINATION include/avx) 11 | install(FILES avx2/ops_avx2.h DESTINATION include/avx2) 12 | install(FILES core/FastIntrinsics.h core/SIMDFunctions.h core/avx_id.h DESTINATION include/core) 13 | install(FILES plain/ops_plain.h DESTINATION include/plain) 14 | 15 | add_subdirectory(ut) 16 | -------------------------------------------------------------------------------- /fastops/avx/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") 2 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX /D__SSE4_1__=1 /D__SSE4_2__=1 -DNO_AVX2") 3 | else() 4 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx -msse4 -msse4.1 -msse4.2 -Wno-unknown-pragmas -Wno-unused-local-typedef -DNO_AVX2") 5 | endif() 6 | 7 | add_library(avx ops_avx.cpp) 8 | -------------------------------------------------------------------------------- /fastops/avx/ops_avx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace NFastOps { 6 | template 7 | void ExpAvx(const float* from, size_t size, float* to); 8 | 9 | template 10 | void ExpAvx(const double* from, size_t size, double* to); 11 | 12 | template 13 | void LogAvx(const float* from, size_t size, float* to); 14 | 15 | template 16 | void LogAvx(const double* from, size_t size, double* to); 17 | 18 | template 19 | void SigmoidAvx(const float* from, size_t size, float* to); 20 | 21 | template 22 | void SigmoidAvx(const double* from, size_t size, double* to); 23 | 24 | template 25 | void TanhAvx(const float* from, size_t size, float* to); 26 | 27 | template 28 | void TanhAvx(const double* from, size_t size, double* to); 29 | } 30 | -------------------------------------------------------------------------------- /fastops/avx2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") 2 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX2 /D__SSE4_1__=1 /D__SSE4_2__=1") 3 | else() 4 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx -mavx2 -mfma -msse4 -msse4.1 -msse4.2 -Wno-unknown-pragmas -Wno-unused-local-typedef") 5 | endif() 6 | 7 | add_library(avx2 ops_avx2.cpp) 8 | -------------------------------------------------------------------------------- /fastops/avx2/ops_avx2.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace NFastOps { 6 | template 7 | void ExpAvx2(const float* from, size_t size, float* to); 8 | 9 | template 10 | void ExpAvx2(const double* from, size_t size, double* to); 11 | 12 | template 13 | void LogAvx2(const float* from, size_t size, float* to); 14 | 15 | template 16 | void LogAvx2(const double* from, size_t size, double* to); 17 | 18 | template 19 | void SigmoidAvx2(const float* from, size_t size, float* to); 20 | 21 | template 22 | void SigmoidAvx2(const double* from, size_t size, double* to); 23 | 24 | template 25 | void TanhAvx2(const float* from, size_t size, float* to); 26 | 27 | template 28 | void TanhAvx2(const double* from, size_t size, double* to); 29 | } 30 | -------------------------------------------------------------------------------- /fastops/core/avx_id.cpp: -------------------------------------------------------------------------------- 1 | #include "avx_id.h" 2 | 3 | #if defined(__x86_64__) || defined(_M_X64) || defined(_M_AMD64) || defined(__i386__) || defined(_M_IX86) 4 | 5 | #include 6 | 7 | #if defined(_WIN32) 8 | #include 9 | #else 10 | #include 11 | #endif 12 | 13 | namespace NFastOps { 14 | namespace NDetail { 15 | // YMM XSAVE/XRESTORE OS support should be checked in order to use AVX 16 | // http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf 17 | static bool IsYMMSaveEnabled() noexcept { 18 | #if !defined(_WIN32) 19 | int32_t eax, edx; 20 | __asm__ volatile( 21 | "xgetbv" 22 | : "=a"(eax), "=d"(edx) 23 | : "c"(0)); 24 | return (eax & 6u) == 6u; 25 | #else 26 | return (_xgetbv(0) & 6u) == 6u; 27 | #endif 28 | } 29 | 30 | enum { EAX = 0, EBX, ECX, EDX, NREGS }; 31 | 32 | // These are in ECX of cpuid(1) 33 | static constexpr uint32_t OSXSAVE_BIT = 0x04000000; 34 | static constexpr uint32_t AVX_BIT = 0x10000000; 35 | 36 | // This in EBX of cpuid(7) 37 | static constexpr uint32_t AVX2_BIT = 0x00000020; 38 | 39 | static void CpuId(int32_t op, int32_t* res) noexcept { 40 | #if defined(_MSC_VER) && !defined(__clang__) 41 | __cpuidex((int*)res, op, 0); 42 | #else 43 | __cpuid_count(op, 0, res[EAX], res[EBX], res[ECX], res[EDX]); 44 | #endif 45 | } 46 | 47 | bool IsAVXEnabled() noexcept { 48 | int32_t info[NREGS]; 49 | CpuId(1, info); 50 | return (info[ECX] & OSXSAVE_BIT) && IsYMMSaveEnabled() && (info[ECX] & AVX_BIT); 51 | } 52 | 53 | bool IsAVX2Enabled() noexcept { 54 | int32_t info[NREGS]; 55 | CpuId(7, info); 56 | return info[EBX] & AVX2_BIT; 57 | } 58 | } 59 | } 60 | #else 61 | namespace NFastOps { 62 | namespace NDetail { 63 | bool IsAVXEnabled() noexcept { 64 | return false; 65 | } 66 | 67 | bool IsAVX2Enabled() noexcept { 68 | return false; 69 | } 70 | } 71 | } 72 | #endif 73 | -------------------------------------------------------------------------------- /fastops/core/avx_id.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace NFastOps { 4 | namespace NDetail { 5 | bool IsAVXEnabled() noexcept; 6 | bool IsAVX2Enabled() noexcept; 7 | } 8 | 9 | inline bool HaveAvx() { 10 | static bool haveAVX = NDetail::IsAVXEnabled(); 11 | return haveAVX; 12 | } 13 | 14 | inline bool HaveAvx2() { 15 | static bool haveAVX2 = HaveAvx() && NDetail::IsAVX2Enabled(); 16 | return haveAVX2; 17 | } 18 | } -------------------------------------------------------------------------------- /fastops/fastops.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace NFastOps { 6 | template 7 | void Exp(const float* from, size_t size, float* to); 8 | 9 | template 10 | void Exp(const double* from, size_t size, double* to); 11 | 12 | template 13 | void Log(const float* from, size_t size, float* to); 14 | 15 | template 16 | void Log(const double* from, size_t size, double* to); 17 | 18 | template 19 | void Sigmoid(const float* from, size_t size, float* to); 20 | 21 | template 22 | void Sigmoid(const double* from, size_t size, double* to); 23 | 24 | template 25 | void Tanh(const float* from, size_t size, float* to); 26 | 27 | template 28 | void Tanh(const double* from, size_t size, double* to); 29 | } 30 | -------------------------------------------------------------------------------- /fastops/plain/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(FMATH_DIR "${PROJECT_SOURCE_DIR}/contrib/libs/fmath") 2 | set(FMATH_INCLUDE_DIR "${FMATH_DIR}") 3 | 4 | include_directories("${FMATH_INCLUDE_DIR}") 5 | 6 | add_library(plain ops_plain.cpp) 7 | -------------------------------------------------------------------------------- /fastops/plain/ops_plain.cpp: -------------------------------------------------------------------------------- 1 | #include "ops_plain.h" 2 | 3 | #include 4 | 5 | #include 6 | 7 | namespace NFastOps { 8 | void ExpPlain(const float* from, size_t size, float* to) { 9 | for (size_t i = 0; i < size; ++i) { 10 | // double, because float returns nan instead of inf on higher values 11 | // (and float works slower than double on random data!) 12 | to[i] = fmath::expd(from[i]); 13 | } 14 | } 15 | 16 | void ExpPlain(const double* from, size_t size, double* to) { 17 | for (size_t i = 0; i < size; ++i) { 18 | to[i] = fmath::expd(from[i]); 19 | } 20 | } 21 | 22 | void LogPlain(const float* from, size_t size, float* to) { 23 | for (size_t i = 0; i < size; ++i) { 24 | // there is no exact fast float log 25 | to[i] = log(from[i]); 26 | } 27 | } 28 | 29 | void LogPlain(const double* from, size_t size, double* to) { 30 | for (size_t i = 0; i < size; ++i) { 31 | // there is no exact fast double log 32 | to[i] = log(from[i]); 33 | } 34 | } 35 | 36 | void SigmoidPlain(const float* from, size_t size, float* to) { 37 | for (size_t i = 0; i < size; ++i) { 38 | to[i] = 1.0 / (1.0f + (float)fmath::expd(-from[i])); 39 | } 40 | } 41 | 42 | void SigmoidPlain(const double* from, size_t size, double* to) { 43 | for (size_t i = 0; i < size; ++i) { 44 | to[i] = 1.0 / (1.0 + fmath::expd(-from[i])); 45 | } 46 | } 47 | 48 | void TanhPlain(const float* from, size_t size, float* to) { 49 | for (size_t i = 0; i < size; ++i) { 50 | to[i] = 2.0f / (1.0f + (float)fmath::expd(-2 * from[i])) - 1.0f; 51 | } 52 | } 53 | 54 | void TanhPlain(const double* from, size_t size, double* to) { 55 | for (size_t i = 0; i < size; ++i) { 56 | to[i] = 2 / (1.0 + fmath::expd(-2 * from[i])) - 1; 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /fastops/plain/ops_plain.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace NFastOps { 6 | void ExpPlain(const float* from, size_t size, float* to); 7 | void ExpPlain(const double* from, size_t size, double* to); 8 | 9 | void LogPlain(const float* from, size_t size, float* to); 10 | void LogPlain(const double* from, size_t size, double* to); 11 | 12 | void SigmoidPlain(const float* from, size_t size, float* to); 13 | void SigmoidPlain(const double* from, size_t size, double* to); 14 | 15 | void TanhPlain(const float* from, size_t size, float* to); 16 | void TanhPlain(const double* from, size_t size, double* to); 17 | } 18 | -------------------------------------------------------------------------------- /fastops/ut/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(fastops_test fastops_ut.cpp) 2 | target_link_libraries(fastops_test fastops) 3 | 4 | install(TARGETS fastops_test DESTINATION bin) 5 | -------------------------------------------------------------------------------- /tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(LIBTCLAP_DIR "${PROJECT_SOURCE_DIR}/contrib/libs/tclap/include") 2 | set(LIBTCLAP_INCLUDE_DIR "${LIBTCLAP_DIR}") 3 | 4 | include_directories("${LIBTCLAP_INCLUDE_DIR}") 5 | 6 | add_subdirectory(benchmark) 7 | add_subdirectory(eval) 8 | -------------------------------------------------------------------------------- /tools/benchmark/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(FMATH_DIR "${PROJECT_SOURCE_DIR}/contrib/libs/fmath") 2 | set(FMATH_INCLUDE_DIR "${FMATH_DIR}") 3 | 4 | include_directories("${FMATH_INCLUDE_DIR}") 5 | 6 | add_executable(benchmark benchmark.cpp opts_tclap.cpp) 7 | target_link_libraries(benchmark fastops) 8 | 9 | install(TARGETS benchmark DESTINATION bin) 10 | -------------------------------------------------------------------------------- /tools/benchmark/opts.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | struct TBenchmarkOpts { 6 | std::string Func; 7 | size_t NVectors; 8 | size_t NIter; 9 | size_t VecSize; 10 | size_t Alignment; 11 | bool NoDenormals; 12 | bool UseDouble; 13 | }; 14 | 15 | TBenchmarkOpts ParseOptions(int argc, char** argv); 16 | -------------------------------------------------------------------------------- /tools/benchmark/opts_tclap.cpp: -------------------------------------------------------------------------------- 1 | #include "opts.h" 2 | 3 | #include 4 | 5 | TBenchmarkOpts ParseOptions(int argc, char** argv) { 6 | TCLAP::CmdLine cmd("fastops library benchmark: compare various implementations of a "); 7 | TCLAP::ValueArg funcArg("", "func", "The function to test, default is exp", false, "exp", "exp|log|sigm|tanh"); 8 | cmd.add(funcArg); 9 | TCLAP::ValueArg nVectorsArg("", "vecs", "Number of vectors in the test, default 500000", false, 500000, "N"); 10 | cmd.add(nVectorsArg); 11 | TCLAP::ValueArg nIterArg("", "iters", "Number of iterations to run benchmark, default 5", false, 5, "N"); 12 | cmd.add(nIterArg); 13 | TCLAP::ValueArg vecSizeArg("", "size", "Vector size in elements, default 160", false, 160, "N"); 14 | cmd.add(vecSizeArg); 15 | TCLAP::ValueArg alignmentArg("", "alignment", "Misalign values by Offset from 32 byte boundary (natural alignment required), default 0", false, 0, "Offset"); 16 | cmd.add(alignmentArg); 17 | TCLAP::SwitchArg noDenormalsArg("", "nodenorm", "Do not honor denormals (faster)", cmd, false); 18 | TCLAP::SwitchArg useDoubleArg("", "double", "Use double precision, dafault is single precision", cmd, false); 19 | cmd.parse(argc, argv); 20 | 21 | TBenchmarkOpts res; 22 | res.Func = funcArg.getValue(); 23 | res.NVectors = nVectorsArg.getValue(); 24 | res.NIter = nIterArg.getValue(); 25 | res.VecSize = vecSizeArg.getValue(); 26 | res.Alignment = alignmentArg.getValue(); 27 | res.NoDenormals = noDenormalsArg.getValue(); 28 | res.UseDouble = useDoubleArg.getValue(); 29 | 30 | return res; 31 | } 32 | -------------------------------------------------------------------------------- /tools/eval/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(eval eval.cpp opts_tclap.cpp) 2 | target_link_libraries(eval fastops) 3 | 4 | install(TARGETS eval DESTINATION bin) 5 | -------------------------------------------------------------------------------- /tools/eval/opts.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | struct TEvalOpts { 6 | std::string Func; 7 | float Lo; 8 | float Hi; 9 | size_t N; 10 | std::string Arch; 11 | bool Exact; 12 | bool NoDenormals; 13 | bool UseDouble; 14 | bool Print; 15 | }; 16 | 17 | TEvalOpts ParseOptions(int argc, char** argv); 18 | 19 | -------------------------------------------------------------------------------- /tools/eval/opts_tclap.cpp: -------------------------------------------------------------------------------- 1 | #include "opts.h" 2 | #include 3 | 4 | 5 | TEvalOpts ParseOptions(int argc, char** argv) { 6 | TCLAP::CmdLine cmd("Compute values of a in [, ] interval"); 7 | TCLAP::ValueArg funcArg("", "func", "exp or log or sigm or tanh", true, "exp", "exp|log|sigm|tanh"); 8 | cmd.add(funcArg); 9 | TCLAP::ValueArg minArg("", "min", "Lower boundary of an interval, default is -100.0", false, -100.0, "FLOAT"); 10 | cmd.add(minArg); 11 | TCLAP::ValueArg maxArg("", "max", "Upper boundary of an interval, default is 100.0", false, 100.0, "FLOAT"); 12 | cmd.add(maxArg); 13 | TCLAP::ValueArg nArg("c", "count", "Number of values to compute, default is 1000", false, 1000, "N"); 14 | cmd.add(nArg); 15 | TCLAP::ValueArg archArg("", "arch", "Target archicture: plain or avx or avx2, default is avx2", false, "avx2", "plain|avx|avx2"); 16 | cmd.add(archArg); 17 | TCLAP::SwitchArg exactArg("", "exact", "Use exact version (slower)", cmd, false); 18 | TCLAP::SwitchArg noDenormalsArg("", "nodenorm", "Don't honor denormals", cmd, false); 19 | TCLAP::SwitchArg useDoubleArg("", "double", "Use double precision, single precision is used by default", cmd, false); 20 | TCLAP::SwitchArg printArg("", "print", "", cmd, false); 21 | cmd.parse(argc, argv); 22 | 23 | TEvalOpts res; 24 | 25 | res.Func = funcArg.getValue(); 26 | res.Lo = minArg.getValue(); 27 | res.Hi = maxArg.getValue(); 28 | res.N = nArg.getValue(); 29 | res.Arch = archArg.getValue(); 30 | res.Exact = exactArg.getValue(); 31 | res.NoDenormals = noDenormalsArg.getValue(); 32 | res.UseDouble = useDoubleArg.getValue(); 33 | res.Print = printArg.getValue(); 34 | 35 | return res; 36 | } --------------------------------------------------------------------------------