--- tetradraw-2.0.3.orig/debian/menu +++ tetradraw-2.0.3/debian/menu @@ -0,0 +1,6 @@ +?package(tetradraw):needs="vc" section="Applications/Graphics"\ + title="TetraDraw" longtitle="ANSI Drawing Program"\ + command="/usr/bin/tetradraw" +?package(tetradraw):needs="vc" section="Applications/Viewers"\ + title="TetraView" longtitle="ANSI Graphics Browser"\ + command="/usr/bin/tetraview" --- tetradraw-2.0.3.orig/debian/postinst +++ tetradraw-2.0.3/debian/postinst @@ -0,0 +1,12 @@ +#!/bin/sh +# postinst for tetradraw +# Copyright 2000-2010 by Gerfried Fuchs +# Licensed under BSD + +set -e + +if [ "$action" != configure ]; then + exit 0 +fi + +if [ -x /usr/bin/update-menus ]; then update-menus ; fi --- tetradraw-2.0.3.orig/debian/README.source +++ tetradraw-2.0.3/debian/README.source @@ -0,0 +1,2 @@ +This package uses quilt for its patch management, see +/usr/share/doc/quilt/README.source if you are unfamiliar with it. --- tetradraw-2.0.3.orig/debian/copyright +++ tetradraw-2.0.3/debian/copyright @@ -0,0 +1,32 @@ +This package was debianized by Gerfried Fuchs on +Sun, 23 Jul 2000 18:49:13 +0200. + +It was downloaded from + +Upstream Author: John McCutchan + +Copyright: + Copyleft 2000 by John McCutchan + + 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 Street, Fifth Floor, Boston, + MA 02110-1301 USA. + +The Debian packaging is Copyright 2000-2009 by +Gerfried Fuchs and is licensed under the BSD license. +See /usr/share/common-licenses/BSD for the full text of it. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License version 2 can be found in `/usr/share/common-licenses/GPL-2', +later versions can be found in the same directory. --- tetradraw-2.0.3.orig/debian/rules +++ tetradraw-2.0.3/debian/rules @@ -0,0 +1,124 @@ +#!/usr/bin/make -f +# debian/rules file for tetradraw +# Copyright 2000-2010 by Gerfried Fuchs +# Licensed under BSD + +PKG = tetradraw +TMP = $(CURDIR)/debian/$(PKG) + +CFLAGS = -g # from the original Makefile +INSTALL = install +INSTALL_FILE = $(INSTALL) -p -oroot -groot -m644 +INSTALL_PROGRAM = $(INSTALL) -p -oroot -groot -m755 +INSTALL_SCRIPT = $(INSTALL) -p -oroot -groot -m755 +INSTALL_DIR = $(INSTALL) -p -d -oroot -groot -m755 + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +#needed for h_addr in struct hostent +CFLAGS += -D_GNU_SOURCE + +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s + STRIP = true +endif + + +include /usr/share/quilt/quilt.make + +clean: unpatch + $(checkdir) + $(checkroot) + + -rm -rf $(TMP) debian/substvars debian/files \ + install-stamp build-stamp configure-stamp \ + config.sub config.guess + [ ! -f Makefile ] || $(MAKE) distclean + + +configure: configure-stamp +configure-stamp: $(QUILT_STAMPFN) + $(checkdir) + + cp -a /usr/share/misc/config.guess /usr/share/misc/config.sub . + ./configure --prefix=/usr --mandir=\$${prefix}/share/man + touch configure-stamp + + +build: build-stamp +build-stamp: configure + $(checkdir) + + $(MAKE) CFLAGS="$(CFLAGS)" AUTOMAKE=true + touch build-stamp + + +install: install-stamp +install-stamp: build + $(checkdir) + $(checkroot) + + -rm -rf $(TMP) debian/substvars + $(INSTALL_DIR) $(TMP) + cd $(TMP) && $(INSTALL_DIR) usr/bin usr/share/man/man1 \ + usr/share/doc/$(PKG) + # doesn't work as expected... and it's two binaries anyway + # $(MAKE) install$(STRIP) prefix=$(TMP)/usr + $(INSTALL_PROGRAM) src/tetradraw src/tetraview $(TMP)/usr/bin + test "$(STRIP)" != true || strip \ + --remove-section=.comment --remove-section=.note \ + $(TMP)/usr/bin/tetra* + $(INSTALL_FILE) debian/tetradraw.1 $(TMP)/usr/share/man/man1 + cd $(TMP)/usr/share/man/man1 && \ + ln -s tetradraw.1.gz tetraview.1.gz + $(INSTALL_FILE) README THANKS TODO \ + $(TMP)/usr/share/doc/$(PKG) + $(INSTALL_FILE) ChangeLog \ + $(TMP)/usr/share/doc/$(PKG)/changelog + gzip -9 $(TMP)/usr/share/man/man1/tetradraw.1 \ + $(TMP)/usr/share/doc/$(PKG)/changelog + touch install-stamp + + +# 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 + $(checkdir) + $(checkroot) + + $(INSTALL_DIR) $(TMP)/DEBIAN $(TMP)/usr/share/menu + $(INSTALL_FILE) debian/menu $(TMP)/usr/share/menu/$(PKG) + $(INSTALL_FILE) debian/copyright \ + $(TMP)/usr/share/doc/$(PKG) + $(INSTALL_FILE) debian/changelog \ + $(TMP)/usr/share/doc/$(PKG)/changelog.Debian + gzip -9 $(TMP)/usr/share/doc/$(PKG)/changelog.Debian + $(INSTALL_SCRIPT) debian/postinst debian/postrm $(TMP)/DEBIAN + dpkg-shlibdeps -Tdebian/substvars -dDepends \ + $(TMP)/usr/bin/tetra* + dpkg-gencontrol -ldebian/changelog -isp -Tdebian/substvars \ + -p$(PKG) -P$(TMP) + cd $(TMP) && find * -type f ! -regex '^DEBIAN/.*' -print0 | \ + xargs -r0 md5sum > DEBIAN/md5sums + dpkg --build $(TMP) .. + + +binary: binary-indep binary-arch + +define checkdir + test -f debian/rules +endef + +define checkroot + test root = "`whoami`" +endef + +.PHONY: clean configure build install binary-indep binary-arch binary --- tetradraw-2.0.3.orig/debian/postrm +++ tetradraw-2.0.3/debian/postrm @@ -0,0 +1,8 @@ +#!/bin/sh +# postrm for tetradraw +# Copyright 2000-2010 by Gerfried Fuchs +# Licensed under BSD + +set -e + +if [ -x /usr/bin/update-menus ]; then update-menus ; fi --- tetradraw-2.0.3.orig/debian/changelog +++ tetradraw-2.0.3/debian/changelog @@ -0,0 +1,178 @@ +tetradraw (2.0.3-8.2) unstable; urgency=low + + * Non-maintainer upload. + * Remove automake from Build-Depends. + * Remove 573671.patch from the diff. + * Pass AUTOMAKE=true to make, in order to prevent from running automake-1.7 + at build time (closes: #573671). + + -- Jakub Wilk Tue, 20 Jul 2010 00:58:15 +0200 + +tetradraw (2.0.3-8.1) unstable; urgency=medium + + [ Jari Aalto ] + * Non-maintainer upload. + * debian/control + - (Build-Depends): Add automake. + Patch thanks to Hideki Yamane (Debian-JP) + (FTBFS; Closes: #573671). + + -- Jari Aalto Fri, 30 Apr 2010 16:57:10 +0300 + +tetradraw (2.0.3-8) unstable; urgency=low + + * Updated to policy 3.8.4, no changes needed. + * Build-Depend on autotools-dev, copy config.{guess,sub} before configure + run and remove them in clean target (closes: #562331). Obsoletes + config-sub.guess patch. + * Use explicit set -e in post{inst,rm} scripts instead of #!/bin/sh -e. + + -- Gerfried Fuchs Tue, 09 Feb 2010 22:00:04 +0100 + +tetradraw (2.0.3-7) unstable; urgency=low + + * Using patch in the proper place to make sure building does happen after + patching (closes: #524385) + + -- Gerfried Fuchs Thu, 30 Apr 2009 18:50:32 +0200 + +tetradraw (2.0.3-6) unstable; urgency=low + + * Updated patch utf8-support to #include ncurses.h and menu.h with the + ncursesw/ prefix. + * Added Description and Author information to quilt patches. + + -- Gerfried Fuchs Thu, 16 Apr 2009 13:52:44 +0200 + +tetradraw (2.0.3-5) unstable; urgency=low + + * Apply patch from Peter Green to fix FTBFS, thanks! (closes: #518439) + * Updated to policy 3.8.1: + - added README.source. + * Also strip out .comment and .note section from binaries. + * Updated overall copyright informations. + * Start using quilt for patch management: + - config-sub.guess: updated config.{sub,guess} + - utf8-support: make it work for utf8 environment + - mute-compile-warnings: add some #include + + -- Gerfried Fuchs Tue, 14 Apr 2009 11:45:26 +0200 + +tetradraw (2.0.3-4) unstable; urgency=low + + * menu transition: + - debian/rules: s#usr/lib/menu#usr/share/menu#g + - debian/menu: s/Apps/Applications/, capitalized the title and longtitle. + * Bumped to Standards-Version 3.7.2 without needed changes. + * Removed watch file for the time being - Upstream webpage has been removed. + Added some informations into debian/TODO. + * Updated config.{guess,sub}. + * debian/rules: small cleanup. + * debian/copyright: Updated FSF address. + * Mute some compile warnings: + - src/{interface,multidraw}.c: #include + + -- Gerfried Fuchs Thu, 05 Jul 2007 13:38:24 +0200 + +tetradraw (2.0.3-3) unstable; urgency=low + + * Updated config.{guess,sub} (closes: #342433) + * Bumped standards to 3.6.2. + + -- Gerfried Fuchs Wed, 04 Jan 2006 17:03:49 +0100 + +tetradraw (2.0.3-2) unstable; urgency=low + + * Applied utf8 support patch from Göran Weinholt (closes: #233944). Thanks! + * Bumped standards to 3.6.1. + + -- Gerfried Fuchs Wed, 24 Nov 2004 09:39:13 +0100 + +tetradraw (2.0.3-1) unstable; urgency=low + + * New Upstream release. (closes: #231661) + * Bumped to policy 3.6.1. + * Updated watch file to make it work again. + * Quoted all values in menu file. + * $(INSTALL_PROGRAM) in debian/rules ourself, install-strip doesn't strip + all anymore, and it's only two binaries anyway. + + -- Gerfried Fuchs Tue, 11 May 2004 10:29:36 +0200 + +tetradraw (2.0.2-7) unstable; urgency=low + + * Run automake-1.4 et al before building package. Hopefully closes: #205296 + + -- Gerfried Fuchs Mon, 18 Aug 2003 22:13:17 +0200 + +tetradraw (2.0.2-6) unstable; urgency=low + + * Updated libtool scripts, for mips mainly (closes: #201919) + * Updated to policy 3.6.0: Removed /usr/doc -> /usr/share/doc handling. + * Removed fullstop from short description. + + -- Gerfried Fuchs Wed, 13 Aug 2003 21:38:57 +0200 + +tetradraw (2.0.2-5) unstable; urgency=low + + * Updated watchfile to version=2. + * Updated to policy 3.5.7, added support for DEB_BUILD_OPTIONS. + * Removed debhelper Build-Depends (missing cruft). + + -- Gerfried Fuchs Mon, 09 Sep 2002 09:55:11 +0200 + +tetradraw (2.0.2-4) unstable; urgency=low + + * Un-debhelper-ized the package. + * Added watch file. + + -- Gerfried Fuchs Mon, 18 Feb 2002 11:47:39 +0100 + +tetradraw (2.0.2-3) unstable; urgency=low + + * Copied over config.{sub,guess} - guess this Closes: #104817 + * Updated Standards-Version (3.5.6.0). + + -- Gerfried Fuchs Sat, 18 Aug 2001 16:16:50 +0200 + +tetradraw (2.0.2-2) unstable; urgency=low + + * Use plain man-page and don't convert from sgml. + * Install upstream changelog as changelog (and not it's original name). + * Updated to more recent policy version (3.5.4.0). + * Revised rules file, for changes in debhelper package. + * Revised menu entries. + + -- Gerfried Fuchs Sun, 6 May 2001 23:21:13 +0200 + +tetradraw (2.0.2-1) unstable; urgency=low + + * New upstream release + + -- Gerfried Fuchs Tue, 12 Dec 2000 14:57:20 +0100 + +tetradraw (2.0-4) unstable; urgency=low + + * Added patch that adds a newline at the end of each line (thanks to + Andreas Krennmair) + + -- Gerfried Fuchs Mon, 11 Dec 2000 15:52:21 +0100 + +tetradraw (2.0-3) unstable; urgency=low + + * Changed typo in description; thanks to Adrian (Closes: #76842). + + -- Gerfried Fuchs Mon, 13 Nov 2000 09:11:31 +0100 + +tetradraw (2.0-2) unstable; urgency=low + + * Added Build-Depends: line to control file + + -- Gerfried Fuchs Wed, 6 Sep 2000 10:08:38 +0200 + +tetradraw (2.0-1) unstable; urgency=low + + * Initial Release. + * Added manual page. + + -- Gerfried Fuchs Sun, 23 Jul 2000 20:53:41 +0200 --- tetradraw-2.0.3.orig/debian/control +++ tetradraw-2.0.3/debian/control @@ -0,0 +1,17 @@ +Source: tetradraw +Section: editors +Priority: optional +Maintainer: Gerfried Fuchs +Build-Depends: libncursesw5-dev, quilt, autotools-dev +Standards-Version: 3.8.4 + +Package: tetradraw +Architecture: any +Depends: ${shlibs:Depends} +Description: ANSI drawing and viewing utility + tetradraw is an easy to use drawing utility that gives you an ease access to + the high characters like smileys, card signs and the well known single and + double frame line characters but much more. Also the changing of foreground + and background colors is not hard to do. + . + tetraview is the viewer for such produced images. --- tetradraw-2.0.3.orig/debian/tetradraw.1 +++ tetradraw-2.0.3/debian/tetradraw.1 @@ -0,0 +1,90 @@ +.\" This -*- nroff -*- file has been generated from +.\" DocBook SGML with docbook-to-man on Debian GNU/Linux. +...\" +...\" transcript compatibility for postscript use. +...\" +...\" synopsis: .P! +...\" +.de P! +\\&. +.fl \" force out current output buffer +\\!%PB +\\!/showpage{}def +...\" the following is from Ken Flowers -- it prevents dictionary overflows +\\!/tempdict 200 dict def tempdict begin +.fl \" prolog +.sy cat \\$1\" bring in postscript file +...\" the following line matches the tempdict above +\\!end % tempdict % +\\!PE +\\!. +.sp \\$2u \" move below the image +.. +.de pF +.ie \\*(f1 .ds f1 \\n(.f +.el .ie \\*(f2 .ds f2 \\n(.f +.el .ie \\*(f3 .ds f3 \\n(.f +.el .ie \\*(f4 .ds f4 \\n(.f +.el .tm ? font overflow +.ft \\$1 +.. +.de fP +.ie !\\*(f4 \{\ +. ft \\*(f4 +. ds f4\" +' br \} +.el .ie !\\*(f3 \{\ +. ft \\*(f3 +. ds f3\" +' br \} +.el .ie !\\*(f2 \{\ +. ft \\*(f2 +. ds f2\" +' br \} +.el .ie !\\*(f1 \{\ +. ft \\*(f1 +. ds f1\" +' br \} +.el .tm ? font underflow +.. +.ds f1\" +.ds f2\" +.ds f3\" +.ds f4\" +'\" t +.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n +.TH "TETRADRAW" "1" +.SH "NAME" +tetradraw \(em ANSI drawing utility +.SH "SYNOPSIS" +.PP +\fBtetradraw\fP [\fB\fI[file]\fP\fP] +.PP +\fBtetraview\fP +.SH "DESCRIPTION" +.PP +This manual page documents briefly the +\fBtetradraw\fP and \fBtetraview\fP commands. +.PP +This manual page was written for the \fBDebian GNU/Linux\fP distribution +because the original program does not have a manual page. +.PP +\fBtetradraw\fP is a program that helps you in an easy +way to draw an ANSI picture. It takes as argument the filename of a +picture. You can get a nice online help within the program by pressing +ALT-h. +.PP +\fBtetraview\fP is a browser that can show you pictures +created with \fBtetradraw\fP. You leave this program by +pressing the ESC-Key twice. +.SH "OPTIONS" +.PP +\fBtetradraw\fP takes as it's only argument the +filename of an picture to load. +.IP "\fBfile\fP " 10 +Load file into tetradraw. +.SH "AUTHOR" +.PP +This manual page was written by Gerfried Fuchs for +the \fBDebian GNU/Linux\fP system (but may be used by others). +...\" created by instant / docbook-to-man, Wed 13 Dec 2000, 09:06 --- tetradraw-2.0.3.orig/debian/TODO +++ tetradraw-2.0.3/debian/TODO @@ -0,0 +1,7 @@ +Informations about Upstream Developer, get in contact again ... + +http://www.johnmccutchan.com/ +https://savannah.nongnu.org/users/ttb +https://savannah.nongnu.org/projects/tetradraw + +http://tetradraw.sf.net/ is _not_ upstream, doesn't have 2.0.3 --- tetradraw-2.0.3.orig/debian/patches/03_mute-compile-warnings +++ tetradraw-2.0.3/debian/patches/03_mute-compile-warnings @@ -0,0 +1,39 @@ +Author: Gerfried Fuchs vim:ft=diff: +Description: Mute some compiler warnings that might raise bugs vim:ft=diff: + +Index: tetradraw-2.0.3/src/interface.c +=================================================================== +--- tetradraw-2.0.3.orig/src/interface.c ++++ tetradraw-2.0.3/src/interface.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include "internal.h" + #include "types.h" +Index: tetradraw-2.0.3/src/multidraw.c +=================================================================== +--- tetradraw-2.0.3.orig/src/multidraw.c ++++ tetradraw-2.0.3/src/multidraw.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include "internal.h" + #include "types.h" +Index: tetradraw-2.0.3/src/term.c +=================================================================== +--- tetradraw-2.0.3.orig/src/term.c ++++ tetradraw-2.0.3/src/term.c +@@ -19,6 +19,7 @@ + + #include + #include ++ #include + #include + #include + --- tetradraw-2.0.3.orig/debian/patches/02_utf8-support +++ tetradraw-2.0.3/debian/patches/02_utf8-support @@ -0,0 +1,391 @@ +Author: Göran Weinholt , Gerfried Fuchs vim:ft=diff: +Description: Make tetradraw able to work in an utf8 environment + +Index: tetradraw-2.0.3/src/Makefile.in +=================================================================== +--- tetradraw-2.0.3.orig/src/Makefile.in ++++ tetradraw-2.0.3/src/Makefile.in +@@ -140,7 +140,7 @@ AUTOMAKE_OPTIONS = 1.4 + + MAINTAINERCLEANFILES = Makefile.in + EXTRA_DIST = art/* *.h +-INCLUDES = -I$(top_srcdir) -I. ++INCLUDES = -I$(top_srcdir) -I. -I/usr/include/ncursesw -DWIDE_CURSES -D_XOPEN_SOURCE_EXTENDED + + bin_PROGRAMS = tetradraw tetraview + +@@ -148,13 +148,13 @@ tetradraw_SOURCES = block.c editor.c int + network.c options_io.c sauce.c save.c term.c tetradraw.c + + +-tetradraw_LDADD = -lncurses -lmenu ++tetradraw_LDADD = -lncursesw -lmenuw + + tetraview_SOURCES = editor.c interface.c internal.c load.c network.c \ + multidraw.c options_io.c block.c sauce.c term.c tetraview.c + + +-tetraview_LDADD = -lncurses -lmenu ++tetraview_LDADD = -lncursesw -lmenuw + subdir = src + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +Index: tetradraw-2.0.3/src/interface.c +=================================================================== +--- tetradraw-2.0.3.orig/src/interface.c ++++ tetradraw-2.0.3/src/interface.c +@@ -19,8 +19,8 @@ + + + +-#include +-#include ++#include ++#include + #include + #include + #include +@@ -61,6 +61,22 @@ + #include "art/exit_logo.h" + + ++#ifdef WIDE_CURSES ++# include "unitable.h" ++/* Convert cp437 characters to unicode if in a unicode locale. */ ++void showchar(int y, int x, const chtype ch) { ++ if (unicode_term) { ++ cchar_t cc; ++ ++ attrset(ch & ~0xFF & ~A_ALTCHARSET); ++ setcchar(&cc, unicode_table[ch & 0xFF], 0, 0, NULL); ++ mvadd_wch(y, x, &cc); ++ } else { ++ mvwaddch(stdscr, y, x, ch); ++ } ++} ++#endif ++ + /* this function draws the main editor screen */ + void draw_editor(canvas *page) { + +Index: tetradraw-2.0.3/src/interface.h +=================================================================== +--- tetradraw-2.0.3.orig/src/interface.h ++++ tetradraw-2.0.3/src/interface.h +@@ -75,4 +75,11 @@ void colour_selection(canvas *page); + void options_screen(); + int quicksave_prompt(); + ++#ifdef WIDE_CURSES ++/* Replace the mvaddch function with our showchar function. */ ++void showchar(int y, int x, const chtype ch); ++# undef mvaddch ++# define mvaddch(y,x,ch) showchar(y,x,ch) ++#endif ++ + #endif +Index: tetradraw-2.0.3/src/term.c +=================================================================== +--- tetradraw-2.0.3.orig/src/term.c ++++ tetradraw-2.0.3/src/term.c +@@ -17,8 +17,10 @@ + + + +-#include ++#include + #include ++#include ++#include + + #include "types.h" + #include "colours.h" +@@ -29,8 +31,12 @@ + #include "keys.h" + + ++/* Terminal is Linux and/or unicoded. */ ++int linux_term = 0, unicode_term = 0; ++ + /* this function binds the key */ + void setup_keys() { ++#ifndef NEW_KEYCODES + define_key("\e[1~", TD_KEY_HOME); + define_key("\e[2~", TD_KEY_INSERT); + define_key("\e[3~", TD_KEY_DEL); +@@ -50,6 +56,7 @@ void setup_keys() { + define_key("\e[21~", TD_KEY_F10); + define_key("\e[23~", TD_KEY_F11); + define_key("\e[24~", TD_KEY_F12); ++#endif + + define_key("\eb", TD_KEY_BLOCK); + define_key("\eB", TD_KEY_BLOCK); +@@ -119,14 +126,26 @@ void setup_keys() { + define_key("\e\t", TD_KEY_BTAB); + } + +-/* this sets the ibm character set */ ++/* This sets the terminal's character set. */ + void setup_charset() { +- /* \033(U IBM VGA font */ +- /* \033(B Latin-1 font */ +- /* \033(0 DEC font */ +- +- /* set ibm font since it has the higher ascii characters */ +- printf("\e(U"); ++ setlocale(LC_CTYPE, ""); ++#ifdef WIDE_CURSES ++ unicode_term = !strcmp(nl_langinfo(CODESET), "UTF-8"); ++#endif ++ ++ if (unicode_term) { ++ printf("\e%%G"); ++ } else if (linux_term) { ++ /* \033(U IBM VGA font */ ++ /* \033(B Latin-1 font */ ++ /* \033(0 DEC font */ ++ /* set ibm font since it has the higher ascii characters */ ++ printf("\e(U"); ++ } else { ++ fprintf(stderr, "Warning: tetradraw and tetraview" ++ " have only been tested under the linux-console\n" ++ "and in unicode capable terminals and locales\n"); ++ } + } + + /* this function clears the screen */ +@@ -152,13 +171,8 @@ void shutdown_ncurses() { + + /* this function starts up ncurses */ + void setup_ncurses() { +- char *term = NULL; +- +- term = getenv("TERM"); +- if(strcmp(term, "linux")) { +- fprintf(stderr, "Warning: tetradraw and tetraview" +- " have only been tested under the linux-console\n"); +- } ++ if(!strcmp(getenv("TERM"), "linux")) ++ linux_term = 1; + initscr(); + cbreak(); + noecho(); +@@ -176,7 +190,7 @@ void setup_maxcor() { + /* as the linux console doesnt support it yet */ + /* And ansi is supposed to be 80x25 */ + //td_maxy = 24; +- td_maxx = 80; ++ td_maxy--; + } + + /* this function sets up the colours */ +Index: tetradraw-2.0.3/src/term.h +=================================================================== +--- tetradraw-2.0.3.orig/src/term.h ++++ tetradraw-2.0.3/src/term.h +@@ -25,4 +25,6 @@ void flushkeys(); + * */ + void bind_string(char *, int); + ++extern int linux_term, unicode_term; ++ + #endif +Index: tetradraw-2.0.3/src/unitable.h +=================================================================== +--- /dev/null ++++ tetradraw-2.0.3/src/unitable.h +@@ -0,0 +1,45 @@ ++#ifndef _UNITABLE_H ++#define _UNITABLE_H ++ ++/* Table for conversion from cp437 to unicode, almost. */ ++const wchar_t *unicode_table[0x100] = { ++ L" ", L"\x263A", L"\x263B", L"\x2665", L"\x2666", L"\x2663", L"\x2660", ++ L" ", L" ", L" ", L" ", L" ", L" ", L" ", ++ L" ", L" ", L"\x25C0", L"\x25B6", L"\x2195", L" ", L"\xB6", ++ L"\xA7", L" ", L" ", L"\x2191", L"\x2193", L" ", L" ", ++ L" ", L"\x2194", L"\x25B2", L"\x25BC", L" ", L"!", L"\"", ++ L"#", L"$", L"%", L"&", L"'", L"(", L")", ++ L"*", L"+", L",", L"-", L".", L"/", L"0", ++ L"1", L"2", L"3", L"4", L"5", L"6", L"7", ++ L"8", L"9", L":", L";", L"<", L"=", L">", ++ L"?", L"@", L"A", L"B", L"C", L"D", L"E", ++ L"F", L"G", L"H", L"I", L"J", L"K", L"L", ++ L"M", L"N", L"O", L"P", L"Q", L"R", L"S", ++ L"T", L"U", L"V", L"W", L"X", L"Y", L"Z", ++ L"[", L"\\", L"]", L"^", L"_", L"`", L"a", ++ L"b", L"c", L"d", L"e", L"f", L"g", L"h", ++ L"i", L"j", L"k", L"l", L"m", L"n", L"o", ++ L"p", L"q", L"r", L"s", L"t", L"u", L"v", ++ L"w", L"x", L"y", L"z", L"{", L"|", L"}", ++ L"~", L" ", L"\xC7", L"\xFC", L"\xE9", L"\xE2", L"\xE4", ++ L"\xE0", L"\xE5", L"\xE7", L"\xEA", L"\xEB", L"\xE8", L"\xEF", ++ L"\xEE", L"\xEC", L"\xC4", L"\xC5", L"\xC9", L"\xE6", L"\xC6", ++ L"\xF4", L"\xF6", L"\xF2", L"\xFB", L"\xF9", L"\xFF", L"\xD6", ++ L"\xDC", L" ", L"\xA3", L"\xA5", L"\x20A7", L"\x192", L"\xE1", ++ L"\xED", L"\xF3", L"\xFA", L"\xF1", L"\xD1", L"\xAA", L"\xBA", ++ L"\xBF", L"\x2310", L"\xAC", L"\xBD", L"\xBC", L"\xA1", L"\xAB", ++ L"\xBB", L"\x2591", L"\x2592", L"\x2593", L"\x2502", L"\x2524", L"\x2561", ++ L"\x2562", L"\x2556", L"\x2555", L"\x2563", L"\x2551", L"\x2557", L"\x255D", ++ L"\x255C", L"\x255B", L"\x2510", L"\x2514", L"\x2534", L"\x252C", L"\x251C", ++ L"\x2500", L"\x253C", L"\x255E", L"\x255F", L"\x255A", L"\x2554", L"\x2569", ++ L"\x2566", L"\x2560", L"\x2550", L"\x256C", L"\x2567", L"\x2568", L"\x2564", ++ L"\x2565", L"\x2559", L"\x2558", L"\x2552", L"\x2553", L"\x256B", L"\x256A", ++ L"\x2518", L"\x250C", L"\x2588", L"\x2584", L"\x258C", L"\x2590", L"\x2580", ++ L"\x3B1", L"\xDF", L"\x393", L"\x3C0", L"\x3A3", L"\x3C3", L"\xB5", ++ L"\x3C4", L"\x3A6", L"\x398", L"\x3A9", L"\x3B4", L"\x221E", L"\x3C6", ++ L"\x3B5", L"\x2229", L"\x2261", L"\xB1", L"\x2265", L"\x2264", L"\x2320", ++ L"\x2321", L"\xF7", L"\x2248", L"\xB0", L"\x2219", L"\xB7", L"\x221A", ++ L"\x207F", L"\xB2", L"\x25A0", L" " ++}; ++ ++#endif +Index: tetradraw-2.0.3/src/block.c +=================================================================== +--- tetradraw-2.0.3.orig/src/block.c ++++ tetradraw-2.0.3/src/block.c +@@ -18,7 +18,7 @@ + + + +-#include ++#include + + #include "types.h" + #include "colours.h" +Index: tetradraw-2.0.3/src/editor.c +=================================================================== +--- tetradraw-2.0.3.orig/src/editor.c ++++ tetradraw-2.0.3/src/editor.c +@@ -20,7 +20,7 @@ + #include + #include + #include +-#include ++#include + + #include "internal.h" + #include "types.h" +Index: tetradraw-2.0.3/src/load.c +=================================================================== +--- tetradraw-2.0.3.orig/src/load.c ++++ tetradraw-2.0.3/src/load.c +@@ -19,7 +19,7 @@ + + + +-#include ++#include + #include + #include + #include +Index: tetradraw-2.0.3/src/multidraw.c +=================================================================== +--- tetradraw-2.0.3.orig/src/multidraw.c ++++ tetradraw-2.0.3/src/multidraw.c +@@ -23,7 +23,7 @@ + #include + #include + #include +-#include ++#include + #include + + #include "internal.h" +Index: tetradraw-2.0.3/src/network.c +=================================================================== +--- tetradraw-2.0.3.orig/src/network.c ++++ tetradraw-2.0.3/src/network.c +@@ -31,7 +31,7 @@ + #include + #include + +-#include ++#include + + #include "types.h" + #include "colours.h" +Index: tetradraw-2.0.3/src/options_io.c +=================================================================== +--- tetradraw-2.0.3.orig/src/options_io.c ++++ tetradraw-2.0.3/src/options_io.c +@@ -16,7 +16,7 @@ + * */ + + +-#include ++#include + #include + #include + #include +Index: tetradraw-2.0.3/src/sauce.c +=================================================================== +--- tetradraw-2.0.3.orig/src/sauce.c ++++ tetradraw-2.0.3/src/sauce.c +@@ -18,7 +18,7 @@ + + + +-#include ++#include + #include + #include + +Index: tetradraw-2.0.3/src/save.c +=================================================================== +--- tetradraw-2.0.3.orig/src/save.c ++++ tetradraw-2.0.3/src/save.c +@@ -19,7 +19,7 @@ + + + #include +-#include ++#include + #include + + #include "internal.h" +Index: tetradraw-2.0.3/src/tetradraw.c +=================================================================== +--- tetradraw-2.0.3.orig/src/tetradraw.c ++++ tetradraw-2.0.3/src/tetradraw.c +@@ -18,7 +18,7 @@ + * */ + + +-#include ++#include + #include + #include + #include +Index: tetradraw-2.0.3/src/tetraview.c +=================================================================== +--- tetradraw-2.0.3.orig/src/tetraview.c ++++ tetradraw-2.0.3/src/tetraview.c +@@ -17,8 +17,8 @@ + * */ + + +-#include +-#include ++#include ++#include + #include + + #include "types.h" +Index: tetradraw-2.0.3/src/Makefile.am +=================================================================== +--- tetradraw-2.0.3.orig/src/Makefile.am ++++ tetradraw-2.0.3/src/Makefile.am +@@ -13,9 +13,9 @@ tetradraw_SOURCES = block.c editor.c int + network.c options_io.c sauce.c save.c term.c tetradraw.c + + +-tetradraw_LDADD = -lncurses -lmenu ++tetradraw_LDADD = -lncursesw -lmenu + + tetraview_SOURCES = editor.c interface.c internal.c load.c network.c \ + multidraw.c options_io.c block.c sauce.c term.c tetraview.c + +-tetraview_LDADD = -lncurses -lmenu ++tetraview_LDADD = -lncursesw -lmenu --- tetradraw-2.0.3.orig/debian/patches/series +++ tetradraw-2.0.3/debian/patches/series @@ -0,0 +1,2 @@ +02_utf8-support +03_mute-compile-warnings