diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..2f20d0c4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +moc/ +obj/ +rcc/ +tmp/ +ui/ +.make.cache +*.BAT +*.inf +Makefile +*.mk +*.loc +*.user +*.mmp +*.pkg \ No newline at end of file diff --git a/binary/Harmattan-Maemo5/libQZXing.so b/binary/Harmattan-Maemo5/libQZXing.so new file mode 100644 index 00000000..8f77956b Binary files /dev/null and b/binary/Harmattan-Maemo5/libQZXing.so differ diff --git a/binary/Harmattan-Maemo5/libQZXing.so.1 b/binary/Harmattan-Maemo5/libQZXing.so.1 new file mode 100644 index 00000000..8f77956b Binary files /dev/null and b/binary/Harmattan-Maemo5/libQZXing.so.1 differ diff --git a/binary/Harmattan-Maemo5/libQZXing.so.1.0 b/binary/Harmattan-Maemo5/libQZXing.so.1.0 new file mode 100644 index 00000000..8f77956b Binary files /dev/null and b/binary/Harmattan-Maemo5/libQZXing.so.1.0 differ diff --git a/binary/Harmattan-Maemo5/libQZXing.so.1.0.0 b/binary/Harmattan-Maemo5/libQZXing.so.1.0.0 new file mode 100644 index 00000000..8f77956b Binary files /dev/null and b/binary/Harmattan-Maemo5/libQZXing.so.1.0.0 differ diff --git a/source/.gitignore b/source/.gitignore new file mode 100644 index 00000000..2f20d0c4 --- /dev/null +++ b/source/.gitignore @@ -0,0 +1,14 @@ +moc/ +obj/ +rcc/ +tmp/ +ui/ +.make.cache +*.BAT +*.inf +Makefile +*.mk +*.loc +*.user +*.mmp +*.pkg \ No newline at end of file diff --git a/source/QZXing.pro b/source/QZXing.pro index 074a21ff..47951369 100644 --- a/source/QZXing.pro +++ b/source/QZXing.pro @@ -180,10 +180,28 @@ unix:!symbian { } else { target.path = /usr/lib } - INSTALLS += target + DEFINES += NOFMAXL + INSTALLS += target } win32{ DEFINES += NO_ICONV } + +OTHER_FILES += \ + qtc_packaging/debian_harmattan/rules \ + qtc_packaging/debian_harmattan/README \ + qtc_packaging/debian_harmattan/manifest.aegis \ + qtc_packaging/debian_harmattan/copyright \ + qtc_packaging/debian_harmattan/control \ + qtc_packaging/debian_harmattan/compat \ + qtc_packaging/debian_harmattan/changelog \ + qtc_packaging/debian_fremantle/rules \ + qtc_packaging/debian_fremantle/README \ + qtc_packaging/debian_fremantle/copyright \ + qtc_packaging/debian_fremantle/control \ + qtc_packaging/debian_fremantle/compat \ + qtc_packaging/debian_fremantle/changelog + + diff --git a/source/qtc_packaging/debian_fremantle/README b/source/qtc_packaging/debian_fremantle/README new file mode 100644 index 00000000..03880e59 --- /dev/null +++ b/source/qtc_packaging/debian_fremantle/README @@ -0,0 +1,6 @@ +The Debian Package qzxing +---------------------------- + +Comments regarding the Package + + -- unknown <> Wed, 16 Nov 2011 18:02:57 +0200 diff --git a/source/qtc_packaging/debian_fremantle/changelog b/source/qtc_packaging/debian_fremantle/changelog new file mode 100644 index 00000000..c604a40c --- /dev/null +++ b/source/qtc_packaging/debian_fremantle/changelog @@ -0,0 +1,5 @@ +qzxing (0.0.1) unstable; urgency=low + + * Initial Release. + + -- unknown <> Wed, 16 Nov 2011 18:02:57 +0200 diff --git a/source/qtc_packaging/debian_fremantle/compat b/source/qtc_packaging/debian_fremantle/compat new file mode 100644 index 00000000..7f8f011e --- /dev/null +++ b/source/qtc_packaging/debian_fremantle/compat @@ -0,0 +1 @@ +7 diff --git a/source/qtc_packaging/debian_fremantle/control b/source/qtc_packaging/debian_fremantle/control new file mode 100644 index 00000000..34586d78 --- /dev/null +++ b/source/qtc_packaging/debian_fremantle/control @@ -0,0 +1,15 @@ +Source: qzxing +Section: user/hidden +Priority: optional +Maintainer: unknown <> +Build-Depends: debhelper (>= 5), libqt4-dev +Standards-Version: 3.7.3 +Homepage: + +Package: qzxing +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: + +XB-Maemo-Display-Name: QZXing +XB-Maemo-Icon-26: diff --git a/source/qtc_packaging/debian_fremantle/copyright b/source/qtc_packaging/debian_fremantle/copyright new file mode 100644 index 00000000..e2c73466 --- /dev/null +++ b/source/qtc_packaging/debian_fremantle/copyright @@ -0,0 +1,40 @@ +This package was debianized by unknown <> on +Wed, 16 Nov 2011 18:02:57 +0200. + +It was downloaded from + +Upstream Author(s): + + + + +Copyright: + + + + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The Debian packaging is (C) 2011, unknown <> and +is licensed under the GPL, see above. + + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/source/qtc_packaging/debian_fremantle/rules b/source/qtc_packaging/debian_fremantle/rules new file mode 100644 index 00000000..daba84b9 --- /dev/null +++ b/source/qtc_packaging/debian_fremantle/rules @@ -0,0 +1,91 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + + + +configure: configure-stamp +configure-stamp: + dh_testdir + # qmake PREFIX=/usr# Uncomment this line for use without Qt Creator + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + # $(MAKE) # Uncomment this line for use without Qt Creator + #docbook-to-man debian/qzxing.sgml > qzxing.1 + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + $(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/qzxing. + $(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/qzxing install + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + # dh_shlibdeps # Uncomment this line for use without Qt Creator + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/source/qtc_packaging/debian_harmattan/README b/source/qtc_packaging/debian_harmattan/README new file mode 100644 index 00000000..01412370 --- /dev/null +++ b/source/qtc_packaging/debian_harmattan/README @@ -0,0 +1,6 @@ +The Debian Package qzxing +---------------------------- + +Comments regarding the Package + + -- unknown <> Wed, 16 Nov 2011 18:02:42 +0200 diff --git a/source/qtc_packaging/debian_harmattan/changelog b/source/qtc_packaging/debian_harmattan/changelog new file mode 100644 index 00000000..d8b7e263 --- /dev/null +++ b/source/qtc_packaging/debian_harmattan/changelog @@ -0,0 +1,5 @@ +qzxing (0.0.1) unstable; urgency=low + + * Initial Release. + + -- unknown <> Wed, 16 Nov 2011 18:02:42 +0200 diff --git a/source/qtc_packaging/debian_harmattan/compat b/source/qtc_packaging/debian_harmattan/compat new file mode 100644 index 00000000..7f8f011e --- /dev/null +++ b/source/qtc_packaging/debian_harmattan/compat @@ -0,0 +1 @@ +7 diff --git a/source/qtc_packaging/debian_harmattan/control b/source/qtc_packaging/debian_harmattan/control new file mode 100644 index 00000000..f64aa463 --- /dev/null +++ b/source/qtc_packaging/debian_harmattan/control @@ -0,0 +1,15 @@ +Source: qzxing +Section: user/other +Priority: optional +Maintainer: unknown <> +Build-Depends: debhelper (>= 5), libqt4-dev +Standards-Version: 3.7.3 +Homepage: + +Package: qzxing +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: + +XSBC-Maemo-Display-Name: QZXing +XB-Maemo-Icon-26: diff --git a/source/qtc_packaging/debian_harmattan/copyright b/source/qtc_packaging/debian_harmattan/copyright new file mode 100644 index 00000000..f185c78a --- /dev/null +++ b/source/qtc_packaging/debian_harmattan/copyright @@ -0,0 +1,40 @@ +This package was debianized by unknown <> on +Wed, 16 Nov 2011 18:02:42 +0200. + +It was downloaded from + +Upstream Author(s): + + + + +Copyright: + + + + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The Debian packaging is (C) 2011, unknown <> and +is licensed under the GPL, see above. + + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/source/qtc_packaging/debian_harmattan/manifest.aegis b/source/qtc_packaging/debian_harmattan/manifest.aegis new file mode 100644 index 00000000..e69de29b diff --git a/source/qtc_packaging/debian_harmattan/rules b/source/qtc_packaging/debian_harmattan/rules new file mode 100644 index 00000000..daba84b9 --- /dev/null +++ b/source/qtc_packaging/debian_harmattan/rules @@ -0,0 +1,91 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + + + +configure: configure-stamp +configure-stamp: + dh_testdir + # qmake PREFIX=/usr# Uncomment this line for use without Qt Creator + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + # $(MAKE) # Uncomment this line for use without Qt Creator + #docbook-to-man debian/qzxing.sgml > qzxing.1 + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + $(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/qzxing. + $(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/qzxing install + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + # dh_shlibdeps # Uncomment this line for use without Qt Creator + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/source/zxing/oned/Code128Reader.cpp b/source/zxing/oned/Code128Reader.cpp index fa3fc714..14cda9bd 100644 --- a/source/zxing/oned/Code128Reader.cpp +++ b/source/zxing/oned/Code128Reader.cpp @@ -178,8 +178,14 @@ namespace zxing { } if (bestMatch >= 0) { // Look for whitespace before start pattern, >= 50% of width of start pattern - if (row->isRange(fmaxl(0, patternStart - (i - patternStart) / 2), patternStart, - false)) { + long maxResult = 0; +#ifndef NOFMAXL + maxResult = fmaxl(0, patternStart - (i - patternStart) / 2); +#else + maxResult = fmax(0, patternStart - (i - patternStart) / 2); +#endif + if (row->isRange(maxResult, patternStart, + false)) { int* resultValue = new int[3]; resultValue[0] = patternStart; resultValue[1] = i; @@ -430,7 +436,13 @@ namespace zxing { while (nextStart < width && row->get(nextStart)) { nextStart++; } - if (!row->isRange(nextStart, fminl(width, nextStart + (nextStart - lastStart) / 2), false)) { + long minResult = 0; +#ifndef NOFMAXL + minResult = fminl(width, nextStart + (nextStart - lastStart)/ 2); +#else + minResult = fmin(width, nextStart + (nextStart - lastStart)/ 2); +#endif + if (!row->isRange(nextStart, minResult, false)) { throw ReaderException(""); } diff --git a/source/zxing/oned/Code39Reader.cpp b/source/zxing/oned/Code39Reader.cpp index 9a2a82a1..237848e4 100644 --- a/source/zxing/oned/Code39Reader.cpp +++ b/source/zxing/oned/Code39Reader.cpp @@ -209,8 +209,14 @@ namespace oned { if (toNarrowWidePattern(counters, countersLen) == ASTERISK_ENCODING) { // Look for whitespace before start pattern, >= 50% of width of // start pattern. - long double longPatternOffset = - fmaxl(0, patternStart - (i - patternStart) / 2); + long double longPatternOffset = 0; +#ifndef NOFMAXL + longPatternOffset = fmaxl(0, patternStart - (i - patternStart) / 2); +#else + longPatternOffset = fmax(0, patternStart - (i - patternStart) / 2); +#endif + + if (row->isRange(longPatternOffset, patternStart, false)) { int* resultValue = new int[2]; resultValue[0] = patternStart; diff --git a/source/zxing/qrcode/decoder/DecodedBitStreamParser.cpp b/source/zxing/qrcode/decoder/DecodedBitStreamParser.cpp index 2d482de6..8d0d9e5d 100644 --- a/source/zxing/qrcode/decoder/DecodedBitStreamParser.cpp +++ b/source/zxing/qrcode/decoder/DecodedBitStreamParser.cpp @@ -82,7 +82,7 @@ void DecodedBitStreamParser::append(std::string &result, size_t nTo = maxOut; while (nFrom > 0) { - size_t oneway = iconv(cd, &fromPtr, &nFrom, &toPtr, &nTo); + size_t oneway = iconv(cd, (char**)&fromPtr, &nFrom, &toPtr, &nTo); if (oneway == (size_t)(-1)) { iconv_close(cd); delete[] bufOut;