zxing_cpp_no_cmake 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/.gitmodules +0 -0
- data/CHANGELOG.rdoc +6 -0
- data/Gemfile +3 -0
- data/Manifest.txt +375 -0
- data/README.rdoc +141 -0
- data/Rakefile +28 -0
- data/bin/zxd +87 -0
- data/bin/zxe +53 -0
- data/ext/zxing/extconf.rb +20 -0
- data/ext/zxing/zxing-cpp/.gitignore +2 -0
- data/ext/zxing/zxing-cpp/AUTHORS +115 -0
- data/ext/zxing/zxing-cpp/CMakeLists.txt +89 -0
- data/ext/zxing/zxing-cpp/COPYING +201 -0
- data/ext/zxing/zxing-cpp/NOTICE +65 -0
- data/ext/zxing/zxing-cpp/README.md +45 -0
- data/ext/zxing/zxing-cpp/build/CMakeCache.txt +382 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/3.15.4/CMakeCCompiler.cmake +76 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/3.15.4/CMakeCXXCompiler.cmake +79 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/3.15.4/CMakeDetermineCompilerABI_C.bin +0 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/3.15.4/CMakeDetermineCompilerABI_CXX.bin +0 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/3.15.4/CMakeSystem.cmake +15 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/3.15.4/CompilerIdC/CMakeCCompilerId.c +665 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/3.15.4/CompilerIdC/a.out +0 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/3.15.4/CompilerIdCXX/CMakeCXXCompilerId.cpp +644 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/3.15.4/CompilerIdCXX/a.out +0 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/CMakeOutput.log +447 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/Makefile.cmake +125 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/Makefile2 +177 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/TargetDirectories.txt +9 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/cmake.check_cache +1 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/libzxing.dir/CXX.includecache +1892 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/libzxing.dir/DependInfo.cmake +120 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/libzxing.dir/build.make +1584 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/libzxing.dir/cmake_clean.cmake +109 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/libzxing.dir/cmake_clean_target.cmake +3 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/libzxing.dir/depend.internal +1465 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/libzxing.dir/depend.make +1465 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/libzxing.dir/flags.make +10 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/libzxing.dir/link.txt +2 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/libzxing.dir/progress.make +102 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/progress.marks +1 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/testrunner.dir/CXX.includecache +344 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/testrunner.dir/DependInfo.cmake +33 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/testrunner.dir/build.make +266 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/testrunner.dir/cmake_clean.cmake +21 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/testrunner.dir/depend.internal +103 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/testrunner.dir/depend.make +103 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/testrunner.dir/flags.make +10 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/testrunner.dir/link.txt +1 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/testrunner.dir/progress.make +14 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/zxing.dir/CXX.includecache +378 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/zxing.dir/DependInfo.cmake +25 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/zxing.dir/build.make +145 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/zxing.dir/cmake_clean.cmake +13 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/zxing.dir/depend.internal +53 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/zxing.dir/depend.make +53 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/zxing.dir/flags.make +10 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/zxing.dir/link.txt +1 -0
- data/ext/zxing/zxing-cpp/build/CMakeFiles/zxing.dir/progress.make +6 -0
- data/ext/zxing/zxing-cpp/build/Makefile +3706 -0
- data/ext/zxing/zxing-cpp/build/cmake_install.cmake +73 -0
- data/ext/zxing/zxing-cpp/build/libzxing.a +0 -0
- data/ext/zxing/zxing-cpp/build/testrunner +0 -0
- data/ext/zxing/zxing-cpp/build/zxing +0 -0
- data/ext/zxing/zxing-cpp/cli/src/ImageReaderSource.cpp +113 -0
- data/ext/zxing/zxing-cpp/cli/src/ImageReaderSource.h +40 -0
- data/ext/zxing/zxing-cpp/cli/src/jpgd.cpp +3174 -0
- data/ext/zxing/zxing-cpp/cli/src/jpgd.h +319 -0
- data/ext/zxing/zxing-cpp/cli/src/lodepng.cpp +6261 -0
- data/ext/zxing/zxing-cpp/cli/src/lodepng.h +1695 -0
- data/ext/zxing/zxing-cpp/cli/src/main.cpp +297 -0
- data/ext/zxing/zxing-cpp/cmake/FindCPPUNIT.cmake +54 -0
- data/ext/zxing/zxing-cpp/cmake/FindIconv.cmake +57 -0
- data/ext/zxing/zxing-cpp/core/src/bigint/.gitignore +6 -0
- data/ext/zxing/zxing-cpp/core/src/bigint/BigInteger.cc +405 -0
- data/ext/zxing/zxing-cpp/core/src/bigint/BigInteger.hh +215 -0
- data/ext/zxing/zxing-cpp/core/src/bigint/BigIntegerAlgorithms.cc +70 -0
- data/ext/zxing/zxing-cpp/core/src/bigint/BigIntegerAlgorithms.hh +25 -0
- data/ext/zxing/zxing-cpp/core/src/bigint/BigIntegerLibrary.hh +8 -0
- data/ext/zxing/zxing-cpp/core/src/bigint/BigIntegerUtils.cc +50 -0
- data/ext/zxing/zxing-cpp/core/src/bigint/BigIntegerUtils.hh +72 -0
- data/ext/zxing/zxing-cpp/core/src/bigint/BigUnsigned.cc +697 -0
- data/ext/zxing/zxing-cpp/core/src/bigint/BigUnsigned.hh +418 -0
- data/ext/zxing/zxing-cpp/core/src/bigint/BigUnsignedInABase.cc +125 -0
- data/ext/zxing/zxing-cpp/core/src/bigint/BigUnsignedInABase.hh +122 -0
- data/ext/zxing/zxing-cpp/core/src/bigint/ChangeLog +146 -0
- data/ext/zxing/zxing-cpp/core/src/bigint/Makefile +73 -0
- data/ext/zxing/zxing-cpp/core/src/bigint/NumberlikeArray.hh +177 -0
- data/ext/zxing/zxing-cpp/core/src/bigint/README +71 -0
- data/ext/zxing/zxing-cpp/core/src/win32/zxing/iconv.h +14 -0
- data/ext/zxing/zxing-cpp/core/src/win32/zxing/stdint.h +247 -0
- data/ext/zxing/zxing-cpp/core/src/win32/zxing/win_iconv.c +2035 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/BarcodeFormat.cpp +40 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/BarcodeFormat.h +60 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/Binarizer.cpp +45 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/Binarizer.h +50 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/BinaryBitmap.cpp +70 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/BinaryBitmap.h +56 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/ChecksumException.cpp +28 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/ChecksumException.h +34 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/DecodeHints.cpp +142 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/DecodeHints.h +85 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/Exception.cpp +43 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/Exception.h +51 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/FormatException.cpp +41 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/FormatException.h +37 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/IllegalStateException.h +35 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/InvertedLuminanceSource.cpp +68 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/InvertedLuminanceSource.h +48 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/LuminanceSource.cpp +86 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/LuminanceSource.h +59 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/MultiFormatReader.cpp +124 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/MultiFormatReader.h +48 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/NotFoundException.h +35 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/Reader.cpp +31 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/Reader.h +40 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/ReaderException.h +37 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/Result.cpp +61 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/Result.h +55 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/ResultIO.cpp +34 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/ResultPoint.cpp +108 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/ResultPoint.h +55 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/ResultPointCallback.cpp +26 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/ResultPointCallback.h +39 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/ZXing.h +133 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/aztec/AztecDetectorResult.cpp +54 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/aztec/AztecDetectorResult.h +48 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/aztec/AztecReader.cpp +68 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/aztec/AztecReader.h +49 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/aztec/decoder/Decoder.cpp +489 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/aztec/decoder/Decoder.h +69 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/aztec/detector/Detector.cpp +548 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/aztec/detector/Detector.h +92 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/Array.h +170 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/BitArray.cpp +155 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/BitArray.h +81 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/BitArrayIO.cpp +31 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/BitMatrix.cpp +143 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/BitMatrix.h +91 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/BitSource.cpp +76 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/BitSource.h +74 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/CharacterSetECI.cpp +105 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/CharacterSetECI.h +53 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/Counted.h +140 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/DecoderResult.cpp +46 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/DecoderResult.h +51 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/DetectorResult.cpp +39 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/DetectorResult.h +43 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/GlobalHistogramBinarizer.cpp +212 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/GlobalHistogramBinarizer.h +48 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/GreyscaleLuminanceSource.cpp +80 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/GreyscaleLuminanceSource.h +53 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/GreyscaleRotatedLuminanceSource.cpp +81 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/GreyscaleRotatedLuminanceSource.h +46 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/GridSampler.cpp +122 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/GridSampler.h +45 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/HybridBinarizer.cpp +226 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/HybridBinarizer.h +67 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/IllegalArgumentException.cpp +27 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/IllegalArgumentException.h +36 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/PerspectiveTransform.cpp +107 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/PerspectiveTransform.h +49 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/Point.h +47 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/Str.cpp +61 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/Str.h +51 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/StringUtils.cpp +198 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/StringUtils.h +52 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/detector/JavaMath.h +43 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/detector/MathUtils.h +57 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/detector/MonochromeRectangleDetector.cpp +175 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/detector/MonochromeRectangleDetector.h +62 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/detector/WhiteRectangleDetector.cpp +330 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/detector/WhiteRectangleDetector.h +59 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/reedsolomon/GenericGF.cpp +150 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/reedsolomon/GenericGF.h +73 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/reedsolomon/GenericGFPoly.cpp +218 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/reedsolomon/GenericGFPoly.h +56 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/reedsolomon/ReedSolomonDecoder.cpp +174 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/reedsolomon/ReedSolomonDecoder.h +49 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/reedsolomon/ReedSolomonException.cpp +30 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/common/reedsolomon/ReedSolomonException.h +33 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/datamatrix/DataMatrixReader.cpp +54 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/datamatrix/DataMatrixReader.h +45 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/datamatrix/Version.cpp +199 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/datamatrix/Version.h +87 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/datamatrix/decoder/BitMatrixParser.cpp +361 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/datamatrix/decoder/BitMatrixParser.h +59 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/datamatrix/decoder/DataBlock.cpp +113 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/datamatrix/decoder/DataBlock.h +49 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/datamatrix/decoder/DecodedBitStreamParser.cpp +415 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/datamatrix/decoder/DecodedBitStreamParser.h +104 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/datamatrix/decoder/Decoder.cpp +93 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/datamatrix/decoder/Decoder.h +49 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/datamatrix/detector/CornerPoint.cpp +46 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/datamatrix/detector/CornerPoint.h +43 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/datamatrix/detector/Detector.cpp +447 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/datamatrix/detector/Detector.h +94 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/datamatrix/detector/DetectorException.cpp +23 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/datamatrix/detector/DetectorException.h +23 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/multi/ByQuadrantReader.cpp +75 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/multi/ByQuadrantReader.h +42 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/multi/GenericMultipleBarcodeReader.cpp +137 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/multi/GenericMultipleBarcodeReader.h +51 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/multi/MultipleBarcodeReader.cpp +29 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/multi/MultipleBarcodeReader.h +41 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/multi/qrcode/QRCodeMultiReader.cpp +58 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/multi/qrcode/QRCodeMultiReader.h +36 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/multi/qrcode/detector/MultiDetector.cpp +47 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/multi/qrcode/detector/MultiDetector.h +37 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/multi/qrcode/detector/MultiFinderPatternFinder.cpp +236 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/multi/qrcode/detector/MultiFinderPatternFinder.h +47 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/CodaBarReader.cpp +340 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/CodaBarReader.h +57 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/Code128Reader.cpp +497 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/Code128Reader.h +48 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/Code39Reader.cpp +329 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/Code39Reader.h +63 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/Code93Reader.cpp +303 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/Code93Reader.h +58 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/EAN13Reader.cpp +85 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/EAN13Reader.h +49 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/EAN8Reader.cpp +65 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/EAN8Reader.h +47 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/ITFReader.cpp +337 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/ITFReader.h +54 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/MultiFormatOneDReader.cpp +96 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/MultiFormatOneDReader.h +38 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/MultiFormatUPCEANReader.cpp +110 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/MultiFormatUPCEANReader.h +41 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/OneDReader.cpp +228 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/OneDReader.h +81 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/OneDResultPoint.cpp +28 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/OneDResultPoint.h +35 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/UPCAReader.cpp +70 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/UPCAReader.h +50 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/UPCEANReader.cpp +309 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/UPCEANReader.h +88 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/UPCEReader.cpp +146 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/oned/UPCEReader.h +47 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/pdf417/PDF417Reader.cpp +170 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/pdf417/PDF417Reader.h +49 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/pdf417/decoder/BitMatrixParser.cpp +997 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/pdf417/decoder/BitMatrixParser.h +84 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/pdf417/decoder/DecodedBitStreamParser.cpp +563 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/pdf417/decoder/DecodedBitStreamParser.h +84 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/pdf417/decoder/Decoder.cpp +118 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/pdf417/decoder/Decoder.h +62 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/pdf417/decoder/ec/ErrorCorrection.cpp +214 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/pdf417/decoder/ec/ErrorCorrection.h +71 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/pdf417/decoder/ec/ModulusGF.cpp +120 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/pdf417/decoder/ec/ModulusGF.h +72 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/pdf417/decoder/ec/ModulusPoly.cpp +284 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/pdf417/decoder/ec/ModulusPoly.h +68 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/pdf417/detector/Detector.cpp +665 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/pdf417/detector/Detector.h +106 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/pdf417/detector/LinesSampler.cpp +715 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/pdf417/detector/LinesSampler.h +122 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/ErrorCorrectionLevel.cpp +65 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/ErrorCorrectionLevel.h +52 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/FormatInformation.cpp +117 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/FormatInformation.h +54 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/QRCodeReader.cpp +52 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/QRCodeReader.h +48 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/Version.cpp +560 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/Version.h +85 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/decoder/BitMatrixParser.cpp +183 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/decoder/BitMatrixParser.h +56 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/decoder/DataBlock.cpp +118 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/decoder/DataBlock.h +50 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/decoder/DataMask.cpp +159 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/decoder/DataMask.h +50 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/decoder/DecodedBitStreamParser.cpp +428 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/decoder/DecodedBitStreamParser.h +72 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/decoder/Decoder.cpp +107 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/decoder/Decoder.h +46 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/decoder/Mode.cpp +90 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/decoder/Mode.h +57 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/detector/AlignmentPattern.cpp +47 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/detector/AlignmentPattern.h +45 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/detector/AlignmentPatternFinder.cpp +208 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/detector/AlignmentPatternFinder.h +68 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/detector/Detector.cpp +315 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/detector/Detector.h +69 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/detector/FinderPattern.cpp +69 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/detector/FinderPattern.h +48 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/detector/FinderPatternFinder.cpp +559 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/detector/FinderPatternFinder.h +76 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/detector/FinderPatternInfo.cpp +41 -0
- data/ext/zxing/zxing-cpp/core/src/zxing/qrcode/detector/FinderPatternInfo.h +47 -0
- data/ext/zxing/zxing-cpp/core/tests/src/TestRunner.cpp +30 -0
- data/ext/zxing/zxing-cpp/core/tests/src/common/BitArrayTest.cpp +216 -0
- data/ext/zxing/zxing-cpp/core/tests/src/common/BitArrayTest.h +61 -0
- data/ext/zxing/zxing-cpp/core/tests/src/common/BitMatrixTest.cpp +106 -0
- data/ext/zxing/zxing-cpp/core/tests/src/common/BitMatrixTest.h +55 -0
- data/ext/zxing/zxing-cpp/core/tests/src/common/BitSourceTest.cpp +49 -0
- data/ext/zxing/zxing-cpp/core/tests/src/common/BitSourceTest.h +42 -0
- data/ext/zxing/zxing-cpp/core/tests/src/common/CountedTest.cpp +58 -0
- data/ext/zxing/zxing-cpp/core/tests/src/common/CountedTest.h +46 -0
- data/ext/zxing/zxing-cpp/core/tests/src/common/PerspectiveTransformTest.cpp +69 -0
- data/ext/zxing/zxing-cpp/core/tests/src/common/PerspectiveTransformTest.h +47 -0
- data/ext/zxing/zxing-cpp/core/tests/src/common/reedsolomon/ReedSolomonTest.cpp +129 -0
- data/ext/zxing/zxing-cpp/core/tests/src/common/reedsolomon/ReedSolomonTest.h +62 -0
- data/ext/zxing/zxing-cpp/core/tests/src/qrcode/ErrorCorrectionLevelTest.cpp +47 -0
- data/ext/zxing/zxing-cpp/core/tests/src/qrcode/ErrorCorrectionLevelTest.h +45 -0
- data/ext/zxing/zxing-cpp/core/tests/src/qrcode/FormatInformationTest.cpp +88 -0
- data/ext/zxing/zxing-cpp/core/tests/src/qrcode/FormatInformationTest.h +47 -0
- data/ext/zxing/zxing-cpp/core/tests/src/qrcode/VersionTest.cpp +88 -0
- data/ext/zxing/zxing-cpp/core/tests/src/qrcode/VersionTest.h +49 -0
- data/ext/zxing/zxing-cpp/core/tests/src/qrcode/decoder/DataMaskTest.cpp +132 -0
- data/ext/zxing/zxing-cpp/core/tests/src/qrcode/decoder/DataMaskTest.h +91 -0
- data/ext/zxing/zxing-cpp/core/tests/src/qrcode/decoder/ModeTest.cpp +52 -0
- data/ext/zxing/zxing-cpp/core/tests/src/qrcode/decoder/ModeTest.h +47 -0
- data/ext/zxing/zxing.cc +224 -0
- data/lib/zxing.rb +50 -0
- data/lib/zxing/.gitignore +2 -0
- data/lib/zxing/aztec.rb +5 -0
- data/lib/zxing/aztec/aztec_reader.rb +14 -0
- data/lib/zxing/bad_image_exception.rb +4 -0
- data/lib/zxing/binarizer.rb +8 -0
- data/lib/zxing/binary_bitmap.rb +15 -0
- data/lib/zxing/checksum_exception.rb +4 -0
- data/lib/zxing/common.rb +7 -0
- data/lib/zxing/common/bit_matrix.rb +9 -0
- data/lib/zxing/common/hybrid_binarizer.rb +17 -0
- data/lib/zxing/common/illegal_argument_exception.rb +4 -0
- data/lib/zxing/datamatrix.rb +5 -0
- data/lib/zxing/datamatrix/data_matrix_reader.rb +14 -0
- data/lib/zxing/decodable.rb +11 -0
- data/lib/zxing/exception.rb +4 -0
- data/lib/zxing/ffi.rb +20 -0
- data/lib/zxing/ffi/aztec.rb +6 -0
- data/lib/zxing/ffi/aztec/aztec_reader.rb +9 -0
- data/lib/zxing/ffi/binarizer.rb +25 -0
- data/lib/zxing/ffi/binary_bitmap.rb +15 -0
- data/lib/zxing/ffi/common.rb +8 -0
- data/lib/zxing/ffi/common/bit_matrix.rb +12 -0
- data/lib/zxing/ffi/common/greyscale_luminance_source.rb +30 -0
- data/lib/zxing/ffi/common/hybrid_binarizer.rb +10 -0
- data/lib/zxing/ffi/datamatrix.rb +6 -0
- data/lib/zxing/ffi/datamatrix/data_matrix_reader.rb +9 -0
- data/lib/zxing/ffi/library.rb +102 -0
- data/lib/zxing/ffi/luminance_source.rb +18 -0
- data/lib/zxing/ffi/multi_format_reader.rb +9 -0
- data/lib/zxing/ffi/oned.rb +6 -0
- data/lib/zxing/ffi/oned/code_39_reader.rb +10 -0
- data/lib/zxing/ffi/qrcode.rb +8 -0
- data/lib/zxing/ffi/qrcode/decoder.rb +10 -0
- data/lib/zxing/ffi/qrcode/detector.rb +10 -0
- data/lib/zxing/ffi/reader.rb +58 -0
- data/lib/zxing/ffi/result.rb +23 -0
- data/lib/zxing/format_exception.rb +4 -0
- data/lib/zxing/illegal_argument_exception.rb +4 -0
- data/lib/zxing/image.rb +15 -0
- data/lib/zxing/luminance_source.rb +18 -0
- data/lib/zxing/multi_format_reader.rb +11 -0
- data/lib/zxing/not_found_exception.rb +4 -0
- data/lib/zxing/oned.rb +5 -0
- data/lib/zxing/oned/code_39_reader.rb +15 -0
- data/lib/zxing/qrcode.rb +8 -0
- data/lib/zxing/qrcode/decoder.rb +14 -0
- data/lib/zxing/qrcode/detector.rb +14 -0
- data/lib/zxing/qrcode/encoder.rb +8 -0
- data/lib/zxing/qrcode/encoder/byte_matrix.rb +18 -0
- data/lib/zxing/qrcode/encoder/encoder.rb +9 -0
- data/lib/zxing/qrcode/encoder/qrcode.rb +18 -0
- data/lib/zxing/reader.rb +8 -0
- data/lib/zxing/reader_exception.rb +4 -0
- data/lib/zxing/reed_solomon_exception.rb +2 -0
- data/lib/zxing/result.rb +18 -0
- data/lib/zxing/rmagick.rb +5 -0
- data/lib/zxing/rmagick/image.rb +109 -0
- data/lib/zxing/version.rb +33 -0
- data/zxing_cpp.gemspec +36 -0
- metadata +515 -0
Binary file
|
@@ -0,0 +1,644 @@
|
|
1
|
+
/* This source file must have a .cpp extension so that all C++ compilers
|
2
|
+
recognize the extension without flags. Borland does not know .cxx for
|
3
|
+
example. */
|
4
|
+
#ifndef __cplusplus
|
5
|
+
# error "A C compiler has been selected for C++."
|
6
|
+
#endif
|
7
|
+
|
8
|
+
|
9
|
+
/* Version number components: V=Version, R=Revision, P=Patch
|
10
|
+
Version date components: YYYY=Year, MM=Month, DD=Day */
|
11
|
+
|
12
|
+
#if defined(__COMO__)
|
13
|
+
# define COMPILER_ID "Comeau"
|
14
|
+
/* __COMO_VERSION__ = VRR */
|
15
|
+
# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100)
|
16
|
+
# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100)
|
17
|
+
|
18
|
+
#elif defined(__INTEL_COMPILER) || defined(__ICC)
|
19
|
+
# define COMPILER_ID "Intel"
|
20
|
+
# if defined(_MSC_VER)
|
21
|
+
# define SIMULATE_ID "MSVC"
|
22
|
+
# endif
|
23
|
+
# if defined(__GNUC__)
|
24
|
+
# define SIMULATE_ID "GNU"
|
25
|
+
# endif
|
26
|
+
/* __INTEL_COMPILER = VRP */
|
27
|
+
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
|
28
|
+
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
|
29
|
+
# if defined(__INTEL_COMPILER_UPDATE)
|
30
|
+
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
|
31
|
+
# else
|
32
|
+
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
|
33
|
+
# endif
|
34
|
+
# if defined(__INTEL_COMPILER_BUILD_DATE)
|
35
|
+
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
|
36
|
+
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
|
37
|
+
# endif
|
38
|
+
# if defined(_MSC_VER)
|
39
|
+
/* _MSC_VER = VVRR */
|
40
|
+
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
41
|
+
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
42
|
+
# endif
|
43
|
+
# if defined(__GNUC__)
|
44
|
+
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
|
45
|
+
# elif defined(__GNUG__)
|
46
|
+
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
|
47
|
+
# endif
|
48
|
+
# if defined(__GNUC_MINOR__)
|
49
|
+
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
|
50
|
+
# endif
|
51
|
+
# if defined(__GNUC_PATCHLEVEL__)
|
52
|
+
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
53
|
+
# endif
|
54
|
+
|
55
|
+
#elif defined(__PATHCC__)
|
56
|
+
# define COMPILER_ID "PathScale"
|
57
|
+
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
|
58
|
+
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
|
59
|
+
# if defined(__PATHCC_PATCHLEVEL__)
|
60
|
+
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
|
61
|
+
# endif
|
62
|
+
|
63
|
+
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
|
64
|
+
# define COMPILER_ID "Embarcadero"
|
65
|
+
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
|
66
|
+
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
|
67
|
+
# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
|
68
|
+
|
69
|
+
#elif defined(__BORLANDC__)
|
70
|
+
# define COMPILER_ID "Borland"
|
71
|
+
/* __BORLANDC__ = 0xVRR */
|
72
|
+
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
|
73
|
+
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
|
74
|
+
|
75
|
+
#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
|
76
|
+
# define COMPILER_ID "Watcom"
|
77
|
+
/* __WATCOMC__ = VVRR */
|
78
|
+
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
|
79
|
+
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
80
|
+
# if (__WATCOMC__ % 10) > 0
|
81
|
+
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
82
|
+
# endif
|
83
|
+
|
84
|
+
#elif defined(__WATCOMC__)
|
85
|
+
# define COMPILER_ID "OpenWatcom"
|
86
|
+
/* __WATCOMC__ = VVRP + 1100 */
|
87
|
+
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
|
88
|
+
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
89
|
+
# if (__WATCOMC__ % 10) > 0
|
90
|
+
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
91
|
+
# endif
|
92
|
+
|
93
|
+
#elif defined(__SUNPRO_CC)
|
94
|
+
# define COMPILER_ID "SunPro"
|
95
|
+
# if __SUNPRO_CC >= 0x5100
|
96
|
+
/* __SUNPRO_CC = 0xVRRP */
|
97
|
+
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12)
|
98
|
+
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF)
|
99
|
+
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
|
100
|
+
# else
|
101
|
+
/* __SUNPRO_CC = 0xVRP */
|
102
|
+
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8)
|
103
|
+
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF)
|
104
|
+
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
|
105
|
+
# endif
|
106
|
+
|
107
|
+
#elif defined(__HP_aCC)
|
108
|
+
# define COMPILER_ID "HP"
|
109
|
+
/* __HP_aCC = VVRRPP */
|
110
|
+
# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000)
|
111
|
+
# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100)
|
112
|
+
# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100)
|
113
|
+
|
114
|
+
#elif defined(__DECCXX)
|
115
|
+
# define COMPILER_ID "Compaq"
|
116
|
+
/* __DECCXX_VER = VVRRTPPPP */
|
117
|
+
# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000)
|
118
|
+
# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100)
|
119
|
+
# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000)
|
120
|
+
|
121
|
+
#elif defined(__IBMCPP__) && defined(__COMPILER_VER__)
|
122
|
+
# define COMPILER_ID "zOS"
|
123
|
+
/* __IBMCPP__ = VRP */
|
124
|
+
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
|
125
|
+
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
|
126
|
+
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
|
127
|
+
|
128
|
+
#elif defined(__ibmxl__) && defined(__clang__)
|
129
|
+
# define COMPILER_ID "XLClang"
|
130
|
+
# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
|
131
|
+
# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
|
132
|
+
# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
|
133
|
+
# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
|
134
|
+
|
135
|
+
|
136
|
+
#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800
|
137
|
+
# define COMPILER_ID "XL"
|
138
|
+
/* __IBMCPP__ = VRP */
|
139
|
+
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
|
140
|
+
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
|
141
|
+
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
|
142
|
+
|
143
|
+
#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800
|
144
|
+
# define COMPILER_ID "VisualAge"
|
145
|
+
/* __IBMCPP__ = VRP */
|
146
|
+
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
|
147
|
+
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
|
148
|
+
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
|
149
|
+
|
150
|
+
#elif defined(__PGI)
|
151
|
+
# define COMPILER_ID "PGI"
|
152
|
+
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
|
153
|
+
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
|
154
|
+
# if defined(__PGIC_PATCHLEVEL__)
|
155
|
+
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
|
156
|
+
# endif
|
157
|
+
|
158
|
+
#elif defined(_CRAYC)
|
159
|
+
# define COMPILER_ID "Cray"
|
160
|
+
# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
|
161
|
+
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
|
162
|
+
|
163
|
+
#elif defined(__TI_COMPILER_VERSION__)
|
164
|
+
# define COMPILER_ID "TI"
|
165
|
+
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
|
166
|
+
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
|
167
|
+
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
|
168
|
+
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
|
169
|
+
|
170
|
+
#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version)
|
171
|
+
# define COMPILER_ID "Fujitsu"
|
172
|
+
|
173
|
+
#elif defined(__ghs__)
|
174
|
+
# define COMPILER_ID "GHS"
|
175
|
+
/* __GHS_VERSION_NUMBER = VVVVRP */
|
176
|
+
# ifdef __GHS_VERSION_NUMBER
|
177
|
+
# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
|
178
|
+
# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
|
179
|
+
# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
|
180
|
+
# endif
|
181
|
+
|
182
|
+
#elif defined(__SCO_VERSION__)
|
183
|
+
# define COMPILER_ID "SCO"
|
184
|
+
|
185
|
+
#elif defined(__ARMCC_VERSION) && !defined(__clang__)
|
186
|
+
# define COMPILER_ID "ARMCC"
|
187
|
+
#if __ARMCC_VERSION >= 1000000
|
188
|
+
/* __ARMCC_VERSION = VRRPPPP */
|
189
|
+
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
|
190
|
+
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
|
191
|
+
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
192
|
+
#else
|
193
|
+
/* __ARMCC_VERSION = VRPPPP */
|
194
|
+
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
|
195
|
+
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
|
196
|
+
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
197
|
+
#endif
|
198
|
+
|
199
|
+
|
200
|
+
#elif defined(__clang__) && defined(__apple_build_version__)
|
201
|
+
# define COMPILER_ID "AppleClang"
|
202
|
+
# if defined(_MSC_VER)
|
203
|
+
# define SIMULATE_ID "MSVC"
|
204
|
+
# endif
|
205
|
+
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
206
|
+
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
207
|
+
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
208
|
+
# if defined(_MSC_VER)
|
209
|
+
/* _MSC_VER = VVRR */
|
210
|
+
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
211
|
+
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
212
|
+
# endif
|
213
|
+
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
|
214
|
+
|
215
|
+
#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
|
216
|
+
# define COMPILER_ID "ARMClang"
|
217
|
+
# define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
|
218
|
+
# define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
|
219
|
+
# define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000)
|
220
|
+
# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
|
221
|
+
|
222
|
+
#elif defined(__clang__)
|
223
|
+
# define COMPILER_ID "Clang"
|
224
|
+
# if defined(_MSC_VER)
|
225
|
+
# define SIMULATE_ID "MSVC"
|
226
|
+
# endif
|
227
|
+
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
228
|
+
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
229
|
+
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
230
|
+
# if defined(_MSC_VER)
|
231
|
+
/* _MSC_VER = VVRR */
|
232
|
+
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
233
|
+
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
234
|
+
# endif
|
235
|
+
|
236
|
+
#elif defined(__GNUC__) || defined(__GNUG__)
|
237
|
+
# define COMPILER_ID "GNU"
|
238
|
+
# if defined(__GNUC__)
|
239
|
+
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
|
240
|
+
# else
|
241
|
+
# define COMPILER_VERSION_MAJOR DEC(__GNUG__)
|
242
|
+
# endif
|
243
|
+
# if defined(__GNUC_MINOR__)
|
244
|
+
# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
|
245
|
+
# endif
|
246
|
+
# if defined(__GNUC_PATCHLEVEL__)
|
247
|
+
# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
248
|
+
# endif
|
249
|
+
|
250
|
+
#elif defined(_MSC_VER)
|
251
|
+
# define COMPILER_ID "MSVC"
|
252
|
+
/* _MSC_VER = VVRR */
|
253
|
+
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
|
254
|
+
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
|
255
|
+
# if defined(_MSC_FULL_VER)
|
256
|
+
# if _MSC_VER >= 1400
|
257
|
+
/* _MSC_FULL_VER = VVRRPPPPP */
|
258
|
+
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
|
259
|
+
# else
|
260
|
+
/* _MSC_FULL_VER = VVRRPPPP */
|
261
|
+
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
|
262
|
+
# endif
|
263
|
+
# endif
|
264
|
+
# if defined(_MSC_BUILD)
|
265
|
+
# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
|
266
|
+
# endif
|
267
|
+
|
268
|
+
#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
|
269
|
+
# define COMPILER_ID "ADSP"
|
270
|
+
#if defined(__VISUALDSPVERSION__)
|
271
|
+
/* __VISUALDSPVERSION__ = 0xVVRRPP00 */
|
272
|
+
# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
|
273
|
+
# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
|
274
|
+
# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
|
275
|
+
#endif
|
276
|
+
|
277
|
+
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
|
278
|
+
# define COMPILER_ID "IAR"
|
279
|
+
# if defined(__VER__) && defined(__ICCARM__)
|
280
|
+
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
|
281
|
+
# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
|
282
|
+
# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
|
283
|
+
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
|
284
|
+
# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__))
|
285
|
+
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
|
286
|
+
# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
|
287
|
+
# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
|
288
|
+
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
|
289
|
+
# endif
|
290
|
+
|
291
|
+
|
292
|
+
/* These compilers are either not known or too old to define an
|
293
|
+
identification macro. Try to identify the platform and guess that
|
294
|
+
it is the native compiler. */
|
295
|
+
#elif defined(__hpux) || defined(__hpua)
|
296
|
+
# define COMPILER_ID "HP"
|
297
|
+
|
298
|
+
#else /* unknown compiler */
|
299
|
+
# define COMPILER_ID ""
|
300
|
+
#endif
|
301
|
+
|
302
|
+
/* Construct the string literal in pieces to prevent the source from
|
303
|
+
getting matched. Store it in a pointer rather than an array
|
304
|
+
because some compilers will just produce instructions to fill the
|
305
|
+
array rather than assigning a pointer to a static array. */
|
306
|
+
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
|
307
|
+
#ifdef SIMULATE_ID
|
308
|
+
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
309
|
+
#endif
|
310
|
+
|
311
|
+
#ifdef __QNXNTO__
|
312
|
+
char const* qnxnto = "INFO" ":" "qnxnto[]";
|
313
|
+
#endif
|
314
|
+
|
315
|
+
#if defined(__CRAYXE) || defined(__CRAYXC)
|
316
|
+
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
317
|
+
#endif
|
318
|
+
|
319
|
+
#define STRINGIFY_HELPER(X) #X
|
320
|
+
#define STRINGIFY(X) STRINGIFY_HELPER(X)
|
321
|
+
|
322
|
+
/* Identify known platforms by name. */
|
323
|
+
#if defined(__linux) || defined(__linux__) || defined(linux)
|
324
|
+
# define PLATFORM_ID "Linux"
|
325
|
+
|
326
|
+
#elif defined(__CYGWIN__)
|
327
|
+
# define PLATFORM_ID "Cygwin"
|
328
|
+
|
329
|
+
#elif defined(__MINGW32__)
|
330
|
+
# define PLATFORM_ID "MinGW"
|
331
|
+
|
332
|
+
#elif defined(__APPLE__)
|
333
|
+
# define PLATFORM_ID "Darwin"
|
334
|
+
|
335
|
+
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|
336
|
+
# define PLATFORM_ID "Windows"
|
337
|
+
|
338
|
+
#elif defined(__FreeBSD__) || defined(__FreeBSD)
|
339
|
+
# define PLATFORM_ID "FreeBSD"
|
340
|
+
|
341
|
+
#elif defined(__NetBSD__) || defined(__NetBSD)
|
342
|
+
# define PLATFORM_ID "NetBSD"
|
343
|
+
|
344
|
+
#elif defined(__OpenBSD__) || defined(__OPENBSD)
|
345
|
+
# define PLATFORM_ID "OpenBSD"
|
346
|
+
|
347
|
+
#elif defined(__sun) || defined(sun)
|
348
|
+
# define PLATFORM_ID "SunOS"
|
349
|
+
|
350
|
+
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
|
351
|
+
# define PLATFORM_ID "AIX"
|
352
|
+
|
353
|
+
#elif defined(__hpux) || defined(__hpux__)
|
354
|
+
# define PLATFORM_ID "HP-UX"
|
355
|
+
|
356
|
+
#elif defined(__HAIKU__)
|
357
|
+
# define PLATFORM_ID "Haiku"
|
358
|
+
|
359
|
+
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
|
360
|
+
# define PLATFORM_ID "BeOS"
|
361
|
+
|
362
|
+
#elif defined(__QNX__) || defined(__QNXNTO__)
|
363
|
+
# define PLATFORM_ID "QNX"
|
364
|
+
|
365
|
+
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
|
366
|
+
# define PLATFORM_ID "Tru64"
|
367
|
+
|
368
|
+
#elif defined(__riscos) || defined(__riscos__)
|
369
|
+
# define PLATFORM_ID "RISCos"
|
370
|
+
|
371
|
+
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
|
372
|
+
# define PLATFORM_ID "SINIX"
|
373
|
+
|
374
|
+
#elif defined(__UNIX_SV__)
|
375
|
+
# define PLATFORM_ID "UNIX_SV"
|
376
|
+
|
377
|
+
#elif defined(__bsdos__)
|
378
|
+
# define PLATFORM_ID "BSDOS"
|
379
|
+
|
380
|
+
#elif defined(_MPRAS) || defined(MPRAS)
|
381
|
+
# define PLATFORM_ID "MP-RAS"
|
382
|
+
|
383
|
+
#elif defined(__osf) || defined(__osf__)
|
384
|
+
# define PLATFORM_ID "OSF1"
|
385
|
+
|
386
|
+
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
|
387
|
+
# define PLATFORM_ID "SCO_SV"
|
388
|
+
|
389
|
+
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
|
390
|
+
# define PLATFORM_ID "ULTRIX"
|
391
|
+
|
392
|
+
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
|
393
|
+
# define PLATFORM_ID "Xenix"
|
394
|
+
|
395
|
+
#elif defined(__WATCOMC__)
|
396
|
+
# if defined(__LINUX__)
|
397
|
+
# define PLATFORM_ID "Linux"
|
398
|
+
|
399
|
+
# elif defined(__DOS__)
|
400
|
+
# define PLATFORM_ID "DOS"
|
401
|
+
|
402
|
+
# elif defined(__OS2__)
|
403
|
+
# define PLATFORM_ID "OS2"
|
404
|
+
|
405
|
+
# elif defined(__WINDOWS__)
|
406
|
+
# define PLATFORM_ID "Windows3x"
|
407
|
+
|
408
|
+
# else /* unknown platform */
|
409
|
+
# define PLATFORM_ID
|
410
|
+
# endif
|
411
|
+
|
412
|
+
#elif defined(__INTEGRITY)
|
413
|
+
# if defined(INT_178B)
|
414
|
+
# define PLATFORM_ID "Integrity178"
|
415
|
+
|
416
|
+
# else /* regular Integrity */
|
417
|
+
# define PLATFORM_ID "Integrity"
|
418
|
+
# endif
|
419
|
+
|
420
|
+
#else /* unknown platform */
|
421
|
+
# define PLATFORM_ID
|
422
|
+
|
423
|
+
#endif
|
424
|
+
|
425
|
+
/* For windows compilers MSVC and Intel we can determine
|
426
|
+
the architecture of the compiler being used. This is because
|
427
|
+
the compilers do not have flags that can change the architecture,
|
428
|
+
but rather depend on which compiler is being used
|
429
|
+
*/
|
430
|
+
#if defined(_WIN32) && defined(_MSC_VER)
|
431
|
+
# if defined(_M_IA64)
|
432
|
+
# define ARCHITECTURE_ID "IA64"
|
433
|
+
|
434
|
+
# elif defined(_M_X64) || defined(_M_AMD64)
|
435
|
+
# define ARCHITECTURE_ID "x64"
|
436
|
+
|
437
|
+
# elif defined(_M_IX86)
|
438
|
+
# define ARCHITECTURE_ID "X86"
|
439
|
+
|
440
|
+
# elif defined(_M_ARM64)
|
441
|
+
# define ARCHITECTURE_ID "ARM64"
|
442
|
+
|
443
|
+
# elif defined(_M_ARM)
|
444
|
+
# if _M_ARM == 4
|
445
|
+
# define ARCHITECTURE_ID "ARMV4I"
|
446
|
+
# elif _M_ARM == 5
|
447
|
+
# define ARCHITECTURE_ID "ARMV5I"
|
448
|
+
# else
|
449
|
+
# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
|
450
|
+
# endif
|
451
|
+
|
452
|
+
# elif defined(_M_MIPS)
|
453
|
+
# define ARCHITECTURE_ID "MIPS"
|
454
|
+
|
455
|
+
# elif defined(_M_SH)
|
456
|
+
# define ARCHITECTURE_ID "SHx"
|
457
|
+
|
458
|
+
# else /* unknown architecture */
|
459
|
+
# define ARCHITECTURE_ID ""
|
460
|
+
# endif
|
461
|
+
|
462
|
+
#elif defined(__WATCOMC__)
|
463
|
+
# if defined(_M_I86)
|
464
|
+
# define ARCHITECTURE_ID "I86"
|
465
|
+
|
466
|
+
# elif defined(_M_IX86)
|
467
|
+
# define ARCHITECTURE_ID "X86"
|
468
|
+
|
469
|
+
# else /* unknown architecture */
|
470
|
+
# define ARCHITECTURE_ID ""
|
471
|
+
# endif
|
472
|
+
|
473
|
+
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
|
474
|
+
# if defined(__ICCARM__)
|
475
|
+
# define ARCHITECTURE_ID "ARM"
|
476
|
+
|
477
|
+
# elif defined(__ICCRX__)
|
478
|
+
# define ARCHITECTURE_ID "RX"
|
479
|
+
|
480
|
+
# elif defined(__ICCRH850__)
|
481
|
+
# define ARCHITECTURE_ID "RH850"
|
482
|
+
|
483
|
+
# elif defined(__ICCRL78__)
|
484
|
+
# define ARCHITECTURE_ID "RL78"
|
485
|
+
|
486
|
+
# elif defined(__ICCRISCV__)
|
487
|
+
# define ARCHITECTURE_ID "RISCV"
|
488
|
+
|
489
|
+
# elif defined(__ICCAVR__)
|
490
|
+
# define ARCHITECTURE_ID "AVR"
|
491
|
+
|
492
|
+
# elif defined(__ICC430__)
|
493
|
+
# define ARCHITECTURE_ID "MSP430"
|
494
|
+
|
495
|
+
# else /* unknown architecture */
|
496
|
+
# define ARCHITECTURE_ID ""
|
497
|
+
# endif
|
498
|
+
|
499
|
+
#elif defined(__ghs__)
|
500
|
+
# if defined(__PPC64__)
|
501
|
+
# define ARCHITECTURE_ID "PPC64"
|
502
|
+
|
503
|
+
# elif defined(__ppc__)
|
504
|
+
# define ARCHITECTURE_ID "PPC"
|
505
|
+
|
506
|
+
# elif defined(__ARM__)
|
507
|
+
# define ARCHITECTURE_ID "ARM"
|
508
|
+
|
509
|
+
# elif defined(__x86_64__)
|
510
|
+
# define ARCHITECTURE_ID "x64"
|
511
|
+
|
512
|
+
# elif defined(__i386__)
|
513
|
+
# define ARCHITECTURE_ID "X86"
|
514
|
+
|
515
|
+
# else /* unknown architecture */
|
516
|
+
# define ARCHITECTURE_ID ""
|
517
|
+
# endif
|
518
|
+
#else
|
519
|
+
# define ARCHITECTURE_ID
|
520
|
+
#endif
|
521
|
+
|
522
|
+
/* Convert integer to decimal digit literals. */
|
523
|
+
#define DEC(n) \
|
524
|
+
('0' + (((n) / 10000000)%10)), \
|
525
|
+
('0' + (((n) / 1000000)%10)), \
|
526
|
+
('0' + (((n) / 100000)%10)), \
|
527
|
+
('0' + (((n) / 10000)%10)), \
|
528
|
+
('0' + (((n) / 1000)%10)), \
|
529
|
+
('0' + (((n) / 100)%10)), \
|
530
|
+
('0' + (((n) / 10)%10)), \
|
531
|
+
('0' + ((n) % 10))
|
532
|
+
|
533
|
+
/* Convert integer to hex digit literals. */
|
534
|
+
#define HEX(n) \
|
535
|
+
('0' + ((n)>>28 & 0xF)), \
|
536
|
+
('0' + ((n)>>24 & 0xF)), \
|
537
|
+
('0' + ((n)>>20 & 0xF)), \
|
538
|
+
('0' + ((n)>>16 & 0xF)), \
|
539
|
+
('0' + ((n)>>12 & 0xF)), \
|
540
|
+
('0' + ((n)>>8 & 0xF)), \
|
541
|
+
('0' + ((n)>>4 & 0xF)), \
|
542
|
+
('0' + ((n) & 0xF))
|
543
|
+
|
544
|
+
/* Construct a string literal encoding the version number components. */
|
545
|
+
#ifdef COMPILER_VERSION_MAJOR
|
546
|
+
char const info_version[] = {
|
547
|
+
'I', 'N', 'F', 'O', ':',
|
548
|
+
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
|
549
|
+
COMPILER_VERSION_MAJOR,
|
550
|
+
# ifdef COMPILER_VERSION_MINOR
|
551
|
+
'.', COMPILER_VERSION_MINOR,
|
552
|
+
# ifdef COMPILER_VERSION_PATCH
|
553
|
+
'.', COMPILER_VERSION_PATCH,
|
554
|
+
# ifdef COMPILER_VERSION_TWEAK
|
555
|
+
'.', COMPILER_VERSION_TWEAK,
|
556
|
+
# endif
|
557
|
+
# endif
|
558
|
+
# endif
|
559
|
+
']','\0'};
|
560
|
+
#endif
|
561
|
+
|
562
|
+
/* Construct a string literal encoding the internal version number. */
|
563
|
+
#ifdef COMPILER_VERSION_INTERNAL
|
564
|
+
char const info_version_internal[] = {
|
565
|
+
'I', 'N', 'F', 'O', ':',
|
566
|
+
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
|
567
|
+
'i','n','t','e','r','n','a','l','[',
|
568
|
+
COMPILER_VERSION_INTERNAL,']','\0'};
|
569
|
+
#endif
|
570
|
+
|
571
|
+
/* Construct a string literal encoding the version number components. */
|
572
|
+
#ifdef SIMULATE_VERSION_MAJOR
|
573
|
+
char const info_simulate_version[] = {
|
574
|
+
'I', 'N', 'F', 'O', ':',
|
575
|
+
's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
|
576
|
+
SIMULATE_VERSION_MAJOR,
|
577
|
+
# ifdef SIMULATE_VERSION_MINOR
|
578
|
+
'.', SIMULATE_VERSION_MINOR,
|
579
|
+
# ifdef SIMULATE_VERSION_PATCH
|
580
|
+
'.', SIMULATE_VERSION_PATCH,
|
581
|
+
# ifdef SIMULATE_VERSION_TWEAK
|
582
|
+
'.', SIMULATE_VERSION_TWEAK,
|
583
|
+
# endif
|
584
|
+
# endif
|
585
|
+
# endif
|
586
|
+
']','\0'};
|
587
|
+
#endif
|
588
|
+
|
589
|
+
/* Construct the string literal in pieces to prevent the source from
|
590
|
+
getting matched. Store it in a pointer rather than an array
|
591
|
+
because some compilers will just produce instructions to fill the
|
592
|
+
array rather than assigning a pointer to a static array. */
|
593
|
+
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
|
594
|
+
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
|
595
|
+
|
596
|
+
|
597
|
+
|
598
|
+
|
599
|
+
#if defined(_MSC_VER) && defined(_MSVC_LANG)
|
600
|
+
#define CXX_STD _MSVC_LANG
|
601
|
+
#else
|
602
|
+
#define CXX_STD __cplusplus
|
603
|
+
#endif
|
604
|
+
|
605
|
+
const char* info_language_dialect_default = "INFO" ":" "dialect_default["
|
606
|
+
#if CXX_STD > 201703L
|
607
|
+
"20"
|
608
|
+
#elif CXX_STD >= 201703L
|
609
|
+
"17"
|
610
|
+
#elif CXX_STD >= 201402L
|
611
|
+
"14"
|
612
|
+
#elif CXX_STD >= 201103L
|
613
|
+
"11"
|
614
|
+
#else
|
615
|
+
"98"
|
616
|
+
#endif
|
617
|
+
"]";
|
618
|
+
|
619
|
+
/*--------------------------------------------------------------------------*/
|
620
|
+
|
621
|
+
int main(int argc, char* argv[])
|
622
|
+
{
|
623
|
+
int require = 0;
|
624
|
+
require += info_compiler[argc];
|
625
|
+
require += info_platform[argc];
|
626
|
+
#ifdef COMPILER_VERSION_MAJOR
|
627
|
+
require += info_version[argc];
|
628
|
+
#endif
|
629
|
+
#ifdef COMPILER_VERSION_INTERNAL
|
630
|
+
require += info_version_internal[argc];
|
631
|
+
#endif
|
632
|
+
#ifdef SIMULATE_ID
|
633
|
+
require += info_simulate[argc];
|
634
|
+
#endif
|
635
|
+
#ifdef SIMULATE_VERSION_MAJOR
|
636
|
+
require += info_simulate_version[argc];
|
637
|
+
#endif
|
638
|
+
#if defined(__CRAYXE) || defined(__CRAYXC)
|
639
|
+
require += info_cray[argc];
|
640
|
+
#endif
|
641
|
+
require += info_language_dialect_default[argc];
|
642
|
+
(void)argv;
|
643
|
+
return require;
|
644
|
+
}
|