From 0b336888541590e095a518fa5fc296ba706503f4 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Thu, 18 Feb 2016 10:10:49 +0000 Subject: lib/libpaper: New convention git-svn-id: svn://tug.org/texlive/trunk@39762 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/libs/libpaper/ChangeLog | 4 + Build/source/libs/libpaper/Makefile.am | 2 +- Build/source/libs/libpaper/Makefile.in | 6 +- Build/source/libs/libpaper/configure | 8 +- Build/source/libs/libpaper/configure.ac | 6 +- .../libpaper-1.1.24+nmu2-PATCHES/ChangeLog | 16 -- .../libpaper-1.1.24+nmu2-PATCHES/TL-Changes | 23 -- .../libpaper-1.1.24+nmu2-PATCHES/patch-01-JIS | 44 ---- .../libpaper-1.1.24+nmu2-PATCHES/patch-02-TL | 171 --------------- .../libpaper-1.1.24+nmu2-PATCHES/patch-03-getopt | 49 ----- .../libpaper-1.1.24+nmu2-PATCHES/patch-04-unsigned | 29 --- .../libs/libpaper/libpaper-1.1.24+nmu2/ChangeLog | 33 --- .../libs/libpaper/libpaper-1.1.24+nmu2/Makefile.am | 3 - .../libs/libpaper/libpaper-1.1.24+nmu2/README | 39 ---- .../libs/libpaper/libpaper-1.1.24+nmu2/config.h.in | 73 ------- .../libpaper/libpaper-1.1.24+nmu2/configure.ac | 66 ------ .../libpaper/libpaper-1.1.24+nmu2/lib/Makefile.am | 21 -- .../libs/libpaper/libpaper-1.1.24+nmu2/lib/dimen.c | 72 ------- .../libs/libpaper/libpaper-1.1.24+nmu2/lib/dimen.h | 36 ---- .../libs/libpaper/libpaper-1.1.24+nmu2/lib/paper.c | 158 -------------- .../libs/libpaper/libpaper-1.1.24+nmu2/lib/paper.h | 73 ------- .../libpaper/libpaper-1.1.24+nmu2/lib/paperspecs | 67 ------ .../libpaper/libpaper-1.1.24+nmu2/lib/paperspecs.h | 70 ------ .../libpaper/libpaper-1.1.24+nmu2/man/Makefile.am | 25 --- .../libpaper-1.1.24+nmu2/man/defaultpapername.3 | 2 - .../man/defaultpapersizefile.3 | 2 - .../libpaper-1.1.24+nmu2/man/paperconf.1.in | 76 ------- .../libpaper-1.1.24+nmu2/man/paperconfig.8.in | 73 ------- .../libpaper/libpaper-1.1.24+nmu2/man/paperdone.3 | 2 - .../libpaper/libpaper-1.1.24+nmu2/man/paperfirst.3 | 2 - .../libpaper/libpaper-1.1.24+nmu2/man/paperinfo.3 | 65 ------ .../libpaper/libpaper-1.1.24+nmu2/man/paperinit.3 | 27 --- .../libpaper/libpaper-1.1.24+nmu2/man/paperlast.3 | 2 - .../libpaper/libpaper-1.1.24+nmu2/man/papernext.3 | 2 - .../libpaper/libpaper-1.1.24+nmu2/man/paperprev.3 | 2 - .../libpaper-1.1.24+nmu2/man/paperpsheight.3 | 2 - .../libpaper-1.1.24+nmu2/man/paperpsname.3 | 2 - .../libpaper-1.1.24+nmu2/man/paperpswidth.3 | 2 - .../libpaper-1.1.24+nmu2/man/papersize.5.in | 63 ------ .../libpaper-1.1.24+nmu2/man/paperwithsize.3 | 2 - .../libpaper-1.1.24+nmu2/man/systempapername.3.in | 53 ----- .../libpaper-1.1.24+nmu2/man/systempapersizefile.3 | 1 - .../libpaper/libpaper-1.1.24+nmu2/src/Makefile.am | 8 - .../libpaper/libpaper-1.1.24+nmu2/src/paperconf.c | 234 --------------------- .../libpaper-1.1.24+nmu2/src/paperconfig.in | 227 -------------------- .../libs/libpaper/libpaper-PATCHES/ChangeLog | 16 ++ .../libs/libpaper/libpaper-PATCHES/TL-Changes | 23 ++ .../libs/libpaper/libpaper-PATCHES/patch-01-JIS | 44 ++++ .../libs/libpaper/libpaper-PATCHES/patch-02-TL | 171 +++++++++++++++ .../libs/libpaper/libpaper-PATCHES/patch-03-getopt | 49 +++++ .../libpaper/libpaper-PATCHES/patch-04-unsigned | 29 +++ Build/source/libs/libpaper/libpaper-src/ChangeLog | 33 +++ .../source/libs/libpaper/libpaper-src/Makefile.am | 3 + Build/source/libs/libpaper/libpaper-src/README | 39 ++++ .../source/libs/libpaper/libpaper-src/config.h.in | 73 +++++++ .../source/libs/libpaper/libpaper-src/configure.ac | 66 ++++++ .../libs/libpaper/libpaper-src/lib/Makefile.am | 21 ++ .../source/libs/libpaper/libpaper-src/lib/dimen.c | 72 +++++++ .../source/libs/libpaper/libpaper-src/lib/dimen.h | 36 ++++ .../source/libs/libpaper/libpaper-src/lib/paper.c | 158 ++++++++++++++ .../source/libs/libpaper/libpaper-src/lib/paper.h | 73 +++++++ .../libs/libpaper/libpaper-src/lib/paperspecs | 67 ++++++ .../libs/libpaper/libpaper-src/lib/paperspecs.h | 70 ++++++ .../libs/libpaper/libpaper-src/man/Makefile.am | 25 +++ .../libpaper/libpaper-src/man/defaultpapername.3 | 2 + .../libpaper-src/man/defaultpapersizefile.3 | 2 + .../libs/libpaper/libpaper-src/man/paperconf.1.in | 76 +++++++ .../libpaper/libpaper-src/man/paperconfig.8.in | 73 +++++++ .../libs/libpaper/libpaper-src/man/paperdone.3 | 2 + .../libs/libpaper/libpaper-src/man/paperfirst.3 | 2 + .../libs/libpaper/libpaper-src/man/paperinfo.3 | 65 ++++++ .../libs/libpaper/libpaper-src/man/paperinit.3 | 27 +++ .../libs/libpaper/libpaper-src/man/paperlast.3 | 2 + .../libs/libpaper/libpaper-src/man/papernext.3 | 2 + .../libs/libpaper/libpaper-src/man/paperprev.3 | 2 + .../libs/libpaper/libpaper-src/man/paperpsheight.3 | 2 + .../libs/libpaper/libpaper-src/man/paperpsname.3 | 2 + .../libs/libpaper/libpaper-src/man/paperpswidth.3 | 2 + .../libs/libpaper/libpaper-src/man/papersize.5.in | 63 ++++++ .../libs/libpaper/libpaper-src/man/paperwithsize.3 | 2 + .../libpaper/libpaper-src/man/systempapername.3.in | 53 +++++ .../libpaper-src/man/systempapersizefile.3 | 1 + .../libs/libpaper/libpaper-src/src/Makefile.am | 8 + .../libs/libpaper/libpaper-src/src/paperconf.c | 234 +++++++++++++++++++++ .../libs/libpaper/libpaper-src/src/paperconfig.in | 227 ++++++++++++++++++++ 85 files changed, 1932 insertions(+), 1928 deletions(-) delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/ChangeLog delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/TL-Changes delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/patch-01-JIS delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/patch-02-TL delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/patch-03-getopt delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/patch-04-unsigned delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/ChangeLog delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/Makefile.am delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/README delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/config.h.in delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/configure.ac delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/Makefile.am delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/dimen.c delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/dimen.h delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/paper.c delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/paper.h delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/paperspecs delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/paperspecs.h delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/Makefile.am delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/defaultpapername.3 delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/defaultpapersizefile.3 delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperconf.1.in delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperconfig.8.in delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperdone.3 delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperfirst.3 delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperinfo.3 delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperinit.3 delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperlast.3 delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/papernext.3 delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperprev.3 delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperpsheight.3 delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperpsname.3 delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperpswidth.3 delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/papersize.5.in delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperwithsize.3 delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/systempapername.3.in delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/systempapersizefile.3 delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/src/Makefile.am delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/src/paperconf.c delete mode 100644 Build/source/libs/libpaper/libpaper-1.1.24+nmu2/src/paperconfig.in create mode 100644 Build/source/libs/libpaper/libpaper-PATCHES/ChangeLog create mode 100644 Build/source/libs/libpaper/libpaper-PATCHES/TL-Changes create mode 100644 Build/source/libs/libpaper/libpaper-PATCHES/patch-01-JIS create mode 100644 Build/source/libs/libpaper/libpaper-PATCHES/patch-02-TL create mode 100644 Build/source/libs/libpaper/libpaper-PATCHES/patch-03-getopt create mode 100644 Build/source/libs/libpaper/libpaper-PATCHES/patch-04-unsigned create mode 100644 Build/source/libs/libpaper/libpaper-src/ChangeLog create mode 100644 Build/source/libs/libpaper/libpaper-src/Makefile.am create mode 100644 Build/source/libs/libpaper/libpaper-src/README create mode 100644 Build/source/libs/libpaper/libpaper-src/config.h.in create mode 100644 Build/source/libs/libpaper/libpaper-src/configure.ac create mode 100644 Build/source/libs/libpaper/libpaper-src/lib/Makefile.am create mode 100644 Build/source/libs/libpaper/libpaper-src/lib/dimen.c create mode 100644 Build/source/libs/libpaper/libpaper-src/lib/dimen.h create mode 100644 Build/source/libs/libpaper/libpaper-src/lib/paper.c create mode 100644 Build/source/libs/libpaper/libpaper-src/lib/paper.h create mode 100644 Build/source/libs/libpaper/libpaper-src/lib/paperspecs create mode 100644 Build/source/libs/libpaper/libpaper-src/lib/paperspecs.h create mode 100644 Build/source/libs/libpaper/libpaper-src/man/Makefile.am create mode 100644 Build/source/libs/libpaper/libpaper-src/man/defaultpapername.3 create mode 100644 Build/source/libs/libpaper/libpaper-src/man/defaultpapersizefile.3 create mode 100644 Build/source/libs/libpaper/libpaper-src/man/paperconf.1.in create mode 100644 Build/source/libs/libpaper/libpaper-src/man/paperconfig.8.in create mode 100644 Build/source/libs/libpaper/libpaper-src/man/paperdone.3 create mode 100644 Build/source/libs/libpaper/libpaper-src/man/paperfirst.3 create mode 100644 Build/source/libs/libpaper/libpaper-src/man/paperinfo.3 create mode 100644 Build/source/libs/libpaper/libpaper-src/man/paperinit.3 create mode 100644 Build/source/libs/libpaper/libpaper-src/man/paperlast.3 create mode 100644 Build/source/libs/libpaper/libpaper-src/man/papernext.3 create mode 100644 Build/source/libs/libpaper/libpaper-src/man/paperprev.3 create mode 100644 Build/source/libs/libpaper/libpaper-src/man/paperpsheight.3 create mode 100644 Build/source/libs/libpaper/libpaper-src/man/paperpsname.3 create mode 100644 Build/source/libs/libpaper/libpaper-src/man/paperpswidth.3 create mode 100644 Build/source/libs/libpaper/libpaper-src/man/papersize.5.in create mode 100644 Build/source/libs/libpaper/libpaper-src/man/paperwithsize.3 create mode 100644 Build/source/libs/libpaper/libpaper-src/man/systempapername.3.in create mode 100644 Build/source/libs/libpaper/libpaper-src/man/systempapersizefile.3 create mode 100644 Build/source/libs/libpaper/libpaper-src/src/Makefile.am create mode 100644 Build/source/libs/libpaper/libpaper-src/src/paperconf.c create mode 100644 Build/source/libs/libpaper/libpaper-src/src/paperconfig.in (limited to 'Build') diff --git a/Build/source/libs/libpaper/ChangeLog b/Build/source/libs/libpaper/ChangeLog index 36f9a26dc20..b7ffdc6843e 100644 --- a/Build/source/libs/libpaper/ChangeLog +++ b/Build/source/libs/libpaper/ChangeLog @@ -1,3 +1,7 @@ +2016-02-18 Akira Kakuto + + * Makefile.am, configure.ac: New convention. + 2015-07-06 Peter Breitenlohner * Makefile.am: Better dependencies for 'make check'. diff --git a/Build/source/libs/libpaper/Makefile.am b/Build/source/libs/libpaper/Makefile.am index 8da34ce4a0f..993ad77a587 100644 --- a/Build/source/libs/libpaper/Makefile.am +++ b/Build/source/libs/libpaper/Makefile.am @@ -12,7 +12,7 @@ EXTRA_DIST = $(LIBPAPER_TREE) ## Changes applied to the original source tree ## -EXTRA_DIST += $(LIBPAPER_TREE)-PATCHES +EXTRA_DIST += libpaper-PATCHES # Files not to be distributed include $(srcdir)/../../am/dist_hook.am diff --git a/Build/source/libs/libpaper/Makefile.in b/Build/source/libs/libpaper/Makefile.in index 38f27820265..90f96fcd1db 100644 --- a/Build/source/libs/libpaper/Makefile.in +++ b/Build/source/libs/libpaper/Makefile.in @@ -402,7 +402,7 @@ am__DIST_COMMON = $(srcdir)/../../am/dist_hook.am \ $(top_srcdir)/../../build-aux/install-sh \ $(top_srcdir)/../../build-aux/missing \ $(top_srcdir)/../../build-aux/test-driver \ - $(top_srcdir)/libpaper-1.1.24+nmu2/man/paperconf.1.in \ + $(top_srcdir)/libpaper-src/man/paperconf.1.in \ ../../build-aux/compile ../../build-aux/config.guess \ ../../build-aux/config.sub ../../build-aux/depcomp \ ../../build-aux/install-sh ../../build-aux/ltmain.sh \ @@ -544,7 +544,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = $(LIBPAPER_TREE) $(LIBPAPER_TREE)-PATCHES +EXTRA_DIST = $(LIBPAPER_TREE) libpaper-PATCHES NEVER_DIST = `find . $(NEVER_NAMES)` # Files not to be distributed @@ -626,7 +626,7 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) distclean-hdr: -rm -f config.h stamp-h1 -paperconf.1: $(top_builddir)/config.status $(top_srcdir)/libpaper-1.1.24+nmu2/man/paperconf.1.in +paperconf.1: $(top_builddir)/config.status $(top_srcdir)/libpaper-src/man/paperconf.1.in cd $(top_builddir) && $(SHELL) ./config.status $@ clean-noinstLIBRARIES: diff --git a/Build/source/libs/libpaper/configure b/Build/source/libs/libpaper/configure index 5aa76fbc69e..eb931ca5ee3 100755 --- a/Build/source/libs/libpaper/configure +++ b/Build/source/libs/libpaper/configure @@ -585,7 +585,7 @@ PACKAGE_STRING='libpaper (TeX Live) 1.1.24+nmu2' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' -ac_unique_file="libpaper-1.1.24+nmu2/lib/paper.h" +ac_unique_file="libpaper-src/lib/paper.h" # Factoring default headers for most tests. ac_includes_default="\ #include @@ -5234,10 +5234,10 @@ cat >>confdefs.h <<_ACEOF _ACEOF -LIBPAPER_TREE=libpaper-1.1.24+nmu2 +LIBPAPER_TREE=libpaper-src -ac_config_files="$ac_config_files Makefile include/Makefile paperconf.1:libpaper-1.1.24+nmu2/man/paperconf.1.in" +ac_config_files="$ac_config_files Makefile include/Makefile paperconf.1:libpaper-src/man/paperconf.1.in" cat >confcache <<\_ACEOF @@ -5981,7 +5981,7 @@ do "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; - "paperconf.1") CONFIG_FILES="$CONFIG_FILES paperconf.1:libpaper-1.1.24+nmu2/man/paperconf.1.in" ;; + "paperconf.1") CONFIG_FILES="$CONFIG_FILES paperconf.1:libpaper-src/man/paperconf.1.in" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac diff --git a/Build/source/libs/libpaper/configure.ac b/Build/source/libs/libpaper/configure.ac index b36ff819a46..fc711c6b741 100644 --- a/Build/source/libs/libpaper/configure.ac +++ b/Build/source/libs/libpaper/configure.ac @@ -9,7 +9,7 @@ dnl m4_include([version.ac])[] dnl define libpaper_version AC_INIT([libpaper (TeX Live)], libpaper_version, [tex-k@tug.org]) AC_PREREQ([2.65]) -AC_CONFIG_SRCDIR([libpaper-]libpaper_version[/lib/paper.h]) +AC_CONFIG_SRCDIR([libpaper-src/lib/paper.h]) AC_CONFIG_AUX_DIR([../../build-aux]) AC_CONFIG_MACRO_DIRS([../../m4]) @@ -39,10 +39,10 @@ AC_SUBST([PAPERSIZEVAR], [PAPERSIZE]) AC_DEFINE_UNQUOTED([PAPERSIZEVAR], ["$PAPERSIZEVAR"], [Environment variable that overrides the default paper size]) -AC_SUBST([LIBPAPER_TREE], [libpaper-]libpaper_version) +AC_SUBST([LIBPAPER_TREE], [libpaper-src]) AC_CONFIG_FILES([Makefile include/Makefile - paperconf.1:libpaper-]libpaper_version[/man/paperconf.1.in]) + paperconf.1:libpaper-src/man/paperconf.1.in]) AC_OUTPUT diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/ChangeLog b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/ChangeLog deleted file mode 100644 index 88935dabef6..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/ChangeLog +++ /dev/null @@ -1,16 +0,0 @@ -2014-06-18 Peter Breitenlohner - - * patch-04-unsigned (new): Avoid undefined behaviour. - -2013-11-20 Peter Breitenlohner - - * patch-03-getopt (new): Adapt paperconf.1 to non-GNU getopt. - -2013-10-24 Peter Breitenlohner - - Imported libpaper-1.1.24+nmu2 source tree from: - ftp://ftp.de.debian.org/debian/pool/main/libp/libpaper - - * patch-01-JIS (new): Add JIS paper specs. - * patch-02-TL (new): No /etc/papersize for TeX Live. - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/TL-Changes b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/TL-Changes deleted file mode 100644 index 779b6d4ff35..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/TL-Changes +++ /dev/null @@ -1,23 +0,0 @@ -Changes applied to the libpaper-1.1.24+nmu2/ tree as obtained from: - ftp://ftp.de.debian.org/debian/pool/main/libp/libpaper/ - -Removed: - COPYING - INSTALL - Makefile.in - aclocal.m4 - compile - config.guess - config.sub - configure - depcomp - install-sh - ltmain.sh - missing - mkinstalldirs - lib/Makefile.in - man/Makefile.in - src/Makefile.in - -Removed unused dirs: - debian diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/patch-01-JIS b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/patch-01-JIS deleted file mode 100644 index ce2016ad995..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/patch-01-JIS +++ /dev/null @@ -1,44 +0,0 @@ -diff -ur libpaper-1.1.24+nmu2.orig/lib/paperspecs libpaper-1.1.24+nmu2/lib/paperspecs ---- libpaper-1.1.24+nmu2.orig/lib/paperspecs 2012-05-03 21:05:12.000000000 +0200 -+++ libpaper-1.1.24+nmu2/lib/paperspecs 2013-10-24 11:32:28.000000000 +0200 -@@ -40,6 +40,18 @@ - c6 114 162 mm - c7 81 114 mm - c8 57 81 mm -+jisb0 1030 1456 mm -+jisb1 728 1030 mm -+jisb2 515 728 mm -+jisb3 364 515 mm -+jisb4 257 364 mm -+jisb5 182 257 mm -+jisb6 128 182 mm -+jisb7 91 128 mm -+jisb8 64 91 mm -+jisb9 45 64 mm -+jisb10 32 45 mm -+b5var 182 230 mm - DL 110 220 mm - Comm10 297 684 - Monarch 279 540 -diff -ur libpaper-1.1.24+nmu2.orig/lib/paperspecs.h libpaper-1.1.24+nmu2/lib/paperspecs.h ---- libpaper-1.1.24+nmu2.orig/lib/paperspecs.h 2012-05-04 12:11:27.000000000 +0200 -+++ libpaper-1.1.24+nmu2/lib/paperspecs.h 2013-10-24 11:32:42.000000000 +0200 -@@ -43,6 +43,18 @@ - { "c6", 323.149606, 459.212598 }, - { "c7", 229.606299, 323.149606 }, - { "c8", 161.574803, 229.606299 }, -+ { "jisb0", 2919.685039, 4127.244094 }, -+ { "jisb1", 2063.622047, 2919.685039 }, -+ { "jisb2", 1459.842520, 2063.622047 }, -+ { "jisb3", 1031.811024, 1459.842520 }, -+ { "jisb4", 728.503937, 1031.811024 }, -+ { "jisb5", 515.905512, 728.503937 }, -+ { "jisb6", 362.834646, 515.905512 }, -+ { "jisb7", 257.952756, 362.834646 }, -+ { "jisb8", 181.417323, 257.952756 }, -+ { "jisb9", 127.559055, 181.417323 }, -+ { "jisb10", 90.708661, 127.559055 }, -+ { "b5var", 515.905512, 651.968504 }, - { "DL", 311.811024, 623.622047 }, - { "Comm10", 297.000000, 684.000000 }, - { "Monarch", 279.000000, 540.000000 }, diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/patch-02-TL b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/patch-02-TL deleted file mode 100644 index 601ccb9d252..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/patch-02-TL +++ /dev/null @@ -1,171 +0,0 @@ -diff -ur libpaper-1.1.24+nmu2.orig/lib/paper.c libpaper-1.1.24+nmu2/lib/paper.c ---- libpaper-1.1.24+nmu2.orig/lib/paper.c 2010-04-24 14:12:11.000000000 +0200 -+++ libpaper-1.1.24+nmu2/lib/paper.c 2013-10-24 15:45:37.955710461 +0200 -@@ -87,24 +87,11 @@ - } - - const char* defaultpapersizefile(void) { -- return PAPERCONF; -+ return NULL; - } - - const char* systempapersizefile(void) { -- const char* paperconf = getenv(PAPERCONFVAR); --/* --Previously PAPERCONFVAR used to contain a paper name and PAPERSIZEVAR --contained a file path. Now they're reversed. If we don't find a '/' --in PAPERCONFVAR, fall-back to the old behaviour. --*/ -- -- if ((paperconf != NULL) && (strchr(paperconf, '/') == NULL)) { -- paperconf = getenv(PAPERSIZEVAR); -- if ((paperconf != NULL) && (strchr(paperconf, '/') == NULL)) -- paperconf = NULL; -- } -- -- return paperconf ? paperconf : defaultpapersizefile(); -+ return NULL; - } - - const char* defaultpapername(void) { -@@ -112,26 +99,14 @@ - } - - char* systempapername(void) { -- const char* paperconf; - char* paperstr; - char* paperenv; - const char* paperdef; -- FILE* ps; -- struct stat statbuf; - const struct paper* pp; -- int c; -- --/* --Previously PAPERSIZEVAR used to contain a file path and PAPERCONFVAR --contained a paper name. Now they're reversed. If we find a '/' in --PAPERSIZEVAR, fall-back to the old behaviour. --*/ - - paperenv = getenv(PAPERSIZEVAR); - if ((paperenv != NULL) && (strchr(paperenv, '/') != NULL)) { -- paperenv = getenv(PAPERCONFVAR); -- if ((paperenv != NULL) && (strchr(paperenv, '/') != NULL)) -- paperenv = NULL; -+ paperenv = NULL; - } - - if (paperenv) { -@@ -145,61 +120,6 @@ - return strcpy(paperstr, paperenv); - } - -- paperconf = systempapersizefile(); -- if (paperconf && stat(paperconf, &statbuf) == -1) return 0; -- -- if (!paperconf) paperconf = defaultpapersizefile(); -- -- if ((stat(paperconf, &statbuf) != -1) && -- (ps = fopen(paperconf, "r"))) { -- -- while ((c = getc(ps)) != EOF) { -- if (c == '#') { -- while ((c = getc(ps)) != EOF && c != '\n'); -- if (c == EOF) { -- break; -- } -- } else if (!isspace(c)) { -- unsigned n = 0, m = 64; -- char* papername = malloc(m * sizeof(char)); -- -- if (!papername) { -- fclose(ps); -- return 0; -- } -- -- do { -- if (n == m-1) { -- char* newpaper = realloc(papername, -- (m *= 2) * sizeof(char)); -- if (!newpaper) { -- free(papername); -- fclose(ps); -- return 0; -- } -- papername = newpaper; -- } -- papername[n++] = c; -- } while ((c = getc(ps)) != EOF && !isspace(c)); -- -- papername[n] = 0; -- -- fclose(ps); -- -- paperstr = malloc((strlen(papername) + 1) * sizeof(char)); -- if (! paperstr) return 0; -- -- strcpy(paperstr, papername); -- free(papername); -- -- if ((pp = paperinfo(paperstr))) -- return strcpy(paperstr, pp->name); -- else -- return paperstr; -- } -- } -- } -- - paperdef = defaultpapername(); - paperstr = malloc((strlen(paperdef) + 1) * sizeof(char)); - -diff -ur libpaper-1.1.24+nmu2.orig/man/paperconf.1.in libpaper-1.1.24+nmu2/man/paperconf.1.in ---- libpaper-1.1.24+nmu2.orig/man/paperconf.1.in 2012-05-03 21:05:12.000000000 +0200 -+++ libpaper-1.1.24+nmu2/man/paperconf.1.in 2013-10-25 08:27:54.783329615 +0200 -@@ -1,4 +1,4 @@ --.TH PAPERCONF 1 "24 April 2001" -+.TH PAPERCONF 1 "25 October 2013" - .SH NAME - .B paperconf - \- print paper configuration information -@@ -46,13 +46,10 @@ - prints the name of the system- or user-specified paper, obtained by - looking in order at the - .B @PAPERSIZEVAR@ --environment variable, at the contents of the file specified by the --.B @PAPERCONFVAR@ --environment variable, at the contents of --.B @PAPERCONF@ -+environment variable - or by using --.B letter --as a fall-back value if none of the other alternatives are successful. -+.B a4 -+as a fall-back value. - By default, width and height of the paper are printed in PostScript points. - .SH OPTIONS - .TP -@@ -98,21 +95,9 @@ - .SH ENVIRONMENT - .TP 20 - .B @PAPERSIZEVAR@ --Paper size to use regardless of what the papersize file contains. --.TP 20 --.B @PAPERCONFVAR@ --Full path to a file containing the paper size to use. --.SH FILES --.TP 20 --.B @PAPERCONF@ --Contains the name of the system-wide default paper size to be used --if the --.B @PAPERSIZEVAR@ --and --.B @PAPERCONFVAR@ --variables are not set. -+Paper size to use. - .SH AUTHOR - Yves Arrouye --.SH SEE ALSO --.BR papersize (5) -+ -+Modified for TeX Live by Peter Breitenlohner - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/patch-03-getopt b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/patch-03-getopt deleted file mode 100644 index cec650d1108..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/patch-03-getopt +++ /dev/null @@ -1,49 +0,0 @@ -diff -ur libpaper-1.1.24+nmu2.orig/man/paperconf.1.in libpaper-1.1.24+nmu2/man/paperconf.1.in ---- libpaper-1.1.24+nmu2.orig/man/paperconf.1.in 2013-10-25 08:27:54.000000000 +0200 -+++ libpaper-1.1.24+nmu2/man/paperconf.1.in 2013-11-20 13:59:18.000000000 +0100 -@@ -3,39 +3,12 @@ - .B paperconf - \- print paper configuration information - .SH SYNOPSIS --.B paperconf --[ --[ --.B \-p --] --.I paper --| --.B \-d --| --.B \-a --] --[ --.B \-z --] --[ --.B \-n --| --.B \-N --] --[ --.B \-s --| --.B \-w --| --.B \-h --] --[ --.B \-c --| --.B \-m --| --.B \-i --] -+\fBpaperconf\fR -+[\fB\-z\fR] -+[\fB\-n\fR|\fB\-N\fR] -+[\fB\-s\fR|\fB\-w\fR|\fB\-h\fR] -+[\fB\-c\fR|\fB\-m\fR|\fB\-i\fR] -+[[\fB\-p\fR] \fIpaper\fR|\fB\-d\fR|\fB\-a\fR] - .SH DESCRIPTION - .B paperconf - prints information about a given paper. diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/patch-04-unsigned b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/patch-04-unsigned deleted file mode 100644 index 13c798bc1e5..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2-PATCHES/patch-04-unsigned +++ /dev/null @@ -1,29 +0,0 @@ -diff -ur libpaper-1.1.24+nmu2.orig/lib/dimen.c libpaper-1.1.24+nmu2/lib/dimen.c ---- libpaper-1.1.24+nmu2.orig/lib/dimen.c 2002-11-11 01:56:08.000000000 +0100 -+++ libpaper-1.1.24+nmu2/lib/dimen.c 2014-06-18 08:31:52.000000000 +0200 -@@ -53,9 +53,9 @@ - - if (*(unit = what) == '-') ++unit; - -- for (; isdigit(*unit) || (*unit == '.' && !dot++); ++unit); -+ for (; isdigit((unsigned char)*unit) || (*unit == '.' && !dot++); ++unit); - -- if (*unit && !isalpha(*unit)) { -+ if (*unit && !isalpha((unsigned char)*unit)) { - return -1; - } else { - double base = atof(what); -diff -ur libpaper-1.1.24+nmu2.orig/src/paperconf.c libpaper-1.1.24+nmu2/src/paperconf.c ---- libpaper-1.1.24+nmu2.orig/src/paperconf.c 2012-05-03 21:05:12.000000000 +0200 -+++ libpaper-1.1.24+nmu2/src/paperconf.c 2014-06-18 08:31:54.000000000 +0200 -@@ -53,8 +53,8 @@ - printf("%s", papername(paper)); - pr = 1; - } else if (options & OPT_UPPERNAME) { -- if (islower(*papername(paper))) { -- printf("%c%s", toupper(*papername(paper)), papername(paper) + 1); -+ if (islower((unsigned char)*papername(paper))) { -+ printf("%c%s", toupper((unsigned char)*papername(paper)), papername(paper) + 1); - } else { - printf("%s", papername(paper)); - } diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/ChangeLog b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/ChangeLog deleted file mode 100644 index 1eadcbd9f1b..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/ChangeLog +++ /dev/null @@ -1,33 +0,0 @@ -Tue Sep 24 06:38:34 Yves Arrouye - - * completed the set of manual pages. - * added the libpaper.so.1 link in installation. - * added -E to less flags. - -Tue Aug 13 19:14:51 1996 Yves Arrouye - - * abstract interface (struct paper hidden) so that future changes - can be made safely. - * stores dimensions as double, still in PS points. - -Sun Aug 11 15:16:46 1996 Yves Arrouye - - * lib/paper.c: added paperinit(), paperdone(), paperfirst(), - paperlast(), papernext() and paperprev(), removed papertable(). - - * lib/paper.h: added new prototypes. - - * src/paper.c: added -N option. - Removed trailing spaces in what is printed. - - * examples/gsfrontend.c: corrected PAPERSIZE to PAGESIZE. - - * examples/a2ps: added calls to paperinit() and paperdone(), - added agressive page size selection at printing time. - -Sat Jul 20 10:15:49 1996 Yves Arrouye - - * Makefile.in: changed for PAPERSIZE. - * lib/paper.c: added the PAPERSIZE environment variable. - * examples: new directory containing examples (gs.sh and - diffs for a2ps-4.3). diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/Makefile.am b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/Makefile.am deleted file mode 100644 index e646ec42084..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ - -SUBDIRS = lib src man - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/README b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/README deleted file mode 100644 index 2b451f7a552..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/README +++ /dev/null @@ -1,39 +0,0 @@ -The paper library and accompanying files are intended to provide a simple -way for applications to take actions based on a system- or user-specified -paper size. - -This release is quite minimal, its purpose being to provide really basic -functions (obtaining the system paper name and getting the height and -width of a given kond of paper) that applications can immediately -integrate. -A more complete library, using a capabilities file for papers (giving, -in addition to the size, informations like paper weigth, color, etc) -will be released later. - -See the sources for paperconf(1) in src/paper.c for how to use the library. - -Adding new paper sizes -====================== - -If a paper format is missing, one need to add it to lib/paperspecs. The -format of this file is one paper format per line, with the name of the -format, the width and height of the format separated with space. You -may add an option measurement unit among in, ft, pt, m, dm, cm, mm or you -may leave the default unit of "point". By defaults the width and height -are specified in the "point" unit, which is 1/72 inch (2.54 cm). This -is the A4 entry: - - a4 210 297 mm - -that was previously written as - - a4 595 842 - -The sizes here are 595 points / 72 points pr inch * 2.54 cm per -inch = 20.99 cm and 842/72*2.54 = 29.70 cm. The A4 format -is 210x297 mm so this is a good approximation. (Source: -) - -Copyright (C) Yves Arrouye , 1996 - Adrian Bunk , 2000 - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/config.h.in b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/config.h.in deleted file mode 100644 index eb99fd55840..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/config.h.in +++ /dev/null @@ -1,73 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Default configuration file location */ -#undef PAPERCONF - -/* Environment variable that overrides the default configuration file location - */ -#undef PAPERCONFVAR - -/* Default paper size */ -#undef PAPERSIZE - -/* Environment variable that overrides the defaultpaper size */ -#undef PAPERSIZEVAR - -/* Default directory for run-parts */ -#undef RUNPARTSDIR - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/configure.ac b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/configure.ac deleted file mode 100644 index 4b6ef5714ad..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/configure.ac +++ /dev/null @@ -1,66 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. - -AC_INIT([libpaper], [1.1.9]) -AC_CONFIG_SRCDIR([configure.ac]) -AM_INIT_AUTOMAKE([no-define]) -AM_CONFIG_HEADER(config.h) -AM_MAINTAINER_MODE - -dnl Check for standard build environment -dnl ==================================== -AC_PROG_CC -AC_GNU_SOURCE -AC_PROG_INSTALL -AM_PROG_LIBTOOL -AC_PROG_MAKE_SET - -dnl Complier features -dnl ================= -AC_C_CONST - -dnl set up some substitutions -dnl ========================= -PAPERCONF="${sysconfdir}/papersize" -AC_SUBST(PAPERCONF) -AH_TEMPLATE(PAPERCONF, [Default configuration file location]) -AC_DEFINE_UNQUOTED(PAPERCONF, "$PAPERCONF") - -PAPERCONFVAR=PAPERCONF -AC_SUBST(PAPERCONFVAR) -AH_TEMPLATE(PAPERCONFVAR, [Environment variable that overrides the default configuration file location]) -AC_DEFINE_UNQUOTED(PAPERCONFVAR, "$PAPERCONFVAR") - -PAPERSIZE=letter -AC_SUBST(PAPERSIZE) -AH_TEMPLATE(PAPERSIZE, [Default paper size]) -AC_DEFINE_UNQUOTED(PAPERSIZE, "$PAPERSIZE") - -RUNPARTSDIR="${sysconfdir}/libpaper.d" -AC_SUBST(RUNPARTSDIR) -AH_TEMPLATE(RUNPARTSDIR, [Default directory for run-parts]) -AC_DEFINE_UNQUOTED(RUNPARTSDIR, "$RUNPARTSDIR") - -RUNPARTSDIRVAR=PAPERDIR -AC_SUBST(RUNPARTSDIRVAR) -AH_TEMPLATE(RUNPARTSDIRVAR, [Environment variable that overrides the default directory for run-parts]) -AC_DEFINE_UNQUOTED(RUNPARTSDIRVAR, "$RUNPARTSDIRVAR") - -PAPERSIZEVAR=PAPERSIZE -AC_SUBST(PAPERSIZEVAR) -AH_TEMPLATE(PAPERSIZEVAR, [Environment variable that overrides the default paper size]) -AC_DEFINE_UNQUOTED(PAPERSIZEVAR, "$PAPERSIZEVAR") - -dnl Create files -dnl ============ -AC_OUTPUT([ - Makefile - lib/Makefile - src/Makefile - src/paperconfig - man/Makefile - man/paperconf.1 - man/paperconfig.8 - man/papersize.5 - man/systempapername.3 -]) - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/Makefile.am b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/Makefile.am deleted file mode 100644 index 3375cc05d38..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ - -lib_LTLIBRARIES = libpaper.la -libpaper_la_SOURCES = dimen.c paper.c dimen.h paperspecs.h -libpaper_la_LDFLAGS = -version-info 2:2:1 -libpaper_la_CPPFLAGS = -D_REENTRANT - -BUILT_SOURCES = paperspecs.h - -include_HEADERS = paper.h - -EXTRA_DIST = paperspecs - -paperspecs.h: paperspecs Makefile - echo ' /* This file has been automaticaly generated.' >$@ - echo ' Edit paperspecs to make changes to the papers specifications. */' >>$@ - echo >>$@ - env LANG=C LC_ALL=C awk '{ factor = 1.0; \ - if ($$4 == "mm") factor = 72.0 / 25.4; \ - if ($$4 == "in") factor = 72.0; \ - printf(" { \"%s\", %5f, %5f },\n", \ - $$1, $$2 * factor, $$3 * factor); }' < $< >> $@ diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/dimen.c b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/dimen.c deleted file mode 100644 index 702d7937668..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/dimen.c +++ /dev/null @@ -1,72 +0,0 @@ - -/* - * Copyright (C) Yves Arrouye , 1996. - * - * Use under the GPL version 2. You are not allowed to remove this - * copyright notice. - * - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -#include "dimen.h" - -static struct { - const char* name; - float factor; -} units[] = { - { "in", 1. }, - { "ft", 12. }, - { "pt", 1. / 72. }, - { "m", 100. / 2.54 }, - { "dm", 10. / 2.54 }, - { "cm", 1. / 2.54 }, - { "mm", .1 / 2.54 }, - { 0 } -}; - -float unitfactor(const char* unit) -{ - int i; - - for (i = 0; units[i].name; ++i) { - if (!strcasecmp(units[i].name, unit)) { - return units[i].factor; - } - } - - return 0; -} - -int psdimension(const char* what, int* dim) -{ - const char* unit; - int dot = 0; - - if (!what || !*what) return -1; - - if (*(unit = what) == '-') ++unit; - - for (; isdigit((unsigned char)*unit) || (*unit == '.' && !dot++); ++unit); - - if (*unit && !isalpha((unsigned char)*unit)) { - return -1; - } else { - double base = atof(what); - double factor = unitfactor(unit); - - if (factor) { - *dim = base * factor * 72; - return 0; - } - - return 1; - } -} - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/dimen.h b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/dimen.h deleted file mode 100644 index d574ac3202d..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/dimen.h +++ /dev/null @@ -1,36 +0,0 @@ - -/* - * Copyright (C) Yves Arrouye , 1996. - * - * Use under the GPL version 2. You are not allowed to remove this - * copyright notice. - * - */ - -#ifndef DIMEN_H -#define DIMEN_H - -/* - * psdimension() converts a string to a number of points, accepting a - * string consisting of a number (eventually decimal but without any - * exponent) followed by a unit (one of `m', `dm', `cm', `mm', `ft', - * `in' or `pt', `in' being the default); on success it returs 0, - * otherwise it returns -1 if no number was found or 1 if the unit is - * incorrect. - * - */ - -#if __STDC__ - 0 == 0 -#define const -#endif - -#if __STDC__ - 0 == 0 -extern float unitfactor(); -extern int psdimension(); -#else -extern float unitfactor(const char* unit); -extern int psdimension(const char* dimspec, int* dim); -#endif - -#endif - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/paper.c b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/paper.c deleted file mode 100644 index 512dff88452..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/paper.c +++ /dev/null @@ -1,158 +0,0 @@ - -/* - * Copyright (C) Yves Arrouye , 1996. - * - * Use under the GPL version 2. You are not allowed to remove this - * copyright notice. - * - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#include -#include -#include -#include - -#include - -#include "paper.h" - -struct paper { - const char* name; - double pswidth, psheight; -}; - -/* This table will be searched in order: please put typical paper sizes - at the beginning of it. */ - -/* The paper names have been got from gs 3.68 gs_stadt.ps file, with - some personal additions. */ - -static struct paper papers[] = { -#include "paperspecs.h" - { 0 } -}; - -int paperinit(void) { - return 0; -} - -int paperdone(void) { - return 0; -} - -const char* papername(const struct paper* spaper) -{ - return spaper->name; -} - -double paperpswidth(const struct paper* spaper) -{ - return spaper->pswidth; -} - -double paperpsheight(const struct paper* spaper) -{ - return spaper->psheight; -} - -const struct paper* paperfirst(void) { - return papers; -} - -const struct paper* paperlast(void) { - static const struct paper* lastpaper = 0; - - const struct paper* next = papers; - while (next->name) { - lastpaper = next, ++next; - } - - return lastpaper; -} - -const struct paper* papernext(const struct paper* spaper) -{ - return (++spaper)->name ? spaper : 0; -} - -const struct paper* paperprev(const struct paper* spaper) -{ - return spaper == papers ? 0 : --spaper; -} - -const char* defaultpapersizefile(void) { - return NULL; -} - -const char* systempapersizefile(void) { - return NULL; -} - -const char* defaultpapername(void) { - return PAPERSIZE; -} - -char* systempapername(void) { - char* paperstr; - char* paperenv; - const char* paperdef; - const struct paper* pp; - - paperenv = getenv(PAPERSIZEVAR); - if ((paperenv != NULL) && (strchr(paperenv, '/') != NULL)) { - paperenv = NULL; - } - - if (paperenv) { - paperstr = malloc((strlen(paperenv) + 1) * sizeof(char)); - - if (! paperstr) return 0; - - if ((pp = paperinfo(paperenv))) - return strcpy(paperstr, pp->name); - else - return strcpy(paperstr, paperenv); - } - - paperdef = defaultpapername(); - paperstr = malloc((strlen(paperdef) + 1) * sizeof(char)); - - if (paperstr) - return strcpy(paperstr, paperdef); - else - return 0; -} - -const struct paper* paperinfo(const char* paper) -{ - const struct paper* pp; - - for (pp = paperfirst(); pp; pp = papernext(pp)) { - if (!strcasecmp(pp->name, paper)) { - return pp; - } - } - - return 0; -} - -const struct paper* paperwithsize(double pswidth, double psheight) -{ - const struct paper* pp; - - for (pp = paperfirst(); pp; pp = papernext(pp)) { - if (pp->pswidth == pswidth - && pp->psheight == psheight) { - return pp; - } - } - - return 0; -} - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/paper.h b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/paper.h deleted file mode 100644 index 993f7463c8c..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/paper.h +++ /dev/null @@ -1,73 +0,0 @@ - -/* - * Copyright (C) Yves Arrouye , 1996. - * - * Use under the GPL version 2. You are not allowed to remove this - * copyright notice. - * - */ - -#ifndef PAPER_H -#define PAPER_H - -/* - * systempapername() returns the preferred paper size got from either the - * PAPER environment variable or the /etc/papersize file. If 0 is - * returned, one should use the value of defaultpapername(). - * - * paperinfo() looks from the given paper name in a table of known sizes - * and returns 0 if it found it; if this is the case, the width and - * height arguments have been set to the correct values in points (one - * inch contains 72 points). The case of paper size is not significant. - * - */ - -#if !defined(__STDC__) - -#define __PAPER_CONST -#define __PAPER_PROTO(p) () - -#else - -#define __PAPER_CONST const -#define __PAPER_PROTO(p) p - -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -struct paper; - -extern int paperinit __PAPER_PROTO((void)); -extern int paperdone __PAPER_PROTO((void)); - -extern __PAPER_CONST char* papername __PAPER_PROTO((const struct paper*)); -extern double paperpswidth __PAPER_PROTO((const struct paper*)); -extern double paperpsheight __PAPER_PROTO((const struct paper*)); - -extern __PAPER_CONST char* defaultpapersizefile __PAPER_PROTO((void)); -extern __PAPER_CONST char* systempapersizefile __PAPER_PROTO((void)); -extern __PAPER_CONST char* defaultpapername __PAPER_PROTO((void)); -extern char* systempapername __PAPER_PROTO((void)); -extern __PAPER_CONST struct paper* paperinfo __PAPER_PROTO((const char*)); -extern __PAPER_CONST struct paper* paperwithsize __PAPER_PROTO(( - double pswidth, double psheight)); - -extern __PAPER_CONST struct paper* paperfirst __PAPER_PROTO((void)); -extern __PAPER_CONST struct paper* paperlast __PAPER_PROTO((void)); -extern __PAPER_CONST struct paper* papernext __PAPER_PROTO(( - const struct paper*)); -extern __PAPER_CONST struct paper* paperprev __PAPER_PROTO(( - const struct paper*)); - -#undef __PAPER_CONST -#undef __PAPER_PROTO - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/paperspecs b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/paperspecs deleted file mode 100644 index 6be0a46dc3a..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/paperspecs +++ /dev/null @@ -1,67 +0,0 @@ -a4 210 297 mm -letter 612 792 -note 612 792 -legal 612 1008 -executive 522 756 -halfletter 396 612 -halfexecutive 378 522 -11x17 792 1224 -statement 396 612 -folio 612 936 -quarto 610 780 -10x14 720 1008 -ledger 1224 792 -tabloid 792 1224 -a0 841 1189 mm -a1 594 841 mm -a2 420 594 mm -a3 297 420 mm -a5 148 210 mm -a6 105 148 mm -a7 74 105 mm -a8 52 74 mm -a9 37 52 mm -a10 26 37 mm -b0 1000 1414 mm -b1 707 1000 mm -b2 500 707 mm -b3 353 500 mm -b4 250 353 mm -b5 176 250 mm -b6 125 176 mm -b7 88 125 mm -b8 62 88 mm -b9 44 62 mm -b10 31 44 mm -c2 458 648 mm -c3 324 458 mm -c4 229 354 mm -c5 162 229 mm -c6 114 162 mm -c7 81 114 mm -c8 57 81 mm -jisb0 1030 1456 mm -jisb1 728 1030 mm -jisb2 515 728 mm -jisb3 364 515 mm -jisb4 257 364 mm -jisb5 182 257 mm -jisb6 128 182 mm -jisb7 91 128 mm -jisb8 64 91 mm -jisb9 45 64 mm -jisb10 32 45 mm -b5var 182 230 mm -DL 110 220 mm -Comm10 297 684 -Monarch 279 540 -archE 2592 3456 -archD 1728 2592 -archC 1296 1728 -archB 864 1296 -archA 648 864 -flsa 612 936 -flse 612 936 -csheet 1224 1584 -dsheet 1584 2448 -esheet 2448 3168 diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/paperspecs.h b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/paperspecs.h deleted file mode 100644 index a94ec36dafb..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/lib/paperspecs.h +++ /dev/null @@ -1,70 +0,0 @@ - /* This file has been automaticaly generated. - Edit paperspecs to make changes to the papers specifications. */ - - { "a4", 595.275591, 841.889764 }, - { "letter", 612.000000, 792.000000 }, - { "note", 612.000000, 792.000000 }, - { "legal", 612.000000, 1008.000000 }, - { "executive", 522.000000, 756.000000 }, - { "halfletter", 396.000000, 612.000000 }, - { "halfexecutive", 378.000000, 522.000000 }, - { "11x17", 792.000000, 1224.000000 }, - { "statement", 396.000000, 612.000000 }, - { "folio", 612.000000, 936.000000 }, - { "quarto", 610.000000, 780.000000 }, - { "10x14", 720.000000, 1008.000000 }, - { "ledger", 1224.000000, 792.000000 }, - { "tabloid", 792.000000, 1224.000000 }, - { "a0", 2383.937008, 3370.393701 }, - { "a1", 1683.779528, 2383.937008 }, - { "a2", 1190.551181, 1683.779528 }, - { "a3", 841.889764, 1190.551181 }, - { "a5", 419.527559, 595.275591 }, - { "a6", 297.637795, 419.527559 }, - { "a7", 209.763780, 297.637795 }, - { "a8", 147.401575, 209.763780 }, - { "a9", 104.881890, 147.401575 }, - { "a10", 73.700787, 104.881890 }, - { "b0", 2834.645669, 4008.188976 }, - { "b1", 2004.094488, 2834.645669 }, - { "b2", 1417.322835, 2004.094488 }, - { "b3", 1000.629921, 1417.322835 }, - { "b4", 708.661417, 1000.629921 }, - { "b5", 498.897638, 708.661417 }, - { "b6", 354.330709, 498.897638 }, - { "b7", 249.448819, 354.330709 }, - { "b8", 175.748031, 249.448819 }, - { "b9", 124.724409, 175.748031 }, - { "b10", 87.874016, 124.724409 }, - { "c2", 1298.267717, 1836.850394 }, - { "c3", 918.425197, 1298.267717 }, - { "c4", 649.133858, 1003.464567 }, - { "c5", 459.212598, 649.133858 }, - { "c6", 323.149606, 459.212598 }, - { "c7", 229.606299, 323.149606 }, - { "c8", 161.574803, 229.606299 }, - { "jisb0", 2919.685039, 4127.244094 }, - { "jisb1", 2063.622047, 2919.685039 }, - { "jisb2", 1459.842520, 2063.622047 }, - { "jisb3", 1031.811024, 1459.842520 }, - { "jisb4", 728.503937, 1031.811024 }, - { "jisb5", 515.905512, 728.503937 }, - { "jisb6", 362.834646, 515.905512 }, - { "jisb7", 257.952756, 362.834646 }, - { "jisb8", 181.417323, 257.952756 }, - { "jisb9", 127.559055, 181.417323 }, - { "jisb10", 90.708661, 127.559055 }, - { "b5var", 515.905512, 651.968504 }, - { "DL", 311.811024, 623.622047 }, - { "Comm10", 297.000000, 684.000000 }, - { "Monarch", 279.000000, 540.000000 }, - { "archE", 2592.000000, 3456.000000 }, - { "archD", 1728.000000, 2592.000000 }, - { "archC", 1296.000000, 1728.000000 }, - { "archB", 864.000000, 1296.000000 }, - { "archA", 648.000000, 864.000000 }, - { "flsa", 612.000000, 936.000000 }, - { "flse", 612.000000, 936.000000 }, - { "csheet", 1224.000000, 1584.000000 }, - { "dsheet", 1584.000000, 2448.000000 }, - { "esheet", 2448.000000, 3168.000000 }, diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/Makefile.am b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/Makefile.am deleted file mode 100644 index f9d579a645c..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -man_MANS = \ - paperconf.1 \ - defaultpapername.3 \ - defaultpapersizefile.3 \ - paperdone.3 \ - paperfirst.3 \ - paperinfo.3 \ - paperinit.3 \ - paperlast.3 \ - papernext.3 \ - paperprev.3 \ - paperpsheight.3 \ - paperpsname.3 \ - paperpswidth.3 \ - paperwithsize.3 \ - systempapername.3 \ - systempapersizefile.3 \ - papersize.5 \ - paperconfig.8 - -EXTRA_DIST = \ - paperconf.1.in \ - systempapername.3.in \ - papersize.5.in \ - paperconfig.8.in diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/defaultpapername.3 b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/defaultpapername.3 deleted file mode 100644 index 882f4bbf27e..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/defaultpapername.3 +++ /dev/null @@ -1,2 +0,0 @@ -.so man3/systempapername.3 - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/defaultpapersizefile.3 b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/defaultpapersizefile.3 deleted file mode 100644 index 390a56bdfeb..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/defaultpapersizefile.3 +++ /dev/null @@ -1,2 +0,0 @@ -.so man3/systempapersizefile.3 - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperconf.1.in b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperconf.1.in deleted file mode 100644 index 53cecd83bdd..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperconf.1.in +++ /dev/null @@ -1,76 +0,0 @@ -.TH PAPERCONF 1 "25 October 2013" -.SH NAME -.B paperconf -\- print paper configuration information -.SH SYNOPSIS -\fBpaperconf\fR -[\fB\-z\fR] -[\fB\-n\fR|\fB\-N\fR] -[\fB\-s\fR|\fB\-w\fR|\fB\-h\fR] -[\fB\-c\fR|\fB\-m\fR|\fB\-i\fR] -[[\fB\-p\fR] \fIpaper\fR|\fB\-d\fR|\fB\-a\fR] -.SH DESCRIPTION -.B paperconf -prints information about a given paper. -The information that can be obtained is the name of the paper, its -size and its width or height. -When called without arguments, -.B paperconf -prints the name of the system- or user-specified paper, obtained by -looking in order at the -.B @PAPERSIZEVAR@ -environment variable -or by using -.B a4 -as a fall-back value. -By default, width and height of the paper are printed in PostScript points. -.SH OPTIONS -.TP -.BI \-p " paper" -Specify the name of the -.I paper -about which information is asked. -.TP -.B \-d -Use the default builtin paper name. -.TP -.B \-a -Consider all known paper names. -.TP -.B \-z -If the paper name is unknown, print it but issue a message on the -standard error and exit with a non-zero code. -.TP -.B \-n -Print the name of the paper. -.TP -.B \-N -Print the name of the paper with the first letter capitalized. -.TP -.B \-s -Print the size (width followed by height) of the paper. -.TP -.B \-w -Print the width of the paper. -.TP -.B \-h -Print the height of the paper. -.TP -.B \-c -Use centimetres as unit for paper size. -.TP -.B \-m -Use millimetres as unit for paper size. -.TP -.B \-i -Use inches as unit for paper size. - -.SH ENVIRONMENT -.TP 20 -.B @PAPERSIZEVAR@ -Paper size to use. -.SH AUTHOR -Yves Arrouye - -Modified for TeX Live by Peter Breitenlohner - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperconfig.8.in b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperconfig.8.in deleted file mode 100644 index 1c7ce4d9159..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperconfig.8.in +++ /dev/null @@ -1,73 +0,0 @@ -.\" paperconfig.8, Copyright (C) 1996, Yves Arrouye -.TH PAPERCONFIG 8 "5 January 2005" "Debian/Linux" "Linux Administrator's Manual" -.SH NAME -.B paperconfig -\- configure the system default paper size -.SH SYNOPSIS -.B paperconfig -[ -.BR \-v\fP, \fB\-\-version -] -[ -.BR \-h\fP, \fB\-\-help -] -[ -.BI "\-p\fP, \fB\-\-paper" " papername" -| -.B \-\-force -] -.SH DESCRIPTION -.B paperconfig -sets the system (or default) paper to be used by tools using the -.B papersize -file. -It can either ask interactively for the paper to use or be called -non-interactively by scripts. -.PP -When the paper size has been changed, -.B paperconfig -notifies other packages of the change by running the scripts in the -.I @RUNPARTSDIR@ -directory. -.SH OPTIONS -.TP -.BR \-v\fP, \fB\-\-version -Print the version of -.B paperconfig -and exit. -.TP -.BR \-h\fP, \fB\-\-help -Print help about usage and exit. -.TP -.BI "\-p\fP, \fB\-\-paper" " papername" -Use -.I papername -if possible. If -.I papername -is not a valid paper, print an error message and exit. -.TP -.B \-\-force -Force interactive selection of the system paper even if the actual paper -is a valid one. -.SH ENVIRONMENT -.B PAPERCONF -Full path to a file containing the paper size to use; this file will -be rewritten with the system paper size. -.SH FILES -.TP 20 -.B @PAPERCONF@ -Contains the name of the system-wide default paper size to be used -if the -.B @PAPERSIZEVAR@ -variable is not set. -.TP 20 -.B @RUNPARTSDIR@ -Directory of scripts to run after the paper size has been changed. -This package puts no scripts here, but other packages may. -.SH AUTHOR -Yves Arrouye -.SH SEE ALSO -.BR paperconf (1) -.br -.BR papersize (5) - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperdone.3 b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperdone.3 deleted file mode 100644 index d1098b8c116..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperdone.3 +++ /dev/null @@ -1,2 +0,0 @@ -.so man3/paperinit.3 - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperfirst.3 b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperfirst.3 deleted file mode 100644 index 0ba4c23059d..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperfirst.3 +++ /dev/null @@ -1,2 +0,0 @@ -.so man3/paperinfo.3 - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperinfo.3 b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperinfo.3 deleted file mode 100644 index 68f5bf75f98..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperinfo.3 +++ /dev/null @@ -1,65 +0,0 @@ -.TH PAPERINFO 3 "24 September 1996" -.SH NAME -paperinfo, paperwithsize, paperfirst, paperlast, papernext, paperprev -\- return informations about a paper -.SH SYNOPSYS -.nf -.B #include -.sp -.B "const struct paper* paperinfo(const char* papername)" -.B "const struct paper* paperwithsize(double psw, double psh)" -.sp -.B "char* papername(const struct paper*)" -.B "double paperpswidth(const struct paper*)" -.B "double paperpsheigth(const struct paper*)" -.sp -.B "const struct paper* paperfirst(void)" -.B "const struct paper* papernext(const struct paper* pinfo)" -.B "const struct paper* paperprev(const struct paper* pinfo)" -.B "const struct paper* paperlast(void)" -.fi -.SH DESCRIPTION -.B paperinfo() -returns a pointer to a -.B struct paper -containing informations about the paper with name -.B papername -. -.B paperwithsize() -looks for a paper whose width and height is -.B psw -and -.B psh -in PostScript points, and return a pointer to a -.B struct paper -corresponding to the paper found. -.PP -.B papername() -returns the name of a paper described by an opaque struct paper object -. -.B paperpswidth() -returns the width, in PostScript points, of a paper described by an -opaque struct paper object -. -.B paperpsheight() -returns the height, in PostScript points, of a paper described by an -opaque struct paper object -. -.PP -.B paperfirst() -and -.B paperlast() -return the first and last entries for papers. -Iteration from one entry to the next or the previous one can be done -with -.B papernext() -and -.B paperprev() -respectively. -.SH SEE ALSO -.BR paperinit (3), -.BR paperdone (3) -.BR defaultpapername (3) -.br -.BR papersize (5) - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperinit.3 b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperinit.3 deleted file mode 100644 index e1f71dfdf99..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperinit.3 +++ /dev/null @@ -1,27 +0,0 @@ -.TH PAPERINIT 3 "24 September 1996" -.SH NAME -paperinit, paperdone \- begin and end using the paper library -.SH SYNOPSYS -.nf -.B #include -.sp -.B "void paperinit(void)" -.B "void paperdone(void)" -.fi -.SH DESCRIPTION -.B paperinit() -initializes the paper library, allocating any resources that are -necessary for its use. -This function must be called before any other function of the paper -library is used. -.PP -.B paperdone() -frees any resources that were allocated for the paper library. -No function of the library should be called after a call to this -function. -.SH SEE ALSO -.BR defaultpapername (3), -.BR paperinfo (3) -.br -.BR papersize (5) - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperlast.3 b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperlast.3 deleted file mode 100644 index 0ba4c23059d..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperlast.3 +++ /dev/null @@ -1,2 +0,0 @@ -.so man3/paperinfo.3 - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/papernext.3 b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/papernext.3 deleted file mode 100644 index 0ba4c23059d..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/papernext.3 +++ /dev/null @@ -1,2 +0,0 @@ -.so man3/paperinfo.3 - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperprev.3 b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperprev.3 deleted file mode 100644 index 0ba4c23059d..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperprev.3 +++ /dev/null @@ -1,2 +0,0 @@ -.so man3/paperinfo.3 - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperpsheight.3 b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperpsheight.3 deleted file mode 100644 index 0ba4c23059d..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperpsheight.3 +++ /dev/null @@ -1,2 +0,0 @@ -.so man3/paperinfo.3 - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperpsname.3 b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperpsname.3 deleted file mode 100644 index 0ba4c23059d..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperpsname.3 +++ /dev/null @@ -1,2 +0,0 @@ -.so man3/paperinfo.3 - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperpswidth.3 b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperpswidth.3 deleted file mode 100644 index 0ba4c23059d..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperpswidth.3 +++ /dev/null @@ -1,2 +0,0 @@ -.so man3/paperinfo.3 - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/papersize.5.in b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/papersize.5.in deleted file mode 100644 index f0f71934890..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/papersize.5.in +++ /dev/null @@ -1,63 +0,0 @@ -.TH PAPERSIZE 5 -.SH NAME -.B papersize -\- specify preferred paper size -.SH SYNOPSYS -.B @PAPERCONF@ -.SH DESCRIPTION -The -.B papersize -file is used to specify the preferred paper size to use by available -commands and programs generating documents. -.PP -The format of this file is extremely simple: whitespace and anything -starting with `#' is ignored, and the name of the paper is the first -string found; the case in the name of the paper does not import (see -.B CAVEATS -section however). -.SH "PAPER NAMES" -The following names are commonly understood by programs: -.B a3\fP,\fB a4\fP,\fB a5\fP, -.B b5\fP,\fB letter\fP,\fB legal\fP,\fB executive\fP,\fB note\fP -and -.BR 11x17 . -.PP -Additional paper names that one may encounter are: -.B a0\fP,\fB a1\fP,\fB a2\fP,\fB a6\fP,\fB a7\fP,\fB a8\fP,\fB a9\fP,\fB a10\fP, -.B b0\fP,\fB b1\fP,\fB b2\fP,\fB b3\fP,\fB b4\fP,\fB tabloid\fP, -.B statement\fP,\fB note\fP, -.B halfletter\fP,\fB halfexecutive\fP,\fB folio\fP,\fB quarto\fP,\fB ledger\fP, -.B archA\fP,\fB archB\fP,\fB archC\fP,\fB archD\fP,\fB archE\fP,\fB flsa\fP, -.B flse\fP,\fB csheet\fP,\fB dsheet\fP,\fB esheet\fP -and -.BR 10x14 . -.PP -The value of the -.B papersize -file can be overrideen by -looking in order at the -.B @PAPERSIZEVAR@ -environment variable, then at the contents of the file specified by the -.B @PAPERCONFVAR@ -environment variable. If the -.B papersize -file does not exist, programs using the paper library default to using -.B letter -as a fall-back value -.SH CAVEATS -This manual page documents the format of the -.B papersize -file that is read by the -.B libpaper -library. -Some programs that read this file do not yet use the library and may have -trouble ignoring whitespace and comments in the file; they may also -require that the paper names use a specific capitalization. -.SH DOCUMENTATION -Yves Arrouye -.SH SEE ALSO -.BR paperconf (1) -.br -.BR paperconfig (8) - - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperwithsize.3 b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperwithsize.3 deleted file mode 100644 index 0ba4c23059d..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/paperwithsize.3 +++ /dev/null @@ -1,2 +0,0 @@ -.so man3/paperinfo.3 - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/systempapername.3.in b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/systempapername.3.in deleted file mode 100644 index 033e0309756..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/systempapername.3.in +++ /dev/null @@ -1,53 +0,0 @@ -.TH SYSTEMPAPERNAME 3 "17 September 2001" -.SH NAME -systempapername, defaultpapername, systempapersizefile, -defaultpapersizefile \- return names for managing system paper -information -.SH SYNOPSYS -.nf -.B #include -.sp -.B "const char* systempapername(void)" -.B "const char* defaultpapername(void)" -.sp -.B "const char* systempapersizefile(void)" -.B "const char* defaultpapersizefile(void)" -.fi -.SH DESCRIPTION -.B systempapername() -returns the name of the default paper to be used by a program. -This name is obtained by looking in that order at the -.B @PAPERCONFVAR@ -environment variable, at the contents of the file returned by -.B systempapersizefile() -or by using -.B defaultpapername() -as a last chance. -.PP -.B defaultpapername() -returns the name of the default paper to use if it is impossible to get -its name from the environment. -.PP -.B systempapersizefile() -returns the path of the papersize file to use. -This path is obtained by looking at the -.B @PAPERCONFVAR@ -environment variable or by calling -.BR defaultpapersizefile() . -.PP -.B defaultpapersizefile -returns the path of the default papersize file. -.SH ENVIRONMENT -.TP 20 -.B @PAPERSIZEVAR@ -Paper size to use regardless of what the papersize file contains. -.TP 20 -.B @PAPERCONFVAR@ -Full path to a file containing the paper size to use. -.SH FILES -.TP 20 -.B @PAPERCONF@ -Contains the name of the system-wide default paper size to be used. -.SH SEE ALSO -.BR papersize (5) - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/systempapersizefile.3 b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/systempapersizefile.3 deleted file mode 100644 index 42182084272..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/man/systempapersizefile.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/systempapername.3 diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/src/Makefile.am b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/src/Makefile.am deleted file mode 100644 index 5d7bc85170e..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/src/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ - -bin_PROGRAMS = paperconf -paperconf_LDADD = ../lib/libpaper.la -paperconf_CPPFLAGS = -I$(top_srcdir)/lib - -sbin_SCRIPTS = paperconfig - -EXTRA_DIST = paperconfig.in diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/src/paperconf.c b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/src/paperconf.c deleted file mode 100644 index bbd43802512..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/src/paperconf.c +++ /dev/null @@ -1,234 +0,0 @@ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#include -#include -#include -#include -#include -#include - -#include - - -/* needed for GNU/Hurd */ -#ifndef MAXPATHLEN -#define MAXPATHLEN 4096 -#endif - -static void usage(const char* name) -{ - fprintf(stderr, - "usage: %s [ [ -p ] papername | -d | -a ] [ -z ] [ -n | -N ] [ -s | -w | -h ] [ -c | -m | -i ]\n", - name); - exit(1); -} - -#define OPT_NAME 1 -#define OPT_UPPERNAME 2 -#define OPT_WIDTH 4 -#define OPT_HEIGHT 8 -#define OPT_CM 16 -#define OPT_MM 32 -#define OPT_INCH 64 -#define OPT_CONTINUE 128 - -#define OPT_UNIT (OPT_CM | OPT_MM | OPT_INCH) - -#define INCHxCM 2.54 - -static void printinfo(const struct paper* paper, int options) -{ - int pr = 0; - - if ((options & ~(OPT_CONTINUE)) == 0) { - options = OPT_NAME; - } - - if (options & OPT_NAME) { - printf("%s", papername(paper)); - pr = 1; - } else if (options & OPT_UPPERNAME) { - if (islower((unsigned char)*papername(paper))) { - printf("%c%s", toupper((unsigned char)*papername(paper)), papername(paper) + 1); - } else { - printf("%s", papername(paper)); - } - pr = 1; - } - - if (options & OPT_WIDTH) { - if (pr) putchar(' '); - if (options & OPT_CM) - printf("%g cm", paperpswidth(paper) / 72.0 * INCHxCM ); - else if (options & OPT_MM) - printf("%g mm", paperpswidth(paper) / 72.0 * 10 * INCHxCM ); - else if (options & OPT_INCH) - printf("%g\"", paperpswidth(paper) / 72.0 ); - else - printf("%g", paperpswidth(paper) ); - pr = 1; - } - if (options & OPT_HEIGHT) { - if (pr) putchar(' '); - if (options & OPT_CM) - printf("%g cm", paperpsheight(paper) / 72.0 * INCHxCM ); - else if (options & OPT_MM) - printf("%g mm", paperpsheight(paper) / 72.0 * 10 * INCHxCM ); - else if (options & OPT_INCH) - printf("%g\"", paperpsheight(paper) / 72.0 ); - else - printf("%g", paperpsheight(paper) ); - pr = 1; - } - - putchar('\n'); -} - -int main(int argc, char** argv) -{ - int c; - - int all = 0; - const char* paper = 0; - unsigned options = 0; - - const char* progname; - - progname = strrchr(*argv, '/'); - if (progname) { - ++progname; - } else { - progname = *argv; - } - - while ((c = getopt(argc, argv, "adznNswhcmip:")) != EOF) { - switch (c) { - case 'a': - if (paper || all) { - usage(progname); - } - all = 1; - break; - - case 'd': - if (paper || all) { - usage(progname); - } - paper = defaultpapername(); - break; - - case 'p': - if (paper || all) { - usage(progname); - } - paper = optarg; - break; - - case 'z': - options |= OPT_CONTINUE; - break; - - case 'n': - if (options & OPT_UPPERNAME) usage(progname); - options |= OPT_NAME; - break; - - case 'N': - if (options & OPT_NAME) usage(progname); - options |= OPT_UPPERNAME; - break; - - case 's': - options |= OPT_WIDTH | OPT_HEIGHT; - break; - - case 'w': - options |= OPT_WIDTH; - break; - - case 'h': - options |= OPT_HEIGHT; - break; - - case 'c': - if (options & OPT_UNIT) usage(progname); - options |= OPT_CM; - break; - - case 'm': - if (options & OPT_UNIT) usage(progname); - options |= OPT_MM; - break; - - case 'i': - if (options & OPT_UNIT) usage(progname); - options |= OPT_INCH; - break; - - default: - usage(progname); - } - } - - if (optind < argc - 1 || (paper && optind != argc)) { - usage(progname); - } else if (optind != argc) { - paper = argv[optind]; - } - - paperinit(); - - if (all) { - const struct paper* papers; - - for (papers = paperfirst(); papers; papers = papernext(papers)) { - printinfo(papers, options); - } - } else { - const struct paper* syspaper; - - if (!paper) paper = systempapername(); - if (!paper) paper = defaultpapername(); - if (!paper) { - char errmsg[2 * MAXPATHLEN + 64]; - - sprintf(errmsg, "%s: cannot get paper size from %s", - progname, systempapersizefile()); - - if (errno) { - perror(errmsg); - } else { - fputs(errmsg, stderr); - } - - paperdone(); - - exit(3); - } - - syspaper = paperinfo(paper); - - if (syspaper) { - printinfo(syspaper, options); - } else { - fprintf(stderr, "%s: unknown paper `%s'\n", progname, paper); - if (options & OPT_CONTINUE) { - puts(paper); - } - - paperdone(); - - exit(2); - } - } - - paperdone(); - - return 0; -} - diff --git a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/src/paperconfig.in b/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/src/paperconfig.in deleted file mode 100644 index 9548b4aa2f9..00000000000 --- a/Build/source/libs/libpaper/libpaper-1.1.24+nmu2/src/paperconfig.in +++ /dev/null @@ -1,227 +0,0 @@ -#! /bin/sh - -# paperconfig: configuration of system paper name -# -# Copyright (C) 1996, Yves Arrouye -# 2001, Adrian Bunk - -usage() { - if [ "$1" = -h ] - then - exec 1>&2 - echo -n U - else - echo -n u - fi - - echo "sage: `basename $0` [ -v, --version ] [ -h, --help ] [ -p, --paper name | --force ]" - - if [ "$1" = -h ] - then - cat <" - exit 0 - ;; - -h|--help) - usage -h - ;; - -p|--paper) - test $# -gt 1 || usage - paper="$2" - shift - ;; - --force) - force=1 - ;; - *) - usage - ;; - esac - shift -done - -invalidpaper() { - ! paperconf "$1" 2>/dev/null 1>&2 -} - -format() { - _maxwidth=$1; shift - _start="$1"; shift - - _cline= - - for w - do - if [ `echo "$_start$_cline$w " | wc -c` -ge 0$_maxwidth ] - then - echo "$_cline" - _cline= - _start= - fi - _cline="$_cline$w " - done - - if [ -n "$_cline" ] - then - echo "$_cline" - fi - - unset _maxwidth _cline _start -} - -# "chmod 644" added below, to assure that the conf file is created -# with the right access permissions (MP 13/05/2000) - -setpaper() { - paperright=`paperconf "$1" 2>/dev/null` - - ok=0 - - if 2>/dev/null echo "$paperright" >${@PAPERCONFVAR@}.new - then - if 2>/dev/null mv -f ${@PAPERCONFVAR@}.new $@PAPERCONFVAR@ - then - if 2>/dev/null chmod 644 $@PAPERCONFVAR@ - then - ok=1 - fi - fi - fi - - if [ $ok -eq 0 ] - then - echo `basename $0`: cannot create $@PAPERCONFVAR@ - exit 2 - else - # - # Added code for calling back applications when - # papersize changes. See bug #345466 - # eppesuig@debian.org, 2006-01-05 - if [ -d ${@RUNPARTSDIRVAR@} ] - then - run-parts ${@RUNPARTSDIRVAR@} - fi - fi -} - -if [ ! -z "$paper" ] -then - if invalidpaper $paper - then - >&2 echo `basename $0`: \"$paper\" is not a known paper name - exit 3 - fi - setpaper "$paper" - exit 0 -fi - -knownpapers="`paperconf -a`" - -prompt= -width=72 - -# "|| true" added below, to assure that the script does not fail even if -# called with bash -e. (MP 22/08/98) - -paper=`paperconf 2>/dev/null || true` -dftpaper=`paperconf -d` - -if [ $force -eq 1 ] || [ ! -e $@PAPERCONFVAR@ ] || invalidpaper $paper -then - papers="`format $width \"\" $knownpapers`" - echo - - if [ -x /usr/bin/pager ] - then - : ${PAGER:=/usr/bin/pager} - fi - if [ -x /bin/more ] - then - : ${PAGER:=/bin/more} - fi - : ${PAGER:=cat} - - LESS="-X -E $LESS" - export LESS - - ( - cat </dev/null`" != "$paper" ] || grep -q "[# ]" $@PAPERCONFVAR@ -then - setpaper "$paper" -fi - -exit 0 - diff --git a/Build/source/libs/libpaper/libpaper-PATCHES/ChangeLog b/Build/source/libs/libpaper/libpaper-PATCHES/ChangeLog new file mode 100644 index 00000000000..88935dabef6 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-PATCHES/ChangeLog @@ -0,0 +1,16 @@ +2014-06-18 Peter Breitenlohner + + * patch-04-unsigned (new): Avoid undefined behaviour. + +2013-11-20 Peter Breitenlohner + + * patch-03-getopt (new): Adapt paperconf.1 to non-GNU getopt. + +2013-10-24 Peter Breitenlohner + + Imported libpaper-1.1.24+nmu2 source tree from: + ftp://ftp.de.debian.org/debian/pool/main/libp/libpaper + + * patch-01-JIS (new): Add JIS paper specs. + * patch-02-TL (new): No /etc/papersize for TeX Live. + diff --git a/Build/source/libs/libpaper/libpaper-PATCHES/TL-Changes b/Build/source/libs/libpaper/libpaper-PATCHES/TL-Changes new file mode 100644 index 00000000000..779b6d4ff35 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-PATCHES/TL-Changes @@ -0,0 +1,23 @@ +Changes applied to the libpaper-1.1.24+nmu2/ tree as obtained from: + ftp://ftp.de.debian.org/debian/pool/main/libp/libpaper/ + +Removed: + COPYING + INSTALL + Makefile.in + aclocal.m4 + compile + config.guess + config.sub + configure + depcomp + install-sh + ltmain.sh + missing + mkinstalldirs + lib/Makefile.in + man/Makefile.in + src/Makefile.in + +Removed unused dirs: + debian diff --git a/Build/source/libs/libpaper/libpaper-PATCHES/patch-01-JIS b/Build/source/libs/libpaper/libpaper-PATCHES/patch-01-JIS new file mode 100644 index 00000000000..ce2016ad995 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-PATCHES/patch-01-JIS @@ -0,0 +1,44 @@ +diff -ur libpaper-1.1.24+nmu2.orig/lib/paperspecs libpaper-1.1.24+nmu2/lib/paperspecs +--- libpaper-1.1.24+nmu2.orig/lib/paperspecs 2012-05-03 21:05:12.000000000 +0200 ++++ libpaper-1.1.24+nmu2/lib/paperspecs 2013-10-24 11:32:28.000000000 +0200 +@@ -40,6 +40,18 @@ + c6 114 162 mm + c7 81 114 mm + c8 57 81 mm ++jisb0 1030 1456 mm ++jisb1 728 1030 mm ++jisb2 515 728 mm ++jisb3 364 515 mm ++jisb4 257 364 mm ++jisb5 182 257 mm ++jisb6 128 182 mm ++jisb7 91 128 mm ++jisb8 64 91 mm ++jisb9 45 64 mm ++jisb10 32 45 mm ++b5var 182 230 mm + DL 110 220 mm + Comm10 297 684 + Monarch 279 540 +diff -ur libpaper-1.1.24+nmu2.orig/lib/paperspecs.h libpaper-1.1.24+nmu2/lib/paperspecs.h +--- libpaper-1.1.24+nmu2.orig/lib/paperspecs.h 2012-05-04 12:11:27.000000000 +0200 ++++ libpaper-1.1.24+nmu2/lib/paperspecs.h 2013-10-24 11:32:42.000000000 +0200 +@@ -43,6 +43,18 @@ + { "c6", 323.149606, 459.212598 }, + { "c7", 229.606299, 323.149606 }, + { "c8", 161.574803, 229.606299 }, ++ { "jisb0", 2919.685039, 4127.244094 }, ++ { "jisb1", 2063.622047, 2919.685039 }, ++ { "jisb2", 1459.842520, 2063.622047 }, ++ { "jisb3", 1031.811024, 1459.842520 }, ++ { "jisb4", 728.503937, 1031.811024 }, ++ { "jisb5", 515.905512, 728.503937 }, ++ { "jisb6", 362.834646, 515.905512 }, ++ { "jisb7", 257.952756, 362.834646 }, ++ { "jisb8", 181.417323, 257.952756 }, ++ { "jisb9", 127.559055, 181.417323 }, ++ { "jisb10", 90.708661, 127.559055 }, ++ { "b5var", 515.905512, 651.968504 }, + { "DL", 311.811024, 623.622047 }, + { "Comm10", 297.000000, 684.000000 }, + { "Monarch", 279.000000, 540.000000 }, diff --git a/Build/source/libs/libpaper/libpaper-PATCHES/patch-02-TL b/Build/source/libs/libpaper/libpaper-PATCHES/patch-02-TL new file mode 100644 index 00000000000..601ccb9d252 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-PATCHES/patch-02-TL @@ -0,0 +1,171 @@ +diff -ur libpaper-1.1.24+nmu2.orig/lib/paper.c libpaper-1.1.24+nmu2/lib/paper.c +--- libpaper-1.1.24+nmu2.orig/lib/paper.c 2010-04-24 14:12:11.000000000 +0200 ++++ libpaper-1.1.24+nmu2/lib/paper.c 2013-10-24 15:45:37.955710461 +0200 +@@ -87,24 +87,11 @@ + } + + const char* defaultpapersizefile(void) { +- return PAPERCONF; ++ return NULL; + } + + const char* systempapersizefile(void) { +- const char* paperconf = getenv(PAPERCONFVAR); +-/* +-Previously PAPERCONFVAR used to contain a paper name and PAPERSIZEVAR +-contained a file path. Now they're reversed. If we don't find a '/' +-in PAPERCONFVAR, fall-back to the old behaviour. +-*/ +- +- if ((paperconf != NULL) && (strchr(paperconf, '/') == NULL)) { +- paperconf = getenv(PAPERSIZEVAR); +- if ((paperconf != NULL) && (strchr(paperconf, '/') == NULL)) +- paperconf = NULL; +- } +- +- return paperconf ? paperconf : defaultpapersizefile(); ++ return NULL; + } + + const char* defaultpapername(void) { +@@ -112,26 +99,14 @@ + } + + char* systempapername(void) { +- const char* paperconf; + char* paperstr; + char* paperenv; + const char* paperdef; +- FILE* ps; +- struct stat statbuf; + const struct paper* pp; +- int c; +- +-/* +-Previously PAPERSIZEVAR used to contain a file path and PAPERCONFVAR +-contained a paper name. Now they're reversed. If we find a '/' in +-PAPERSIZEVAR, fall-back to the old behaviour. +-*/ + + paperenv = getenv(PAPERSIZEVAR); + if ((paperenv != NULL) && (strchr(paperenv, '/') != NULL)) { +- paperenv = getenv(PAPERCONFVAR); +- if ((paperenv != NULL) && (strchr(paperenv, '/') != NULL)) +- paperenv = NULL; ++ paperenv = NULL; + } + + if (paperenv) { +@@ -145,61 +120,6 @@ + return strcpy(paperstr, paperenv); + } + +- paperconf = systempapersizefile(); +- if (paperconf && stat(paperconf, &statbuf) == -1) return 0; +- +- if (!paperconf) paperconf = defaultpapersizefile(); +- +- if ((stat(paperconf, &statbuf) != -1) && +- (ps = fopen(paperconf, "r"))) { +- +- while ((c = getc(ps)) != EOF) { +- if (c == '#') { +- while ((c = getc(ps)) != EOF && c != '\n'); +- if (c == EOF) { +- break; +- } +- } else if (!isspace(c)) { +- unsigned n = 0, m = 64; +- char* papername = malloc(m * sizeof(char)); +- +- if (!papername) { +- fclose(ps); +- return 0; +- } +- +- do { +- if (n == m-1) { +- char* newpaper = realloc(papername, +- (m *= 2) * sizeof(char)); +- if (!newpaper) { +- free(papername); +- fclose(ps); +- return 0; +- } +- papername = newpaper; +- } +- papername[n++] = c; +- } while ((c = getc(ps)) != EOF && !isspace(c)); +- +- papername[n] = 0; +- +- fclose(ps); +- +- paperstr = malloc((strlen(papername) + 1) * sizeof(char)); +- if (! paperstr) return 0; +- +- strcpy(paperstr, papername); +- free(papername); +- +- if ((pp = paperinfo(paperstr))) +- return strcpy(paperstr, pp->name); +- else +- return paperstr; +- } +- } +- } +- + paperdef = defaultpapername(); + paperstr = malloc((strlen(paperdef) + 1) * sizeof(char)); + +diff -ur libpaper-1.1.24+nmu2.orig/man/paperconf.1.in libpaper-1.1.24+nmu2/man/paperconf.1.in +--- libpaper-1.1.24+nmu2.orig/man/paperconf.1.in 2012-05-03 21:05:12.000000000 +0200 ++++ libpaper-1.1.24+nmu2/man/paperconf.1.in 2013-10-25 08:27:54.783329615 +0200 +@@ -1,4 +1,4 @@ +-.TH PAPERCONF 1 "24 April 2001" ++.TH PAPERCONF 1 "25 October 2013" + .SH NAME + .B paperconf + \- print paper configuration information +@@ -46,13 +46,10 @@ + prints the name of the system- or user-specified paper, obtained by + looking in order at the + .B @PAPERSIZEVAR@ +-environment variable, at the contents of the file specified by the +-.B @PAPERCONFVAR@ +-environment variable, at the contents of +-.B @PAPERCONF@ ++environment variable + or by using +-.B letter +-as a fall-back value if none of the other alternatives are successful. ++.B a4 ++as a fall-back value. + By default, width and height of the paper are printed in PostScript points. + .SH OPTIONS + .TP +@@ -98,21 +95,9 @@ + .SH ENVIRONMENT + .TP 20 + .B @PAPERSIZEVAR@ +-Paper size to use regardless of what the papersize file contains. +-.TP 20 +-.B @PAPERCONFVAR@ +-Full path to a file containing the paper size to use. +-.SH FILES +-.TP 20 +-.B @PAPERCONF@ +-Contains the name of the system-wide default paper size to be used +-if the +-.B @PAPERSIZEVAR@ +-and +-.B @PAPERCONFVAR@ +-variables are not set. ++Paper size to use. + .SH AUTHOR + Yves Arrouye +-.SH SEE ALSO +-.BR papersize (5) ++ ++Modified for TeX Live by Peter Breitenlohner + diff --git a/Build/source/libs/libpaper/libpaper-PATCHES/patch-03-getopt b/Build/source/libs/libpaper/libpaper-PATCHES/patch-03-getopt new file mode 100644 index 00000000000..cec650d1108 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-PATCHES/patch-03-getopt @@ -0,0 +1,49 @@ +diff -ur libpaper-1.1.24+nmu2.orig/man/paperconf.1.in libpaper-1.1.24+nmu2/man/paperconf.1.in +--- libpaper-1.1.24+nmu2.orig/man/paperconf.1.in 2013-10-25 08:27:54.000000000 +0200 ++++ libpaper-1.1.24+nmu2/man/paperconf.1.in 2013-11-20 13:59:18.000000000 +0100 +@@ -3,39 +3,12 @@ + .B paperconf + \- print paper configuration information + .SH SYNOPSIS +-.B paperconf +-[ +-[ +-.B \-p +-] +-.I paper +-| +-.B \-d +-| +-.B \-a +-] +-[ +-.B \-z +-] +-[ +-.B \-n +-| +-.B \-N +-] +-[ +-.B \-s +-| +-.B \-w +-| +-.B \-h +-] +-[ +-.B \-c +-| +-.B \-m +-| +-.B \-i +-] ++\fBpaperconf\fR ++[\fB\-z\fR] ++[\fB\-n\fR|\fB\-N\fR] ++[\fB\-s\fR|\fB\-w\fR|\fB\-h\fR] ++[\fB\-c\fR|\fB\-m\fR|\fB\-i\fR] ++[[\fB\-p\fR] \fIpaper\fR|\fB\-d\fR|\fB\-a\fR] + .SH DESCRIPTION + .B paperconf + prints information about a given paper. diff --git a/Build/source/libs/libpaper/libpaper-PATCHES/patch-04-unsigned b/Build/source/libs/libpaper/libpaper-PATCHES/patch-04-unsigned new file mode 100644 index 00000000000..13c798bc1e5 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-PATCHES/patch-04-unsigned @@ -0,0 +1,29 @@ +diff -ur libpaper-1.1.24+nmu2.orig/lib/dimen.c libpaper-1.1.24+nmu2/lib/dimen.c +--- libpaper-1.1.24+nmu2.orig/lib/dimen.c 2002-11-11 01:56:08.000000000 +0100 ++++ libpaper-1.1.24+nmu2/lib/dimen.c 2014-06-18 08:31:52.000000000 +0200 +@@ -53,9 +53,9 @@ + + if (*(unit = what) == '-') ++unit; + +- for (; isdigit(*unit) || (*unit == '.' && !dot++); ++unit); ++ for (; isdigit((unsigned char)*unit) || (*unit == '.' && !dot++); ++unit); + +- if (*unit && !isalpha(*unit)) { ++ if (*unit && !isalpha((unsigned char)*unit)) { + return -1; + } else { + double base = atof(what); +diff -ur libpaper-1.1.24+nmu2.orig/src/paperconf.c libpaper-1.1.24+nmu2/src/paperconf.c +--- libpaper-1.1.24+nmu2.orig/src/paperconf.c 2012-05-03 21:05:12.000000000 +0200 ++++ libpaper-1.1.24+nmu2/src/paperconf.c 2014-06-18 08:31:54.000000000 +0200 +@@ -53,8 +53,8 @@ + printf("%s", papername(paper)); + pr = 1; + } else if (options & OPT_UPPERNAME) { +- if (islower(*papername(paper))) { +- printf("%c%s", toupper(*papername(paper)), papername(paper) + 1); ++ if (islower((unsigned char)*papername(paper))) { ++ printf("%c%s", toupper((unsigned char)*papername(paper)), papername(paper) + 1); + } else { + printf("%s", papername(paper)); + } diff --git a/Build/source/libs/libpaper/libpaper-src/ChangeLog b/Build/source/libs/libpaper/libpaper-src/ChangeLog new file mode 100644 index 00000000000..1eadcbd9f1b --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/ChangeLog @@ -0,0 +1,33 @@ +Tue Sep 24 06:38:34 Yves Arrouye + + * completed the set of manual pages. + * added the libpaper.so.1 link in installation. + * added -E to less flags. + +Tue Aug 13 19:14:51 1996 Yves Arrouye + + * abstract interface (struct paper hidden) so that future changes + can be made safely. + * stores dimensions as double, still in PS points. + +Sun Aug 11 15:16:46 1996 Yves Arrouye + + * lib/paper.c: added paperinit(), paperdone(), paperfirst(), + paperlast(), papernext() and paperprev(), removed papertable(). + + * lib/paper.h: added new prototypes. + + * src/paper.c: added -N option. + Removed trailing spaces in what is printed. + + * examples/gsfrontend.c: corrected PAPERSIZE to PAGESIZE. + + * examples/a2ps: added calls to paperinit() and paperdone(), + added agressive page size selection at printing time. + +Sat Jul 20 10:15:49 1996 Yves Arrouye + + * Makefile.in: changed for PAPERSIZE. + * lib/paper.c: added the PAPERSIZE environment variable. + * examples: new directory containing examples (gs.sh and + diffs for a2ps-4.3). diff --git a/Build/source/libs/libpaper/libpaper-src/Makefile.am b/Build/source/libs/libpaper/libpaper-src/Makefile.am new file mode 100644 index 00000000000..b0a136b95c8 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/Makefile.am @@ -0,0 +1,3 @@ + +SUBDIRS = lib src man + diff --git a/Build/source/libs/libpaper/libpaper-src/README b/Build/source/libs/libpaper/libpaper-src/README new file mode 100644 index 00000000000..7c4fb128610 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/README @@ -0,0 +1,39 @@ +The paper library and accompanying files are intended to provide a simple +way for applications to take actions based on a system- or user-specified +paper size. + +This release is quite minimal, its purpose being to provide really basic +functions (obtaining the system paper name and getting the height and +width of a given kond of paper) that applications can immediately +integrate. +A more complete library, using a capabilities file for papers (giving, +in addition to the size, informations like paper weigth, color, etc) +will be released later. + +See the sources for paperconf(1) in src/paper.c for how to use the library. + +Adding new paper sizes +====================== + +If a paper format is missing, one need to add it to lib/paperspecs. The +format of this file is one paper format per line, with the name of the +format, the width and height of the format separated with space. You +may add an option measurement unit among in, ft, pt, m, dm, cm, mm or you +may leave the default unit of "point". By defaults the width and height +are specified in the "point" unit, which is 1/72 inch (2.54 cm). This +is the A4 entry: + + a4 210 297 mm + +that was previously written as + + a4 595 842 + +The sizes here are 595 points / 72 points pr inch * 2.54 cm per +inch = 20.99 cm and 842/72*2.54 = 29.70 cm. The A4 format +is 210x297 mm so this is a good approximation. (Source: +) + +Copyright (C) Yves Arrouye , 1996 + Adrian Bunk , 2000 + diff --git a/Build/source/libs/libpaper/libpaper-src/config.h.in b/Build/source/libs/libpaper/libpaper-src/config.h.in new file mode 100644 index 00000000000..66e89084033 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/config.h.in @@ -0,0 +1,73 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Default configuration file location */ +#undef PAPERCONF + +/* Environment variable that overrides the default configuration file location + */ +#undef PAPERCONFVAR + +/* Default paper size */ +#undef PAPERSIZE + +/* Environment variable that overrides the defaultpaper size */ +#undef PAPERSIZEVAR + +/* Default directory for run-parts */ +#undef RUNPARTSDIR + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const diff --git a/Build/source/libs/libpaper/libpaper-src/configure.ac b/Build/source/libs/libpaper/libpaper-src/configure.ac new file mode 100644 index 00000000000..cc5bacc7101 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/configure.ac @@ -0,0 +1,66 @@ +dnl Process this file with autoconf to produce a configure script. + +AC_INIT([libpaper], [1.1.9]) +AC_CONFIG_SRCDIR([configure.ac]) +AM_INIT_AUTOMAKE([no-define]) +AM_CONFIG_HEADER(config.h) +AM_MAINTAINER_MODE + +dnl Check for standard build environment +dnl ==================================== +AC_PROG_CC +AC_GNU_SOURCE +AC_PROG_INSTALL +AM_PROG_LIBTOOL +AC_PROG_MAKE_SET + +dnl Complier features +dnl ================= +AC_C_CONST + +dnl set up some substitutions +dnl ========================= +PAPERCONF="${sysconfdir}/papersize" +AC_SUBST(PAPERCONF) +AH_TEMPLATE(PAPERCONF, [Default configuration file location]) +AC_DEFINE_UNQUOTED(PAPERCONF, "$PAPERCONF") + +PAPERCONFVAR=PAPERCONF +AC_SUBST(PAPERCONFVAR) +AH_TEMPLATE(PAPERCONFVAR, [Environment variable that overrides the default configuration file location]) +AC_DEFINE_UNQUOTED(PAPERCONFVAR, "$PAPERCONFVAR") + +PAPERSIZE=letter +AC_SUBST(PAPERSIZE) +AH_TEMPLATE(PAPERSIZE, [Default paper size]) +AC_DEFINE_UNQUOTED(PAPERSIZE, "$PAPERSIZE") + +RUNPARTSDIR="${sysconfdir}/libpaper.d" +AC_SUBST(RUNPARTSDIR) +AH_TEMPLATE(RUNPARTSDIR, [Default directory for run-parts]) +AC_DEFINE_UNQUOTED(RUNPARTSDIR, "$RUNPARTSDIR") + +RUNPARTSDIRVAR=PAPERDIR +AC_SUBST(RUNPARTSDIRVAR) +AH_TEMPLATE(RUNPARTSDIRVAR, [Environment variable that overrides the default directory for run-parts]) +AC_DEFINE_UNQUOTED(RUNPARTSDIRVAR, "$RUNPARTSDIRVAR") + +PAPERSIZEVAR=PAPERSIZE +AC_SUBST(PAPERSIZEVAR) +AH_TEMPLATE(PAPERSIZEVAR, [Environment variable that overrides the default paper size]) +AC_DEFINE_UNQUOTED(PAPERSIZEVAR, "$PAPERSIZEVAR") + +dnl Create files +dnl ============ +AC_OUTPUT([ + Makefile + lib/Makefile + src/Makefile + src/paperconfig + man/Makefile + man/paperconf.1 + man/paperconfig.8 + man/papersize.5 + man/systempapername.3 +]) + diff --git a/Build/source/libs/libpaper/libpaper-src/lib/Makefile.am b/Build/source/libs/libpaper/libpaper-src/lib/Makefile.am new file mode 100644 index 00000000000..028abaa59a2 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/lib/Makefile.am @@ -0,0 +1,21 @@ + +lib_LTLIBRARIES = libpaper.la +libpaper_la_SOURCES = dimen.c paper.c dimen.h paperspecs.h +libpaper_la_LDFLAGS = -version-info 2:2:1 +libpaper_la_CPPFLAGS = -D_REENTRANT + +BUILT_SOURCES = paperspecs.h + +include_HEADERS = paper.h + +EXTRA_DIST = paperspecs + +paperspecs.h: paperspecs Makefile + echo ' /* This file has been automaticaly generated.' >$@ + echo ' Edit paperspecs to make changes to the papers specifications. */' >>$@ + echo >>$@ + env LANG=C LC_ALL=C awk '{ factor = 1.0; \ + if ($$4 == "mm") factor = 72.0 / 25.4; \ + if ($$4 == "in") factor = 72.0; \ + printf(" { \"%s\", %5f, %5f },\n", \ + $$1, $$2 * factor, $$3 * factor); }' < $< >> $@ diff --git a/Build/source/libs/libpaper/libpaper-src/lib/dimen.c b/Build/source/libs/libpaper/libpaper-src/lib/dimen.c new file mode 100644 index 00000000000..702d7937668 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/lib/dimen.c @@ -0,0 +1,72 @@ + +/* + * Copyright (C) Yves Arrouye , 1996. + * + * Use under the GPL version 2. You are not allowed to remove this + * copyright notice. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include + +#include "dimen.h" + +static struct { + const char* name; + float factor; +} units[] = { + { "in", 1. }, + { "ft", 12. }, + { "pt", 1. / 72. }, + { "m", 100. / 2.54 }, + { "dm", 10. / 2.54 }, + { "cm", 1. / 2.54 }, + { "mm", .1 / 2.54 }, + { 0 } +}; + +float unitfactor(const char* unit) +{ + int i; + + for (i = 0; units[i].name; ++i) { + if (!strcasecmp(units[i].name, unit)) { + return units[i].factor; + } + } + + return 0; +} + +int psdimension(const char* what, int* dim) +{ + const char* unit; + int dot = 0; + + if (!what || !*what) return -1; + + if (*(unit = what) == '-') ++unit; + + for (; isdigit((unsigned char)*unit) || (*unit == '.' && !dot++); ++unit); + + if (*unit && !isalpha((unsigned char)*unit)) { + return -1; + } else { + double base = atof(what); + double factor = unitfactor(unit); + + if (factor) { + *dim = base * factor * 72; + return 0; + } + + return 1; + } +} + diff --git a/Build/source/libs/libpaper/libpaper-src/lib/dimen.h b/Build/source/libs/libpaper/libpaper-src/lib/dimen.h new file mode 100644 index 00000000000..d574ac3202d --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/lib/dimen.h @@ -0,0 +1,36 @@ + +/* + * Copyright (C) Yves Arrouye , 1996. + * + * Use under the GPL version 2. You are not allowed to remove this + * copyright notice. + * + */ + +#ifndef DIMEN_H +#define DIMEN_H + +/* + * psdimension() converts a string to a number of points, accepting a + * string consisting of a number (eventually decimal but without any + * exponent) followed by a unit (one of `m', `dm', `cm', `mm', `ft', + * `in' or `pt', `in' being the default); on success it returs 0, + * otherwise it returns -1 if no number was found or 1 if the unit is + * incorrect. + * + */ + +#if __STDC__ - 0 == 0 +#define const +#endif + +#if __STDC__ - 0 == 0 +extern float unitfactor(); +extern int psdimension(); +#else +extern float unitfactor(const char* unit); +extern int psdimension(const char* dimspec, int* dim); +#endif + +#endif + diff --git a/Build/source/libs/libpaper/libpaper-src/lib/paper.c b/Build/source/libs/libpaper/libpaper-src/lib/paper.c new file mode 100644 index 00000000000..512dff88452 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/lib/paper.c @@ -0,0 +1,158 @@ + +/* + * Copyright (C) Yves Arrouye , 1996. + * + * Use under the GPL version 2. You are not allowed to remove this + * copyright notice. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include +#include + +#include + +#include "paper.h" + +struct paper { + const char* name; + double pswidth, psheight; +}; + +/* This table will be searched in order: please put typical paper sizes + at the beginning of it. */ + +/* The paper names have been got from gs 3.68 gs_stadt.ps file, with + some personal additions. */ + +static struct paper papers[] = { +#include "paperspecs.h" + { 0 } +}; + +int paperinit(void) { + return 0; +} + +int paperdone(void) { + return 0; +} + +const char* papername(const struct paper* spaper) +{ + return spaper->name; +} + +double paperpswidth(const struct paper* spaper) +{ + return spaper->pswidth; +} + +double paperpsheight(const struct paper* spaper) +{ + return spaper->psheight; +} + +const struct paper* paperfirst(void) { + return papers; +} + +const struct paper* paperlast(void) { + static const struct paper* lastpaper = 0; + + const struct paper* next = papers; + while (next->name) { + lastpaper = next, ++next; + } + + return lastpaper; +} + +const struct paper* papernext(const struct paper* spaper) +{ + return (++spaper)->name ? spaper : 0; +} + +const struct paper* paperprev(const struct paper* spaper) +{ + return spaper == papers ? 0 : --spaper; +} + +const char* defaultpapersizefile(void) { + return NULL; +} + +const char* systempapersizefile(void) { + return NULL; +} + +const char* defaultpapername(void) { + return PAPERSIZE; +} + +char* systempapername(void) { + char* paperstr; + char* paperenv; + const char* paperdef; + const struct paper* pp; + + paperenv = getenv(PAPERSIZEVAR); + if ((paperenv != NULL) && (strchr(paperenv, '/') != NULL)) { + paperenv = NULL; + } + + if (paperenv) { + paperstr = malloc((strlen(paperenv) + 1) * sizeof(char)); + + if (! paperstr) return 0; + + if ((pp = paperinfo(paperenv))) + return strcpy(paperstr, pp->name); + else + return strcpy(paperstr, paperenv); + } + + paperdef = defaultpapername(); + paperstr = malloc((strlen(paperdef) + 1) * sizeof(char)); + + if (paperstr) + return strcpy(paperstr, paperdef); + else + return 0; +} + +const struct paper* paperinfo(const char* paper) +{ + const struct paper* pp; + + for (pp = paperfirst(); pp; pp = papernext(pp)) { + if (!strcasecmp(pp->name, paper)) { + return pp; + } + } + + return 0; +} + +const struct paper* paperwithsize(double pswidth, double psheight) +{ + const struct paper* pp; + + for (pp = paperfirst(); pp; pp = papernext(pp)) { + if (pp->pswidth == pswidth + && pp->psheight == psheight) { + return pp; + } + } + + return 0; +} + diff --git a/Build/source/libs/libpaper/libpaper-src/lib/paper.h b/Build/source/libs/libpaper/libpaper-src/lib/paper.h new file mode 100644 index 00000000000..993f7463c8c --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/lib/paper.h @@ -0,0 +1,73 @@ + +/* + * Copyright (C) Yves Arrouye , 1996. + * + * Use under the GPL version 2. You are not allowed to remove this + * copyright notice. + * + */ + +#ifndef PAPER_H +#define PAPER_H + +/* + * systempapername() returns the preferred paper size got from either the + * PAPER environment variable or the /etc/papersize file. If 0 is + * returned, one should use the value of defaultpapername(). + * + * paperinfo() looks from the given paper name in a table of known sizes + * and returns 0 if it found it; if this is the case, the width and + * height arguments have been set to the correct values in points (one + * inch contains 72 points). The case of paper size is not significant. + * + */ + +#if !defined(__STDC__) + +#define __PAPER_CONST +#define __PAPER_PROTO(p) () + +#else + +#define __PAPER_CONST const +#define __PAPER_PROTO(p) p + +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +struct paper; + +extern int paperinit __PAPER_PROTO((void)); +extern int paperdone __PAPER_PROTO((void)); + +extern __PAPER_CONST char* papername __PAPER_PROTO((const struct paper*)); +extern double paperpswidth __PAPER_PROTO((const struct paper*)); +extern double paperpsheight __PAPER_PROTO((const struct paper*)); + +extern __PAPER_CONST char* defaultpapersizefile __PAPER_PROTO((void)); +extern __PAPER_CONST char* systempapersizefile __PAPER_PROTO((void)); +extern __PAPER_CONST char* defaultpapername __PAPER_PROTO((void)); +extern char* systempapername __PAPER_PROTO((void)); +extern __PAPER_CONST struct paper* paperinfo __PAPER_PROTO((const char*)); +extern __PAPER_CONST struct paper* paperwithsize __PAPER_PROTO(( + double pswidth, double psheight)); + +extern __PAPER_CONST struct paper* paperfirst __PAPER_PROTO((void)); +extern __PAPER_CONST struct paper* paperlast __PAPER_PROTO((void)); +extern __PAPER_CONST struct paper* papernext __PAPER_PROTO(( + const struct paper*)); +extern __PAPER_CONST struct paper* paperprev __PAPER_PROTO(( + const struct paper*)); + +#undef __PAPER_CONST +#undef __PAPER_PROTO + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/Build/source/libs/libpaper/libpaper-src/lib/paperspecs b/Build/source/libs/libpaper/libpaper-src/lib/paperspecs new file mode 100644 index 00000000000..6be0a46dc3a --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/lib/paperspecs @@ -0,0 +1,67 @@ +a4 210 297 mm +letter 612 792 +note 612 792 +legal 612 1008 +executive 522 756 +halfletter 396 612 +halfexecutive 378 522 +11x17 792 1224 +statement 396 612 +folio 612 936 +quarto 610 780 +10x14 720 1008 +ledger 1224 792 +tabloid 792 1224 +a0 841 1189 mm +a1 594 841 mm +a2 420 594 mm +a3 297 420 mm +a5 148 210 mm +a6 105 148 mm +a7 74 105 mm +a8 52 74 mm +a9 37 52 mm +a10 26 37 mm +b0 1000 1414 mm +b1 707 1000 mm +b2 500 707 mm +b3 353 500 mm +b4 250 353 mm +b5 176 250 mm +b6 125 176 mm +b7 88 125 mm +b8 62 88 mm +b9 44 62 mm +b10 31 44 mm +c2 458 648 mm +c3 324 458 mm +c4 229 354 mm +c5 162 229 mm +c6 114 162 mm +c7 81 114 mm +c8 57 81 mm +jisb0 1030 1456 mm +jisb1 728 1030 mm +jisb2 515 728 mm +jisb3 364 515 mm +jisb4 257 364 mm +jisb5 182 257 mm +jisb6 128 182 mm +jisb7 91 128 mm +jisb8 64 91 mm +jisb9 45 64 mm +jisb10 32 45 mm +b5var 182 230 mm +DL 110 220 mm +Comm10 297 684 +Monarch 279 540 +archE 2592 3456 +archD 1728 2592 +archC 1296 1728 +archB 864 1296 +archA 648 864 +flsa 612 936 +flse 612 936 +csheet 1224 1584 +dsheet 1584 2448 +esheet 2448 3168 diff --git a/Build/source/libs/libpaper/libpaper-src/lib/paperspecs.h b/Build/source/libs/libpaper/libpaper-src/lib/paperspecs.h new file mode 100644 index 00000000000..a94ec36dafb --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/lib/paperspecs.h @@ -0,0 +1,70 @@ + /* This file has been automaticaly generated. + Edit paperspecs to make changes to the papers specifications. */ + + { "a4", 595.275591, 841.889764 }, + { "letter", 612.000000, 792.000000 }, + { "note", 612.000000, 792.000000 }, + { "legal", 612.000000, 1008.000000 }, + { "executive", 522.000000, 756.000000 }, + { "halfletter", 396.000000, 612.000000 }, + { "halfexecutive", 378.000000, 522.000000 }, + { "11x17", 792.000000, 1224.000000 }, + { "statement", 396.000000, 612.000000 }, + { "folio", 612.000000, 936.000000 }, + { "quarto", 610.000000, 780.000000 }, + { "10x14", 720.000000, 1008.000000 }, + { "ledger", 1224.000000, 792.000000 }, + { "tabloid", 792.000000, 1224.000000 }, + { "a0", 2383.937008, 3370.393701 }, + { "a1", 1683.779528, 2383.937008 }, + { "a2", 1190.551181, 1683.779528 }, + { "a3", 841.889764, 1190.551181 }, + { "a5", 419.527559, 595.275591 }, + { "a6", 297.637795, 419.527559 }, + { "a7", 209.763780, 297.637795 }, + { "a8", 147.401575, 209.763780 }, + { "a9", 104.881890, 147.401575 }, + { "a10", 73.700787, 104.881890 }, + { "b0", 2834.645669, 4008.188976 }, + { "b1", 2004.094488, 2834.645669 }, + { "b2", 1417.322835, 2004.094488 }, + { "b3", 1000.629921, 1417.322835 }, + { "b4", 708.661417, 1000.629921 }, + { "b5", 498.897638, 708.661417 }, + { "b6", 354.330709, 498.897638 }, + { "b7", 249.448819, 354.330709 }, + { "b8", 175.748031, 249.448819 }, + { "b9", 124.724409, 175.748031 }, + { "b10", 87.874016, 124.724409 }, + { "c2", 1298.267717, 1836.850394 }, + { "c3", 918.425197, 1298.267717 }, + { "c4", 649.133858, 1003.464567 }, + { "c5", 459.212598, 649.133858 }, + { "c6", 323.149606, 459.212598 }, + { "c7", 229.606299, 323.149606 }, + { "c8", 161.574803, 229.606299 }, + { "jisb0", 2919.685039, 4127.244094 }, + { "jisb1", 2063.622047, 2919.685039 }, + { "jisb2", 1459.842520, 2063.622047 }, + { "jisb3", 1031.811024, 1459.842520 }, + { "jisb4", 728.503937, 1031.811024 }, + { "jisb5", 515.905512, 728.503937 }, + { "jisb6", 362.834646, 515.905512 }, + { "jisb7", 257.952756, 362.834646 }, + { "jisb8", 181.417323, 257.952756 }, + { "jisb9", 127.559055, 181.417323 }, + { "jisb10", 90.708661, 127.559055 }, + { "b5var", 515.905512, 651.968504 }, + { "DL", 311.811024, 623.622047 }, + { "Comm10", 297.000000, 684.000000 }, + { "Monarch", 279.000000, 540.000000 }, + { "archE", 2592.000000, 3456.000000 }, + { "archD", 1728.000000, 2592.000000 }, + { "archC", 1296.000000, 1728.000000 }, + { "archB", 864.000000, 1296.000000 }, + { "archA", 648.000000, 864.000000 }, + { "flsa", 612.000000, 936.000000 }, + { "flse", 612.000000, 936.000000 }, + { "csheet", 1224.000000, 1584.000000 }, + { "dsheet", 1584.000000, 2448.000000 }, + { "esheet", 2448.000000, 3168.000000 }, diff --git a/Build/source/libs/libpaper/libpaper-src/man/Makefile.am b/Build/source/libs/libpaper/libpaper-src/man/Makefile.am new file mode 100644 index 00000000000..6a86233affd --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/Makefile.am @@ -0,0 +1,25 @@ +man_MANS = \ + paperconf.1 \ + defaultpapername.3 \ + defaultpapersizefile.3 \ + paperdone.3 \ + paperfirst.3 \ + paperinfo.3 \ + paperinit.3 \ + paperlast.3 \ + papernext.3 \ + paperprev.3 \ + paperpsheight.3 \ + paperpsname.3 \ + paperpswidth.3 \ + paperwithsize.3 \ + systempapername.3 \ + systempapersizefile.3 \ + papersize.5 \ + paperconfig.8 + +EXTRA_DIST = \ + paperconf.1.in \ + systempapername.3.in \ + papersize.5.in \ + paperconfig.8.in diff --git a/Build/source/libs/libpaper/libpaper-src/man/defaultpapername.3 b/Build/source/libs/libpaper/libpaper-src/man/defaultpapername.3 new file mode 100644 index 00000000000..32199b5702f --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/defaultpapername.3 @@ -0,0 +1,2 @@ +.so man3/systempapername.3 + diff --git a/Build/source/libs/libpaper/libpaper-src/man/defaultpapersizefile.3 b/Build/source/libs/libpaper/libpaper-src/man/defaultpapersizefile.3 new file mode 100644 index 00000000000..b3c0e4823cf --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/defaultpapersizefile.3 @@ -0,0 +1,2 @@ +.so man3/systempapersizefile.3 + diff --git a/Build/source/libs/libpaper/libpaper-src/man/paperconf.1.in b/Build/source/libs/libpaper/libpaper-src/man/paperconf.1.in new file mode 100644 index 00000000000..243881cbc57 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/paperconf.1.in @@ -0,0 +1,76 @@ +.TH PAPERCONF 1 "25 October 2013" +.SH NAME +.B paperconf +\- print paper configuration information +.SH SYNOPSIS +\fBpaperconf\fR +[\fB\-z\fR] +[\fB\-n\fR|\fB\-N\fR] +[\fB\-s\fR|\fB\-w\fR|\fB\-h\fR] +[\fB\-c\fR|\fB\-m\fR|\fB\-i\fR] +[[\fB\-p\fR] \fIpaper\fR|\fB\-d\fR|\fB\-a\fR] +.SH DESCRIPTION +.B paperconf +prints information about a given paper. +The information that can be obtained is the name of the paper, its +size and its width or height. +When called without arguments, +.B paperconf +prints the name of the system- or user-specified paper, obtained by +looking in order at the +.B @PAPERSIZEVAR@ +environment variable +or by using +.B a4 +as a fall-back value. +By default, width and height of the paper are printed in PostScript points. +.SH OPTIONS +.TP +.BI \-p " paper" +Specify the name of the +.I paper +about which information is asked. +.TP +.B \-d +Use the default builtin paper name. +.TP +.B \-a +Consider all known paper names. +.TP +.B \-z +If the paper name is unknown, print it but issue a message on the +standard error and exit with a non-zero code. +.TP +.B \-n +Print the name of the paper. +.TP +.B \-N +Print the name of the paper with the first letter capitalized. +.TP +.B \-s +Print the size (width followed by height) of the paper. +.TP +.B \-w +Print the width of the paper. +.TP +.B \-h +Print the height of the paper. +.TP +.B \-c +Use centimetres as unit for paper size. +.TP +.B \-m +Use millimetres as unit for paper size. +.TP +.B \-i +Use inches as unit for paper size. + +.SH ENVIRONMENT +.TP 20 +.B @PAPERSIZEVAR@ +Paper size to use. +.SH AUTHOR +Yves Arrouye + +Modified for TeX Live by Peter Breitenlohner + diff --git a/Build/source/libs/libpaper/libpaper-src/man/paperconfig.8.in b/Build/source/libs/libpaper/libpaper-src/man/paperconfig.8.in new file mode 100644 index 00000000000..c462441f202 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/paperconfig.8.in @@ -0,0 +1,73 @@ +.\" paperconfig.8, Copyright (C) 1996, Yves Arrouye +.TH PAPERCONFIG 8 "5 January 2005" "Debian/Linux" "Linux Administrator's Manual" +.SH NAME +.B paperconfig +\- configure the system default paper size +.SH SYNOPSIS +.B paperconfig +[ +.BR \-v\fP, \fB\-\-version +] +[ +.BR \-h\fP, \fB\-\-help +] +[ +.BI "\-p\fP, \fB\-\-paper" " papername" +| +.B \-\-force +] +.SH DESCRIPTION +.B paperconfig +sets the system (or default) paper to be used by tools using the +.B papersize +file. +It can either ask interactively for the paper to use or be called +non-interactively by scripts. +.PP +When the paper size has been changed, +.B paperconfig +notifies other packages of the change by running the scripts in the +.I @RUNPARTSDIR@ +directory. +.SH OPTIONS +.TP +.BR \-v\fP, \fB\-\-version +Print the version of +.B paperconfig +and exit. +.TP +.BR \-h\fP, \fB\-\-help +Print help about usage and exit. +.TP +.BI "\-p\fP, \fB\-\-paper" " papername" +Use +.I papername +if possible. If +.I papername +is not a valid paper, print an error message and exit. +.TP +.B \-\-force +Force interactive selection of the system paper even if the actual paper +is a valid one. +.SH ENVIRONMENT +.B PAPERCONF +Full path to a file containing the paper size to use; this file will +be rewritten with the system paper size. +.SH FILES +.TP 20 +.B @PAPERCONF@ +Contains the name of the system-wide default paper size to be used +if the +.B @PAPERSIZEVAR@ +variable is not set. +.TP 20 +.B @RUNPARTSDIR@ +Directory of scripts to run after the paper size has been changed. +This package puts no scripts here, but other packages may. +.SH AUTHOR +Yves Arrouye +.SH SEE ALSO +.BR paperconf (1) +.br +.BR papersize (5) + diff --git a/Build/source/libs/libpaper/libpaper-src/man/paperdone.3 b/Build/source/libs/libpaper/libpaper-src/man/paperdone.3 new file mode 100644 index 00000000000..0ac16967590 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/paperdone.3 @@ -0,0 +1,2 @@ +.so man3/paperinit.3 + diff --git a/Build/source/libs/libpaper/libpaper-src/man/paperfirst.3 b/Build/source/libs/libpaper/libpaper-src/man/paperfirst.3 new file mode 100644 index 00000000000..932aa20a755 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/paperfirst.3 @@ -0,0 +1,2 @@ +.so man3/paperinfo.3 + diff --git a/Build/source/libs/libpaper/libpaper-src/man/paperinfo.3 b/Build/source/libs/libpaper/libpaper-src/man/paperinfo.3 new file mode 100644 index 00000000000..3b59bc9579f --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/paperinfo.3 @@ -0,0 +1,65 @@ +.TH PAPERINFO 3 "24 September 1996" +.SH NAME +paperinfo, paperwithsize, paperfirst, paperlast, papernext, paperprev +\- return informations about a paper +.SH SYNOPSYS +.nf +.B #include +.sp +.B "const struct paper* paperinfo(const char* papername)" +.B "const struct paper* paperwithsize(double psw, double psh)" +.sp +.B "char* papername(const struct paper*)" +.B "double paperpswidth(const struct paper*)" +.B "double paperpsheigth(const struct paper*)" +.sp +.B "const struct paper* paperfirst(void)" +.B "const struct paper* papernext(const struct paper* pinfo)" +.B "const struct paper* paperprev(const struct paper* pinfo)" +.B "const struct paper* paperlast(void)" +.fi +.SH DESCRIPTION +.B paperinfo() +returns a pointer to a +.B struct paper +containing informations about the paper with name +.B papername +. +.B paperwithsize() +looks for a paper whose width and height is +.B psw +and +.B psh +in PostScript points, and return a pointer to a +.B struct paper +corresponding to the paper found. +.PP +.B papername() +returns the name of a paper described by an opaque struct paper object +. +.B paperpswidth() +returns the width, in PostScript points, of a paper described by an +opaque struct paper object +. +.B paperpsheight() +returns the height, in PostScript points, of a paper described by an +opaque struct paper object +. +.PP +.B paperfirst() +and +.B paperlast() +return the first and last entries for papers. +Iteration from one entry to the next or the previous one can be done +with +.B papernext() +and +.B paperprev() +respectively. +.SH SEE ALSO +.BR paperinit (3), +.BR paperdone (3) +.BR defaultpapername (3) +.br +.BR papersize (5) + diff --git a/Build/source/libs/libpaper/libpaper-src/man/paperinit.3 b/Build/source/libs/libpaper/libpaper-src/man/paperinit.3 new file mode 100644 index 00000000000..fd69167ea16 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/paperinit.3 @@ -0,0 +1,27 @@ +.TH PAPERINIT 3 "24 September 1996" +.SH NAME +paperinit, paperdone \- begin and end using the paper library +.SH SYNOPSYS +.nf +.B #include +.sp +.B "void paperinit(void)" +.B "void paperdone(void)" +.fi +.SH DESCRIPTION +.B paperinit() +initializes the paper library, allocating any resources that are +necessary for its use. +This function must be called before any other function of the paper +library is used. +.PP +.B paperdone() +frees any resources that were allocated for the paper library. +No function of the library should be called after a call to this +function. +.SH SEE ALSO +.BR defaultpapername (3), +.BR paperinfo (3) +.br +.BR papersize (5) + diff --git a/Build/source/libs/libpaper/libpaper-src/man/paperlast.3 b/Build/source/libs/libpaper/libpaper-src/man/paperlast.3 new file mode 100644 index 00000000000..932aa20a755 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/paperlast.3 @@ -0,0 +1,2 @@ +.so man3/paperinfo.3 + diff --git a/Build/source/libs/libpaper/libpaper-src/man/papernext.3 b/Build/source/libs/libpaper/libpaper-src/man/papernext.3 new file mode 100644 index 00000000000..932aa20a755 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/papernext.3 @@ -0,0 +1,2 @@ +.so man3/paperinfo.3 + diff --git a/Build/source/libs/libpaper/libpaper-src/man/paperprev.3 b/Build/source/libs/libpaper/libpaper-src/man/paperprev.3 new file mode 100644 index 00000000000..932aa20a755 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/paperprev.3 @@ -0,0 +1,2 @@ +.so man3/paperinfo.3 + diff --git a/Build/source/libs/libpaper/libpaper-src/man/paperpsheight.3 b/Build/source/libs/libpaper/libpaper-src/man/paperpsheight.3 new file mode 100644 index 00000000000..932aa20a755 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/paperpsheight.3 @@ -0,0 +1,2 @@ +.so man3/paperinfo.3 + diff --git a/Build/source/libs/libpaper/libpaper-src/man/paperpsname.3 b/Build/source/libs/libpaper/libpaper-src/man/paperpsname.3 new file mode 100644 index 00000000000..932aa20a755 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/paperpsname.3 @@ -0,0 +1,2 @@ +.so man3/paperinfo.3 + diff --git a/Build/source/libs/libpaper/libpaper-src/man/paperpswidth.3 b/Build/source/libs/libpaper/libpaper-src/man/paperpswidth.3 new file mode 100644 index 00000000000..932aa20a755 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/paperpswidth.3 @@ -0,0 +1,2 @@ +.so man3/paperinfo.3 + diff --git a/Build/source/libs/libpaper/libpaper-src/man/papersize.5.in b/Build/source/libs/libpaper/libpaper-src/man/papersize.5.in new file mode 100644 index 00000000000..d553909ad71 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/papersize.5.in @@ -0,0 +1,63 @@ +.TH PAPERSIZE 5 +.SH NAME +.B papersize +\- specify preferred paper size +.SH SYNOPSYS +.B @PAPERCONF@ +.SH DESCRIPTION +The +.B papersize +file is used to specify the preferred paper size to use by available +commands and programs generating documents. +.PP +The format of this file is extremely simple: whitespace and anything +starting with `#' is ignored, and the name of the paper is the first +string found; the case in the name of the paper does not import (see +.B CAVEATS +section however). +.SH "PAPER NAMES" +The following names are commonly understood by programs: +.B a3\fP,\fB a4\fP,\fB a5\fP, +.B b5\fP,\fB letter\fP,\fB legal\fP,\fB executive\fP,\fB note\fP +and +.BR 11x17 . +.PP +Additional paper names that one may encounter are: +.B a0\fP,\fB a1\fP,\fB a2\fP,\fB a6\fP,\fB a7\fP,\fB a8\fP,\fB a9\fP,\fB a10\fP, +.B b0\fP,\fB b1\fP,\fB b2\fP,\fB b3\fP,\fB b4\fP,\fB tabloid\fP, +.B statement\fP,\fB note\fP, +.B halfletter\fP,\fB halfexecutive\fP,\fB folio\fP,\fB quarto\fP,\fB ledger\fP, +.B archA\fP,\fB archB\fP,\fB archC\fP,\fB archD\fP,\fB archE\fP,\fB flsa\fP, +.B flse\fP,\fB csheet\fP,\fB dsheet\fP,\fB esheet\fP +and +.BR 10x14 . +.PP +The value of the +.B papersize +file can be overrideen by +looking in order at the +.B @PAPERSIZEVAR@ +environment variable, then at the contents of the file specified by the +.B @PAPERCONFVAR@ +environment variable. If the +.B papersize +file does not exist, programs using the paper library default to using +.B letter +as a fall-back value +.SH CAVEATS +This manual page documents the format of the +.B papersize +file that is read by the +.B libpaper +library. +Some programs that read this file do not yet use the library and may have +trouble ignoring whitespace and comments in the file; they may also +require that the paper names use a specific capitalization. +.SH DOCUMENTATION +Yves Arrouye +.SH SEE ALSO +.BR paperconf (1) +.br +.BR paperconfig (8) + + diff --git a/Build/source/libs/libpaper/libpaper-src/man/paperwithsize.3 b/Build/source/libs/libpaper/libpaper-src/man/paperwithsize.3 new file mode 100644 index 00000000000..932aa20a755 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/paperwithsize.3 @@ -0,0 +1,2 @@ +.so man3/paperinfo.3 + diff --git a/Build/source/libs/libpaper/libpaper-src/man/systempapername.3.in b/Build/source/libs/libpaper/libpaper-src/man/systempapername.3.in new file mode 100644 index 00000000000..f77d96e7991 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/systempapername.3.in @@ -0,0 +1,53 @@ +.TH SYSTEMPAPERNAME 3 "17 September 2001" +.SH NAME +systempapername, defaultpapername, systempapersizefile, +defaultpapersizefile \- return names for managing system paper +information +.SH SYNOPSYS +.nf +.B #include +.sp +.B "const char* systempapername(void)" +.B "const char* defaultpapername(void)" +.sp +.B "const char* systempapersizefile(void)" +.B "const char* defaultpapersizefile(void)" +.fi +.SH DESCRIPTION +.B systempapername() +returns the name of the default paper to be used by a program. +This name is obtained by looking in that order at the +.B @PAPERCONFVAR@ +environment variable, at the contents of the file returned by +.B systempapersizefile() +or by using +.B defaultpapername() +as a last chance. +.PP +.B defaultpapername() +returns the name of the default paper to use if it is impossible to get +its name from the environment. +.PP +.B systempapersizefile() +returns the path of the papersize file to use. +This path is obtained by looking at the +.B @PAPERCONFVAR@ +environment variable or by calling +.BR defaultpapersizefile() . +.PP +.B defaultpapersizefile +returns the path of the default papersize file. +.SH ENVIRONMENT +.TP 20 +.B @PAPERSIZEVAR@ +Paper size to use regardless of what the papersize file contains. +.TP 20 +.B @PAPERCONFVAR@ +Full path to a file containing the paper size to use. +.SH FILES +.TP 20 +.B @PAPERCONF@ +Contains the name of the system-wide default paper size to be used. +.SH SEE ALSO +.BR papersize (5) + diff --git a/Build/source/libs/libpaper/libpaper-src/man/systempapersizefile.3 b/Build/source/libs/libpaper/libpaper-src/man/systempapersizefile.3 new file mode 100644 index 00000000000..c7f4c7f9b21 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/man/systempapersizefile.3 @@ -0,0 +1 @@ +.so man3/systempapername.3 diff --git a/Build/source/libs/libpaper/libpaper-src/src/Makefile.am b/Build/source/libs/libpaper/libpaper-src/src/Makefile.am new file mode 100644 index 00000000000..9e608539781 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/src/Makefile.am @@ -0,0 +1,8 @@ + +bin_PROGRAMS = paperconf +paperconf_LDADD = ../lib/libpaper.la +paperconf_CPPFLAGS = -I$(top_srcdir)/lib + +sbin_SCRIPTS = paperconfig + +EXTRA_DIST = paperconfig.in diff --git a/Build/source/libs/libpaper/libpaper-src/src/paperconf.c b/Build/source/libs/libpaper/libpaper-src/src/paperconf.c new file mode 100644 index 00000000000..bbd43802512 --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/src/paperconf.c @@ -0,0 +1,234 @@ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include +#include +#include +#include + +#include + + +/* needed for GNU/Hurd */ +#ifndef MAXPATHLEN +#define MAXPATHLEN 4096 +#endif + +static void usage(const char* name) +{ + fprintf(stderr, + "usage: %s [ [ -p ] papername | -d | -a ] [ -z ] [ -n | -N ] [ -s | -w | -h ] [ -c | -m | -i ]\n", + name); + exit(1); +} + +#define OPT_NAME 1 +#define OPT_UPPERNAME 2 +#define OPT_WIDTH 4 +#define OPT_HEIGHT 8 +#define OPT_CM 16 +#define OPT_MM 32 +#define OPT_INCH 64 +#define OPT_CONTINUE 128 + +#define OPT_UNIT (OPT_CM | OPT_MM | OPT_INCH) + +#define INCHxCM 2.54 + +static void printinfo(const struct paper* paper, int options) +{ + int pr = 0; + + if ((options & ~(OPT_CONTINUE)) == 0) { + options = OPT_NAME; + } + + if (options & OPT_NAME) { + printf("%s", papername(paper)); + pr = 1; + } else if (options & OPT_UPPERNAME) { + if (islower((unsigned char)*papername(paper))) { + printf("%c%s", toupper((unsigned char)*papername(paper)), papername(paper) + 1); + } else { + printf("%s", papername(paper)); + } + pr = 1; + } + + if (options & OPT_WIDTH) { + if (pr) putchar(' '); + if (options & OPT_CM) + printf("%g cm", paperpswidth(paper) / 72.0 * INCHxCM ); + else if (options & OPT_MM) + printf("%g mm", paperpswidth(paper) / 72.0 * 10 * INCHxCM ); + else if (options & OPT_INCH) + printf("%g\"", paperpswidth(paper) / 72.0 ); + else + printf("%g", paperpswidth(paper) ); + pr = 1; + } + if (options & OPT_HEIGHT) { + if (pr) putchar(' '); + if (options & OPT_CM) + printf("%g cm", paperpsheight(paper) / 72.0 * INCHxCM ); + else if (options & OPT_MM) + printf("%g mm", paperpsheight(paper) / 72.0 * 10 * INCHxCM ); + else if (options & OPT_INCH) + printf("%g\"", paperpsheight(paper) / 72.0 ); + else + printf("%g", paperpsheight(paper) ); + pr = 1; + } + + putchar('\n'); +} + +int main(int argc, char** argv) +{ + int c; + + int all = 0; + const char* paper = 0; + unsigned options = 0; + + const char* progname; + + progname = strrchr(*argv, '/'); + if (progname) { + ++progname; + } else { + progname = *argv; + } + + while ((c = getopt(argc, argv, "adznNswhcmip:")) != EOF) { + switch (c) { + case 'a': + if (paper || all) { + usage(progname); + } + all = 1; + break; + + case 'd': + if (paper || all) { + usage(progname); + } + paper = defaultpapername(); + break; + + case 'p': + if (paper || all) { + usage(progname); + } + paper = optarg; + break; + + case 'z': + options |= OPT_CONTINUE; + break; + + case 'n': + if (options & OPT_UPPERNAME) usage(progname); + options |= OPT_NAME; + break; + + case 'N': + if (options & OPT_NAME) usage(progname); + options |= OPT_UPPERNAME; + break; + + case 's': + options |= OPT_WIDTH | OPT_HEIGHT; + break; + + case 'w': + options |= OPT_WIDTH; + break; + + case 'h': + options |= OPT_HEIGHT; + break; + + case 'c': + if (options & OPT_UNIT) usage(progname); + options |= OPT_CM; + break; + + case 'm': + if (options & OPT_UNIT) usage(progname); + options |= OPT_MM; + break; + + case 'i': + if (options & OPT_UNIT) usage(progname); + options |= OPT_INCH; + break; + + default: + usage(progname); + } + } + + if (optind < argc - 1 || (paper && optind != argc)) { + usage(progname); + } else if (optind != argc) { + paper = argv[optind]; + } + + paperinit(); + + if (all) { + const struct paper* papers; + + for (papers = paperfirst(); papers; papers = papernext(papers)) { + printinfo(papers, options); + } + } else { + const struct paper* syspaper; + + if (!paper) paper = systempapername(); + if (!paper) paper = defaultpapername(); + if (!paper) { + char errmsg[2 * MAXPATHLEN + 64]; + + sprintf(errmsg, "%s: cannot get paper size from %s", + progname, systempapersizefile()); + + if (errno) { + perror(errmsg); + } else { + fputs(errmsg, stderr); + } + + paperdone(); + + exit(3); + } + + syspaper = paperinfo(paper); + + if (syspaper) { + printinfo(syspaper, options); + } else { + fprintf(stderr, "%s: unknown paper `%s'\n", progname, paper); + if (options & OPT_CONTINUE) { + puts(paper); + } + + paperdone(); + + exit(2); + } + } + + paperdone(); + + return 0; +} + diff --git a/Build/source/libs/libpaper/libpaper-src/src/paperconfig.in b/Build/source/libs/libpaper/libpaper-src/src/paperconfig.in new file mode 100644 index 00000000000..cd04efaa9aa --- /dev/null +++ b/Build/source/libs/libpaper/libpaper-src/src/paperconfig.in @@ -0,0 +1,227 @@ +#! /bin/sh + +# paperconfig: configuration of system paper name +# +# Copyright (C) 1996, Yves Arrouye +# 2001, Adrian Bunk + +usage() { + if [ "$1" = -h ] + then + exec 1>&2 + echo -n U + else + echo -n u + fi + + echo "sage: `basename $0` [ -v, --version ] [ -h, --help ] [ -p, --paper name | --force ]" + + if [ "$1" = -h ] + then + cat <" + exit 0 + ;; + -h|--help) + usage -h + ;; + -p|--paper) + test $# -gt 1 || usage + paper="$2" + shift + ;; + --force) + force=1 + ;; + *) + usage + ;; + esac + shift +done + +invalidpaper() { + ! paperconf "$1" 2>/dev/null 1>&2 +} + +format() { + _maxwidth=$1; shift + _start="$1"; shift + + _cline= + + for w + do + if [ `echo "$_start$_cline$w " | wc -c` -ge 0$_maxwidth ] + then + echo "$_cline" + _cline= + _start= + fi + _cline="$_cline$w " + done + + if [ -n "$_cline" ] + then + echo "$_cline" + fi + + unset _maxwidth _cline _start +} + +# "chmod 644" added below, to assure that the conf file is created +# with the right access permissions (MP 13/05/2000) + +setpaper() { + paperright=`paperconf "$1" 2>/dev/null` + + ok=0 + + if 2>/dev/null echo "$paperright" >${@PAPERCONFVAR@}.new + then + if 2>/dev/null mv -f ${@PAPERCONFVAR@}.new $@PAPERCONFVAR@ + then + if 2>/dev/null chmod 644 $@PAPERCONFVAR@ + then + ok=1 + fi + fi + fi + + if [ $ok -eq 0 ] + then + echo `basename $0`: cannot create $@PAPERCONFVAR@ + exit 2 + else + # + # Added code for calling back applications when + # papersize changes. See bug #345466 + # eppesuig@debian.org, 2006-01-05 + if [ -d ${@RUNPARTSDIRVAR@} ] + then + run-parts ${@RUNPARTSDIRVAR@} + fi + fi +} + +if [ ! -z "$paper" ] +then + if invalidpaper $paper + then + >&2 echo `basename $0`: \"$paper\" is not a known paper name + exit 3 + fi + setpaper "$paper" + exit 0 +fi + +knownpapers="`paperconf -a`" + +prompt= +width=72 + +# "|| true" added below, to assure that the script does not fail even if +# called with bash -e. (MP 22/08/98) + +paper=`paperconf 2>/dev/null || true` +dftpaper=`paperconf -d` + +if [ $force -eq 1 ] || [ ! -e $@PAPERCONFVAR@ ] || invalidpaper $paper +then + papers="`format $width \"\" $knownpapers`" + echo + + if [ -x /usr/bin/pager ] + then + : ${PAGER:=/usr/bin/pager} + fi + if [ -x /bin/more ] + then + : ${PAGER:=/bin/more} + fi + : ${PAGER:=cat} + + LESS="-X -E $LESS" + export LESS + + ( + cat </dev/null`" != "$paper" ] || grep -q "[# ]" $@PAPERCONFVAR@ +then + setpaper "$paper" +fi + +exit 0 + -- cgit v1.2.3