qrscanner 0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -0
- data/Manifest +478 -0
- data/README +41 -0
- data/Rakefile +9 -0
- data/bin/qrscanner +9 -0
- data/ext/qrscanner/extconf.rb +70 -0
- data/ext/qrscanner/qrscanner.c +32 -0
- data/ext/qrscanner/zxing/README +43 -0
- data/ext/qrscanner/zxing/SConscript +55 -0
- data/ext/qrscanner/zxing/SConstruct +7 -0
- data/ext/qrscanner/zxing/astyle-options +12 -0
- data/ext/qrscanner/zxing/blackboxtest.sh +45 -0
- data/ext/qrscanner/zxing/core/src/zxing/BarcodeFormat.cpp +38 -0
- data/ext/qrscanner/zxing/core/src/zxing/BarcodeFormat.h +42 -0
- data/ext/qrscanner/zxing/core/src/zxing/Binarizer.cpp +36 -0
- data/ext/qrscanner/zxing/core/src/zxing/Binarizer.h +46 -0
- data/ext/qrscanner/zxing/core/src/zxing/BinaryBitmap.cpp +67 -0
- data/ext/qrscanner/zxing/core/src/zxing/BinaryBitmap.h +57 -0
- data/ext/qrscanner/zxing/core/src/zxing/DecodeHints.cpp +111 -0
- data/ext/qrscanner/zxing/core/src/zxing/DecodeHints.h +69 -0
- data/ext/qrscanner/zxing/core/src/zxing/Exception.cpp +25 -0
- data/ext/qrscanner/zxing/core/src/zxing/Exception.h +39 -0
- data/ext/qrscanner/zxing/core/src/zxing/LuminanceSource.cpp +47 -0
- data/ext/qrscanner/zxing/core/src/zxing/LuminanceSource.h +49 -0
- data/ext/qrscanner/zxing/core/src/zxing/MultiFormatReader.cpp +102 -0
- data/ext/qrscanner/zxing/core/src/zxing/MultiFormatReader.h +49 -0
- data/ext/qrscanner/zxing/core/src/zxing/Reader.cpp +31 -0
- data/ext/qrscanner/zxing/core/src/zxing/Reader.h +40 -0
- data/ext/qrscanner/zxing/core/src/zxing/ReaderException.cpp +32 -0
- data/ext/qrscanner/zxing/core/src/zxing/ReaderException.h +34 -0
- data/ext/qrscanner/zxing/core/src/zxing/Result.cpp +59 -0
- data/ext/qrscanner/zxing/core/src/zxing/Result.h +53 -0
- data/ext/qrscanner/zxing/core/src/zxing/ResultPoint.cpp +27 -0
- data/ext/qrscanner/zxing/core/src/zxing/ResultPoint.h +39 -0
- data/ext/qrscanner/zxing/core/src/zxing/ResultPointCallback.cpp +26 -0
- data/ext/qrscanner/zxing/core/src/zxing/ResultPointCallback.h +39 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/Array.cpp +22 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/Array.h +207 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/BitArray.cpp +129 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/BitArray.h +55 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/BitMatrix.cpp +178 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/BitMatrix.h +65 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/BitSource.cpp +75 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/BitSource.h +67 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/Counted.cpp +32 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/Counted.h +205 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/DecoderResult.cpp +37 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/DecoderResult.h +43 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/DetectorResult.cpp +41 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/DetectorResult.h +46 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/EdgeDetector.cpp +191 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/EdgeDetector.h +38 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/GlobalHistogramBinarizer.cpp +209 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/GlobalHistogramBinarizer.h +47 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/GreyscaleLuminanceSource.cpp +70 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/GreyscaleLuminanceSource.h +62 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/GreyscaleRotatedLuminanceSource.cpp +65 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/GreyscaleRotatedLuminanceSource.h +60 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/GridSampler.cpp +101 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/GridSampler.h +43 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/HybridBinarizer.cpp +168 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/HybridBinarizer.h +55 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/IllegalArgumentException.cpp +31 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/IllegalArgumentException.h +33 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/PerspectiveTransform.cpp +107 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/PerspectiveTransform.h +49 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/Point.h +47 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/Str.cpp +38 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/Str.h +40 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/reedsolomon/GF256.cpp +136 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/reedsolomon/GF256.h +68 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/reedsolomon/GF256Poly.cpp +198 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/reedsolomon/GF256Poly.h +53 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/reedsolomon/ReedSolomonDecoder.cpp +193 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/reedsolomon/ReedSolomonDecoder.h +46 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/reedsolomon/ReedSolomonException.cpp +30 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/reedsolomon/ReedSolomonException.h +33 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/DataMatrixReader.cpp +82 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/DataMatrixReader.h +45 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/Version.cpp +199 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/Version.h +87 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/decoder/BitMatrixParser.cpp +364 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/decoder/BitMatrixParser.h +59 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/decoder/DataBlock.cpp +113 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/decoder/DataBlock.h +49 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/decoder/DecodedBitStreamParser.cpp +404 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/decoder/DecodedBitStreamParser.h +103 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/decoder/Decoder.cpp +96 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/decoder/Decoder.h +50 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/detector/CornerPoint.cpp +54 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/detector/CornerPoint.h +47 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/detector/Detector.cpp +315 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/detector/Detector.h +79 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/detector/MonochromeRectangleDetector.cpp +172 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/detector/MonochromeRectangleDetector.h +61 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/Code128Reader.cpp +490 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/Code128Reader.h +63 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/Code39Reader.cpp +352 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/Code39Reader.h +58 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/EAN13Reader.cpp +95 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/EAN13Reader.h +44 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/EAN8Reader.cpp +73 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/EAN8Reader.h +41 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/ITFReader.cpp +363 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/ITFReader.h +56 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/MultiFormatOneDReader.cpp +66 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/MultiFormatOneDReader.h +38 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/MultiFormatUPCEANReader.cpp +87 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/MultiFormatUPCEANReader.h +38 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/OneDReader.cpp +206 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/OneDReader.h +50 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/OneDResultPoint.cpp +36 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/OneDResultPoint.h +40 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/UPCAReader.cpp +65 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/UPCAReader.h +49 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/UPCEANReader.cpp +311 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/UPCEANReader.h +77 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/UPCEReader.cpp +143 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/UPCEReader.h +47 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/ErrorCorrectionLevel.cpp +49 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/ErrorCorrectionLevel.h +46 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/FormatInformation.cpp +108 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/FormatInformation.h +54 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/QRCodeReader.cpp +82 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/QRCodeReader.h +43 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/Version.cpp +557 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/Version.h +85 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/BitMatrixParser.cpp +191 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/BitMatrixParser.h +56 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/DataBlock.cpp +118 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/DataBlock.h +50 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/DataMask.cpp +159 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/DataMask.h +50 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/DecodedBitStreamParser.cpp +353 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/DecodedBitStreamParser.h +59 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/Decoder.cpp +103 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/Decoder.h +47 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/Mode.cpp +73 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/Mode.h +50 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/AlignmentPattern.cpp +46 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/AlignmentPattern.h +45 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/AlignmentPatternFinder.cpp +209 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/AlignmentPatternFinder.h +68 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/Detector.cpp +286 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/Detector.h +64 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/FinderPattern.cpp +58 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/FinderPattern.h +48 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/FinderPatternFinder.cpp +540 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/FinderPatternFinder.h +69 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/FinderPatternInfo.cpp +41 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/FinderPatternInfo.h +47 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/QREdgeDetector.cpp +169 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/QREdgeDetector.h +48 -0
- data/ext/qrscanner/zxing/core/tests/src/TestRunner.cpp +30 -0
- data/ext/qrscanner/zxing/core/tests/src/common/BitArrayTest.cpp +96 -0
- data/ext/qrscanner/zxing/core/tests/src/common/BitArrayTest.h +50 -0
- data/ext/qrscanner/zxing/core/tests/src/common/BitMatrixTest.cpp +107 -0
- data/ext/qrscanner/zxing/core/tests/src/common/BitMatrixTest.h +55 -0
- data/ext/qrscanner/zxing/core/tests/src/common/BitSourceTest.cpp +49 -0
- data/ext/qrscanner/zxing/core/tests/src/common/BitSourceTest.h +42 -0
- data/ext/qrscanner/zxing/core/tests/src/common/BlackPointEstimatorTest.cpp +47 -0
- data/ext/qrscanner/zxing/core/tests/src/common/BlackPointEstimatorTest.h +45 -0
- data/ext/qrscanner/zxing/core/tests/src/common/CountedTest.cpp +54 -0
- data/ext/qrscanner/zxing/core/tests/src/common/CountedTest.h +46 -0
- data/ext/qrscanner/zxing/core/tests/src/common/PerspectiveTransformTest.cpp +69 -0
- data/ext/qrscanner/zxing/core/tests/src/common/PerspectiveTransformTest.h +47 -0
- data/ext/qrscanner/zxing/core/tests/src/common/reedsolomon/ReedSolomonTest.cpp +130 -0
- data/ext/qrscanner/zxing/core/tests/src/common/reedsolomon/ReedSolomonTest.h +62 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/ErrorCorrectionLevelTest.cpp +47 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/ErrorCorrectionLevelTest.h +45 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/FormatInformationTest.cpp +70 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/FormatInformationTest.h +47 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/VersionTest.cpp +88 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/VersionTest.h +49 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/decoder/DataMaskTest.cpp +134 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/decoder/DataMaskTest.h +91 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/decoder/ModeTest.cpp +52 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/decoder/ModeTest.h +47 -0
- data/ext/qrscanner/zxing/format +2 -0
- data/ext/qrscanner/zxing/magick/src/MagickBitmapSource.cpp +99 -0
- data/ext/qrscanner/zxing/magick/src/MagickBitmapSource.h +49 -0
- data/ext/qrscanner/zxing/magick/src/example.cpp +83 -0
- data/ext/qrscanner/zxing/magick/src/main.cpp +241 -0
- data/ext/qrscanner/zxing/magick/src/qrscanner.cpp +188 -0
- data/ext/qrscanner/zxing/osx.xcodeproj/project.pbxproj +1045 -0
- data/ext/qrscanner/zxing/scons/scons-LICENSE +25 -0
- data/ext/qrscanner/zxing/scons/scons-README +204 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Action.py +1241 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Action.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Builder.py +877 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Builder.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/CacheDir.py +216 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/CacheDir.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Conftest.py +793 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Conftest.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Debug.py +220 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Debug.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Defaults.py +480 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Defaults.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Environment.py +2318 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Environment.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Errors.py +205 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Errors.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Executor.py +633 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Executor.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Job.py +435 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Job.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Memoize.py +244 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Memoize.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Node/Alias.py +152 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Node/Alias.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Node/FS.py +3142 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Node/FS.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Node/Python.py +128 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Node/Python.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Node/__init__.py +1328 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Node/__init__.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/BoolOption.py +50 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/BoolOption.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/EnumOption.py +50 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/EnumOption.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/ListOption.py +50 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/ListOption.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/PackageOption.py +50 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/PackageOption.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/PathOption.py +76 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/PathOption.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/__init__.py +67 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/__init__.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/PathList.py +231 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/PathList.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/__init__.py +241 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/__init__.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/aix.py +69 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/cygwin.py +55 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/darwin.py +46 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/hpux.py +46 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/irix.py +44 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/os2.py +58 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/posix.py +263 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/posix.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/sunos.py +50 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/win32.py +385 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConf.py +1030 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConf.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.py +383 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/C.py +132 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/C.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/D.py +73 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/D.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/Dir.py +109 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/Dir.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/Fortran.py +316 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/Fortran.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/IDL.py +48 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/LaTeX.py +362 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/LaTeX.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/Prog.py +101 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/Prog.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/RC.py +55 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/__init__.py +413 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/__init__.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/Interactive.py +384 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/Interactive.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/Main.py +1334 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/Main.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/SConsOptions.py +939 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/SConsOptions.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/SConscript.py +640 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/SConscript.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/__init__.py +412 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/__init__.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Sig.py +63 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Subst.py +904 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Subst.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Taskmaster.py +1017 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Taskmaster.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/386asm.py +61 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/BitKeeper.py +67 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/BitKeeper.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/CVS.py +73 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/CVS.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/FortranCommon.py +246 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/FortranCommon.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/JavaCommon.py +323 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/JavaCommon.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/__init__.py +56 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/arch.py +61 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/common.py +240 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/netframework.py +82 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/sdk.py +391 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/vc.py +456 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/vs.py +499 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/Perforce.py +103 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/Perforce.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/PharLapCommon.py +137 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/PharLapCommon.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/RCS.py +64 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/RCS.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/SCCS.py +64 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/SCCS.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/Subversion.py +71 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/__init__.py +681 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/__init__.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/aixc++.py +82 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/aixcc.py +74 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/aixf77.py +80 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/aixlink.py +76 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/applelink.py +71 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/ar.py +63 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/ar.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/as.py +78 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/as.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/bcc32.py +81 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/c++.py +99 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/c++.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/cc.py +102 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/cc.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/cvf.py +58 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/default.py +50 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/default.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dmd.py +223 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dmd.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dvi.py +64 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dvipdf.py +124 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dvipdf.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dvips.py +94 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dvips.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/f77.py +62 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/f77.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/f90.py +62 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/f90.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/f95.py +63 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/f95.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/filesystem.py +98 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/filesystem.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/fortran.py +62 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/fortran.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/g++.py +90 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/g++.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/g77.py +73 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/g77.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gas.py +53 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gas.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gcc.py +80 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gcc.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gfortran.py +64 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gfortran.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gnulink.py +63 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gnulink.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gs.py +81 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gs.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/hpc++.py +84 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/hpcc.py +53 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/hplink.py +77 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/icc.py +59 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/icl.py +52 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/ifl.py +72 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/ifl.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/ifort.py +88 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/ifort.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/ilink.py +59 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/ilink32.py +60 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/install.py +229 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/install.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/intelc.py +482 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/ipkg.py +67 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/jar.py +110 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/jar.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/javac.py +230 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/javac.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/javah.py +137 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/javah.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/latex.py +79 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/latex.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/lex.py +97 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/lex.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/link.py +121 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/link.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/linkloc.py +112 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/m4.py +63 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/m4.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/masm.py +77 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/midl.py +88 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/mingw.py +158 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/mslib.py +64 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/mslink.py +266 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/mssdk.py +50 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/msvc.py +268 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/msvs.py +1388 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/mwcc.py +207 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/mwld.py +107 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/nasm.py +72 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/__init__.py +312 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/ipk.py +185 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/msi.py +527 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/rpm.py +365 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/src_tarbz2.py +43 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/src_targz.py +43 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/src_zip.py +43 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/tarbz2.py +44 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/targz.py +44 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/zip.py +44 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/pdf.py +78 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/pdf.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/pdflatex.py +83 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/pdflatex.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/pdftex.py +108 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/pdftex.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/qt.py +336 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/rmic.py +120 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/rmic.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/rpcgen.py +70 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/rpcgen.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/rpm.py +132 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/rpm.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sgiar.py +68 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sgic++.py +58 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sgicc.py +53 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sgilink.py +63 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sunar.py +67 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sunc++.py +142 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/suncc.py +58 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sunf77.py +63 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sunf90.py +64 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sunf95.py +64 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sunlink.py +77 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/swig.py +182 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/swig.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/tar.py +73 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/tar.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/tex.py +807 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/tex.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/textfile.py +175 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/tlib.py +53 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/wix.py +99 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/wix.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/yacc.py +130 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/yacc.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/zip.py +99 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/zip.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Util.py +1496 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Util.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/BoolVariable.py +89 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/BoolVariable.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/EnumVariable.py +103 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/EnumVariable.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/ListVariable.py +135 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/ListVariable.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/PackageVariable.py +106 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/PackageVariable.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/PathVariable.py +147 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/PathVariable.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/__init__.py +312 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/__init__.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Warnings.py +246 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Warnings.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/__init__.py +49 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/__init__.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/__init__.py +237 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/__init__.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/_scons_builtins.py +150 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/_scons_builtins.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/_scons_collections.py +45 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/_scons_dbm.py +45 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/_scons_hashlib.py +76 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/_scons_io.py +45 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/_scons_sets.py +563 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/_scons_subprocess.py +1281 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/cpp.py +589 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/cpp.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/dblite.py +251 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/dblite.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/exitfuncs.py +77 -0
- data/ext/qrscanner/zxing/scons/scons-time.py +1544 -0
- data/ext/qrscanner/zxing/scons/scons.py +196 -0
- data/ext/qrscanner/zxing/scons/sconsign.py +513 -0
- data/qrscanner.gemspec +33 -0
- metadata +1023 -0
@@ -0,0 +1,50 @@
|
|
1
|
+
#ifndef __DATA_BLOCK_H__
|
2
|
+
#define __DATA_BLOCK_H__
|
3
|
+
|
4
|
+
/*
|
5
|
+
* DataBlock.h
|
6
|
+
* zxing
|
7
|
+
*
|
8
|
+
* Copyright 2010 ZXing authors All rights reserved.
|
9
|
+
*
|
10
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
* you may not use this file except in compliance with the License.
|
12
|
+
* You may obtain a copy of the License at
|
13
|
+
*
|
14
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
*
|
16
|
+
* Unless required by applicable law or agreed to in writing, software
|
17
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
* See the License for the specific language governing permissions and
|
20
|
+
* limitations under the License.
|
21
|
+
*/
|
22
|
+
|
23
|
+
#include <vector>
|
24
|
+
#include <zxing/common/Counted.h>
|
25
|
+
#include <zxing/common/Array.h>
|
26
|
+
#include <zxing/qrcode/Version.h>
|
27
|
+
#include <zxing/qrcode/ErrorCorrectionLevel.h>
|
28
|
+
|
29
|
+
namespace zxing {
|
30
|
+
namespace qrcode {
|
31
|
+
|
32
|
+
class DataBlock : public Counted {
|
33
|
+
private:
|
34
|
+
int numDataCodewords_;
|
35
|
+
ArrayRef<unsigned char> codewords_;
|
36
|
+
|
37
|
+
DataBlock(int numDataCodewords, ArrayRef<unsigned char> codewords);
|
38
|
+
|
39
|
+
public:
|
40
|
+
static std::vector<Ref<DataBlock> >
|
41
|
+
getDataBlocks(ArrayRef<unsigned char> rawCodewords, Version *version, ErrorCorrectionLevel &ecLevel);
|
42
|
+
|
43
|
+
int getNumDataCodewords();
|
44
|
+
ArrayRef<unsigned char> getCodewords();
|
45
|
+
};
|
46
|
+
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
#endif // __DATA_BLOCK_H__
|
@@ -0,0 +1,159 @@
|
|
1
|
+
/*
|
2
|
+
* DataMask.cpp
|
3
|
+
* zxing
|
4
|
+
*
|
5
|
+
* Created by Christian Brunschen on 19/05/2008.
|
6
|
+
* Copyright 2008 ZXing authors All rights reserved.
|
7
|
+
*
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
* you may not use this file except in compliance with the License.
|
10
|
+
* You may obtain a copy of the License at
|
11
|
+
*
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
*
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
* See the License for the specific language governing permissions and
|
18
|
+
* limitations under the License.
|
19
|
+
*/
|
20
|
+
|
21
|
+
#include <zxing/qrcode/decoder/DataMask.h>
|
22
|
+
|
23
|
+
#include <zxing/common/IllegalArgumentException.h>
|
24
|
+
|
25
|
+
namespace zxing {
|
26
|
+
namespace qrcode {
|
27
|
+
|
28
|
+
using namespace std;
|
29
|
+
|
30
|
+
DataMask::DataMask() {
|
31
|
+
}
|
32
|
+
|
33
|
+
DataMask::~DataMask() {
|
34
|
+
}
|
35
|
+
|
36
|
+
vector<Ref<DataMask> > DataMask::DATA_MASKS;
|
37
|
+
static int N_DATA_MASKS = DataMask::buildDataMasks();
|
38
|
+
|
39
|
+
DataMask &DataMask::forReference(int reference) {
|
40
|
+
if (reference < 0 || reference > 7) {
|
41
|
+
throw IllegalArgumentException("reference must be between 0 and 7");
|
42
|
+
}
|
43
|
+
return *DATA_MASKS[reference];
|
44
|
+
}
|
45
|
+
|
46
|
+
void DataMask::unmaskBitMatrix(BitMatrix& bits, size_t dimension) {
|
47
|
+
for (size_t y = 0; y < dimension; y++) {
|
48
|
+
for (size_t x = 0; x < dimension; x++) {
|
49
|
+
// TODO: check why the coordinates have to be swapped
|
50
|
+
if (isMasked(y, x)) {
|
51
|
+
bits.flip(x, y);
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
/**
|
58
|
+
* 000: mask bits for which (x + y) mod 2 == 0
|
59
|
+
*/
|
60
|
+
class DataMask000 : public DataMask {
|
61
|
+
public:
|
62
|
+
bool isMasked(size_t x, size_t y) {
|
63
|
+
// return ((x + y) & 0x01) == 0;
|
64
|
+
return ((x + y) % 2) == 0;
|
65
|
+
}
|
66
|
+
};
|
67
|
+
|
68
|
+
/**
|
69
|
+
* 001: mask bits for which x mod 2 == 0
|
70
|
+
*/
|
71
|
+
class DataMask001 : public DataMask {
|
72
|
+
public:
|
73
|
+
bool isMasked(size_t x, size_t y) {
|
74
|
+
// return (x & 0x01) == 0;
|
75
|
+
return (x % 2) == 0;
|
76
|
+
}
|
77
|
+
};
|
78
|
+
|
79
|
+
/**
|
80
|
+
* 010: mask bits for which y mod 3 == 0
|
81
|
+
*/
|
82
|
+
class DataMask010 : public DataMask {
|
83
|
+
public:
|
84
|
+
bool isMasked(size_t x, size_t y) {
|
85
|
+
return y % 3 == 0;
|
86
|
+
}
|
87
|
+
};
|
88
|
+
|
89
|
+
/**
|
90
|
+
* 011: mask bits for which (x + y) mod 3 == 0
|
91
|
+
*/
|
92
|
+
class DataMask011 : public DataMask {
|
93
|
+
public:
|
94
|
+
bool isMasked(size_t x, size_t y) {
|
95
|
+
return (x + y) % 3 == 0;
|
96
|
+
}
|
97
|
+
};
|
98
|
+
|
99
|
+
/**
|
100
|
+
* 100: mask bits for which (x/2 + y/3) mod 2 == 0
|
101
|
+
*/
|
102
|
+
class DataMask100 : public DataMask {
|
103
|
+
public:
|
104
|
+
bool isMasked(size_t x, size_t y) {
|
105
|
+
// return (((x >> 1) + (y / 3)) & 0x01) == 0;
|
106
|
+
return (((x >> 1) + (y / 3)) % 2) == 0;
|
107
|
+
}
|
108
|
+
};
|
109
|
+
|
110
|
+
/**
|
111
|
+
* 101: mask bits for which xy mod 2 + xy mod 3 == 0
|
112
|
+
*/
|
113
|
+
class DataMask101 : public DataMask {
|
114
|
+
public:
|
115
|
+
bool isMasked(size_t x, size_t y) {
|
116
|
+
size_t temp = x * y;
|
117
|
+
// return (temp & 0x01) + (temp % 3) == 0;
|
118
|
+
return (temp % 2) + (temp % 3) == 0;
|
119
|
+
|
120
|
+
}
|
121
|
+
};
|
122
|
+
|
123
|
+
/**
|
124
|
+
* 110: mask bits for which (xy mod 2 + xy mod 3) mod 2 == 0
|
125
|
+
*/
|
126
|
+
class DataMask110 : public DataMask {
|
127
|
+
public:
|
128
|
+
bool isMasked(size_t x, size_t y) {
|
129
|
+
size_t temp = x * y;
|
130
|
+
// return (((temp & 0x01) + (temp % 3)) & 0x01) == 0;
|
131
|
+
return (((temp % 2) + (temp % 3)) % 2) == 0;
|
132
|
+
}
|
133
|
+
};
|
134
|
+
|
135
|
+
/**
|
136
|
+
* 111: mask bits for which ((x+y)mod 2 + xy mod 3) mod 2 == 0
|
137
|
+
*/
|
138
|
+
class DataMask111 : public DataMask {
|
139
|
+
public:
|
140
|
+
bool isMasked(size_t x, size_t y) {
|
141
|
+
// return ((((x + y) & 0x01) + ((x * y) % 3)) & 0x01) == 0;
|
142
|
+
return ((((x + y) % 2) + ((x * y) % 3)) % 2) == 0;
|
143
|
+
}
|
144
|
+
};
|
145
|
+
|
146
|
+
int DataMask::buildDataMasks() {
|
147
|
+
DATA_MASKS.push_back(Ref<DataMask> (new DataMask000()));
|
148
|
+
DATA_MASKS.push_back(Ref<DataMask> (new DataMask001()));
|
149
|
+
DATA_MASKS.push_back(Ref<DataMask> (new DataMask010()));
|
150
|
+
DATA_MASKS.push_back(Ref<DataMask> (new DataMask011()));
|
151
|
+
DATA_MASKS.push_back(Ref<DataMask> (new DataMask100()));
|
152
|
+
DATA_MASKS.push_back(Ref<DataMask> (new DataMask101()));
|
153
|
+
DATA_MASKS.push_back(Ref<DataMask> (new DataMask110()));
|
154
|
+
DATA_MASKS.push_back(Ref<DataMask> (new DataMask111()));
|
155
|
+
return DATA_MASKS.size();
|
156
|
+
}
|
157
|
+
|
158
|
+
}
|
159
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#ifndef __DATA_MASK_H__
|
2
|
+
#define __DATA_MASK_H__
|
3
|
+
|
4
|
+
/*
|
5
|
+
* DataMask.h
|
6
|
+
* zxing
|
7
|
+
*
|
8
|
+
* Copyright 2010 ZXing authors All rights reserved.
|
9
|
+
*
|
10
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
* you may not use this file except in compliance with the License.
|
12
|
+
* You may obtain a copy of the License at
|
13
|
+
*
|
14
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
*
|
16
|
+
* Unless required by applicable law or agreed to in writing, software
|
17
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
* See the License for the specific language governing permissions and
|
20
|
+
* limitations under the License.
|
21
|
+
*/
|
22
|
+
|
23
|
+
#include <zxing/common/Array.h>
|
24
|
+
#include <zxing/common/Counted.h>
|
25
|
+
#include <zxing/common/BitMatrix.h>
|
26
|
+
|
27
|
+
#include <vector>
|
28
|
+
|
29
|
+
namespace zxing {
|
30
|
+
namespace qrcode {
|
31
|
+
|
32
|
+
class DataMask : public Counted {
|
33
|
+
private:
|
34
|
+
static std::vector<Ref<DataMask> > DATA_MASKS;
|
35
|
+
|
36
|
+
protected:
|
37
|
+
|
38
|
+
public:
|
39
|
+
static int buildDataMasks();
|
40
|
+
DataMask();
|
41
|
+
virtual ~DataMask();
|
42
|
+
void unmaskBitMatrix(BitMatrix& matrix, size_t dimension);
|
43
|
+
virtual bool isMasked(size_t x, size_t y) = 0;
|
44
|
+
static DataMask& forReference(int reference);
|
45
|
+
};
|
46
|
+
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
#endif // __DATA_MASK_H__
|
@@ -0,0 +1,353 @@
|
|
1
|
+
/*
|
2
|
+
* DecodedBitStreamParser.cpp
|
3
|
+
* zxing
|
4
|
+
*
|
5
|
+
* Created by Christian Brunschen on 20/05/2008.
|
6
|
+
* Copyright 2008 ZXing authors All rights reserved.
|
7
|
+
*
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
* you may not use this file except in compliance with the License.
|
10
|
+
* You may obtain a copy of the License at
|
11
|
+
*
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
*
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
* See the License for the specific language governing permissions and
|
18
|
+
* limitations under the License.
|
19
|
+
*/
|
20
|
+
|
21
|
+
#include <zxing/qrcode/decoder/DecodedBitStreamParser.h>
|
22
|
+
#include <iostream>
|
23
|
+
#ifndef NO_ICONV
|
24
|
+
#include <iconv.h>
|
25
|
+
#endif
|
26
|
+
|
27
|
+
// Required for compatibility. TODO: test on Symbian
|
28
|
+
#ifdef ZXING_ICONV_CONST
|
29
|
+
#undef ICONV_CONST
|
30
|
+
#define ICONV_CONST const
|
31
|
+
#endif
|
32
|
+
|
33
|
+
#ifndef ICONV_CONST
|
34
|
+
#define ICONV_CONST /**/
|
35
|
+
#endif
|
36
|
+
|
37
|
+
using namespace zxing;
|
38
|
+
|
39
|
+
namespace zxing {
|
40
|
+
namespace qrcode {
|
41
|
+
|
42
|
+
using namespace std;
|
43
|
+
|
44
|
+
const char DecodedBitStreamParser::ALPHANUMERIC_CHARS[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B',
|
45
|
+
'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
|
46
|
+
'Y', 'Z', ' ', '$', '%', '*', '+', '-', '.', '/', ':'
|
47
|
+
};
|
48
|
+
|
49
|
+
const char *DecodedBitStreamParser::ASCII = "ASCII";
|
50
|
+
const char *DecodedBitStreamParser::ISO88591 = "ISO-8859-1";
|
51
|
+
const char *DecodedBitStreamParser::UTF8 = "UTF-8";
|
52
|
+
const char *DecodedBitStreamParser::SHIFT_JIS = "SHIFT_JIS";
|
53
|
+
const char *DecodedBitStreamParser::EUC_JP = "EUC-JP";
|
54
|
+
|
55
|
+
void DecodedBitStreamParser::append(std::string &result, const unsigned char *bufIn, size_t nIn, const char *src) {
|
56
|
+
#ifndef NO_ICONV
|
57
|
+
if (nIn == 0) {
|
58
|
+
return;
|
59
|
+
}
|
60
|
+
|
61
|
+
iconv_t cd = iconv_open(UTF8, src);
|
62
|
+
const int maxOut = 4 * nIn + 1;
|
63
|
+
unsigned char* bufOut = new unsigned char[maxOut];
|
64
|
+
|
65
|
+
ICONV_CONST char *fromPtr = (ICONV_CONST char *)bufIn;
|
66
|
+
size_t nFrom = nIn;
|
67
|
+
char *toPtr = (char *)bufOut;
|
68
|
+
size_t nTo = maxOut;
|
69
|
+
|
70
|
+
while (nFrom > 0) {
|
71
|
+
size_t oneway = iconv(cd, &fromPtr, &nFrom, &toPtr, &nTo);
|
72
|
+
if (oneway == (size_t)(-1)) {
|
73
|
+
iconv_close(cd);
|
74
|
+
delete[] bufOut;
|
75
|
+
throw ReaderException("error converting characters");
|
76
|
+
}
|
77
|
+
}
|
78
|
+
iconv_close(cd);
|
79
|
+
|
80
|
+
int nResult = maxOut - nTo;
|
81
|
+
bufOut[nResult] = '\0';
|
82
|
+
result.append((const char *)bufOut);
|
83
|
+
delete[] bufOut;
|
84
|
+
#else
|
85
|
+
result.append((const char *)bufIn, nIn);
|
86
|
+
#endif
|
87
|
+
}
|
88
|
+
|
89
|
+
void DecodedBitStreamParser::decodeKanjiSegment(Ref<BitSource> bits, std::string &result, int count) {
|
90
|
+
// Each character will require 2 bytes. Read the characters as 2-byte pairs
|
91
|
+
// and decode as Shift_JIS afterwards
|
92
|
+
size_t nBytes = 2 * count;
|
93
|
+
unsigned char* buffer = new unsigned char[nBytes];
|
94
|
+
int offset = 0;
|
95
|
+
while (count > 0) {
|
96
|
+
// Each 13 bits encodes a 2-byte character
|
97
|
+
|
98
|
+
int twoBytes = bits->readBits(13);
|
99
|
+
int assembledTwoBytes = ((twoBytes / 0x0C0) << 8) | (twoBytes % 0x0C0);
|
100
|
+
if (assembledTwoBytes < 0x01F00) {
|
101
|
+
// In the 0x8140 to 0x9FFC range
|
102
|
+
assembledTwoBytes += 0x08140;
|
103
|
+
} else {
|
104
|
+
// In the 0xE040 to 0xEBBF range
|
105
|
+
assembledTwoBytes += 0x0C140;
|
106
|
+
}
|
107
|
+
buffer[offset] = (unsigned char)(assembledTwoBytes >> 8);
|
108
|
+
buffer[offset + 1] = (unsigned char)assembledTwoBytes;
|
109
|
+
offset += 2;
|
110
|
+
count--;
|
111
|
+
}
|
112
|
+
|
113
|
+
append(result, buffer, nBytes, SHIFT_JIS);
|
114
|
+
delete[] buffer;
|
115
|
+
}
|
116
|
+
|
117
|
+
void DecodedBitStreamParser::decodeByteSegment(Ref<BitSource> bits, std::string &result, int count) {
|
118
|
+
int nBytes = count;
|
119
|
+
unsigned char* readBytes = new unsigned char[nBytes];
|
120
|
+
if (count << 3 > bits->available()) {
|
121
|
+
ostringstream s;
|
122
|
+
s << "Count too large: " << count;
|
123
|
+
delete[] readBytes;
|
124
|
+
throw ReaderException(s.str().c_str());
|
125
|
+
}
|
126
|
+
for (int i = 0; i < count; i++) {
|
127
|
+
readBytes[i] = (unsigned char)bits->readBits(8);
|
128
|
+
}
|
129
|
+
// The spec isn't clear on this mode; see
|
130
|
+
// section 6.4.5: t does not say which encoding to assuming
|
131
|
+
// upon decoding. I have seen ISO-8859-1 used as well as
|
132
|
+
// Shift_JIS -- without anything like an ECI designator to
|
133
|
+
// give a hint.
|
134
|
+
const char *encoding = guessEncoding(readBytes, nBytes);
|
135
|
+
append(result, readBytes, nBytes, encoding);
|
136
|
+
delete[] readBytes;
|
137
|
+
}
|
138
|
+
|
139
|
+
void DecodedBitStreamParser::decodeNumericSegment(Ref<BitSource> bits, std::string &result, int count) {
|
140
|
+
int nBytes = count;
|
141
|
+
unsigned char* bytes = new unsigned char[nBytes];
|
142
|
+
int i = 0;
|
143
|
+
// Read three digits at a time
|
144
|
+
while (count >= 3) {
|
145
|
+
// Each 10 bits encodes three digits
|
146
|
+
int threeDigitsBits = bits->readBits(10);
|
147
|
+
if (threeDigitsBits >= 1000) {
|
148
|
+
ostringstream s;
|
149
|
+
s << "Illegal value for 3-digit unit: " << threeDigitsBits;
|
150
|
+
delete[] bytes;
|
151
|
+
throw ReaderException(s.str().c_str());
|
152
|
+
}
|
153
|
+
bytes[i++] = ALPHANUMERIC_CHARS[threeDigitsBits / 100];
|
154
|
+
bytes[i++] = ALPHANUMERIC_CHARS[(threeDigitsBits / 10) % 10];
|
155
|
+
bytes[i++] = ALPHANUMERIC_CHARS[threeDigitsBits % 10];
|
156
|
+
count -= 3;
|
157
|
+
}
|
158
|
+
if (count == 2) {
|
159
|
+
// Two digits left over to read, encoded in 7 bits
|
160
|
+
int twoDigitsBits = bits->readBits(7);
|
161
|
+
if (twoDigitsBits >= 100) {
|
162
|
+
ostringstream s;
|
163
|
+
s << "Illegal value for 2-digit unit: " << twoDigitsBits;
|
164
|
+
delete[] bytes;
|
165
|
+
throw ReaderException(s.str().c_str());
|
166
|
+
}
|
167
|
+
bytes[i++] = ALPHANUMERIC_CHARS[twoDigitsBits / 10];
|
168
|
+
bytes[i++] = ALPHANUMERIC_CHARS[twoDigitsBits % 10];
|
169
|
+
} else if (count == 1) {
|
170
|
+
// One digit left over to read
|
171
|
+
int digitBits = bits->readBits(4);
|
172
|
+
if (digitBits >= 10) {
|
173
|
+
ostringstream s;
|
174
|
+
s << "Illegal value for digit unit: " << digitBits;
|
175
|
+
delete[] bytes;
|
176
|
+
throw ReaderException(s.str().c_str());
|
177
|
+
}
|
178
|
+
bytes[i++] = ALPHANUMERIC_CHARS[digitBits];
|
179
|
+
}
|
180
|
+
append(result, bytes, nBytes, ASCII);
|
181
|
+
delete[] bytes;
|
182
|
+
}
|
183
|
+
|
184
|
+
void DecodedBitStreamParser::decodeAlphanumericSegment(Ref<BitSource> bits, std::string &result, int count) {
|
185
|
+
int nBytes = count;
|
186
|
+
unsigned char* bytes = new unsigned char[nBytes];
|
187
|
+
int i = 0;
|
188
|
+
// Read two characters at a time
|
189
|
+
while (count > 1) {
|
190
|
+
int nextTwoCharsBits = bits->readBits(11);
|
191
|
+
bytes[i++] = ALPHANUMERIC_CHARS[nextTwoCharsBits / 45];
|
192
|
+
bytes[i++] = ALPHANUMERIC_CHARS[nextTwoCharsBits % 45];
|
193
|
+
count -= 2;
|
194
|
+
}
|
195
|
+
if (count == 1) {
|
196
|
+
bytes[i++] = ALPHANUMERIC_CHARS[bits->readBits(6)];
|
197
|
+
}
|
198
|
+
append(result, bytes, nBytes, ASCII);
|
199
|
+
delete[] bytes;
|
200
|
+
}
|
201
|
+
|
202
|
+
const char *
|
203
|
+
DecodedBitStreamParser::guessEncoding(unsigned char *bytes, int length) {
|
204
|
+
const bool ASSUME_SHIFT_JIS = false;
|
205
|
+
char const* const PLATFORM_DEFAULT_ENCODING="UTF-8";
|
206
|
+
|
207
|
+
// Does it start with the UTF-8 byte order mark? then guess it's UTF-8
|
208
|
+
if (length > 3 && bytes[0] == (unsigned char)0xEF && bytes[1] == (unsigned char)0xBB && bytes[2]
|
209
|
+
== (unsigned char)0xBF) {
|
210
|
+
return UTF8;
|
211
|
+
}
|
212
|
+
// For now, merely tries to distinguish ISO-8859-1, UTF-8 and Shift_JIS,
|
213
|
+
// which should be by far the most common encodings. ISO-8859-1
|
214
|
+
// should not have bytes in the 0x80 - 0x9F range, while Shift_JIS
|
215
|
+
// uses this as a first byte of a two-byte character. If we see this
|
216
|
+
// followed by a valid second byte in Shift_JIS, assume it is Shift_JIS.
|
217
|
+
// If we see something else in that second byte, we'll make the risky guess
|
218
|
+
// that it's UTF-8.
|
219
|
+
bool canBeISO88591 = true;
|
220
|
+
bool canBeShiftJIS = true;
|
221
|
+
bool canBeUTF8 = true;
|
222
|
+
int utf8BytesLeft = 0;
|
223
|
+
int maybeDoubleByteCount = 0;
|
224
|
+
int maybeSingleByteKatakanaCount = 0;
|
225
|
+
bool sawLatin1Supplement = false;
|
226
|
+
bool sawUTF8Start = false;
|
227
|
+
bool lastWasPossibleDoubleByteStart = false;
|
228
|
+
for (int i = 0;
|
229
|
+
i < length && (canBeISO88591 || canBeShiftJIS || canBeUTF8);
|
230
|
+
i++) {
|
231
|
+
int value = bytes[i] & 0xFF;
|
232
|
+
|
233
|
+
// UTF-8 stuff
|
234
|
+
if (value >= 0x80 && value <= 0xBF) {
|
235
|
+
if (utf8BytesLeft > 0) {
|
236
|
+
utf8BytesLeft--;
|
237
|
+
}
|
238
|
+
} else {
|
239
|
+
if (utf8BytesLeft > 0) {
|
240
|
+
canBeUTF8 = false;
|
241
|
+
}
|
242
|
+
if (value >= 0xC0 && value <= 0xFD) {
|
243
|
+
sawUTF8Start = true;
|
244
|
+
int valueCopy = value;
|
245
|
+
while ((valueCopy & 0x40) != 0) {
|
246
|
+
utf8BytesLeft++;
|
247
|
+
valueCopy <<= 1;
|
248
|
+
}
|
249
|
+
}
|
250
|
+
}
|
251
|
+
|
252
|
+
// Shift_JIS stuff
|
253
|
+
|
254
|
+
if (value >= 0xA1 && value <= 0xDF) {
|
255
|
+
// count the number of characters that might be a Shift_JIS single-byte Katakana character
|
256
|
+
if (!lastWasPossibleDoubleByteStart) {
|
257
|
+
maybeSingleByteKatakanaCount++;
|
258
|
+
}
|
259
|
+
}
|
260
|
+
if (!lastWasPossibleDoubleByteStart &&
|
261
|
+
((value >= 0xF0 && value <= 0xFF) || value == 0x80 || value == 0xA0)) {
|
262
|
+
canBeShiftJIS = false;
|
263
|
+
}
|
264
|
+
if (((value >= 0x81 && value <= 0x9F) || (value >= 0xE0 && value <= 0xEF))) {
|
265
|
+
// These start double-byte characters in Shift_JIS. Let's see if it's followed by a valid
|
266
|
+
// second byte.
|
267
|
+
if (lastWasPossibleDoubleByteStart) {
|
268
|
+
// If we just checked this and the last byte for being a valid double-byte
|
269
|
+
// char, don't check starting on this byte. If this and the last byte
|
270
|
+
// formed a valid pair, then this shouldn't be checked to see if it starts
|
271
|
+
// a double byte pair of course.
|
272
|
+
lastWasPossibleDoubleByteStart = false;
|
273
|
+
} else {
|
274
|
+
// ... otherwise do check to see if this plus the next byte form a valid
|
275
|
+
// double byte pair encoding a character.
|
276
|
+
lastWasPossibleDoubleByteStart = true;
|
277
|
+
if (i >= length - 1) {
|
278
|
+
canBeShiftJIS = false;
|
279
|
+
} else {
|
280
|
+
int nextValue = bytes[i + 1] & 0xFF;
|
281
|
+
if (nextValue < 0x40 || nextValue > 0xFC) {
|
282
|
+
canBeShiftJIS = false;
|
283
|
+
} else {
|
284
|
+
maybeDoubleByteCount++;
|
285
|
+
}
|
286
|
+
// There is some conflicting information out there about which bytes can follow which in
|
287
|
+
// double-byte Shift_JIS characters. The rule above seems to be the one that matches practice.
|
288
|
+
}
|
289
|
+
}
|
290
|
+
} else {
|
291
|
+
lastWasPossibleDoubleByteStart = false;
|
292
|
+
}
|
293
|
+
}
|
294
|
+
if (utf8BytesLeft > 0) {
|
295
|
+
canBeUTF8 = false;
|
296
|
+
}
|
297
|
+
|
298
|
+
// Easy -- if assuming Shift_JIS and no evidence it can't be, done
|
299
|
+
if (canBeShiftJIS && ASSUME_SHIFT_JIS) {
|
300
|
+
return SHIFT_JIS;
|
301
|
+
}
|
302
|
+
if (canBeUTF8 && sawUTF8Start) {
|
303
|
+
return UTF8;
|
304
|
+
}
|
305
|
+
// Distinguishing Shift_JIS and ISO-8859-1 can be a little tough. The crude heuristic is:
|
306
|
+
// - If we saw
|
307
|
+
// - at least 3 bytes that starts a double-byte value (bytes that are rare in ISO-8859-1), or
|
308
|
+
// - over 5% of bytes could be single-byte Katakana (also rare in ISO-8859-1),
|
309
|
+
// - and, saw no sequences that are invalid in Shift_JIS, then we conclude Shift_JIS
|
310
|
+
if (canBeShiftJIS && (maybeDoubleByteCount >= 3 || 20 * maybeSingleByteKatakanaCount > length)) {
|
311
|
+
return SHIFT_JIS;
|
312
|
+
}
|
313
|
+
// Otherwise, we default to ISO-8859-1 unless we know it can't be
|
314
|
+
if (!sawLatin1Supplement && canBeISO88591) {
|
315
|
+
return ISO88591;
|
316
|
+
}
|
317
|
+
// Otherwise, we take a wild guess with platform encoding
|
318
|
+
return PLATFORM_DEFAULT_ENCODING;
|
319
|
+
}
|
320
|
+
|
321
|
+
string DecodedBitStreamParser::decode(ArrayRef<unsigned char> bytes, Version *version) {
|
322
|
+
string result;
|
323
|
+
Ref<BitSource> bits(new BitSource(bytes));
|
324
|
+
Mode *mode = &Mode::TERMINATOR;
|
325
|
+
do {
|
326
|
+
// While still another segment to read...
|
327
|
+
if (bits->available() < 4) {
|
328
|
+
// OK, assume we're done. Really, a TERMINATOR mode should have been recorded here
|
329
|
+
mode = &Mode::TERMINATOR;
|
330
|
+
} else {
|
331
|
+
mode = &Mode::forBits(bits->readBits(4)); // mode is encoded by 4 bits
|
332
|
+
}
|
333
|
+
if (mode != &Mode::TERMINATOR) {
|
334
|
+
// How many characters will follow, encoded in this mode?
|
335
|
+
int count = bits->readBits(mode->getCharacterCountBits(version));
|
336
|
+
if (mode == &Mode::NUMERIC) {
|
337
|
+
decodeNumericSegment(bits, result, count);
|
338
|
+
} else if (mode == &Mode::ALPHANUMERIC) {
|
339
|
+
decodeAlphanumericSegment(bits, result, count);
|
340
|
+
} else if (mode == &Mode::BYTE) {
|
341
|
+
decodeByteSegment(bits, result, count);
|
342
|
+
} else if (mode == &Mode::KANJI) {
|
343
|
+
decodeKanjiSegment(bits, result, count);
|
344
|
+
} else {
|
345
|
+
throw ReaderException("Unsupported mode indicator");
|
346
|
+
}
|
347
|
+
}
|
348
|
+
} while (mode != &Mode::TERMINATOR);
|
349
|
+
return result;
|
350
|
+
}
|
351
|
+
|
352
|
+
}
|
353
|
+
}
|