--- ctn-3.0.6.orig/debian/ctnmake.debian.mysql.options
+++ ctn-3.0.6/debian/ctnmake.debian.mysql.options
@@ -0,0 +1,31 @@
+# Global rules for compilation for sunos
+
+X11_INCLUDE = /usr/X11R6/include
+XM_INCLUDE = /usr/include/Xm
+
+LIBPATH_X11 = -L/usr/X11R6/lib
+LIBPATH_MOTIF = -L/usr/lib
+LIBPATH_UCB =
+LIBPATH_DATABASE =-L$(MYSQL_LIB)
+LIBS_X11 = -lXext -lXt -lX11
+LIBS_MOTIF = -lXm
+LIBS_XAW = -lXaw -lXmu -lXt -lXext -lm
+LIBS_OS = -lz
+LIBS_DATABASE = -ltbl_mysql -lmysqlclient -lcrypt
+LIBS_LEX = -lfl
+LIBS_CTN = -lctn $(LIBPATH_DATABASE) -lmysqlclient -lcrypt
+LIBS_CTN_NODB = -lctn
+
+TBL_DB = tbl_mysql.o
+TBLMB_DB = not_supported_with_this_software
+
+CFLAGS_X11 = -I$(X11_INCLUDE)
+CFLAGS_MOTIF = -I$(XM_INCLUDE)
+
+#DEBUG_LIBS = -lmalloc
+C_OPTS = -g -DDEBUG -D$(ARCHITECTURE) -D$(OS) -DSHARED_MEMORY \
+-DSEMAPHORE -DX11 -DATHENA -DX11R4 -DUSLEEP -DMYSQLDB \
+-I$(DICOM_INCLUDE) -I$(MYSQL_INCLUDE) \
+$(CFLAGS_MOTIF) $(CFLAGS_X11) \
+-DLONGSIZE=$(LONGSIZE) -DINTSIZE=$(INTSIZE) -DSHORTSIZE=$(SHORTSIZE) \
+-DTIMEOFDAYARGS=2 -DMOTIF -DUSEREGCOMP
--- ctn-3.0.6.orig/debian/control
+++ ctn-3.0.6/debian/control
@@ -0,0 +1,37 @@
+Source: ctn
+Section: graphics
+Priority: extra
+Maintainer: Debian-Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
+DM-Upload-Allowed: yes
+Uploaders: Andreas Tille <tille@debian.org>
+Build-Depends: debhelper (>= 5), lesstif2-dev, libxaw7-dev, flex, bison,
+ zlib1g-dev, libmysqlclient15-dev, libx11-dev, libxt-dev, x11proto-core-dev,
+ csh | c-shell, quilt
+Standards-Version: 3.8.0
+Vcs-Browser: http://svn.debian.org/wsvn/debian-med/trunk/packages/ctn/trunk/?rev=0&sc=0
+Vcs-Svn: svn://svn.debian.org/svn/debian-med/trunk/packages/ctn/trunk/
+Homepage: http://erl.wustl.edu/research/dicom/ctn.html
+
+Package: ctn
+Section: graphics
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: ctn-doc
+Description: Central Test Node, a DICOM implementation for medical imaging
+ DICOM is the standard for image storage, annotation, and networking.
+ It is used widely for medical imaging. The Central Test Node software (CTN)
+ provides an implementation of this standard.
+ .
+ This package includes the binary and run-time configuration files for CTN.
+
+Package: ctn-dev
+Section: devel
+Architecture: any
+Depends: ctn (= ${binary:Version}), ${misc:Depends}
+Suggests: ctn-doc
+Description: Development files for Central Test Node, a DICOM implementation
+ DICOM is the standard for image storage, annotation, and networking.
+ It is used widely for medical imaging.
+ .
+ This package includes the header files and static library used for
+ creating programs that use the CTN library.
--- ctn-3.0.6.orig/debian/test-endian.c
+++ ctn-3.0.6/debian/test-endian.c
@@ -0,0 +1,21 @@
+#include <stdio.h>
+
+main()
+{
+ unsigned int i = 1 + (256 * 2) + (256*256 * 3) + (256*256*256 * 4);
+ unsigned char* p = (unsigned char*) &i;
+
+ if (*p == 1 && *(p+1) == 2 && *(p+2) == 3 && *(p+3) == 4) {
+ printf("LITTLE_ENDIAN_ARCHITECTURE\n");
+ exit (0);
+ }
+ else if (*p == 4 && *(p+1) == 3 && *(p+2) == 2 && *(p+3) == 1) {
+ printf ("BIG_ENDIAN_ARCHITECTURE\n");
+ exit (0);
+ }
+
+ printf ("UNKNOWN_ENDIAN_ARCHITECTURE\n");
+ exit(1);
+}
+
+
--- ctn-3.0.6.orig/debian/changelog
+++ ctn-3.0.6/debian/changelog
@@ -0,0 +1,233 @@
+ctn (3.0.6-13) unstable; urgency=low
+
+ [ Andreas Tille ]
+ * Group maintenance by Debian-Med Packaging Team
+ * Added myself to uploaders
+ * DM-Upload-Allowed: yes
+ * Fixed Vcs fields
+ * Moved Homepage from long description to separate field
+ (Closes: #466671).
+ * Patch to make the ctn working properly with mysql server > 4.2.
+ Thanks to Pablo Sau <psau@cadpet.es> (Closes: #326916).
+
+ [ Steve M. Robbins ]
+ * Remove self from uploaders.
+
+ [ Thijs Kinkhorst ]
+ * Drop empty prerm/postinst scripts.
+ * Replace obsolete x-dev with x11-proto-core-dev
+ * Use quilt to manage patches, add proper dependencies and
+ targets in debian/rules. All patches are still in one file,
+ which needs to be split out over time.
+ * Checked for policy version 3.8.0, add README.source.
+ * Remove self from uploaders, but upload for one last time ;-)
+
+ -- Thijs Kinkhorst <thijs@debian.org> Fri, 25 Jul 2008 18:03:57 +0200
+
+ctn (3.0.6-12) unstable; urgency=low
+
+ * Do not bail out if libsrc symlinks already exist, since this
+ can cause problems in some build order.
+ * Minor packaging cleanups.
+
+ -- Thijs Kinkhorst <thijs@debian.org> Thu, 26 Jul 2007 14:15:04 +0200
+
+ctn (3.0.6-11) unstable; urgency=low
+
+ [ Charles Plessy ]
+ * Fixed subversion repository declaration in debian/control.
+
+ [ Thijs Kinkhorst ]
+ * Replace deprecated ${Source-Version} with ${binary:Version}.
+
+ -- Thijs Kinkhorst <thijs@debian.org> Mon, 18 Jun 2007 10:36:21 +0200
+
+ctn (3.0.6-10) unstable; urgency=medium
+
+ * Fixing build on 64bit platforms and providing *INT preprocessor
+ definitions for the applications built using ctn-dev.
+ Patch by Yaroslav Halchenko, thanks! (Closes: 387183)
+
+ -- Thijs Kinkhorst <thijs@debian.org> Sat, 27 Jan 2007 19:23:09 +0100
+
+ctn (3.0.6-9) unstable; urgency=low
+
+ * Acknowledge NMU (Closes: #388612), thanks Steinar Gunderson!
+ * Add Subversion repository URL to debian/control.
+ * Add note to README.Debian about LONGSIZE on 64 bit platforms,
+ courtesy Michael Hanke.
+
+ -- Thijs Kinkhorst <thijs@debian.org> Sun, 24 Sep 2006 13:25:00 +0200
+
+ctn (3.0.6-8.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * In the LONG_WORD structure, always use unsigned int since we want a 32-bit
+ variable, and int is 32 bits on all platforms supported by Debian (it used
+ to be unsigned long for all platforms except alpha, which broke on
+ platforms such as ppc64 and amd64). (Closes: #387183)
+ * Build-depend on lesstif2-dev instead of lesstif-dev, since the latter is
+ obsolete.
+
+ -- Steinar H. Gunderson <sesse@debian.org> Thu, 21 Sep 2006 15:40:02 +0200
+
+ctn (3.0.6-8) unstable; urgency=low
+
+ * Add Steve M. Robbins as a co-maintainer.
+ * Clarify description.
+ * Remove unneeded cruft from debian/rules.
+ * Update maintainer address.
+ * Checked for standards-version 3.7.2, no changes necessary.
+
+ -- Thijs Kinkhorst <thijs@debian.org> Wed, 5 Jul 2006 15:11:40 +0200
+
+ctn (3.0.6-7) unstable; urgency=low
+
+ * Update to libmysqlclient15-dev (Closes: #343763).
+
+ * Add README.mysql-versions with some explanation about ctn not working
+ with MySQL 4.1+ yet.
+
+ -- Thijs Kinkhorst <kink@squirrelmail.org> Thu, 29 Dec 2005 16:05:16 +0100
+
+ctn (3.0.6-6) unstable; urgency=low
+
+ * Change build-dependency on xlibs-dev to libx11-dev,
+ libxt-dev, x-dev since xlibs-dev is going away.
+
+ * Upgrade debhelper compatibility to the recommended level 5.
+
+ * Clean debian/rules of commented-out commands.
+
+ -- Thijs Kinkhorst <kink@squirrelmail.org> Tue, 13 Dec 2005 23:32:21 +0100
+
+ctn (3.0.6-5) unstable; urgency=low
+
+ * Fix test-endian.c for 64-bit big endian architectures, thanks
+ Andreas Jochens (Closes: #319514).
+
+ -- Thijs Kinkhorst <kink@squirrelmail.org> Tue, 26 Jul 2005 00:01:41 +0200
+
+ctn (3.0.6-4) unstable; urgency=high
+
+ * Fix incorrect dependencies by using dh_shlibdeps.
+ (RC, high urgency. Closes: #317985)
+ * Add watch file.
+ * Update Standards-Version to 3.6.2, no changes required.
+
+ -- Thijs Kinkhorst <kink@squirrelmail.org> Wed, 13 Jul 2005 19:11:33 +0200
+
+ctn (3.0.6-3) unstable; urgency=low
+
+ * New maintainer, deorphans package. (Closes: #297419)
+
+ -- Thijs Kinkhorst <kink@squirrelmail.org> Mon, 7 Mar 2005 21:52:54 +0100
+
+ctn (3.0.6-2) unstable; urgency=low
+
+ * Orphan as in bug #297419
+ * Update to libmysqlclient14
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Sat, 5 Mar 2005 02:53:17 -0700
+
+ctn (3.0.6-1) unstable; urgency=low
+
+ * New upstream
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Fri, 29 Aug 2003 01:05:50 -0600
+
+ctn (3.0.5-2) unstable; urgency=low
+
+ * Change priority to extra
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Fri, 31 Jan 2003 13:30:53 -0700
+
+ctn (3.0.5-1) unstable; urgency=low
+
+ * New upstream
+ * Compile with gcc-3.2
+ * Update standards-version to 3.5.8.0: move changes compared to upstream
+ from copyright to README.Debian
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Fri, 24 Jan 2003 04:03:12 -0700
+
+ctn (3.0.4-8) unstable; urgency=low
+
+ * Add default manpage.
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Wed, 25 Sep 2002 11:01:54 -0600
+
+ctn (3.0.4-7) unstable; urgency=low
+
+ * Update e-mail address
+ * Update Standards Version
+ * Add man page for dcm_resize
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Sun, 11 Aug 2002 23:53:31 -0600
+
+ctn (3.0.4-6) unstable; urgency=low
+
+ * Fix bug in upstream Makefile
+
+ * Reformat debian/copyright
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Sun, 7 Jul 2002 06:39:09 -0600
+
+ctn (3.0.4-5) unstable; urgency=low
+
+ * Added info to copyright file, README.Debian, and description
+
+ * Added undocumented manpages for remaining CTN binaries so
+ they can be included in the package. Removed notes about
+ only a minority of the binary programs being installed.
+
+ * Put shell scripts in /usr/share/ctn/examples/ directory
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Thu, 27 Jun 2002 00:36:27 -0600
+
+ctn (3.0.4-4) unstable; urgency=low
+
+ * Added zlib1g-dev as a build dependency (closes: 151067)
+
+ * debhelper V4
+
+ * Added bison to build dependencies
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Wed, 26 Jun 2002 15:04:04 -0600
+
+ctn (3.0.4-3) unstable; urgency=low
+
+ * Update copyright file (closes: 150728)
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Mon, 24 Jun 2002 22:23:50 -0600
+
+ctn (3.0.4-2) unstable; urgency=low
+
+ * Moved the "csh | c-shell" dependency to correct line (closes: 150902)
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Mon, 24 Jun 2002 18:13:26 -0600
+
+ctn (3.0.4-1) unstable; urgency=low
+
+ * New upstream version
+
+ * Added ctn-doc as a Suggest: control field for ctn and ctn-dev
+
+ * Rewrite csh scripts to use bash
+
+ * Changed build-dependencies in control file (closes: 149194)
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Thu, 20 Jun 2002 04:40:07 -0600
+
+ctn (3.0.3-1) unstable; urgency=low
+
+ * Patched upstream files for Debian: removed runtime dependencies on
+ environment variable CTN_TARGET. Use default default, standard Debian
+ directory if CTN_TARGET is not specified at run-time.
+
+ * Started writing manual pages for the CTN binaries.
+
+ * Initial upload. (closes: #145878)
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Sun, 5 May 2002 06:07:24 -0600
+
--- ctn-3.0.6.orig/debian/README.source
+++ ctn-3.0.6/debian/README.source
@@ -0,0 +1,5 @@
+This packages uses the quilt patch system. Please read
+/usr/share/doc/quilt/README.source for more information.
+
+Currently all patches are still in one large file, these
+should be split out over time.
--- ctn-3.0.6.orig/debian/rules
+++ ctn-3.0.6/debian/rules
@@ -0,0 +1,96 @@
+#!/usr/bin/make -f
+
+include /usr/share/quilt/quilt.make
+
+build := debian/build-tmp
+pkg-ctn := debian/ctn
+pkg-ctn-dev := debian/ctn-dev
+
+INSTALL := install
+INSTALLFLAGS := -g root -o root -m 0644
+INSTALLEXECFLAGS:= -g root -o root
+INSTALLDIRFLAGS := -d -g root -o root -m 0755
+
+DOCDIR := $(pkg-ctn)/usr/share/doc/ctn
+
+
+
+build: patch build-stamp
+
+# we must provide *SIZE inside dicom.h or otherwise applications which
+# would use ctn might be doomed to get improper U32 types etc
+# that file will be included in dicom.h - hard patched
+debian/intsizes.h: debian/test-sizes
+ sh debian/intsizes_h.sh
+
+build-stamp: debian/test-sizes debian/intsizes.h
+ dh_testdir
+ debian/test-sizes >| debian/ctnmake.debian.mysql.options.full
+ cat debian/ctnmake.debian.mysql.options >> debian/ctnmake.debian.mysql.options.full
+ mv debian/intsizes.h facilities/dicom/
+
+ # Add here commands to compile the package.
+ (. debian/debian.mysql.options.env; make install)
+ touch build-stamp
+
+clean: unpatch
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+
+ # Add here commands to clean up after the build process.
+ [ ! -f Makefile ] || $(MAKE) clean
+ rm -f debian/ctn*.postinst.* debian/ctn*.prerm.* debian/intsizes.h
+ rm -f debian/ctnmake.debian.mysql.options.full debian/test-sizes
+ rm -f facilities/dicom/intsizes.h
+ rm -rf ${build}
+ rm -f libsrc/*.c libsrc/*.h
+ rm -f `find . -name \*.o -or -name \*.a`
+ rm -f include/*
+ rmdir lib/ctn-mysql || true
+ dh_clean
+
+scripts := $(build)/bin/add-accession-numbers $(build)/bin/create_common $(build)/bin/create_icons $(build)/bin/create_icons.94 $(build)/bin/createdirectory $(build)/bin/fillImageDBScript $(build)/bin/his_layout $(build)/bin/icon_script $(build)/bin/img_layout $(build)/bin/pacs_layout $(build)/bin/print_layout $(build)/bin/start_clients $(build)/bin/start_clients $(build)/bin/start_img_server $(build)/bin/start_his_client $(build)/bin/start_img_displays $(build)/bin/start_pacs_client $(build)/bin/stop_img_displays $(build)/bin/start_his_server $(build)/bin/start_pacs_server $(build)/bin/start_print_client $(build)/bin/start_img_client
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # install ctn-dev
+ $(INSTALL) $(INSTALLFLAGS) include/* $(pkg-ctn-dev)/usr/include/ctn
+ $(INSTALL) $(INSTALLFLAGS) lib/*/* $(pkg-ctn-dev)/usr/lib/ctn
+
+ # install ctn
+ $(INSTALL) $(INSTALLEXECFLAGS) $(filter-out $(scripts),$(wildcard $(build)/bin/*)) $(pkg-ctn)/usr/bin
+ $(INSTALL) $(INSTALLFLAGS) runtime/ctn_cfg.txt runtime/fontmap runtime/queuemap $(pkg-ctn)/etc/ctn/runtime
+ $(INSTALL) $(INSTALLFLAGS) cfg_scripts/mysql/* $(pkg-ctn)/usr/share/ctn/mysql
+ chmod +x `echo $(pkg-ctn)/usr/share/ctn/mysql/*`
+ chmod -x `echo $(pkg-ctn)/usr/share/ctn/mysql/*.script`
+
+# Build architecture-independent files here.
+binary-indep: build install
+
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installdocs --all
+ dh_installexamples -p ctn $(scripts)
+ dh_installman -p ctn debian/man/*
+ dh_installchangelogs
+ dh_link
+ dh_strip -A
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps -A
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: clean binary-indep binary-arch binary install
+
--- ctn-3.0.6.orig/debian/docs
+++ ctn-3.0.6/debian/docs
@@ -0,0 +1 @@
+README
--- ctn-3.0.6.orig/debian/intsizes_h.sh
+++ ctn-3.0.6/debian/intsizes_h.sh
@@ -0,0 +1,56 @@
+#!/bin/bash
+#-------------------------- =+- Shell script -+= --------------------------
+#
+# @file intsizes_h.sh
+# @date Fri Jan 26 15:18:19 2007
+# @brief
+#
+#
+# Yaroslav Halchenko CS@UNM, CS@NJIT
+# web: http://www.onerussian.com & PSYCH@RUTGERS
+# e-mail: yoh@onerussian.com ICQ#: 60653192
+#
+# DESCRIPTION (NOTES):
+#
+# COPYRIGHT: Yaroslav Halchenko 2007
+#
+# 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 system see /usr/share/common-licenses/GPL for the full license.
+#
+#-----------------\____________________________________/------------------
+export `debian/test-sizes`
+
+cat > debian/intsizes.h <<EOF
+#ifndef INTSIZES_IS_IN
+#define INTSIZES_IS_IN 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+# define INTSIZE $INTSIZE
+# define LONGSIZE $LONGSIZE
+# define SHORTSIZE $SHORTSIZE
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+EOF
--- ctn-3.0.6.orig/debian/watch
+++ ctn-3.0.6/debian/watch
@@ -0,0 +1,2 @@
+version=2
+ftp://ftp.erl.wustl.edu/pub/dicom/software/ctn/ctn-(.*)\.zip
--- ctn-3.0.6.orig/debian/README.Debian
+++ ctn-3.0.6/debian/README.Debian
@@ -0,0 +1,31 @@
+The Debian Package CTN
+--------------------------
+
+This is the CTN (Central Test Node) system packaged for Debian
+by Kevin M. Rosenberg <kmr@debian.org>, May 2002.
+Current maintainer is Debian-Med: http://www.debian.org/devel/debian-med/.
+
+CTN is an implementation of the DICOM standard.
+
+The home page for CTN is http://erl.wustl.edu/research/dicom/ctn.html
+
+There is extensive documentation for using CTN in the Debian package
+ctn-doc.
+
+Changes made to the Debian package compared to the upstream
+package are:
+
+ 1. Source code changes to set the configuration directory to
+ /etc/ctn rather than rely on an runtime environmental variable.
+ Various tweaks to make it build in a Debian environment.
+
+ 2. Rewrite SQL helper scripts to use bash shell rather than csh
+
+ 3. CTN can be compiled to support a single SQL server.
+ The Debian package supports only the MySQL database. The upstream
+ version allows a choice of other SQL servers that could be used.
+
+ 4. Support for MySQL server versions greater than 4.1.
+
+ 5. Added man pages.
+
--- ctn-3.0.6.orig/debian/links
+++ ctn-3.0.6/debian/links
@@ -0,0 +1,89 @@
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/add-accession-numbers.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/archive_agent.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/archive_cleaner.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/archive_server.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/clone_study.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/commit_agent.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/create_common.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/create_greyscale_module.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/create_icons.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/create_icons.94.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/create_print_entry.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/createdirectory.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/ctn_version.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/ctndisp.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/ctnnetwork.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/dcm_dump_compressed.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/dcm_mask_image.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/dcm_modify_elements.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/dcm_modify_object.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/dcm_print_dictionary.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/dcm_rm_group.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/dcm_snoop.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/dcm_template.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/dcm_to_html.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/dcm_to_text.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/dcm_vr_patterns.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/dcm_x_disp.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/dicom_echo.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/dump_commit_requests.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/enq_ctndisp.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/enq_ctnnetwork.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/ex1_initiator.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/ex2_initiator.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/ex3_acceptor.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/ex3_initiator.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/ex4_acceptor.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/ex4_initiator.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/fillImageDB.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/fillImageDBScript.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/fillRSA.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/fillRSAImpInterp.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/fis_server.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/gqinitq.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/gqkillq.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/his_layout.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/icon_append_file.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/icon_append_index.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/icon_dump_file.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/icon_dump_index.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/icon_script.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/image_server.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/img_layout.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/kill_ctndisp.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/kill_ctnnetwork.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/load_control.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/mwlQuery.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/pacs_layout.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/pq_ctndisp.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/pq_ctnnetwork.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/print_client.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/print_layout.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/print_mgr.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/print_server.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/print_server_display.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/ris_gateway.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/send_image.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/send_results.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/send_study.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/simple_pacs.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/simple_storage.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/snp_to_files.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/start_clients.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/start_his_client.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/start_his_server.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/start_img_client.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/start_img_displays.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/start_img_server.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/start_pacs_client.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/start_pacs_server.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/start_print_client.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/stop_img_displays.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/storage_classes.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/storage_commit.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/ttdelete.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/ttinsert.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/ttlayout.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/ttselect.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/ttunique.1
+usr/share/man/man1/ctn_manpage.1 /usr/share/man/man1/ttupdate.1
--- ctn-3.0.6.orig/debian/ctn.dirs
+++ ctn-3.0.6/debian/ctn.dirs
@@ -0,0 +1,9 @@
+usr/bin
+etc
+etc/ctn
+etc/ctn/runtime
+usr/share
+usr/share/doc
+usr/share/doc/ctn
+usr/share/ctn
+usr/share/ctn/mysql
--- ctn-3.0.6.orig/debian/test-sizes.c
+++ ctn-3.0.6/debian/test-sizes.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+int main(){
+ printf("LONGSIZE=%d\n", 8*sizeof(long int));
+ printf("INTSIZE=%d\n", 8*sizeof(int));
+ printf("SHORTSIZE=%d\n", 8*sizeof(short));
+return 0;
+}
--- ctn-3.0.6.orig/debian/copyright
+++ ctn-3.0.6/debian/copyright
@@ -0,0 +1,42 @@
+Debian Copyright File
+=====================
+
+Upstream source URL:
+ ftp://ftp.erl.wustl.edu/pub/dicom/software/ctn/
+Upstream home page URL: http://www.erl.wustl.edu/DICOM/ctn.html.
+Upstream authors: Multiple at Mallinckrodt Institute of Radiology.
+Debian Maintainer: Debian-Med team <debian-med@lists.debian.org>
+ http://www.debian.org/devel/debian-med/
+
+Original CTN Copyright Statement
+================================
+
+ Copyright (C) 1993, 1994, RSNA and Washington University
+
+ The software and supporting documentation for the Radiological
+ Society of North America (RSNA) 1993, 1994 Digital Imaging and
+ Communications in Medicine (DICOM) Demonstration were developed
+ at the
+ Electronic Radiology Laboratory
+ Mallinckrodt Institute of Radiology
+ Washington University School of Medicine
+ 510 S. Kingshighway Blvd.
+ St. Louis, MO 63110
+ as part of the 1993, 1994 DICOM Central Test Node project for, and
+ under contract with, the Radiological Society of North America.
+
+ THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND NEITHER RSNA NOR
+ WASHINGTON UNIVERSITY MAKE ANY WARRANTY ABOUT THE SOFTWARE, ITS
+ PERFORMANCE, ITS MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
+ USE, FREEDOM FROM ANY COMPUTER DISEASES OR ITS CONFORMITY TO ANY
+ SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND PERFORMANCE OF
+ THE SOFTWARE IS WITH THE USER.
+
+ Copyright of the software and supporting documentation is
+ jointly owned by RSNA and Washington University, and free access
+ is hereby granted as a license to use this software, copy this
+ software and prepare derivative works based upon this software.
+ However, any distribution of this software source code or
+ supporting documentation or derivative works (source code and
+ supporting documentation) must include the three paragraphs of
+ the copyright notice.
--- ctn-3.0.6.orig/debian/compat
+++ ctn-3.0.6/debian/compat
@@ -0,0 +1 @@
+5
--- ctn-3.0.6.orig/debian/debian.mysql.options.env
+++ ctn-3.0.6/debian/debian.mysql.options.env
@@ -0,0 +1,34 @@
+export CWD=`pwd`
+mkdir -p $CWD/debian/build-tmp
+export CTN_TARGET=$CWD/debian/build-tmp
+export DICOM_ROOT=$CWD
+export DICOM_BIN=$CTN_TARGET/bin
+export DICOM_LIB=$DICOM_ROOT/lib/ctn-mysql
+export DICOM_LIBSRC=$DICOM_ROOT/libsrc
+export DICOM_INCLUDE=$DICOM_ROOT/include
+export DICOM_MAKE=$DICOM_ROOT/debian/ctnmake.debian.mysql.options.full
+
+export MYSQL_LIB=/usr/lib
+export MYSQL_INCLUDE=/usr/include/mysql
+
+gcc debian/test-endian.c -o debian/test-endian
+export TEST_ENDIAN=`./debian/test-endian`
+rm debian/test-endian
+echo "TEST_ENDIAN: $TEST_ENDIAN"
+#export ARCHITECTURE=LITTLE_ENDIAN_ARCHITECTURE
+export ARCHITECTURE=$TEST_ENDIAN
+
+export OS=LINUX
+export CC=gcc
+export XCC=gcc
+export DBLINK=gcc
+export INSTALL=install
+export INSTALLUID="install -m 4775"
+export INSTALLINCLUDE="install -c -m 444 "
+export CI="echo Use ci on a sun"
+export CO="echo Use co on a sun"
+export INDENT="Use indent on a sun"
+export LINTOPTIONS=$DICOM_ROOT/lint/minimal.lnt
+export RANLIB=ranlib
+export LEX=flex
+
--- ctn-3.0.6.orig/debian/ctn-dev.dirs
+++ ctn-3.0.6/debian/ctn-dev.dirs
@@ -0,0 +1,5 @@
+usr
+usr/lib
+usr/lib/ctn
+usr/include
+usr/include/ctn
--- ctn-3.0.6.orig/debian/man/dcm_create_object.1
+++ ctn-3.0.6/debian/man/dcm_create_object.1
@@ -0,0 +1,27 @@
+.\" -*- NROFF -*-
+.TH "dcm_create_object" "1"
+.SH "NAME"
+dcm_create_object \- Create a object in a DICOM File
+
+.SH "SYNOPSIS"
+.B dcm_create_object [-i inputfile] [-p pixels] [-v] fileout
+
+.SH "DESCRIPTION "
+\fIdcm_create_object\fP makes creates DICOM file from raw pixel data and an input source.
+
+.SH "OPTIONS"
+\fIdcm_create_object\fP accepts the following options:
+.TP 16
+.B \-i
+Take input from this file rather than stdin
+.TP 16
+.B \-p pixels
+Read raw pixel data from this file and add as 7FE0 0010
+.TP 16
+.B \-v
+Place DCM facility in verbose mode
+.TP 16
+.B fileout
+Name of the output file
+
+
--- ctn-3.0.6.orig/debian/man/dcm_diff.1
+++ ctn-3.0.6/debian/man/dcm_diff.1
@@ -0,0 +1,41 @@
+.\" -*- NROFF -*-
+.TH "dcm_diff" "1"
+.SH "NAME"
+dcm_diff \- Compare the attributes in two DICOM files.
+
+.SH "SYNOPSIS"
+.B dcm_diff [-b] [-t] [-v] [-g] [-o] [-z] file1 file2
+
+.SH "DESCRIPTION "
+\fIdcm_diff\fP reads the user designated files and compares attribute values.
+Differencs are printed to the standard output.
+
+.SH "OPTIONS"
+\fIdcm_diff\fP accepts the following options:
+.TP 16
+.B \-b
+Input files are stored in big-endian byte order
+.TP 16
+.B \-g
+Remove group length elements
+.TP 16
+.B \-l
+Use (retired) length-to-end attribute for object length
+.TP 16
+.B \-o
+Place output in verbose mode
+.TP 16
+.B \-t
+Read file assuming DICOM Part 10 format
+.TP 16
+.B \-v
+Place DCM facility in verbose mode
+.TP 16
+.B \-z
+Perform format conversion (verificatioon) on data in files
+.TP 16
+.B file1 file2
+Comparison files
+
+
+
--- ctn-3.0.6.orig/debian/man/dcm_rm_element.1
+++ ctn-3.0.6/debian/man/dcm_rm_element.1
@@ -0,0 +1,31 @@
+.\" -*- NROFF -*-
+.TH "dcm_rm_element" "1"
+.SH "NAME"
+dcm_rm_element \- Remove an element from a DICOM file
+
+.SH "SYNOPSIS"
+.B dcm_rm_element [-b] [-t] [-v] group element filein fileout
+
+.SH "DESCRIPTION "
+\fIdcm_rm_element\fP removes and element from DICOM file while writing into an output file.
+
+.SH "OPTIONS"
+\fIdcm_rm_element\fP accepts the following options:
+.TP 16
+.B \-b
+Input files are stored in big-endian byte order
+.TP 16
+.B \-t
+Read file assuming DICOM Part 10 format
+.TP 16
+.B \-v
+Place DCM facility in verbose mode
+.TP 16
+.B group element
+The tag of the element to be removed
+.TP 16
+.B filein fileout
+Input and output files
+
+
+
--- ctn-3.0.6.orig/debian/man/dcm_ctnto10.1
+++ ctn-3.0.6/debian/man/dcm_ctnto10.1
@@ -0,0 +1,28 @@
+.\" -*- NROFF -*-
+.TH "dcm_ctnto10" "1"
+.SH "NAME"
+dcm_ctnto10 \- Convert a CTN DICOM file to Part 10 conforming format.
+
+.SH "SYNOPSIS"
+.B dcm_ctnto10 [-bBL] [-v] filein fileout
+
+.SH "DESCRIPTION "
+\fIdcm_ctnto10\fP converts a DICOM file to Part 10 format
+
+.SH "OPTIONS"
+\fIdcm_ctnto10\fP accepts the following options:
+.TP 16
+.B \-b
+Big endian output (non standard)
+.TP 16
+.B \-B
+Big endian explicit transfer syntax
+.TP 16
+.B \-L
+Little endian explicit transfer syntax
+.TP 16
+.B filein fileout
+Input and output files
+
+
+
--- ctn-3.0.6.orig/debian/man/dcm_add_fragments.1
+++ ctn-3.0.6/debian/man/dcm_add_fragments.1
@@ -0,0 +1,34 @@
+.\" -*- NROFF -*-
+.TH "dcm_add_fragments" "1"
+.SH "NAME"
+dcm_add_fragments \- Dump element from DICOM file to another
+
+.SH "SYNOPSIS"
+.B dcm_add_fragments [-t] [-x xfer] filein fileout f1 [f2...]
+
+.SH "DESCRIPTION "
+\fIdcm_add_fragments\fP adds elements from one DICOM file into another
+
+.SH "OPTIONS"
+\fIdcm_add_fragments\fP accepts the following options:
+.TP 16
+.B \-t
+Read file assuming DICOM Part 10 format
+.TP 16
+.B \-x
+Specify transfer syntax for output
+.TP 16
+.B filein
+Input file
+.TP 16
+.B fileout
+Output file
+.TP 16
+.B f1
+First fragment to add
+.TP 16
+.B f2
+Zero or more fragments to add
+
+
+
--- ctn-3.0.6.orig/debian/man/dcm_dump_file.1
+++ ctn-3.0.6/debian/man/dcm_dump_file.1
@@ -0,0 +1,43 @@
+.\" -*- NROFF -*-
+.TH "dcm_dump_file" "1"
+.SH "NAME"
+dcm_dump_file \- Dump the contents of a DICOM File
+
+.SH "SYNOPSIS"
+.B dcm_dump_file [-b] [-g] [-l] [-m mult] [-t] [-v] [-w flag] [-z] file [file ...]
+
+.SH "DESCRIPTION "
+\fIdcm_dump_file\fP dumps the contents of a DICOM V3 file to
+standard output in human readable form.
+
+.SH "OPTIONS"
+\fIdcm_dump_file\fP accepts the following options:
+.TP 16
+.B \-b
+Input files are stored in big-endian byte order
+.TP 16
+.B \-e
+Exit on file open error. Do not process other files
+.TP 16
+.B \-g
+Remove group length elements
+.TP 16
+.B \-m mult
+Change VM limit from 0 to mult
+.TP 16
+.B \-v
+Place DCM facility in verbose mode
+.TP 16
+.B \-t
+Part 10 file
+.TP 16
+.B \-w
+Set open options; flag can be REPEAT
+.TP 16
+.B \-z
+Perform format conversion (verification) on data in files
+.TP 16
+.B file
+One or more information objects to be dumped
+
+
--- ctn-3.0.6.orig/debian/man/dcm_make_object.1
+++ ctn-3.0.6/debian/man/dcm_make_object.1
@@ -0,0 +1,25 @@
+.\" -*- NROFF -*-
+.TH "dcm_make_object" "1"
+.SH "NAME"
+dcm_make_object \- Make a DICOM information object from an ASCII description.
+
+.SH "SYNOPSIS"
+.B dcm_make_object [-p pixels] [-v] fileout
+
+.SH "DESCRIPTION "
+\fIdcm_make_object\fP creates a DICOM information object and stores it
+in a file. It reads a description of the data elements int the object
+from stdin and adds them to the information object.
+
+.SH "OPTIONS"
+\fIdcm_make_object\fP accepts the following options:
+.TP 16
+.B \-p pixels
+Read raw pixel data from this file and add as 7FE0 0010
+.TP 16
+.B \-v
+Place DCM facility in verbose mode
+.B fileout
+Stores the DICOM object
+
+
--- ctn-3.0.6.orig/debian/man/dcm_dump_element.1
+++ ctn-3.0.6/debian/man/dcm_dump_element.1
@@ -0,0 +1,33 @@
+.\" -*- NROFF -*-
+.TH "dcm_dump_element" "1"
+.SH "NAME"
+dcm_dump_element \- Dump element from a DICOM file into to another
+
+.SH "SYNOPSIS"
+.B dcm_dump_element [-b] [-t] [-v] group element filein fileout
+
+.SH "DESCRIPTION "
+\fIdcm_dump_element\fP dumps element from DICOM file into another
+
+.SH "OPTIONS"
+\fIdcm_dump_element\fP accepts the following options:
+.TP 16
+.B \-b
+Input files are stored in big-endian byte order
+.TP 16
+.B \-t
+Read file assuming DICOM Part 10 format
+.TP 16
+.B \-v
+Place DCM facility in verbose mode
+.TP 16
+.B group element
+The tag of the element to be dumped
+.TP 16
+.B filein fileout
+Input and output files
+
+.SH NOTES
+This is the method used to extract pixel data from images.
+
+
--- ctn-3.0.6.orig/debian/man/dcm_map_to_8.1
+++ ctn-3.0.6/debian/man/dcm_map_to_8.1
@@ -0,0 +1,32 @@
+.\" -*- NROFF -*-
+.TH "dcm_map_to_8" "1"
+.SH "NAME"
+dcm_map_to_8 \- map original pixel data (10, 12 bit) to 8 bit
+
+.SH "SYNOPSIS"
+.B dcm_map_to_8 [-b] [-v] [-W width] [-C center] input output
+
+.SH "DESCRIPTION "
+\fIdcm_map_to_8\fP reads one DICOM image (monochrome) and maps the pixel
+data to 8 bits. It does this by applying window width, window center, rescale
+slope, and rescale intercept values found in the information object.
+The user can override the window width and center values by supplying
+different values as command line arguments.
+
+.SH "OPTIONS"
+\fIdcm_map_to_8\fP accepts the following options:
+.TP 16
+.B \-b
+Read input file assuming the data is stored in big-endian byte order
+.TP 16
+.B \-v
+Place DCM facility in verbose mode
+.TP 16
+.B -W width
+Override window width with this value
+.TP 16
+.B -C center
+Override window center with this value
+.TP 16
+.B input output
+Input and output files
--- ctn-3.0.6.orig/debian/man/ctn_manpage.1
+++ ctn-3.0.6/debian/man/ctn_manpage.1
@@ -0,0 +1,11 @@
+.\" -*- NROFF -*-
+.TH "ctn_manpage" "1"
+.SH "NAME"
+ctn_manpage \- Generic CTN manual page
+
+.SH "DESCRIPTION "
+This is a generic manual package for a CTN program. All CTN programs will
+give their brief usage synopsis when invoked with a "\-h" command-line parameter.
+
+
+
--- ctn-3.0.6.orig/debian/man/dcm_verify.1
+++ ctn-3.0.6/debian/man/dcm_verify.1
@@ -0,0 +1,28 @@
+.\" -*- NROFF -*-
+.TH "dcm_verify" "1"
+.SH "NAME"
+dcm_verify \- Verify DICOM File
+
+.SH "SYNOPSIS"
+.B dcm_verify [-b] [-t] [-v] file
+
+.SH "DESCRIPTION "
+\fIdcm_verify\fP verifies the contents of a DICOM file
+
+.SH "OPTIONS"
+\fIdcm_verify\fP accepts the following options:
+.TP 16
+.B \-b
+Input files are stored in big-endian byte order
+.TP 16
+.B \-t
+Read file with Part 10 format
+.TP 16
+.B \-v
+Place DCM facility in verbose mode
+.TP 16
+.B file
+The name of the file to be verified
+
+
+
--- ctn-3.0.6.orig/debian/man/dcm_resize.1
+++ ctn-3.0.6/debian/man/dcm_resize.1
@@ -0,0 +1,32 @@
+.\" -*- NROFF -*-
+.TH "dcm_resize" "1"
+.SH "NAME"
+dcm_resize \- Resize a DICOM image
+
+.SH "SYNOPSIS"
+.B dcm_resize [-b] [-c cols] [-r rows] [-t] [-v] input output
+
+.SH "DESCRIPTION "
+\fIdcm_resize\fP resizes the number of rows and/or columns in a DICOM image.
+Differencs are printed to the standard output.
+
+.SH "OPTIONS"
+\fIdcm_resize\fP accepts the following options:
+.TP 16
+.B \-b
+Input files are stored in big-endian byte order
+.TP 16
+.B \-c
+New number of columns in image
+.TP 16
+.B \-r
+New number of rows in image
+.TP 16
+.B \-t
+Read file assuming DICOM Part 10 format
+.TP 16
+.B \-v
+Place DCM facility in verbose mode
+.TP 16
+.B input output
+Input and output files
--- ctn-3.0.6.orig/debian/patches/10_all_patches.patch
+++ ctn-3.0.6/debian/patches/10_all_patches.patch
@@ -0,0 +1,217 @@
+Misc patches inherited from the monolithic .diff.gz. This includes:
+- changes to the bison parser;
+- detection of intsizes by Steinar Gundersson
+- various changes to make it build or work with Debian
+could be split out into separate patches.
+
+--- ctn-3.0.6.orig/apps/dcm_modify_object/gram.h
++++ ctn-3.0.6/apps/dcm_modify_object/gram.h
+@@ -1,22 +1,73 @@
+-#ifndef BISON_Y_TAB_H
+-# define BISON_Y_TAB_H
++/* A Bison parser, made by GNU Bison 2.3. */
+
+-#ifndef YYSTYPE
+-typedef union{
++/* Skeleton interface for Bison's Yacc-like parsers in C
++
++ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
++ Free Software Foundation, Inc.
++
++ 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, 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. */
++
++/* As a special exception, you may create a larger work that contains
++ part or all of the Bison parser skeleton and distribute that work
++ under terms of your choice, so long as that work isn't itself a
++ parser generator using the skeleton or a modified version thereof
++ as a parser skeleton. Alternatively, if you modify or redistribute
++ the parser skeleton itself, you may (at your option) remove this
++ special exception, which will cause the skeleton and the resulting
++ Bison output files to be licensed under the GNU General Public
++ License without this special exception.
++
++ This special exception was added by the Free Software Foundation in
++ version 2.2 of Bison. */
++
++/* Tokens. */
++#ifndef YYTOKENTYPE
++# define YYTOKENTYPE
++ /* Put the tokens into the symbol table, so that GDB and other debuggers
++ know about them. */
++ enum yytokentype {
++ NUMBER = 258,
++ VALUE = 259
++ };
++#endif
++/* Tokens. */
++#define NUMBER 258
++#define VALUE 259
++
++
++
++
++#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
++typedef union YYSTYPE
++#line 25 "gram.y"
++{
+ unsigned long num;
+ char str[DICOM_LO_LENGTH+1];
+ char *s;
+ DCM_ELEMENT *e;
+ LST_HEAD *l;
+ void *v;
+-} yystype;
+-# define YYSTYPE yystype
++}
++/* Line 1489 of yacc.c. */
++#line 66 "y.tab.h"
++ YYSTYPE;
++# define yystype YYSTYPE /* obsolescent; will be withdrawn */
++# define YYSTYPE_IS_DECLARED 1
+ # define YYSTYPE_IS_TRIVIAL 1
+ #endif
+-# define NUMBER 257
+-# define VALUE 258
+-
+
+ extern YYSTYPE yylval;
+
+-#endif /* not BISON_Y_TAB_H */
+--- ctn-3.0.6.orig/facilities/objects/dcmprivate.h
++++ ctn-3.0.6/facilities/objects/dcmprivate.h
+@@ -117,11 +117,7 @@
+ } SHORT_WORD;
+
+ typedef union {
+-#ifdef __alpha
+ unsigned int l;
+-#else
+- unsigned long l;
+-#endif
+ unsigned char u[4];
+ } LONG_WORD;
+
+--- ctn-3.0.6.orig/facilities/utility/utility.c
++++ ctn-3.0.6/facilities/utility/utility.c
+@@ -912,7 +912,9 @@
+ if (configFile == 0 || configFile[0] == '\0') {
+ char* p = getenv("CTN_TARGET");
+ if (p == NULL) {
+- return UTL_NO_CTN_TARGET;
++ /* Debian patch: Can not make operation dependent on Env var */
++ /* return UTL_NO_CTN_TARGET; */
++ p = "/etc/ctn";
+ }
+ UTL_configFile = (char*) malloc(strlen(p) + strlen("/runtime/ctn_cfg.txt") + 1);
+ strcpy(UTL_configFile, p);
+--- ctn-3.0.6.orig/facilities/xutl/xutl.c
++++ ctn-3.0.6/facilities/xutl/xutl.c
+@@ -31,7 +31,9 @@
+
+ c = getenv("CTN_TARGET");
+ if (c == NULL)
+- c = "/opt/ctn";
++ /* Debian patch: conform to debian directory policy */
++ /* c = "/opt/ctn"; */
++ c = "/etc/ctn";
+
+ sprintf(s->runtime, "%s/runtime/fontmap", c);
+ }
+--- ctn-3.0.6.orig/facilities/dicom/dicom.h
++++ ctn-3.0.6/facilities/dicom/dicom.h
+@@ -57,6 +57,8 @@
+
+ #ifdef _MSC_VER
+ #include "dicom_platform.h"
++#else
++#include "intsizes.h"
+ #endif
+
+ #ifdef __cplusplus
+@@ -85,14 +87,13 @@
+ typedef unsigned short U16; /* unsigned, 16 bit */
+ typedef short S16; /* signed, 16 bit */
+
+-#if LONGSIZE == 64 && INTSIZE == 32 /* Such as an Alpha */
++#if LONGSIZE == 64 && INTSIZE == 32 /* Such as an Alpha */
+ typedef unsigned int U32;
+ typedef int S32;
+
+ #elif LONGSIZE == 32 /* Most 32 bit workstations */
+ typedef unsigned long U32;
+ typedef long S32;
+-
+ #else /* Something we do not support */
+
+ /* The writers of this code assume that we can find a 32 bit integer
+--- ctn-3.0.6.orig/facilities/dicom/Makefile
++++ ctn-3.0.6/facilities/dicom/Makefile
+@@ -8,6 +8,7 @@
+ install:
+ $(INSTALLINCLUDE) ctn_os.h $(DICOM_INCLUDE)
+ $(INSTALLINCLUDE) dicom.h $(DICOM_INCLUDE)
++ $(INSTALLINCLUDE) intsizes.h $(DICOM_INCLUDE)
+ $(INSTALLINCLUDE) dicom_platform.h $(DICOM_INCLUDE)
+
+ export:
+@@ -19,9 +20,10 @@
+ $(INSTALLINCLUDE) dicom_platform.h $(DICOM_INCLUDE)
+ links:
+ rm -f $(DICOM_LIBSRC)/dicom.h $(DICOM_LIBSRC)/dicom_platform.h $(DICOM_LIBSRC)/ctn_os.h
+- ln -s ../facilities/dicom/ctn_os.h $(DICOM_LIBSRC)
+- ln -s ../facilities/dicom/dicom.h $(DICOM_LIBSRC)
+- ln -s ../facilities/dicom/dicom_platform.h $(DICOM_LIBSRC)
++ ln -sf ../facilities/dicom/ctn_os.h $(DICOM_LIBSRC)
++ ln -sf ../facilities/dicom/dicom.h $(DICOM_LIBSRC)
++ ln -sf ../facilities/dicom/intsizes.h $(DICOM_LIBSRC)
++ ln -sf ../facilities/dicom/dicom_platform.h $(DICOM_LIBSRC)
+
+ clean:
+ rm -f *.a *.o *.BAK *% core
+--- ctn-3.0.6/libsrc/Makefile 2002-04-17 19:22:22.000000000 +0200
++++ ctn-3.0.6/libsrc/Makefile 2008-07-25 17:10:01.000000000 +0200
+@@ -25,7 +25,7 @@
+ OBJS = $(BASE_OBJS) $(TBL_DB) tblcond.o idb.o idbcond.o
+ OBJS_MBCTN = $(BASE_OBJS) dicom_chr.o $(TBLMB_DB) tblmbcond.o idbmb.o idbmbcond.o xutl_mb.o
+
+-BASE_HEADER_FILES = cfg.h condition.h ctn_os.h ctnthread.h dbquery.h decode.h dicom.h \
++BASE_HEADER_FILES = cfg.h condition.h ctn_os.h ctnthread.h dbquery.h decode.h dicom.h intsizes.h \
+ dicom_ddr.h dicom_ie.h dicom_irs.h dicom_messages.h \
+ dicom_objects.h dicom_platform.h dicom_print.h dicom_services.h \
+ dicom_sq.h dicom_uids.h dulfsm.h dulprotocol.h dulsnoop.h \
+@@ -34,8 +34,9 @@
+ tbl_msql.h tbl_psql.h tbl_sqlserver.h tbl_sybase.h tbl_ufs.h \
+ utility.h xutl.h
+
+-HEADER_FILES = $(BASE_HEADER_FILES) tbl.h tbl_msql.h tbl_psql.h tbl_sqlserver.h\
+-tbl_sybase.h tbl_ufs.h
++HEADER_FILES = $(BASE_HEADER_FILES)
++# KMR -- removed these files since BASE_HEADER_FILES has them in their
++# tbl.h tbl_msql.h tbl_psql.h tbl_sqlserver.h tbl_sybase.h tbl_ufs.h
+
+ HEADER_FILES_MBCTN = $(BASE_HEADER_FILES) dicom_chr.h idbmb.h tblmb.h tblmb_psql.h
+
+--- ctn-3.0.6/libsrc/Makefile.psql 2002-04-17 19:22:22.000000000 +0200
++++ ctn-3.0.6/libsrc/Makefile.psql 2008-07-25 17:10:01.000000000 +0200
+@@ -24,7 +24,7 @@
+ OBJS = $(BASE_OBJS) tbl_psql.o tblcond.o idb.o idbcond.o
+ OBJS_MBCTN = $(BASE_OBJS) dicom_chr.o tblmb_psql.o tblmbcond.o idbmb.o idbmbcond.o xutl_mb.o
+
+-BASE_HEADER_FILES = cfg.h condition.h ctn_os.h ctnthread.h dbquery.h decode.h dicom.h \
++BASE_HEADER_FILES = cfg.h condition.h ctn_os.h ctnthread.h dbquery.h decode.h dicom.h intsizes.h \
+ dicom_ddr.h dicom_ie.h dicom_irs.h dicom_messages.h \
+ dicom_objects.h dicom_platform.h dicom_print.h dicom_services.h \
+ dicom_sq.h dicom_uids.h dulfsm.h dulprotocol.h dulsnoop.h \
--- ctn-3.0.6.orig/debian/patches/20_mysql_4.2.patch
+++ ctn-3.0.6/debian/patches/20_mysql_4.2.patch
@@ -0,0 +1,94 @@
+# This patch was provided by Pablo Sau <psau@cadpet.es>
+# on Wed, 28 May 2008 19:38:32 +0200
+# to make the ctn working properly with the mysql server > 4.2.
+# Thanks to Pablo ...
+
+--- ctn-3.0.6.orig/cfg_scripts/mysql/CreateDIMTables.script
++++ ctn-3.0.6/cfg_scripts/mysql/CreateDIMTables.script
+@@ -49,7 +49,7 @@
+ \g
+ CREATE TABLE SeriesLevel
+ (
+- Mod char(16) not null,
++ Modality char(16) not null,
+ SerNum char(12) not null,
+ SerInsUID char(64) not null,
+ ProNam char(64),
+--- ctn-3.0.6.orig/cfg_scripts/mysql/CreateFISTables.script
++++ ctn-3.0.6/cfg_scripts/mysql/CreateFISTables.script
+@@ -62,7 +62,7 @@
+ CREATE TABLE StudyCmpTable (
+ StuComUID char(64) not null,
+ StuInsUID char(64) not null,
+- Mod char(16) not null,
++ Modality char(16) not null,
+ ProCodVal char(16),
+ ProCodSchDes char(16),
+ ProCodMea char(64),
+--- ctn-3.0.6.orig/cfg_scripts/mysql/FillDIMTables.script
++++ ctn-3.0.6/cfg_scripts/mysql/FillDIMTables.script
+@@ -140,7 +140,7 @@
+ 'P0001')
+ \g
+ INSERT INTO SeriesLevel(
+- Mod,
++ Modality,
+ SerNum,
+ SerInsUID,
+ ProNam,
+@@ -169,7 +169,7 @@
+ 'STUDY1.1')
+ \g
+ INSERT INTO SeriesLevel(
+- Mod,
++ Modality,
+ SerNum,
+ SerInsUID,
+ ProNam,
+@@ -198,7 +198,7 @@
+ 'STUDY1.2')
+ \g
+ INSERT INTO SeriesLevel(
+- Mod,
++ Modality,
+ SerNum,
+ SerInsUID,
+ ProNam,
+--- ctn-3.0.6.orig/facilities/idb/idb.c
++++ ctn-3.0.6/facilities/idb/idb.c
+@@ -319,7 +319,7 @@
+ static TBL_FIELD
+ GS_SERSEL_Field[] =
+ {
+- "Mod", TBL_STRING, DICOM_CS_LENGTH + 1, DICOM_CS_LENGTH + 1, 0, GS_SERSEL_Mod,
++ "Modality", TBL_STRING, DICOM_CS_LENGTH + 1, DICOM_CS_LENGTH + 1, 0, GS_SERSEL_Mod,
+ "SerNum", TBL_STRING, DICOM_IS_LENGTH + 1, DICOM_IS_LENGTH + 1, 0, GS_SERSEL_SerNum,
+ "SerInsUID", TBL_STRING, DICOM_UI_LENGTH + 1, DICOM_UI_LENGTH + 1, 0, GS_SERSEL_SerInsUID,
+ "ProNam", TBL_STRING, DICOM_LO_LENGTH + 1, DICOM_LO_LENGTH + 1, 0, GS_SERSEL_ProNam,
+@@ -3541,7 +3541,7 @@
+ i = GS_NumSerNodes - 1;
+ GS_NullSerFlag[i] = 0;
+ while (fp->FieldName != 0) {
+- if (strcmp(fp->FieldName, "Mod") == 0) {
++ if (strcmp(fp->FieldName, "Modality") == 0) {
+ if (fp->Value.IsNull)
+ GS_NullSerFlag[i] |= QF_SER_Mod;
+ else
+@@ -4682,7 +4682,7 @@
+ return (0);
+ }
+ op = likeOrEqualOperator(pssi->series.Mod);
+- TBL_CRITERIA_LOAD_BYTE(GS_sercl[i], "Mod", cs, TBL_STRING, op);
++ TBL_CRITERIA_LOAD_BYTE(GS_sercl[i], "Modality", cs, TBL_STRING, op);
+ i++;
+ }
+ }
+@@ -5433,7 +5433,7 @@
+ } else { /* Need Series Insertion */
+
+ i = 0;
+- TBL_FIELD_LOAD_BYTE(serfld[i], "Mod", pssi->series.Mod, TBL_STRING);
++ TBL_FIELD_LOAD_BYTE(serfld[i], "Modality", pssi->series.Mod, TBL_STRING);
+ i++;
+ TBL_FIELD_LOAD_BYTE(serfld[i], "SerNum", pssi->series.SerNum, TBL_STRING);
+ i++;
--- ctn-3.0.6.orig/debian/patches/series
+++ ctn-3.0.6/debian/patches/series
@@ -0,0 +1,3 @@
+10_all_patches.patch
+11_csh-to-bash.patch
+20_mysql_4.2.patch
--- ctn-3.0.6.orig/debian/patches/11_csh-to-bash.patch
+++ ctn-3.0.6/debian/patches/11_csh-to-bash.patch
@@ -0,0 +1,200 @@
+Change csh scripts to bash scripts, by Kevin M. Rosenberg
+
+--- ctn-3.0.6.orig/cfg_scripts/mysql/PrintTables
++++ ctn-3.0.6/cfg_scripts/mysql/PrintTables
+@@ -1,11 +1,12 @@
+-#!/bin/csh
++#!/bin/bash
+ #
+ # PrintTables
+ #
+-if ($1 == "" || $2 == "" ) then
++if [ -z $1 -o -z $2 ]; then
+ echo " "
+ echo Usage: "$0 <DIM|Control|FIS> <Database Name>"
+ echo " "
+ exit
+-endif
+-mysql -uctn -pctn $2 < Print$1Tables.script
++fi
++
++mysql -uctn -pctn $2 < Print${1}Tables.script
+--- ctn-3.0.6.orig/cfg_scripts/mysql/ListTables
++++ ctn-3.0.6/cfg_scripts/mysql/ListTables
+@@ -1,16 +1,16 @@
+-#!/bin/csh
++#!/bin/bash
+ #
+ # ListTables
+ #
+-if ($1 == "" || $2 == "" ) then
++if [ -z $1 -o -z $2 ]; then
+ echo " "
+ echo Usage: "$0 <DIM|Control> <Database Name>"
+ echo " "
+ exit
+-endif
++fi
+ #
+ #
+-if( $1 == "Control" )then
++if [ "$1" = "Control" ]; then
+ mysqlshow -pctn -uctn $2 ApplicationEntity
+ mysqlshow -pctn -uctn $2 GroupNames
+ mysqlshow -pctn -uctn $2 StorageAccess
+@@ -19,15 +19,15 @@
+ mysqlshow -pctn -uctn $2 FISAccess
+ mysqlshow -pctn -uctn $2 PrintServerCFG
+ mysqlshow -pctn -uctn $2 VideoImageDest
+-endif
++fi
+ #
+ #
+ #
+-if( $1 == "DIM" )then
++if [ "$1" = "DIM" ]; then
+ mysqlshow -pctn -uctn $2 ApplicationEntity
+ mysqlshow -pctn -uctn $2 PatientLevel
+ mysqlshow -pctn -uctn $2 StudyLevel
+ mysqlshow -pctn -uctn $2 SeriesLevel
+ mysqlshow -pctn -uctn $2 ImageLevel
+ mysqlshow -pctn -uctn $2 InstanceTable
+-endif
++fi
+--- ctn-3.0.6.orig/cfg_scripts/mysql/ClearTables
++++ ctn-3.0.6/cfg_scripts/mysql/ClearTables
+@@ -1,11 +1,12 @@
+-#!/bin/csh
++#!/bin/bash
+ #
+ # ClearTables
+ #
+-if ( $1 == "" || $2 == "" ) then
++if [ -z $1 -o -z $2 ]; then
+ echo " "
+ echo Usage: "$0 <DIM|Control|TBLTest|FIS> <Database Name>"
+ echo " "
+ exit
+-endif
+-mysql $2 < Clear$1Tables.script
++fi
++
++mysql $2 < Clear${1}Tables.script
+--- ctn-3.0.6.orig/cfg_scripts/mysql/FillTables
++++ ctn-3.0.6/cfg_scripts/mysql/FillTables
+@@ -1,15 +1,17 @@
+-#!/bin/csh
++#!/bin/bash
+ #
+ # FillTables
+ #
+-if ($1 == "" || $2 == "" ) then
++if [ -z $1 -o $2 ]; then
+ echo " "
+ echo Usage: "$0 <DIM> <Database Name>"
+ echo " "
+ exit
+-endif
+-mysql -uctn -pctn $2 < Fill$1Tables.script
+-if ($status != 0) then
++fi
++
++mysql -uctn -pctn $2 < Fill${1}Tables.script
++
++if [ $? != 0 ]; then
+ echo Could not drop database: $1
+ exit 1
+-endif
++fi
+--- ctn-3.0.6.orig/cfg_scripts/mysql/CreateTables
++++ ctn-3.0.6/cfg_scripts/mysql/CreateTables
+@@ -1,11 +1,12 @@
+-#!/bin/csh
++#!/bin/bash
+ #
+ # CreateTables
+ #
+-if ($1 == "" || $2 == "" ) then
++if [ -z $1 -o -z $2 ]; then
+ echo " "
+ echo Usage: "$0 <DIM|Control|TBLTest|FIS> <Database Name>"
+ echo " "
+ exit
+-endif
+-mysql -uctn -pctn $2 < Create$1Tables.script
++fi
++
++mysql -uctn -pctn $2 < Create${1}Tables.script
+--- ctn-3.0.6.orig/cfg_scripts/mysql/DropTables
++++ ctn-3.0.6/cfg_scripts/mysql/DropTables
+@@ -1,15 +1,16 @@
+-#!/bin/csh
++#!/bin/bash
+ #
+ # DropTables
+ #
+-if ( $1 == "" || $2 == "" ) then
++if [ -z $1 -o -z $2 ]; then
+ echo " "
+ echo Usage: "$0 <DIM|Control|TBLTest|FIS> <Database Name>"
+ echo " "
+ exit
+-endif
+-mysql -uctn -pctn $2 < Drop$1Tables.script
+-if ($status != 0) then
++fi
++
++mysql -uctn -pctn $2 < Drop${1}Tables.script
++if [ $? != 0 ]; then
+ echo Could not drop database: $1
+ exit 1
+-endif
++fi
+--- ctn-3.0.6.orig/cfg_scripts/mysql/DropDB
++++ ctn-3.0.6/cfg_scripts/mysql/DropDB
+@@ -1,15 +1,16 @@
+-#!/bin/csh
++#!/bin/bash
+ #
+ # DropDB
+ #
+-if ($1 == "") then
++if [ -z $1 ]; then
+ echo " "
+ echo Usage: "$0 <Database Name>"
+ echo " "
+ exit
+-endif
++fi
++
+ mysqladmin -uctn -pctn drop $1
+-if ($status != 0) then
++if [ $? != 0 ]; then
+ echo Could not drop database: $1
+ exit 1
+-endif
++fi
+--- ctn-3.0.6.orig/cfg_scripts/mysql/CreateDB
++++ ctn-3.0.6/cfg_scripts/mysql/CreateDB
+@@ -1,15 +1,16 @@
+-#!/bin/csh
++#!/bin/bash
+ #
+ # CreateDB
+ #
+-if ($1 == "") then
++if [ -z "$1" ]; then
+ echo " "
+ echo Usage: "$0 <DB Name>"
+ echo " "
+ exit
+-endif
++fi
++
+ mysqladmin -uctn -pctn create $1
+-if ($status != 0) then
++if [ $? != 0 ]; then
+ echo Could not create database: $1
+ exit 1
+-endif
++fi