--- iec16022-0.2.4.orig/debian/changelog +++ iec16022-0.2.4/debian/changelog @@ -0,0 +1,55 @@ +iec16022 (0.2.4-1.2) unstable; urgency=medium + + * Non-maintainer upload. + * Cherry-pick from upstream: + - Fix EDIFACT encoding (0f2adb) + (Closes: #773719) + - Fix encoding of _. (45813a) + (Closes: #429210) + - Fix cases where data might be lost. (ebbb6e2) + (Closes: #835296) + + -- Jakob Haufe Sun, 19 Feb 2017 00:00:24 +0100 + +iec16022 (0.2.4-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Use dh-autoreconf in build to support new architectures (Closes: #727901) + + -- Chen Baozi Fri, 06 Jun 2014 16:19:50 +0800 + +iec16022 (0.2.4-1) unstable; urgency=low + + * New upstream release + * Update to policy 3.8.3 (no changes) + * Add library package + + -- Jan Lübbe Tue, 27 Oct 2009 13:15:59 +0100 + +iec16022 (0.2.3-2) unstable; urgency=low + + * Fix gitweb URL + * Update to policy 3.8.2 (no changes) + + -- Jan Lübbe Wed, 08 Jul 2009 00:21:40 +0200 + +iec16022 (0.2.3-1) unstable; urgency=low + + * New upstream release (closes: 497039) + * Switch to debhelper 7 + * Update debian/control and debian/copyright + + -- Jan Lübbe Wed, 18 Feb 2009 14:10:52 +0100 + +iec16022 (0.2-1) unstable; urgency=low + + * New upstream release + * Created watchfile + + -- Jan Luebbe Mon, 6 Feb 2006 23:17:11 +0100 + +iec16022 (0.1-1) unstable; urgency=low + + * Initial release. (Closes: #347267) + + -- Jan Luebbe Wed, 10 Jan 2006 11:45:06 +0100 --- iec16022-0.2.4.orig/debian/compat +++ iec16022-0.2.4/debian/compat @@ -0,0 +1 @@ +7 --- iec16022-0.2.4.orig/debian/control +++ iec16022-0.2.4/debian/control @@ -0,0 +1,47 @@ +Source: iec16022 +Section: graphics +Priority: optional +Maintainer: Jan Lübbe +Build-Depends: debhelper (>= 7), zlib1g-dev, libpopt-dev, dh-autoreconf +Standards-Version: 3.8.3 +Homepage: http://www.datenfreihafen.org/projects/iec16022.html +Vcs-Browser: http://git.debian.org/?p=users/jluebbe/iec16022.git +Vcs-Git: git://git.debian.org/git/users/jluebbe/iec16022.git + +Package: iec16022 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Generates 2d ISO/IEC 16022 barcodes (data matrix/semacode) + The program generates a 2d datamatrix/semacode barcode from a + parameter or from a file and produces output in various formats (png, + eps, ascii-art). + . + http://www.semapedia.org/ for example uses semacode tags to create + real-world "links" to wikipedia articles. + +Package: libiec16022-0 +Architecture: any +Section: libs +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Library to generate 2d ISO/IEC 16022 barcodes (data matrix/semacode) + The library generates a 2d datamatrix/semacode barcode from a + parameter or from a file and produces output in various formats (png, + eps, ascii-art). + . + http://www.semapedia.org/ for example uses semacode tags to create + real-world "links" to wikipedia articles. + +Package: libiec16022-dev +Architecture: any +Section: libdevel +Depends: libiec16022-0 (= ${binary:Version}), ${misc:Depends} +Description: Development files for the ISO/IEC 16022 barcodes library + The library generates a 2d datamatrix/semacode barcode from a + parameter or from a file and produces output in various formats (png, + eps, ascii-art). + . + http://www.semapedia.org/ for example uses semacode tags to create + real-world "links" to wikipedia articles. + . + Install this package if you want to develop programs using libiec16022. + --- iec16022-0.2.4.orig/debian/copyright +++ iec16022-0.2.4/debian/copyright @@ -0,0 +1,29 @@ +This package was debianized by Jan Luebbe on +Thu, 10 Jan 2006 10:11:14 +0100. + +It was downloaded from http://www.datenfreihafen.org/projects/iec16022.html + +Copyright Holders: + © 2004 Adrian Kennard, Andrews & Arnold Ltd + © 2006-2007 Stefan Schmidt + + The Reed-Solomon encoder is © Cliff Hones 2004 + +License: + +This program 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 program 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 program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian GNU/Linux systems, the text of the GPLv2 can be found in +/usr/share/common-licenses/GPL-2. --- iec16022-0.2.4.orig/debian/iec16022.docs +++ iec16022-0.2.4/debian/iec16022.docs @@ -0,0 +1,3 @@ +NEWS +README +TODO --- iec16022-0.2.4.orig/debian/iec16022.install +++ iec16022-0.2.4/debian/iec16022.install @@ -0,0 +1,2 @@ +/usr/bin/iec16022 +/usr/share/man/man1/iec16022.1 --- iec16022-0.2.4.orig/debian/libiec16022-0.install +++ iec16022-0.2.4/debian/libiec16022-0.install @@ -0,0 +1 @@ +/usr/lib/lib*.so.* --- iec16022-0.2.4.orig/debian/libiec16022-dev.install +++ iec16022-0.2.4/debian/libiec16022-dev.install @@ -0,0 +1,4 @@ +/usr/lib/pkgconfig/* +/usr/include/* +/usr/lib/lib*.a +/usr/lib/lib*.so --- iec16022-0.2.4.orig/debian/rules +++ iec16022-0.2.4/debian/rules @@ -0,0 +1,25 @@ +#!/usr/bin/make -f + +build: build-stamp +build-stamp: + dh_autoreconf + dh build + touch build-stamp + +clean: + dh_autoreconf_clean + dh clean + +install: build install-stamp +install-stamp: + dh install + touch install-stamp + +binary-arch: install + dh binary-arch + +binary-indep: install + dh binary-indep + +binary: binary-arch binary-indep + --- iec16022-0.2.4.orig/debian/watch +++ iec16022-0.2.4/debian/watch @@ -0,0 +1,3 @@ +version=3 +http://www.datenfreihafen.org/~stefan/iec16022/iec16022-([\d\.]+).tar.gz + --- iec16022-0.2.4.orig/iec16022ecc200.c +++ iec16022-0.2.4/iec16022ecc200.c @@ -255,7 +255,7 @@ { char out[6], p = 0; const char *e, - *s2 = "!\"#$%&'()*+,-./:;<=>?@[\\]_", + *s2 = "!\"#$%&'()*+,-./:;<=>?@[\\]^_", *s3 = 0; if (newenc == 'c') { e = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; @@ -321,11 +321,11 @@ } } } - if (p == 2 && tp + 2 == tl && sp == sl) - out[p++] = 0; // shift 1 pad at end - while (p >= 3) { - int v = - out[0] * 1600 + + while (p >= 3 || (p && sp == sl)) { + int v; + while (p < 3) out[p++] = 0; // pad at end + if (tp + 2 >= tl) return 0; // not enough space + v = out[0] * 1600 + out[1] * 40 + out[2] + 1; if (enc != newenc) { if (enc == 'c' @@ -356,26 +356,36 @@ case 'e': // EDIFACT { unsigned char out[4], p = 0; - if (enc != newenc) { // can only be from C40/Text/X12 + if (enc != 'a' && enc != newenc) { // can only be from C40/Text/X12 t[tp++] = 254; enc = 'a'; } + if (enc == 'a') + { + t[tp++] = 240; + enc = 'e'; + } while (sp < sl && tolower(encoding[sp]) == 'e' - && p < 4) + && p < 4) { + if (s[sp] < 32 || s[sp] > 94) { + fprintf(stderr, "Cannot encode 0x%02X in EDIFACT\n", s[sp]); + return 0; + } out[p++] = s[sp++]; + } if (p < 4) { out[p++] = 0x1F; enc = 'a'; } // termination - t[tp] = ((s[0] & 0x3F) << 2); - t[tp++] |= ((s[1] & 0x30) >> 4); - t[tp] = ((s[1] & 0x0F) << 4); + t[tp] = ((out[0] & 0x3F) << 2); + t[tp++] |= ((out[1] & 0x30) >> 4); + t[tp] = ((out[1] & 0x0F) << 4); if (p == 2) tp++; else { - t[tp++] |= ((s[2] & 0x3C) >> 2); - t[tp] = ((s[2] & 0x03) << 6); - t[tp++] |= (s[3] & 0x3F); + t[tp++] |= ((out[2] & 0x3C) >> 2); + t[tp] = ((out[2] & 0x03) << 6); + t[tp++] |= (out[3] & 0x3F); } } break; @@ -420,6 +430,7 @@ t[tp] = s[sp++] + (((tp + 1) * 149) % 255) + 1; // see annex H tp++; } + if (l) return 0; // not enough space enc = 'a'; // reverse to ASCII at end } break;