debian/0000755000000000000000000000000011634162141007165 5ustar debian/compat0000644000000000000000000000000211401217425010361 0ustar 7 debian/watch0000644000000000000000000000017111401216225010210 0ustar version=3 http://billposer.org/Software/uni2ascii.html \ http://billposer.org/Software/Downloads/uni2ascii-(.*)\.tar\.gz debian/docs0000644000000000000000000000002211401216225010025 0ustar CREDITS NEWS TODO debian/rules0000755000000000000000000000276311634111365010257 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif config.status: configure dh_testdir ./configure CFLAGS="$(CFLAGS)" \ --host=$(DEB_HOST_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \ --mandir=\$${prefix}/share/man \ --prefix=/usr touch $@ build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: config.status dh_testdir $(MAKE) LOCALEDIR=/usr/share/locale touch $@ clean: dh_testdir dh_testroot rm -f build-stamp [ ! -f Makefile ] || $(MAKE) distclean ifneq "$(wildcard /usr/share/misc/config.sub)" "" cp -f /usr/share/misc/config.sub config.sub endif ifneq "$(wildcard /usr/share/misc/config.guess)" "" cp -f /usr/share/misc/config.guess config.guess endif dh_clean u2a config.sub config.guess install: build dh_testdir dh_testroot dh_prep $(MAKE) install DESTDIR=$(CURDIR)/debian/uni2ascii rm -f $(CURDIR)/debian/uni2ascii/usr/bin/u2a binary-indep: build install binary-arch: build install dh_testdir dh_testroot dh_installchangelogs -k NEWS dh_installdocs dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build build-arch build-indep clean binary-indep binary-arch binary install debian/copyright0000644000000000000000000000415511634157301011127 0ustar Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=174 Upstream-Name: uni2ascii Upstream-Contact: William J. Poser Source: Files: * Copyright: © 2004-2010, William J. Poser License: GPL-3+ 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 3 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 systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-3'. Files: debian/* Copyright: © 2005, Florian Ernst , © 2005-2006, Jose Carlos Medeiros , © 2007-2011, Kartik Mistry . License: GPL-3+ 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 3 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 systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-3'. debian/README.Debian0000644000000000000000000000074311401216225011225 0ustar uni2ascii for Debian -------------------- Upstream also includes two python scripts which have been the predecessor of the two binaries included in uni2ascii as well as a Tcl/Tk frontend called "u2a". Since those two scripts only provide limited functionality when compared to the binaries and since the "tablelist" tcl dependency of u2a currently cannot be met in Debian, they are simply left out. -- Florian Ernst Fri, 16 Dez 2005 22:36:04 +0100 debian/control0000644000000000000000000000142011564404201010563 0ustar Source: uni2ascii Section: text Priority: optional Maintainer: Kartik Mistry Build-Depends: debhelper (>= 7), autotools-dev Standards-Version: 3.9.2 Homepage: http://billposer.org/Software/uni2ascii.html Package: uni2ascii Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: UTF-8 to 7-bit ASCII and vice versa converter This package provides conversion in both directions between UTF-8 Unicode and a variety of 7-bit ASCII equivalents, including HTML numeric character references, various escapes and hexadecimal. Such ASCII equivalents are useful when including Unicode text in program source, when debugging, and when entering text into web programs that can handle the Unicode character set but are not 8-bit safe. debian/source/0000755000000000000000000000000011401216500010454 5ustar debian/source/format0000644000000000000000000000001411401216500011662 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000002212711634162136011047 0ustar uni2ascii (4.18-2) unstable; urgency=low * Check for partially-matched sscanf() patterns and consume an appropriate number of characters. Thanks to Benjamin Kaduk for patch. (Closes: #633704) * debian/rules: + Added missing recommended targets * debian/copyright: + Updated to latest DEP-5 specification + Added license text for debian/* files -- Kartik Mistry Wed, 14 Sep 2011 22:56:54 +0530 uni2ascii (4.18-1) unstable; urgency=low * New upstream release: + Fixed "uni2ascii -B says it replaces characters, but mostly doesn't now" (Closes: #626268) * debian/control: + Updated Standards-Version to 3.9.2 -- Kartik Mistry Tue, 17 May 2011 10:58:30 +0530 uni2ascii (4.17-1) unstable; urgency=low * New upstream release: + Fixed U+00B7 MIDDLE DOT bug (Closes: #613595) + Now convert U+2022 bullet to 'o' (Closes: #610670) * debian/copyright: + Updated Debian packging copyright year * debian/rules: + Use NEWS file as upstream changelog, current Changelog may not be much useful to user as it tracks development branch -- Kartik Mistry Tue, 22 Feb 2011 21:06:40 +0530 uni2ascii (4.16-2) unstable; urgency=low * Upload to unstable -- Kartik Mistry Sat, 12 Feb 2011 11:43:06 +0530 uni2ascii (4.16-1) experimental; urgency=low * New upstream release: + Fixed 0x2033 forgotten conversion (Closes: #606919) + ascii2uni -a Q is working now (Closes: #563879, #604616) -- Kartik Mistry Mon, 13 Dec 2010 19:48:38 +0530 uni2ascii (4.15-1) experimental; urgency=low * New upstream release: + Removed patch 01_getline_posix2008_fix.diff, Fixed upstream + Fixed for endian.h conflicts with system's endian.h causing a FTBFS (Closes: #594826) * debian/control: + Updated Standards-Version to 3.9.1 * debian/copyright: + Updated upstream copyright year -- Kartik Mistry Mon, 30 Aug 2010 15:10:47 +0530 uni2ascii (4.14-3) unstable; urgency=low * debian/source/format: + Added to use source format 3.0 (quilt) * debian/control: + Updated Standards-Version to 3.8.4 * debian/copyright: + Updated as per DEP-5 specification * debian/patches/01_getline_posix2008_fix.diff: + Fixed Debian bug number in patch header * Updated debian/compat to 7 -- Kartik Mistry Tue, 01 Jun 2010 20:34:14 +0530 uni2ascii (4.14-2) unstable; urgency=low * debian/patches/01_getline_posix2008_fix.diff: + Added patch to fix getline function usage (Closes: #552870) * debian/control: + Updated Standards-Version to 3.8.3 + Added dependency on quilt (>= 0.40) * Added debian/README.source file * debian/rules: + Updated for patch system -- Kartik Mistry Fri, 30 Oct 2009 16:39:03 +0530 uni2ascii (4.14-1) unstable; urgency=low * New upstream release * debian/control: + Updated Standards-Version to 3.8.2 (no changes needed) + Updated debhelper dependency to 7 * debian/copyright: + Don't use versionless symlink to license text * debian/rules: + Updated to use dh_prep -- Kartik Mistry Thu, 06 Aug 2009 09:42:02 +0530 uni2ascii (4.13-1) unstable; urgency=low * New upstream release: + Fixed wrong characters replaced with ASCII (Closes: #511527) * debian/copyright: + Updated copyright year -- Kartik Mistry Fri, 24 Apr 2009 12:15:23 +0530 uni2ascii (4.12-1) unstable; urgency=low * New upstream release * debian/control: + Updated Standards-Version to 3.8.1 (no changes needed) -- Kartik Mistry Mon, 06 Apr 2009 22:35:45 +0530 uni2ascii (4.11-1) unstable; urgency=low * New upstream release * debian/copyright: + Updated for use of correct copyright symbol © instead of (C) -- Kartik Mistry Sat, 21 Feb 2009 21:50:56 +0530 uni2ascii (4.10-1) unstable; urgency=low * New upstream release * debian/control: + Updated my maintainer address -- Kartik Mistry Sun, 31 Aug 2008 14:17:33 +0530 uni2ascii (4.9-1) unstable; urgency=low * New upstream version: + Fix some serious bugs according to author due to inclusion of ascii2uni of 4.5 release in 4.7 release! * debian/control: + Updated Standards-Version to 3.8.0 (no changes needed) -- Kartik Mistry Mon, 30 Jun 2008 23:32:41 +0530 uni2ascii (4.7-1) unstable; urgency=low * New upstream release + Added missing characters to -p and -x options, Fixes Unicode ligatures to ASCII issues (Closes: #470200) * debian/docs: + Removed AUTHORS file from list as there is single author only from upstream. It can be added when more authors will be added. -- Kartik Mistry Sun, 27 Apr 2008 14:10:03 +0530 uni2ascii (4.5-1) unstable; urgency=low * New upstream release: * debian/copyright: + Updated Debian package license same as upstream license -- Kartik Mistry Fri, 21 Mar 2008 16:48:02 +0530 uni2ascii (4.4-1) unstable; urgency=low * New upstream release * debian/control: + Updated Standards-Version to 3.7.3 + Updated Homepage entry + Updated short description * debian/copyright: + Updated license as package is under GPL-3 now + Updated Debian package copyright -- Kartik Mistry Sun, 20 Jan 2008 10:15:52 +0530 uni2ascii (4.3.2-1) unstable; urgency=low * New upstream release * debian/copyright: moved copyright out of license section, added package copyright info, intended text to 80 characters * debian/rules: fixed configure flags, fixed clean target * debian/README.Debian: fixed according to standard format, fixed text * debian/control: fixed short and long descriptions * debian/watch: fixed, it is working now finally * debian/docs: added AUTHORS file -- Kartik Mistry Wed, 05 Sep 2007 10:16:57 +0530 uni2ascii (4.3-1) unstable; urgency=low * New upstream release * Fixed debian/watch file according to uscan man page -- Kartik Mistry Wed, 14 Mar 2007 11:41:19 +0530 uni2ascii (4.2-1) unstable; urgency=low * New upstream release * Fixed debian/watch file * debian/rules: Cleaning up u2a's presenence in diff.gz, minor cleanups * debian/copyright: minor cleanups, removed useless acknowledgment section * Added debian/docs * debian/control: minor cleanups, added ${misc:Depends} -- Kartik Mistry Wed, 7 Mar 2007 12:21:38 +0530 uni2ascii (3.12-1) unstable; urgency=low * New maintainer (Closes: #407674) * New upstream release (Closes: #401084) * Fixed man page's - sequence according to groff manual * Minor cleanups in debian/rules, debian/control, debian/README.Debian -- Kartik Mistry Mon, 22 Jan 2007 17:05:21 +0530 uni2ascii (3.9.5-1) unstable; urgency=low * New upstream release. (Closes: #375790, #367546) * Standards-Version: 3.7.2 -- Jose Carlos Medeiros Thu, 6 Jul 2006 20:38:07 -0300 uni2ascii (3.9-1) unstable; urgency=low * New upstream release -- Jose Carlos Medeiros Fri, 12 May 2006 12:17:33 -0300 uni2ascii (3.8-1) unstable; urgency=low * New upstream release * Solved "Z/a and 9/y are treated as stylistic variants", thanks to Chung-chieh Shan . (closes: #365962) -- Jose Carlos Medeiros Thu, 11 May 2006 21:10:59 -0300 uni2ascii (3.5-1) unstable; urgency=low * New upstream release -- Jose Carlos Medeiros Mon, 13 Mar 2006 10:43:51 -0300 uni2ascii (3.4-1) unstable; urgency=low * New upstream release. (closes: #353488) -- Jose Carlos Medeiros Fri, 3 Mar 2006 17:02:10 -0300 uni2ascii (3.3-1) unstable; urgency=low * New upstream release. -- Jose Carlos Medeiros Wed, 1 Feb 2006 18:30:41 -0200 uni2ascii (3.0-2) unstable; urgency=low * New Mantainer. (closes: #344460) -- Jose Carlos Medeiros Fri, 23 Dec 2005 16:27:43 -0200 uni2ascii (3.0-1) unstable; urgency=low * New upstream release -- Florian Ernst Mon, 19 Dec 2005 21:06:34 +0100 uni2ascii (2.7-1) unstable; urgency=low * New upstream release -- Florian Ernst Thu, 8 Dec 2005 10:11:25 +0100 uni2ascii (2.6-2) unstable; urgency=low * correct LOCALEDIR, overeagerly stripped out before -- Florian Ernst Thu, 20 Oct 2005 22:08:35 +0200 uni2ascii (2.6-1) unstable; urgency=low * New upstream release * debian/rules: new upstream allows some improvement / simplification * debian/watch: added -- Florian Ernst Thu, 20 Oct 2005 21:51:03 +0200 uni2ascii (2.5-1) unstable; urgency=low * New upstream release -- Florian Ernst Wed, 28 Sep 2005 23:27:14 +0200 uni2ascii (2.3-1) unstable; urgency=low * Initial release (Closes: #327340) -- Florian Ernst Fri, 16 Sep 2005 13:05:51 +0200 debian/patches/0000755000000000000000000000000011634110303010605 5ustar debian/patches/fix_segmentation_fault.diff0000644000000000000000000000662411634110075016213 0ustar Description: Check for partially-matched sscanf() patterns and consume an appropriate number of characters. Debian-Bug: http://bugs.debian.org/633704 Author: Benjamin Kaduk diff -ruN uni2ascii-4.18.orig//ascii2uni.c uni2ascii-4.18/ascii2uni.c --- uni2ascii-4.18.orig//ascii2uni.c 2011-05-14 22:15:20.000000000 -0400 +++ uni2ascii-4.18/ascii2uni.c 2011-08-23 20:07:29.000000000 -0400 @@ -208,6 +208,7 @@ char aHfmt [8+2+1]; char aDfmt [8+2+1]; char cbuf[5]; + char fmt_itoa[12]; FILE *infp; UTF32 num; @@ -555,45 +556,64 @@ } else if (FType == CHENT) { if (AllHTMLP){ + NConsumed = -1; if(sscanf(iptr,aHfmt,&num,&NConsumed) > 0) { - if(*(iptr+NConsumed-1) != ';') { + if(NConsumed == -1 || *(iptr+NConsumed-1) != ';') { MicrosoftStyle++; + if (NConsumed == -1) { + if (snprintf(fmt_itoa, sizeof(fmt_itoa), "%x", num) > sizeof(fmt_itoa)-1) { + fprintf(stderr, "UTF32 codepoint overflowed static buffer\n"); + exit(BADRECORD); + } + NConsumed = 3 /* "&#x" */ + strlen(fmt_itoa) + 1 /* ";" */; + } fprintf(stderr, _("The HTML/HDML entity %1$s at token %2$lu of line %3$lu lacks the requisite final semicolon.\n"), ExtractSubstring(tmpstr,iptr,iptr+NConsumed-3),TokenNumber,LineNo); if(StrictP) {putchar(*iptr++); continue;} - else {putu8(num);iptr+=NConsumed;} + else {putu8(num);iptr+=NConsumed-1;} } else {putu8(num);iptr+=NConsumed;} TokenNumber++; continue; } + NConsumed = -1; if(sscanf(iptr,aDfmt,&num,&NConsumed) > 0) { - if(*(iptr+NConsumed-1) != ';') { + if(NConsumed == -1 || *(iptr+NConsumed-1) != ';') { MicrosoftStyle++; + if (NConsumed == -1) { + if (snprintf(fmt_itoa, sizeof(fmt_itoa), "%u", num) > sizeof(fmt_itoa)-1) { + fprintf(stderr, "UTF32 codepoint overflowed static buffer\n"); + exit(BADRECORD); + } + NConsumed = 2 /* "&#" */ + strlen(fmt_itoa) + 1 /* ";" */; + } fprintf(stderr, _("The HTML/HDML entity %1$s at token %2$lu of line %3$lu lacks the requisite final semicolon.\n"), ExtractSubstring(tmpstr,iptr,iptr+NConsumed-3),TokenNumber,LineNo); if (StrictP) {putchar(*iptr++); continue;} - else {putu8(num);iptr+=NConsumed;} + else {putu8(num);iptr+=NConsumed-1;} } else {putu8(num);iptr+=NConsumed;} TokenNumber++; continue; } } + NConsumed = -1; if(sscanf(iptr,afmt,&enam,&NConsumed) > 0) { + if (NConsumed == -1) NConsumed = 1 /* "&" */ + strlen(enam) + 1 /* ";" */; if( (num = LookupCodeForEntity(enam))) { if(*(iptr+NConsumed-1) != ';') { MicrosoftStyle++; fprintf(stderr,_("The HTML/HDML entity %1$s at token %2$lu of line %3$lu lacks the requisite final semicolon.\n"),ExtractSubstring(tmpstr,iptr,iptr+NConsumed-3),TokenNumber,LineNo); if(StrictP) {putchar(*iptr++);continue;} - else {putu8(num);iptr+=NConsumed;} + else {putu8(num);iptr+=NConsumed-1;} } else {putu8(num);iptr+=NConsumed;} TokenNumber++; } else { + if(*(iptr+NConsumed-1) != ';') NConsumed--; fprintf(stderr,"ascii2uni: unknown HTML/HDML character entity \"&%s;\" at line %lu\n", enam,LineNo); putu8(UNI_REPLACEMENT_CHAR); debian/patches/series0000644000000000000000000000003411634110303012017 0ustar fix_segmentation_fault.diff