diff -ruN therion-old/CHANGES therion/CHANGES
--- therion-old/CHANGES	2007-08-29 05:03:53.000000000 +0100
+++ therion/CHANGES	2008-01-03 02:40:14.000000000 +0000
@@ -509,6 +509,7 @@
    - layout command has new option: code <metapost|tex-map|tex-atlas>
    - join command has new option: count <N>
  * therion checks validity of UTF-8 encoded input files
+ * runtime errors on powerpc fixed (signed/unsigned chars and printf)
    
 xtherion:
 
diff -ruN therion-old/loch/lxOGLFT.cxx therion/loch/lxOGLFT.cxx
--- therion-old/loch/lxOGLFT.cxx	2007-03-16 08:43:40.000000000 +0000
+++ therion/loch/lxOGLFT.cxx	2008-01-03 02:40:14.000000000 +0000
@@ -945,8 +945,7 @@
 	dx = -( bbox.x_min_ + bbox.x_max_ ) / 2.; break;
       case RIGHT:
 	dx = -bbox.x_max_; break;
-      default:
-	break;
+      default: break;
       }
       switch ( vertical_justification_ ) {
       case BOTTOM:
@@ -955,8 +954,7 @@
 	dy = -( bbox.y_min_ + bbox.y_max_ ) / 2.; break;
       case TOP:
 	dy = -bbox.y_max_; break;
-      default:
-	break;
+      default: break;
       }
 
       // There is probably a less expensive way to compute this
@@ -1005,8 +1003,7 @@
 	dx = -( bbox.x_min_ + bbox.x_max_ ) / 2.; break;
       case RIGHT:
 	dx = -bbox.x_max_; break;
-      default:
-	break;
+      default: break;
       }
       switch ( vertical_justification_ ) {
       case BOTTOM:
@@ -1015,8 +1012,7 @@
 	dy = -( bbox.y_min_ + bbox.y_max_ ) / 2.; break;
       case TOP:
 	dy = -bbox.y_max_; break;
-      default:
-	break;
+      default: break;
       }
 
       // There is probably a less expensive way to compute this
diff -ruN therion-old/loch/Makefile therion/loch/Makefile
--- therion-old/loch/Makefile	2007-08-29 05:05:48.000000000 +0100
+++ therion/loch/Makefile	2008-01-03 03:26:03.000000000 +0000
@@ -6,87 +6,37 @@
   lxGUI.o lxGLCo.o lxGLCs.o lxOptDlg.o lxAboutDlg.o \
   img.o
 
-VTKLIBS = -lvtkHybrid -lvtkImaging -lvtkIO -lvtkGraphics -lvtkFiltering -lvtkCommon -lvtkjpeg -lvtkpng -lvtkzlib -lfreetype
 POSTMAKE =
-STRIPFLAG = -s 
 
-# PLATFORM CONFIG
-
-# PLATFORM LINUX
-##CXX = c++
-##CC = gcc
-##POBJECTS = lxR2P.o
-##VTKPATH = /usr/local/include/vtk-5.0
-##VTKLIBPATH = /usr/local/lib/vtk-5.0
-##CXXPFLAGS = -DLXLINUX $(shell wx-config --cxxflags) -Wno-deprecated $(shell freetype-config --cflags) -I$(VTKPATH)
-##CCPFLAGS = -DLXLINUX  $(shell wx-config --cflags)
-##LXLIBDIR = linux
-##PLIBS = $(shell wx-config --libs --gl-libs) -L$(VTKPATH)/lib/vtk $(VTKLIBS) -lpthread -lz 
-##LXPLATFORM = LINUX
 
 # PLATFORM DEBIAN
 CXX = c++
 CC = gcc
 POBJECTS = lxR2P.o
-VTKPATH = /usr/include/vtk-5.0
+VTKPATH = /usr/include/vtk-5.0 
 VTKLIBPATH = /usr/lib/vtk-5.0
 VTKLIBS = -lvtkHybrid -lvtkImaging -lvtkIO -lvtkGraphics -lvtkFiltering -lvtkCommon -lfreetype
-CXXPFLAGS = -DLXLINUX $(shell wx-config --cxxflags) -Wno-deprecated $(shell freetype-config --cflags) -I$(VTKPATH)
+CXXPFLAGS = -DLXLINUX $(shell wx-config --cxxflags) -Wno-deprecated -Wno-write-strings $(shell freetype-config --cflags) -I$(VTKPATH)
 CCPFLAGS = -DLXLINUX  $(shell wx-config --cflags)
 LXLIBDIR = linux
-PLIBS = $(shell wx-config --libs --gl-libs) -L$(VTKPATH)/lib/vtk $(VTKLIBS) -lpthread -lz 
+PLIBS = $(shell wx-config --libs --gl-libs) $(VTKLIBS) -lpthread -lz 
 LXPLATFORM = LINUX
 
-# PLATFORM WIN32
-##CXX = c++
-##CC = gcc
-##VTKPATH = /usr/local/include/vtk-5.0
-##POBJECTS = loch.res lxR2D.o getline.o
-##CXXPFLAGS = -W -Wall -DLXWIN32 $(shell wx-config --static --cxxflags) $(shell freetype-config --cflags) -I$(VTKPATH) -Wno-deprecated
-##CCPFLAGS = -W -Wall -DLXWIN32 $(shell wx-config --static --cflags)
-##LXLIBDIR = mingw
-##PLIBS = $(shell freetype-config --libs) $(shell wx-config --static --libs --gl-libs) $(VTKLIBS) -lwxzlib-2.6
-##LXPLATFORM = WIN32
-
-# PLATFORM MACOSX
-##CXX = c++
-##CC = cc
-##VTKPATH = /usr/local/include/vtk-5.0
-##POBJECTS = getline.o
-##CXXPFLAGS = -W -Wall -DLXMACOSX $(shell wx-config --static --cxxflags) -I$(VTKPATH) -Wno-deprecated -I/usr/X11R6/include -I/usr/X11R6/include/freetype2
-##CCPFLAGS = -W -Wall -DLXMACOSX $(shell wx-config --static --cflags) -I/usr/X11R6/include
-##LXLIBDIR = 
-##PLIBS = -lz -L/usr/X11R6/lib $(shell wx-config --static --libs --gl-libs) $(VTKLIBS)
-##POSTMAKE = cp -f ./loch ./loch.app/Contents/MacOS
-##STRIPFLAG =
-
-# PLATFORM ENDCONFIG
-
-
-# BUILD CONFIG
-
-# BUILD OZONE
-##CCBFLAGS = -O3
-##CXXBFLAGS = -O3
-##LDBFLAGS = $(STRIPFLAG)
-
-# BUILD OXYGEN
-CCBFLAGS = -O2
-CXXBFLAGS = -O2
-LDBFLAGS = $(STRIPFLAG)
-
-# BUILD RELEASE
-##CCBFLAGS = 
-##CXXBFLAGS = 
-##LDBFLAGS = $(STRIPFLAG)
-
-# BUILD DEBUG
-##CCBFLAGS = -ggdb
-##CXXBFLAGS = -ggdb -DLXDEBUG
-##LDBFLAGS = 
-
-# BUILD ENDCONFIG
 
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+  CCBFLAGS = -ggdb
+  CXXBFLAGS = -ggdb -DLXDEBUG
+endif
+    
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+  INSTALL_PROGRAM += -s
+  LDFLAGS += -s
+endif
+
+ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+  CCBFLAGS = -O2
+  CXXBFLAGS = -O2
+endif
 
 # compiler settings
 CXXFLAGS = -Wall -D_GNU_SOURCE -DLOCH $(CXXPFLAGS) $(CXXBFLAGS)
@@ -107,7 +57,7 @@
 .c.o:
 	$(CC) -c $(CCFLAGS) -o $@ $<
 
-all: loch hlp
+all: loch
 
 hlp:
 	make -C ./help
diff -ruN therion-old/Makefile therion/Makefile
--- therion-old/Makefile	2007-08-29 05:05:48.000000000 +0100
+++ therion/Makefile	2008-01-03 03:34:59.000000000 +0000
@@ -20,18 +20,20 @@
   thtrans.o thwarpp.o thwarppt.o thwarppme.o thwarp.o thexpshp.o thattr.o \
   therion.o extern/proj4/libproj.a 
 
-# PLATFORM CONFIG
-
-# PLATFORM LINUX
-##CXX = g++
-##CC = gcc
-##POBJECTS =
-##LOCHEXE = loch/loch
-##CXXPFLAGS = -DTHLINUX
-##CCPFLAGS = -DTHLINUX
-##LDPFLAGS = -s
-##THPLATFORM = LINUX
-##THXTHMKCMD = ./therion
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+  CCBFLAGS = -ggdb
+  CXXBFLAGS = -ggdb -DTHDEBUG
+else
+  ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+    CCBFLAGS = -O2
+    CXXBFLAGS = -O2
+  endif
+endif
+    
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+  INSTALL_PROGRAM += -s
+  LDFLAGS += -s
+endif
 
 
 # PLATFORM DEBIAN
@@ -41,71 +43,18 @@
 LOCHEXE = loch/loch
 CXXPFLAGS = -DTHLINUX
 CCPFLAGS = -DTHLINUX
-LDPFLAGS = -s
 THPLATFORM = LINUX
 THXTHMKCMD = ./therion
 
 
-# PLATFORM WIN32
-##CXX = c++
-##CC = gcc
-##POBJECTS = extern/getopt.o extern/getopt1.o therion.res extern/getline.o 
-##LOCHEXE = loch/loch
-##CXXPFLAGS = -DTHWIN32
-##CCPFLAGS = -DTHWIN32
-##LDPFLAGS = -s
-##THPLATFORM = WIN32
-##THXTHMKCMD = therion
-
-# PLATFORM MACOSX
-##CXX = c++
-##CC = cc
-##LOCHEXE =
-##POBJECTS = extern/getopt.o extern/getopt1.o extern/getline.o
-##CXXPFLAGS = -DTHMACOSX
-##CCPFLAGS = -DTHMACOSX
-##LDPFLAGS =
-##THPLATFORM = MACOSX
-##THXTHMKCMD = ./therion
-
-# PLATFORM ENDCONFIG
-
-
-# BUILD CONFIG
-
-# BUILD OZONE
-##CCBFLAGS = -O3
-##CXXBFLAGS = -O3
-##LDBFLAGS = $(LDPFLAGS)
-
-# BUILD OXYGEN
-CCBFLAGS = -O2
-CXXBFLAGS = -O2
-LDBFLAGS = $(LDPFLAGS)
-
-# BUILD RELEASE
-##CCBFLAGS = 
-##CXXBFLAGS = 
-##LDBFLAGS = $(LDPFLAGS)
-
-# BUILD DEBUG
-##CCBFLAGS = -ggdb
-##CXXBFLAGS = -ggdb -DTHDEBUG
-##LDBFLAGS = 
-
-# BUILD ENDCONFIG
-
-
 # compiler settings
-CXXFLAGS = -Wall $(CXXPFLAGS) $(CXXBFLAGS)
+CXXFLAGS = -Wall -Wno-deprecated -Wno-write-strings $(CXXPFLAGS) $(CXXBFLAGS)
 CCFLAGS = -Wall $(CCPFLAGS) $(CCBFLAGS)
 OBJECTS = $(POBJECTS) $(CMNOBJECTS)
 
 
 # linker settings
 LIBS = 
-LDFLAGS = $(LDBFLAGS)
-
 
 .SUFFIXES:
 .SUFFIXES: .cxx .o .h .c
@@ -124,17 +73,12 @@
 therion:	$(OBJECTS)
 	$(CXX) -Wall -o therion $(OBJECTS) $(LDFLAGS) $(LIBS) 
 
-
-therion.res: therion.rc
-	windres -i therion.rc -I rc -o therion.res -O coff
-
 init:
 	./therion --print-init-file > therion.ini
 
 install: all
 	perl makeinstall.pl $(THPLATFORM)
 
-
 release:
 	perl makerelease.pl
 
@@ -211,37 +155,6 @@
 thlangdata.cxx: thlang/texts.txt
 	make -C ./thlang
 
-config-debug:
-	perl makeconfig.pl BUILD DEBUG
-	make -C ./loch config-debug
-  
-config-release:
-	perl makeconfig.pl BUILD RELEASE
-	make -C ./loch config-release
-
-config-oxygen:
-	perl makeconfig.pl BUILD OXYGEN
-	make -C ./loch config-oxygen
-  
-config-ozone:
-	perl makeconfig.pl BUILD OZONE
-	make -C ./loch config-ozone
-
-config-debian:
-	perl makeconfig.pl PLATFORM DEBIAN
-	make -C ./loch config-debian
-  
-config-linux:
-	perl makeconfig.pl PLATFORM LINUX
-	make -C ./loch config-linux
-  
-config-win32:
-	perl makeconfig.pl PLATFORM WIN32
-	make -C ./loch config-win32
-  
-config-macosx:
-	perl makeconfig.pl PLATFORM MACOSX
-	make -C ./loch config-macosx
 
 # external sources
 extern/getopt.o: extern/getopt.c extern/getopt.h
diff -ruN therion-old/man/therion.1 therion/man/therion.1
--- therion-old/man/therion.1	2003-07-15 23:20:00.000000000 +0100
+++ therion/man/therion.1	2008-01-03 02:40:14.000000000 +0000
@@ -19,13 +19,16 @@
 .PP 
 \fBTherion\fP is a program that processes Therion data files to produce cave 
 surveys. The data files are usually .th files which contain survey  
-data, largely equivalent to survex .svx files, .th2 files which contain drawing  
-data and thconfig files which control the data files to be used and the maps to 
+data (very similar to survex .svx files), .th2 files which contain drawing  
+data, and thconfig files which control the data files to be used and the maps to 
 be output.  
-.PP 
+.PP
+.PP
+\fBTherion\fP outputs .pdf and .svg files for drawings, Survex .3d files, Compass
+.PLT files and VRML files for 3D models.
+.PP
 \fBTherion\fP uses a number of helper programs to do its  
-job. \fBSurvex\fP is used to process the centreline data,  
-\fBMetaPost\fP is used to draw cave symbols, and  
+job. \fBMetaPost\fP is used to draw cave symbols, and  
 \fBpdfTeX\fP generates the final maps. 
 .PP 
 In order to make the entering of drawing data practical, and to make the  
@@ -93,9 +96,12 @@
 .PP 
 xtherion (1)
 .PP 
-For full information see The Therion Book which describes Therion and its use 
-in detail. 
+For full information see The Therion Book (/usr/share/doc/therion/thbook.pdf) 
+which describes Therion and its use in detail. 
 .SH "AUTHORS" 
 .PP 
-Stacho Mudrak and Martin Budaj. This manual page was written by Wookey 
-wookey@debian.org for the \fBDebian\fP system. Modified by MB.
\ No newline at end of file
+Stacho Mudrak and Martin Budaj. This manual page was originally written by Wookey 
+<wookey@debian.org> for the \fBDebian\fP system, and is now maintained by MB.
+.PP 
+Copyright Wookey 2003, Martin Budaj 2003.
+This file is licensed under the GNU General Public Licence.
diff -ruN therion-old/man/xtherion.1 therion/man/xtherion.1
--- therion-old/man/xtherion.1	2003-09-26 20:55:12.000000000 +0100
+++ therion/man/xtherion.1	2008-01-03 02:40:14.000000000 +0000
@@ -17,15 +17,19 @@
 (a scan of the cave segment or to-scale notes), scale it, then draw Therion 'scraps' over  
 the image, and relate it to survey stations and save the resulting data. 
 .PP 
-For full information see The Therion Book which describes the application and 
-its use in detail. 
+For full information see The Therion Book (/usr/share/doc/therion/thbook.pdf) which 
+describes the application and its use in detail. 
 .SH "OPTIONS" 
 .PP 
 XTherion takes no options. 
 .SH "SEE ALSO" 
 .PP 
-therion (1) 
+therion (1)
 .SH "AUTHOR" 
 .PP 
 Stacho Mudrak. This manual page was written by Wookey wookey@debian.org for 
-the \fBDebian\fP system. Modified by MB.
\ No newline at end of file
+the \fBDebian\fP system. Modified by MB.
+.PP 
+Copyright Wookey 2003, Martin Budaj 2003.
+This file is licenced under the GNU General Public Licence.
+
diff -ruN therion-old/README therion/README
--- therion-old/README	2006-10-18 14:17:20.000000000 +0100
+++ therion/README	2008-01-03 02:40:14.000000000 +0000
@@ -8,9 +8,9 @@
 Therion creates realistic 3D models from 2D maps without quantity of additional
 informations. LRUD dimensions are also supported.
 
-Documentation is in the Therion Book (file thbook.pdf), which can either be 
-downloaded from the internet or compiled in the `thbook' directory using pdfTeX.
-Installation (compilation) is described in the Appendix of the Therion Book.
+Documentation is (from therion 0.4.0) in the therion-doc package. This includes the 
+Therion Book specification and the wiki pages including 'Therion by Example' and 
+'Therion for Cavers' HOWTO guides. 
 
 Web page: http://therion.speleo.sk
 
diff -ruN therion-old/therion.ini therion/therion.ini
--- therion-old/therion.ini	2007-02-02 07:10:48.000000000 +0000
+++ therion/therion.ini	2008-01-03 02:40:14.000000000 +0000
@@ -22,7 +22,9 @@
 ### Tex initialization ###
 # tex-env off
 # tex-fonts <encoding> <roman> <italic> <bold> <sansserif> <sansserifoblique>
+# latin computer modern fonts (default)
 # tex-fonts raw cmr10 cmti10 cmbx10 cmss10 cmssi10
+# czechoslovak fonts (used in examples - see README.Debian)
 # tex-fonts xl2 csr10 csti10 csbx10 csss10 csssi10
 
 ### Path to temporary directory ###
diff -ruN therion-old/thtexfonts.cxx therion/thtexfonts.cxx
--- therion-old/thtexfonts.cxx	2007-05-25 17:51:30.000000000 +0100
+++ therion/thtexfonts.cxx	2008-01-03 02:40:14.000000000 +0000
@@ -70,13 +70,13 @@
   F.ss = "cmss10";
   F.si = "cmssi10";
   FONTS.push_back(F);
-  F.id = get_enc_id("xl2");
-  F.rm = "csr10";
-  F.it = "csti10";
-  F.bf = "csbx10";
-  F.ss = "csss10";
-  F.si = "csssi10";
-  FONTS.push_back(F);
+//  F.id = get_enc_id("xl2");
+//  F.rm = "csr10";
+//  F.it = "csti10";
+//  F.bf = "csbx10";
+//  F.ss = "csss10";
+//  F.si = "csssi10";
+//  FONTS.push_back(F);
 }
 
 unistr utf2uni(string s) {
