debian/0000775000000000000000000000000012270041660007166 5ustar debian/texlive-binaries.postinst0000664000000000000000000000301612213264212014242 0ustar #!/bin/sh -e # texlive-binaries postinst, created 2008 by Frank Küster # probably not copyrightable as it looks now, but anyway the code maybe # freely copied, distributed and/or modified # activate the xdvi.bin alternative case "$1" in configure|reconfigure) update-alternatives --install /usr/bin/xdvi.bin xdvi.bin /usr/bin/xdvi-xaw 30 update-alternatives --install /usr/bin/bibtex bibtex \ /usr/bin/bibtex.original 100 \ --slave /usr/share/man/man1/bibtex.1.gz bibtex.1.gz \ /usr/share/man/man1/bibtex.original.1.gz ;; esac # # if fmtutil-sys is available rebuild all available formats # dhit_libkpathsea_configured () { kpsewhich --version >/dev/null 2>&1 } dhit_build_format () { tempfile=$(mktemp -p /tmp fmtutil.XXXXXXXX) printf "Building format(s) $*.\n\tThis may take some time... " if fmtutil-sys "$@" > $tempfile 2>&1 ; then rm -f $tempfile echo "done." else exec >&2 echo echo "fmtutil-sys failed. Output has been stored in" echo "$tempfile" echo "Please include this file if you report a bug." echo exit 1 fi } case "$1" in configure|reconfigure) update-fmtutil update-language if dhit_libkpathsea_configured; then # we are shipping mktexlsr, so it must be there! mktexlsr /usr/share/texmf /usr/share/texlive/texmf-dist /var/lib/texmf if [ -r /usr/share/texlive/texmf-dist/texconfig/tcfmgr ] ; then dhit_build_format --refresh fi fi ;; esac #DEBHELPER# debian/texlive-binaries.install0000664000000000000000000000002212213264212014017 0ustar usr/bin usr/share debian/man-pages/0000775000000000000000000000000012213264212011033 5ustar debian/man-pages/bibtex8.10000664000000000000000000000461712213264212012472 0ustar .TH BIBTEX8 "1" "April 2006" "bibtex8 3.71" "User Commands" .SH NAME bibtex8 \- 8-bit Big BibTeX version 0.99c .SH SYNOPSIS .B bibtex8 [\fIoptions\fR] \fIaux-file\fR .SH DESCRIPTION .PP 8-bit BibTeX is an enhanced, portable C version of BibTeX 0.99. It has been enhanced in these areas: .PP - conversion to "big" (32-bit) capacity .PP - capacity selectable at run time .PP - flexible support for non-English languages using 8-bit character sets .PP - well matched to LateX2e and its "inputenc" package .PP Oren Patashnik, the creator of BibTeX, is working on a new BibTeX 1.0 that will be a modern implementation supporting large capacities and non-English languages (see TUGboat, pages 269--274, volume 15, number 3, September 1994). He is content for this version to be released, but hopes that people will eventually migrate to BibTeX 1.0 when it is released. Its release date is uncertain at the moment. .SH OPTIONS .TP \-? \fB\-\-help\fR display this help text .TP \fB\-7\fR \fB\-\-traditional\fR operate in the original 7\-bit mode .TP \fB\-8\fR \fB\-\-8bit\fR force 8\-bit mode, no CS file used .TP \fB\-c\fR \fB\-\-csfile\fR FILE read FILE as the BibTeX character set and sort definition file .TP \fB\-d\fR \fB\-\-debug\fR TYPE report debugging information. TYPE is one or more of all, csf, io, mem, misc, search. .TP \fB\-s\fR \fB\-\-statistics\fR report internal statistics .TP \fB\-t\fR \fB\-\-trace\fR report execution tracing .TP \fB\-v\fR \fB\-\-version\fR report BibTeX version .TP \fB\-B\fR \fB\-\-big\fR set large BibTeX capacity .TP \fB\-H\fR \fB\-\-huge\fR set huge BibTeX capacity .TP \fB\-W\fR \fB\-\-wolfgang\fR set really huge BibTeX capacity for Wolfgang .TP \fB\-M\fR \fB\-\-min_crossrefs\fR ## set min_crossrefs to ## .TP \fB\-\-mcites\fR ## allow ## \ecites in the .aux files .TP \fB\-\-mentints\fR ## allow ## integer entries in the .bib databases .TP \fB\-\-mentstrs\fR ## allow ## string entries in the .bib databases .TP \fB\-\-mfields\fR ## allow ## fields in the .bib databases .TP \fB\-\-mpool\fR ## set the string pool to ## bytes .TP \fB\-\-mstrings\fR ## allow ## unique strings .TP \fB\-\-mwizfuns\fR ## allow ## wizard functions .SH AUTHORS .B bibtex8 was written by Niel Kempson and Alejandro Aguilar-Sierra . This manpage was written by Norbert Preining for Debian/GNU Linux and may be used, modified and/or distributed freely by anyone. debian/man-pages/texconfig-dialog.10000664000000000000000000000046712213264212014347 0ustar .TH texconfig-dialog 1 "February 2005" "teTeX" "teTeX" .SH NAME texconfig-dialog \- helper program for texconfig and texconfig-sys .SH DESCRIPTION .I texconfig-dialog is a helper program for texconfig and texconfig-sys, see the respective man pages for details. .SH AUTHOR Thomas Esser debian/man-pages/etex.10000664000000000000000000002442512213264212012071 0ustar .TH ETEX 1 "1 March 2011" "Web2C 2011" .\"===================================================================== .if n .ds MF Metafont .if t .ds MF M\s-2ETAFONT\s0 .if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP .if n .ds TX TeX .if n .ds MF Metafont .if t .ds MF M\s-2ETAFONT\s0 .ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP for troff .el .ds OX TeX for nroff .\" the same but obliqued .\" BX definition must follow TX so BX can use TX .if t .ds BX \fRB\s-2IB\s0\fP\*(TX .if n .ds BX BibTeX .\" LX definition must follow TX so LX can use TX .if t .ds LX \fRL\\h'-0.36m'\\v'-0.15v'\s-2A\s0\\h'-0.15m'\\v'0.15v'\fP\*(TX .if n .ds LX LaTeX .if t .ds AX \fRA\\h'-0.1667m'\\v'0.20v'M\\v'-0.20v'\\h'-0.125m'S\fP\*(TX .if n .ds AX AmSTeX .if t .ds AY \fRA\\h'-0.1667m'\\v'0.20v'M\\v'-0.20v'\\h'-0.125m'S\fP\*(LX .if n .ds AY AmSLaTeX .if n .ds WB Web .if t .ds WB W\s-2EB\s0 .\"===================================================================== .SH NAME etex \- extended (plain) TeX .SH SYNOPSIS .B etex .RI [ options ] .RI [ \fB&\fPformat ] .RI [ file | \fB\e\fPcommands ] .\"===================================================================== .SH DESCRIPTION Run the e-\*(TX typesetter on .IR file , by default creating .IR file.dvi . If the file argument has no extension, ".tex" will be appended to it. Instead of a filename, a set of e-\*(TX commands can be given, the first of which must start with a backslash. With a .BI & format argument e-\*(TX uses a different set of precompiled commands, contained in .IR format\fB.fmt\fP ; it is usually better to use the .B -fmt .I format option instead. .PP e-\*(TX is the first concrete result of an international research & development project, the NTS Project, which was established under the aegis of DANTE e.V. during 1992. The aims of the project are to perpetuate and develop the spirit and philosophy of \*(TX, whilst respecting Knuth's wish that \*(TX should remain frozen. .PP e-\*(TX can be used in two different modes: in .I compatibility mode it is supposed to be completely interchangable with standard \*(TX. In .I extended mode several new primitives are added that facilitate (among other things) bidirectional typesetting. .PP An extended mode format is generated by prefixing the name of the source file for the format with an asterisk (*). .PP e-\*(TX's handling of its command-line arguments is similar to that of the other \*(TX programs in the .I web2c implementation. .\"===================================================================== .SH OPTIONS This version of e-\*(TX understands the following command line options. .TP .BI -fmt \ format Use .I format as the name of the format to be used, instead of the name by which e-\*(TX was called or a .I %& line. .TP .B -enc Enable the enc\*(TX extensions. This option is only effective in combination with .BR -ini . For documentation of the enc\*(TX extensions see .BR http://www.olsak.net/enctex.html . .TP .B -etex Enable the e-\*(TX extensions. This option is only effective in combination with .BR -ini . .TP .B -file-line-error Print error messages in the form .I file:line:error which is similar to the way many compilers format them. .TP .B -no-file-line-error Disable printing error messages in the .I file:line:error style. .TP .B -file-line-error-style This is the old name of the .B -file-line-error option. .TP .B -halt-on-error Exit with an error code when an error is encountered during processing. .TP .B -help Print help message and exit. .TP .B -ini Start in .I INI mode, which is used to dump formats. The .I INI mode can be used for typesetting, but no format is preloaded, and basic initializations like setting catcodes may be required. .TP .BI -interaction \ mode Sets the interaction mode. The mode can be either .IR batchmode , .IR nonstopmode , .IR scrollmode , and .IR errorstopmode . The meaning of these modes is the same as that of the corresponding \ecommands. .TP .B -ipc Send DVI output to a socket as well as the usual output file. Whether this option is available is the choice of the installer. .TP .B -ipc-start As .BR -ipc , and starts the server at the other end as well. Whether this option is available is the choice of the installer. .TP .BI -jobname \ name Use .I name for the job name, instead of deriving it from the name of the input file. .TP .BI -kpathsea-debug \ bitmask Sets path searching debugging flags according to the bitmask. See the .I Kpathsea manual for details. .TP .BI -mktex \ fmt Enable .RI mktex fmt , where .I fmt must be either .I tex or .IR tfm . .TP .B -mltex Enable ML\*(TX extensions. Only effective in combination with .BR -ini . .TP .BI -no-mktex \ fmt Disable .RI mktex fmt , where .I fmt must be either .I tex or .IR tfm . .TP .BI -output-comment \ string Use .I string for the .I DVI file comment instead of the date. .TP .BI -output-directory \ directory Write output files in .I directory instead of the current directory. Look up input files in .I directory first, the along the normal search path. .TP .B -parse-first-line If the first line of the main input file begins with .I %& parse it to look for a dump name or a .B -translate-file option. .TP .B -no-parse-first-line Disable parsing of the first line of the main input file. .TP .BI -progname \ name Pretend to be program .IR name . This affects both the format used and the search paths. .TP .B -recorder Enable the filename recorder. This leaves a trace of the files opened for input and output in a file with extension .IR .fls . .TP .B -shell-escape Enable the .BI \ewrite18{ command } construct. The .I command can be any shell command. This construct is normally disallowed for security reasons. .TP .B -no-shell-escape Disable the .BI \ewrite18{ command } construct, even if it is enabled in the .I texmf.cnf file. .TP .B -src-specials Insert source specials into the .I DVI file. .TP .BI -src-specials \ where Insert source specials in certain placed of the .I DVI file. .I where is a comma-separated value list: .IR cr , .IR display , .IR hbox , .IR math , .IR par , .IR parent , or .IR vbox . .TP .BI -translate-file \ tcxname Use the .I tcxname translation table to set the mapping of input characters and re-mapping of output characters. .TP .BI -default-translate-file \ tcxname Like .B -translate-file except that a .I %& line can overrule this setting. .TP .B -version Print version information and exit. .\"===================================================================== .SH ENVIRONMENT See the Kpathsearch library documentation (the `Path specifications' node) for precise details of how the environment variables are used. The .B kpsewhich utility can be used to query the values of the variables. .PP One caveat: In most e-\*(TX formats, you cannot use ~ in a filename you give directly to e-\*(TX, because ~ is an active character, and hence is expanded, not taken as part of the filename. Other programs, such as \*(MF, do not have this problem. .PP .TP .B TEXMFOUTPUT Normally, e-\*(TX puts its output files in the current directory. If any output file cannot be opened there, it tries to open it in the directory specified in the environment variable TEXMFOUTPUT. There is no default value for that variable. For example, if you say .I etex paper and the current directory is not writable, if TEXMFOUTPUT has the value .IR /tmp , e-\*(TX attempts to create .I /tmp/paper.log (and .IR /tmp/paper.dvi , if any output is produced.) TEXMFOUTPUT is also checked for input files, as \*(TX often generates files that need to be subsequently read; for input, no suffixes (such as ``.tex'') are added by default, the input name is simply checked as given. .TP .B TEXINPUTS Search path for .I \einput and .I \eopenin files. This should start with ``.'', so that user files are found before system files. An empty path component will be replaced with the paths defined in the .I texmf.cnf file. For example, set TEXINPUTS to ".:/home/user/tex:" to prepend the current direcory and ``/home/user/tex'' to the standard search path. .TP .B TEXFORMATS Search path for format files. .TP .B TEXPOOL search path for .B etex internal strings. .TP .B TEXEDIT Command template for switching to editor. The default, usually .BR vi , is set when e-\*(TX is compiled. .TP .B TFMFONTS Search path for font metric .RI ( .tfm ) files. .\"===================================================================== .SH FILES The location of the files mentioned below varies from system to system. Use the .B kpsewhich utility to find their locations. .TP .I etex.pool Text file containing e-\*(TX's internal strings. .TP .I texfonts.map Filename mapping definitions. .TP .I *.tfm Metric files for e-\*(TX's fonts. .TP .I *.fmt Predigested e-\*(TX format (.\|fmt) files. .\"===================================================================== .SH NOTES Starting with version 1.40, pdf\*(TX incorporates the e-\*(TX extensions, so in this installation e\*(TX may be just a symbolic link to pdf\*(TX. See .BR pdftex (1). This manual page is not meant to be exhaustive. The complete documentation for this version of e-\*(TX can be found in the info manual .IR "Web2C: A TeX implementation" . .\"===================================================================== .SH BUGS This version of e-\*(TX implements a number of optional extensions. In fact, many of these extensions conflict to a greater or lesser extent with the definition of e-\*(TX. When such extensions are enabled, the banner printed when e-\*(TX starts is changed to print .B e-TeXk instead of .BR e-TeX . .PP This version of e-\*(TX fails to trap arithmetic overflow when dimensions are added or subtracted. Cases where this occurs are rare, but when it does the generated .I DVI file will be invalid. .\"===================================================================== .SH "SEE ALSO" .BR pdftex (1), .BR tex (1), .BR mf (1). .\"===================================================================== .SH AUTHORS e-\*(TX was developed by Peter Breitenlohner and the NTS team; Peter later continued its development outside of the team. .PP \*(TX was designed by Donald E. Knuth, who implemented it using his \*(WB system for Pascal programs. It was ported to Unix at Stanford by Howard Trickey, and at Cornell by Pavel Curtis. The version now offered with the Unix \*(TX distribution is that generated by the \*(WB to C system .RB ( web2c ), originally written by Tomas Rokicki and Tim Morgan. .PP The enc\*(TX extensions were written by Petr Olsak. debian/man-pages/otangle.10000664000000000000000000001050512213264212012547 0ustar .TH OTANGLE 1 "20 October 2002" "Web2C 7.5.5" .\"===================================================================== .if n .ds MF Metafont .if t .ds MF M\s-2ETAFONT\s0 .if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP .if n .ds TX TeX .ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP for troff .el .ds OX TeX for nroff .\" the same but obliqued .\" BX definition must follow TX so BX can use TX .if t .ds BX \fRB\s-2IB\s0\fP\*(TX .if n .ds BX BibTeX .\" LX definition must follow TX so LX can use TX .if t .ds LX \fRL\\h'-0.36m'\\v'-0.15v'\s-2A\s0\\h'-0.15m'\\v'0.15v'\fP\*(TX .if n .ds LX LaTeX .if n .ds WB Web .if t .ds WB W\s-2EB\s0 .\"===================================================================== .SH NAME otangle \- translate WEB to Pascal .SH SYNOPSIS .B otangle [ .RI options ] .I webfile[.web] [ .I changefile[.ch] ] .\"===================================================================== .SH DESCRIPTION This manual page is not meant to be exhaustive. The complete documentation for this version of \*(TX can be found in the info file or manual .IR "Web2C: A TeX implementation" . .PP The .B otangle program converts a \*(WB source document into a Pascal program that may be compiled in the usual way with the on-line Pascal compiler (e.g., .BR pc (1)). The output file is packed into lines of 72 characters or less, with the only concession to readability being the termination of lines at semicolons when this can be done conveniently. .PP The \*(WB language allows you to prepare a single document containing all the information that is needed both to produce a compilable Pascal program and to produce a well-formatted document describing the program in as much detail as the writer may desire. The user of \*(WB must be familiar with both \*(TX and Pascal. \*(WB also provides a relatively simple, although adequate, macro facility that permits a Pascal program to be written in small easily-understood modules. .PP The command line should have either one or two names on it. The first is taken as the \*(WB file (and .I .web is added if there is no extension). If there is another name, it is a change file (and .I .ch is added if there is no extension). The change file overrides parts of the \*(WB file, as described in the \*(WB system documentation. .PP The output files are a Pascal file and a string pool file, whose names are formed by adding .I .p and .I .pool respectively to the root of the \*(WB file name. .\"===================================================================== .SH "OPTIONS" This version of .B otangle understands the following options. Note that some of these options may render the output unsuitable for processing by a Pascal compiler. .TP .B --help .rb Print help message and exit. .TP .B --version .rb Print version information and exit. .\"===================================================================== .SH "SEE ALSO" .BR pc (1), .BR pxp (1) (for formatting .B otangle output when debugging), .BR tex (1). .PP Donald E. Knuth, .IR "The \*(WB System of Structured Documentation" . .PP Donald E. Knuth, .IR "Literate Programming" , Computer Journal .BR 27 , 97\-111, 1984. .PP Wayne Sewell, .IR "Weaving a Program" , Van Nostrand Reinhold, 1989, ISBN 0-442-31946-0. .PP Donald E. Knuth, .I "\*(OX: The Program" (Volume B of .IR "Computers and Typesetting" ), Addison-Wesley, 1986, ISBN 0-201-13437-3. .PP Donald E. Knuth, .I "\*(MF: The Program" (Volume D of .IR "Computers and Typesetting" ), Addison-Wesley, 1986, ISBN 0-201-13438-1. .PP These last two are by far the largest extant examples of \*(WB programs. .PP There is an active Internet electronic mail discussion list on the subject of literate programming; send a subscription request to .I litprog-request@shsu.edu to join. .\"===================================================================== .SH AUTHORS \*(WB was designed by Donald E. Knuth, based on an earlier system called DOC (implemented by Ignacio Zabala). The .B tangle and .B weave programs are themselves written in \*(WB. The system was originally ported to Unix at Stanford by Howard Trickey, and at Cornell by Pavel Curtis. .PP .B otangle incorporates extensions for Omega, and is written by John Plaice and Yannis Haralambous. .PP This manpage has been written by Norbert Preining for Debian/GNU Linux by adapting the man page for tangle and may be used, modified and/or distributed freely by anyone. debian/man-pages/pdfopen.10000664000000000000000000000227612213264212012557 0ustar .TH PDFOPEN "1" "April 2006" "pdfopen 0.4: Acrobat Reader remote control" "User Commands" .SH NAME pdfopen, pdfclose \- manual page for pdfopen 0.4: Acrobat Reader remote control .SH DESCRIPTION .B pdfopen and .B pdfclose can be used to control a running instance of Acrobat Reader. .IP pdfopen [\-\-file .I ] .IP pdfclose [\-\-file .I ] .PP Without argument, the .B pdfopen program sends a "Ctrl\-<\-" to an existing X window with the name .B Acrobat Reader, and "Alt-<-" to a window with the name .B AdobeReader, if such windows exist. .B pdfclose sends a "Ctrl\-w" instead. .SH OPTIONS .TP \-\-file With this argument, .B pdfclose closes an existing window with the name , and .B pdfopen opens a window with the name (starting a reader if necesary), or it reloads if it was already open. .TP --all,--page These arguments, accepted by Fabrice Popineau's Windows originals of .B pdfopen and .B pdfclose, are silently ignored. .SH AUTHORS .B pdfopen and .B pdfclose are written by Taco Hoekwater . This manpage has been written by Frank K\[:u]ster for Debian/GNU Linux and may be used, modified and/or distributed freely by anyone. debian/man-pages/devnag.10000664000000000000000000000217512213264212012366 0ustar .TH DEVNAG "1" "April 2006" "devnag 2.13" "User Commands" .SH NAME devnag \- Devanagari for TeX preprocessor .SH SYNOPSIS .B devnag in[.dn] [out[.tex]] .SH DESCRIPTION .PP .B devnag is a preprocessor that reads transliterated Devanagari input delimited by \dn and converts it into a form with which TeX is familiar. .PP The preprocessor handles the details of character placement such as the alignment of vowel diacritics and consonant ligatures. The rest of the layout, however, must be managed by the user. .PP For specification of the format please see the documentation accompanying the package. .SH OPTIONS .TP in[.dn] out[.tex] The default file extension for an input file is .dn and for an output file .tex. The output filename is optional. If an output filename is not specified, the preprocessor will name it after the input file. .TP \fB\-v\fR report devnag version .SH AUTHORS .B devnag was written by Frans J. Velthuis and is currently maintained by Zdenek Wagner . This manpage was written by Norbert Preining for Debian/GNU Linux and may be used, modified and/or distributed freely by anyone. debian/man-pages/omfonts.10000664000000000000000000000073512213264212012607 0ustar .TH "omfonts" "1" "March 2006" "Omega" "Omega" .PP .SH "NAME" omfonts \ - the driver program behind ofm2opl, opl2ofm, ovf2ovp, and ovp2ovf. .PP .SH "DESCRIPTION and SEE ALSO" .PP Please see the respective man pages of \fBofm2opl\fP(1), \fBopl2ofm\fP(1), \fBovf2ovp\fP(1), and \fBovp2ovf\fP(1). .PP .SH "AUTHOR" .PP This manual page was written by Norbert Preining , for the Debian GNU/Linux system. It is too trivial to deserve special attention. debian/texlive-binaries.preinst0000664000000000000000000000104612213264212014044 0ustar #!/bin/sh -e # texlive-binaries preinst, created 2008 by the Debian TeX Task Force # probably not copyrightable as it looks now, but anyway the code maybe # freely copied, distributed and/or modified # remove any format or log files in /var/lib/texmf/web2c, they must be # in $engine subdirs now. tetex does not properly remove them, and # they cause strange failures with context. for ext in fmt mem log base; do rm -f /var/lib/texmf/web2c/*.$ext done #DEBHELPER# # texlive-binaries.preinst end # Local Variables: # mode: shell-script # End: debian/libptexenc1.install0000664000000000000000000000006412213264212012771 0ustar usr/lib/libptexenc.so.1.*.* usr/lib/libptexenc.so.1 debian/xdvi-pl0000664000000000000000000000572712213264212010504 0ustar #! /usr/bin/perl -w # This is the xdvi wrapper script for Debian, based on Thomas Esser's # teTeX version 0.2. # Debian version: Copyright Julian Gilbey, 2002. Lots of modifications # by Chung-chieh Shan . # Also by TSUCHIYA Masatoshi . # Original version: Copyright Thomas Esser, 1998. # Permission to distribute this software is given under the terms of # the GNU general public license version 2 or later. # Thomas writes: # This script sets some environment variables to make sure that xdvi's # resource file in $XDVIINPUTS/xdvi is read by xdvi.bin. # Special care was taken to make this work for old R3, too. Therefore, # we need to modify XAPPLRESDIR. If you are running R4 or later, you # can set XUSERFILESEARCHPATH for user specific application default # files. You cannot use XAPPLRESDIR for user specific application default # files. # Julian writes: # This has been rewritten in Perl so that we can mangle the arguments # to handled gzipped dvi files, which not have errors if there are # spaces in some arguments. XAPPLRESDIR is no longer modified. # Stephen Gildea writes: # Debian distributes X11R6, therefore this script should not clobber # XAPPLRESDIR, which is for user customizations. use strict; use FileHandle; use File::Basename; use File::Spec; use File::Temp qw/ tempfile /; my @NAMEOPT; if (@ARGV == 1 and ($ARGV[0] eq '-help' or $ARGV[0] eq '-version')) { @NAMEOPT=(); } else { @NAMEOPT=qw(-name xdvi); } $ENV{'XDVIINPUTS'} .= ":\$TEXMF/{xdvi,web2c}"; my ($xdviappfile, $xdviappdir, $xdviapppath); $xdviappfile=`kpsewhich -progname=xdvi --format='other text files' XDvi`; if ("$xdviappfile" ne '') { $xdviappdir=dirname($xdviappfile); $xdviapppath="$xdviappdir/%N"; if (exists $ENV{'XFILESEARCHPATH'}) { $ENV{'XFILESEARCHPATH'} = "$xdviapppath:$ENV{'XFILESEARCHPATH'}"; } else { $ENV{'XFILESEARCHPATH'} = "$xdviapppath:%D"; } } my $status; if (@ARGV) { my $filename = pop @ARGV; if ($filename =~ /\.(gz|Z|bz2)$/) { my @command = $1 eq 'bz2' ? qw(bzip2 -d -c) : qw(gzip -d -c); require Fcntl; my $fh = tempfile( UNLINK => 1 ) or die "xdvi: cannot create temporary file: $!\n"; fcntl $fh, Fcntl::F_SETFD(), 0 or die "xdvi: disabling close-on-exec for temporary file: $!\n"; if (my $child = fork) { 1 while wait != $child; if ($? & 255) { die "xdvi: $command[0] terminated abnormally: $?\n"; } elsif ($?) { my $code = $? >> 8; die "xdvi: $command[0] terminated with exit code $code\n"; } } elsif (defined $child) { STDOUT->fdopen( $fh, "w" ); exec @command, $filename; } else { die "xdvi: fork: $!\n"; } $status = system('xdvi.bin', @NAMEOPT, @ARGV, '/dev/fd/'.fileno($fh)); } else { $status = system('xdvi.bin', @NAMEOPT, @ARGV, $filename); } } else { $status = system('xdvi.bin', @NAMEOPT); } if ($status & 255) { die "xdvi: xdvi.bin terminated abnormally: $?\n"; } else { my $code = $? >> 8; exit $code; } debian/copyright0000664000000000000000000006046012213264212011124 0ustar Copyright information for the texlive bundle Table of contents: 1. Copyright and License of the debian-specific adaptions 2. License of the TeX live distribution as a compilation work 3. LPPL 1. Copyright and License of the debian-specific adaptions Debian adaptions for these packages are licensed under the GNU General Public License, version 2, and are under Copyright by: Norbert Preining (2005-) Frank Küster (2006-) Julian Gilbey (2002-) All code generated for the Debian adaptions is under the GNU General Public License. -------- 2. License of the TeX live distribution as a compilation work COPYING CONDITIONS FOR TeX Live: To the best of our knowledge, all software in the TeX Live distribution is freely redistributable (libre, that is, not necessarily gratis), within the Free Software Foundation's definition and the Debian Free Software Guidelines. Where the two conflict, we generally follow the FSF. If you find any non-free files included, please contact us (references given at the end). That said, TeX Live has neither a single copyright holder nor a single license covering its entire contents, since it is a collection of many independent packages. Therefore, you may copy, modify, and/or redistribute software from TeX Live only if you comply with the requirements placed thereon by the owners of the respective packages. To most easily learn these requirements, we suggest checking the TeX Catalogue at: http://www.ctan.org/tex-archive/help/Catalogue/ (or any CTAN mirror). Of course the legal statements within the packages themselves are the final authority. In some cases, TeX Live is distributed with a snapshot of the CTAN archive, which is entirely independent of and separable from TeX Live itself. (The TeX Collection DVD is one example of this.) Please be aware that the CTAN snapshot contains many files which are *not* freely redistributable; see LICENSE.CTAN for more information. GUIDELINES FOR REDISTRIBUTION: In general, you may redistribute TeX Live, with or without modification, for profit or not, according to the usual free software tenets. Here are some general guidelines for doing this: - If you make any changes to the TeX Live distribution or any package it contains, besides complying with any licensing requirements, you must prominently mention such changes in your modified distribution so that users do not take your work for ours, and know to contact you, not us, in case of questions or problems. A new top-level file README. is a good place to describe the general situation. - Especially (but not necessarily) if changes or additions are made, we recommend a clearly different title, such as " DVD, based on TeX Live YYYY", where YYYY is the year of TeX Live you are using. This credits both our work and yours. - You absolutely may *not* place your own copyright on the entire distribution, since it is not your work. Statements such as "all rights reserved" and "may not be reproduced" are especially reprehensible, since they are antithetical to the free software principles under which TeX Live is produced. - You may use any cover or media label designs that you wish. Such packaging and marketing details are not covered by any TeX Live license. - Finally, we make the following requests (not legal requirements): a) Acknowledging that TeX Live is developed as a joint effort by all TeX user groups, and encouraging the user/reader to join their user group of choice, as listed on the web page http://tug.org/usergroups.html. b) Referencing the TeX Live home page: http://tug.org/texlive/ Such information may be placed on the label of your media, your cover, and/or in accompanying text (for instance, in the acknowledgements section of a book). Finally, although it is again not a requirement, we'd like to invite any redistributors to make a donation to the project, whether cash or in-kind, for example via https://www.tug.org/donate/dev.html. Thanks. If you have any questions or comments, *please* contact us. In general, we appreciate being given the chance to review any TeX Live-related material in advance of publication, simply to avoid mistakes. It is much better to correct text on a CD label or in a book before thousands of copies are made! We are also happy to keep anyone planning a publication informed as to our deadlines and progress. Just let us know. However, be aware that TeX Live is produced entirely by volunteers, and no dates can be guaranteed. LICENSING FOR NEW PACKAGES: Finally, we are often asked what license to use for new work. To be considered for inclusion on TeX Live, a package must use a free software license, such as the LaTeX Project Public License, the GNU General Public License, the modified BSD license, etc. (Please use an existing license instead of making up your own.) Furthermore, all sources must be available, including for documentation files. Please see http://tug.org/texlive/pkgcontrib.html for more information, and other considerations. Thanks for your interest in TeX. - Karl Berry, for the TeX Live project ------------------------------------------------------------ TeX Live mailing list: http://lists.tug.org/tex-live TeX Live home page: http://tug.org/tex-live/ The FSF's free software definition: http://www.gnu.org/philosophy/free-sw.html Debian Free Software Guidelines: http://www.debian.org/intro/free FSF commentary on existing licenses: http://www.gnu.org/licenses/license-list.html LPPL: http://latex-project.org/lppl.html or texmf-dist/doc/latex/base/lppl.txt LPPL rationale: texmf-dist/doc/latex/base/modguide.pdf ------------- 3. lppl (LaTeX Project Public License) The LaTeX Project Public License =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- LPPL Version 1.3c 2006-05-20 Copyright 1999 2002-2006 LaTeX3 Project Everyone is allowed to distribute verbatim copies of this license document, but modification of it is not allowed. PREAMBLE ======== The LaTeX Project Public License (LPPL) is the primary license under which the the LaTeX kernel and the base LaTeX packages are distributed. You may use this license for any work of which you hold the copyright and which you wish to distribute. This license may be particularly suitable if your work is TeX-related (such as a LaTeX package), but it is written in such a way that you can use it even if your work is unrelated to TeX. The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE', below, gives instructions, examples, and recommendations for authors who are considering distributing their works under this license. This license gives conditions under which a work may be distributed and modified, as well as conditions under which modified versions of that work may be distributed. We, the LaTeX3 Project, believe that the conditions below give you the freedom to make and distribute modified versions of your work that conform with whatever technical specifications you wish while maintaining the availability, integrity, and reliability of that work. If you do not see how to achieve your goal while meeting these conditions, then read the document `cfgguide.tex' and `modguide.tex' in the base LaTeX distribution for suggestions. DEFINITIONS =========== In this license document the following terms are used: `Work' Any work being distributed under this License. `Derived Work' Any work that under any applicable law is derived from the Work. `Modification' Any procedure that produces a Derived Work under any applicable law -- for example, the production of a file containing an original file associated with the Work or a significant portion of such a file, either verbatim or with modifications and/or translated into another language. `Modify' To apply any procedure that produces a Derived Work under any applicable law. `Distribution' Making copies of the Work available from one person to another, in whole or in part. Distribution includes (but is not limited to) making any electronic components of the Work accessible by file transfer protocols such as FTP or HTTP or by shared file systems such as Sun's Network File System (NFS). `Compiled Work' A version of the Work that has been processed into a form where it is directly usable on a computer system. This processing may include using installation facilities provided by the Work, transformations of the Work, copying of components of the Work, or other activities. Note that modification of any installation facilities provided by the Work constitutes modification of the Work. `Current Maintainer' A person or persons nominated as such within the Work. If there is no such explicit nomination then it is the `Copyright Holder' under any applicable law. `Base Interpreter' A program or process that is normally needed for running or interpreting a part or the whole of the Work. A Base Interpreter may depend on external components but these are not considered part of the Base Interpreter provided that each external component clearly identifies itself whenever it is used interactively. Unless explicitly specified when applying the license to the Work, the only applicable Base Interpreter is a `LaTeX-Format' or in the case of files belonging to the `LaTeX-format' a program implementing the `TeX language'. CONDITIONS ON DISTRIBUTION AND MODIFICATION =========================================== 1. Activities other than distribution and/or modification of the Work are not covered by this license; they are outside its scope. In particular, the act of running the Work is not restricted and no requirements are made concerning any offers of support for the Work. 2. You may distribute a complete, unmodified copy of the Work as you received it. Distribution of only part of the Work is considered modification of the Work, and no right to distribute such a Derived Work may be assumed under the terms of this clause. 3. You may distribute a Compiled Work that has been generated from a complete, unmodified copy of the Work as distributed under Clause 2 above, as long as that Compiled Work is distributed in such a way that the recipients may install the Compiled Work on their system exactly as it would have been installed if they generated a Compiled Work directly from the Work. 4. If you are the Current Maintainer of the Work, you may, without restriction, modify the Work, thus creating a Derived Work. You may also distribute the Derived Work without restriction, including Compiled Works generated from the Derived Work. Derived Works distributed in this manner by the Current Maintainer are considered to be updated versions of the Work. 5. If you are not the Current Maintainer of the Work, you may modify your copy of the Work, thus creating a Derived Work based on the Work, and compile this Derived Work, thus creating a Compiled Work based on the Derived Work. 6. If you are not the Current Maintainer of the Work, you may distribute a Derived Work provided the following conditions are met for every component of the Work unless that component clearly states in the copyright notice that it is exempt from that condition. Only the Current Maintainer is allowed to add such statements of exemption to a component of the Work. a. If a component of this Derived Work can be a direct replacement for a component of the Work when that component is used with the Base Interpreter, then, wherever this component of the Work identifies itself to the user when used interactively with that Base Interpreter, the replacement component of this Derived Work clearly and unambiguously identifies itself as a modified version of this component to the user when used interactively with that Base Interpreter. b. Every component of the Derived Work contains prominent notices detailing the nature of the changes to that component, or a prominent reference to another file that is distributed as part of the Derived Work and that contains a complete and accurate log of the changes. c. No information in the Derived Work implies that any persons, including (but not limited to) the authors of the original version of the Work, provide any support, including (but not limited to) the reporting and handling of errors, to recipients of the Derived Work unless those persons have stated explicitly that they do provide such support for the Derived Work. d. You distribute at least one of the following with the Derived Work: 1. A complete, unmodified copy of the Work; if your distribution of a modified component is made by offering access to copy the modified component from a designated place, then offering equivalent access to copy the Work from the same or some similar place meets this condition, even though third parties are not compelled to copy the Work along with the modified component; 2. Information that is sufficient to obtain a complete, unmodified copy of the Work. 7. If you are not the Current Maintainer of the Work, you may distribute a Compiled Work generated from a Derived Work, as long as the Derived Work is distributed to all recipients of the Compiled Work, and as long as the conditions of Clause 6, above, are met with regard to the Derived Work. 8. The conditions above are not intended to prohibit, and hence do not apply to, the modification, by any method, of any component so that it becomes identical to an updated version of that component of the Work as it is distributed by the Current Maintainer under Clause 4, above. 9. Distribution of the Work or any Derived Work in an alternative format, where the Work or that Derived Work (in whole or in part) is then produced by applying some process to that format, does not relax or nullify any sections of this license as they pertain to the results of applying that process. 10. a. A Derived Work may be distributed under a different license provided that license itself honors the conditions listed in Clause 6 above, in regard to the Work, though it does not have to honor the rest of the conditions in this license. b. If a Derived Work is distributed under a different license, that Derived Work must provide sufficient documentation as part of itself to allow each recipient of that Derived Work to honor the restrictions in Clause 6 above, concerning changes from the Work. 11. This license places no restrictions on works that are unrelated to the Work, nor does this license place any restrictions on aggregating such works with the Work by any means. 12. Nothing in this license is intended to, or may be used to, prevent complete compliance by all parties with all applicable laws. NO WARRANTY =========== There is no warranty for the Work. Except when otherwise stated in writing, the Copyright Holder provides the Work `as is', without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the Work is with you. Should the Work prove defective, you assume the cost of all necessary servicing, repair, or correction. In no event unless required by applicable law or agreed to in writing will The Copyright Holder, or any author named in the components of the Work, or any other party who may distribute and/or modify the Work as permitted above, be liable to you for damages, including any general, special, incidental or consequential damages arising out of any use of the Work or out of inability to use the Work (including, but not limited to, loss of data, data being rendered inaccurate, or losses sustained by anyone as a result of any failure of the Work to operate with any other programs), even if the Copyright Holder or said author or said other party has been advised of the possibility of such damages. MAINTENANCE OF THE WORK ======================= The Work has the status `author-maintained' if the Copyright Holder explicitly and prominently states near the primary copyright notice in the Work that the Work can only be maintained by the Copyright Holder or simply that it is `author-maintained'. The Work has the status `maintained' if there is a Current Maintainer who has indicated in the Work that they are willing to receive error reports for the Work (for example, by supplying a valid e-mail address). It is not required for the Current Maintainer to acknowledge or act upon these error reports. The Work changes from status `maintained' to `unmaintained' if there is no Current Maintainer, or the person stated to be Current Maintainer of the work cannot be reached through the indicated means of communication for a period of six months, and there are no other significant signs of active maintenance. You can become the Current Maintainer of the Work by agreement with any existing Current Maintainer to take over this role. If the Work is unmaintained, you can become the Current Maintainer of the Work through the following steps: 1. Make a reasonable attempt to trace the Current Maintainer (and the Copyright Holder, if the two differ) through the means of an Internet or similar search. 2. If this search is successful, then enquire whether the Work is still maintained. a. If it is being maintained, then ask the Current Maintainer to update their communication data within one month. b. If the search is unsuccessful or no action to resume active maintenance is taken by the Current Maintainer, then announce within the pertinent community your intention to take over maintenance. (If the Work is a LaTeX work, this could be done, for example, by posting to comp.text.tex.) 3a. If the Current Maintainer is reachable and agrees to pass maintenance of the Work to you, then this takes effect immediately upon announcement. b. If the Current Maintainer is not reachable and the Copyright Holder agrees that maintenance of the Work be passed to you, then this takes effect immediately upon announcement. 4. If you make an `intention announcement' as described in 2b. above and after three months your intention is challenged neither by the Current Maintainer nor by the Copyright Holder nor by other people, then you may arrange for the Work to be changed so as to name you as the (new) Current Maintainer. 5. If the previously unreachable Current Maintainer becomes reachable once more within three months of a change completed under the terms of 3b) or 4), then that Current Maintainer must become or remain the Current Maintainer upon request provided they then update their communication data within one month. A change in the Current Maintainer does not, of itself, alter the fact that the Work is distributed under the LPPL license. If you become the Current Maintainer of the Work, you should immediately provide, within the Work, a prominent and unambiguous statement of your status as Current Maintainer. You should also announce your new status to the same pertinent community as in 2b) above. WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE ====================================================== This section contains important instructions, examples, and recommendations for authors who are considering distributing their works under this license. These authors are addressed as `you' in this section. Choosing This License or Another License ---------------------------------------- If for any part of your work you want or need to use *distribution* conditions that differ significantly from those in this license, then do not refer to this license anywhere in your work but, instead, distribute your work under a different license. You may use the text of this license as a model for your own license, but your license should not refer to the LPPL or otherwise give the impression that your work is distributed under the LPPL. The document `modguide.tex' in the base LaTeX distribution explains the motivation behind the conditions of this license. It explains, for example, why distributing LaTeX under the GNU General Public License (GPL) was considered inappropriate. Even if your work is unrelated to LaTeX, the discussion in `modguide.tex' may still be relevant, and authors intending to distribute their works under any license are encouraged to read it. A Recommendation on Modification Without Distribution ----------------------------------------------------- It is wise never to modify a component of the Work, even for your own personal use, without also meeting the above conditions for distributing the modified component. While you might intend that such modifications will never be distributed, often this will happen by accident -- you may forget that you have modified that component; or it may not occur to you when allowing others to access the modified version that you are thus distributing it and violating the conditions of this license in ways that could have legal implications and, worse, cause problems for the community. It is therefore usually in your best interest to keep your copy of the Work identical with the public one. Many works provide ways to control the behavior of that work without altering any of its licensed components. How to Use This License ----------------------- To use this license, place in each of the components of your work both an explicit copyright notice including your name and the year the work was authored and/or last substantially modified. Include also a statement that the distribution and/or modification of that component is constrained by the conditions in this license. Here is an example of such a notice and statement: %% pig.dtx %% Copyright 2005 M. Y. Name % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. % % This work has the LPPL maintenance status `maintained'. % % The Current Maintainer of this work is M. Y. Name. % % This work consists of the files pig.dtx and pig.ins % and the derived file pig.sty. Given such a notice and statement in a file, the conditions given in this license document would apply, with the `Work' referring to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being generated from `pig.dtx' using `pig.ins'), the `Base Interpreter' referring to any `LaTeX-Format', and both `Copyright Holder' and `Current Maintainer' referring to the person `M. Y. Name'. If you do not want the Maintenance section of LPPL to apply to your Work, change `maintained' above into `author-maintained'. However, we recommend that you use `maintained', as the Maintenance section was added in order to ensure that your Work remains useful to the community even when you can no longer maintain and support it yourself. Derived Works That Are Not Replacements --------------------------------------- Several clauses of the LPPL specify means to provide reliability and stability for the user community. They therefore concern themselves with the case that a Derived Work is intended to be used as a (compatible or incompatible) replacement of the original Work. If this is not the case (e.g., if a few lines of code are reused for a completely different task), then clauses 6b and 6d shall not apply. Important Recommendations ------------------------- Defining What Constitutes the Work The LPPL requires that distributions of the Work contain all the files of the Work. It is therefore important that you provide a way for the licensee to determine which files constitute the Work. This could, for example, be achieved by explicitly listing all the files of the Work near the copyright notice of each file or by using a line such as: % This work consists of all files listed in manifest.txt. in that place. In the absence of an unequivocal list it might be impossible for the licensee to determine what is considered by you to comprise the Work and, in such a case, the licensee would be entitled to make reasonable conjectures as to which files comprise the Work. debian/texlive-binaries.links0000664000000000000000000000007312213264212013477 0ustar usr/bin/pdftex usr/bin/etex usr/bin/pdftex usr/bin/pdfetex debian/libptexenc-dev.install0000664000000000000000000000010112213264212013454 0ustar usr/lib/libptexenc.a usr/lib/libptexenc.so usr/include/ptexenc/* debian/changelog0000664000000000000000000013315212270041654011050 0ustar texlive-bin (2013.20130729.30972-2build3) trusty; urgency=medium * Rebuild for the new poppler soname -- Sebastien Bacher Wed, 22 Jan 2014 23:17:17 +0100 texlive-bin (2013.20130729.30972-2build2) trusty; urgency=medium * No change rebuild against libicu52 -- Dimitri John Ledkov Fri, 27 Dec 2013 05:35:29 +0000 texlive-bin (2013.20130729.30972-2build1) trusty; urgency=medium * No-change rebuild for new harfbuzz -- Iain Lane Mon, 09 Dec 2013 12:45:01 +0000 texlive-bin (2013.20130729.30972-2) unstable; urgency=low * fix some bugs in man pages: mf, xdvi, synctex.5, mendex, detex (Closes: #662846, #664961, #667981) * fix a bug in mendex when range ops and macros are used (Closes: #534641) * reinstatiate xdvi perl wrapper (Closes: #631271, #583188) * pull several bug fixes from upstream svn, in particular fixes for luatex (svn 31126, 31313, 31358), dvipdfmx (svn 31303), pdftex (svn 31313), dvips (svn 31350, 31547) * explicitely write out versioned dependencies on automake, autoconf, libtool, and m4, to make sure we get successful builds -- Norbert Preining Mon, 09 Sep 2013 15:18:50 +0900 texlive-bin (2013.20130729.30972-1) unstable; urgency=low * update make-orig-tar to use last-changed-rev svn number for the last number in the version string * switch to system harfbuzz library (Closes: #717962) - remove halfbuzz library from source - add build dependency on libharfbuzz-dev >= 0.9.18-3 - adjust debian/rules to build with system-harfbuzz * add texinfo to build-deps, somehow timestamps can get screwed which means that info files will be rebuild (Closes: #718251) -- Norbert Preining Tue, 30 Jul 2013 14:00:37 +0900 texlive-bin (2013.20130722.31261-1) unstable; urgency=low * allow for different origin in make-orig-tar * Imported Upstream version 2013.20130722.31261 - fix for crash of luatex on x32 archs in certain cases - update metapost to 1.803 * ship new pmpost patch for 1.803 * bump standards version, no changes necessary -- Norbert Preining Fri, 26 Jul 2013 14:39:43 +0900 texlive-bin (2013.20130529.30792-1) unstable; urgency=low * remove dependency on ed, seems not needed anymore (Closes: #546938) * fix encoding of mendex man page (new b-d on recode) (Closes: #702202) * fix strange output in tex.1 (Closes: #663157) * upstream fixes (already in earlier TL2013 versions) - xdvi now without libt1 (Closes: #668415) - xdvi reacts on horizontal scroll events (Closes: #235757, #131338) - dvips does not crash on input == output (Closes: #703212) * upstream fix to luatex libio -- Norbert Preining Wed, 29 May 2013 10:05:32 +0900 texlive-bin (2013.20130523.30626-1) unstable; urgency=low * update pmpost patch to fix png/svg output, thanks to Akira Kakuto (Closes: #709273) * disable ttf2pk and enable ttf2pk2, this allows us to get rid of unsupported libfreetype(1), thanks again to OndÅ™ej Surý. * new upstream: remove biber binaries (Closes: #709274) * fix postinst so that formats are again rebuild * remove lintian-overrides, not needed anymore -- Norbert Preining Thu, 23 May 2013 09:42:24 +0900 texlive-bin (2013.20130522.30620-1) unstable; urgency=low * remove libgd and t1lib copies by removing the need to configure these libraries at all (Closes: #709145, #709146) Thanks OndÅ™ej Surý for providing the patch. * build with system zzlib and ice, remove embedded copies * remove copies of cairo, pixman which are already unused * re-include pmpost building, thanks to Akira Kakuto and Hironori Kitagawa -- Norbert Preining Wed, 22 May 2013 10:07:27 +0900 texlive-bin (2013.20130521.30601-1) unstable; urgency=low * break against old TeX Live and update search path (Closes: #709025) * reenable in-tree libgd usage: after the libtiff4 vs libtiff5 chaos has been fixed (in libgd?) it will be disabled again -- Norbert Preining Tue, 21 May 2013 11:14:15 +0900 texlive-bin (2013.20130516.30500-1) unstable; urgency=low * new upstram checkout * disable pmpost, no build support at the moment -- Norbert Preining Thu, 16 May 2013 18:21:52 +0900 texlive-bin (2012.20130315.29398-1) experimental; urgency=low * import new upstream, add svn rev number as last version component * add Vcs-fields (Closes: #695054) * bump texlive-common dependency to 2012.20130315 * disable building texdoctk, fully build out of texlive-base -- Norbert Preining Sat, 16 Mar 2013 09:53:14 +0900 texlive-bin (2012.20121124-1) experimental; urgency=low * depend on texlive-common >= 2012.20121120 to prohibit partial update of only texlive-binaries (Closes: #694126) -- Norbert Preining Sun, 25 Nov 2012 14:22:09 +0900 texlive-bin (2012.20121120-1) experimental; urgency=low * new upstream build -- Norbert Preining Tue, 20 Nov 2012 17:57:16 +0900 texlive-bin (2012.20120628-4) unstable; urgency=low * add necessary break for update from wheezy (Closes: #689005) * build dvisvgm with libgs support (build dep added, config option added) * include a fixed and updated man page for updmap.cfg (Closes: #688893) -- Norbert Preining Tue, 20 Nov 2012 09:31:10 +0900 texlive-bin (2012.20120628-3) unstable; urgency=low * fix too short name space for cweave (original file has this fix since 2008) (new patch cweave-fix-too-short-names) -- Norbert Preining Tue, 04 Sep 2012 10:32:59 +0900 texlive-bin (2012.20120628-2) unstable; urgency=low * cherrypick a bugfix from upstream for ptex kanji code scanning (debian/quilt/upstream-fix-ptex-scanning) * format and lintian fixes -- Norbert Preining Thu, 26 Jul 2012 11:59:23 +0900 texlive-bin (2012.20120628-1) unstable; urgency=low * new upstream (some emergency fixes), the following patches have been removed since they are included upstream: patch-icu, patch-pdftex, fix-pipe-in-out-regression, upstream-fix-ini-synctex-segfault * Build with -marm on armhf to fix lilypond FTBFS (Closes: #678604) (Thanks Peter Michael Green) -- Norbert Preining Thu, 28 Jun 2012 23:47:26 +0900 texlive-bin (2012.20120623-2) unstable; urgency=low * fix reading from and writing to pipes from within tex: new patch fix-pipe-in-out-regression (Closes: #679065) -- Norbert Preining Tue, 26 Jun 2012 16:02:17 +0900 texlive-bin (2012.20120623-1) unstable; urgency=low * post release fixed from Peter Breitenlohner (will be included upstream): - (patch-dvi2tty, patch-lacheck) Ken Brown has noteda that already moderately long pathnames may yield buffer overruns in lacheck and dvi2tty. - (patch-icu) three ICU library files have been modified (undoing ICU SVN commit 36090 from 2009-06-11), in order to solve all/most XeTeX problems with Indic scripts. - (patch-pdftex) a small change in pdftexdir/pdftosrc.cc required to build pdfTeX with poppler >=0.18.4 (system-xpdf). Note, however, that building pdfTeX that way slightly reduces its capability to handle large files (see README.config 1.6 and 3.4.2). * update updmap man page (Closes: #677300) * (pulled from upupstream cvs, patch xdvi-upupstream-fixes) - Fixed bugs in property handling on 64-bit systems (related to source specials). - Added support for XkbBell, to make the console bell work again. -- Norbert Preining Sat, 23 Jun 2012 12:57:25 +0900 texlive-bin (2012.20120530-2) unstable; urgency=low * call update-language in the postinstall (Closes: #675179) -- Norbert Preining Wed, 30 May 2012 21:34:07 +0900 texlive-bin (2012.20120530-1) unstable; urgency=high * new upstream snapshot (svn 26726) exporting kpse_cnf_get (Closes: #675109) * cnf.h is again installed, don't install it via libkpathsea-dev.install * patch handling: . removed: 41_maketexmf, 12_fix_epstopdf_invocation both included upstream or not needed anymore . new: set-e-fmtutil part of set-e-in-various-scripts that still applies . disabled: 57_texconfig_papersizes_for_upstream, 58_texconfig_papersizes_use_ucf, superseeded by 55_texconfig_stuff . disabled: set-e-in-various-scripts: split into set-e-fmtutil and a disabled part for texconfig -- Norbert Preining Wed, 30 May 2012 11:02:05 +0900 texlive-bin (2012.20120516-1) unstable; urgency=low * new upstream snapshot based on TL2012 tlpretest * remove outdated and not needed patches * remove traces of debian internal mupdmap, we use the one that is now shipped by default in TeX Live * patch shipped updmap for correct perl module search path * move patches from debian/patches to debian/quilt, add quilt as build dep, and include quilt patching in debian/rules this gets us rid of the "strange" parts of the 3.0 format (see quilt vs dpkg-source fuzzyness acceptance). Thanks to an unnamed dev who gave me the hint! * disable build-wovp2ovf patch, included upstream * (re)install cnf.h into libkpathsea-dev (Closes: #673016) -- Norbert Preining Wed, 16 May 2012 14:05:23 +0900 texlive-bin (2011.20120510-1) unstable; urgency=low * new upstream checkout: fix for dvipdfmx * include debian/patches/xdvi-zoom-with-eps-figures.patch from Ubuntu, but do not activate it. It makes xdvi crash on *every* zoom in Debian, needs more investigation. Original reason: Make zooming with Ghostscript 9.0x working correctly. EPS figures were cut off after zooming and scrolling. (Taken from Ubuntu packaging, thanks Jeremy Bicha) See http://bugs.ghostscript.com/show_bug.cgi?id=692540 * fix FTBFS on alpha (Closes: #672222) -- Norbert Preining Mon, 07 May 2012 12:52:39 +0900 texlive-bin (2011.20120507-1) unstable; urgency=low * new upstream checkout: uptex 1.10 * drop patches for config file inclusion in (x)dvipdfmx, included upstream * add man page for etex * include pmpost patches and build it * adapt/unfuzzify patches for current sources * disable mtx building, we have prepmx package in Debian -- Norbert Preining Mon, 07 May 2012 10:47:49 +0900 texlive-bin (2011.20120410-1) unstable; urgency=low * new upstream checkout: - remove decls of popen and pclose (Closes: #64524) (!yow, 5 digit bug!) - do not declare getopt in C++, fixes FTBFS with g++ >= 4.7 (Closes: #667392) * add patches (maybe to be included upstream) that allows inclusion of one config file in another for (x)dvipdfmx. This will be used by the paper code. * fix description of libptexenc-dev package (Closes: #667694) * remove xdvik patch, included upstream * remove conflict with ptex-bin, we are building a transitional package now * build with internal t1lib, as t1lib is going to disappear in wheezy (Closes: #667912) (no, dropping xdvi is not an option!) (add a lintian override otherwise this gives a lintian error) -- Norbert Preining Tue, 10 Apr 2012 10:16:01 +0900 texlive-bin (2011.20120328-1) unstable; urgency=low * build with system libgraphite, adapt build dependencies * remove embedded source copies of several libs (Closes: #665792) * remove .svn directories from orig tarball * disabling pmx compilation (--disable-pmx in debian/rules) [ Hilmar Preuße ] * solve FTBFS on Hurd the ugly way, by hard coding PATH_MAX as it is done in kpathsea (61_path_max.diff) (Closes: #665456) -- Norbert Preining Wed, 28 Mar 2012 18:10:05 +0900 texlive-bin (2011.20120322-1) unstable; urgency=low [ Hilmar Preuße ] * Do not declare an versioned B-D for g++ on armel, reapplied * we still need 60_unneeded_linking (new version based on am files) (Closes: #664074) * built using libpng15 (Closes: #662520) (Closes: #649949) * use libpoppler-private-dev instead of libpoppler-dev (Closes: #660105) List of fixed bugs in new TeX Live * fix string corruption in Metapost (Closes: #632328) * MP failed to create .mpx files for .mp files not in current dir (Closes: #632658) * bibtex is able to handle unicode (Closes: #382075) * dvips info page describes debugging options correctly (Closes: #269638) * FTBFS on KFreeBSD fixed upstream (Closes: #663519) * getnonfreefonts has been removed (Closes: #600339) -- Norbert Preining Fri, 23 Mar 2012 08:35:10 +0900 texlive-bin (2011.20120307-1) experimental; urgency=low * new release, based on preliminary TL2012 status (TL2012/dev!) -- Norbert Preining Wed, 07 Mar 2012 08:33:48 +0900 texlive-bin (2009-12) unstable; urgency=low [ Frank Küster ] * Make the error message more user-friendly when texconfig encounters strange paper size definitions in config.ps (closes: #636328) [ Hilmar Preuße ] * Do not declare an versioned B-D for g++ on armel (Closes: #654746) * Install manual page for vlna in /usr/share/man/cs/man1 (Closes: #597218) [ Norbert Preining ] * include fix for xetex breakage to backward incompatible zlib change change build dependency to depend on zlib1g-dev with version, and remove the alternative zlib-dev build dep (Closes: #659680) * bump standards version to 3.9.2, no changes necessary -- Norbert Preining Tue, 14 Feb 2012 08:24:30 +0900 texlive-bin (2009-11) unstable; urgency=low [ Hilmar Preuße ] * disable the LFS support provided by upstream again, it is really broken (Reopens: #618033). It: - breaks pdflatex on big endian platforms (Closes: #637667) - introduced an ABI change on 32-bit platforms (Closes: #637720) -- Frank Küster Mon, 15 Aug 2011 21:48:13 +0200 texlive-bin (2009-10) unstable; urgency=low [ Hilmar Preuße ] * xdvik compilation error with glibc-2.10 and gcc-4.4: xdvik-22.84.16-open-mode.patch (Closes: #614257) * comment the --disable-largefile switch in upstream build script (partial_lfs_support.diff). This hopefully (Closes: #618033). dvips still can't write files > 2GB (see #383781). * we can use gcc-4.5 on armel too [ Frank Küster ] * Indicate in the description that this package needs a real TeX package to function, and add a Recommends on texlive-base (closes: #593782) * Make various upstream-provided scripts "set -e". This closes: #136051 and is needed by the planned papersize patch to texconfig. * The binaries pdftex, dvips, xdvi and dvipdfmx now respect the system-wide paper setting as their default if there is no papersize information in the input file (see #49149). It is still highly recommended to specify such information explicitly, e.g. using hyperref.sty with LaTeX. -- Frank Küster Thu, 28 Jul 2011 21:54:49 +0200 texlive-bin (2009-9) unstable; urgency=high * Add 73_tex_segfault patch, closes: #633011 (Frank Küster) urgency set to high to fix this RC bug and help with poppler transition * add texlive-binaries.lintian to override embedded lib t1lib -- Norbert Preining Thu, 21 Jul 2011 00:10:10 +0900 texlive-bin (2009-8) unstable; urgency=low * add upstream patch from Mathias Kende fixing segfaults on MIPS due to invalid C (Closes: #602566) (debian/patches/upstream-tex-file_arg-passing-fix) -- Norbert Preining Thu, 11 Nov 2010 00:00:35 +0900 texlive-bin (2009-7) unstable; urgency=low * add ed (and perl, texlive-common) to the list of dependencies (LP: #577305) (Closes: #580732) * remove texconfig warning/exit (with tlmgr link) statement and rely on fmtutil being debianized (Closes: #588731) -- Norbert Preining Tue, 10 Aug 2010 17:09:47 +0900 texlive-bin (2009-6) unstable; urgency=high [ Frank Küster ] * include a patch that allows texconfig to handle more default paper settings. This is intended to be submitted upstream, and to be used to address #402994 (libpaper integration) [fk] [ Norbert Preining ] * include (lost) man pages for texconfig-dialog, devnag, bibtex8, omfonts, otangle, pdfopen (no bug, but see #574796) * add a patch upstream-web2c-tmpfilewithpid that fixes overwriting files with -recorder in parallel builds (Closes: #575731). * bump standards version to 3.8.4, no changes necessary * bump build-dep on libpoppler to 0.12.4 (against my will!!) (Closes: #577684) * Fix CVE-2010-1440: this overrides the incomplete fix for CVE-2010-0793. [ Security Team ] Fixed in 2009-5+nmu1 * Fix CVE-2010-0827: buffer overflow in dvips (virtualfont.c). -- Norbert Preining Sat, 01 May 2010 02:17:20 +0900 texlive-bin (2009-5) unstable; urgency=low * include a patch (from upstream) to fmtutil so that multiple defined formats are accepted. That is the definitive fix for bug #557091, but the other one is necessary, too. * install synctex.5 man page * manage bibtex with alternatives, code by Ğндрей Парамонов (Closes: #539482) -- Norbert Preining Sat, 26 Dec 2009 19:06:47 +0900 texlive-bin (2009-4) unstable; urgency=low * make texlive-binaries replace the (only in old-stable present) freetype1-tools (Closes: #560975) * take over forgotten patch from TL2007 for building on i386-hurd. The patches are now icu-xetex_hurd.diff and detex-hurd.diff (patches thanks to Samuel Thibault as already in TL2007, and thanks for Hilmar for tracking that down) (Closes: #560800) * add "-Wl,--no-relax" to LDFLAGS on alpha to fix a FTBFS, thanks to Steve Langasek for the pointer (Closes: #557330) [hilmar-guest] * resurrect etex which was lost (Closes: #561768) - install etex from inst/bin/ - add etex.1 to debian as it is shipped in src:texlive-base * include a fix for segfaults in mpost (Closes: #561500) -- Norbert Preining Mon, 21 Dec 2009 23:53:48 +0900 texlive-bin (2009-3) unstable; urgency=low * first upload to unstable * replace/conflict/provide dvi2tty to make upgrades smooth (Closes: #559120) -- Norbert Preining Wed, 09 Dec 2009 23:04:26 +0900 texlive-bin (2009-2) experimental; urgency=low * add replace texlive-extra-utils (<< 2008) for dvi* (reported in bug #557086) -- Norbert Preining Sat, 21 Nov 2009 15:55:27 +0900 texlive-bin (2009-1) experimental; urgency=low [ Frank Küster ] * New upstream (closes: #481060) version (pre-release, but not far from) with lots of internal changes, hence the upload to experimental. This upstream version fixes the following bugs: - many manpage typos, with warm thanks and a virtual QA bouquet to A. Costa , closes: #450552, #450553, #450554, #450555, #450556, #450557, #450558, #450559, #450560, #464351 (the last was found by Joachim Breitner [xdvi bugs] - closes: #336807, crashes with (breaklinks) hyperrefs - closes: #357462, shrinkFactor 0 is broken - closes: #361218, dies while printing - closes: #342529, unnecessarily noisy in expert mode - closes: #350292, please use cntl-wheel to zoom - closes: #351672, please use shift-wheel to scroll left or right - closes: #478176, transition to texlive has lost xdvi 'grid' feature - closes: #461818, typo in oxdvi.1 and xdvi.1 man pages [mixed executables] - bibtex: Upstream added a patch that closes: #520920 - dvipdfm is now a symlink to dvipdfmx. Among other problems, this closes: #485563 - closes: #421464, pdfetex: Not embedding Base-14 fonts creates somewhat broken files - closes: #518536, fresh upstream of pdftex is needed (latest stable pdftex is 1.40.9 available) - closes: #532074, 'man pdftex': missing .ds WB - closes: #446617, texlive-metapost: Omits font encoding from output - closes: #457711, texlive-metapost: mpost man page does not match reality - closes: #507652, make math support working in xe(la)tex and lmodern fonts - closes: #489943, mktexpk does not work in directories containing spaces - closes: #536795, 'man texconfig' typos (the fix also affects a Debian-specific patch) - closes: #420836, "texdoc -s" is too slow, should use ls-R database - closes: #459571, please include the TeXcount.pl script to do TeX word count - closes: #413652, a2ping: embedding all fonts - closes: #542463, vlna program missing from texlive-lang-czechslovak * The texlive-bin source package is now handled independently from the other TeXLive source packages, i.e. it is not configured in tpm2deb.cfg in our svn repository and the debian directory. Instead, it now looks more like a standard compiled package and should be easier to work on in case of security uploads or NMUs. * This also means that some of it's older binary packages, like texlive-metapost, have moved source package. By chance, this closes: #517600, #517601 * Support a create-orig-source target in debian/rules. The orig.tar.gz is now either wget'ed if we are working on a released version, or automatically created from a svn repository for development * There are now only three binary packages, texlive-binaries and the two library packages. texlive-binaries Replaces/Conflicts/Provides texlive-base-bin in order to get a working (if not smooth) transition. * Add Build-Depends: time, since the upstream Build script uses it * Don't install the format links, they will generated by dh_installtex in the other packages, also do not install the man pages for the links * do not install rungs, it is not necessary * do not install script links, they will be shipped together with the script itself * Add patch 60_unneeded_linking. These needs testing! [ أحمد المحمودي (Ahmed El-Mahmoudy) ] * debian/rules: use /usr/share/quilt/quilt.make provided by quilt and remove patch-stamp & unpatch targets * Install changelog into libkpathsea packages * Add a README.source [ Norbert Preining ] * fix postinst update-alternatives, the xdvi-xaw does not have .bin anymore * add texlive-binaries.prerm to remove the alternative * add same version number to libkpathsea-dev deps on libkpathsea5 to make lintian happy * make texlive-binaries replace/conflict/provide dvipdfmx (in accordance with the maintainer of dvipdfmx we will phase out dvipdfmx itself) * new source package format "3.0 (quilt)" can be used (closes: #538557) * Install copyright file * add patch for libpoppler 0.12 (thanks to Ubuntu for inspiration) -- Norbert Preining Fri, 13 Nov 2009 01:20:08 +0900 texlive-bin (2007.dfsg.2-3) unstable; urgency=medium * add missing source roadmap.fig of roadmap.eps in fontinst documentation (Closes: #482915) (urgency medium due to RC bug) (new patch add-missing-fontinst-source) -- Norbert Preining Thu, 26 Jun 2008 23:14:59 +0200 texlive-bin (2007.dfsg.2-2) unstable; urgency=low * use local keyword in a policy-compliant way (Closes: #488023) (urgency medium since RC bug) * do not install fmtutil.cnf in texmf-texlive/web2c (Closes: #488035) -- Norbert Preining Wed, 25 Jun 2008 21:59:32 +0200 texlive-bin (2007.dfsg.2-1) unstable; urgency=medium * Let tl-metapost replace tl-context (closes: #484818). This is a RC bug, hence medium urgency [fk] * Fix shell scripting errors in texlive-base-bin's preinst script (one fix actually is done in common.functions.preinst and affects all packages, but didn't show up there). Closes: #484833 [fk] * include sfd files necessary for other packages, but removed from the archive with the imminent removal of freetype1-tools. That needs a new .orig.tar.gz * bump standards version to 3.8.0: - rename README.Debian-source to README.source an explain how to change something using quilt by refering to the quilt README.source - add homepage field to control - add a patch target to debian/rules * add dversionmangle to debian/watch file to ignore the .dfsg.NN suffix -- Norbert Preining Thu, 12 Jun 2008 18:12:50 +0200 texlive-bin (2007.dfsg.1-4) unstable; urgency=low * add mktexlsr-ignore-more-vcs patch that makes mktexlsr ignore not only .svn, but also other VCS directories. Patch taken from upstream (Closes: #481371) [np] * Fix NEWS.Debian of texlive-base-bin to describe the issue of removed conffiles better (closes: #482631) [fk] * add a missing line to the tl2007.2 xetex patch, taken from upstream * add a patch to xdvipdfmx to re-allow inclusion of tagged pdf images (Closes: #483019) (big thanks to Jonathan Kew for tracking all this down) * do not install xdvizilla(.1) (Closes: #477160) * use gcc/g++-4.2 on armel to fix FTBFS (closes: #483939) (thanks Adeodato) -- Norbert Preining Sun, 01 Jun 2008 16:29:49 +0200 texlive-bin (2007.dfsg.1-3) unstable; urgency=low * improve manpage of patgen (Closes: #450875) * (really?) fix the watch file (Closes: #449621), thanks Raphael Geissert * bump standards version to 3.7.3, no changes needed * add texlive-common dependency to the -doc splitted packages, otherwise configuration can fail due to missing update-updmap etc (Closes: #457270) (Closes Ubuntu bug: 177674) * include dviconcat and dviutils (orphaned package dviutils/seetex) and provide/replace/conflict with dviutils (extra-utils) * texlive-xetex recommends texlive-latex-base (Closes: #462610) * add copies of supp-pdf.tex and supp-mis.tex from context 2008-01-28 to texlive-metapost so inclusion of metapost images in pdf(la)tex does work without installation of context (Closes: #465107) * fix perl warning in thumbpdf (patch: fix-thumbpdf-perlwarning) (Closes: #469294) * fix a segfault in ovp2ovf (patch: fix-ovp2ovf-segfault) (Closes: #470433) * TeX Live 2007.2 release incorporation: fixes for xetex and xdvipdfmx, new patches tl2007.2-xetex and tl2007.2-xdvipdfmx (adapted from Jonathan Kew's original patches to work with poppler) * add the LPPL to debian/copyright * texlive-extra-utils now recommends ghostscript (Closes: #476954) * fix skipping of all trees in mktexlsr with empty $HOME (Closes: #473548) * add a patch for Sinhala support by Anuradha Ratnaweera , but keep it disabled until Jonathan gives me the ok. This would close the bug #476957. -- Norbert Preining Sun, 20 Apr 2008 20:14:04 +0200 texlive-bin (2007.dfsg.1-2) unstable; urgency=low * Update location of upstream iso.zip file in uscan watch file (closes: #449621), thanks to Raphael Geissert [fk] * switch to libpoppler-0.5.9 patch, since the new libpoppler (>= 0.6) is in unstable, adjust build deps to libpoppler-dev >= 0.6 (Closes: #451588) -- Norbert Preining Mon, 19 Nov 2007 11:41:11 +0100 texlive-bin (2007.dfsg.1-1) unstable; urgency=low * disable pdftex character shifting (option G) in config.pdf (Closes: #434891) * rebuild new orig.tar.gz necessary to blacklist latexmp completely (Closes: #436965) * add patch gcc43-compile-fix to compilation of teckit with newer gcc compilers (Closes: #441605) (patch taken from 007-12ubuntu3, thanks Matthias Klose) * implement doc splitting, so that we can build separate -doc packages for every collection we want to [np] splitting is done for: metapost, base-bin * fix segfault of dvips -z on amd64 (patch applied upstream), thanks to Bastien Roucaries for finding and providing a patch (Closes: #447081) (Fixes: CVE-2007-5935) -- Norbert Preining Mon, 22 Oct 2007 07:35:16 +0200 texlive-bin (2007-14) unstable; urgency=low * Really move Philokalia.otf to a fonts directory [fk] * fix FTBFS on hurd-i386, adding patch icu-powerpc-buildfix-patch from Samuel Thibault (Closes: #437949) [np] * set LANG=C for the update-alternatives grepping, thanks Andreas Degert (Closes: #438551) [np] * Add missing quotes around the sed script in texlive-base-bin.postinst(.pre) (Closes parts of #439205) [np] * blacklist latexmp.pdf since no source is present (Closes: #436965) [np] -- Norbert Preining Sat, 01 Sep 2007 11:40:57 +0200 texlive-bin (2007-13) unstable; urgency=low * let texlive-xetex depend on dvipdfmx (Closes: #430373) * add xetex patch, included in release texlive 2007.1. This patch fixes xetex crashes on big-endian 64bit archs, and crashes with some OT fonts. * update a2ping script and it's man page (Closes: #412107) * update config.ps from current svn (Closes: #431338) * add lost texlive-extra-utils recommends dvidvi (thanks Lionel for spotting this) * include the fixes to dvilj(k) which are included in the TeX Live security branch, this adds a patch dviljk-security-fixes * Move Philokalia-Regular.otf from the documentation to a fonts directory, thanks to Ralf Stubner (closes: #433138) * duplicate the code to recreate missing conffiles pdftexconfig.tex, config.ps from texlive-base-bin postinst in preinst (Closes: #425803, #435156, #435081, #433889, #436235, #435719, #435081, #433889) [np] * use see in texdoc for displaying of all types of files (Closes: #432037) * adapt the menu entries to new policy -- Norbert Preining Mon, 13 Aug 2007 16:26:41 +0200 texlive-bin (2007-12) unstable; urgency=low * Add a debian-specific patch for fmtutil which makes the --enable, --disable and --edit commands work safely. Furthermore, patch texconfig to use update-texmf (closes: #409798) [fk] * fix manpage of pkfix (Closes: #429587) -- Norbert Preining Wed, 20 Jun 2007 10:09:36 +0200 texlive-bin (2007-11) unstable; urgency=low * Refine the code to resurrect pdftexconfig.tex (no version check) and properly document it in NEWS.Debian. * Also resurrect config.ps, thanks to Bruce MacDonald (closes: #427059) [fk] -- Frank Küster Fri, 1 Jun 2007 17:32:35 +0200 texlive-bin (2007-10) unstable; urgency=low * don't install libkpathsea.la (Closes: #426006) [np] * do not actually carry out the "preserve deleted conffile" due to the tetex bug and too many busted installations, and resurrect the critical conffile pdftexconfig.tex for sid users (Closes: #425781) [np,fk] * Add missing Depends of libkpathsea-dev on libkpathsea4 (closes: #426710) [fk] -- Frank Küster Wed, 30 May 2007 17:58:37 +0200 texlive-bin (2007-9) unstable; urgency=low * Make sure --enable-shared is not in effect in the subdirectories for static-only libraries, in particular xetex's teckit. Thanks to Aaron M. Ucko (closes: #425863) [fk] * Move libkpathsea4 and the -dev package to the correct sections (libs and libdevel, not tex) [np] -- Frank Küster Thu, 24 May 2007 20:12:02 +0200 texlive-bin (2007-8) unstable; urgency=low * lang-indic: move bangfont.tex from doc to run files (Closes: #424031) * lang-indic: add missing python header to ebong script (Closes: #423990) * dpkg_md5sum in common-functions.preinst returns now the empty string in case of an unknown conffile (could have been created by touch). This should fix Ubuntu bug 111654. [np] * Build with --enable-ipc to allow piping of output [fk] * Build shared kpathsea library and include it in separate packages [fk] * move bin-thumbpdf to texlive-base-bin (Closes: #424658) [np] * texlive-extra-utils suggests gs-* for epstopdf (Closes: #423988) [np] * replace patches/30_libpoppler with patches/30_libpoppler_new for new libpoppler 0.5, make the build-dep libpoppler-dev (>= 0.5.4) (Closes: #425065, #356079) * add stricter dependencies to all packages: if in the final shipout dep on a texlive package there is no version given, the value of latest-version (from tpm2deb.cfg) of the source package is taken. (Closes: #421969) * remove cruft from control files (cweb, ctie, texdoctk) (Closes: #241089, #249085) * don't leave copies of conffiles in TEXMFDIST (Closes: #420139) * add poppler to the pdftex banner (Closes: #420971) * texlive-lang-indic depends on python * remove the rpath entry in all the binaries * add patch 64_fix_makempx_installation to fix the installation of makempx script instead of the binary (thanks Sanjoy Mahajan) * rework the xdvi conf file handling code to not "preserve removal" when upgrading from older texlive versions (Closes: #425272) * format generation reworked: - texlive-base-bin does not provide formats anymore since all the respective ini files are in texlive-base - texlive-base takes the format generation -- Norbert Preining Mon, 21 May 2007 14:17:19 +0200 texlive-bin (2007-7) unstable; urgency=low * fix typo in texlive-base-bin.postinst (Closes: #422929) -- Norbert Preining Wed, 09 May 2007 00:59:49 +0200 texlive-bin (2007-6) unstable; urgency=low * Update patch 62_dvips_absolutepath_doc, it also fixes the manpage now. Thanks to Eric Cooper [fk]. * Add patch 63_texmf.cnf_for_comparison_temp from upstream. The patched file is only used for comparing with our generated texmf.cnf from tex-common, and the upstream patch has been incorporated there [fk]. * remove 31_pdftex_gcc_ICE-on-alpha, recent revision of gcc have fixed the FTBFS bug. * move the debianize-updmap call in updmap after the syncWithTrees function so that this function is also debianized. (Closes: #421184) [np] * apply teTeX texdoctk.defaults patch to get texdoctk to use the right programs (Closes: #421633) [np] * add menu entry of xdvi, texdoctk, texconfig (Closes: #421634) [np] * Bring dvips to version 5.96dev, 2007-05-06 (patch 32_dvips_fontbug_fix_upstream). This fixes a problem with double partial inclusion of fonts, and adds improvements for debugging such problems (closes: #266718) [fk] -- Frank Küster Mon, 7 May 2007 19:38:34 +0200 texlive-bin (2007-5) unstable; urgency=low * fix config file handling (Closes: #419826) [np] - fix a bug in tpm2deb-bin.pl which prevented any config file handling - fix another bug in tpm2deb-bin.pl which didn't install the config file handling in the postrm script -- Norbert Preining Wed, 18 Apr 2007 08:13:17 +0200 texlive-bin (2007-4) unstable; urgency=low * Add patch 31_pdftex_gcc_ICE-on-alpha to work around a bug in newer gcc, thanks to Falk Hueffner (closes: #419434) [fk] * Since we take over xdvi from tetex-bin, we remove its xdvi alternative in case it is present (closes: #419381) [fk] * Remove any format or log files in /var/lib/texmf/web2c, they must be in $engine subdirs now. teTeX does not properly remove them (so this closes: #333767), and they cause strange failures with context (see #419059 and #418976) [fk] * Add patch 62_dvips_absolutepath_doc to document the change in dvips' file inclusion behavior in config.ps (closes: #418788) -- Norbert Preining Tue, 17 Apr 2007 13:17:16 +0200 texlive-bin (2007-3) unstable; urgency=low * Disable the comparison of texmf.cnf introduced in the last version. It can still be run manually, but doing so at build time would make texlive-bin FTBFS each time tex-common updates its files in texmf.d [fk] * Fix the friday 13 bugs: A bad coincidence combined a serious bug in debhelper (#419060) produces buggy maintainer scripts in most texlive packages. The debhelper bug is fixed, this closes: #418981 * add texlive-font-utils replaces tetex-bin << 2007 (Closes: #418995) * Add patch 51_fmtutil_keep_failedlog so that fmtutil will keep log files even if no format file is created at all [fk] (Closes: #419016) -- Norbert Preining Sat, 14 Apr 2007 09:31:47 +0200 texlive-bin (2007-2) unstable; urgency=low * first upload of TeX Live 2007 to unstable * fix xdvi.cfg config file transfer bug (Closes: #415906) [np] * Added two scripts which allow to compare our upstream-provided texmf.cnf (which will not be used) with the texmf.cnf generated from tex-common's snippets, and let the build fail if both show other than the known differences. This is run in the clean and build targets and allows to track upstream changes. In order to build on non-clean systems, export DEBIAN_NOCHECK_TEXMFCNF=true (or, actually, anything nonzero) [fk] * replace links of odvicopy.1 and odvitype.1 to the respective man pages without o with a minimal manpage (Closes: #417274) [np] * drop updated collection-binextra.tpm and bin-dvipos.tpm into the source package tosolve the missing dvipos problem. [np] * Fix missing build dependency on tex-common >= 1.3, thanks to Yannick Roehlly for spotting this. [np] * texlive-base-bin now suggests gs (or variants), postscript-viewers and pdf viewers. [np] (Closes: #414473) * do not compress documentation pdf files -- Norbert Preining Tue, 10 Apr 2007 18:15:25 +0200 texlive-bin (2007-1) experimental; urgency=low * new upstream release * Major changes: - now includes XeTeX (new package texlive-xetex) - pdfTeX 1.40 - MetaPost 1.0 - the Debian packages no longer include ConTeXt, but depend on the separate context package instead. - Totally reworked Debian packaging, in particular the Perl scripts. - TeX Live now replaces teTeX and provides dummy packages for the transition. - configuration files from /etc/texmf/texlive have been moved to the TDS-locations below /etc/texmf * Patches: - Move from dpatch to quilt - update patch 30_libpoppler to the new pdftex. This needs to be extended to patch xetex as well! - Drop patches 15_fmtutil_metapost_fix, 20_xpdf3.01pl1, 21b_pdftex_cjkfonts_overflow, 51_fmtutil_tempdir_in_texinputs (applied upstream), 52_feynmf-perl-sec-fix (no longer included) - all other patches unfuzzied (sometimes manually) * Add patch 01_tmp_configure_without_installextra to bypass texlinks, fmtutil and updmap invocations at build time [FK] * include teTeXs perl script for /usr/bin/xdvi which supports compressed dvi files (Closes: #412611) [NP] -- Norbert Preining Wed, 21 Mar 2007 17:03:16 +0100 texlive-bin (2005.dfsg.2-12) unstable; urgency=low * blacklist dvidvi.tpm and add a recommend tl-extra-utils -> dvidvi (Closes: #411537) -- Norbert Preining Tue, 20 Feb 2007 22:38:54 +0100 texlive-bin (2005.dfsg.2-11) unstable; urgency=low * The timezone patch from the last upload was wrong for 64bit architectures. Applied corrected patch from upstream, thanks to Martin Michlmayr (closes: #409517) [frank] -- Frank Küster Thu, 15 Feb 2007 14:07:50 +0100 texlive-bin (2005.dfsg.2-10) unstable; urgency=low * rebuild from old packaging machinery -- Norbert Preining Wed, 10 Jan 2007 14:12:09 +0100 texlive-bin (2005.dfsg.2-9) unstable; urgency=low * Apply patch by Julian Gilbey to prevent mktexlsr from creating ls-R in root's home directory (closes: #402925) * Apply a patch by "Mark A. Wicks" to fix a crash of dvipdfm in half-hour timezones (Closes: #403267) -- Norbert Preining Thu, 4 Jan 2007 00:47:50 +0100 texlive-bin (2005.dfsg.2-8) unstable; urgency=low * move bin-ttfutils to tl-font-utils, blacklist everything but ttf2afm, add bin-ttfutils.tpm and ttf2afm.1 to the source package (Closes: #402983) (Closes also ubuntu #75545) * reinclude pslatex script and its manpage into texlive-base-bin. -- Norbert Preining Thu, 28 Dec 2006 15:04:19 +0100 texlive-bin (2005.dfsg.2-7) unstable; urgency=low * change shebang for getnonfreefonts to /bin/bash (Closes: #398112) * fix the texdoctk perl errors (Closes: #402651) * include xdvi upstream fix for segfault on hitting g with -nogrey (Closes: #369569) -- Norbert Preining Tue, 12 Dec 2006 08:05:45 +0100 texlive-bin (2005.dfsg.2-6) unstable; urgency=low * Apply patch from upstream to pdftex that allows it to work properly with CJK fonts with their large number of subfonts. Many thanks to Thanh Han The , Jie Luo for the patch and many others for debugging, in particular Danai SAE-HAN (韓é”è€) who reminded me. This allows CJK-related packages to depend on texlive and closes: #399967. * Patch texdoctk so that it still works if documentation in TeXlive's as well as teTeX's TEXMFDIST is present. Thanks to Braun Gabor for reporting and Ralf Stubner for ideas for fixing this (closes: #401930) -- Frank Küster Wed, 6 Dec 2006 22:40:27 +0100 texlive-bin (2005.dfsg.2-5) unstable; urgency=high * Add Conflicts of texlive-omega on the aleph package (closes: #400930), both provide the same binary. In the long run, aleph should be superseded by AFNIX. -- Frank Küster Fri, 1 Dec 2006 14:34:22 +0100 texlive-bin (2005.dfsg.2-4) unstable; urgency=low * blacklist feynmf in tl-metapost and add a Recommends on the feynmf package (closes: #400657) -- Frank Küster Tue, 28 Nov 2006 14:52:03 +0100 texlive-bin (2005.dfsg.2-3) unstable; urgency=low * include fixes for superficially linked in libs * extend texconfig man page and include some fixes from teTeX (Closes: #396904) -- Norbert Preining Tue, 7 Nov 2006 14:37:17 +0100 texlive-bin (2005.dfsg.2-2) unstable; urgency=low * update the debian patch for updmap(.1) (Closes: #393189) * adjust built-in search paths of libkpathsea to the Debian defaults (Closes: #392641) * include patch for pdfetex to support newer TTF fonts (Closes: #394028) -- Norbert Preining Thu, 19 Oct 2006 10:27:51 +0200 texlive-bin (2005.dfsg.2-1) unstable; urgency=medium * remove magic header of a2ping, thumbpdf, and pdfcrop * report bugs together with tex-common, and report status of the tetex packages. Fix some small things in bug.scripts. * change uploader field to my debian.org email address * blacklist lacheck in tl-extra-utils and add a recommend on lacheck * blacklist dviconcat(.1) and dviselect(.1) files in tl-extra-utils and recommend dviutils * use xdvi.bin in the xdvi shell script, and use alternatives system to set xdvi.bin to xdvi-xaw.bin (Closes: #391437) * move bin-texdoc, ie texdoc and texdoctk, from tl-extra-utils to texlive-base-bin (Closes: #391640) * texlive-bin: include the already unpacked sources instead of the source.tar.bz2. Changes to the clean target: - don't remove unpack-stamp - don't remove the whole build dir, only build/inst and build/Work (Closes: #380227) (Thanks Frank for insisting!) * Use tex-common's (>= 0.33) debianize-updmap (Closes: #391348) * urgency set to medium to get these fixes to testing -- Norbert Preining Mon, 9 Oct 2006 19:01:51 +0200 texlive-bin (2005.dfsg.1-1) unstable; urgency=low * remove fmtutil.cnf link (useless) and mktex.cnf link (taken from tex-common) (Closes: #376524) * add lintian override for wrong-name-for-upstream-changelog triggered by CHANGES.packaging * change maintainer to debian-tex-maint@l.d.o -- Norbert Preining Thu, 3 Aug 2006 12:36:56 +0200 texlive-bin (2005-2) unstable; urgency=low * first upload to unstable, sponsored by Frank Küster * texdoc support - let tetex texdoc find documentation of texlive (Closes: #364776) - include tetex texdoc patches (following of symlinks, security fixes) (Closes: #356390) * texlive-lang-polish conflicts with octave-forge as both provide /usr/bin/mex, this is preliminary, a better solution must be sought (Closes: #364059) * change shell for the reportbug script to bash (Closes: #356391) * fix installation of thumbpdf and pdfcrop (Closes: #352092) * improve various descriptions (Closes: #354964) * call the update-* programs in all postinst scripts, so that the config files do not contain left-overs (Closes: #355266) * fix creation of formats which in turn depend on the latex format (Closes: #351707) * remap the ibycus4.map TeX/MF input file from the fonts/map location to the fonts/source location (Closes: #354652) * depend on the updated lmodern package, thus making the fonts available for X (Closes: #351727) * lots of internal changes, important ones being: - texlive packages now do not include files which have been packaged for Debian already (eg cm-super, lmodern, musixtex) - most packages can be used together with teTeX - fix several upstream bugs - generate license information for each file from the TeX Catalogue (ongoing work) for detailed changes see CHANGES.packaging in texlive-common -- Norbert Preining Thu, 11 May 2006 00:12:10 +0200 texlive-bin (2005-1) experimental; urgency=low * First upload to experimental (Closes: #312897) -- Norbert Preining Thu, 12 Jan 2006 17:30:22 +0100 # vim:set fileencoding=utf-8: # # Local Variables: # coding: utf-8 # mode: debian-changelog # End: debian/rules0000775000000000000000000000774312213264212010256 0ustar #!/usr/bin/make -f # debian/rules file for texlive-bin export SHELL=/bin/bash export CONFIG_SHELL=/bin/sh # In case one wants to build with old automake (<< 1.13.1), the following # variable has to be set. By default the debian/control requires high # enough versions of automake and friends #export AM_V_P=false DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) ifeq ($(DEB_HOST_ARCH), alpha) export LDFLAGS = -Wl,--no-relax endif # # it seems that ARM metafont segfaults due to a problem with armhf's malloc # see Debian bug #678604 # Building in arm mode helps # ifeq ($(DEB_HOST_ARCH), armhf) export CFLAGS = -marm endif # warning: if the --with autoreconf is removed then # the patch debian/patches/debian-no-linked-scripts # must be adapted to also patch the Makefile.in! %: dh $@ --with autoreconf --builddirectory Work override_dh_autoreconf: dh_autoreconf --as-needed override_dh_auto_configure: dh_auto_configure -- --prefix=/usr \ --datarootdir=/usr/share/texlive \ --disable-native-texlive-build \ --disable-largefile \ --disable-missing \ --with-banner-add=/Debian \ --enable-shared \ --with-system-zlib \ --with-system-libpng \ --with-system-zzlib \ --with-system-freetype2 \ --with-system-xpdf \ --with-system-poppler \ --with-system-graphite2 \ --with-system-harfbuzz \ --with-system-libgs \ --with-system-cairo \ --with-system-pixman \ --with-system-zziplib \ --with-system-icu \ --with-freetype2-include=/usr/include/freetype2 \ --with-x \ --with-mf-x-toolkit \ --with-xdvi-x-toolkit=xaw \ --disable-lcdf-typetools \ --disable-biber \ --disable-dvipng \ --disable-musixflx \ --disable-ps2eps \ --disable-psutils \ --disable-luatex \ --disable-t1utils \ --disable-cjkutils \ --disable-chktex \ --disable-dvidvi \ --disable-lacheck \ --disable-tex4htk \ --disable-pmx \ --disable-m-tx \ --disable-texdoctk \ --disable-ttf2pk \ --enable-ttf2pk2 \ --enable-ipc override_dh_auto_install: dh_auto_install -- DESTDIR=$(CURDIR)/debian/tmp override_dh_install: dh_install --sourcedir=$(CURDIR)/debian/tmp # replace xdvi wrapper shell script with perl variant to # allow for opening of gz etc files rm debian/texlive-binaries/usr/bin/xdvi install -m 0755 debian/xdvi-pl debian/texlive-binaries/usr/bin/xdvi # remove texlive directories, they should not be shipped here rm -rf debian/texlive-binaries/usr/share/texlive # remove wrongly added info/dir.gz rm -f debian/texlive-binaries/usr/share/info/dir* rm debian/texlive-binaries/usr/share/man/man1/latex.1* rm debian/texlive-binaries/usr/share/man/man1/pdflatex.1* rm debian/texlive-binaries/usr/share/man/man1/lamed.1* rm debian/texlive-binaries/usr/share/man/man1/eplain.1* rm debian/texlive-binaries/usr/share/man/man1/amstex.1* # fix EUCJ encoding of mendex.1 recode EUC-JP..UTF8 debian/texlive-binaries/usr/share/man/man1/mendex.1 # for alternatives treatment we rename usr/bin/bibtex to # usr/bin/bibtex.original mv debian/texlive-binaries/usr/bin/bibtex \ debian/texlive-binaries/usr/bin/bibtex.original mv debian/texlive-binaries/usr/share/man/man1/bibtex.1 \ debian/texlive-binaries/usr/share/man/man1/bibtex.original.1 override_dh_installdocs: dh_installdocs dh_installdocs -plibptexenc1 -plibptexenc-dev \ texk/ptexenc/COPYRIGHT texk/ptexenc/README dh_installdocs -plibkpathsea6 -plibkpathsea-dev \ texk/kpathsea/AUTHORS texk/kpathsea/BUGS \ texk/kpathsea/NEWS texk/kpathsea/PROJECTS \ texk/kpathsea/README override_dh_installchangelogs: dh_installchangelogs dh_installchangelogs -plibkpathsea6 -plibkpathsea-dev \ texk/kpathsea/ChangeLog dh_installchangelogs -plibptexenc1 -plibptexenc-dev \ texk/ptexenc/ChangeLog override_dh_compress: dh_compress -X.pdf override_dh_makeshlibs: dh_makeshlibs -plibkpathsea6 dh_makeshlibs -plibptexenc1 override_dh_shlibdeps: dh_shlibdeps \ -l debian/libkpathsea6/usr/lib \ -l debian/libptexenc1/usr/lib override_dh_clean: dh_clean -X.orig debian/texlive-binaries.prerm0000664000000000000000000000064412213264212013510 0ustar #!/bin/sh -e # texlive-binaries postinst, created 2009 by Norbert Preining # probably not copyrightable as it looks now, but anyway the code maybe # freely copied, distributed and/or modified # deactivate the xdvi.bin alternative case "$1" in upgrade) ;; *) update-alternatives --remove xdvi.bin /usr/bin/xdvi-xaw update-alternatives --remove bibtex /usr/bin/bibtex.original ;; esac #DEBHELPER# debian/source/0000775000000000000000000000000012213264212010463 5ustar debian/source/format0000664000000000000000000000001412213264212011671 0ustar 3.0 (quilt) debian/make-orig-tar0000664000000000000000000000145712213264212011554 0ustar if [ -n "$1" ] ; then svnroot="$1" else svnroot=/src/TeX/texlive-svn/Build/source fi baseyear=2013 svni=$(cd $svnroot ; svn info | grep "^Last Changed Rev" | awk '{print$4}') verstr=texlive-bin-$baseyear.`date +%Y%m%d`.$svni pkgstr=texlive-bin_$baseyear.`date +%Y%m%d`.$svni if [ -r $verstr ] ; then echo "already existing: $verstr, exit!" exit 1 fi echo "copying" cp -a $svnroot $verstr rm -rf $verstr/inst rm -rf $verstr/Work rm -rf $verstr/utils/biber/bin # # remove system libraries, keep only teckit for i in harfbuzz cairo freetype freetype2 gd graphite2 icu libpng pixman poppler t1lib xpdf zlib zziplib ; do rm -rf $verstr/libs/$i done find $verstr -name \.svn -exec rm -rf '{}' \; find $verstr -name autom4te.cache -exec rm -rf '{}' \; echo "packing up" tar -cJf $pkgstr.orig.tar.xz $verstr debian/control0000664000000000000000000000564612257210641010606 0ustar Source: texlive-bin Section: tex Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian TeX Maintainers Uploaders: Norbert Preining , Frank Küster Build-Depends: debhelper (>= 7.0.50~), sharutils, libncurses5-dev | libncurses-dev, libxaw7-dev, libpng-dev, zlib1g-dev | libz-dev, flex, bison, libpoppler-private-dev (>= 0.12.4), libfontconfig1-dev, dh-autoreconf, time, libgraphite2-dev, libgs-dev, libcairo2-dev (>= 1.12), libpixman-1-dev (>= 0.18), libzzip-dev (>= 0.12), libharfbuzz-dev (>= 0.9.18-3), libicu-dev, recode, texinfo, automake (>= 1.13.1), autoconf (>= 2.69), libtool (>= 2.4.2), m4 (>= 1.4.16) Standards-Version: 3.9.4 Homepage: http://www.tug.org/texlive/ Vcs-Git: git://anonscm.debian.org/debian-tex/texlive-bin.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-tex/texlive-bin.git Package: texlive-binaries Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, tex-common (>= 3), perl, dpkg (>= 1.15.4) | install-info Recommends: texlive-base, luatex, python, ruby, wish Replaces: texlive-metapost (<< 2010), texlive-base (<< 2010), ptex-bin, mendexk, jmpost Conflicts: mendexk, makejvf, jmpost Breaks: texlive-base (<< 2013), jtex-bin, multex-bin Provides: texlive-base-bin, makejvf, mendexk, jmpost Description: Binaries for TeX Live This package contains all the binaries of TeX Live packages. . Note that this package alone has hardly any functionality. Rather, choose the texlive-* packages you want to use, e.g. texlive-latex-recommended or context Package: libkpathsea6 Section: libs Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Breaks: texlive-binaries (<< 2013), texlive-base (<< 2013) Description: TeX Live: path search library for TeX (runtime part) This package contains the runtime part of the Kpathsea[rch] library, which implements generic path searching, configuration, and TeX-specific file searching. Package: libkpathsea-dev Section: libdevel Architecture: any Depends: ${misc:Depends}, libkpathsea6 (= ${binary:Version}), ${shlibs:Depends} Description: TeX Live: path search library for TeX (development part) This package contains the static library and header files for the Kpathsea[rch] library, which implements generic path searching, configuration, and TeX-specific file searching. Package: libptexenc1 Section: libs Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Description: TeX Live: pTeX encoding library library for encoding support in pTeX, a Japanese TeX engine. Package: libptexenc-dev Section: libdevel Architecture: any Depends: ${misc:Depends}, libptexenc1 (= ${binary:Version}), ${shlibs:Depends} Description: TeX Live: ptex encoding library (development part) This package contains the static library and header files for the ptexenc library, a library for encoding support in pTeX, a Japanese TeX engine. debian/compat0000664000000000000000000000000212213264212010361 0ustar 7 debian/texlive-binaries.manpages0000664000000000000000000000021412213264212014147 0ustar debian/man-pages/bibtex8.1 debian/man-pages/devnag.1 debian/man-pages/etex.1 debian/man-pages/omfonts.1 debian/man-pages/texconfig-dialog.1 debian/patches/0000775000000000000000000000000012213264212010612 5ustar debian/patches/debian-no-linked-scripts0000664000000000000000000000052212213264212015321 0ustar --- texk/texlive/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- texlive-bin.orig/texk/texlive/Makefile.am +++ texlive-bin/texk/texlive/Makefile.am @@ -5,7 +5,7 @@ ## ACLOCAL_AMFLAGS = -I ../../m4 -SUBDIRS = tl_scripts linked_scripts +#SUBDIRS = tl_scripts linked_scripts ## Windows wrapper sources. ## debian/patches/upstream-svn31350-dvips0000664000000000000000000000205512213264212014722 0ustar --- texk/dvipsk/ChangeLog | 5 +++++ texk/dvipsk/bbox.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) --- texlive-bin.orig/texk/dvipsk/ChangeLog +++ texlive-bin/texk/dvipsk/ChangeLog @@ -1,3 +1,8 @@ +2013-08-05 Akira Kakuto + + * bbox.c: Fix a bug in bbdopage() to obtain correct BoundingBox in + vertical mode of pTeX. + 2013-08-31 Akira Kakuto * writet1.c: Remove UniqueID in t1_subset_ascii_part(). --- texlive-bin.orig/texk/dvipsk/bbox.c +++ texlive-bin/texk/dvipsk/bbox.c @@ -346,8 +346,8 @@ if (v - bcd->ury < lly) lly = v - bcd->ury; if (v - bcd->lly > ury) ury = v - bcd->lly; } else { - if (h + bcd->ury < llx) llx = h + bcd->ury; - if (h + bcd->lly > urx) urx = h + bcd->lly; + if (h + bcd->ury > urx) urx = h + bcd->ury; + if (h + bcd->lly < llx) llx = h + bcd->lly; if (v + bcd->llx < lly) lly = v + bcd->llx; if (v + bcd->urx > ury) ury = v + bcd->urx; } debian/patches/pmpost1801-20105090000664000000000000000000012242412213264212013214 0ustar --- texk/web2c/pmplibdir/jfm.ch | 110 +++++++ texk/web2c/pmplibdir/jmp.ch | 340 ++++++++++++++++++++++++ texk/web2c/pmplibdir/jmppsw.ch | 74 +++++ texk/web2c/pmplibdir/mp.ch | 20 + texk/web2c/pmplibdir/mpmathdouble.ch | 76 +++++ texk/web2c/pmplibdir/mpost.ch | 310 +++++++++++++++++++++ texk/web2c/pmplibdir/mpxout.ch | 8 texk/web2c/pmplibdir/pdvitomp.ch | 494 +++++++++++++++++++++++++++++++++++ texk/web2c/pmplibdir/psout.ch | 42 ++ texk/web2c/pmplibdir/svgout.ch | 60 ++++ 10 files changed, 1534 insertions(+) --- /dev/null +++ texlive-bin/texk/web2c/pmplibdir/jfm.ch @@ -0,0 +1,110 @@ +@x +#include +@y +#ifdef WIN32 +#include +#endif +#include +@z + +% +% local variable "nt" && "ct" +@x + halfword lf,tfm_lh,bc,ec,nw,nh,nd; /* subfile size parameters */ +@y + halfword lf,tfm_lh,bc,ec,nw,nh,nd,nt; /* subfile size parameters */ +@z + +@x + int h_and_d; /* height and depth indices being unpacked */ +@y + int h_and_d; /* height and depth indices being unpacked */ + halfword ct; /* char and type */ + halfword id; /* JFM font id */ +@z + +@x +@ +@y +@; +@ +@z + +% +% routine to process JFM file format +@x +@= +tfget; read_two(lf); +@y +@d yoko_jfm_id 11 /* `yoko-kumi' fonts */ +@d tate_jfm_id 9 /* `tate-kumi' fonts */ +@d font_jfm_p(A) (mp->font_id[(A)]!=0) +@d incr(A) (A)=(A)+1 /* increase a variable by unity */ +@= +tfget; read_two(lf); +if ( (lf==yoko_jfm_id) || (lf==tate_jfm_id) ) { + id=lf; + tfget; read_two(nt); + tfget; read_two(lf); +} else { + id=0; nt=0; +}; +@z + +@x +whd_size=(size_t)((ec+1-bc)+nw+nh+nd); +@y +whd_size=(size_t)((ec+1-bc)+nt+nw+nh+nd); +@z + +% +% reserve space for character type table +@x +mp->char_base[n]=(int)(mp->next_fmem-(size_t)bc); +mp->width_base[n]=(int)(mp->next_fmem+(size_t)(ec-bc)+1); +@y +mp->font_id[n]=id; +mp->font_nt[n]=nt; +mp->ctype_base[n]=mp->next_fmem; +mp->char_base[n]=(int)(mp->next_fmem+nt-(size_t)bc); +mp->width_base[n]=(int)(mp->next_fmem+nt+(size_t)(ec-bc)+1); +@z + +% +% read character type table +% +@x +tf_ignore(4*(tfm_lh-2)) +@y +tf_ignore(4*(tfm_lh-2)) + +@ @= +ii=mp->ctype_base[n]+nt; +i=mp->ctype_base[n]; +while ( ifont_info[i].hh.LH=ct; + tfget; read_two(ct); + mp->font_info[i].hh.RH=ct; + incr(i); +} +@z + +@x +mp_pack_file_name(mp, mp->cur_name,mp->cur_area,mp->cur_ext); +mp->tfm_infile = (mp->open_file)(mp, mp->name_of_file, "r",mp_filetype_metrics); +@y +mp_pack_file_name(mp, mp->cur_name,mp->cur_area,mp->cur_ext); +#ifdef WIN32 +{ + char *fulln; + fulln = kpse_find_file(fname, kpse_tfm_format, 1); + mp->tfm_infile = (mp->open_file)(mp, fulln, "r",mp_filetype_metrics); + if(fulln) mp_xfree(fulln); +} +#else +mp->tfm_infile = (mp->open_file)(mp, mp->name_of_file, "r",mp_filetype_metrics); +#endif +@z --- /dev/null +++ texlive-bin/texk/web2c/pmplibdir/jmp.ch @@ -0,0 +1,340 @@ +% jMetaPost change file for MetaPost +% +% written by Michio Matsuyama +% Hideyuki Suzuki +% +% $Id: jmp.ch,v 1.42 2000/03/20 02:55:50 hideyuki Exp $ + +% +% +% change file of mp.w for pMetaPost (CWEB version) +% Akira Kakuto (translated the WEB version) +% +% + +@x +@d default_banner "This is MetaPost, Version 1.801" /* printed when \MP\ starts */ +@y +@d default_banner "This is pMetaPost, Version 1.801-0.04" /* printed when \MP\ starts */ +@z + +@x +#define metapost_version "1.801" +@y +#define metapost_version "1.801-0.04" +@z + +@x +# include /* for access */ +#endif +@y +# include /* for access */ +#endif +#include +#include +#include +#include +@z + +@x +void mp_close_file (MP mp, void *f) { + (void) mp; + if (f != NULL) + fclose ((FILE *) f); +@y +void mp_close_file (MP mp, void *f) { + (void) mp; +#ifdef WIN32 + if (f != NULL) { + clear_infile_enc((FILE *)f); + fclose ((FILE *) f); + } +#else + if (f != NULL) + fclose ((FILE *) f); +#endif +@z + +@x +mp->buf_size = 200; +@y +{ + char *kpse_buf = kpse_var_value("buf_size"); + if(kpse_buf) { + mp->buf_size = atoi(kpse_buf); + free(kpse_buf); + } else { + mp->buf_size = 500000; + } +} +@z + +@x +static boolean mp_input_ln (MP mp, void *f) { + /* inputs the next line or returns |false| */ + char *s; + size_t size = 0; + mp->last = mp->first; /* cf.\ Matthew 19\thinspace:\thinspace30 */ + s = (mp->read_ascii_file) (mp, f, &size); + if (s == NULL) + return false; + if (size > 0) { + mp->last = mp->first + size; + if (mp->last >= mp->max_buf_stack) { + mp->max_buf_stack = mp->last + 1; + while (mp->max_buf_stack > mp->buf_size) { + mp_reallocate_buffer (mp, (mp->buf_size + (mp->buf_size >> 2))); + } + } + (void) memcpy ((mp->buffer + mp->first), s, size); + } + free (s); + return true; +} +@y +static boolean mp_input_ln (MP mp, void *f ) { + int i = EOF; + mp->last = input_line2((FILE *)f, mp->buffer, mp->first, mp->buf_size, &i); + if (i == EOF && errno != EINTR && mp->last == mp->first) + return false; + if (i != EOF && i != '\n' && i != '\r') { + fprintf (stderr, "! Unable to read an entire line---bufsize=%u.\n", + (unsigned) mp->buf_size); + fputs ("Please increase buf_size in texmf.cnf.\n", stderr); + exit (1); + } + if (i == '\r') { + while ((i = getc (f)) == EOF && errno == EINTR) + ; + if (i != '\n') + ungetc (i, f); + } + return true; +} +@z + +@x +wterm (mp->banner); +@y +wterm (mp->banner); +wterm(" ("); +wterm((char *)getencstring()); +wterm(")"); +@z + +@x +} four_quarters; +typedef union { + integer sc; + four_quarters qqqq; +} font_data; +@y +} four_quarters; +typedef struct { + halfword RH, LH; +} two_halves; +typedef union { + two_halves hh; + integer sc; + four_quarters qqqq; +} font_data; +@z + +% +% tategaki support +% +% Suppose h==(0,height), d==(0,-depth) && w==(width,0) in horizontal string, +% && h==(height,0), d==(-depth,0) && w==(0,-width) in vertical string. +% Four vertices of the bounding box is h, d, h+w && d+w && those of the +% transformed boundig box is Th, Td, T(h+w) && T(d+w), so that the values +% of Th, Td && Tw are compared here. + +@x +@ The height width and depth information stored in a text node determines a +rectangle that needs to be transformed according to the transformation +parameters stored in the text node. + +@y +@ The height width and depth information stored in a text node determines a +rectangle that needs to be transformed according to the transformation +parameters stored in the text node. + +Boundig box depends on JFM font ID. + +@d yoko_jfm_id 11 /* `yoko-kumi' fonts */ +@d tate_jfm_id 9 /* `tate-kumi' fonts */ +@d font_jfm_p(A) (mp->font_id[(A)]!=0) + +@z + +@x + mp_number x0a, y0a, x1a, y1a, arg1; + mp_text_node p0 = (mp_text_node)p; + new_number (x0a); + new_number (x1a); + new_number (y0a); + new_number (y1a); + new_number (arg1); + number_clone (arg1, p0->depth); + number_negate (arg1); + take_scaled (x1a, p0->txx, p0->width); + take_scaled (y0a, p0->txy, arg1); + take_scaled (y1a, p0->txy, p0->height); +@y + mp_number x0a, y0a, x1a, y1a, arg1, arg2; + mp_text_node p0 = (mp_text_node)p; + new_number (x0a); + new_number (x1a); + new_number (y0a); + new_number (y1a); + new_number (arg1); + new_number (arg2); + number_clone (arg1, p0->depth); + number_negate (arg1); + number_clone (arg2, p0->width); + number_negate (arg2); + if ( mp->font_id[mp_font_n(p)]!=tate_jfm_id ) { + take_scaled (x1a, p0->txx, p0->width); + take_scaled (y0a, p0->txy, arg1); + take_scaled (y1a, p0->txy, p0->height); + } else { + take_scaled (x1a, p0->txy, arg2); + take_scaled (y0a, p0->txx, arg1); + take_scaled (y1a, p0->txx, p0->height); + } +@z + +@x + take_scaled (x1a, p0->tyx, p0->width); + number_clone (arg1, p0->depth); + number_negate (arg1); + take_scaled (y0a, p0->tyy, arg1); + take_scaled (y1a, p0->tyy, p0->height); +@y + if ( mp->font_id[mp_font_n(p)]!=tate_jfm_id ) { + take_scaled (x1a, p0->tyx, p0->width); + number_clone (arg1, p0->depth); + number_negate (arg1); + take_scaled (y0a, p0->tyy, arg1); + take_scaled (y1a, p0->tyy, p0->height); + } else { + number_clone (arg1, p0->depth); + number_negate (arg1); + number_clone (arg2, p0->width); + number_negate (arg2); + take_scaled (x1a, p0->tyy, arg2); + take_scaled (y0a, p0->tyx, arg1); + take_scaled (y1a, p0->tyx, p0->height); + } +@z + +@x + wlog (mp->banner); +@y + wlog (mp->banner); + wlog (" ("); + wlog ((char *)(getencstring())); + wlog (")"); +@z + +% +% char type pointers +@x +eight_bits *font_bc; +eight_bits *font_ec; /* first and last character code */ +@y +eight_bits *font_bc; +eight_bits *font_ec; /* first and last character code */ +halfword *font_nt; +halfword *font_id; +@z + +@x +int *char_base; /* base address for |char_info| */ +@y +int *char_base; /* base address for |char_info| */ +int *ctype_base; +@z + +@x +xfree (mp->char_base); +@y +xfree (mp->font_id); +xfree (mp->font_nt); +xfree (mp->char_base); +xfree (mp->ctype_base); +@z + +@x + XREALLOC (mp->char_base, l, int); +@y + XREALLOC (mp->font_id, l, halfword); + XREALLOC (mp->font_nt, l, halfword); + XREALLOC (mp->char_base, l, int); + XREALLOC (mp->ctype_base, l, int); +@z + + +@x +mp->char_base[null_font] = 0; +@y +mp->font_id[null_font] = 0; +mp->font_nt[null_font] = 0; +mp->char_base[null_font] = 0; +mp->ctype_base[null_font] = 0; +@z + +@x +@d char_mp_info(A,B) mp->font_info[mp->char_base[(A)]+(B)].qqqq +@y +@d char_mp_info(A,B) mp->font_info[mp->char_base[(A)]+(B)].qqqq +@d ctype_char_end(A) (A)].hh.LH +@d ctype_char(A) mp->font_info[mp->ctype_base[(A)]+ctype_char_end +@d ctype_type_end(A) (A)].hh.RH +@d ctype_type(A) mp->font_info[mp->ctype_base[(A)]+ctype_type_end +@z + +% +% lookup character type table +@x +void mp_set_text_box (MP mp, mp_text_node p) { +@y +@; +void mp_set_text_box (MP mp, mp_text_node p) { +@z + +@x + if ((*(mp_text_p (p)->str + k) < bc) || (*(mp_text_p (p)->str + k) > ec)) { + mp_lost_warning (mp, f, *(mp_text_p (p)->str + k)); + } else { + cc = char_mp_info (f, *(mp_text_p (p)->str + k)); +@y + if ( ((*(mp_text_p (p)->str + k) < bc) || (*(mp_text_p (p)->str + k) > ec)) && (mp->font_id[f]==0) ) { + mp_lost_warning (mp, f, *(mp_text_p (p)->str + k)); + } else if (mp->font_id[f]==0) { + cc = char_mp_info (f, *(mp_text_p (p)->str + k)); + } else { + cc=char_mp_info(f,mp_lookup_ctype(mp, f,fromBUFF(mp_text_p(p)->str,limit,k))); + k++; +@z + +@x +@* Debugging. +@y +@ @= +int mp_lookup_ctype (MP mp,font_number f, integer c) +{ + int l, u, r, ch; + l=0; u=mp->font_nt[f]-1; + while ( l +@z + +% Treat all Kanji fonts as used +@x + if ( mp->font_info[p].qqqq.b3==mp_used ) +@y + if ( mp->font_info[p].qqqq.b3==mp_used || mp->font_id[f]!=0) +@z + +% +% Kanji string output +@x +static void mp_print_initial_comment(MP mp,mp_edge_object *hh, int prologues); +@y +static void mp_print_initial_comment(MP mp,mp_edge_object *hh, int prologues); +void mp_ps_kanji_string_out (MP mp,mp_string s); + +#define Hi(x) (((x) >> 8) & 0xff) +#define Lo(x) ((x) & 0xff) + +@ @c +void mp_ps_kanji_string_out (MP mp, char *s) +{ +int i, len; +int c; + +len = strlen(s); +i=0; +mp_ps_print(mp, "<"); +while (ips->ps_offset+5>mp->max_print_line ) mp_ps_print_ln(mp); + c=toDVI(fromBUFF(s, i+2, i)); + i=i+2; + mp_hex_digit_out(mp, Hi(c) / 16); + mp_hex_digit_out(mp, Hi(c) % 16); + mp_hex_digit_out(mp, Lo(c) / 16); + mp_hex_digit_out(mp, Lo(c) % 16); + }; +mp_ps_print(mp, ">"); +}; +@z + +@x + mp_ps_print_nl(mp, "%%Creator: MetaPost "); +@y + mp_ps_print_nl(mp, "%%Creator: MetaPost (Japanese version) "); +@z + +% +% Call Kanji string output routine if the font is JFM. +@x + mp_ps_string_out(mp, gr_text_p(p),gr_text_l(p)); + mp_ps_name_out(mp, mp->font_name[gr_font_n(p)],false); +@y + if (mp->font_id[gr_font_n(p)]!=0) + mp_ps_kanji_string_out(mp, gr_text_p(p)); + else + mp_ps_string_out(mp, gr_text_p(p),gr_text_l(p)); + mp_ps_name_out(mp, mp->font_name[gr_font_n(p)],false); +@z --- /dev/null +++ texlive-bin/texk/web2c/pmplibdir/mp.ch @@ -0,0 +1,20 @@ +@x + /* open the terminal for output */ + t_open_out(); +#if DEBUG + setlinebuf(stdout); + setlinebuf(mp->term_out); +#endif +@y + /* open the terminal for output */ + t_open_out(); +#if DEBUG +#ifdef WIN32 + setvbuf(stdout, (char *) NULL, _IONBF, 0); + setvbuf(mp->term_out, (char *) NULL, _IONBF, 0); +#else + setlinebuf(stdout); + setlinebuf(mp->term_out); +#endif +#endif +@z --- /dev/null +++ texlive-bin/texk/web2c/pmplibdir/mpmathdouble.ch @@ -0,0 +1,76 @@ +@x +#define _ISOC99_SOURCE /* to get the round() prototype */ +#include +#include +#include +#include +@y +#define _ISOC99_SOURCE /* to get the round() prototype */ +#include +#include +#include +#include +#ifdef _MSC_VER +double round(double x); +#endif +@z + +@x +void mp_init_randoms (MP mp, int seed) { + int j, jj, k; /* more or less random integers */ + int i; /* index into |randoms| */ + j = abs (seed); + while (j >= fraction_one) { + j = j/2; + } + k = 1; + for (i = 0; i <= 54; i++) { + jj = k; + k = j - k; + j = jj; + if (k<0) + k += fraction_one; + mp->randoms[(i * 21) % 55].data.dval = j; + } + mp_new_randoms (mp); + mp_new_randoms (mp); + mp_new_randoms (mp); /* ``warm up'' the array */ +} +@y +void mp_init_randoms (MP mp, int seed) { + int j, jj, k; /* more or less random integers */ + int i; /* index into |randoms| */ + j = abs (seed); + while (j >= fraction_one) { + j = j/2; + } + k = 1; + for (i = 0; i <= 54; i++) { + jj = k; + k = j - k; + j = jj; + if (k<0) + k += fraction_one; + mp->randoms[(i * 21) % 55].data.dval = j; + } + mp_new_randoms (mp); + mp_new_randoms (mp); + mp_new_randoms (mp); /* ``warm up'' the array */ +} +#ifdef _MSC_VER +# include +double round(double x) +{ + double c, f, d1, d2; + + c = ceil(x); + f = floor(x); + d1 = fabs(c - x); + d2 = fabs(x - f); + if (d1 > d2) + return f; + else + return c; +} +#endif +@z --- /dev/null +++ texlive-bin/texk/web2c/pmplibdir/mpost.ch @@ -0,0 +1,310 @@ +@x +#include +@y +#include +#ifdef WIN32 +char kanjioption[16]; +#endif +@z + +@x +@d TEX "tex" +@d TROFF "soelim | eqn -Tps -d$$ | troff -Tps" + +@c +#ifndef MPXCOMMAND +#define MPXCOMMAND "makempx" +#endif +@y +@d TEX "ptex" +@d TROFF "gsoelim | geqn -Tps -d$$ | gtroff -Tps" + +@c +#ifndef MPXCOMMAND +#ifdef WIN32 +#define MPXCOMMAND "pmakempx" +#else +#define MPXCOMMAND "makempx" +#endif +#endif +@z + +@x + if (cnf_cmd!=NULL && (strcmp (cnf_cmd, "1")!=0)) { + if (mp_troff_mode(mp)!=0) + cmd = concatn (cnf_cmd, " -troff ", + qmpname, " ", qmpxname, NULL); + else if (mpost_tex_program!=NULL && *mpost_tex_program != '\0') + cmd = concatn (cnf_cmd, " -tex=", mpost_tex_program, " ", + qmpname, " ", qmpxname, NULL); +@y + if (cnf_cmd!=NULL && (strcmp (cnf_cmd, "1")!=0)) { + if (kanjioption[0]) + cnf_cmd = concatn (cnf_cmd, " --kanji=", kanjioption, NULL); + if (mp_troff_mode(mp)) + cmd = concatn (cnf_cmd, " -troff ", + qmpname, " ", qmpxname, NULL); + else if (mpost_tex_program!=NULL && *mpost_tex_program != '\0') + cmd = concatn (cnf_cmd, " -tex=", mpost_tex_program, " ", + qmpname, " ", qmpxname, NULL); +@z + +@x + if (mpost_tex_program != NULL && *mpost_tex_program != '\0') { + maincmd = mpost_xstrdup(mpost_tex_program); + } else { + if (mpxmode == mpx_tex_mode) { + s = kpse_var_value("TEX"); + if (s==NULL) s = kpse_var_value("MPXMAINCMD"); + if (s==NULL) s = mpost_xstrdup (TEX); + maincmd = (char *)mpost_xmalloc (strlen(s)+strlen(default_args)+1); + strcpy(maincmd,s); +@y + if (mpost_tex_program != NULL && *mpost_tex_program != '\0') { +#ifdef WIN32 + if (kanjioption[0]) { + maincmd = (char *)mpost_xmalloc (strlen(mpost_tex_program) + + strlen(kanjioption) + 15); + strcpy(maincmd, mpost_tex_program); + strcat(maincmd, " --kanji="); + strcat(maincmd, kanjioption); + } else + maincmd = mpost_xstrdup(mpost_tex_program); +#else + maincmd = mpost_xstrdup(mpost_tex_program); +#endif + } else { + if (mpxmode == mpx_tex_mode) { + s = kpse_var_value("TEX"); + if (s==NULL) s = kpse_var_value("MPXMAINCMD"); + if (s==NULL) s = mpost_xstrdup (TEX); +#ifdef WIN32 + if (kanjioption[0]) + maincmd = (char *)mpost_xmalloc (strlen(s)+strlen(default_args)+ + strlen(kanjioption)+13); + else + maincmd = (char *)mpost_xmalloc (strlen(s)+strlen(default_args)+1); +#else + maincmd = (char *)mpost_xmalloc (strlen(s)+strlen(default_args)+1); +#endif + strcpy(maincmd,s); +#ifdef WIN32 + if (kanjioption[0]) { + strcat(maincmd, " --kanji="); + strcat(maincmd, kanjioption); + } +#endif +@z + +@x + const char *banner = "% Written by metapost version "; +@y + const char *banner = "% Written by pmpost version "; +@z + +@x + mpost_xfree (cnf_cmd); +@y + if(cnf_cmd) + mpost_xfree (cnf_cmd); +@z + +@x + const char *banner = "% Written by dvitomp version "; +@y + const char *banner = "% Written by pdvitomp version "; +@z + +@x + { "kpathsea-debug", 1, 0, 0 }, +@y + { "kpathsea-debug", 1, 0, 0 }, + { "kanji", 1, 0, 0 }, +@z + +@x + if (user_progname == NULL) + user_progname = optarg; + } +@y + if (user_progname == NULL) + user_progname = optarg; + } +#ifdef WIN32 + } else if (ARGUMENT_IS ("kanji")) { + strcpy(kanjioption, optarg); + if(!set_enc_string(optarg, optarg)) { + fprintf(stderr,"Ignoring unknown argument `%s' to --kanji", optarg); + } +#endif +@z + +@x + { "no-kpathsea", 0, &nokpse, 1 }, +@y + { "no-kpathsea", 0, &nokpse, 1 }, + { "kanji", 1, 0, 0 }, +@z + +@x + } else if (option_is ("progname")) { + user_progname = optarg; +@y + } else if (option_is ("progname")) { + user_progname = optarg; +#ifdef WIN32 + } else if (option_is ("kanji")) { + strcpy (kanjioption, optarg); + if(!set_enc_string(optarg, optarg)) { + fprintf(stderr,"Ignoring unknown argument `%s' to --kanji", optarg); + } +#endif +@z + +@x + fprintf(stdout, "This is dvitomp %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "This is MetaPost %s" WEB2CVERSION "\n", s); +mpost_xfree(s); +fprintf(stdout, +"\n" +"Usage: mpost [OPTION] [&MEMNAME] [MPNAME[.mp]] [COMMANDS]\n" +" mpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +"\n" +" Run MetaPost on MPNAME, usually creating MPNAME.NNN (and perhaps\n" +" MPNAME.tfm), where NNN are the character numbers generated.\n" +" Any remaining COMMANDS are processed as MetaPost input,\n" +" after MPNAME is read.\n\n" +" With a --dvitomp argument, MetaPost acts as DVI-to-MPX converter only.\n" +" Call MetaPost with --dvitomp --help for option explanations.\n\n"); +fprintf(stdout, +" -ini be inimpost, for dumping mem files\n" +" -interaction=STRING set interaction mode (STRING=batchmode/nonstopmode/\n" +" scrollmode/errorstopmode)\n" +" -numbersystem=STRING set number system mode (STRING=scaled/double/binary/decimal)\n" +" -jobname=STRING set the job name to STRING\n" +@y + fprintf(stdout, "This is pdvitomp %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "This is pMetaPost %s" WEB2CVERSION "\n", s); +mpost_xfree(s); +fprintf(stdout, +"\n" +"Usage: pmpost [OPTION] [&MEMNAME] [MPNAME[.mp]] [COMMANDS]\n" +" pmpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +"\n" +" Run pMetaPost on MPNAME, usually creating MPNAME.NNN (and perhaps\n" +" MPNAME.tfm), where NNN are the character numbers generated.\n" +" Any remaining COMMANDS are processed as pMetaPost input,\n" +" after MPNAME is read.\n\n" +" With a --dvitomp argument, pMetaPost acts as DVI-to-MPX converter only.\n" +" Call pMetaPost with --dvitomp --help for option explanations.\n\n"); +fprintf(stdout, +" -ini be inipmpost, for dumping mem files\n" +" -interaction=STRING set interaction mode (STRING=batchmode/nonstopmode/\n" +" scrollmode/errorstopmode)\n" +" -numbersystem=STRING set number system mode (STRING=scaled/double/binary/decimal)\n" +" -jobname=STRING set the job name to STRING\n" +" -kanji=STRING set the Japanese encoding to STRING\n" +@z + +@x +" -version output version information and exit\n" +"\n" +"Email bug reports to mp-implementors@@tug.org.\n" +@y +" -version output version information and exit\n" +@z + +@x + fprintf(stdout, "This is dvitomp %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "This is MetaPost %s" WEB2CVERSION "\n", s); +mpost_xfree(s); +fprintf(stdout, +"\n" +"Usage: dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +" mpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +"\n" +" Convert a TeX DVI file to a MetaPost MPX file.\n\n"); +fprintf(stdout, +" -progname=STRING set program name to STRING\n" +@y + fprintf(stdout, "This is pdvitomp %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "This is pMetaPost %s" WEB2CVERSION "\n", s); +mpost_xfree(s); +fprintf(stdout, +"\n" +"Usage: pdvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +" pmpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +"\n" +" Convert a TeX DVI file to a MetaPost MPX file.\n\n"); +fprintf(stdout, +" -progname=STRING set program name to STRING\n" +" -kanji=STRING set kanji encoding (sjis, jis, euc, utf8)\n" +@z + +@x + fprintf(stdout, "dvitomp (MetaPost) %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "MetaPost %s" WEB2CVERSION "\n", s); +@y + fprintf(stdout, "pdvitomp (pMetaPost) %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "pMetaPost %s" WEB2CVERSION "\n", s); +@z + +@x +"Author of the CWEB MetaPost: Taco Hoekwater.\n" +@y +"Author of the CWEB MetaPost: Taco Hoekwater.\n" +"Authors of pMetaPost: Michio Matsuyama, Hideyuki Suzuki.\n" +@z + +@x + const char * banner = "This is MetaPost, version "; +@y + const char * banner = "This is pMetaPost, version "; +@z + +@x + options->print_found_names = (int)true; + { + const char *base = xbasename(argv[0]); + if (!strcmp(base, "dvitomp") || !strcasecmp(base, "dvitomp.exe")) + dvitomp_only=1; + } + if (dvitomp_only) { + @; + } else { +@y + options->print_found_names = (int)true; + +#if defined(WIN32) + { + char *p , *q; + p = (char *)xbasename(argv[0]); + if ((q = strrchr(p, '.')) && !stricmp(q, ".exe")) + *q = '\0'; + argv[0] = p; + } + kanjioption[0] = '\0'; + enable_UPTEX (false); + set_enc_string("sjis", "sjis"); +#endif + + if (strstr(argv[0], "dvitomp") != NULL) { + dvitomp_only=1; + @; + } else { +#ifdef WIN32 + options->mem_name = mpost_xstrdup(argv[0]); +#endif +@z + +@x + if(putenv(xstrdup("engine=metapost"))) +@y + if(putenv(xstrdup("engine=pmpost"))) +@z --- /dev/null +++ texlive-bin/texk/web2c/pmplibdir/mpxout.ch @@ -0,0 +1,8 @@ +@x +#include +@y +#include +#define R_OK 4 +typedef int boolean; +typedef int integer; +@z --- /dev/null +++ texlive-bin/texk/web2c/pmplibdir/pdvitomp.ch @@ -0,0 +1,494 @@ +@x +#include "mpxout.h" +@h +@y +#include "mpxout.h" +#include +@h +@z + +@x +@d max_widths (256*max_fonts) /* maximum number of different characters among all fonts */ +@y +@d max_widths 512000 /* maximum number of different characters among all fonts */ +@z + +@x +@d undefined_commands 250: case 251: case 252: case 253: case 254: case 255 +@y +@d dir 255 /* p\TeX\ direction */ +@d undefined_commands 250: case 251: case 252: case 253: case 254 +@z + +@x +mpx_read_tfm_word(mpx); lh=mpx->b2*(int)(256)+mpx->b3; +@y +mpx_read_tfm_word(mpx); +@;@/ +lh=mpx->b2*(int)(256)+mpx->b3; +@z + +@x + if ( mpx->b0<128 ) + mpx->tfm_check_sum=((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3; + else + mpx->tfm_check_sum=(((mpx->b0-256)*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3; + } + if ( k==5 ) { + if (mpx->mode == mpx_troff_mode) { + mpx->font_design_size[f]=(((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3)/(65536.0*16); + } + } +} +@y + if ( mpx->b0<128 ) + mpx->tfm_check_sum=((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3; + else + mpx->tfm_check_sum=(((mpx->b0-256)*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3; + } + if ( k==5 ) { + if (mpx->mode == mpx_troff_mode) { + mpx->font_design_size[f]=(((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3)/(65536.0*16); + } + } +} +@; +@z + +@x +@= +floor(mpx->dvi_scale*mpx->font_scaled_size[f]*char_width(f,c)) + +@ @= +floor(mpx->dvi_scale*mpx->font_scaled_size[cur_font]*char_width(cur_font,p)) +@y +@ @c @@; /* p\TeX */ +integer mpx_scaled_char_width (MPX mpx,integer f,integer c) +{ + if (mpx->font_id[f]!=0) c=mpx_lookup_ctype(mpx, f,c); + return floor(mpx->dvi_scale*mpx->font_scaled_size[f]*char_width(f,c)); +} +@z + +@x +@ @c @@; +static void mpx_do_set_char (MPX mpx,web_integer f, web_integer c) { + if ( (cfont_bc[f])||(c>mpx->font_ec[f]) ) + mpx_abort(mpx,"attempt to typeset invalid character %d",c); +@.attempt to typeset...@> +@y +@ PDVItoMP: |do_set_char| is called with non-virtual font. +In the case of non-virtual Kanji font, the width is looked up +with the character type, and the character is printed by the +function |set_kanji_char|. + +When the width written in the virtual font is same as +the width of the substituted font, the next character can be +written in the same string in output mpx file. +In other words, the width of the character is calculated +in |do_dvi_commands|. So even if the width is wrong here, the output PostScript file is not affected. + +@ @c @@; +void mpx_do_set_char (MPX mpx,integer f,integer c) +{ +integer kkk; + +if (mpx->font_id[f]!=0) { + kkk=mpx_lookup_ctype(mpx, f,c); + if ( (kkkfont_bc[f]) || (kkk>mpx->font_ec[f]) ) + mpx_abort(mpx,"attempt to typeset invalid character (JFM) %d",c); +} else if ( (cfont_bc[f])||(c>mpx->font_ec[f]) ) { + mpx_abort(mpx,"attempt to typeset invalid character %d",c); +} +@.attempt to typeset...@> +@z + +@x + if ((mpx->h!=mpx->str_h2)||(mpx->v!=mpx->str_v)|| + (f!=mpx->str_f)||(mpx->dvi_scale!=mpx->str_scale) ) { +@y + if ((mpx->h!=mpx->str_h2)||(mpx->v!=mpx->str_v2)|| + (f!=mpx->str_f)||(mpx->dvi_scale!=mpx->str_scale) ) { +@z + +@x + fprintf(mpx->mpxfile,"_s("); mpx->print_col=3;@/ + mpx->str_scale=mpx->dvi_scale; mpx->str_f=f; + mpx->str_v=mpx->v; mpx->str_h1=mpx->h; +@y + if ((mpx->d==0) || (mpx->font_id[f]==9)) { + fprintf(mpx->mpxfile,"_s("); mpx->print_col=3;}@/ + else { + fprintf(mpx->mpxfile,"_sr("); mpx->print_col=4;}@/ + mpx->str_scale=mpx->dvi_scale; mpx->str_f=f; + mpx->str_v1=mpx->v; mpx->str_h1=mpx->h; +@z + +@x + mpx_print_char(mpx, (unsigned char)c); + mpx->str_h2=(web_integer)(mpx->h+@); +@y + if (mpx->font_id[f]!=0) + mpx_print_kanji_char(mpx, c); + else + mpx_print_char(mpx, c); + if (mpx->d==0) { + mpx->str_h2=mpx->h+mpx_scaled_char_width(mpx, f, c); + mpx->str_v2=mpx->v; + } else { + mpx->str_h2=mpx->h; + mpx->str_v2=mpx->v+mpx_scaled_char_width(mpx, f, c); + } +@z + +@x +web_integer str_h1; +web_integer str_v; /* starting position for current output string */ +web_integer str_h2; /* where the current output string ends */ +@y +integer str_h1; +integer str_v1; /* starting position for current output string */ +integer str_h2; +integer str_v2; /* where the current output string ends */ +@z + +@x + fprintf(mpx->mpxfile,"vardef _s(expr _t,_f,_m,_x,_y)(text _c)=\n"); + fprintf(mpx->mpxfile, + " addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef;\n"); +@y + fprintf(mpx->mpxfile,"vardef _s(expr _t,_f,_m,_x,_y)(text _c)=\n"); + fprintf(mpx->mpxfile, + " addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef;\n"); + fprintf(mpx->mpxfile,"vardef _sr(expr _t,_f,_m,_x,_y)=\n"); + fprintf(mpx->mpxfile," addto _p also _t infont _f rotated -90"); + fprintf(mpx->mpxfile," scaled _m shifted (_x,_y); enddef;\n"); +@z + +@x + x=mpx->conv*mpx->str_h1; + y=mpx->conv*(-mpx->str_v); +@y + x=mpx->conv*mpx->str_h1; + y=mpx->conv*(-mpx->str_v1); +@z + +@x +@= +{ + mpx->pic_wd=mpx->h; mpx->pic_dp=mpx->v; mpx->pic_ht=ht-mpx->v; +} +@y +@= +{ if (mpx->d==0) { + mpx->pic_wd=mpx->h; mpx->pic_dp=mpx->v; mpx->pic_ht=ht-mpx->v; + } else { + mpx->pic_wd=mpx->v; mpx->pic_dp=-mpx->h; mpx->pic_ht=ht+mpx->h; + } +} +@z + +@x + mpx->str_v=0; + mpx->str_h2=0; + mpx->str_scale=1.0; /* values don't matter */ +@y + mpx->str_h2=0; + mpx->str_v2=0; + mpx->str_scale=1.0; /* values don't matter */ +@z + +@x +dd=-mpx->pic_dp*mpx->conv; +w=mpx->conv*mpx->pic_wd; +h=mpx->conv*mpx->pic_ht; +fprintf(mpx->mpxfile, + "setbounds _p to (0,%1.4f)--(%1.4f,%1.4f)--\n" + " (%1.4f,%1.4f)--(0,%1.4f)--cycle;\n",dd,w,dd,w,h,h) +@y +if (mpx->d==0) { + dd=-mpx->pic_dp*mpx->conv; + w=mpx->conv*mpx->pic_wd; + h=mpx->conv*mpx->pic_ht; + fprintf(mpx->mpxfile, + "setbounds _p to (0,%1.4f)--(%1.4f,%1.4f)--\n",dd,w,dd); + fprintf(mpx->mpxfile, + " (%1.4f,%1.4f)--(0,%1.4f)--cycle;\n",w,h,h); +} else { + dd=-mpx->pic_dp*mpx->conv; + w=-mpx->pic_wd*mpx->conv; + h=mpx->conv*mpx->pic_ht; + fprintf(mpx->mpxfile, + "setbounds _p to (%1.4f,0)--(%1.4f,%1.4f)--\n",h,h,w); + fprintf(mpx->mpxfile, + " (%1.4f,%1.4f)--(%1.4f,0)--cycle;\n", dd,w,dd); +} +@z + +@x +web_integer w;web_integer x;web_integer y;web_integer z; + /* current state values (|h| and |v| have already been declared) */ +web_integer hstack[(stack_size+1)]; +web_integer vstack[(stack_size+1)]; +web_integer wstack[(stack_size+1)]; +web_integer xstack[(stack_size+1)]; +web_integer ystack[(stack_size+1)]; +web_integer zstack[(stack_size+1)]; /* pushed down values in \.{DVI} units */ +@y +integer w;integer x;integer y;integer z;integer d; + /* current state values (|h| and |v| have already been declared) */ +integer hstack[(stack_size+1)]; +integer vstack[(stack_size+1)]; +integer wstack[(stack_size+1)]; +integer xstack[(stack_size+1)]; +integer ystack[(stack_size+1)]; +integer zstack[(stack_size+1)]; +integer dstack[(stack_size+1)]; /* pushed down values in \.{DVI} units */ +@z + +@x +mpx->h=0; mpx->v=0; +@y +mpx->h=0; mpx->v=0; mpx->d=0; +@z + +@x + mpx->hstack[mpx->stk_siz]=mpx->h; + mpx->vstack[mpx->stk_siz]=mpx->v; mpx->wstack[mpx->stk_siz]=mpx->w; + mpx->xstack[mpx->stk_siz]=mpx->x; + mpx->ystack[mpx->stk_siz]=mpx->y; mpx->zstack[mpx->stk_siz]=mpx->z; +@y + mpx->hstack[mpx->stk_siz]=mpx->h; + mpx->vstack[mpx->stk_siz]=mpx->v; mpx->wstack[mpx->stk_siz]=mpx->w; + mpx->xstack[mpx->stk_siz]=mpx->x; + mpx->ystack[mpx->stk_siz]=mpx->y; mpx->zstack[mpx->stk_siz]=mpx->z; + mpx->dstack[mpx->stk_siz]=mpx->d; +@z + +@x + mpx->h=mpx->hstack[mpx->stk_siz]; + mpx->v=mpx->vstack[mpx->stk_siz]; mpx->w=mpx->wstack[mpx->stk_siz]; + mpx->x=mpx->xstack[mpx->stk_siz]; + mpx->y=mpx->ystack[mpx->stk_siz]; mpx->z=mpx->zstack[mpx->stk_siz]; +@y + mpx->h=mpx->hstack[mpx->stk_siz]; + mpx->v=mpx->vstack[mpx->stk_siz]; mpx->w=mpx->wstack[mpx->stk_siz]; + mpx->x=mpx->xstack[mpx->stk_siz]; + mpx->y=mpx->ystack[mpx->stk_siz]; mpx->z=mpx->zstack[mpx->stk_siz]; + mpx->d=mpx->dstack[mpx->stk_siz]; +@z + +@x + case z0: return mpx->z; break; +@y + case z0: return mpx->z; break; + case dir: return mpx_get_byte(mpx); break; +@z + +@x + mpx->h += @; +@y + if (mpx->d==0) { + mpx->h+=mpx_scaled_char_width(mpx, cur_font, p); + } else { + mpx->v+=mpx_scaled_char_width(mpx, cur_font, p); + } +@z + +@x + mpx->h += q; +@y + if (mpx->d==0) { + mpx->h += q; + } else { + mpx->v += q; + } +@z + +@x +case pop: + mpx_do_pop(mpx); + break; +@y +case pop: + mpx_do_pop(mpx); + break; +case dir: + mpx->d=p; + break; +@z + +@x +case four_cases(right1): + mpx->h += trunc(p*mpx->dvi_scale); + break; +case w0: case four_cases(w1): + mpx->w = (web_integer)trunc(p*mpx->dvi_scale); mpx->h += mpx->w; + break; +case x0: case four_cases(x1): + mpx->x = (web_integer)trunc(p*mpx->dvi_scale); mpx->h += mpx->x; + break; +case four_cases(down1): + mpx->v += trunc(p*mpx->dvi_scale); + break; +case y0: case four_cases(y1): + mpx->y = (web_integer)trunc(p*mpx->dvi_scale); mpx->v += mpx->y; + break; +case z0: case four_cases(z1): + mpx->z = (web_integer)trunc(p*mpx->dvi_scale); mpx->v += mpx->z; + break; +@y +case four_cases(right1): + if (mpx->d==0) { + mpx->h+=trunc(p*mpx->dvi_scale); + } else { + mpx->v+=trunc(p*mpx->dvi_scale); + } + break; +case w0: case four_cases(w1): + if (mpx->d==0) { + mpx->h+=mpx->w; + } else { + mpx->v+=mpx->w; + } + break; +case x0: case four_cases(x1): + if (mpx->d==0) { + mpx->h+=mpx->x; + } else { + mpx->v+=mpx->x; + } + break; +case four_cases(down1): + if (mpx->d==0) { + mpx->v+=trunc(p*mpx->dvi_scale); + } else { + mpx->h-=trunc(p*mpx->dvi_scale); + } + break; +case y0: case four_cases(y1): + if (mpx->d==0) { + mpx->v+=mpx->y; + } else { + mpx->h-=mpx->y; + } + break; +case z0: case four_cases(z1): + if (mpx->d==0) { + mpx->v+=mpx->z; + } else { + mpx->h-=mpx->z; + } + break; +@z + +@x +@= +if (mpx_newer(mpxopt->mpname, mpxopt->mpxname)) + return 0 +@y +@= +if (mpx_newer(mpxopt->mpname, mpxopt->mpxname)) + return 0 + +@ ASCII p\TeX JFM ID +@d yoko_jfm_id 11 /* for `yoko-kumi' fonts */ +@d tate_jfm_id 9 /* for `tate-kumi' fonts */ +@d font_jfm_p(A) (mpx->font_id[(A)]!=0) + +@ @= +integer font_nt[max_fonts+1]; /* number of words in ctype table */ +integer font_id[max_fonts+1]; +integer jfm_char_code[max_widths+1]; +integer jfm_char_type[max_widths+1]; +integer jfm_char_index[max_fonts+1]; +integer next_jfm_char_index; + +@ @= +mpx->font_nt[0]=0; +mpx->font_id[0]=0; +mpx->jfm_char_type[0]=0; +mpx->next_jfm_char_index=0; + +@ JFM character type table is stored in the array |jfm_char_code| and +|jfm_char_type|. The character code and the character type of $i$-th +record is stored in |jfm_char_code[i]| and |jfm_char_type[i]|, respectively. +The table is in the order of character code. + +@= +mpx->font_id[f]=mpx->b0*(int)(256)+mpx->b1; +if ((mpx->font_id[f]==yoko_jfm_id) || (mpx->font_id[f]==tate_jfm_id)) { + mpx->font_nt[f]=mpx->b2*(int)(256)+mpx->b3; + mpx_read_tfm_word(mpx); +} else { + mpx->font_id[f]=0; + mpx->font_nt[f]=0; +} + +@ @= +mpx->jfm_char_index[f]=mpx->next_jfm_char_index; +k=mpx->jfm_char_index[f]; +mpx->next_jfm_char_index+=mpx->font_nt[f]; +while (knext_jfm_char_index) { + mpx_read_tfm_word(mpx); + mpx->jfm_char_code[k]=mpx->b0*(int)(256)+mpx->b1; + mpx->jfm_char_type[k]=mpx->b2*(int)(256)+mpx->b3; + k++; +} + +@ JFM character type table is looked up by binary search. + +@= +integer mpx_lookup_ctype (MPX mpx,integer f, integer c) +{ + integer l, u, r, ch; + l=0; u=mpx->font_nt[f]-1; + while (ljfm_char_code[mpx->jfm_char_index[f]+r]; + if (ch==c) { + return mpx->jfm_char_type[mpx->jfm_char_index[f]+r]; + } + if (ch> 8) & 0xff) +@d Lo(x) ( (x) & 0xff) + +@= +void mpx_print_kanji_char (MPX mpx,integer c) +{ + if (mpx->print_col+2>line_length-2 ) { + if (mpx->state==normal) { + fprintf(mpx->mpxfile, "\""); + mpx->state=special; + } + fprintf(mpx->mpxfile, " \n"); + mpx->print_col=0; + } + if (mpx->state==special) { + fprintf(mpx->mpxfile,"&"); + mpx->print_col++; + } + if (mpx->state!=normal) { + fprintf(mpx->mpxfile, "\""); + mpx->print_col++; + mpx->state=normal; + } + c=toBUFF(fromDVI(c)); + putc2(Hi(c), mpx->mpxfile); + mpx->print_col++; + putc2(Lo(c), mpx->mpxfile); + mpx->print_col++; +} +@z --- /dev/null +++ texlive-bin/texk/web2c/pmplibdir/psout.ch @@ -0,0 +1,42 @@ +@x +integer ps_offset; +@y +integer ps_offset; +integer is_mapfile_read; +@z + +@x +mp->ps->ps_offset = 0; +@y +mp->ps->ps_offset = 0; +mp->ps->is_mapfile_read = 0; +@z + +@x + mp->ps->fm_file = (mp->open_file)(mp, n, "r", mp_filetype_fontmap); + if (!mp->ps->fm_file) { +@y + mp->ps->fm_file = (mp->open_file)(mp, n, "r", mp_filetype_fontmap); + if (!mp->ps->fm_file) { + mp->ps->mitem->map_line = mp_xstrdup (mp,psf_tab_name); + n = mp->ps->mitem->map_line; + mp->ps->fm_file = (mp->open_file)(mp, n, "r", mp_filetype_fontmap); + } + if (!mp->ps->fm_file) { +@z + +@x +@d ps_tab_name "psfonts.map" /* locates font name translation table */ +@y +@d ps_tab_name "mpost.map" /* locates font name translation table */ +@d psf_tab_name "psfonts.map" /* locates font name translation table */ +@z + +@x + fm_read_info (mp); +@y + if (mp->ps->is_mapfile_read == 0) { + mp->ps->is_mapfile_read++; + fm_read_info (mp); + } +@z --- /dev/null +++ texlive-bin/texk/web2c/pmplibdir/svgout.ch @@ -0,0 +1,60 @@ +@x +@= + (k=='&')||(k=='>')||(k=='<') +@y +@= + (k=='&')||(k=='>')||(k=='<')||(k>=0x7F) +@z + +@x +@ Now for outputting the actual graphic objects. +@y +@ Now for outputting the actual graphic objects. + +@d yoko_jfm_id 11 /* `yoko-kumi' fonts */ +@d tate_jfm_id 9 /* `tate-kumi' fonts */ +@d font_jfm_p(A) (mp->font_id[(A)]!=0) +@z + +@x Even if prologues=3, Japanese texts are not converted into paths. + if (prologues == 3 ) { +@y + if (prologues == 3 && mp->font_id[gr_font_n(p)]==0) { +@z + +@x To realise vertical Japanese texts ... + mp_svg_attribute(mp, "font-size", mp->svg->buf); +@y + mp_svg_attribute(mp, "font-size", mp->svg->buf); + if ( mp->font_id[gr_font_n(p)]==tate_jfm_id ) { + mp_svg_reset_buf(mp); + append_string("tb-rl"); + mp_svg_attribute(mp, "writing-mode", mp->svg->buf); + } +@z + +@x + while (l-->0) { + k=(int)*s++; + if (@) { +@y + if ( mp->font_id[gr_font_n(p)]!=0 ) { + l >>= 1; + while (l-->0) { + k =((int)*s++)*0x100; k += (int)*s++; + fprintf(stderr, "\n>>> %d\n", k); + append_string("&#"); + mp_svg_store_int(mp,toUCS(k)); + append_char(';'); + } + } else + while (l-->0) { + k=(int)*s++; + if (@) { +@z + +@x + mp_svg_print(mp, ""); +@y + mp_svg_print(mp, ""); +@z debian/patches/mendex-bugfix0000664000000000000000000000262012213264212013277 0ustar fix a bug in mendex when range ops and macros are used (Closes: #534641) --- texk/mendexk/ChangeLog | 9 +++++++++ texk/mendexk/fwrite.c | 5 ++--- 2 files changed, 11 insertions(+), 3 deletions(-) --- texlive-bin.orig/texk/mendexk/ChangeLog +++ texlive-bin/texk/mendexk/ChangeLog @@ -1,3 +1,12 @@ +2013-09-08 Norbert Preining + + * fwrite.c: properly parenthesis TAIL macro + +2013-09-07 Norbert Preining + + * fwrite.c: fix missing output when range operators are + used with macro definitions + 2012-11-19 Peter Breitenlohner * Makefile.am: Avoid use of deprecated INCLUDES. --- texlive-bin.orig/texk/mendexk/fwrite.c +++ texlive-bin/texk/mendexk/fwrite.c @@ -15,7 +15,7 @@ static void linecheck(char *lbuff, char *tmpbuff); static void crcheck(char *lbuff, FILE *fp); -#define TAIL(x) (x+strlen(x)) +#define TAIL(x) ((x)+strlen(x)) /* if we don't have vsnprintf() */ /* #define vsnprintf(buff,len,format,argptr) vsprintf(buff,format,argptr) */ @@ -384,8 +384,7 @@ ind.p[j].enc++; } if (strlen(ind.p[j].enc)>0) { - sprintf(tmpbuff,"%s%s%s",encap_prefix,ind.p[j].enc,encap_infix); - sprintf(tmpbuff,"%s%s%s",ind.p[j].page,encap_suffix,delim_n); + sprintf(tmpbuff,"%s%s%s%s%s%s",encap_prefix,ind.p[j].enc,encap_infix,ind.p[j].page,encap_suffix,delim_n); linecheck(lbuff,tmpbuff); } } debian/patches/61_path_max.diff0000664000000000000000000000054612213264212013560 0ustar --- texk/ptexenc/ptexenc.c | 1 + 1 file changed, 1 insertion(+) --- texlive-bin.orig/texk/ptexenc/ptexenc.c +++ texlive-bin/texk/ptexenc/ptexenc.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include debian/patches/mendex-snprintf0000664000000000000000000002660012213264212013662 0ustar --- texk/mendexk/ChangeLog | 1 texk/mendexk/fwrite.c | 103 +++++++++++++++++++++++++------------------------ 2 files changed, 54 insertions(+), 50 deletions(-) --- texlive-bin.orig/texk/mendexk/ChangeLog +++ texlive-bin/texk/mendexk/ChangeLog @@ -1,6 +1,7 @@ 2013-09-08 Norbert Preining * fwrite.c: properly parenthesis TAIL macro + * fwrite.c: replace sprintf with snprintf 2013-09-07 Norbert Preining --- texlive-bin.orig/texk/mendexk/fwrite.c +++ texlive-bin/texk/mendexk/fwrite.c @@ -10,12 +10,15 @@ int line_length=0; +#define BUFFERLEN 4096 + static void printpage(struct index *ind, FILE *fp, int num, char *lbuff); static int range_check(struct index ind, int count, char *lbuff); static void linecheck(char *lbuff, char *tmpbuff); static void crcheck(char *lbuff, FILE *fp); #define TAIL(x) ((x)+strlen(x)) +#define TAIL_LEN(x) ((x)+strlen(x)), (BUFFERLEN-strlen(x)) /* if we don't have vsnprintf() */ /* #define vsnprintf(buff,len,format,argptr) vsprintf(buff,format,argptr) */ @@ -67,7 +70,7 @@ void indwrite(char *filename, struct index *ind, int pagenum) { int i,j,hpoint=0; - char datama[256],lbuff[4096]; + char datama[256],lbuff[BUFFERLEN]; FILE *fp; if (filename[0]!='\0' && kpse_out_name_ok(filename)) fp=fopen(filename,"wb"); @@ -99,7 +102,7 @@ fprintf(fp,"%s%s%s",lethead_prefix,symhead_negative,lethead_suffix); } } - sprintf(lbuff,"%s%s",item_0,ind[i].idx[0]); + snprintf(lbuff, BUFFERLEN, "%s%s",item_0,ind[i].idx[0]); } else if (alphabet(ind[i].dic[0][0])) { if (lethead_flag>0) { @@ -108,7 +111,7 @@ else if (lethead_flag<0) { fprintf(fp,"%s%c%s",lethead_prefix,ind[i].dic[0][0]+32,lethead_suffix); } - sprintf(lbuff,"%s%s",item_0,ind[i].idx[0]); + snprintf(lbuff, BUFFERLEN, "%s%s",item_0,ind[i].idx[0]); } else if (japanese(ind[i].dic[0])) { if (lethead_flag) { @@ -125,7 +128,7 @@ } fputs(lethead_suffix,fp); } - sprintf(lbuff,"%s%s",item_0,ind[i].idx[0]); + snprintf(lbuff, BUFFERLEN, "%s%s",item_0,ind[i].idx[0]); for (hpoint=0;hpoint<(strlen(datama)/2);hpoint++) { if ((unsigned char)ind[i].dic[0][1]<(unsigned char)datama[hpoint*2+1]) { break; @@ -134,18 +137,18 @@ } switch (ind[i].words) { case 1: - sprintf(TAIL(lbuff),"%s",delim_0); + snprintf(TAIL_LEN(lbuff), "%s",delim_0); break; case 2: - sprintf(TAIL(lbuff),"%s%s",item_x1,ind[i].idx[1]); - sprintf(TAIL(lbuff),"%s",delim_1); + snprintf(TAIL_LEN(lbuff), "%s%s",item_x1,ind[i].idx[1]); + snprintf(TAIL_LEN(lbuff), "%s",delim_1); break; case 3: - sprintf(TAIL(lbuff),"%s%s",item_x1,ind[i].idx[1]); - sprintf(TAIL(lbuff),"%s%s",item_x2,ind[i].idx[2]); - sprintf(TAIL(lbuff),"%s",delim_2); + snprintf(TAIL_LEN(lbuff),"%s%s",item_x1,ind[i].idx[1]); + snprintf(TAIL_LEN(lbuff),"%s%s",item_x2,ind[i].idx[2]); + snprintf(TAIL_LEN(lbuff),"%s",delim_2); break; default: @@ -201,41 +204,41 @@ switch (ind[i].words) { case 1: - sprintf(TAIL(lbuff),"%s%s%s",item_0,ind[i].idx[0],delim_0); + snprintf(TAIL_LEN(lbuff),"%s%s%s",item_0,ind[i].idx[0],delim_0); break; case 2: if (strcmp(ind[i-1].idx[0],ind[i].idx[0])!=0 || strcmp(ind[i-1].dic[0],ind[i].dic[0])!=0) { - sprintf(TAIL(lbuff),"%s%s%s",item_0,ind[i].idx[0],item_x1); + snprintf(TAIL_LEN(lbuff),"%s%s%s",item_0,ind[i].idx[0],item_x1); } else { if (ind[i-1].words==1) { - sprintf(TAIL(lbuff),"%s",item_01); + snprintf(TAIL_LEN(lbuff),"%s",item_01); } else { - sprintf(TAIL(lbuff),"%s",item_1); + snprintf(TAIL_LEN(lbuff),"%s",item_1); } } - sprintf(TAIL(lbuff),"%s",ind[i].idx[1]); - sprintf(TAIL(lbuff),"%s",delim_1); + snprintf(TAIL_LEN(lbuff),"%s",ind[i].idx[1]); + snprintf(TAIL_LEN(lbuff),"%s",delim_1); break; case 3: if (strcmp(ind[i-1].idx[0],ind[i].idx[0])!=0 || strcmp(ind[i-1].dic[0],ind[i].dic[0])!=0) { - sprintf(TAIL(lbuff),"%s%s",item_0,ind[i].idx[0]); - sprintf(TAIL(lbuff),"%s%s%s",item_x1,ind[i].idx[1],item_x2); + snprintf(TAIL_LEN(lbuff),"%s%s",item_0,ind[i].idx[0]); + snprintf(TAIL_LEN(lbuff),"%s%s%s",item_x1,ind[i].idx[1],item_x2); } else if (ind[i-1].words==1) { - sprintf(TAIL(lbuff),"%s%s%s",item_01,ind[i].idx[1],item_x2); + snprintf(TAIL_LEN(lbuff),"%s%s%s",item_01,ind[i].idx[1],item_x2); } else if (strcmp(ind[i-1].idx[1],ind[i].idx[1])!=0 || strcmp(ind[i-1].dic[1],ind[i].dic[1])!=0) { - if (ind[i-1].words==2) sprintf(TAIL(lbuff),"%s%s%s",item_1,ind[i].idx[1],item_12); - else sprintf(TAIL(lbuff),"%s%s%s",item_1,ind[i].idx[1],item_x2); + if (ind[i-1].words==2) snprintf(TAIL_LEN(lbuff),"%s%s%s",item_1,ind[i].idx[1],item_12); + else snprintf(TAIL_LEN(lbuff),"%s%s%s",item_1,ind[i].idx[1],item_x2); } else { - sprintf(TAIL(lbuff),"%s",item_2); + snprintf(TAIL_LEN(lbuff),"%s",item_2); } - sprintf(TAIL(lbuff),"%s%s",ind[i].idx[2],delim_2); + snprintf(TAIL_LEN(lbuff),"%s%s",ind[i].idx[2],delim_2); break; default: @@ -253,7 +256,7 @@ static void printpage(struct index *ind, FILE *fp, int num, char *lbuff) { int i,j,k,cc; - char buff[4096],tmpbuff[4096],errbuff[4096]; + char buff[BUFFERLEN],tmpbuff[BUFFERLEN],errbuff[BUFFERLEN]; buff[0]=tmpbuff[0]='\0'; @@ -272,25 +275,25 @@ || ind[num].p[j].enc[0]==range_close) ind[num].p[j].enc++; if (strlen(ind[num].p[j].enc)>0) { - sprintf(buff,"%s%s%s",encap_prefix,ind[num].p[j].enc,encap_infix); + snprintf(buff,"%s%s%s",encap_prefix,ind[num].p[j].enc,encap_infix); } if (strlen(suffix_3p)>0 && (pnumconv(ind[num].p[cc].page,ind[num].p[cc].attr[0])-pnumconv(ind[num].p[j].page,ind[num].p[j].attr[0]))==2) { - sprintf(TAIL(buff),"%s%s",ind[num].p[j].page,suffix_3p); + snprintf(TAIL_LEN(buff),"%s%s",ind[num].p[j].page,suffix_3p); } else if (strlen(suffix_mp)>0 && (pnumconv(ind[num].p[cc].page,ind[num].p[cc].attr[0])-pnumconv(ind[num].p[j].page,ind[num].p[j].attr[0]))>=2) { - sprintf(TAIL(buff),"%s%s",ind[num].p[j].page,suffix_mp); + snprintf(TAIL_LEN(buff),"%s%s",ind[num].p[j].page,suffix_mp); } else if (strlen(suffix_2p)>0 && (pnumconv(ind[num].p[cc].page,ind[num].p[cc].attr[0])-pnumconv(ind[num].p[j].page,ind[num].p[j].attr[0]))==1) { - sprintf(TAIL(buff),"%s%s",ind[num].p[j].page,suffix_2p); + snprintf(TAIL_LEN(buff),"%s%s",ind[num].p[j].page,suffix_2p); } else { - sprintf(TAIL(buff),"%s%s",ind[num].p[j].page,delim_r); - sprintf(TAIL(buff),"%s",ind[num].p[cc].page); + snprintf(TAIL_LEN(buff),"%s%s",ind[num].p[j].page,delim_r); + snprintf(TAIL_LEN(buff),"%s",ind[num].p[cc].page); } - sprintf(TAIL(tmpbuff),"%s",buff); + snprintf(TAIL_LEN(tmpbuff),"%s",buff); buff[0]='\0'; if (strlen(ind[num].p[j].enc)>0) { - sprintf(TAIL(tmpbuff),"%s",encap_suffix); + snprintf(TAIL_LEN(tmpbuff),"%s",encap_suffix); } linecheck(lbuff,tmpbuff); j=cc; @@ -298,53 +301,53 @@ goto PRINT; } else { - sprintf(TAIL(tmpbuff),"%s",delim_n); + snprintf(TAIL_LEN(tmpbuff),"%s",delim_n); linecheck(lbuff,tmpbuff); } } else if (strlen(ind[num].p[j].enc)>0) { /* normal encap */ if (ind[num].p[j].enc[0]==range_close) { - sprintf(errbuff,"Warning: Unmatched range closing operator \'%c\',",range_close); - for (i=0;i0) { - sprintf(TAIL(tmpbuff),"%s%s%s",encap_prefix,ind[num].p[j].enc,encap_infix); - sprintf(TAIL(tmpbuff),"%s%s%s",ind[num].p[j].page,encap_suffix,delim_n); + snprintf(TAIL_LEN(tmpbuff),"%s%s%s",encap_prefix,ind[num].p[j].enc,encap_infix); + snprintf(TAIL_LEN(tmpbuff),"%s%s%s",ind[num].p[j].page,encap_suffix,delim_n); linecheck(lbuff,tmpbuff); } else { - sprintf(TAIL(tmpbuff),"%s%s",ind[num].p[j].page,delim_n); + snprintf(TAIL_LEN(tmpbuff),"%s%s",ind[num].p[j].page,delim_n); linecheck(lbuff,tmpbuff); } } else { /* no encap */ - sprintf(TAIL(tmpbuff),"%s%s",ind[num].p[j].page,delim_n); + snprintf(TAIL_LEN(tmpbuff),"%s%s",ind[num].p[j].page,delim_n); linecheck(lbuff,tmpbuff); } } if (ind[num].p[j].enc[0]==range_open) { sprintf(errbuff,"Warning: Unmatched range opening operator \'%c\',",range_open); - for (k=0;k0) { - sprintf(TAIL(tmpbuff),"%s%s%s",encap_prefix,ind[num].p[j].enc,encap_infix); - sprintf(TAIL(tmpbuff),"%s%s",ind[num].p[j].page,encap_suffix); + snprintf(TAIL_LEN(tmpbuff),"%s%s%s",encap_prefix,ind[num].p[j].enc,encap_infix); + snprintf(TAIL_LEN(tmpbuff),"%s%s",ind[num].p[j].page,encap_suffix); } else { - sprintf(TAIL(tmpbuff),"%s",ind[num].p[j].page); + snprintf(TAIL_LEN(tmpbuff),"%s",ind[num].p[j].page); } linecheck(lbuff,tmpbuff); @@ -362,7 +365,7 @@ for (i=count;i0) { - sprintf(tmpbuff,"%s%s%s%s%s%s",encap_prefix,ind.p[j].enc,encap_infix,ind.p[j].page,encap_suffix,delim_n); + snprintf(tmpbuff, BUFFERLEN, "%s%s%s%s%s%s",encap_prefix,ind.p[j].enc,encap_infix,ind.p[j].page,encap_suffix,delim_n); linecheck(lbuff,tmpbuff); } } } if (j==ind.num+1) { sprintf(errbuff,"Warning: Unmatched range opening operator \'%c\',",range_open); - for (k=0;kline_max) { - sprintf(TAIL(lbuff),"\n%s%s",indent_space,tmpbuff); + snprintf(TAIL_LEN(lbuff),"\n%s%s",indent_space,tmpbuff); line_length=indent_length+strlen(tmpbuff); tmpbuff[0]='\0'; } else { - sprintf(TAIL(lbuff),"%s",tmpbuff); + snprintf(TAIL_LEN(lbuff),"%s",tmpbuff); line_length+=strlen(tmpbuff); tmpbuff[0]='\0'; } debian/patches/pmpost-20121106-tl120000664000000000000000000011136712213264212013542 0ustar --- texk/kpathsea/texmf.cnf | 1 texk/web2c/Makefile.am | 3 texk/web2c/ac/web2c.ac | 1 texk/web2c/configure.ac | 1 texk/web2c/pmplibdir/am/pmpost.am | 78 ++++++ texk/web2c/pmplibdir/jfm.ch | 110 ++++++++ texk/web2c/pmplibdir/jmp.ch | 283 +++++++++++++++++++++ texk/web2c/pmplibdir/jmppsw.ch | 76 +++++ texk/web2c/pmplibdir/pdvitomp.ch | 494 ++++++++++++++++++++++++++++++++++++++ texk/web2c/pmplibdir/pmpost.ch | 234 ++++++++++++++++++ 10 files changed, 1281 insertions(+) --- texlive-bin.orig/texk/kpathsea/texmf.cnf +++ texlive-bin/texk/kpathsea/texmf.cnf @@ -624,6 +624,7 @@ % Used by makempx to run TeX. We use "etex" because MetaPost is % expecting DVI, and not "tex" because we want first line parsing. TEX = etex +TEX.pmpost = eptex % These variables specify the external program called for the % interactive `e' option. %d is replaced by the line number and %s by --- texlive-bin.orig/texk/web2c/Makefile.am +++ texlive-bin/texk/web2c/Makefile.am @@ -177,6 +177,9 @@ ## MetaPost include $(srcdir)/mplibdir/am/mplib.am +## pMetaPost +include $(srcdir)/pmplibdir/am/pmpost.am + ## libmplib, used by MetaPost and luaTeX include $(srcdir)/mplibdir/am/libmplib.am --- texlive-bin.orig/texk/web2c/ac/web2c.ac +++ texlive-bin/texk/web2c/ac/web2c.ac @@ -41,6 +41,7 @@ [[pdftex], [yes], [yes], [pdfTeX], [xpdf libpng]], [[luatex], [yes], [], [luaTeX], [poppler cairo libpng zziplib]], [[mp], [yes], [], [MetaPost],[cairo libpng]], +[[pmp], [yes], [], [pMetaPost],[cairo libpng]], [[xetex], [yes], [yes], [XeTeX], [poppler libpng freetype2 icu teckit graphite2 harfbuzz]], ])[]dnl m4_foreach([Kpse_Prog], [kpse_tex_progs], --- texlive-bin.orig/texk/web2c/configure.ac +++ texlive-bin/texk/web2c/configure.ac @@ -202,6 +202,7 @@ [KPSE_MFWIN_DEFINE(Kpse_Win)])])[]dnl AM_CONDITIONAL([MP], [test "x$enable_mp" != xno]) +AM_CONDITIONAL([PMP], [test "x$enable_pmp" != xno]) AM_CONDITIONAL([WEB], [test "x$enable_web_progs" != xno]) --- /dev/null +++ texlive-bin/texk/web2c/pmplibdir/am/pmpost.am @@ -0,0 +1,78 @@ +## texk/web2c/pmplibdir/am/pmpost.am: Makefile fragment for MetaPost. +## +## Copyright (C) 2009-2011 Peter Breitenlohner +## You may freely use, modify and/or distribute this file. + +## pMetaPost +## +if PMP +bin_PROGRAMS += pmpost +bin_links += pmpost$(EXEEXT):pdvitomp +endif PMP +EXTRA_PROGRAMS += pmpost + +pmpost_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/pmplibdir -I$(srcdir)/mplibdir $(PTEXENC_INCLUDES) +pmpost_LDADD = $(KPATHSEA_LIBS) -lm $(PTEXENC_LIBS) + + +.PHONY: install-pmpost-links uninstall-pmpost-links + +# Creating one file: just one rule +pmp_ctangle = CWEBINPUTS=.:$(srcdir)/pmplibdir $(ctangle) +# Creating several files: need stamp file and two rules with identical recipes +pmp_ctangle_sh = CWEBINPUTS=.:$(srcdir)/pmplibdir $(SHELL) ./tangle-sh $@ $(CTANGLE) + +## pMetaPost C sources +pmpost_SOURCES = mplibdir/avl.h mplibdir/avl.c +nodist_pmpost_SOURCES = pmpost.c $(pmpxout_c_h) $(pmp_c_h) $(pmpmath_c_h) $(ppsout_c_h) $(psvgout_c_h) ptfmin.c +pmpxout_c_h = pmpxout.c pmpxout.h +pmp_c_h = pmp.c pmplib.h pmpmp.h +pmpmath_c_h = pmpmath.h pmpmath.c +ppsout_c_h = pmppsout.h ppsout.c pmplibps.h +psvgout_c_h = pmplibsvg.h pmpsvgout.h psvgout.c +pmp_sed = "s/mpxout\\.h/pmpxout.h/;s/mpmp\\.h/pmpmp.h/;s/mplib\\.h/pmplib.h/;s/mppsout\\.h/pmppsout.h/;s/mplibps\\.h/pmplibps.h/;s/mplibsvg\\.h/pmplibsvg.h/;s/mpsvgout\\.h/pmpsvgout.h/;s/mpmath\\.h/pmpmath.h/" + +ptfmin.c: ctangle$(EXEEXT) mplibdir/tfmin.w + cat $(srcdir)/mplibdir/tfmin.w | sed $(pmp_sed) > ptfmin.w + $(pmp_ctangle) ptfmin.w jfm.ch +pmpost.c: ctangle$(EXEEXT) mplibdir/mpost.w + cat $(srcdir)/mplibdir/mpost.w | sed $(pmp_sed) > pmpost.w + $(pmp_ctangle) pmpost.w pmpost.ch +$(pmp_c_h): pmp-tangle + @$(pmp_ctangle_sh) pmp.w jmp.ch +$(ppsout_c_h): ppsout-tangle + @$(pmp_ctangle_sh) ppsout.w jmppsw.ch +$(pmpxout_c_h): pmpxout-tangle + @$(pmp_ctangle_sh) pmpxout pdvitomp.ch +pmp-tangle: ctangle$(EXEEXT) mplibdir/mp.w tangle-sh + cat $(srcdir)/mplibdir/mp.w | sed $(pmp_sed) > pmp.w + @$(pmp_ctangle_sh) pmp.w jmp.ch +ppsout-tangle: ctangle$(EXEEXT) mplibdir/psout.w tangle-sh + cat $(srcdir)/mplibdir/psout.w | sed $(pmp_sed) > ppsout.w + @$(pmp_ctangle_sh) ppsout.w jmppsw.ch +pmpxout-tangle: ctangle$(EXEEXT) mplibdir/mpxout.w tangle-sh + cat $(srcdir)/mplibdir/mpxout.w | sed $(pmp_sed) > pmpxout.w + @$(pmp_ctangle_sh) pmpxout pdvitomp.ch + +$(psvgout_c_h): psvgout-tangle + @$(pmp_ctangle_sh) psvgout +psvgout-tangle: ctangle$(EXEEXT) mplibdir/svgout.w tangle-sh + cat $(srcdir)/mplibdir/svgout.w | sed $(pmp_sed) > psvgout.w + @$(pmp_ctangle_sh) psvgout +$(pmpmath_c_h): pmpmath-tangle + @$(pmp_ctangle_sh) pmpmath +pmpmath-tangle: ctangle$(EXEEXT) mplibdir/mpmath.w tangle-sh + cat $(srcdir)/mplibdir/mpmath.w | sed $(pmp_sed) > pmpmath.w + @$(pmp_ctangle_sh) pmpmath + + +## pMetaPost CWeb sources +pmpost_web = mplibdir/mpost.w mplibdir/mpxout.w +pmpost_web += mplibdir/mp.w mplibdir/psout.w mplibdir/svgout.w +pmpost_web += mplibdir/mpmath.w mplibdir/tfmin.w + + +$(pmpost_OBJECTS): $(nodist_pmpost_SOURCES) + +DISTCLEANFILES += $(nodist_pmpost_SOURCES) + --- /dev/null +++ texlive-bin/texk/web2c/pmplibdir/jfm.ch @@ -0,0 +1,110 @@ +@x +#include +@y +#ifdef WIN32 +#include +#endif +#include +@z + +% +% local variable "nt" && "ct" +@x + halfword lf,tfm_lh,bc,ec,nw,nh,nd; /* subfile size parameters */ +@y + halfword lf,tfm_lh,bc,ec,nw,nh,nd,nt; /* subfile size parameters */ +@z + +@x + int h_and_d; /* height and depth indices being unpacked */ +@y + int h_and_d; /* height and depth indices being unpacked */ + halfword ct; /* char and type */ + halfword id; /* JFM font id */ +@z + +@x +@ +@y +@; +@ +@z + +% +% routine to process JFM file format +@x +@= +tfget; read_two(lf); +@y +@d yoko_jfm_id 11 /* `yoko-kumi' fonts */ +@d tate_jfm_id 9 /* `tate-kumi' fonts */ +@d font_jfm_p(A) (mp->font_id[(A)]!=0) +@d incr(A) (A)=(A)+1 /* increase a variable by unity */ +@= +tfget; read_two(lf); +if ( (lf==yoko_jfm_id) || (lf==tate_jfm_id) ) { + id=lf; + tfget; read_two(nt); + tfget; read_two(lf); +} else { + id=0; nt=0; +}; +@z + +@x +whd_size=(size_t)((ec+1-bc)+nw+nh+nd); +@y +whd_size=(size_t)((ec+1-bc)+nt+nw+nh+nd); +@z + +% +% reserve space for character type table +@x +mp->char_base[n]=(int)(mp->next_fmem-(size_t)bc); +mp->width_base[n]=(int)(mp->next_fmem+(size_t)(ec-bc)+1); +@y +mp->font_id[n]=id; +mp->font_nt[n]=nt; +mp->ctype_base[n]=mp->next_fmem; +mp->char_base[n]=(int)(mp->next_fmem+nt-(size_t)bc); +mp->width_base[n]=(int)(mp->next_fmem+nt+(size_t)(ec-bc)+1); +@z + +% +% read character type table +% +@x +tf_ignore(4*(tfm_lh-2)) +@y +tf_ignore(4*(tfm_lh-2)) + +@ @= +ii=mp->ctype_base[n]+nt; +i=mp->ctype_base[n]; +while ( ifont_info[i].hh.LH=ct; + tfget; read_two(ct); + mp->font_info[i].hh.RH=ct; + incr(i); +} +@z + +@x +mp_pack_file_name(mp, mp->cur_name,mp->cur_area,mp->cur_ext); +mp->tfm_infile = (mp->open_file)(mp, mp->name_of_file, "r",mp_filetype_metrics); +@y +mp_pack_file_name(mp, mp->cur_name,mp->cur_area,mp->cur_ext); +#ifdef WIN32 +{ + char *fulln; + fulln = kpse_find_file(fname, kpse_tfm_format, 1); + mp->tfm_infile = (mp->open_file)(mp, fulln, "r",mp_filetype_metrics); + if(fulln) mp_xfree(fulln); +} +#else +mp->tfm_infile = (mp->open_file)(mp, mp->name_of_file, "r",mp_filetype_metrics); +#endif +@z --- /dev/null +++ texlive-bin/texk/web2c/pmplibdir/jmp.ch @@ -0,0 +1,283 @@ +% jMetaPost change file for MetaPost +% +% written by Michio Matsuyama +% Hideyuki Suzuki +% +% $Id: jmp.ch,v 1.42 2000/03/20 02:55:50 hideyuki Exp $ + +% +% change file of mp.w for pMetaPost (CWEB version) +% Akira Kakuto (translated the WEB version) +% +% rewrited for TeX Live 2011 +% Hironori Kitagawa + +@x +@d default_banner "This is MetaPost, Version 1.504" /* printed when \MP\ starts */ +@y +@d default_banner "This is pMetaPost, Version 1.504-0.04" /* printed when \MP\ starts */ +@z + +@x +#define metapost_version "1.504" +@y +#define metapost_version "1.504-0.04" +@z + +@x +# include /* for access */ +#endif +@y +# include /* for access */ +#endif +#include +#include +#include +@z + +@x +mp->buf_size = 200; +@y +mp->buf_size = atoi(kpse_var_value("buf_size")); +@z + +@x +static boolean mp_input_ln (MP mp, void *f) { + /* inputs the next line or returns |false| */ + char *s; + size_t size = 0; + mp->last = mp->first; /* cf.\ Matthew 19\thinspace:\thinspace30 */ + s = (mp->read_ascii_file) (mp, f, &size); + if (s == NULL) + return false; + if (size > 0) { + mp->last = mp->first + size; + if (mp->last >= mp->max_buf_stack) { + mp->max_buf_stack = mp->last + 1; + while (mp->max_buf_stack > mp->buf_size) { + mp_reallocate_buffer (mp, (mp->buf_size + (mp->buf_size >> 2))); + } + } + (void) memcpy ((mp->buffer + mp->first), s, size); + } + free (s); + return true; +} +@y +static boolean mp_input_ln (MP mp, void *f ) { + int i = EOF; + mp->last = input_line2((FILE *)f, mp->buffer, mp->first, mp->buf_size, &i); + if (i == EOF && errno != EINTR && mp->last == mp->first) + return false; + if (i != EOF && i != '\n' && i != '\r') { + fprintf (stderr, "! Unable to read an entire line---bufsize=%u.\n", + (unsigned) mp->buf_size); + fputs ("Please increase buf_size in texmf.cnf.\n", stderr); + exit (1); + } + if (i == '\r') { + while ((i = fgetc (f)) == EOF && errno == EINTR) + ; + if (i != '\n') + ungetc (i, f); + } + return true; +} +@z + +@x +wterm (mp->banner); +@y +wterm (mp->banner); +wterm(" ("); +wterm((char *)getencstring()); +wterm(")"); +@z + +@x +} four_quarters; +typedef union { + integer sc; + four_quarters qqqq; +} font_data; +@y +} four_quarters; +typedef struct { + halfword RH, LH; +} two_halves; +typedef union { + two_halves hh; + integer sc; + four_quarters qqqq; +} font_data; +@z + +% +% tategaki support +% +% Suppose h==(0,height), d==(0,-depth) && w==(width,0) in horizontal string, +% && h==(height,0), d==(-depth,0) && w==(0,-width) in vertical string. +% Four vertices of the bounding box is h, d, h+w && d+w && those of the +% transformed boundig box is Th, Td, T(h+w) && T(d+w), so that the values +% of Th, Td && Tw are compared here. + +@x +@ The height width and depth information stored in a text node determines a +rectangle that needs to be transformed according to the transformation +parameters stored in the text node. + +@= +case mp_text_node_type: +x1 = mp_take_scaled (mp, txx_val (p), width_val (p)); +y0 = mp_take_scaled (mp, txy_val (p), -depth_val (p)); +y1 = mp_take_scaled (mp, txy_val (p), height_val (p)); +@y +@ The height width and depth information stored in a text node determines a +rectangle that needs to be transformed according to the transformation +parameters stored in the text node. + +Boundig box depends on JFM font ID. + +@d yoko_jfm_id 11 /* `yoko-kumi' fonts */ +@d tate_jfm_id 9 /* `tate-kumi' fonts */ +@d font_jfm_p(A) (mp->font_id[(A)]!=0) + +@= +case mp_text_node_type: + if ( mp->font_id[mp_font_n(p)]!=tate_jfm_id ) { + x1 = mp_take_scaled(mp, txx_val(p), width_val(p)); + y0 = mp_take_scaled(mp, txy_val(p), -depth_val(p)); + y1 = mp_take_scaled(mp, txy_val(p), height_val(p)); + } else { + x1 = mp_take_scaled(mp, txy_val(p), -width_val(p)); + y0 = mp_take_scaled(mp, txx_val(p), -depth_val(p)); + y1 = mp_take_scaled(mp, txx_val(p), height_val(p)); + }; +@z + +@x +x1 = mp_take_scaled (mp, tyx_val (p), width_val (p)); +y0 = mp_take_scaled (mp, tyy_val (p), -depth_val (p)); +y1 = mp_take_scaled (mp, tyy_val (p), height_val (p)); +@y +if ( mp->font_id[mp_font_n(p)]!=tate_jfm_id ) { + x1 = mp_take_scaled(mp, tyx_val(p), width_val(p)); + y0 = mp_take_scaled(mp, tyy_val(p), -depth_val(p)); + y1 = mp_take_scaled(mp, tyy_val(p),height_val(p)); +} else { + x1 = mp_take_scaled(mp, tyy_val(p), -width_val(p)); + y0 = mp_take_scaled(mp, tyx_val(p), -depth_val(p)); + y1 = mp_take_scaled(mp, tyx_val(p), height_val(p)); +}; +@z + +@x + wlog (mp->banner); +@y + wlog (mp->banner); + wlog (" ("); + wlog ((char *)(getencstring())); + wlog (")"); +@z + +% +% char type pointers +@x +eight_bits *font_bc; +eight_bits *font_ec; /* first and last character code */ +@y +eight_bits *font_bc; +eight_bits *font_ec; /* first and last character code */ +halfword *font_nt; +halfword *font_id; +@z + +@x +int *char_base; /* base address for |char_info| */ +@y +int *char_base; /* base address for |char_info| */ +int *ctype_base; +@z + +@x +xfree (mp->char_base); +@y +xfree (mp->font_id); +xfree (mp->font_nt); +xfree (mp->char_base); +xfree (mp->ctype_base); +@z + +@x + XREALLOC (mp->char_base, l, int); +@y + XREALLOC (mp->font_id, l, halfword); + XREALLOC (mp->font_nt, l, halfword); + XREALLOC (mp->char_base, l, int); + XREALLOC (mp->ctype_base, l, int); +@z + + +@x +mp->char_base[null_font] = 0; +@y +mp->font_id[null_font] = 0; +mp->font_nt[null_font] = 0; +mp->char_base[null_font] = 0; +mp->ctype_base[null_font] = 0; +@z + +@x +@d char_mp_info(A,B) mp->font_info[mp->char_base[(A)]+(B)].qqqq +@y +@d char_mp_info(A,B) mp->font_info[mp->char_base[(A)]+(B)].qqqq +@d ctype_char_end(A) (A)].hh.LH +@d ctype_char(A) mp->font_info[mp->ctype_base[(A)]+ctype_char_end +@d ctype_type_end(A) (A)].hh.RH +@d ctype_type(A) mp->font_info[mp->ctype_base[(A)]+ctype_type_end +@z + +% +% lookup character type table +@x +void mp_set_text_box (MP mp, mp_node p) { +@y +@; +void mp_set_text_box (MP mp, mp_node p) { +@z + +@x + if ((*(mp_text_p (p)->str + k) < bc) || (*(mp_text_p (p)->str + k) > ec)) { + mp_lost_warning (mp, f, *(mp_text_p (p)->str + k)); + } else { + cc = char_mp_info (f, *(mp_text_p (p)->str + k)); +@y + if ( ((*(mp_text_p (p)->str + k) < bc) || (*(mp_text_p (p)->str + k) > ec)) && (mp->font_id[f]==0) ) { + mp_lost_warning (mp, f, *(mp_text_p (p)->str + k)); + } else { if (mp->font_id[f]==0) { + cc = char_mp_info (f, *(mp_text_p (p)->str + k)); + } else { + cc=char_mp_info(f,mp_lookup_ctype(mp, f,fromBUFF(mp_text_p(p)->str,limit,k))); + k++; } +@z + +@x +@* Debugging. +@y +@ @= +int mp_lookup_ctype (MP mp,font_number f, integer c) +{ + int l, u, r, ch; + l=0; u=mp->font_nt[f]-1; + while ( l +% + +@x +#include "pmppsout.h" /* internal header */ +#include "pmpmath.h" /* internal header */ +@y +#include "pmppsout.h" /* internal header */ +#include "pmpmath.h" /* internal header */ +#include +@z + +% Treat all Kanji fonts as used +@x + if ( mp->font_info[p].qqqq.b3==mp_used ) +@y + if ( mp->font_info[p].qqqq.b3==mp_used || mp->font_id[f]!=0) +@z + +% +% Kanji string output +@x +static void mp_print_initial_comment(MP mp,mp_edge_object *hh, int prologues); +@y +static void mp_print_initial_comment(MP mp,mp_edge_object *hh, int prologues); +void mp_ps_kanji_string_out (MP mp, string s); + +#define Hi(x) (((x) >> 8) & 0xff) +#define Lo(x) ((x) & 0xff) + +@ @c +void mp_ps_kanji_string_out (MP mp, string s) +{ +int i, len; +int c; + +len = strlen(s); +i=0; +mp_ps_print(mp, "<"); +while (ips->ps_offset+5>mp->max_print_line ) mp_ps_print_ln(mp); + c=toDVI(fromBUFF(s, i+2, i)); + i=i+2; + mp_hex_digit_out(mp, Hi(c) / 16); + mp_hex_digit_out(mp, Hi(c) % 16); + mp_hex_digit_out(mp, Lo(c) / 16); + mp_hex_digit_out(mp, Lo(c) % 16); + }; +mp_ps_print(mp, ">"); +}; +@z + +@x + mp_ps_print_nl(mp, "%%Creator: MetaPost "); +@y + mp_ps_print_nl(mp, "%%Creator: MetaPost (Japanese version) "); +@z + +% +% Call Kanji string output routine if the font is JFM. +@x + mp_ps_string_out(mp, gr_text_p(p),gr_text_l(p)); + mp_ps_name_out(mp, mp->font_name[gr_font_n(p)],false); +@y + if (mp->font_id[gr_font_n(p)]!=0) + mp_ps_kanji_string_out(mp, gr_text_p(p)); + else + mp_ps_string_out(mp, gr_text_p(p),gr_text_l(p)); + mp_ps_name_out(mp, mp->font_name[gr_font_n(p)],false); +@z --- /dev/null +++ texlive-bin/texk/web2c/pmplibdir/pdvitomp.ch @@ -0,0 +1,494 @@ +@x +#include "pmpxout.h" +@h +@y +#include "pmpxout.h" +#include +@h +@z + +@x +@d max_widths (256*max_fonts) /* maximum number of different characters among all fonts */ +@y +@d max_widths 512000 /* maximum number of different characters among all fonts */ +@z + +@x +@d undefined_commands 250: case 251: case 252: case 253: case 254: case 255 +@y +@d dir 255 /* p\TeX\ direction */ +@d undefined_commands 250: case 251: case 252: case 253: case 254 +@z + +@x +mpx_read_tfm_word(mpx); lh=mpx->b2*(int)(256)+mpx->b3; +@y +mpx_read_tfm_word(mpx); +@;@/ +lh=mpx->b2*(int)(256)+mpx->b3; +@z + +@x + if ( mpx->b0<128 ) + mpx->tfm_check_sum=((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3; + else + mpx->tfm_check_sum=(((mpx->b0-256)*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3; + } + if ( k==5 ) { + if (mpx->mode == mpx_troff_mode) { + mpx->font_design_size[f]=(((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3)/(65536.0*16); + } + } +} +@y + if ( mpx->b0<128 ) + mpx->tfm_check_sum=((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3; + else + mpx->tfm_check_sum=(((mpx->b0-256)*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3; + } + if ( k==5 ) { + if (mpx->mode == mpx_troff_mode) { + mpx->font_design_size[f]=(((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3)/(65536.0*16); + } + } +} +@; +@z + +@x +@= +floor(mpx->dvi_scale*mpx->font_scaled_size[f]*char_width(f,c)) + +@ @= +floor(mpx->dvi_scale*mpx->font_scaled_size[cur_font]*char_width(cur_font,p)) +@y +@ @c @@; /* p\TeX */ +integer mpx_scaled_char_width (MPX mpx,integer f,integer c) +{ + if (mpx->font_id[f]!=0) c=mpx_lookup_ctype(mpx, f,c); + return floor(mpx->dvi_scale*mpx->font_scaled_size[f]*char_width(f,c)); +} +@z + +@x +@ @c @@; +static void mpx_do_set_char (MPX mpx,web_integer f, web_integer c) { + if ( (cfont_bc[f])||(c>mpx->font_ec[f]) ) + mpx_abort(mpx,"attempt to typeset invalid character %d",c); +@.attempt to typeset...@> +@y +@ PDVItoMP: |do_set_char| is called with non-virtual font. +In the case of non-virtual Kanji font, the width is looked up +with the character type, and the character is printed by the +function |set_kanji_char|. + +When the width written in the virtual font is same as +the width of the substituted font, the next character can be +written in the same string in output mpx file. +In other words, the width of the character is calculated +in |do_dvi_commands|. So even if the width is wrong here, the output PostScript file is not affected. + +@ @c @@; +void mpx_do_set_char (MPX mpx,integer f,integer c) +{ +integer kkk; + +if (mpx->font_id[f]!=0) { + kkk=mpx_lookup_ctype(mpx, f,c); + if ( (kkkfont_bc[f]) || (kkk>mpx->font_ec[f]) ) + mpx_abort(mpx,"attempt to typeset invalid character (JFM) %d",c); +} else if ( (cfont_bc[f])||(c>mpx->font_ec[f]) ) { + mpx_abort(mpx,"attempt to typeset invalid character %d",c); +} +@.attempt to typeset...@> +@z + +@x + if ((mpx->h!=mpx->str_h2)||(mpx->v!=mpx->str_v)|| + (f!=mpx->str_f)||(mpx->dvi_scale!=mpx->str_scale) ) { +@y + if ((mpx->h!=mpx->str_h2)||(mpx->v!=mpx->str_v2)|| + (f!=mpx->str_f)||(mpx->dvi_scale!=mpx->str_scale) ) { +@z + +@x + fprintf(mpx->mpxfile,"_s("); mpx->print_col=3;@/ + mpx->str_scale=mpx->dvi_scale; mpx->str_f=f; + mpx->str_v=mpx->v; mpx->str_h1=mpx->h; +@y + if ((mpx->d==0) || (mpx->font_id[f]==9)) { + fprintf(mpx->mpxfile,"_s("); mpx->print_col=3;}@/ + else { + fprintf(mpx->mpxfile,"_sr("); mpx->print_col=4;}@/ + mpx->str_scale=mpx->dvi_scale; mpx->str_f=f; + mpx->str_v1=mpx->v; mpx->str_h1=mpx->h; +@z + +@x + mpx_print_char(mpx, (unsigned char)c); + mpx->str_h2=(web_integer)(mpx->h+@); +@y + if (mpx->font_id[f]!=0) + mpx_print_kanji_char(mpx, c); + else + mpx_print_char(mpx, c); + if (mpx->d==0) { + mpx->str_h2=mpx->h+mpx_scaled_char_width(mpx, f, c); + mpx->str_v2=mpx->v; + } else { + mpx->str_h2=mpx->h; + mpx->str_v2=mpx->v+mpx_scaled_char_width(mpx, f, c); + } +@z + +@x +web_integer str_h1; +web_integer str_v; /* starting position for current output string */ +web_integer str_h2; /* where the current output string ends */ +@y +integer str_h1; +integer str_v1; /* starting position for current output string */ +integer str_h2; +integer str_v2; /* where the current output string ends */ +@z + +@x + fprintf(mpx->mpxfile,"vardef _s(expr _t,_f,_m,_x,_y)(text _c)=\n"); + fprintf(mpx->mpxfile, + " addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef;\n"); +@y + fprintf(mpx->mpxfile,"vardef _s(expr _t,_f,_m,_x,_y)(text _c)=\n"); + fprintf(mpx->mpxfile, + " addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef;\n"); + fprintf(mpx->mpxfile,"vardef _sr(expr _t,_f,_m,_x,_y)=\n"); + fprintf(mpx->mpxfile," addto _p also _t infont _f rotated -90"); + fprintf(mpx->mpxfile," scaled _m shifted (_x,_y); enddef;\n"); +@z + +@x + x=mpx->conv*mpx->str_h1; + y=mpx->conv*(-mpx->str_v); +@y + x=mpx->conv*mpx->str_h1; + y=mpx->conv*(-mpx->str_v1); +@z + +@x +@= +{ + mpx->pic_wd=mpx->h; mpx->pic_dp=mpx->v; mpx->pic_ht=ht-mpx->v; +} +@y +@= +{ if (mpx->d==0) { + mpx->pic_wd=mpx->h; mpx->pic_dp=mpx->v; mpx->pic_ht=ht-mpx->v; + } else { + mpx->pic_wd=mpx->v; mpx->pic_dp=-mpx->h; mpx->pic_ht=ht+mpx->h; + } +} +@z + +@x + mpx->str_v=0; + mpx->str_h2=0; + mpx->str_scale=1.0; /* values don't matter */ +@y + mpx->str_h2=0; + mpx->str_v2=0; + mpx->str_scale=1.0; /* values don't matter */ +@z + +@x +dd=-mpx->pic_dp*mpx->conv; +w=mpx->conv*mpx->pic_wd; +h=mpx->conv*mpx->pic_ht; +fprintf(mpx->mpxfile, + "setbounds _p to (0,%1.4f)--(%1.4f,%1.4f)--\n" + " (%1.4f,%1.4f)--(0,%1.4f)--cycle;\n",dd,w,dd,w,h,h) +@y +if (mpx->d==0) { + dd=-mpx->pic_dp*mpx->conv; + w=mpx->conv*mpx->pic_wd; + h=mpx->conv*mpx->pic_ht; + fprintf(mpx->mpxfile, + "setbounds _p to (0,%1.4f)--(%1.4f,%1.4f)--\n",dd,w,dd); + fprintf(mpx->mpxfile, + " (%1.4f,%1.4f)--(0,%1.4f)--cycle;\n",w,h,h); +} else { + dd=-mpx->pic_dp*mpx->conv; + w=-mpx->pic_wd*mpx->conv; + h=mpx->conv*mpx->pic_ht; + fprintf(mpx->mpxfile, + "setbounds _p to (%1.4f,0)--(%1.4f,%1.4f)--\n",h,h,w); + fprintf(mpx->mpxfile, + " (%1.4f,%1.4f)--(%1.4f,0)--cycle;\n", dd,w,dd); +} +@z + +@x +web_integer w;web_integer x;web_integer y;web_integer z; + /* current state values (|h| and |v| have already been declared) */ +web_integer hstack[(stack_size+1)]; +web_integer vstack[(stack_size+1)]; +web_integer wstack[(stack_size+1)]; +web_integer xstack[(stack_size+1)]; +web_integer ystack[(stack_size+1)]; +web_integer zstack[(stack_size+1)]; /* pushed down values in \.{DVI} units */ +@y +integer w;integer x;integer y;integer z;integer d; + /* current state values (|h| and |v| have already been declared) */ +integer hstack[(stack_size+1)]; +integer vstack[(stack_size+1)]; +integer wstack[(stack_size+1)]; +integer xstack[(stack_size+1)]; +integer ystack[(stack_size+1)]; +integer zstack[(stack_size+1)]; +integer dstack[(stack_size+1)]; /* pushed down values in \.{DVI} units */ +@z + +@x +mpx->h=0; mpx->v=0; +@y +mpx->h=0; mpx->v=0; mpx->d=0; +@z + +@x + mpx->hstack[mpx->stk_siz]=mpx->h; + mpx->vstack[mpx->stk_siz]=mpx->v; mpx->wstack[mpx->stk_siz]=mpx->w; + mpx->xstack[mpx->stk_siz]=mpx->x; + mpx->ystack[mpx->stk_siz]=mpx->y; mpx->zstack[mpx->stk_siz]=mpx->z; +@y + mpx->hstack[mpx->stk_siz]=mpx->h; + mpx->vstack[mpx->stk_siz]=mpx->v; mpx->wstack[mpx->stk_siz]=mpx->w; + mpx->xstack[mpx->stk_siz]=mpx->x; + mpx->ystack[mpx->stk_siz]=mpx->y; mpx->zstack[mpx->stk_siz]=mpx->z; + mpx->dstack[mpx->stk_siz]=mpx->d; +@z + +@x + mpx->h=mpx->hstack[mpx->stk_siz]; + mpx->v=mpx->vstack[mpx->stk_siz]; mpx->w=mpx->wstack[mpx->stk_siz]; + mpx->x=mpx->xstack[mpx->stk_siz]; + mpx->y=mpx->ystack[mpx->stk_siz]; mpx->z=mpx->zstack[mpx->stk_siz]; +@y + mpx->h=mpx->hstack[mpx->stk_siz]; + mpx->v=mpx->vstack[mpx->stk_siz]; mpx->w=mpx->wstack[mpx->stk_siz]; + mpx->x=mpx->xstack[mpx->stk_siz]; + mpx->y=mpx->ystack[mpx->stk_siz]; mpx->z=mpx->zstack[mpx->stk_siz]; + mpx->d=mpx->dstack[mpx->stk_siz]; +@z + +@x + case z0: return mpx->z; break; +@y + case z0: return mpx->z; break; + case dir: return mpx_get_byte(mpx); break; +@z + +@x + mpx->h += @; +@y + if (mpx->d==0) { + mpx->h+=mpx_scaled_char_width(mpx, cur_font, p); + } else { + mpx->v+=mpx_scaled_char_width(mpx, cur_font, p); + } +@z + +@x + mpx->h += q; +@y + if (mpx->d==0) { + mpx->h += q; + } else { + mpx->v += q; + } +@z + +@x +case pop: + mpx_do_pop(mpx); + break; +@y +case pop: + mpx_do_pop(mpx); + break; +case dir: + mpx->d=p; + break; +@z + +@x +case four_cases(right1): + mpx->h += trunc(p*mpx->dvi_scale); + break; +case w0: case four_cases(w1): + mpx->w = (web_integer)trunc(p*mpx->dvi_scale); mpx->h += mpx->w; + break; +case x0: case four_cases(x1): + mpx->x = (web_integer)trunc(p*mpx->dvi_scale); mpx->h += mpx->x; + break; +case four_cases(down1): + mpx->v += trunc(p*mpx->dvi_scale); + break; +case y0: case four_cases(y1): + mpx->y = (web_integer)trunc(p*mpx->dvi_scale); mpx->v += mpx->y; + break; +case z0: case four_cases(z1): + mpx->z = (web_integer)trunc(p*mpx->dvi_scale); mpx->v += mpx->z; + break; +@y +case four_cases(right1): + if (mpx->d==0) { + mpx->h+=trunc(p*mpx->dvi_scale); + } else { + mpx->v+=trunc(p*mpx->dvi_scale); + } + break; +case w0: case four_cases(w1): + if (mpx->d==0) { + mpx->h+=mpx->w; + } else { + mpx->v+=mpx->w; + } + break; +case x0: case four_cases(x1): + if (mpx->d==0) { + mpx->h+=mpx->x; + } else { + mpx->v+=mpx->x; + } + break; +case four_cases(down1): + if (mpx->d==0) { + mpx->v+=trunc(p*mpx->dvi_scale); + } else { + mpx->h-=trunc(p*mpx->dvi_scale); + } + break; +case y0: case four_cases(y1): + if (mpx->d==0) { + mpx->v+=mpx->y; + } else { + mpx->h-=mpx->y; + } + break; +case z0: case four_cases(z1): + if (mpx->d==0) { + mpx->v+=mpx->z; + } else { + mpx->h-=mpx->z; + } + break; +@z + +@x +@= +if (mpx_newer(mpxopt->mpname, mpxopt->mpxname)) + return 0 +@y +@= +if (mpx_newer(mpxopt->mpname, mpxopt->mpxname)) + return 0 + +@ ASCII p\TeX JFM ID +@d yoko_jfm_id 11 /* for `yoko-kumi' fonts */ +@d tate_jfm_id 9 /* for `tate-kumi' fonts */ +@d font_jfm_p(A) (mpx->font_id[(A)]!=0) + +@ @= +integer font_nt[max_fonts+1]; /* number of words in ctype table */ +integer font_id[max_fonts+1]; +integer jfm_char_code[max_widths+1]; +integer jfm_char_type[max_widths+1]; +integer jfm_char_index[max_fonts+1]; +integer next_jfm_char_index; + +@ @= +mpx->font_nt[0]=0; +mpx->font_id[0]=0; +mpx->jfm_char_type[0]=0; +mpx->next_jfm_char_index=0; + +@ JFM character type table is stored in the array |jfm_char_code| and +|jfm_char_type|. The character code and the character type of $i$-th +record is stored in |jfm_char_code[i]| and |jfm_char_type[i]|, respectively. +The table is in the order of character code. + +@= +mpx->font_id[f]=mpx->b0*(int)(256)+mpx->b1; +if ((mpx->font_id[f]==yoko_jfm_id) || (mpx->font_id[f]==tate_jfm_id)) { + mpx->font_nt[f]=mpx->b2*(int)(256)+mpx->b3; + mpx_read_tfm_word(mpx); +} else { + mpx->font_id[f]=0; + mpx->font_nt[f]=0; +} + +@ @= +mpx->jfm_char_index[f]=mpx->next_jfm_char_index; +k=mpx->jfm_char_index[f]; +mpx->next_jfm_char_index+=mpx->font_nt[f]; +while (knext_jfm_char_index) { + mpx_read_tfm_word(mpx); + mpx->jfm_char_code[k]=mpx->b0*(int)(256)+mpx->b1; + mpx->jfm_char_type[k]=mpx->b2*(int)(256)+mpx->b3; + k++; +} + +@ JFM character type table is looked up by binary search. + +@= +integer mpx_lookup_ctype (MPX mpx,integer f, integer c) +{ + integer l, u, r, ch; + l=0; u=mpx->font_nt[f]-1; + while (ljfm_char_code[mpx->jfm_char_index[f]+r]; + if (ch==c) { + return mpx->jfm_char_type[mpx->jfm_char_index[f]+r]; + } + if (ch> 8) & 0xff) +@d Lo(x) ( (x) & 0xff) + +@= +void mpx_print_kanji_char (MPX mpx,integer c) +{ + if (mpx->print_col+2>line_length-2 ) { + if (mpx->state==normal) { + fprintf(mpx->mpxfile, "\""); + mpx->state=special; + } + fprintf(mpx->mpxfile, " \n"); + mpx->print_col=0; + } + if (mpx->state==special) { + fprintf(mpx->mpxfile,"&"); + mpx->print_col++; + } + if (mpx->state!=normal) { + fprintf(mpx->mpxfile, "\""); + mpx->print_col++; + mpx->state=normal; + } + c=toBUFF(fromDVI(c)); + putc2(Hi(c), mpx->mpxfile); + mpx->print_col++; + putc2(Lo(c), mpx->mpxfile); + mpx->print_col++; +} +@z --- /dev/null +++ texlive-bin/texk/web2c/pmplibdir/pmpost.ch @@ -0,0 +1,234 @@ +@x +#include +@y +#include +#include +char kanjioption[16]; +@z + +@x +@d TEX "tex" +@y +@d TEX "ptex" +@z + +@x +#define MPXCOMMAND "makempx" +@y +#define MPXCOMMAND "pmakempx" +@z + +@x + if (cnf_cmd!=NULL && (strcmp (cnf_cmd, "1")!=0)) { + if (mp_troff_mode(mp)!=0) + cmd = concatn (cnf_cmd, " -troff ", + qmpname, " ", qmpxname, NULL); + else if (mpost_tex_program!=NULL && *mpost_tex_program != '\0') + cmd = concatn (cnf_cmd, " -tex=", mpost_tex_program, " ", + qmpname, " ", qmpxname, NULL); +@y + if (cnf_cmd!=NULL && (strcmp (cnf_cmd, "1")!=0)) { + if (kanjioption[0]) + cnf_cmd = concatn (cnf_cmd, " --kanji=", kanjioption, NULL); + if (mp_troff_mode(mp)!=0) + cmd = concatn (cnf_cmd, " -troff ", + qmpname, " ", qmpxname, NULL); + else if (mpost_tex_program!=NULL && *mpost_tex_program != '\0') + cmd = concatn (cnf_cmd, " -tex=", mpost_tex_program, " ", + qmpname, " ", qmpxname, NULL); +@z + +@x + mpxopt = mpost_xmalloc(sizeof(mpx_options)); + if (mpost_tex_program != NULL && *mpost_tex_program != '\0') { +@y + mpxopt = mpost_xmalloc(sizeof(mpx_options)); + if (mpost_tex_program != NULL && *mpost_tex_program != '\0') { + if (kanjioption[0]) { + maincmd = (char *)mpost_xmalloc (strlen(mpost_tex_program) + + strlen(kanjioption) + 15); + strcpy(maincmd, mpost_tex_program); + strcat(maincmd, " --kanji="); + strcat(maincmd, kanjioption); + } else +@z + +@x + if (s==NULL) s = mpost_xstrdup (TEX); +@y + if (s==NULL) s = mpost_xstrdup (TEX); + if (kanjioption[0]) + maincmd = (char *)mpost_xmalloc (strlen(s)+strlen(default_args)+ + strlen(kanjioption)+13); + else +@z + +@x + strcat(maincmd,default_args); +@y + if (kanjioption[0]) { + strcat(maincmd, " --kanji="); + strcat(maincmd, kanjioption); + } + strcat(maincmd,default_args); +@z + +@x + const char *banner = "% Written by metapost version "; +@y + const char *banner = "% Written by pmetapost version "; +@z + +@x + const char *banner = "% Written by dvitomp version "; +@y + const char *banner = "% Written by pdvitomp version "; +@z + +@x + { "kpathsea-debug", 1, 0, 0 }, +@y + { "kpathsea-debug", 1, 0, 0 }, + { "kanji", 1, 0, 0 }, +@z + +@x + if (user_progname == NULL) + user_progname = optarg; + } +@y + if (user_progname == NULL) + user_progname = optarg; + } + } else if (ARGUMENT_IS ("kanji")) { + strcpy(kanjioption, optarg); + if(!set_enc_string(optarg, optarg)) { + fprintf(stderr,"Ignoring unknown argument `%s' to --kanji", optarg); + } +@z + +@x + { "no-kpathsea", 0, &nokpse, 1 }, +@y + { "no-kpathsea", 0, &nokpse, 1 }, + { "kanji", 1, 0, 0 }, +@z + +@x + user_progname = optarg; +@y + user_progname = optarg; + } else if (option_is ("kanji")) { + strcpy (kanjioption, optarg); + if(!set_enc_string(optarg, optarg)) { + fprintf(stderr,"Ignoring unknown argument `%s' to --kanji", optarg); + } +@z + +@x +if (dvitomp_only) + fprintf(stdout, "This is dvitomp %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "This is MetaPost %s" WEB2CVERSION "\n", s); +@y +if (dvitomp_only) + fprintf(stdout, "This is pdvitomp %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "This is pMetaPost %s" WEB2CVERSION "\n", s); +@z + +@x +"Usage: mpost [OPTION] [&MEMNAME] [MPNAME[.mp]] [COMMANDS]\n" +" mpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +@y +"Usage: pmetapost [OPTION] [&MEMNAME] [MPNAME[.mp]] [COMMANDS]\n" +" pmetapost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +@z + +@x +" Run MetaPost on MPNAME, usually creating MPNAME.NNN (and perhaps\n" +@y +" Run pMetaPost on MPNAME, usually creating MPNAME.NNN (and perhaps\n" +@z + +@x +" With a --dvitomp argument, MetaPost acts as DVI-to-MPX converter only.\n" +" Call MetaPost with --dvitomp --help for option explanations.\n\n"); +@y +" With a --dvitomp argument, pMetaPost acts as DVI-to-MPX converter only.\n" +" Call pMetaPost with --dvitomp --help for option explanations.\n\n"); +@z + +@x +" -jobname=STRING set the job name to STRING\n" +@y +" -jobname=STRING set the job name to STRING\n" +" -kanji=STRING set the Japanese encoding to STRING\n" +@z + +@x +if (dvitomp_only) + fprintf(stdout, "This is dvitomp %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "This is MetaPost %s" WEB2CVERSION "\n", s); +@y +if (dvitomp_only) + fprintf(stdout, "This is pdvitomp %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "This is pMetaPost %s" WEB2CVERSION "\n", s); +@z + +@x +"Usage: dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +" mpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +@y +"Usage: pdvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +" pmetapost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +@z + +@x +" -progname=STRING set program name to STRING\n" +@y +" -progname=STRING set program name to STRING\n" +" -kanji=STRING set kanji encoding (sjis, jis, euc, utf8)\n" +@z + +@x +if (dvitomp_only) + fprintf(stdout, "dvitomp (MetaPost) %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "MetaPost %s" WEB2CVERSION "\n", s); +@y +if (dvitomp_only) + fprintf(stdout, "pdvitomp (pMetaPost) %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "pMetaPost %s" WEB2CVERSION "\n", s); +@z + +@x +"Author of the CWEB MetaPost: Taco Hoekwater.\n" +@y +"Author of the CWEB MetaPost: Taco Hoekwater.\n" +"Authors of pMetaPost: Michio Matsuyama, Hideyuki Suzuki.\n" +@z + +@x + const char * banner = "This is MetaPost, version "; +@y + const char * banner = "This is pMetaPost, version "; +@z + +@x + if (!strcmp(base, "dvitomp") || !strcasecmp(base, "dvitomp.exe")) +@y + kanjioption[0] = '\0'; + enable_UPTEX (false); + set_enc_string(NULL, "default"); + if (!strcmp(base, "pdvitomp") || !strcasecmp(base, "pdvitomp.exe")) +@z + +@x + if(putenv(xstrdup("engine=metapost"))) +@y + if(putenv(xstrdup("engine=pmetapost"))) +@z debian/patches/series0000664000000000000000000000055112213264212012030 0ustar 23_use_xdvi.bin debian-builtin-searchpath debian-no-linked-scripts 60_unneeded_linking 61_path_max.diff disable-t1lib-gd-dvipng-freetype pmpost-mp1.803-20130726 fix-manpages mendex-bugfix mendex-snprintf upstream-svn31126-luatex upstream-svn31303-dvipdfmx upstream-svn31313-pdftex-luatex upstream-svn31547-dvips upstream-svn31350-dvips upstream-svn31358-luatex debian/patches/upstream-svn31313-pdftex-luatex0000664000000000000000000000600212213264212016362 0ustar --- texk/web2c/luatexdir/ChangeLog | 5 +++++ texk/web2c/luatexdir/font/writettf.w | 7 +++---- texk/web2c/pdftexdir/ChangeLog | 5 +++++ texk/web2c/pdftexdir/ttf2afm.c | 6 +++--- texk/web2c/pdftexdir/writettf.c | 7 +++---- 5 files changed, 19 insertions(+), 11 deletions(-) --- texlive-bin.orig/texk/web2c/luatexdir/ChangeLog +++ texlive-bin/texk/web2c/luatexdir/ChangeLog @@ -1,3 +1,8 @@ +2013-07-30 Peter Breitenlohner + + * font/writettf.w: Treat unknown 'post' table versions + (found in some broken fonts) as 3.0, i.e., no Glyph names. + 2013-07-05 Peter Breitenlohner * pdf/pdfgen.w: Use "%"LONGINTEGER_PRI"d" format specifier to --- texlive-bin.orig/texk/web2c/luatexdir/font/writettf.w +++ texlive-bin/texk/web2c/luatexdir/font/writettf.w @@ -816,14 +816,13 @@ } } break; + default: + pdftex_warn("unsupported format (%.8X) of `post' table, assuming 3.0", + (unsigned int) post_format); case 0x00030000: for (glyph = glyph_tab; glyph - glyph_tab < NMACGLYPHS; glyph++) { glyph->name_index = (TTF_USHORT) (glyph - glyph_tab); } - break; - default: - pdftex_fail("unsupported format (%.8X) of `post' table", - (unsigned int) post_format); } } --- texlive-bin.orig/texk/web2c/pdftexdir/ChangeLog +++ texlive-bin/texk/web2c/pdftexdir/ChangeLog @@ -1,3 +1,8 @@ +2013-07-30 Peter Breitenlohner + + * ttf2afm.c, writettf.c: Treat unknown 'post' table versions + (found in some broken fonts) as 3.0, i.e., no Glyph names. + 2013-04-22 Akira Kakuto * pdftex.web: pdftex_revision = "14" --- texlive-bin.orig/texk/web2c/pdftexdir/ttf2afm.c +++ texlive-bin/texk/web2c/pdftexdir/ttf2afm.c @@ -521,15 +521,15 @@ } } break; + default: + ttf_warn("unsupported format (%.8X) of `post' table, assuming 3.0", + post_format); case 0x00030000: if (print_glyph == AS_NAME) { ttf_warn ("no names available in `post' table, print glyph names as indices"); print_glyph = AS_INDEX; } - break; - default: - ttf_fail("unsupported format (%.8X) of `post' table", post_format); } ttf_seek_tab("loca", 0); if (loca_format == 1) { --- texlive-bin.orig/texk/web2c/pdftexdir/writettf.c +++ texlive-bin/texk/web2c/pdftexdir/writettf.c @@ -517,14 +517,13 @@ } } break; + default: + pdftex_warn("unsupported format (%.8X) of `post' table, assuming 3.0", + (unsigned int) post_format); case 0x00030000: for (glyph = glyph_tab; glyph - glyph_tab < NMACGLYPHS; glyph++) { glyph->name_index = glyph - glyph_tab; } - break; - default: - pdftex_fail("unsupported format (%.8X) of `post' table", - (unsigned int) post_format); } } debian/patches/pmpost-texlive-integration0000664000000000000000000000324712213264212016064 0ustar --- texk/kpathsea/texmf.cnf | 1 + texk/web2c/Makefile.am | 3 +++ texk/web2c/ac/web2c.ac | 1 + texk/web2c/configure.ac | 1 + 4 files changed, 6 insertions(+) --- texlive-bin.orig/texk/kpathsea/texmf.cnf +++ texlive-bin/texk/kpathsea/texmf.cnf @@ -624,6 +624,7 @@ % Used by makempx to run TeX. We use "etex" because MetaPost is % expecting DVI, and not "tex" because we want first line parsing. TEX = etex +TEX.pmpost = eptex % These variables specify the external program called for the % interactive `e' option. %d is replaced by the line number and %s by --- texlive-bin.orig/texk/web2c/Makefile.am +++ texlive-bin/texk/web2c/Makefile.am @@ -177,6 +177,9 @@ ## MetaPost include $(srcdir)/mplibdir/am/mplib.am +## pMetaPost +include $(srcdir)/pmplibdir/am/pmpost.am + ## libmplib, used by MetaPost and luaTeX include $(srcdir)/mplibdir/am/libmplib.am --- texlive-bin.orig/texk/web2c/ac/web2c.ac +++ texlive-bin/texk/web2c/ac/web2c.ac @@ -41,6 +41,7 @@ [[pdftex], [yes], [yes], [pdfTeX], [xpdf libpng]], [[luatex], [yes], [], [luaTeX], [poppler cairo libpng zziplib]], [[mp], [yes], [], [MetaPost],[cairo libpng]], +[[pmp], [yes], [], [pMetaPost],[cairo libpng]], [[xetex], [yes], [yes], [XeTeX], [poppler libpng freetype2 icu teckit graphite2 harfbuzz]], ])[]dnl m4_foreach([Kpse_Prog], [kpse_tex_progs], --- texlive-bin.orig/texk/web2c/configure.ac +++ texlive-bin/texk/web2c/configure.ac @@ -202,6 +202,7 @@ [KPSE_MFWIN_DEFINE(Kpse_Win)])])[]dnl AM_CONDITIONAL([MP], [test "x$enable_mp" != xno]) +AM_CONDITIONAL([PMP], [test "x$enable_pmp" != xno]) AM_CONDITIONAL([WEB], [test "x$enable_web_progs" != xno]) debian/patches/upstream-svn31547-dvips0000664000000000000000000000161512213264212014733 0ustar --- texk/dvipsk/ChangeLog | 5 +++++ texk/dvipsk/writet1.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) --- texlive-bin.orig/texk/dvipsk/ChangeLog +++ texlive-bin/texk/dvipsk/ChangeLog @@ -1,3 +1,8 @@ +2013-08-31 Akira Kakuto + + * writet1.c: Remove UniqueID in t1_subset_ascii_part(). + Report from Christian Zietz (czietz@gmx.net tug.org). + 2013-04-07 Karl Berry * resident.c (getdefaults) : if <= 0, set to INT_MAX. --- texlive-bin.orig/texk/dvipsk/writet1.c +++ texlive-bin/texk/dvipsk/writet1.c @@ -1167,7 +1167,9 @@ t1_getline(); while (!t1_prefix("/Encoding")) { t1_scan_param(); - t1_putline(); + if (!(t1_prefix("/UniqueID") && + !strncmp(t1_line_array + strlen(t1_line_array) -4, "def", 3))) + t1_putline(); t1_getline(); } if (is_reencoded(fm_cur)) debian/patches/upstream-svn31126-luatex0000664000000000000000000000255412213264212015104 0ustar --- texk/web2c/luatexdir/ChangeLog | 5 +++++ texk/web2c/luatexdir/pdf/pdfgen.w | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) --- texlive-bin.orig/texk/web2c/luatexdir/ChangeLog +++ texlive-bin/texk/web2c/luatexdir/ChangeLog @@ -1,3 +1,8 @@ +2013-07-05 Peter Breitenlohner + + * pdf/pdfgen.w: Use "%"LONGINTEGER_PRI"d" format specifier to + print (LONGINTEGER_TYPE) casted longinteger and off_t variables. + 2013-06-27 Peter Breitenlohner Bug fix for LuaTeX crash on 32bit Unix systems from Taco, --- texlive-bin.orig/texk/web2c/luatexdir/pdf/pdfgen.w +++ texlive-bin/texk/web2c/luatexdir/pdf/pdfgen.w @@ -572,7 +572,7 @@ { char s[24]; int w; - w = snprintf(s, 23, "%" LONGINTEGER_PRI "d", n); + w = snprintf(s, 23, "%" LONGINTEGER_PRI "d", (LONGINTEGER_TYPE) n); check_nprintf(w, 23); pdf_out_block(pdf, (const char *) s, (size_t) w); } @@ -719,7 +719,7 @@ if (pdf->seek_write_length && pdf->draftmode == 0) { xfseeko(pdf->file, (off_t)pdf->stream_length_offset, SEEK_SET, pdf->job_name); - fprintf(pdf->file, "%" LONGINTEGER_PRI "i", pdf->stream_length); + fprintf(pdf->file, "%" LONGINTEGER_PRI "i", (LONGINTEGER_TYPE) pdf->stream_length); xfseeko(pdf->file, 0, SEEK_END, pdf->job_name); } pdf->seek_write_length = false; debian/patches/pmpost-201305220000664000000000000000000014411612213264212012762 0ustar --- texk/kpathsea/texmf.cnf | 1 texk/web2c/Makefile.am | 3 texk/web2c/ac/web2c.ac | 1 texk/web2c/pmpostdir/Makefile | 107 +++++++ texk/web2c/pmpostdir/am/pmpost.am | 118 ++++++++ texk/web2c/pmpostdir/jfm.ch | 104 +++++++ texk/web2c/pmpostdir/jmp.ch | 342 ++++++++++++++++++++++++ texk/web2c/pmpostdir/jmppsw.ch | 74 +++++ texk/web2c/pmpostdir/mp.ch | 20 + texk/web2c/pmpostdir/mpmathdouble.ch | 76 +++++ texk/web2c/pmpostdir/mpost.ch | 298 +++++++++++++++++++++ texk/web2c/pmpostdir/mpxout.ch | 8 texk/web2c/pmpostdir/pdvitomp.ch | 492 +++++++++++++++++++++++++++++++++++ texk/web2c/pmpostdir/psout.ch | 42 ++ texk/web2c/pmpostdir/svgout.ch | 59 ++++ 15 files changed, 1745 insertions(+) --- texlive-bin.orig/texk/kpathsea/texmf.cnf +++ texlive-bin/texk/kpathsea/texmf.cnf @@ -624,6 +624,7 @@ % Used by makempx to run TeX. We use "etex" because MetaPost is % expecting DVI, and not "tex" because we want first line parsing. TEX = etex +TEX.pmpost = eptex % These variables specify the external program called for the % interactive `e' option. %d is replaced by the line number and %s by --- texlive-bin.orig/texk/web2c/Makefile.am +++ texlive-bin/texk/web2c/Makefile.am @@ -177,6 +177,9 @@ ## MetaPost include $(srcdir)/mplibdir/am/mplib.am +## pMetaPost +include $(srcdir)/pmpostdir/am/pmpost.am + ## libmplib, used by MetaPost and luaTeX include $(srcdir)/mplibdir/am/libmplib.am --- texlive-bin.orig/texk/web2c/ac/web2c.ac +++ texlive-bin/texk/web2c/ac/web2c.ac @@ -41,6 +41,7 @@ [[pdftex], [yes], [yes], [pdfTeX], [xpdf libpng]], [[luatex], [yes], [], [luaTeX], [poppler cairo libpng zziplib]], [[mp], [yes], [], [MetaPost],[cairo libpng]], +[[pmp], [yes], [], [pMetaPost], [cairo libpng ptexenc]], [[xetex], [yes], [yes], [XeTeX], [poppler libpng freetype2 icu teckit graphite2 harfbuzz]], ])[]dnl m4_foreach([Kpse_Prog], [kpse_tex_progs], --- /dev/null +++ texlive-bin/texk/web2c/pmpostdir/Makefile @@ -0,0 +1,107 @@ +# +# Makefile for W32 +# +PTEXENCDIR=../../ptexenc + +RM = rm -f +CC = cl +LD = cl +CTANGLE = ../ctangle +CTIE = ctie +AR = lib + +CAIROVER=cairo-1.12.8 +#CAIROVER=cairo-1.12.12 + +KPSEBUILDDIR = ../../kpathsea +KPSESRCDIR = ../.. +KPSELIB=$(KPSEBUILDDIR)/libkpathsea.lib +PTEXENCLIB= ../../ptexenc/libptexenc.lib +CAIROLIB = ../../../libs/cairo/$(CAIROVER)/src/release/cairo-static.lib +PNGLIB = ../../../libs/libpng/libpng.lib +ZLIBLIB = ../../../libs/zlib/libz.lib +SYSLIBS = user32.lib advapi32.lib gdi32.lib +ADDLIBS = $(ZLIBLIB) $(PNGLIB) $(CAIROLIB) $(SYSLIBS) + +MPLIBBUILDDIR = . +MPLIBSRCDIR = . +MPLIB = libjmplib.lib + +# LDEBUG=-link /DEBUG +LDEBUG= + +# CFLAGS = -nologo -w -MT -Od -Zi -DMPXOUT=1 -DWIN32=1 -DMSVC=1 -DR_OK=4 + +CFLAGS = -nologo -w -MT -O2 -DMPXOUT=1 -DWIN32=1 -DMSVC=1 -DR_OK=4 \ +-Dstrcasecmp=stricmp -DHAVE_SNPRINTF=1 -D_CRT_SECURE_NO_DEPRECATE=1 \ +-DCAIRO_WIN32_STATIC_BUILD=1 \ +-DNO_KPSE_DLL=1 -I. -I../.. -I../../kpathsea \ +-I$(PTEXENCDIR) -I.. \ +-I../../../libs/cairo/$(CAIROVER)/src \ +-I../../../libs/libpng + +OBJECTS = mpost.obj mpxout.obj +LIBOBJECTS = avl.obj mp.obj pngout.obj psout.obj svgout.obj tfmin.obj \ +mpmath.obj mpmathdouble.obj mpstrings.obj + +pmpost.exe: $(MPLIB) $(OBJECTS) $(KPSELIB) + $(LD) -Fe$@ $(OBJECTS) setargv.obj $(MPLIB) $(KPSELIB) $(PTEXENCLIB) $(ADDLIBS) $(LDEBUG) + +$(MPLIB): $(LIBOBJECTS) + $(AR) -out:$@ $(LIBOBJECTS) + +.w.c: + $(CTANGLE) $< $@ + +mpost.c: mpost.w mpost.ch mpxout.c + $(CTANGLE) mpost.w mpost.ch + +mpxout.c: mpxout.w mpxout-tot.ch + $(CTANGLE) mpxout.w mpxout-tot.ch + +mpxout-tot.ch: mpxout.w mpxout.ch pdvitomp.ch + $(CTIE) -c $@ mpxout.w mpxout.ch pdvitomp.ch + +mpmathdouble.c: mpmathdouble.w mpmathdouble.ch + $(CTANGLE) mpmathdouble.w mpmathdouble.ch + +mp.c: mp.w mp-tot.ch pngout.c psout.c svgout.c tfmin.c mpmath.c \ +mpmathdouble.c mpstrings.c + $(CTANGLE) mp.w mp-tot.ch + +mp-tot.ch: mp.w mp.ch jmp.ch + $(CTIE) -c $@ mp.w mp.ch jmp.ch + +tfmin.c: tfmin.w jfm.ch + $(CTANGLE) tfmin.w jfm.ch + +mpstrings.c: mpstrings.w + $(CTANGLE) mpstrings.w + +psout.c: psout.w psout-tot.ch mpstrings.c + $(CTANGLE) psout.w psout-tot.ch + +psout-tot.ch: psout.w psout.ch jmppsw.ch + $(CTIE) -c $@ psout.w psout.ch jmppsw.ch + +svgout.c: svgout.w svgout.ch + $(CTANGLE) svgout.w svgout.ch + +mpmath.c: mpmath.w + $(CTANGLE) mpmath.w + +$(OBJECTS): %.obj: %.c + $(CC) -c $(CFLAGS) $< -Fo$@ + +$(LIBOBJECTS): %.obj: %.c + $(CC) -c $(CFLAGS) $< -Fo$@ + +clean: + $(RM) *.obj mp.c mpxout.c psout.c psout.h mp*.h *.scn \ + *.idx *.toc *.pdf *.log mpmath.c mpost.c tfmin.c svgout.c \ + mpstrings.c *~ pngout.c mpmathdouble.c mp-tot.ch mpxout-tot.ch \ + psout-tot.ch *.pdb *.eps *.exp *.exe *.lib + +install: pmpost.exe + cp -p pmpost.exe c:/usr/local/bin/ + cp -p pmpost.exe c:/usr/work/edrive/wk/dist/PTEX/bin/ --- /dev/null +++ texlive-bin/texk/web2c/pmpostdir/am/pmpost.am @@ -0,0 +1,118 @@ +## texk/web2c/pmpostdir/am/pmpost.am: Makefile fragment for pMetaPost. + +CTIE = ./ctie +ctie = $(ctie_silent)CWEBINPUTS=.:$(srcdir) $(buildenv) $(CTIE) +ctie_silent = $(ctie_silent_$(V)) +ctie_silent_ = $(ctie_silent_$(AM_DEFAULT_VERBOSITY)) +ctie_silent_0 = @echo " CTIE " $@; $(SHELL) ./silent-sh $@ # +ctie_silent_1 = + + +if PMP +bin_PROGRAMS += pmpost +bin_links += pmpost$(EXEEXT):pdvitomp +endif PMP +EXTRA_PROGRAMS +=pmpost + +pmpost_CPPFLAGS = $(CAIRO_INCLUDES) $(PIXMAN_INCLUDES) $(AM_CPPFLAGS) $(ZLIB_INCLUDES) $(LIBPNG_INCLUDES) -I$(srcdir)/mplibdir -I$(srcdir)/pmpostdir $(PTEXENC_INCLUDES) +pmpost_LDADD = $(KPATHSEA_LIBS) $(CAIRO_LIBS) $(PIXMAN_LIBS) $(LIBPNG_LIBS) $(ZLIB_LIBS) -lm $(PTEXENC_LIBS) + + +.PHONY: install-pmpost-links uninstall-pmpost-links + +# Creating one file: just one rule +pmp_ctangle = $(ctangle_silent)CWEBINPUTS=.:$(srcdir)/pmpostdir $(ctangle) +# Creating several files: need stamp file and two rules with identical recipes +pmp_ctangle_sh = CWEBINPUTS=.:$(srcdir)/pmpostdir AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(CTANGLE) + +## pMetaPost C sources +pmpost_SOURCES = mplibdir/avl.h mplibdir/avl.c +nodist_pmpost_SOURCES = ptfmin.c $(pmp_c_h) $(pmpmath_c_h) $(pmpmathdouble_c_h) $(ppsout_c_h) $(psvgout_c_h) $(ppngout_c_h) $(pmpstrings_c_h) pmpost.c $(pmpxout_c_h) +pmp_c_h = pmp.c pmplib.h pmpmp.h +pmpmath_c_h = pmpmath.h pmpmath.c +pmpmathdouble_c_h = pmpmathdouble.h pmpmathdouble.c +pmpstrings_c_h = pmpstrings.h pmpstrings.c +ppsout_c_h = pmppsout.h ppsout.c pmplibps.h +psvgout_c_h = pmplibsvg.h pmpsvgout.h psvgout.c +ppngout_c_h = pmplibpng.h pmppngout.h ppngout.c +pmpxout_c_h = pmpxout.c pmpxout.h + +# sed script +pmp_sed_main = "s/mpxout\\.h/pmpxout.h/;s/mpmp\\.h/pmpmp.h/;s/mplib\\.h/pmplib.h/;s/mpstrings\\.h/pmpstrings.h/" +pmp_sed_math = "s/mpmath\\.h/pmpmath.h/;s/mpmathdouble\\.h/pmpmathdouble.h/" +pmp_sed_ps = "s/mplibps\\.h/pmplibps.h/;s/mppsout\\.h/pmppsout.h/" +pmp_sed_svg = "s/mplibsvg\\.h/pmplibsvg.h/;s/mpsvgout\\.h/pmpsvgout.h/" +pmp_sed_png = "s/mplibpng\\.h/pmplibpng.h/;s/mppngout\\.h/pmppngout.h/" +pmp_sed = sed -e $(pmp_sed_main) -e $(pmp_sed_math) -e $(pmp_sed_ps) -e $(pmp_sed_svg) -e $(pmp_sed_png) + +# Creating one file: just one rule +ptfmin.c: ctangle$(EXEEXT) mplibdir/tfmin.w + cat $(srcdir)/mplibdir/tfmin.w | $(pmp_sed) > ptfmin.w + $(pmp_ctangle) ptfmin.w jfm.ch +pmpost.c: ctangle$(EXEEXT) mplibdir/mpost.w + cat $(srcdir)/mplibdir/mpost.w | $(pmp_sed) > pmpost.w + $(pmp_ctangle) pmpost.w mpost.ch + + +# Creating several files: need stamp file and two rules with identical recipes +$(pmp_c_h): pmp-tangle + @$(pmp_ctangle_sh) pmp.w pmp-tot.ch +pmp-tangle: ctangle$(EXEEXT) mplibdir/mp.w pmp-tot.ch tangle-sh + @$(pmp_ctangle_sh) pmp.w pmp-tot.ch +pmp-tot.ch: ctie$(EXEEXT) mplibdir/mp.w pmpostdir/mp.ch pmpostdir/jmp.ch + cat $(srcdir)/mplibdir/mp.w | $(pmp_sed) > pmp.w + $(ctie) -c pmp-tot.ch pmp.w pmpostdir/mp.ch pmpostdir/jmp.ch + +$(pmpmath_c_h): pmpmath-tangle + @$(pmp_ctangle_sh) pmpmath +pmpmath-tangle: ctangle$(EXEEXT) mplibdir/mpmath.w tangle-sh + cat $(srcdir)/mplibdir/mpmath.w | $(pmp_sed) > pmpmath.w + @$(pmp_ctangle_sh) pmpmath + +$(pmpmathdouble_c_h): pmpmathdouble-tangle + @$(pmp_ctangle_sh) pmpmathdouble pmpostdir/mpmathdouble.ch +pmpmathdouble-tangle: ctangle$(EXEEXT) mplibdir/mpmathdouble.w pmpostdir/mpmathdouble.ch tangle-sh + cat $(srcdir)/mplibdir/mpmathdouble.w | $(pmp_sed) > pmpmathdouble.w + @$(pmp_ctangle_sh) pmpmathdouble mpmathdouble.ch + +$(pmpstrings_c_h): pmpstrings-tangle + @$(pmp_ctangle_sh) pmpstrings +pmpstrings-tangle: ctangle$(EXEEXT) mplibdir/mpstrings.w tangle-sh + cat $(srcdir)/mplibdir/mpstrings.w | $(pmp_sed) > pmpstrings.w + @$(pmp_ctangle_sh) pmpstrings + +$(ppsout_c_h): ppsout-tangle + @$(pmp_ctangle_sh) ppsout.w ppsout-tot.ch +ppsout-tangle: ctangle$(EXEEXT) mplibdir/psout.w ppsout-tot.ch tangle-sh + @$(pmp_ctangle_sh) ppsout.w ppsout-tot.ch +ppsout-tot.ch: ctie$(EXEEXT) mplibdir/psout.w pmpostdir/psout.ch pmpostdir/jmppsw.ch + cat $(srcdir)/mplibdir/psout.w | $(pmp_sed) > ppsout.w + $(ctie) -c ppsout-tot.ch ppsout.w pmpostdir/psout.ch pmpostdir/jmppsw.ch + +$(psvgout_c_h): psvgout-tangle + @$(pmp_ctangle_sh) psvgout svgout.ch +psvgout-tangle: ctangle$(EXEEXT) mplibdir/svgout.w pmpostdir/svgout.ch tangle-sh + cat $(srcdir)/mplibdir/svgout.w | $(pmp_sed) > psvgout.w + @$(pmp_ctangle_sh) psvgout svgout.ch +$(ppngout_c_h): ppngout-tangle + @$(pmp_ctangle_sh) ppngout +ppngout-tangle: ctangle$(EXEEXT) mplibdir/pngout.w tangle-sh + cat $(srcdir)/mplibdir/pngout.w | $(pmp_sed) > ppngout.w + @$(pmp_ctangle_sh) ppngout + +$(pmpxout_c_h): pmpxout-tangle + @$(pmp_ctangle_sh) pmpxout pmpxout-tot.ch +pmpxout-tangle: ctangle$(EXEEXT) mplibdir/mpxout.w pmpxout-tot.ch tangle-sh + @$(pmp_ctangle_sh) pmpxout pmpxout-tot.ch +pmpxout-tot.ch: ctie$(EXEEXT) mplibdir/mpxout.w pmpostdir/mpxout.ch pmpostdir/pdvitomp.ch + cat $(srcdir)/mplibdir/mpxout.w | $(pmp_sed) > pmpxout.w + $(ctie) -c pmpxout-tot.ch pmpxout.w pmpostdir/mpxout.ch pmpostdir/pdvitomp.ch + +## pMetaPost CWeb sources +pmpost_web = mplibdir/mpost.w mplibdir/mpxout.w +pmpost_web += mplibdir/mp.w mplibdir/psout.w mplibdir/svgout.w mplibdir/pngout.w +pmpost_web += mplibdir/mpmath.w mplibdir/mpmathdouble.w mplibdir/mpstrings.w mplibdir/tfmin.w + +$(pmpost_OBJECTS): $(nodist_pmpost_SOURCES) + +DISTCLEANFILES += $(nodist_pmpost_SOURCES) --- /dev/null +++ texlive-bin/texk/web2c/pmpostdir/jfm.ch @@ -0,0 +1,104 @@ +@x +#include +@y +#include +#include +@z + +% +% local variable "nt" && "ct" +@x + halfword lf,tfm_lh,bc,ec,nw,nh,nd; /* subfile size parameters */ +@y + halfword lf,tfm_lh,bc,ec,nw,nh,nd,nt; /* subfile size parameters */ +@z + +@x + int h_and_d; /* height and depth indices being unpacked */ +@y + int h_and_d; /* height and depth indices being unpacked */ + halfword ct; /* char and type */ + halfword id; /* JFM font id */ +@z + +@x +@ +@y +@; +@ +@z + +% +% routine to process JFM file format +@x +@= +tfget; read_two(lf); +@y +@d yoko_jfm_id 11 /* `yoko-kumi' fonts */ +@d tate_jfm_id 9 /* `tate-kumi' fonts */ +@d font_jfm_p(A) (mp->font_id[(A)]!=0) +@d incr(A) (A)=(A)+1 /* increase a variable by unity */ +@= +tfget; read_two(lf); +if ( (lf==yoko_jfm_id) || (lf==tate_jfm_id) ) { + id=lf; + tfget; read_two(nt); + tfget; read_two(lf); +} else { + id=0; nt=0; +}; +@z + +@x +whd_size=(size_t)((ec+1-bc)+nw+nh+nd); +@y +whd_size=(size_t)((ec+1-bc)+nt+nw+nh+nd); +@z + +% +% reserve space for character type table +@x +mp->char_base[n]=(int)(mp->next_fmem-(size_t)bc); +mp->width_base[n]=(int)(mp->next_fmem+(size_t)(ec-bc)+1); +@y +mp->font_id[n]=id; +mp->font_nt[n]=nt; +mp->ctype_base[n]=mp->next_fmem; +mp->char_base[n]=(int)(mp->next_fmem+nt-(size_t)bc); +mp->width_base[n]=(int)(mp->next_fmem+nt+(size_t)(ec-bc)+1); +@z + +% +% read character type table +% +@x +tf_ignore(4*(tfm_lh-2)) +@y +tf_ignore(4*(tfm_lh-2)) + +@ @= +ii=mp->ctype_base[n]+nt; +i=mp->ctype_base[n]; +while ( ifont_info[i].hh.LH=ct; + tfget; read_two(ct); + mp->font_info[i].hh.RH=ct; + incr(i); +} +@z + +@x +mp_pack_file_name(mp, mp->cur_name,mp->cur_area,mp->cur_ext); +mp->tfm_infile = (mp->open_file)(mp, mp->name_of_file, "r",mp_filetype_metrics); +@y +mp_pack_file_name(mp, mp->cur_name,mp->cur_area,mp->cur_ext); +{ + char *fulln; + fulln = kpse_find_file(fname, kpse_tfm_format, 1); + mp->tfm_infile = (mp->open_file)(mp, fulln, "r",mp_filetype_metrics); + if(fulln) mp_xfree(fulln); +} +@z --- /dev/null +++ texlive-bin/texk/web2c/pmpostdir/jmp.ch @@ -0,0 +1,342 @@ +% jMetaPost change file for MetaPost +% +% written by Michio Matsuyama +% Hideyuki Suzuki +% +% $Id: jmp.ch,v 1.42 2000/03/20 02:55:50 hideyuki Exp $ + +% +% +% change file of mp.w for pMetaPost (CWEB version) +% Akira Kakuto (translated the WEB version) +% +% + +@x +@d default_banner "This is MetaPost, Version 1.802" /* printed when \MP\ starts */ +@y +@d default_banner "This is pMetaPost, Version 1.802-0.04" /* printed when \MP\ starts */ +@z + +@x +#define metapost_version "1.802" +@y +#define metapost_version "1.802-0.04" +@z + +@x +# include /* for access */ +#endif +@y +# include /* for access */ +#endif +#include +#include +#include +#include +@z + +@x +void mp_close_file (MP mp, void *f) { + (void) mp; + if (f != NULL) + fclose ((FILE *) f); +@y +void mp_close_file (MP mp, void *f) { + (void) mp; +#ifdef WIN32 + if (f != NULL) { + clear_infile_enc((FILE *)f); + fclose ((FILE *) f); + } +#else + if (f != NULL) + fclose ((FILE *) f); +#endif +@z + +@x +mp->buf_size = 200; +@y +{ + char *kpse_buf = kpse_var_value("buf_size"); + if(kpse_buf) { + mp->buf_size = atoi(kpse_buf); + free(kpse_buf); + } else { + mp->buf_size = 500000; + } +} +@z + +@x +static boolean mp_input_ln (MP mp, void *f) { + /* inputs the next line or returns |false| */ + char *s; + size_t size = 0; + mp->last = mp->first; /* cf.\ Matthew 19\thinspace:\thinspace30 */ + s = (mp->read_ascii_file) (mp, f, &size); + if (s == NULL) + return false; + if (size > 0) { + mp->last = mp->first + size; + if (mp->last >= mp->max_buf_stack) { + mp->max_buf_stack = mp->last + 1; + while (mp->max_buf_stack > mp->buf_size) { + mp_reallocate_buffer (mp, (mp->buf_size + (mp->buf_size >> 2))); + } + } + (void) memcpy ((mp->buffer + mp->first), s, size); + } + free (s); + return true; +} +@y +static boolean mp_input_ln (MP mp, void *f ) { + int i = EOF; + mp->last = input_line2((FILE *)f, mp->buffer, mp->first, mp->buf_size, &i); + if (i == EOF && errno != EINTR && mp->last == mp->first) + return false; + if (i != EOF && i != '\n' && i != '\r') { + fprintf (stderr, "! Unable to read an entire line---bufsize=%u.\n", + (unsigned) mp->buf_size); + fputs ("Please increase buf_size in texmf.cnf.\n", stderr); + exit (1); + } + if (i == '\r') { + while ((i = getc (f)) == EOF && errno == EINTR) + ; + if (i != '\n') + ungetc (i, f); + } + return true; +} +@z + +@x +wterm (mp->banner); +@y +wterm (mp->banner); +wterm(" ("); +wterm((char *)getencstring()); +wterm(")"); +@z + +@x +} four_quarters; +typedef union { + integer sc; + four_quarters qqqq; +} font_data; +@y +} four_quarters; +typedef struct { + halfword RH, LH; +} two_halves; +typedef union { + two_halves hh; + integer sc; + four_quarters qqqq; +} font_data; +@z + +% +% tategaki support +% +% Suppose h==(0,height), d==(0,-depth) && w==(width,0) in horizontal string, +% && h==(height,0), d==(-depth,0) && w==(0,-width) in vertical string. +% Four vertices of the bounding box is h, d, h+w && d+w && those of the +% transformed boundig box is Th, Td, T(h+w) && T(d+w), so that the values +% of Th, Td && Tw are compared here. + +@x +@ The height width and depth information stored in a text node determines a +rectangle that needs to be transformed according to the transformation +parameters stored in the text node. + +@y +@ The height width and depth information stored in a text node determines a +rectangle that needs to be transformed according to the transformation +parameters stored in the text node. + +Boundig box depends on JFM font ID. + +@d yoko_jfm_id 11 /* `yoko-kumi' fonts */ +@d tate_jfm_id 9 /* `tate-kumi' fonts */ +@d font_jfm_p(A) (mp->font_id[(A)]!=0) + +@z + +@x + mp_number x0a, y0a, x1a, y1a, arg1; + mp_text_node p0 = (mp_text_node)p; + new_number (x0a); + new_number (x1a); + new_number (y0a); + new_number (y1a); + new_number (arg1); + number_clone (arg1, p0->depth); + number_negate (arg1); + take_scaled (x1a, p0->txx, p0->width); + take_scaled (y0a, p0->txy, arg1); + take_scaled (y1a, p0->txy, p0->height); +@y + mp_number x0a, y0a, x1a, y1a, arg1, arg2; + mp_text_node p0 = (mp_text_node)p; + new_number (x0a); + new_number (x1a); + new_number (y0a); + new_number (y1a); + new_number (arg1); + new_number (arg2); + number_clone (arg1, p0->depth); + number_negate (arg1); + number_clone (arg2, p0->width); + number_negate (arg2); + if ( mp->font_id[mp_font_n(p)]!=tate_jfm_id ) { + take_scaled (x1a, p0->txx, p0->width); + take_scaled (y0a, p0->txy, arg1); + take_scaled (y1a, p0->txy, p0->height); + } else { + take_scaled (x1a, p0->txy, arg2); + take_scaled (y0a, p0->txx, arg1); + take_scaled (y1a, p0->txx, p0->height); + } +@z + +@x + take_scaled (x1a, p0->tyx, p0->width); + number_clone (arg1, p0->depth); + number_negate (arg1); + take_scaled (y0a, p0->tyy, arg1); + take_scaled (y1a, p0->tyy, p0->height); +@y + if ( mp->font_id[mp_font_n(p)]!=tate_jfm_id ) { + take_scaled (x1a, p0->tyx, p0->width); + number_clone (arg1, p0->depth); + number_negate (arg1); + take_scaled (y0a, p0->tyy, arg1); + take_scaled (y1a, p0->tyy, p0->height); + } else { + number_clone (arg1, p0->depth); + number_negate (arg1); + number_clone (arg2, p0->width); + number_negate (arg2); + take_scaled (x1a, p0->tyy, arg2); + take_scaled (y0a, p0->tyx, arg1); + take_scaled (y1a, p0->tyx, p0->height); + } +@z + +@x + wlog (mp->banner); +@y + wlog (mp->banner); + wlog (" ("); + wlog ((char *)(getencstring())); + wlog (")"); +@z + +% +% char type pointers +@x +eight_bits *font_bc; +eight_bits *font_ec; /* first and last character code */ +@y +eight_bits *font_bc; +eight_bits *font_ec; /* first and last character code */ +halfword *font_nt; +halfword *font_id; +@z + +@x +int *char_base; /* base address for |char_info| */ +@y +int *char_base; /* base address for |char_info| */ +int *ctype_base; +@z + +@x +xfree (mp->char_base); +@y +xfree (mp->font_id); +xfree (mp->font_nt); +xfree (mp->char_base); +xfree (mp->ctype_base); +@z + +@x + XREALLOC (mp->char_base, l, int); +@y + XREALLOC (mp->font_id, l, halfword); + XREALLOC (mp->font_nt, l, halfword); + XREALLOC (mp->char_base, l, int); + XREALLOC (mp->ctype_base, l, int); +@z + + +@x +mp->char_base[null_font] = 0; +@y +mp->font_id[null_font] = 0; +mp->font_nt[null_font] = 0; +mp->char_base[null_font] = 0; +mp->ctype_base[null_font] = 0; +@z + +@x +@d char_mp_info(A,B) mp->font_info[mp->char_base[(A)]+(B)].qqqq +@y +@d char_mp_info(A,B) mp->font_info[mp->char_base[(A)]+(B)].qqqq +@d ctype_char_end(A) (A)].hh.LH +@d ctype_char(A) mp->font_info[mp->ctype_base[(A)]+ctype_char_end +@d ctype_type_end(A) (A)].hh.RH +@d ctype_type(A) mp->font_info[mp->ctype_base[(A)]+ctype_type_end +@z + +% +% lookup character type table +@x +void mp_set_text_box (MP mp, mp_text_node p) { +@y +@; +void mp_set_text_box (MP mp, mp_text_node p) { +@z + +@x + if ((*(mp_text_p (p)->str + k) < bc) || (*(mp_text_p (p)->str + k) > ec)) { + mp_lost_warning (mp, f, *(mp_text_p (p)->str + k)); + } else { + cc = char_mp_info (f, *(mp_text_p (p)->str + k)); +@y + if ( ((*(mp_text_p (p)->str + k) < bc) || (*(mp_text_p (p)->str + k) > ec)) && (mp->font_id[f]==0) ) { + mp_lost_warning (mp, f, *(mp_text_p (p)->str + k)); + } else { + if (mp->font_id[f]!=0) { + cc=char_mp_info(f,mp_lookup_ctype(mp, f,fromBUFF(mp_text_p(p)->str,limit,k))); + k++; + } else { + cc = char_mp_info (f, *(mp_text_p (p)->str + k)); + } +@z + +@x +@* Debugging. +@y +@ @= +int mp_lookup_ctype (MP mp,font_number f, integer c) +{ + int l, u, r, ch; + l=0; u=mp->font_nt[f]-1; + while ( l +@z + +% Treat all Kanji fonts as used +@x + if ( mp->font_info[p].qqqq.b3==mp_used ) +@y + if ( mp->font_info[p].qqqq.b3==mp_used || mp->font_id[f]!=0) +@z + +% +% Kanji string output +@x +static void mp_print_initial_comment(MP mp,mp_edge_object *hh, int prologues); +@y +static void mp_print_initial_comment(MP mp,mp_edge_object *hh, int prologues); +void mp_ps_kanji_string_out (MP mp, unsigned char *s); + +#define Hi(x) (((x) >> 8) & 0xff) +#define Lo(x) ((x) & 0xff) + +@ @c +void mp_ps_kanji_string_out (MP mp, unsigned char *s) +{ +int i, len; +int c; + +len = strlen(s); +i=0; +mp_ps_print(mp, "<"); +while (ips->ps_offset+5>mp->max_print_line ) mp_ps_print_ln(mp); + c=toDVI(fromBUFF(s, i+2, i)); + i=i+2; + mp_hex_digit_out(mp, Hi(c) / 16); + mp_hex_digit_out(mp, Hi(c) % 16); + mp_hex_digit_out(mp, Lo(c) / 16); + mp_hex_digit_out(mp, Lo(c) % 16); + }; +mp_ps_print(mp, ">"); +}; +@z + +@x + mp_ps_print_nl(mp, "%%Creator: MetaPost "); +@y + mp_ps_print_nl(mp, "%%Creator: MetaPost (Japanese version) "); +@z + +% +% Call Kanji string output routine if the font is JFM. +@x + mp_ps_string_out(mp, gr_text_p(p),gr_text_l(p)); + mp_ps_name_out(mp, mp->font_name[gr_font_n(p)],false); +@y + if (mp->font_id[gr_font_n(p)]!=0) + mp_ps_kanji_string_out(mp, gr_text_p(p)); + else + mp_ps_string_out(mp, gr_text_p(p),gr_text_l(p)); + mp_ps_name_out(mp, mp->font_name[gr_font_n(p)],false); +@z --- /dev/null +++ texlive-bin/texk/web2c/pmpostdir/mp.ch @@ -0,0 +1,20 @@ +@x + /* open the terminal for output */ + t_open_out(); +#if DEBUG + setlinebuf(stdout); + setlinebuf(mp->term_out); +#endif +@y + /* open the terminal for output */ + t_open_out(); +#if DEBUG +#ifdef WIN32 + setvbuf(stdout, (char *) NULL, _IONBF, 0); + setvbuf(mp->term_out, (char *) NULL, _IONBF, 0); +#else + setlinebuf(stdout); + setlinebuf(mp->term_out); +#endif +#endif +@z --- /dev/null +++ texlive-bin/texk/web2c/pmpostdir/mpmathdouble.ch @@ -0,0 +1,76 @@ +@x +#define _ISOC99_SOURCE /* to get the round() prototype */ +#include +#include +#include +#include +@y +#define _ISOC99_SOURCE /* to get the round() prototype */ +#include +#include +#include +#include +#ifdef _MSC_VER +double round(double x); +#endif +@z + +@x +void mp_init_randoms (MP mp, int seed) { + int j, jj, k; /* more or less random integers */ + int i; /* index into |randoms| */ + j = abs (seed); + while (j >= fraction_one) { + j = j/2; + } + k = 1; + for (i = 0; i <= 54; i++) { + jj = k; + k = j - k; + j = jj; + if (k<0) + k += fraction_one; + mp->randoms[(i * 21) % 55].data.dval = j; + } + mp_new_randoms (mp); + mp_new_randoms (mp); + mp_new_randoms (mp); /* ``warm up'' the array */ +} +@y +void mp_init_randoms (MP mp, int seed) { + int j, jj, k; /* more or less random integers */ + int i; /* index into |randoms| */ + j = abs (seed); + while (j >= fraction_one) { + j = j/2; + } + k = 1; + for (i = 0; i <= 54; i++) { + jj = k; + k = j - k; + j = jj; + if (k<0) + k += fraction_one; + mp->randoms[(i * 21) % 55].data.dval = j; + } + mp_new_randoms (mp); + mp_new_randoms (mp); + mp_new_randoms (mp); /* ``warm up'' the array */ +} +#ifdef _MSC_VER +# include +double round(double x) +{ + double c, f, d1, d2; + + c = ceil(x); + f = floor(x); + d1 = fabs(c - x); + d2 = fabs(x - f); + if (d1 > d2) + return f; + else + return c; +} +#endif +@z --- /dev/null +++ texlive-bin/texk/web2c/pmpostdir/mpost.ch @@ -0,0 +1,298 @@ +@x +#include +@y +#include +#include +char kanjioption[16]; +@z + +@x +@d TEX "tex" +@d TROFF "soelim | eqn -Tps -d$$ | troff -Tps" + +@c +#ifndef MPXCOMMAND +#define MPXCOMMAND "makempx" +#endif +@y +@d TEX "eptex" +@d TROFF "gsoelim | geqn -Tps -d$$ | gtroff -Tps" + +@c +#ifndef MPXCOMMAND +#define MPXCOMMAND "pmakempx" +#endif +@z + +@x + if (cnf_cmd!=NULL && (strcmp (cnf_cmd, "1")!=0)) { + if (mp_troff_mode(mp)!=0) + cmd = concatn (cnf_cmd, " -troff ", + qmpname, " ", qmpxname, NULL); + else if (mpost_tex_program!=NULL && *mpost_tex_program != '\0') + cmd = concatn (cnf_cmd, " -tex=", mpost_tex_program, " ", + qmpname, " ", qmpxname, NULL); +@y + if (cnf_cmd!=NULL && (strcmp (cnf_cmd, "1")!=0)) { + if (kanjioption[0]) + cnf_cmd = concatn (cnf_cmd, " --kanji=", kanjioption, NULL); + if (mp_troff_mode(mp)) + cmd = concatn (cnf_cmd, " -troff ", + qmpname, " ", qmpxname, NULL); + else if (mpost_tex_program!=NULL && *mpost_tex_program != '\0') + cmd = concatn (cnf_cmd, " -tex=", mpost_tex_program, " ", + qmpname, " ", qmpxname, NULL); +@z + +@x + if (mpost_tex_program != NULL && *mpost_tex_program != '\0') { + maincmd = mpost_xstrdup(mpost_tex_program); + } else { + if (mpxmode == mpx_tex_mode) { + s = kpse_var_value("TEX"); + if (s==NULL) s = kpse_var_value("MPXMAINCMD"); + if (s==NULL) s = mpost_xstrdup (TEX); + maincmd = (char *)mpost_xmalloc (strlen(s)+strlen(default_args)+1); + strcpy(maincmd,s); +@y + if (mpost_tex_program != NULL && *mpost_tex_program != '\0') { + if (kanjioption[0]) { + maincmd = (char *)mpost_xmalloc (strlen(mpost_tex_program) + + strlen(kanjioption) + 15); + strcpy(maincmd, mpost_tex_program); + strcat(maincmd, " --kanji="); + strcat(maincmd, kanjioption); + } else + maincmd = mpost_xstrdup(mpost_tex_program); + } else { + if (mpxmode == mpx_tex_mode) { + s = kpse_var_value("TEX"); + if (s==NULL) s = kpse_var_value("MPXMAINCMD"); + if (s==NULL) s = mpost_xstrdup (TEX); + if (kanjioption[0]) + maincmd = (char *)mpost_xmalloc (strlen(s)+strlen(default_args)+ + strlen(kanjioption)+13); + else + maincmd = (char *)mpost_xmalloc (strlen(s)+strlen(default_args)+1); + strcpy(maincmd,s); + if (kanjioption[0]) { + strcat(maincmd, " --kanji="); + strcat(maincmd, kanjioption); + } +@z + +@x + const char *banner = "% Written by metapost version "; +@y + const char *banner = "% Written by pmpost version "; +@z + +@x + mpost_xfree (cnf_cmd); +@y + if(cnf_cmd) + mpost_xfree (cnf_cmd); +@z + +@x + const char *banner = "% Written by dvitomp version "; +@y + const char *banner = "% Written by pdvitomp version "; +@z + +@x + { "kpathsea-debug", 1, 0, 0 }, +@y + { "kpathsea-debug", 1, 0, 0 }, + { "kanji", 1, 0, 0 }, +@z + +@x + if (user_progname == NULL) + user_progname = optarg; + } +@y + if (user_progname == NULL) + user_progname = optarg; + } + } else if (ARGUMENT_IS ("kanji")) { + strcpy(kanjioption, optarg); + if(!set_enc_string(optarg, optarg)) { + fprintf(stderr,"Ignoring unknown argument `%s' to --kanji", optarg); + } +@z + +@x + { "no-kpathsea", 0, &nokpse, 1 }, +@y + { "no-kpathsea", 0, &nokpse, 1 }, + { "kanji", 1, 0, 0 }, +@z + +@x + } else if (option_is ("progname")) { + user_progname = optarg; +@y + } else if (option_is ("progname")) { + user_progname = optarg; + } else if (option_is ("kanji")) { + strcpy (kanjioption, optarg); + if(!set_enc_string(optarg, optarg)) { + fprintf(stderr,"Ignoring unknown argument `%s' to --kanji", optarg); + } +@z + +@x + fprintf(stdout, "This is dvitomp %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "This is MetaPost %s" WEB2CVERSION "\n", s); +mpost_xfree(s); +fprintf(stdout, +"\n" +"Usage: mpost [OPTION] [&MEMNAME] [MPNAME[.mp]] [COMMANDS]\n" +" mpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +"\n" +" Run MetaPost on MPNAME, usually creating MPNAME.NNN (and perhaps\n" +" MPNAME.tfm), where NNN are the character numbers generated.\n" +" Any remaining COMMANDS are processed as MetaPost input,\n" +" after MPNAME is read.\n\n" +" With a --dvitomp argument, MetaPost acts as DVI-to-MPX converter only.\n" +" Call MetaPost with --dvitomp --help for option explanations.\n\n"); +fprintf(stdout, +" -ini be inimpost, for dumping mem files\n" +" -interaction=STRING set interaction mode (STRING=batchmode/nonstopmode/\n" +" scrollmode/errorstopmode)\n" +" -numbersystem=STRING set number system mode (STRING=scaled/double/binary/decimal)\n" +" -jobname=STRING set the job name to STRING\n" +@y + fprintf(stdout, "This is pdvitomp %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "This is pMetaPost %s" WEB2CVERSION "\n", s); +mpost_xfree(s); +fprintf(stdout, +"\n" +"Usage: pmpost [OPTION] [&MEMNAME] [MPNAME[.mp]] [COMMANDS]\n" +" pmpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +"\n" +" Run pMetaPost on MPNAME, usually creating MPNAME.NNN (and perhaps\n" +" MPNAME.tfm), where NNN are the character numbers generated.\n" +" Any remaining COMMANDS are processed as pMetaPost input,\n" +" after MPNAME is read.\n\n" +" With a --dvitomp argument, pMetaPost acts as DVI-to-MPX converter only.\n" +" Call pMetaPost with --dvitomp --help for option explanations.\n\n"); +fprintf(stdout, +" -ini be inipmpost, for dumping mem files\n" +" -interaction=STRING set interaction mode (STRING=batchmode/nonstopmode/\n" +" scrollmode/errorstopmode)\n" +" -numbersystem=STRING set number system mode (STRING=scaled/double/binary/decimal)\n" +" -jobname=STRING set the job name to STRING\n" +" -kanji=STRING set the Japanese encoding to STRING\n" +@z + +@x +" -version output version information and exit\n" +"\n" +"Email bug reports to mp-implementors@@tug.org.\n" +@y +" -version output version information and exit\n" +@z + +@x + fprintf(stdout, "This is dvitomp %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "This is MetaPost %s" WEB2CVERSION "\n", s); +mpost_xfree(s); +fprintf(stdout, +"\n" +"Usage: dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +" mpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +"\n" +" Convert a TeX DVI file to a MetaPost MPX file.\n\n"); +fprintf(stdout, +" -progname=STRING set program name to STRING\n" +@y + fprintf(stdout, "This is pdvitomp %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "This is pMetaPost %s" WEB2CVERSION "\n", s); +mpost_xfree(s); +fprintf(stdout, +"\n" +"Usage: pdvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +" pmpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +"\n" +" Convert a TeX DVI file to a MetaPost MPX file.\n\n"); +fprintf(stdout, +" -progname=STRING set program name to STRING\n" +" -kanji=STRING set kanji encoding (sjis, jis, euc, utf8)\n" +@z + +@x + fprintf(stdout, "dvitomp (MetaPost) %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "MetaPost %s" WEB2CVERSION "\n", s); +@y + fprintf(stdout, "pdvitomp (pMetaPost) %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "pMetaPost %s" WEB2CVERSION "\n", s); +@z + +@x +"Author of the CWEB MetaPost: Taco Hoekwater.\n" +@y +"Author of the CWEB MetaPost: Taco Hoekwater.\n" +"Authors of pMetaPost: Michio Matsuyama, Hideyuki Suzuki.\n" +@z + +@x + const char * banner = "This is MetaPost, version "; +@y + const char * banner = "This is pMetaPost, version "; +@z + +@x + options->print_found_names = (int)true; + { + const char *base = xbasename(argv[0]); + if (!strcmp(base, "dvitomp") || !strcasecmp(base, "dvitomp.exe")) + dvitomp_only=1; + } + if (dvitomp_only) { + @; + } else { +@y + options->print_found_names = (int)true; + +#if defined(WIN32) + { + char *p , *q; + p = (char *)xbasename(argv[0]); + if ((q = strrchr(p, '.')) && !strcasecmp(q, ".exe")) + *q = '\0'; + argv[0] = p; + } + kanjioption[0] = '\0'; + enable_UPTEX (false); + set_enc_string("sjis", "sjis"); +#else + { + char *p; + p = (char *)xbasename(argv[0]); + argv[0] = p; + } + kanjioption[0] = '\0'; + enable_UPTEX (false); + set_enc_string("utf8", "euc"); +#endif + + if (strstr(argv[0], "dvitomp") != NULL) { + dvitomp_only=1; + @; + } else { + options->mem_name = mpost_xstrdup(argv[0]); +@z + +@x + if(putenv(xstrdup("engine=metapost"))) +@y + if(putenv(xstrdup("engine=pmpost"))) +@z --- /dev/null +++ texlive-bin/texk/web2c/pmpostdir/mpxout.ch @@ -0,0 +1,8 @@ +@x +#include +@y +#include +#define R_OK 4 +typedef int boolean; +typedef int integer; +@z --- /dev/null +++ texlive-bin/texk/web2c/pmpostdir/pdvitomp.ch @@ -0,0 +1,492 @@ +@x +#include "pmpxout.h" +@y +#include "pmpxout.h" +#include +@z + +@x +@d max_widths (256*max_fonts) /* maximum number of different characters among all fonts */ +@y +@d max_widths 512000 /* maximum number of different characters among all fonts */ +@z + +@x +@d undefined_commands 250: case 251: case 252: case 253: case 254: case 255 +@y +@d dir 255 /* p\TeX\ direction */ +@d undefined_commands 250: case 251: case 252: case 253: case 254 +@z + +@x +mpx_read_tfm_word(mpx); lh=mpx->b2*(int)(256)+mpx->b3; +@y +mpx_read_tfm_word(mpx); +@;@/ +lh=mpx->b2*(int)(256)+mpx->b3; +@z + +@x + if ( mpx->b0<128 ) + mpx->tfm_check_sum=((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3; + else + mpx->tfm_check_sum=(((mpx->b0-256)*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3; + } + if ( k==5 ) { + if (mpx->mode == mpx_troff_mode) { + mpx->font_design_size[f]=(((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3)/(65536.0*16); + } + } +} +@y + if ( mpx->b0<128 ) + mpx->tfm_check_sum=((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3; + else + mpx->tfm_check_sum=(((mpx->b0-256)*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3; + } + if ( k==5 ) { + if (mpx->mode == mpx_troff_mode) { + mpx->font_design_size[f]=(((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3)/(65536.0*16); + } + } +} +@; +@z + +@x +@= +floor(mpx->dvi_scale*mpx->font_scaled_size[f]*char_width(f,c)) + +@ @= +floor(mpx->dvi_scale*mpx->font_scaled_size[cur_font]*char_width(cur_font,p)) +@y +@ @c @@; /* p\TeX */ +integer mpx_scaled_char_width (MPX mpx,integer f,integer c) +{ + if (mpx->font_id[f]!=0) c=mpx_lookup_ctype(mpx, f,c); + return floor(mpx->dvi_scale*mpx->font_scaled_size[f]*char_width(f,c)); +} +@z + +@x +@ @c @@; +static void mpx_do_set_char (MPX mpx,web_integer f, web_integer c) { + if ( (cfont_bc[f])||(c>mpx->font_ec[f]) ) + mpx_abort(mpx,"attempt to typeset invalid character %d",c); +@.attempt to typeset...@> +@y +@ PDVItoMP: |do_set_char| is called with non-virtual font. +In the case of non-virtual Kanji font, the width is looked up +with the character type, and the character is printed by the +function |set_kanji_char|. + +When the width written in the virtual font is same as +the width of the substituted font, the next character can be +written in the same string in output mpx file. +In other words, the width of the character is calculated +in |do_dvi_commands|. So even if the width is wrong here, the output PostScript file is not affected. + +@ @c @@; +void mpx_do_set_char (MPX mpx,integer f,integer c) +{ +integer kkk; + +if (mpx->font_id[f]!=0) { + kkk=mpx_lookup_ctype(mpx, f,c); + if ( (kkkfont_bc[f]) || (kkk>mpx->font_ec[f]) ) + mpx_abort(mpx,"attempt to typeset invalid character (JFM) %d",c); +} else if ( (cfont_bc[f])||(c>mpx->font_ec[f]) ) { + mpx_abort(mpx,"attempt to typeset invalid character %d",c); +} +@.attempt to typeset...@> +@z + +@x + if ((mpx->h!=mpx->str_h2)||(mpx->v!=mpx->str_v)|| + (f!=mpx->str_f)||(mpx->dvi_scale!=mpx->str_scale) ) { +@y + if ((mpx->h!=mpx->str_h2)||(mpx->v!=mpx->str_v2)|| + (f!=mpx->str_f)||(mpx->dvi_scale!=mpx->str_scale) ) { +@z + +@x + fprintf(mpx->mpxfile,"_s("); mpx->print_col=3;@/ + mpx->str_scale=mpx->dvi_scale; mpx->str_f=f; + mpx->str_v=mpx->v; mpx->str_h1=mpx->h; +@y + if ((mpx->d==0) || (mpx->font_id[f]==9)) { + fprintf(mpx->mpxfile,"_s("); mpx->print_col=3;}@/ + else { + fprintf(mpx->mpxfile,"_sr("); mpx->print_col=4;}@/ + mpx->str_scale=mpx->dvi_scale; mpx->str_f=f; + mpx->str_v1=mpx->v; mpx->str_h1=mpx->h; +@z + +@x + mpx_print_char(mpx, (unsigned char)c); + mpx->str_h2=(web_integer)(mpx->h+@); +@y + if (mpx->font_id[f]!=0) + mpx_print_kanji_char(mpx, c); + else + mpx_print_char(mpx, c); + if (mpx->d==0) { + mpx->str_h2=mpx->h+mpx_scaled_char_width(mpx, f, c); + mpx->str_v2=mpx->v; + } else { + mpx->str_h2=mpx->h; + mpx->str_v2=mpx->v+mpx_scaled_char_width(mpx, f, c); + } +@z + +@x +web_integer str_h1; +web_integer str_v; /* starting position for current output string */ +web_integer str_h2; /* where the current output string ends */ +@y +integer str_h1; +integer str_v1; /* starting position for current output string */ +integer str_h2; +integer str_v2; /* where the current output string ends */ +@z + +@x + fprintf(mpx->mpxfile,"vardef _s(expr _t,_f,_m,_x,_y)(text _c)=\n"); + fprintf(mpx->mpxfile, + " addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef;\n"); +@y + fprintf(mpx->mpxfile,"vardef _s(expr _t,_f,_m,_x,_y)(text _c)=\n"); + fprintf(mpx->mpxfile, + " addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef;\n"); + fprintf(mpx->mpxfile,"vardef _sr(expr _t,_f,_m,_x,_y)=\n"); + fprintf(mpx->mpxfile," addto _p also _t infont _f rotated -90"); + fprintf(mpx->mpxfile," scaled _m shifted (_x,_y); enddef;\n"); +@z + +@x + x=mpx->conv*mpx->str_h1; + y=mpx->conv*(-mpx->str_v); +@y + x=mpx->conv*mpx->str_h1; + y=mpx->conv*(-mpx->str_v1); +@z + +@x +@= +{ + mpx->pic_wd=mpx->h; mpx->pic_dp=mpx->v; mpx->pic_ht=ht-mpx->v; +} +@y +@= +{ if (mpx->d==0) { + mpx->pic_wd=mpx->h; mpx->pic_dp=mpx->v; mpx->pic_ht=ht-mpx->v; + } else { + mpx->pic_wd=mpx->v; mpx->pic_dp=-mpx->h; mpx->pic_ht=ht+mpx->h; + } +} +@z + +@x + mpx->str_v=0; + mpx->str_h2=0; + mpx->str_scale=1.0; /* values don't matter */ +@y + mpx->str_h2=0; + mpx->str_v2=0; + mpx->str_scale=1.0; /* values don't matter */ +@z + +@x +dd=-mpx->pic_dp*mpx->conv; +w=mpx->conv*mpx->pic_wd; +h=mpx->conv*mpx->pic_ht; +fprintf(mpx->mpxfile, + "setbounds _p to (0,%1.4f)--(%1.4f,%1.4f)--\n" + " (%1.4f,%1.4f)--(0,%1.4f)--cycle;\n",dd,w,dd,w,h,h) +@y +if (mpx->d==0) { + dd=-mpx->pic_dp*mpx->conv; + w=mpx->conv*mpx->pic_wd; + h=mpx->conv*mpx->pic_ht; + fprintf(mpx->mpxfile, + "setbounds _p to (0,%1.4f)--(%1.4f,%1.4f)--\n",dd,w,dd); + fprintf(mpx->mpxfile, + " (%1.4f,%1.4f)--(0,%1.4f)--cycle;\n",w,h,h); +} else { + dd=-mpx->pic_dp*mpx->conv; + w=-mpx->pic_wd*mpx->conv; + h=mpx->conv*mpx->pic_ht; + fprintf(mpx->mpxfile, + "setbounds _p to (%1.4f,0)--(%1.4f,%1.4f)--\n",h,h,w); + fprintf(mpx->mpxfile, + " (%1.4f,%1.4f)--(%1.4f,0)--cycle;\n", dd,w,dd); +} +@z + +@x +web_integer w;web_integer x;web_integer y;web_integer z; + /* current state values (|h| and |v| have already been declared) */ +web_integer hstack[(stack_size+1)]; +web_integer vstack[(stack_size+1)]; +web_integer wstack[(stack_size+1)]; +web_integer xstack[(stack_size+1)]; +web_integer ystack[(stack_size+1)]; +web_integer zstack[(stack_size+1)]; /* pushed down values in \.{DVI} units */ +@y +integer w;integer x;integer y;integer z;integer d; + /* current state values (|h| and |v| have already been declared) */ +integer hstack[(stack_size+1)]; +integer vstack[(stack_size+1)]; +integer wstack[(stack_size+1)]; +integer xstack[(stack_size+1)]; +integer ystack[(stack_size+1)]; +integer zstack[(stack_size+1)]; +integer dstack[(stack_size+1)]; /* pushed down values in \.{DVI} units */ +@z + +@x +mpx->h=0; mpx->v=0; +@y +mpx->h=0; mpx->v=0; mpx->d=0; +@z + +@x + mpx->hstack[mpx->stk_siz]=mpx->h; + mpx->vstack[mpx->stk_siz]=mpx->v; mpx->wstack[mpx->stk_siz]=mpx->w; + mpx->xstack[mpx->stk_siz]=mpx->x; + mpx->ystack[mpx->stk_siz]=mpx->y; mpx->zstack[mpx->stk_siz]=mpx->z; +@y + mpx->hstack[mpx->stk_siz]=mpx->h; + mpx->vstack[mpx->stk_siz]=mpx->v; mpx->wstack[mpx->stk_siz]=mpx->w; + mpx->xstack[mpx->stk_siz]=mpx->x; + mpx->ystack[mpx->stk_siz]=mpx->y; mpx->zstack[mpx->stk_siz]=mpx->z; + mpx->dstack[mpx->stk_siz]=mpx->d; +@z + +@x + mpx->h=mpx->hstack[mpx->stk_siz]; + mpx->v=mpx->vstack[mpx->stk_siz]; mpx->w=mpx->wstack[mpx->stk_siz]; + mpx->x=mpx->xstack[mpx->stk_siz]; + mpx->y=mpx->ystack[mpx->stk_siz]; mpx->z=mpx->zstack[mpx->stk_siz]; +@y + mpx->h=mpx->hstack[mpx->stk_siz]; + mpx->v=mpx->vstack[mpx->stk_siz]; mpx->w=mpx->wstack[mpx->stk_siz]; + mpx->x=mpx->xstack[mpx->stk_siz]; + mpx->y=mpx->ystack[mpx->stk_siz]; mpx->z=mpx->zstack[mpx->stk_siz]; + mpx->d=mpx->dstack[mpx->stk_siz]; +@z + +@x + case z0: return mpx->z; break; +@y + case z0: return mpx->z; break; + case dir: return mpx_get_byte(mpx); break; +@z + +@x + mpx->h += @; +@y + if (mpx->d==0) { + mpx->h+=mpx_scaled_char_width(mpx, cur_font, p); + } else { + mpx->v+=mpx_scaled_char_width(mpx, cur_font, p); + } +@z + +@x + mpx->h += q; +@y + if (mpx->d==0) { + mpx->h += q; + } else { + mpx->v += q; + } +@z + +@x +case pop: + mpx_do_pop(mpx); + break; +@y +case pop: + mpx_do_pop(mpx); + break; +case dir: + mpx->d=p; + break; +@z + +@x +case four_cases(right1): + mpx->h += trunc(p*mpx->dvi_scale); + break; +case w0: case four_cases(w1): + mpx->w = (web_integer)trunc(p*mpx->dvi_scale); mpx->h += mpx->w; + break; +case x0: case four_cases(x1): + mpx->x = (web_integer)trunc(p*mpx->dvi_scale); mpx->h += mpx->x; + break; +case four_cases(down1): + mpx->v += trunc(p*mpx->dvi_scale); + break; +case y0: case four_cases(y1): + mpx->y = (web_integer)trunc(p*mpx->dvi_scale); mpx->v += mpx->y; + break; +case z0: case four_cases(z1): + mpx->z = (web_integer)trunc(p*mpx->dvi_scale); mpx->v += mpx->z; + break; +@y +case four_cases(right1): + if (mpx->d==0) { + mpx->h+=trunc(p*mpx->dvi_scale); + } else { + mpx->v+=trunc(p*mpx->dvi_scale); + } + break; +case w0: case four_cases(w1): + if (mpx->d==0) { + mpx->h+=mpx->w; + } else { + mpx->v+=mpx->w; + } + break; +case x0: case four_cases(x1): + if (mpx->d==0) { + mpx->h+=mpx->x; + } else { + mpx->v+=mpx->x; + } + break; +case four_cases(down1): + if (mpx->d==0) { + mpx->v+=trunc(p*mpx->dvi_scale); + } else { + mpx->h-=trunc(p*mpx->dvi_scale); + } + break; +case y0: case four_cases(y1): + if (mpx->d==0) { + mpx->v+=mpx->y; + } else { + mpx->h-=mpx->y; + } + break; +case z0: case four_cases(z1): + if (mpx->d==0) { + mpx->v+=mpx->z; + } else { + mpx->h-=mpx->z; + } + break; +@z + +@x +@= +if (mpx_newer(mpxopt->mpname, mpxopt->mpxname)) + return 0 +@y +@= +if (mpx_newer(mpxopt->mpname, mpxopt->mpxname)) + return 0 + +@ ASCII p\TeX JFM ID +@d yoko_jfm_id 11 /* for `yoko-kumi' fonts */ +@d tate_jfm_id 9 /* for `tate-kumi' fonts */ +@d font_jfm_p(A) (mpx->font_id[(A)]!=0) + +@ @= +integer font_nt[max_fonts+1]; /* number of words in ctype table */ +integer font_id[max_fonts+1]; +integer jfm_char_code[max_widths+1]; +integer jfm_char_type[max_widths+1]; +integer jfm_char_index[max_fonts+1]; +integer next_jfm_char_index; + +@ @= +mpx->font_nt[0]=0; +mpx->font_id[0]=0; +mpx->jfm_char_type[0]=0; +mpx->next_jfm_char_index=0; + +@ JFM character type table is stored in the array |jfm_char_code| and +|jfm_char_type|. The character code and the character type of $i$-th +record is stored in |jfm_char_code[i]| and |jfm_char_type[i]|, respectively. +The table is in the order of character code. + +@= +mpx->font_id[f]=mpx->b0*(int)(256)+mpx->b1; +if ((mpx->font_id[f]==yoko_jfm_id) || (mpx->font_id[f]==tate_jfm_id)) { + mpx->font_nt[f]=mpx->b2*(int)(256)+mpx->b3; + mpx_read_tfm_word(mpx); +} else { + mpx->font_id[f]=0; + mpx->font_nt[f]=0; +} + +@ @= +mpx->jfm_char_index[f]=mpx->next_jfm_char_index; +k=mpx->jfm_char_index[f]; +mpx->next_jfm_char_index+=mpx->font_nt[f]; +while (knext_jfm_char_index) { + mpx_read_tfm_word(mpx); + mpx->jfm_char_code[k]=mpx->b0*(int)(256)+mpx->b1; + mpx->jfm_char_type[k]=mpx->b2*(int)(256)+mpx->b3; + k++; +} + +@ JFM character type table is looked up by binary search. + +@= +integer mpx_lookup_ctype (MPX mpx,integer f, integer c) +{ + integer l, u, r, ch; + l=0; u=mpx->font_nt[f]-1; + while (ljfm_char_code[mpx->jfm_char_index[f]+r]; + if (ch==c) { + return mpx->jfm_char_type[mpx->jfm_char_index[f]+r]; + } + if (ch> 8) & 0xff) +@d Lo(x) ( (x) & 0xff) + +@= +void mpx_print_kanji_char (MPX mpx,integer c) +{ + if (mpx->print_col+2>line_length-2 ) { + if (mpx->state==normal) { + fprintf(mpx->mpxfile, "\""); + mpx->state=special; + } + fprintf(mpx->mpxfile, " \n"); + mpx->print_col=0; + } + if (mpx->state==special) { + fprintf(mpx->mpxfile,"&"); + mpx->print_col++; + } + if (mpx->state!=normal) { + fprintf(mpx->mpxfile, "\""); + mpx->print_col++; + mpx->state=normal; + } + c=toBUFF(fromDVI(c)); + putc2(Hi(c), mpx->mpxfile); + mpx->print_col++; + putc2(Lo(c), mpx->mpxfile); + mpx->print_col++; +} +@z --- /dev/null +++ texlive-bin/texk/web2c/pmpostdir/psout.ch @@ -0,0 +1,42 @@ +@x +integer ps_offset; +@y +integer ps_offset; +integer is_mapfile_read; +@z + +@x +mp->ps->ps_offset = 0; +@y +mp->ps->ps_offset = 0; +mp->ps->is_mapfile_read = 0; +@z + +@x + mp->ps->fm_file = (mp->open_file)(mp, n, "r", mp_filetype_fontmap); + if (!mp->ps->fm_file) { +@y + mp->ps->fm_file = (mp->open_file)(mp, n, "r", mp_filetype_fontmap); + if (!mp->ps->fm_file) { + mp->ps->mitem->map_line = mp_xstrdup (mp,psf_tab_name); + n = mp->ps->mitem->map_line; + mp->ps->fm_file = (mp->open_file)(mp, n, "r", mp_filetype_fontmap); + } + if (!mp->ps->fm_file) { +@z + +@x +@d ps_tab_name "psfonts.map" /* locates font name translation table */ +@y +@d ps_tab_name "mpost.map" /* locates font name translation table */ +@d psf_tab_name "psfonts.map" /* locates font name translation table */ +@z + +@x + fm_read_info (mp); +@y + if (mp->ps->is_mapfile_read == 0) { + mp->ps->is_mapfile_read++; + fm_read_info (mp); + } +@z --- /dev/null +++ texlive-bin/texk/web2c/pmpostdir/svgout.ch @@ -0,0 +1,59 @@ +@x +@= + (k=='&')||(k=='>')||(k=='<') +@y +@= + (k=='&')||(k=='>')||(k=='<')||(k>=0x7F) +@z + +@x +@ Now for outputting the actual graphic objects. +@y +@ Now for outputting the actual graphic objects. + +@d yoko_jfm_id 11 /* `yoko-kumi' fonts */ +@d tate_jfm_id 9 /* `tate-kumi' fonts */ +@d font_jfm_p(A) (mp->font_id[(A)]!=0) +@z + +@x Even if prologues=3, Japanese texts are not converted into paths. + if (prologues == 3 ) { +@y + if (prologues == 3 && mp->font_id[gr_font_n(p)]==0) { +@z + +@x To realise vertical Japanese texts ... + mp_svg_attribute(mp, "font-size", mp->svg->buf); +@y + mp_svg_attribute(mp, "font-size", mp->svg->buf); + if ( mp->font_id[gr_font_n(p)]==tate_jfm_id ) { + mp_svg_reset_buf(mp); + append_string("tb-rl"); + mp_svg_attribute(mp, "writing-mode", mp->svg->buf); + } +@z + +@x + while (l-->0) { + k=(int)*s++; + if (@) { +@y + if ( mp->font_id[gr_font_n(p)]!=0 ) { + l >>= 1; + while (l-->0) { + k =((int)*s++)*0x100; k += (int)*s++; + append_string("&#"); + mp_svg_store_int(mp,toUCS(k)); + append_char(';'); + } + } else + while (l-->0) { + k=(int)*s++; + if (@) { +@z + +@x + mp_svg_print(mp, ""); +@y + mp_svg_print(mp, ""); +@z debian/patches/upstream-svn31303-dvipdfmx0000664000000000000000000000073012213264212015412 0ustar --- texk/dvipdfmx/src/jpegimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- texlive-bin.orig/texk/dvipdfmx/src/jpegimage.c +++ texlive-bin/texk/dvipdfmx/src/jpegimage.c @@ -360,7 +360,7 @@ struct JPEG_APPn_JFIF *app_data; int i; for (i = 0; i < j_info->num_appn; i++) { - if (j_info->appn[i].marker == JM_APP0 || + if (j_info->appn[i].marker == JM_APP0 && j_info->appn[i].app_sig == JS_APPn_JFIF) break; } debian/patches/fix-manpages0000664000000000000000000004471012213264212013122 0ustar --- texk/detex/detex-2.8/detex.man | 2 texk/mendexk/mendex.1 | 2 texk/web2c/man/mf.man | 26 +++++----- texk/web2c/man/tex.man | 4 - texk/web2c/synctexdir/man5/synctex.5 | 6 +- texk/xdvik/xdvi.1.in | 88 +++++++++++++++++------------------ 6 files changed, 64 insertions(+), 64 deletions(-) --- texlive-bin.orig/texk/web2c/man/tex.man +++ texlive-bin/texk/web2c/man/tex.man @@ -6,8 +6,8 @@ .if n .ds TX TeX .if n .ds MF Metafont .if t .ds MF M\s-2ETAFONT\s0 -.ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP for troff -.el .ds OX TeX for nroff +.ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP +.el .ds OX TeX .\" the same but obliqued .\" BX definition must follow TX so BX can use TX .if t .ds BX \fRB\s-2IB\s0\fP\*(TX --- texlive-bin.orig/texk/web2c/man/mf.man +++ texlive-bin/texk/web2c/man/mf.man @@ -3,7 +3,7 @@ .\"===================================================================== .if n .ds MF Metafont .if t .ds MF M\s-2ETAFONT\s0 -.if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP +.if t .ds TX \fRT\h'-0.1667m'\v'0.20v'E\v'-0.20v'\h'-0.125m'X\fP .if n .ds TX TeX .ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP for troff .el .ds OX TeX for nroff @@ -12,7 +12,7 @@ .if t .ds BX \fRB\s-2IB\s0\fP\*(TX .if n .ds BX BibTeX .\" LX definition must follow TX so LX can use TX -.if t .ds LX \fRL\\h'-0.36m'\\v'-0.15v'\s-2A\s0\\h'-0.15m'\\v'0.15v'\fP\*(TX +.if t .ds LX \fRL\h'-0.36m'\v'-0.15v'\s-2A\s0\h'-0.15m'\v'0.15v'\fP\*(TX .if n .ds LX LaTeX .if n .ds WB Web .if t .ds WB W\s-2EB\s0 @@ -56,7 +56,7 @@ it will use the .I plain base. When called under any other name, \*(MF will use that name as -the name of the base to use. For example, when called as +the name of the base to use. For example, when called as .B mf the .I mf @@ -92,7 +92,7 @@ .IR mode . (Or you can just say .I mf -and give the other stuff on the next line, without quotes.) Other +and give the other stuff on the next line, without quotes.) Other control sequences, such as .I batchmode (for silent operation) can also appear. @@ -117,7 +117,7 @@ the name of an actual device or, most commonly, the name .I localfont (see below) must -be substituted. If the mode is not specified or is not valid for your +be substituted. If the mode is not specified or is not valid for your site, \*(MF will default to .I proof mode which produces @@ -167,7 +167,7 @@ can be studied in an appendix to the .IR "\*(MF\^book" ; -they were developed by Donald E. Knuth, and this file should never be +they were developed by Donald E.\& Knuth, and this file should never be altered except when it is officially upgraded. Each .I mode_def @@ -370,14 +370,14 @@ Search path for .I input and -.I openin +.I opening files. .TP .B MFEDIT Command template for switching to editor. .TP .B MFTERM -Determines the online graphics display. If MFTERM is not set, +Determines the online graphics display. If MFTERM is not set, and DISPLAY is set, the Metafont window support for X is used. (DISPLAY must be set to a valid X server specification, as usual.) If neither MFTERM nor DISPLAY is set, TERM is used to guess the window @@ -436,24 +436,24 @@ .\"===================================================================== .SH BUGS On January 4, 1986 the ``final'' bug in \*(MF was discovered -and removed. If an error still lurks in the code, Donald E. Knuth promises to +and removed. If an error still lurks in the code, Donald E.\& Knuth promises to pay a finder's fee which doubles every year to the first person who finds it. Happy hunting. .\"===================================================================== .SH "SUGGESTED READING" -Donald E. Knuth, +Donald E.\& Knuth, .I "The \*(MF\^book" (Volume C of .IR "Computers and Typesetting" ), Addison-Wesley, 1986, ISBN 0-201-13445-4. .br -Donald E. Knuth, +Donald E.\& Knuth, .I "\*(MF:\^ The Program" (Volume D of .IR "Computers and Typesetting" ), Addison-Wesley, 1986, ISBN 0-201-13438-1. .br -Donald E. Knuth, +Donald E.\& Knuth, .I Computer Modern Typefaces (Volume E of .IR "Computers and Typesetting" ), @@ -478,7 +478,7 @@ .BR tftopl (1). .\"===================================================================== .SH AUTHORS -\*(MF was designed by Donald E. Knuth, who implemented it +\*(MF was designed by Donald E.\& Knuth, who implemented it using his \*(WB system for Pascal programs. It was originally ported to Unix by Paul Richards at the University of Illinois at Urbana-Champaign. This page was mostly written by Pierre MacKay. --- texlive-bin.orig/texk/xdvik/xdvi.1.in +++ texlive-bin/texk/xdvik/xdvi.1.in @@ -126,7 +126,7 @@ [\fB\-mgs\fP[\fIn\fP] \fIsize\fP] [\fB\-mousemode\fP \fI0|1|2\fP] #ifcolor -[\fB\-nocolor\fP] +[\fB\-nocolor\fP] #endif #ifdps [\fB\-nodps\fP] @@ -165,7 +165,7 @@ #ifps [\fB\-postscript\fP \fIflag\fP] #endif -[\fB\-rulecolor\fP \fIcolor\fP] +[\fB\-rulecolor\fP \fIcolor\fP] [\fB\-rv\fP] [\fB\-S\fP \fIdensity\fP] [\fB\-s\fP \fIshrink\fP] @@ -191,7 +191,7 @@ .B Xdvi is a program for previewing .I dvi -files, as produced e.g. by the +files, as produced e.g.\& by the .BR tex (1) program, under the X window system. .PP @@ -384,12 +384,12 @@ .br For the bitmask representation, multiple values can be specified by adding the numbers that represent the individual bits; -e.g. to debug all all file searching and opening commands, use 4032 +e.g.\& to debug all all file searching and opening commands, use 4032 (= 2048 + 1024 + 512 + 256 + 128 + 64). Use -1 to turn on debugging of everything (this will produce huge output). .br For the string representation, use the strings listed in the following -table, with a comma to separate the values; e.g. to debug +table, with a comma to separate the values; e.g.\& to debug all file searching and opening commands, use .BR search,expand,paths,hash,stat,open . (The option `kpathsea' is provided as a shorthand for these.) @@ -484,7 +484,7 @@ .BR XEDITOR , .BR VISUAL , and -.B EDITOR +.B EDITOR (in this sequence). If the string is found as the value of the .SB VISUAL @@ -625,10 +625,10 @@ .TP .BI \-font " font" .RB ( *font ) -Sets the font used in menus, buttons etc., as described in the +Sets the font used in menus, buttons etc.\&, as described in the .I X(7x) man page. The font for child windows can be set separately, -e.g.: +e.g.\&: .RS 7 .nf .ft 3 @@ -686,7 +686,7 @@ as described in the .I X(7x) man page. The geometry of child windows can be set -separately, e.g.: +separately, e.g.\&: .br .I xdvi*helpwindow.geometry: 600x800 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -1026,7 +1026,7 @@ already running. This argument makes it run in the foreground instead. This is useful for debugging, or if your client application cannot deal well with -a program self-backgrounding itself in this way -- e.g., the IPC functions +a program self-backgrounding itself in this way -- e.g.\&, the IPC functions in .B emacs are known to have problems with this. @@ -1255,7 +1255,7 @@ .B DESCRIPTION above, xdvi will create a temporary copy of the DVI file so that it can be accessed without interruptions even while the file is being -rewritten by +rewritten by .BR TeX . Since this introduces the overhead of copying the file every time it has changed, the @@ -1306,7 +1306,7 @@ .RB ( .pixelsPerInch ) Defines the size of the fonts to use, in pixels per inch. The default value is @BDPI@. This option is provided only for backwards -compatibility; the preferred way is to set both the resolution +compatibility; the preferred way is to set both the resolution and the Metafont mode via the .B \-mfmode option (which see). @@ -1562,7 +1562,7 @@ extensions in both filenames. .TP 2. -Otherwise, if one of the filenames does contain a path component (e.g.: +Otherwise, if one of the filenames does contain a path component (e.g.\&: .IR ./test.tex , .IR ../test.tex , .IR /my/homedir/tex/test.tex @@ -1596,7 +1596,7 @@ .B \-thorough .RB ( .thorough ) .B Xdvi -will usually try to ensure that overstrike characters (e.g., +will usually try to ensure that overstrike characters (e.g.\&, .BR \enotin ) are printed correctly. On monochrome displays, this is always possible with one logical operation, either @@ -1690,7 +1690,7 @@ the DVI file for changes every .I n seconds. If the DVI file has been completely written by TeX, it will -be reloaded automatically. Fractional values (e.g. `2.5') are +be reloaded automatically. Fractional values (e.g.\& `2.5') are possible. The default for this option is 0, i.e. no watching. .br Since xdvi cannot handle partial DVI files, it tries not to reload @@ -1859,7 +1859,7 @@ .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" -.\" ORDINARY KEYS. Note that the special symbols ([ ] + - etc.) are not in +.\" ORDINARY KEYS. Note that the special symbols ([ ] + - etc.\&) are not in .\" strict ASCII order (found that more intuitive). Sequence for each letter .\" is: Alt-Ctrl, Ctrl, uppercase, lowercase. .\" @@ -2050,7 +2050,7 @@ .sp If given a numeric argument that is not 0 or 1, greyscale anti-aliasing is turned on, and the gamma resource is set to the value divided by -100. E.g., +100. E.g.\&, .RB ` 150G ' turns on greyscale and sets gamma to 1.5. #endif @@ -2177,7 +2177,7 @@ .TP .B Ctrl-o .RB [ select-dvi-file() ] -Read a new +Read a new .I dvi file. A file-selection widget is popped up for you to choose the DVI file from. If a prefix argument @@ -2413,7 +2413,7 @@ switched on (if they had been invisible before) or off. .br Toggling the scrollbars may behave erratically with the -Xaw widgets; e.g. the scrollbars may reappear after +Xaw widgets; e.g.\& the scrollbars may reappear after resizing the window, and at certain window sizes one of the scrollbars may fail to disappear. .br @@ -2545,7 +2545,7 @@ .\" Note that in order to assign magnifier actions to .\" the buttons 4 or 5, you need to use the resource .\" .B wheelTranslations -.\" (more about this resource below), e.g.: +.\" (more about this resource below), e.g.\&: .\" .sp .\" xdvi.wheelTranslations: : magnifier(*4)\en\e .\" : magnifier(*5)\en @@ -2597,7 +2597,7 @@ .B text-selection() This action allows you to mark a rectangular region of text in the DVI file. The text is put into the X selection buffer and can be pasted into other -applictions (e.g. text editors). This works similar to the Plain text option +applictions (e.g.\& text editors). This works similar to the Plain text option in the .B Save dialog; see the discussion there for more information on encoding issues. @@ -2693,7 +2693,7 @@ .PP Mouse actions should refer only to .B ButtonPress -events (e.g., +events (e.g.\&, .BR ":magnifier(*1)" ). The corresponding motion and release events will be handled internally. A key action may be bound to a mouse event, but not vice versa. @@ -2937,7 +2937,7 @@ .\" .fi .\" .RE .\" .PP -.\" If a link points to a file which is not a DVI file (e.g. HTML, or +.\" If a link points to a file which is not a DVI file (e.g.\& HTML, or .\" PostScript), the files .\" .B mime.types .\" and @@ -2985,9 +2985,9 @@ This emphasizes the fact that searching in the formatted text (the DVI output) works differently from searching in the source text: Searching in the DVI file makes it easier to -skip formatting instructions, and makes it possible to search for e.g. +skip formatting instructions, and makes it possible to search for e.g.\& hyphenation and equation numbers; but sometimes the -formatting results can also get in the way, e.g. in the case of +formatting results can also get in the way, e.g.\& in the case of footnotes. In these cases it's better to search in the \*(Te\& source instead. The use of .I source specials @@ -3061,10 +3061,10 @@ .TP - \fIa|b\fR matches \fIa\fR or \fIb\fR. Brackets can be used -for grouping, e.g.: \fI(a|b)|c\fR. +for grouping, e.g.\&: \fI(a|b)|c\fR. .TP - -The string matched by the nth group can be referenced by \fI\en\fR, e.g. \fI\e1\fR refers to the +The string matched by the nth group can be referenced by \fI\en\fR, e.g.\& \fI\e1\fR refers to the first match. .TP - @@ -3086,7 +3086,7 @@ These can be negated by inserting a \fI^\fR symbol after the first bracket: .I [^[:alpha:]] -For more details on POSIX regular expressions, see e.g. the +For more details on POSIX regular expressions, see e.g.\& the .B IEEE Std 1003.1 standard definition available online from: @@ -3174,7 +3174,7 @@ listed in the .B Dvips options field are segmented at whitespaces and passed as separate arguments to dvips. -If you e.g. want to print the file 2-up, you should enter +If you e.g.\& want to print the file 2-up, you should enter the following string into the .B Printer field: @@ -3192,16 +3192,16 @@ .B dvipsPrinterString .TP .B dvipsOptionsString -These can be used to provide default entries for the +These can be used to provide default entries for the .B Printer and the .B Dvips options text fields, respectively. If no paper size is specified in the DVI file -(via e.g. \eusepackage[dvips]{geometry} - this is the preferred method), +(via e.g.\& \eusepackage[dvips]{geometry} - this is the preferred method), the input field is initialized with the current value of the command line option/X resource .BR paper . -E.g., the option +E.g.\&, the option .I -paper a4r is translated into the dvips options .IR "-t a4 -t landscape" . @@ -3243,8 +3243,8 @@ .TP - Plain text in ISO-8859-1 or UTF-8 encoding. The latter will preserve more -of the special LaTeX characters e.g. from mathematical mode. Note however -that e.g. only few of LaTeX's mathematical symbols can be rendered correctly +of the special LaTeX characters e.g.\& from mathematical mode. Note however +that e.g.\& only few of LaTeX's mathematical symbols can be rendered correctly as text; so this funcionality works best for plain text documents. If a character cannot be displayed in the selected charset, it is replaced by `\e' followed by the hexadecimal character code. @@ -3348,7 +3348,7 @@ are supported (these names are case-insensitive). .br Note that UTF-8 is -the only encoding that can render all characters (e.g. mathematical +the only encoding that can render all characters (e.g.\& mathematical symbols) of a DVI file. If ISO-8859-1 is active, characters that cannot be displayed are replaced by `\e' followed by the hexadecimal character code. For other encodings, such characters may trigger iconv error messages. @@ -3432,7 +3432,7 @@ pixmap should have width \fIn\fR x \fIh\fR if \fIh\fR is the height of the pixmap. .PP -The resource +The resource .B toolbarTranslations can be used to map icons/buttons to specific actions. The resource should contain a string separated by newline characters, @@ -3663,7 +3663,7 @@ .BR xdvi , unless your system administrator or TeX distribution has already done so (which is the case -e.g. for current TeX Live systems). For the 35 PostScript resident +e.g.\& for current TeX Live systems). For the 35 PostScript resident fonts, .B xdvik will search using the @@ -3688,7 +3688,7 @@ .RB `` xdvi: ''. Doing so does not change the behavior of the special under .BR xdvi , -but it tells other dvi drivers (such as e.g. dvips) to ignore the special. +but it tells other dvi drivers (such as e.g.\& dvips) to ignore the special. .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .SH SOURCE SPECIALS @@ -3726,7 +3726,7 @@ inherited across pages. .sp You will need a \*(Te\& implementation that provides an appropriate -switch (e.g. +switch (e.g.\& .IR -src ) or a macro package (such as @@ -3802,12 +3802,12 @@ If an asterisk .RB ( * ) appears just before the width, then the measurements refer to the document -dimensions (e.g., +dimensions (e.g.\&, .B pt as opposed to .BR truept ). This allows a macro package to vary the page size according to elements -of the document; e.g., +of the document; e.g.\&, .RS 5 .ft 3 .nf @@ -3863,7 +3863,7 @@ .B dvips documentation) is not supported. There are also some restrictions due to the way xdvi's drawing routines -are implemented; e.g. the +are implemented; e.g.\& the .B \ecolorbox and .B \efcolorbox @@ -4244,11 +4244,11 @@ and .B \efcolorbox macros; this is not likely to change in the near future. This also -means that e.g. colored tables (as created by the +means that e.g.\& colored tables (as created by the .I colortbl package) may render incorrectly: Text in colors different from the default foreground color may not be displayed. When the page is -redrawn (e.g. after using the magnifier), the background color of the +redrawn (e.g.\& after using the magnifier), the background color of the cells may overdraw the text. #endif .SH FILES --- texlive-bin.orig/texk/web2c/synctexdir/man5/synctex.5 +++ texlive-bin/texk/web2c/synctexdir/man5/synctex.5 @@ -102,7 +102,7 @@ .It .Li * .It -.Li ... +.Li \&...\& .It .Li .It @@ -276,7 +276,7 @@ Typically, one applies a dvi to pdf filter with offset options and magnification, then he appends the same options to the synctex file, for example .Bd -literal -offset indent - synctex update -o foo.pdf -m 0.486 -x 9472573sp -y 13.3dd source.dvi +synctex update -o foo.pdf -m 0.486 -x 9472573sp -y 13.3dd source.dvi .Ed .Bl -item -offset indent .\" @@ -311,7 +311,7 @@ The byte offset is an implicit anchor to navigate the synctex file from sheet to sheet. .\" nroff -man synctex.5 | less .\"groff -man -Tascii synctex.5 | less -.\"To convert a man page to plain pre-formatted text (e.g for spell checking) use: +.\"To convert a man page to plain pre-formatted text (e.g. for spell checking) use: .\"nroff -man synctex.5 | col -b > synctex.5.txt .\"To convert it to Postscript (for printing or further conversion to pdf) use: .\"groff -man -Tps synctex.5 > synctex.5.ps --- texlive-bin.orig/texk/mendexk/mendex.1 +++ texlive-bin/texk/mendexk/mendex.1 @@ -1,6 +1,6 @@ .if t .ds TX "T\h'-.15m'\v'.2v'E\v'-.2v'\h'-.12m'X .if t .ds LX L\v'-.22m'a\v'.22m'T\h'-.1667m'\v'.22m'E\h'-.125m'\v'-.22m'X -.TH MENDEX L +.TH MENDEX 1 .SH ̾¾Î mendex \- º÷°úÀ°·Á¥Ä¡¼¥ë .SH »ÈÍÑË¡ --- texlive-bin.orig/texk/detex/detex-2.8/detex.man +++ texlive-bin/texk/detex/detex-2.8/detex.man @@ -1,4 +1,4 @@ -.TH DETEX 1L "12 August 1993" "Purdue University" +.TH DETEX 1 "12 August 1993" "Purdue University" .SH NAME detex \- a filter to strip \fITeX\fP commands from a .tex file. .SH SYNOPSIS debian/patches/xdvi-upupstream-fixes0000664000000000000000000006662712213264212015047 0ustar --- texk/xdvik/CHANGES | 10 ++ texk/xdvik/c-auto.in | 8 - texk/xdvik/configure.ac | 1 texk/xdvik/dvi-init.c | 4 texk/xdvik/events.c | 13 ++ texk/xdvik/gui/Panner.c | 18 ++- texk/xdvik/gui/help-window.c | 10 +- texk/xdvik/gui/mag.c | 12 ++ texk/xdvik/gui/pagesel.c | 4 texk/xdvik/gui/print-dialog.c | 5 + texk/xdvik/gui/search-dialog.c | 2 texk/xdvik/gui/sfSelFile.c | 18 ++- texk/xdvik/gui/xm_filesel.c | 10 +- texk/xdvik/m4/xdvi-func-xkbbell.m4 | 29 +++++ texk/xdvik/util.c | 4 texk/xdvik/x_util.c | 179 ++++++++++++++----------------------- texk/xdvik/x_util.h | 3 texk/xdvik/xdvi.c | 10 -- texk/xdvik/xdvi.h | 8 - 19 files changed, 197 insertions(+), 151 deletions(-) Index: texlive-bin-2012.20120623/texk/xdvik/CHANGES =================================================================== --- texlive-bin-2012.20120623.orig/texk/xdvik/CHANGES 2012-04-02 17:27:30.000000000 +0900 +++ texlive-bin-2012.20120623/texk/xdvik/CHANGES 2012-06-23 19:18:45.461791034 +0900 @@ -9,6 +9,16 @@ may contain undetected bugs. Such versions shouldn't be used by distributors. + * 22.85.01-CVS4 (2012-04-23): + + xdvi.h, xdvi.c, x_util.h, x_util.c, dvi-init.c: Fixed bugs in + property handling on 64-bit systems (related to source specials). + + m4/xdvi-check-iconv.m4, m4/xdvi-check-langinfo.m4, + m4/xdvi-func-working-vsnprintf.m4: fixed copyright notices; + configure.ac: removed some obsolete lines. + + Added support for XkbBell, to make the console bell work again. + + Fixed #3514485 (mksedscript improperly handles macro values in + c-auto.in that contain spaces) (fix from TeX Live). + * 22.85 (2012-04-01): + configure.ac: check for ulltostr is no longer used + hypertex.c, gui/xm_toolbar.c: avoid compiler warnings about mixed Index: texlive-bin-2012.20120623/texk/xdvik/c-auto.in =================================================================== --- texlive-bin-2012.20120623.orig/texk/xdvik/c-auto.in 2012-04-25 23:45:36.000000000 +0900 +++ texlive-bin-2012.20120623/texk/xdvik/c-auto.in 2012-06-23 19:18:45.469791040 +0900 @@ -305,6 +305,9 @@ /* Define if you have the header file. */ #undef HAVE_X11_XPM_H +/* Define if your system has XkbBell(). */ +#undef HAVE_XKB_BELL_EXT + /* Define to 1 if you have the header file. */ #undef HAVE_XM_XPMP_H @@ -405,11 +408,6 @@ /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS Index: texlive-bin-2012.20120623/texk/xdvik/configure.ac =================================================================== --- texlive-bin-2012.20120623.orig/texk/xdvik/configure.ac 2012-04-18 18:29:09.000000000 +0900 +++ texlive-bin-2012.20120623/texk/xdvik/configure.ac 2012-06-23 19:20:03.533794644 +0900 @@ -87,6 +87,7 @@ XDVI_SYS_STREAMS XDVI_SYS_OLD_LINUX XDVI_FUNC_POLL +XDVI_FUNC_XKB_BELL dnl ####### Index: texlive-bin-2012.20120623/texk/xdvik/dvi-init.c =================================================================== --- texlive-bin-2012.20120623.orig/texk/xdvik/dvi-init.c 2012-06-23 19:14:31.957783059 +0900 +++ texlive-bin-2012.20120623/texk/xdvik/dvi-init.c 2012-06-23 19:18:45.513791036 +0900 @@ -1642,8 +1642,8 @@ dvi_property_length = strlen(globals.dvi_name) + 1; /* also copy the terminating 0 */ dvi_property = xmalloc(dvi_property_length); - /* NOTE: we don't use dvi_inode like non-k xdvi, since dvi_name is - always fully expanded with xdvik. */ + /* NOTE: we don't use dvi_inode like non-k xdvi, since xdvik keeps closer + track of when the path points to a different inode. */ strcpy(dvi_property, globals.dvi_name); } Index: texlive-bin-2012.20120623/texk/xdvik/events.c =================================================================== --- texlive-bin-2012.20120623.orig/texk/xdvik/events.c 2012-06-23 19:14:31.957783059 +0900 +++ texlive-bin-2012.20120623/texk/xdvik/events.c 2012-06-23 19:18:45.513791036 +0900 @@ -103,6 +103,14 @@ extern int errno; #endif /* X_NOT_STDC_ENV */ +#if HAVE_XKB_BELL_EXT +# include +# define XdviBell(display, window, percent) \ + XkbBell(display, window, percent, (Atom) None) +#else +# define XdviBell(display, window, percent) XBell(display, percent) +#endif + /* Linux prefers O_ASYNC over FASYNC; SGI IRIX does the opposite. */ #if !defined(FASYNC) && defined(O_ASYNC) # define FASYNC O_ASYNC @@ -1296,7 +1304,7 @@ if (event->type != ButtonPress || mouse_release != null_mouse || MAGNIFIER_ACTIVE || mane.shrinkfactor == 1 || *num_params != 1) { - XBell(DISP, 0); + XdviBell(DISP, event->xany.window, 0); if (mane.shrinkfactor == 1) { statusline_info(STATUS_SHORT, "No magnification available at shrink factor 1"); @@ -5284,7 +5292,8 @@ that window. */ if (have_src_specials && do_update_property - && globals.win_expose.min_x != 1 && globals.win_expose.max_y - globals.win_expose.min_y != 1 + && globals.win_expose.min_x != 1 + && globals.win_expose.max_y - globals.win_expose.min_y != 1 && currwin.base_x == 0 && currwin.base_y == 0) { update_window_property(XtWindow(globals.widgets.top_level), True); } Index: texlive-bin-2012.20120623/texk/xdvik/gui/Panner.c =================================================================== --- texlive-bin-2012.20120623.orig/texk/xdvik/gui/Panner.c 2008-07-02 00:42:36.000000000 +0900 +++ texlive-bin-2012.20120623/texk/xdvik/gui/Panner.c 2012-06-23 19:18:45.521791036 +0900 @@ -48,6 +48,14 @@ extern Bool XmuDistinguishablePixels(); /* not defined in any Xmu headers */ +#if HAVE_XKB_BELL_EXT +# include +# define panBell(display, window, percent) \ + XkbBell(display, window, percent, (Atom) None) +#else +# define panBell(display, window, percent) XBell(display, percent) +#endif + /* ====================================================================== begin copy from Simple.c @@ -1020,7 +1028,7 @@ UNUSED(num_params); if (!get_event_xy (pw, event, &x, &y)) { - XBell (XtDisplay(gw), 0); /* should do error message */ + panBell(XtDisplay(gw), XtWindow(gw), 0); /* should do error message */ return; } @@ -1085,7 +1093,7 @@ if (!pw->panner.tmp.doing) return; if (!get_event_xy (pw, event, &x, &y)) { - XBell (XtDisplay(gw), 0); /* should do error message */ + panBell(XtDisplay(gw), XtWindow(gw), 0); /* should do error message */ return; } @@ -1116,7 +1124,7 @@ UNUSED(num_params); if (*num_params != 2) { - XBell (XtDisplay(gw), 0); + panBell (XtDisplay(gw), XtWindow(gw), 0); return; } @@ -1205,7 +1213,7 @@ if (*num_params < 2 || XmuCompareISOLatin1 (params[0], "rubberband") != 0) { - XBell (XtDisplay(gw), 0); + panBell (XtDisplay(gw), XtWindow(gw), 0); return; } @@ -1216,7 +1224,7 @@ } else if (XmuCompareISOLatin1 (params[1], "toggle") == 0) { rb = !pw->panner.rubber_band; } else { - XBell (XtDisplay(gw), 0); + panBell (XtDisplay(gw), XtWindow(gw), 0); return; } Index: texlive-bin-2012.20120623/texk/xdvik/gui/help-window.c =================================================================== --- texlive-bin-2012.20120623.orig/texk/xdvik/gui/help-window.c 2009-06-29 08:47:26.000000000 +0900 +++ texlive-bin-2012.20120623/texk/xdvik/gui/help-window.c 2012-06-23 19:18:45.521791036 +0900 @@ -56,6 +56,14 @@ #include "topic-window.h" #include "help-window.h" +#if HAVE_XKB_BELL_EXT +# include +# define XdviBell(display, window, percent) \ + XkbBell(display, window, percent, (Atom) None) +#else +# define XdviBell(display, window, percent) XBell(display, percent) +#endif + /* missing features that will be listed in the help window */ #if !XDVI_XT_TIMER_HACK #define HAVE_MISSING_FEATURES 1 @@ -1087,7 +1095,7 @@ } } if (!matched) { - XBell(DISP, 0); + XdviBell(DISP, XtWindow(help_shell), 0); popup_message(help_shell, MSG_WARN, NULL, Index: texlive-bin-2012.20120623/texk/xdvik/gui/mag.c =================================================================== --- texlive-bin-2012.20120623.orig/texk/xdvik/gui/mag.c 2008-07-02 00:42:36.000000000 +0900 +++ texlive-bin-2012.20120623/texk/xdvik/gui/mag.c 2012-06-23 19:18:45.521791036 +0900 @@ -52,6 +52,14 @@ #include "util.h" #include "pagesel.h" +#if HAVE_XKB_BELL_EXT +# include +# define XdviBell(display, window, percent) \ + XkbBell(display, window, percent, (Atom) None) +#else +# define XdviBell(display, window, percent) XBell(display, percent) +#endif + /* to measure distance of pointer from ruler in ruler mode */ static int g_ruler_pos_x = 0, g_ruler_pos_y = 0; @@ -627,7 +635,7 @@ int n = atoi(p + 1) - 1; if (n < 0 || n >= (int)get_magglass_items() || get_magglass_width(n) <= 0) { - XBell(DISP, 0); + XdviBell(DISP, event->xany.window, 0); return; } magnifier.width = get_magglass_width(n); @@ -642,7 +650,7 @@ magnifier.width = 0; } if (magnifier.width == 0) { - XBell(DISP, 0); + XdviBell(DISP, event->xany.window, 0); return; } } Index: texlive-bin-2012.20120623/texk/xdvik/gui/pagesel.c =================================================================== --- texlive-bin-2012.20120623.orig/texk/xdvik/gui/pagesel.c 2008-07-02 00:42:36.000000000 +0900 +++ texlive-bin-2012.20120623/texk/xdvik/gui/pagesel.c 2012-06-23 19:18:45.521791036 +0900 @@ -728,7 +728,7 @@ int pageno = current_page; if (button == 5) { if (current_page >= total_pages - 1) { - XBell(DISP, 0); + xdvi_bell(); /* statusline_info(STATUS_SHORT, "Last page of DVI file"); */ return; } @@ -736,7 +736,7 @@ } else { if (current_page == 0) { - XBell(DISP, 0); + xdvi_bell(); /* statusline_info(STATUS_SHORT, "First page of DVI file"); */ return; } Index: texlive-bin-2012.20120623/texk/xdvik/gui/print-dialog.c =================================================================== --- texlive-bin-2012.20120623.orig/texk/xdvik/gui/print-dialog.c 2009-03-31 23:59:37.000000000 +0900 +++ texlive-bin-2012.20120623/texk/xdvik/gui/print-dialog.c 2012-06-23 19:18:45.521791036 +0900 @@ -91,6 +91,11 @@ #define XTranslations XtNtranslations #endif /* MOTIF */ +#if HAVE_XKB_BELL_EXT +# include +# define XBell(dpy, percent) XkbBell(dpy, mane.win, percent, (Atom) None) +#endif + struct output_format_mapping { const char *fmt_string; outputFormatT fmt; Index: texlive-bin-2012.20120623/texk/xdvik/gui/search-dialog.c =================================================================== --- texlive-bin-2012.20120623.orig/texk/xdvik/gui/search-dialog.c 2009-03-31 23:59:37.000000000 +0900 +++ texlive-bin-2012.20120623/texk/xdvik/gui/search-dialog.c 2012-06-23 19:18:45.533791040 +0900 @@ -339,7 +339,7 @@ return; } - XBell(DISP, 0); + xdvi_bell(); popup_message(get_matching_parent(w, globals.widgets.top_level, "find_popup", NULL), MSG_ERR, NULL, Index: texlive-bin-2012.20120623/texk/xdvik/gui/sfSelFile.c =================================================================== --- texlive-bin-2012.20120623.orig/texk/xdvik/gui/sfSelFile.c 2009-11-10 19:28:49.000000000 +0900 +++ texlive-bin-2012.20120623/texk/xdvik/gui/sfSelFile.c 2012-06-23 19:18:45.533791040 +0900 @@ -54,6 +54,14 @@ extern int errno; #endif +#if HAVE_XKB_BELL_EXT +# include +# define sfBell(display, window, percent) \ + XkbBell(display, window, percent, (Atom) None) +#else +# define sfBell(display, window, percent) XBell(display, percent) +#endif + #define SEL_FILE_CANCEL -1 #define SEL_FILE_OK 0 #define SEL_FILE_NULL 1 @@ -147,7 +155,7 @@ raise_file_selector(void) { if (selFile != NULL && XtIsManaged(selFile)) { - XBell(DISP, 10); + sfBell(DISP, XtWindow(selFile), 10); XRaiseWindow(DISP, XtWindow(selFile)); return; } @@ -795,7 +803,9 @@ SFchdir(SFstartDir); errno = 0; if (!name || *name == 0 || (fp = XFOPEN(name, mode)) == NULL) { - XBell(DISP, 0); + sfBell(DISP, + (selFile != NULL && XtIsManaged(selFile)) + ? XtWindow(selFile) : (Window) NULL, 0); return NULL; } return fp; @@ -854,7 +864,7 @@ XEvent event; if (XtIsManaged(callback->shell)) { - XBell(DISP, 10); + sfBell(DISP, XtWindow(callback->shell), 10); XRaiseWindow(DISP, XtWindow(callback->shell)); return; } @@ -966,7 +976,7 @@ w = XtParent(w); } if (w == NULL || w == globals.widgets.top_level) { - XBell(DISP, 0); + sfBell(DISP, event.xany.window, 0); continue; } break; Index: texlive-bin-2012.20120623/texk/xdvik/gui/xm_filesel.c =================================================================== --- texlive-bin-2012.20120623.orig/texk/xdvik/gui/xm_filesel.c 2009-11-10 19:28:49.000000000 +0900 +++ texlive-bin-2012.20120623/texk/xdvik/gui/xm_filesel.c 2012-06-23 19:18:45.533791040 +0900 @@ -43,6 +43,14 @@ #include #include +#if HAVE_XKB_BELL_EXT +# include +# define XdviBell(display, window, percent) \ + XkbBell(display, window, percent, (Atom) None) +#else +# define XdviBell(display, window, percent) XBell(display, percent) +#endif + /* static Widget dialog = NULL; */ /* static char *browse_fname = NULL; */ @@ -156,7 +164,7 @@ XsraSelFilePopup(struct filesel_callback *callback) { if (XtIsManaged(callback->shell)) { - XBell(DISP, 10); + XdviBell(DISP, XtWindow(callback->shell), 10); XRaiseWindow(DISP, XtWindow(callback->shell)); return; } Index: texlive-bin-2012.20120623/texk/xdvik/util.c =================================================================== --- texlive-bin-2012.20120623.orig/texk/xdvik/util.c 2012-04-02 17:27:30.000000000 +0900 +++ texlive-bin-2012.20120623/texk/xdvik/util.c 2012-06-23 19:18:45.537791036 +0900 @@ -83,6 +83,10 @@ extern void *realloc(); #endif +#if HAVE_XKB_BELL_EXT +# include +# define XBell(dpy, percent) XkbBell(dpy, mane.win, percent, (Atom) None) +#endif /* if POSIX O_NONBLOCK is not available, use O_NDELAY */ #if !defined O_NONBLOCK && defined O_NDELAY Index: texlive-bin-2012.20120623/texk/xdvik/x_util.c =================================================================== --- texlive-bin-2012.20120623.orig/texk/xdvik/x_util.c 2012-06-23 19:14:31.957783059 +0900 +++ texlive-bin-2012.20120623/texk/xdvik/x_util.c 2012-06-23 19:18:45.537791036 +0900 @@ -196,35 +196,24 @@ }; static Atom atoms[XtNumber(atom_names)]; -Window -get_window_id(char *window_p) -{ - Window w; - unsigned char *tmp; - tmp = (unsigned char *)window_p; - -#if !(defined(WORD64) || defined(LONG64)) - w = (*((xuint32 *) window_p)); +/* + * On 64-bit platforms, XGetWindowProperty and related functions convert + * properties with format=32 to arrays of longs. This function keeps that + * convention. + * The return value is the total number of bytes in the buffer. + */ + +#if defined(WORD64) || defined(LONG64) +# define LONG_CONV_64(bytes, format) ((bytes) << ((format) >> 5)) #else -# if WORDS_BIGENDIAN - w = ((unsigned long)tmp[0] << 24) | - ((unsigned long)tmp[1] << 16) | - ((unsigned long)tmp[2] << 8) | - (unsigned long)tmp[3]; -# else - w = ((unsigned long)tmp[3] << 24) | - ((unsigned long)tmp[2] << 16) | - ((unsigned long)tmp[1] << 8) | - (unsigned long)tmp[0]; -# endif +# define LONG_CONV_64(bytes, format) (bytes) #endif - return w; -} size_t property_get_data(Window w, Atom a, char **ret_buf, int (*x_get_property)(Display *, Window, Atom, long, - long, Bool, Atom, Atom *, int *, unsigned long *, + long, Bool, Atom, + Atom *, int *, unsigned long *, unsigned long *, unsigned char **)) { /* all of these are in 8-bit units */ @@ -253,13 +242,17 @@ nitems_ret *= (format_ret / 8); /* convert to bytes */ - while ((byte_offset + nitems_ret) >= buffer_len) { - buffer_len += 256; - buffer = xrealloc(buffer, buffer_len); + if (LONG_CONV_64(byte_offset + nitems_ret, format_ret) >= buffer_len) { + buffer_len += 256 + * ((LONG_CONV_64(byte_offset + nitems_ret, format_ret) + - buffer_len) / 256 + 1); + buffer = (buffer == NULL ? xmalloc(buffer_len) + : xrealloc(buffer, buffer_len)); } /* the +1 captures the extra '\0' that Xlib puts after the end. */ - memcpy(buffer + byte_offset, prop_ret, nitems_ret + 1); + memcpy(buffer + LONG_CONV_64(byte_offset, format_ret), prop_ret, + LONG_CONV_64(nitems_ret, format_ret) + 1); byte_offset += nitems_ret; XFree(prop_ret); @@ -273,42 +266,28 @@ XFree(prop_ret); *ret_buf = (char *)buffer; - return byte_offset; + return LONG_CONV_64(byte_offset, format_ret); } -size_t -property_get_window_list(char **window_list) +static size_t +property_get_window_list(long **window_list) { size_t len = property_get_data(DefaultRootWindow(DISP), - atom_xdvi_windows(), window_list, + atom_xdvi_windows(), (char **) window_list, XGetWindowProperty); if (len == 0) { TRACE_CLIENT((stderr, "No \"xdvi windows\" property found")); return 0; } - if (len % 4 != 0) { - TRACE_CLIENT((stderr, "\"XDVI_WINDOWS\" property had incorrect size; deleting it.")); + if (len % sizeof(long) != 0) { + TRACE_CLIENT((stderr, + "\"XDVI_WINDOWS\" property had incorrect size; deleting it.")); XDeleteProperty(DISP, DefaultRootWindow(DISP), atom_xdvi_windows()); return 0; } - return len; -} -void -set_window_id(Window w, unsigned char *data) -{ -#if WORDS_BIGENDIAN - data[0] = (unsigned int)w >> 24; - data[1] = (unsigned int)w >> 16; - data[2] = (unsigned int)w >> 8; - data[3] = (unsigned int)w; -#else - data[0] = (unsigned int)w; - data[1] = (unsigned int)w >> 8; - data[2] = (unsigned int)w >> 16; - data[3] = (unsigned int)w >> 24; -#endif + return len / sizeof (long); } /** @@ -325,16 +304,16 @@ /* - * Delete all occurences of window w from the window list property. Then, - * if `prepend' is true, prepend the window ID to the existing list. + * Delete all occurrences of window w from the window list property. + * Then, if `prepend' is true, prepend the window ID to the existing list. */ void update_window_property(Window w, Boolean prepend) { - char *wlist; + long *wlist; size_t wlist_len; - char *wlist_end; - char *wp; + long *wlist_end; + long *wp; #if 0 int i; #endif /* 0 */ @@ -347,33 +326,27 @@ wlist_end = wlist + wlist_len; #if 0 - for (i = 0, wp = wlist; wp < wlist_end; wp += 4, i++) { - fprintf(stderr, "WIN %d: %08lx; len: %d\n", i, get_window_id(wp), wlist_len); + for (i = 0, wp = wlist; wp < wlist_end; ++wp, ++i) { + fprintf(stderr, "WIN %d: %08lx; len: %d\n", i, *wp, wlist_len); } #endif /* 0 */ - for (wp = wlist; wp < wlist_end; wp += 4) { - if (get_window_id(wp) == w) { /* match, remove our ID */ - wlist_len -= 4; - wlist_end -= 4; - memmove(wp, wp + 4, wlist_end - wp); - wp -= 4; /* new item is now at wp; don't skip it in next iteration */ + for (wp = wlist; wp < wlist_end; ++wp) { + if (*wp == w) { /* match, remove our ID */ + --wlist_len; + --wlist_end; + memmove(wp, wp + 1, (wlist_end - wp) * sizeof (long)); + --wp; /* new item is now at wp; don't skip it in next iteration */ } } if (prepend) { /* add our ID again to front */ -#if (defined(WORD64) || defined(LONG64)) - unsigned char data[4]; - set_window_id(w, data); -#else - xuint32 data = w; -#endif /* Note: no need to realloc wlist, since the original length was sufficient for all elements. */ - memmove(wlist + 4, wlist, wlist_len); - wlist_len += 4; - memcpy(wlist, &data, 4); + memmove(wlist + 1, wlist, wlist_len * sizeof (long)); + ++wlist_len; + *wlist = w; } if (wlist_len == 0) @@ -382,8 +355,7 @@ else XChangeProperty(DISP, DefaultRootWindow(DISP), atom_xdvi_windows(), atom_xdvi_windows(), 32, - PropModeReplace, (unsigned char *)wlist, - wlist_len / 4); + PropModeReplace, (unsigned char *)wlist, wlist_len); XFlush(DISP); } @@ -1102,30 +1074,32 @@ } /* - * Check for another running copy of xdvi. If same_file is true, return - * the window ID of that other instance only if it has currently loaded the - * same file; else, return 0. + * Check for another running copy of xdvi. + * If same_file is true, return the window ID of an instance that has + * currently loaded the same file, or 0 if none exists. * If same_file is false, return the first valid xdvi window ID. */ + Window get_xdvi_window_id(Boolean same_file, property_cbT callback) { - char *window_list; + long *window_list; size_t window_list_len; - char *window_list_end; - char *wp; - char *p; + long *window_list_end; + long *wp; + long *p; Boolean need_rewrite = False; Window ret_window = 0; /* - * Get window list. Copy it over (we'll be calling property_get_data() again). + * Get window list. + * Copy it over (we'll be calling property_get_data() again). */ if ((window_list_len = property_get_window_list(&p)) == 0) return 0; - window_list = xmalloc(window_list_len); - memcpy(window_list, p, window_list_len); + window_list = xmalloc(window_list_len * sizeof (long)); + memcpy(window_list, p, window_list_len * sizeof (long)); XdviOldErrorHandler = XSetErrorHandler(XdviErrorHandler); @@ -1134,16 +1108,13 @@ window_list_end = window_list + window_list_len; TRACE_CLIENT((stderr, "My property: `%s'", dvi_property)); - for (wp = window_list; wp < window_list_end; wp += 4) { - Window w; + for (wp = window_list; wp < window_list_end; ++wp) { char *buf_ret; size_t len; - w = get_window_id(wp); - - TRACE_CLIENT((stderr, "Checking window %08lx", w)); + TRACE_CLIENT((stderr, "Checking window %08lx", *wp)); - len = property_get_data(w, atom_dvi_file(), &buf_ret, + len = property_get_data((Window) *wp, atom_dvi_file(), &buf_ret, XdviGetWindowProperty); if (len == 0) { @@ -1151,39 +1122,33 @@ that the application the window had belonged to had been killed with signal 9 */ - TRACE_CLIENT((stderr, "Window %08lx: doesn't exist any more, deleting", w)); - window_list_len -= 4; - window_list_end -= 4; - memmove(wp, wp + 4, window_list_end - wp); - wp -= 4; /* new item is now at wp; don't skip it in next iteration */ + TRACE_CLIENT((stderr, + "Window %08lx: doesn't exist any more, deleting", *wp)); + --window_list_len; + --window_list_end; + memmove(wp, wp + 1, (window_list_end - wp) * sizeof (long)); + --wp; /* new item is now at wp; don't skip it in next iteration */ need_rewrite = True; continue; } else { /* window still alive */ if (globals.debug & DBG_CLIENT) { -#if 0 - unsigned long ino; - int i; - - ino = 0; - for (i = 7; i >= 0; --i) - ino = (ino << 8) | (unsigned char)(buf_ret[i]); -#endif - TRACE_CLIENT((stderr, "Window %08lx: property: `%s'", w, buf_ret)); + TRACE_CLIENT((stderr, + "Window %08lx: property: `%s'", *wp, buf_ret)); } /* invoke callback if given */ if (callback != NULL) { - callback(w); + callback((Window) *wp); } if (!same_file && ret_window == 0) { - ret_window = w; + ret_window = *wp; if (callback == 0) /* can return early */ break; } else if (strcmp(buf_ret, dvi_property) == 0 && ret_window == 0) { /* match */ - ret_window = w; + ret_window = *wp; if (callback == 0) /* can return early */ break; } @@ -1196,7 +1161,7 @@ XChangeProperty(DISP, DefaultRootWindow(DISP), atom_xdvi_windows(), atom_xdvi_windows(), 32, PropModeReplace, (unsigned char *)window_list, - window_list_len / 4); + window_list_len); return ret_window; } Index: texlive-bin-2012.20120623/texk/xdvik/x_util.h =================================================================== --- texlive-bin-2012.20120623.orig/texk/xdvik/x_util.h 2012-06-23 19:14:31.957783059 +0900 +++ texlive-bin-2012.20120623/texk/xdvik/x_util.h 2012-06-23 19:18:45.537791036 +0900 @@ -50,10 +50,7 @@ long, Bool, Atom, Atom *, int *, unsigned long *, unsigned long *, unsigned char **)); -extern size_t property_get_window_list(char **window_list); extern void set_dvi_property(void); -extern void set_window_id(Window w, unsigned char *data); -extern Window get_window_id(char *window_p); extern void update_window_property(Window w, Boolean prepend); extern void update_dvi_property(void); extern void property_initialize(void); Index: texlive-bin-2012.20120623/texk/xdvik/xdvi.c =================================================================== --- texlive-bin-2012.20120623.orig/texk/xdvik/xdvi.c 2012-06-23 19:14:31.957783059 +0900 +++ texlive-bin-2012.20120623/texk/xdvik/xdvi.c 2012-06-23 19:18:45.537791036 +0900 @@ -3300,14 +3300,8 @@ /* Store window id for use by src_client_check(). */ { - /* was xuint32, but need 8-byte alignment on some 64-bit systems. */ - long data; -#if !(defined(WORD64) || defined(LONG64)) - data = XtWindow(globals.widgets.top_level); -#else - set_window_id(XtWindow(globals.widgets.top_level), - (unsigned char *)&data); -#endif + long data = XtWindow(globals.widgets.top_level); + XChangeProperty(DISP, DefaultRootWindow(DISP), atom_xdvi_windows(), atom_xdvi_windows(), 32, PropModePrepend, (unsigned char *)&data, 1); Index: texlive-bin-2012.20120623/texk/xdvik/xdvi.h =================================================================== --- texlive-bin-2012.20120623.orig/texk/xdvik/xdvi.h 2012-06-23 19:14:31.957783059 +0900 +++ texlive-bin-2012.20120623/texk/xdvik/xdvi.h 2012-06-23 19:18:45.545791044 +0900 @@ -188,14 +188,6 @@ #include /* get WORD64 and LONG64 */ -#ifndef WORD64 -# ifdef LONG64 -typedef unsigned int xuint32; -# else -typedef unsigned long xuint32; -# endif -#endif - #if defined(HAVE_STDINT_H) #include #elif defined(HAVE_INTTYPES_H) Index: texlive-bin-2012.20120623/texk/xdvik/m4/xdvi-func-xkbbell.m4 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ texlive-bin-2012.20120623/texk/xdvik/m4/xdvi-func-xkbbell.m4 2012-06-24 14:41:38.141798287 +0900 @@ -0,0 +1,29 @@ +# Autoconf macros for xdvik. +# Copyright (C) 2012 Paul Vojta +# Adapted from xterm, Copyright 1997-2010,2011 by Thomas E. Dickey +# +# This file is free software; the copyright holder +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# XDVI_FUNC_XKB_BELL +# ------------------------- +# Check for whether the XkbBell() extension is present in the X libraries. + +dnl ### Check for XkbBell() functionality. Adapted from xterm's version. +AC_DEFUN([XDVI_FUNC_XKB_BELL],[ +AC_CACHE_CHECK([for XKB Bell extension], xdvi_cv_func_xkb_bell, +[xdvi_save_LIBS=$LIBS +LIBS="$X_PRE_LIBS"$1" $LIBS $X_LIBS -lX11" +AC_TRY_LINK([ +#include +#include /* has the prototype */ +],[ + Atom y; + XkbBell((Display *)0, (Window)0, 0, y); +],[xdvi_cv_func_xkb_bell=yes],[xdvi_cv_func_xkb_bell=no]) +LIBS=$xdvi_save_LIBS]) +if test "$xdvi_cv_func_xkb_bell" = yes; then + X_PRE_LIBS="$X_PRE_LIBS"$1 + AC_DEFINE([HAVE_XKB_BELL_EXT], 1, [Define if your system has XkbBell().]) +fi]) debian/patches/disable-t1lib-gd-dvipng-freetype0000664000000000000000000001711212213264212016651 0ustar disable any reference to t1lib, (lib)gd, dvipng thanks to OndÅ™ej Surý this patch allows removing of embedded copies of libgd and t1lib completely. Before it was necessary to keep them only for the configure step. Thanks OndÅ™ej! --- aclocal.m4 | 3 --- libs/aclocal.m4 | 3 --- m4/kpse-freetype-flags.m4 | 29 ----------------------------- m4/kpse-gd-flags.m4 | 31 ------------------------------- m4/kpse-pkgs.m4 | 6 ------ m4/kpse-t1lib-flags.m4 | 29 ----------------------------- texk/aclocal.m4 | 1 - utils/aclocal.m4 | 3 --- 8 files changed, 105 deletions(-) --- texlive-bin.orig/aclocal.m4 +++ texlive-bin/aclocal.m4 @@ -1038,9 +1038,7 @@ m4_include([m4/kpse-cairo-flags.m4]) m4_include([m4/kpse-common.m4]) m4_include([m4/kpse-cxx-hack.m4]) -m4_include([m4/kpse-freetype-flags.m4]) m4_include([m4/kpse-freetype2-flags.m4]) -m4_include([m4/kpse-gd-flags.m4]) m4_include([m4/kpse-graphite2-flags.m4]) m4_include([m4/kpse-harfbuzz-flags.m4]) m4_include([m4/kpse-icu-flags.m4]) @@ -1054,7 +1052,6 @@ m4_include([m4/kpse-poppler-flags.m4]) m4_include([m4/kpse-ptexenc-flags.m4]) m4_include([m4/kpse-setup.m4]) -m4_include([m4/kpse-t1lib-flags.m4]) m4_include([m4/kpse-teckit-flags.m4]) m4_include([m4/kpse-warnings.m4]) m4_include([m4/kpse-web2c.m4]) --- texlive-bin.orig/libs/aclocal.m4 +++ texlive-bin/libs/aclocal.m4 @@ -1038,9 +1038,7 @@ m4_include([../m4/kpse-cairo-flags.m4]) m4_include([../m4/kpse-common.m4]) m4_include([../m4/kpse-cxx-hack.m4]) -m4_include([../m4/kpse-freetype-flags.m4]) m4_include([../m4/kpse-freetype2-flags.m4]) -m4_include([../m4/kpse-gd-flags.m4]) m4_include([../m4/kpse-graphite2-flags.m4]) m4_include([../m4/kpse-harfbuzz-flags.m4]) m4_include([../m4/kpse-icu-flags.m4]) @@ -1054,7 +1052,6 @@ m4_include([../m4/kpse-poppler-flags.m4]) m4_include([../m4/kpse-ptexenc-flags.m4]) m4_include([../m4/kpse-setup.m4]) -m4_include([../m4/kpse-t1lib-flags.m4]) m4_include([../m4/kpse-teckit-flags.m4]) m4_include([../m4/kpse-warnings.m4]) m4_include([../m4/kpse-web2c.m4]) --- texlive-bin.orig/m4/kpse-gd-flags.m4 +++ /dev/null @@ -1,31 +0,0 @@ -# Public macros for the TeX Live (TL) tree. -# Copyright (C) 2009, 2010 Peter Breitenlohner -# -# This file is free software; the copyright holder -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 0 - -# KPSE_GD_FLAGS -# ------------- -# Provide the configure options '--with-system-gd' (if in the TL tree), -# '--with-gd-includes', and '--with-gd-libdir'. -# -# Set the make variables GD_INCLUDES and GD_LIBS to the CPPFLAGS and -# LIBS required for the `-lgd' library in libs/gd/ of the TL tree. -AC_DEFUN([KPSE_GD_FLAGS], -[AC_REQUIRE([KPSE_LIBPNG_FLAGS])[]dnl -AC_REQUIRE([KPSE_FREETYPE2_FLAGS])[]dnl -_KPSE_LIB_FLAGS([gd], [gd], [], - [-IBLD/libs/gd/include -DNONDLL], [BLD/libs/gd/libgd.a], [], - [], [${top_builddir}/../../libs/gd/include/gd.h])[]dnl -]) # KPSE_GD_FLAGS - -# KPSE_GD_OPTIONS([WITH-SYSTEM]) -# ------------------------------ -AC_DEFUN([KPSE_GD_OPTIONS], [_KPSE_LIB_OPTIONS([gd], [$1])]) - -# KPSE_GD_SYSTEM_FLAGS -# -------------------- -AC_DEFUN([KPSE_GD_SYSTEM_FLAGS], [_KPSE_LIB_FLAGS_SYSTEM([gd], [gd])]) --- texlive-bin.orig/m4/kpse-pkgs.m4 +++ texlive-bin/m4/kpse-pkgs.m4 @@ -33,10 +33,7 @@ poppler cairo pixman -gd freetype2 -freetype -t1lib libpng zlib ])[]dnl @@ -56,10 +53,8 @@ AC_REQUIRE([KPSE_PTEXENC_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_ZLIB_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_LIBPNG_SYSTEM_FLAGS])[]dnl -AC_REQUIRE([KPSE_T1LIB_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_FREETYPE_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_FREETYPE2_SYSTEM_FLAGS])[]dnl -AC_REQUIRE([KPSE_GD_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_PIXMAN_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_CAIRO_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_XPDF_SYSTEM_FLAGS])[]dnl @@ -107,7 +102,6 @@ dvidvi dviljk dvipdfmx -dvipng dvipos dvipsk dvisvgm --- texlive-bin.orig/m4/kpse-t1lib-flags.m4 +++ /dev/null @@ -1,29 +0,0 @@ -# Public macros for the TeX Live (TL) tree. -# Copyright (C) 2009 Peter Breitenlohner -# -# This file is free software; the copyright holder -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 0 - -# KPSE_T1LIB_FLAGS -# ---------------- -# Provide the configure options '--with-system-t1lib' (if in the TL tree), -# '--with-t1lib-includes', and '--with-t1lib-libdir'. -# -# Set the make variables T1LIB_INCLUDES and T1LIB_LIBS to the CPPFLAGS and -# LIBS required for the `-lt1' library in libs/t1lib/ of the TL tree. -AC_DEFUN([KPSE_T1LIB_FLAGS], -[_KPSE_LIB_FLAGS([t1lib], [t1], [], - [-IBLD/libs/t1lib], [BLD/libs/t1lib/libt1.a], [], - [], [${top_builddir}/../../libs/t1lib/t1lib.h])[]dnl -]) # KPSE_T1LIB_FLAGS - -# KPSE_T1LIB_OPTIONS([WITH-SYSTEM]) -# --------------------------------- -AC_DEFUN([KPSE_T1LIB_OPTIONS], [_KPSE_LIB_OPTIONS([t1lib], [$1])]) - -# KPSE_T1LIB_SYSTEM_FLAGS -# ----------------------- -AC_DEFUN([KPSE_T1LIB_SYSTEM_FLAGS], [_KPSE_LIB_FLAGS_SYSTEM([t1lib], [t1])]) --- texlive-bin.orig/utils/aclocal.m4 +++ texlive-bin/utils/aclocal.m4 @@ -1038,9 +1038,7 @@ m4_include([../m4/kpse-cairo-flags.m4]) m4_include([../m4/kpse-common.m4]) m4_include([../m4/kpse-cxx-hack.m4]) -m4_include([../m4/kpse-freetype-flags.m4]) m4_include([../m4/kpse-freetype2-flags.m4]) -m4_include([../m4/kpse-gd-flags.m4]) m4_include([../m4/kpse-graphite2-flags.m4]) m4_include([../m4/kpse-harfbuzz-flags.m4]) m4_include([../m4/kpse-icu-flags.m4]) @@ -1054,7 +1052,6 @@ m4_include([../m4/kpse-poppler-flags.m4]) m4_include([../m4/kpse-ptexenc-flags.m4]) m4_include([../m4/kpse-setup.m4]) -m4_include([../m4/kpse-t1lib-flags.m4]) m4_include([../m4/kpse-teckit-flags.m4]) m4_include([../m4/kpse-warnings.m4]) m4_include([../m4/kpse-web2c.m4]) --- texlive-bin.orig/m4/kpse-freetype-flags.m4 +++ /dev/null @@ -1,29 +0,0 @@ -# Public macros for the TeX Live (TL) tree. -# Copyright (C) 2009 Peter Breitenlohner -# -# This file is free software; the copyright holder -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 0 - -# KPSE_FREETYPE_FLAGS -# ------------------- -# Provide the configure options '--with-system-freetype' (if in the TL tree), -# '--with-freetype-includes', and '--with-freetype-libdir'. -# -# Set the make variables FREETYPE_INCLUDES and FREETYPE_LIBS to the CPPFLAGS and -# LIBS required for the `-lttf' library in libs/freetype/ of the TL tree. -AC_DEFUN([KPSE_FREETYPE_FLAGS], -[_KPSE_LIB_FLAGS([freetype], [ttf], [], - [-IBLD/libs/freetype/freetype], [BLD/libs/freetype/libttf.a], [], - [], [${top_builddir}/../../libs/freetype/freetype/freetype.h])[]dnl -]) # KPSE_FREETYPE_FLAGS - -# KPSE_FREETYPE_OPTIONS([WITH-SYSTEM]) -# ------------------------------------ -AC_DEFUN([KPSE_FREETYPE_OPTIONS], [_KPSE_LIB_OPTIONS([freetype], [$1])]) - -# KPSE_FREETYPE_SYSTEM_FLAGS -# -------------------------- -AC_DEFUN([KPSE_FREETYPE_SYSTEM_FLAGS], [_KPSE_LIB_FLAGS_SYSTEM([freetype], [ttf])]) --- texlive-bin.orig/texk/aclocal.m4 +++ texlive-bin/texk/aclocal.m4 @@ -1038,7 +1038,6 @@ m4_include([../m4/kpse-cairo-flags.m4]) m4_include([../m4/kpse-common.m4]) m4_include([../m4/kpse-cxx-hack.m4]) -m4_include([../m4/kpse-freetype-flags.m4]) m4_include([../m4/kpse-freetype2-flags.m4]) m4_include([../m4/kpse-gd-flags.m4]) m4_include([../m4/kpse-graphite2-flags.m4]) debian/patches/60_unneeded_linking0000664000000000000000000000234212213264212014345 0ustar --- texk/web2c/am/texmf.am | 2 +- texk/xdvik/common.am | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) --- texlive-bin.orig/texk/web2c/am/texmf.am +++ texlive-bin/texk/web2c/am/texmf.am @@ -137,7 +137,7 @@ # All the x_... and X_... variables will be empty if we aren't supporting X. # Follow the library order used in X11R6 itself: # -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 (some may not be present). -mf_x_libs = $(X_LIBS) $(x_tool_libs) $(X_PRE_LIBS) $(x_ext_lib) $(wlibs) $(X_EXTRA_LIBS) +mf_x_libs = $(X_LIBS) $(x_tool_libs) $(wlibs) $(X_EXTRA_LIBS) endif !WIN32 ## mf and mf-nowin compile mfextra.c with different CPPFLAGS. --- texlive-bin.orig/texk/xdvik/common.am +++ texlive-bin/texk/xdvik/common.am @@ -16,8 +16,8 @@ ## libXmu needs to come before Xt and after the toolkit libs. x_ldflags = $(X_LIBS) $(x_linker_options) $(iconv_libpath) x_extra_libs = $(X_EXTRA_LIBS) $(iconv_libs) -xdvi_x_libs = $(x_ldflags) $(x_tool_libs) $(x_xmu_lib) -lXt $(X_PRE_LIBS) -xdvi_x_libs += $(x_ext_lib) $(x_xpm_libs) -lX11 $(x_extra_libs) +xdvi_x_libs = $(x_ldflags) $(x_tool_libs) $(x_xmu_lib) -lXt +xdvi_x_libs += $(x_xpm_libs) -lX11 $(x_extra_libs) common_ldadd = $(KPATHSEA_LIBS) $(FREETYPE2_LIBS) $(xdvi_x_libs) debian/patches/upstream-svn31358-luatex0000664000000000000000000000171212213264212015106 0ustar --- texk/web2c/luatexdir/ChangeLog | 5 +++++ texk/web2c/luatexdir/font/writecff.w | 2 ++ 2 files changed, 7 insertions(+) --- texlive-bin.orig/texk/web2c/luatexdir/ChangeLog +++ texlive-bin/texk/web2c/luatexdir/ChangeLog @@ -1,3 +1,8 @@ +2013-08-06 Akira Kakuto + + * font/writecff.w: Fix a bug in write_cid_cff(). There was not + pdf_end_dict() for the corresponding pdf_begin_dict(). + 2013-07-30 Peter Breitenlohner * font/writettf.w: Treat unknown 'post' table versions --- texlive-bin.orig/texk/web2c/luatexdir/font/writecff.w +++ texlive-bin/texk/web2c/luatexdir/font/writecff.w @@ -3389,6 +3389,8 @@ } pdf_begin_obj(pdf, cidset, OBJSTM_NEVER); pdf_begin_dict(pdf); + pdf_dict_add_streaminfo(pdf); + pdf_end_dict(pdf); pdf_begin_stream(pdf); pdf_out_block(pdf, stream, l); pdf_end_stream(pdf); debian/patches/pmpost-svg-20120119-tl11.diff0000664000000000000000000000470212213264212015242 0ustar --- texk/web2c/pmplibdir/am/pmpost.am | 4 +- texk/web2c/pmplibdir/psvgout.ch | 66 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 2 deletions(-) --- texlive-bin.orig/texk/web2c/pmplibdir/am/pmpost.am +++ texlive-bin/texk/web2c/pmplibdir/am/pmpost.am @@ -55,10 +55,10 @@ @$(pmp_ctangle_sh) pmpxout pdvitomp.ch $(psvgout_c_h): psvgout-tangle - @$(pmp_ctangle_sh) psvgout + @$(pmp_ctangle_sh) psvgout.w psvgout.ch psvgout-tangle: ctangle$(EXEEXT) mplibdir/svgout.w tangle-sh cat $(srcdir)/mplibdir/svgout.w | sed $(pmp_sed) > psvgout.w - @$(pmp_ctangle_sh) psvgout + @$(pmp_ctangle_sh) psvgout.w psvgout.ch $(pmpmath_c_h): pmpmath-tangle @$(pmp_ctangle_sh) pmpmath pmpmath-tangle: ctangle$(EXEEXT) mplibdir/mpmath.w tangle-sh --- /dev/null +++ texlive-bin/texk/web2c/pmplibdir/psvgout.ch @@ -0,0 +1,66 @@ +@x +#include +@y +#include +#include +@z + +@x +@= + (k=='&')||(k=='>')||(k=='<') +@y +@= + (k=='&')||(k=='>')||(k=='<')||(k>=0x7F) +@z + +@x +@ Now for outputting the actual graphic objects. +@y +@ Now for outputting the actual graphic objects. + +@d yoko_jfm_id 11 /* `yoko-kumi' fonts */ +@d tate_jfm_id 9 /* `tate-kumi' fonts */ +@d font_jfm_p(A) (mp->font_id[(A)]!=0) +@z +@x Even if prologues=3, Japanese texts are not converted into paths. + if (prologues == 3 ) { +@y + if (prologues == 3 && mp->font_id[gr_font_n(p)]==0) { +@z + +@x To realise vertical Japanese texts ... + mp_svg_attribute(mp, "font-size", mp->svg->buf); +@y + mp_svg_attribute(mp, "font-size", mp->svg->buf); + if ( mp->font_id[gr_font_n(p)]==tate_jfm_id ) { + mp_svg_reset_buf(mp); + append_string("tb-rl"); + mp_svg_attribute(mp, "writing-mode", mp->svg->buf); + } +@z + +@x + while (l-->0) { + k=(int)*s++; + if (@) { +@y + if ( mp->font_id[gr_font_n(p)]!=0 ) { + l >>= 1; + while (l-->0) { + k =((int)*s++)*0x100; k += (int)*s++; + fprintf(stderr, "\n>>> %d\n", k); + append_string("&#"); + mp_svg_store_int(mp,toUCS(k)); + append_char(';'); + } + } else + while (l-->0) { + k=(int)*s++; + if (@) { +@z + +@x + mp_svg_print(mp, ""); +@y + mp_svg_print(mp, ""); +@z debian/patches/pmpost-mp1.803-201307260000664000000000000000000013741212213264212013775 0ustar --- texk/kpathsea/texmf.cnf | 1 texk/web2c/Makefile.am | 3 texk/web2c/ac/web2c.ac | 1 texk/web2c/pmpostdir/Makefile | 107 ++++++++ texk/web2c/pmpostdir/am/pmpost.am | 118 +++++++++ texk/web2c/pmpostdir/jfm.ch | 104 ++++++++ texk/web2c/pmpostdir/jmp.ch | 342 ++++++++++++++++++++++++++ texk/web2c/pmpostdir/jmppsw.ch | 74 +++++ texk/web2c/pmpostdir/mpost.ch | 287 ++++++++++++++++++++++ texk/web2c/pmpostdir/mpxout.ch | 8 texk/web2c/pmpostdir/pdvitomp.ch | 492 ++++++++++++++++++++++++++++++++++++++ texk/web2c/pmpostdir/psout.ch | 42 +++ texk/web2c/pmpostdir/svgout.ch | 59 ++++ 13 files changed, 1638 insertions(+) --- texlive-bin-2013.20130722.31261.orig/texk/kpathsea/texmf.cnf +++ texlive-bin-2013.20130722.31261/texk/kpathsea/texmf.cnf @@ -624,6 +624,7 @@ % Used by makempx to run TeX. We use "etex" because MetaPost is % expecting DVI, and not "tex" because we want first line parsing. TEX = etex +TEX.pmpost = eptex % These variables specify the external program called for the % interactive `e' option. %d is replaced by the line number and %s by --- texlive-bin-2013.20130722.31261.orig/texk/web2c/Makefile.am +++ texlive-bin-2013.20130722.31261/texk/web2c/Makefile.am @@ -177,6 +177,9 @@ ## MetaPost include $(srcdir)/mplibdir/am/mplib.am +## pMetaPost +include $(srcdir)/pmpostdir/am/pmpost.am + ## libmplib, used by MetaPost and luaTeX include $(srcdir)/mplibdir/am/libmplib.am --- texlive-bin-2013.20130722.31261.orig/texk/web2c/ac/web2c.ac +++ texlive-bin-2013.20130722.31261/texk/web2c/ac/web2c.ac @@ -41,6 +41,7 @@ [[pdftex], [yes], [yes], [pdfTeX], [xpdf libpng]], [[luatex], [yes], [], [luaTeX], [poppler cairo libpng zziplib]], [[mp], [yes], [], [MetaPost],[cairo libpng]], +[[pmp], [yes], [], [pMetaPost], [cairo libpng ptexenc]], [[xetex], [yes], [yes], [XeTeX], [poppler libpng freetype2 icu teckit graphite2 harfbuzz]], ])[]dnl m4_foreach([Kpse_Prog], [kpse_tex_progs], --- /dev/null +++ texlive-bin-2013.20130722.31261/texk/web2c/pmpostdir/Makefile @@ -0,0 +1,107 @@ +# +# Makefile for W32 +# +PTEXENCDIR=../../ptexenc + +RM = rm -f +CC = cl +LD = cl +CTANGLE = ../ctangle +CTIE = ctie +AR = lib + +CAIROVER=cairo-1.12.8 +#CAIROVER=cairo-1.12.12 + +KPSEBUILDDIR = ../../kpathsea +KPSESRCDIR = ../.. +KPSELIB=$(KPSEBUILDDIR)/libkpathsea.lib +PTEXENCLIB= ../../ptexenc/libptexenc.lib +CAIROLIB = ../../../libs/cairo/$(CAIROVER)/src/release/cairo-static.lib +PNGLIB = ../../../libs/libpng/libpng.lib +ZLIBLIB = ../../../libs/zlib/libz.lib +SYSLIBS = user32.lib advapi32.lib gdi32.lib +ADDLIBS = $(ZLIBLIB) $(PNGLIB) $(CAIROLIB) $(SYSLIBS) + +MPLIBBUILDDIR = . +MPLIBSRCDIR = . +MPLIB = libjmplib.lib + +# LDEBUG=-link /DEBUG +LDEBUG= + +# CFLAGS = -nologo -w -MT -Od -Zi -DMPXOUT=1 -DWIN32=1 -DMSVC=1 -DR_OK=4 + +CFLAGS = -nologo -w -MT -O2 -DMPXOUT=1 -DWIN32=1 -DMSVC=1 -DR_OK=4 \ +-Dstrcasecmp=stricmp -DHAVE_SNPRINTF=1 -D_CRT_SECURE_NO_DEPRECATE=1 \ +-DCAIRO_WIN32_STATIC_BUILD=1 \ +-DNO_KPSE_DLL=1 -I. -I../.. -I../../kpathsea \ +-I$(PTEXENCDIR) -I.. \ +-I../../../libs/cairo/$(CAIROVER)/src \ +-I../../../libs/libpng + +OBJECTS = mpost.obj mpxout.obj +LIBOBJECTS = avl.obj mp.obj pngout.obj psout.obj svgout.obj tfmin.obj \ +mpmath.obj mpmathdouble.obj mpstrings.obj + +pmpost.exe: $(MPLIB) $(OBJECTS) $(KPSELIB) + $(LD) -Fe$@ $(OBJECTS) setargv.obj $(MPLIB) $(KPSELIB) $(PTEXENCLIB) $(ADDLIBS) $(LDEBUG) + +$(MPLIB): $(LIBOBJECTS) + $(AR) -out:$@ $(LIBOBJECTS) + +.w.c: + $(CTANGLE) $< $@ + +mpost.c: mpost.w mpost.ch mpxout.c + $(CTANGLE) mpost.w mpost.ch + +mpxout.c: mpxout.w mpxout-tot.ch + $(CTANGLE) mpxout.w mpxout-tot.ch + +mpxout-tot.ch: mpxout.w mpxout.ch pdvitomp.ch + $(CTIE) -c $@ mpxout.w mpxout.ch pdvitomp.ch + +mpmathdouble.c: mpmathdouble.w + $(CTANGLE) mpmathdouble.w + +mp.c: mp.w mp-tot.ch pngout.c psout.c svgout.c tfmin.c mpmath.c \ +mpmathdouble.c mpstrings.c + $(CTANGLE) mp.w mp-tot.ch + +mp-tot.ch: mp.w mp.ch jmp.ch + $(CTIE) -c $@ mp.w mp.ch jmp.ch + +tfmin.c: tfmin.w jfm.ch + $(CTANGLE) tfmin.w jfm.ch + +mpstrings.c: mpstrings.w + $(CTANGLE) mpstrings.w + +psout.c: psout.w psout-tot.ch mpstrings.c + $(CTANGLE) psout.w psout-tot.ch + +psout-tot.ch: psout.w psout.ch jmppsw.ch + $(CTIE) -c $@ psout.w psout.ch jmppsw.ch + +svgout.c: svgout.w svgout.ch + $(CTANGLE) svgout.w svgout.ch + +mpmath.c: mpmath.w + $(CTANGLE) mpmath.w + +$(OBJECTS): %.obj: %.c + $(CC) -c $(CFLAGS) $< -Fo$@ + +$(LIBOBJECTS): %.obj: %.c + $(CC) -c $(CFLAGS) $< -Fo$@ + +clean: + $(RM) *.obj mp.c mpxout.c psout.c psout.h mp*.h *.scn \ + *.idx *.toc *.pdf *.log mpmath.c mpost.c tfmin.c svgout.c \ + mpstrings.c *~ pngout.c mpmathdouble.c mp-tot.ch mpxout-tot.ch \ + psout-tot.ch *.pdb *.eps *.exp *.exe *.lib + +install: pmpost.exe + cp -p pmpost.exe c:/usr/local/bin/ + cp -p pmpost.exe c:/usr/work/edrive/wk/dist/PTEX/bin/ --- /dev/null +++ texlive-bin-2013.20130722.31261/texk/web2c/pmpostdir/am/pmpost.am @@ -0,0 +1,118 @@ +## texk/web2c/pmpostdir/am/pmpost.am: Makefile fragment for pMetaPost. + +CTIE = ./ctie +ctie = $(ctie_silent)CWEBINPUTS=.:$(srcdir) $(buildenv) $(CTIE) +ctie_silent = $(ctie_silent_$(V)) +ctie_silent_ = $(ctie_silent_$(AM_DEFAULT_VERBOSITY)) +ctie_silent_0 = @echo " CTIE " $@; $(SHELL) ./silent-sh $@ # +ctie_silent_1 = + + +if PMP +bin_PROGRAMS += pmpost +bin_links += pmpost$(EXEEXT):pdvitomp +endif PMP +EXTRA_PROGRAMS +=pmpost + +pmpost_CPPFLAGS = $(CAIRO_INCLUDES) $(PIXMAN_INCLUDES) $(AM_CPPFLAGS) $(ZLIB_INCLUDES) $(LIBPNG_INCLUDES) -I$(srcdir)/mplibdir -I$(srcdir)/pmpostdir $(PTEXENC_INCLUDES) +pmpost_LDADD = $(KPATHSEA_LIBS) $(CAIRO_LIBS) $(PIXMAN_LIBS) $(LIBPNG_LIBS) $(ZLIB_LIBS) -lm $(PTEXENC_LIBS) + + +.PHONY: install-pmpost-links uninstall-pmpost-links + +# Creating one file: just one rule +pmp_ctangle = $(ctangle_silent)CWEBINPUTS=.:$(srcdir)/pmpostdir $(ctangle) +# Creating several files: need stamp file and two rules with identical recipes +pmp_ctangle_sh = CWEBINPUTS=.:$(srcdir)/pmpostdir AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(CTANGLE) + +## pMetaPost C sources +pmpost_SOURCES = mplibdir/avl.h mplibdir/avl.c +nodist_pmpost_SOURCES = ptfmin.c $(pmp_c_h) $(pmpmath_c_h) $(pmpmathdouble_c_h) $(ppsout_c_h) $(psvgout_c_h) $(ppngout_c_h) $(pmpstrings_c_h) pmpost.c $(pmpxout_c_h) +pmp_c_h = pmp.c pmplib.h pmpmp.h +pmpmath_c_h = pmpmath.h pmpmath.c +pmpmathdouble_c_h = pmpmathdouble.h pmpmathdouble.c +pmpstrings_c_h = pmpstrings.h pmpstrings.c +ppsout_c_h = pmppsout.h ppsout.c pmplibps.h +psvgout_c_h = pmplibsvg.h pmpsvgout.h psvgout.c +ppngout_c_h = pmplibpng.h pmppngout.h ppngout.c +pmpxout_c_h = pmpxout.c pmpxout.h + +# sed script +pmp_sed_main = "s/mpxout\\.h/pmpxout.h/;s/mpmp\\.h/pmpmp.h/;s/mplib\\.h/pmplib.h/;s/mpstrings\\.h/pmpstrings.h/" +pmp_sed_math = "s/mpmath\\.h/pmpmath.h/;s/mpmathdouble\\.h/pmpmathdouble.h/" +pmp_sed_ps = "s/mplibps\\.h/pmplibps.h/;s/mppsout\\.h/pmppsout.h/" +pmp_sed_svg = "s/mplibsvg\\.h/pmplibsvg.h/;s/mpsvgout\\.h/pmpsvgout.h/" +pmp_sed_png = "s/mplibpng\\.h/pmplibpng.h/;s/mppngout\\.h/pmppngout.h/" +pmp_sed = sed -e $(pmp_sed_main) -e $(pmp_sed_math) -e $(pmp_sed_ps) -e $(pmp_sed_svg) -e $(pmp_sed_png) + +# Creating one file: just one rule +ptfmin.c: ctangle$(EXEEXT) mplibdir/tfmin.w + cat $(srcdir)/mplibdir/tfmin.w | $(pmp_sed) > ptfmin.w + $(pmp_ctangle) ptfmin.w jfm.ch +pmpost.c: ctangle$(EXEEXT) mplibdir/mpost.w + cat $(srcdir)/mplibdir/mpost.w | $(pmp_sed) > pmpost.w + $(pmp_ctangle) pmpost.w mpost.ch + + +# Creating several files: need stamp file and two rules with identical recipes +$(pmp_c_h): pmp-tangle + @$(pmp_ctangle_sh) pmp.w pmp-tot.ch +pmp-tangle: ctangle$(EXEEXT) mplibdir/mp.w pmp-tot.ch tangle-sh + @$(pmp_ctangle_sh) pmp.w pmp-tot.ch +pmp-tot.ch: ctie$(EXEEXT) mplibdir/mp.w pmpostdir/jmp.ch + cat $(srcdir)/mplibdir/mp.w | $(pmp_sed) > pmp.w + $(ctie) -c pmp-tot.ch pmp.w pmpostdir/jmp.ch + +$(pmpmath_c_h): pmpmath-tangle + @$(pmp_ctangle_sh) pmpmath +pmpmath-tangle: ctangle$(EXEEXT) mplibdir/mpmath.w tangle-sh + cat $(srcdir)/mplibdir/mpmath.w | $(pmp_sed) > pmpmath.w + @$(pmp_ctangle_sh) pmpmath + +$(pmpmathdouble_c_h): pmpmathdouble-tangle + @$(pmp_ctangle_sh) pmpmathdouble +pmpmathdouble-tangle: ctangle$(EXEEXT) mplibdir/mpmathdouble.w tangle-sh + cat $(srcdir)/mplibdir/mpmathdouble.w | $(pmp_sed) > pmpmathdouble.w + @$(pmp_ctangle_sh) pmpmathdouble + +$(pmpstrings_c_h): pmpstrings-tangle + @$(pmp_ctangle_sh) pmpstrings +pmpstrings-tangle: ctangle$(EXEEXT) mplibdir/mpstrings.w tangle-sh + cat $(srcdir)/mplibdir/mpstrings.w | $(pmp_sed) > pmpstrings.w + @$(pmp_ctangle_sh) pmpstrings + +$(ppsout_c_h): ppsout-tangle + @$(pmp_ctangle_sh) ppsout.w ppsout-tot.ch +ppsout-tangle: ctangle$(EXEEXT) mplibdir/psout.w ppsout-tot.ch tangle-sh + @$(pmp_ctangle_sh) ppsout.w ppsout-tot.ch +ppsout-tot.ch: ctie$(EXEEXT) mplibdir/psout.w pmpostdir/psout.ch pmpostdir/jmppsw.ch + cat $(srcdir)/mplibdir/psout.w | $(pmp_sed) > ppsout.w + $(ctie) -c ppsout-tot.ch ppsout.w pmpostdir/psout.ch pmpostdir/jmppsw.ch + +$(psvgout_c_h): psvgout-tangle + @$(pmp_ctangle_sh) psvgout svgout.ch +psvgout-tangle: ctangle$(EXEEXT) mplibdir/svgout.w pmpostdir/svgout.ch tangle-sh + cat $(srcdir)/mplibdir/svgout.w | $(pmp_sed) > psvgout.w + @$(pmp_ctangle_sh) psvgout svgout.ch +$(ppngout_c_h): ppngout-tangle + @$(pmp_ctangle_sh) ppngout +ppngout-tangle: ctangle$(EXEEXT) mplibdir/pngout.w tangle-sh + cat $(srcdir)/mplibdir/pngout.w | $(pmp_sed) > ppngout.w + @$(pmp_ctangle_sh) ppngout + +$(pmpxout_c_h): pmpxout-tangle + @$(pmp_ctangle_sh) pmpxout pmpxout-tot.ch +pmpxout-tangle: ctangle$(EXEEXT) mplibdir/mpxout.w pmpxout-tot.ch tangle-sh + @$(pmp_ctangle_sh) pmpxout pmpxout-tot.ch +pmpxout-tot.ch: ctie$(EXEEXT) mplibdir/mpxout.w pmpostdir/mpxout.ch pmpostdir/pdvitomp.ch + cat $(srcdir)/mplibdir/mpxout.w | $(pmp_sed) > pmpxout.w + $(ctie) -c pmpxout-tot.ch pmpxout.w pmpostdir/mpxout.ch pmpostdir/pdvitomp.ch + +## pMetaPost CWeb sources +pmpost_web = mplibdir/mpost.w mplibdir/mpxout.w +pmpost_web += mplibdir/mp.w mplibdir/psout.w mplibdir/svgout.w mplibdir/pngout.w +pmpost_web += mplibdir/mpmath.w mplibdir/mpmathdouble.w mplibdir/mpstrings.w mplibdir/tfmin.w + +$(pmpost_OBJECTS): $(nodist_pmpost_SOURCES) + +DISTCLEANFILES += $(nodist_pmpost_SOURCES) --- /dev/null +++ texlive-bin-2013.20130722.31261/texk/web2c/pmpostdir/jfm.ch @@ -0,0 +1,104 @@ +@x +#include +@y +#include +#include +@z + +% +% local variable "nt" && "ct" +@x + halfword lf,tfm_lh,bc,ec,nw,nh,nd; /* subfile size parameters */ +@y + halfword lf,tfm_lh,bc,ec,nw,nh,nd,nt; /* subfile size parameters */ +@z + +@x + int h_and_d; /* height and depth indices being unpacked */ +@y + int h_and_d; /* height and depth indices being unpacked */ + halfword ct; /* char and type */ + halfword id; /* JFM font id */ +@z + +@x +@ +@y +@; +@ +@z + +% +% routine to process JFM file format +@x +@= +tfget; read_two(lf); +@y +@d yoko_jfm_id 11 /* `yoko-kumi' fonts */ +@d tate_jfm_id 9 /* `tate-kumi' fonts */ +@d font_jfm_p(A) (mp->font_id[(A)]!=0) +@d incr(A) (A)=(A)+1 /* increase a variable by unity */ +@= +tfget; read_two(lf); +if ( (lf==yoko_jfm_id) || (lf==tate_jfm_id) ) { + id=lf; + tfget; read_two(nt); + tfget; read_two(lf); +} else { + id=0; nt=0; +}; +@z + +@x +whd_size=(size_t)((ec+1-bc)+nw+nh+nd); +@y +whd_size=(size_t)((ec+1-bc)+nt+nw+nh+nd); +@z + +% +% reserve space for character type table +@x +mp->char_base[n]=(int)(mp->next_fmem-(size_t)bc); +mp->width_base[n]=(int)(mp->next_fmem+(size_t)(ec-bc)+1); +@y +mp->font_id[n]=id; +mp->font_nt[n]=nt; +mp->ctype_base[n]=mp->next_fmem; +mp->char_base[n]=(int)(mp->next_fmem+nt-(size_t)bc); +mp->width_base[n]=(int)(mp->next_fmem+nt+(size_t)(ec-bc)+1); +@z + +% +% read character type table +% +@x +tf_ignore(4*(tfm_lh-2)) +@y +tf_ignore(4*(tfm_lh-2)) + +@ @= +ii=mp->ctype_base[n]+nt; +i=mp->ctype_base[n]; +while ( ifont_info[i].hh.LH=ct; + tfget; read_two(ct); + mp->font_info[i].hh.RH=ct; + incr(i); +} +@z + +@x +mp_pack_file_name(mp, mp->cur_name,mp->cur_area,mp->cur_ext); +mp->tfm_infile = (mp->open_file)(mp, mp->name_of_file, "r",mp_filetype_metrics); +@y +mp_pack_file_name(mp, mp->cur_name,mp->cur_area,mp->cur_ext); +{ + char *fulln; + fulln = kpse_find_file(fname, kpse_tfm_format, 1); + mp->tfm_infile = (mp->open_file)(mp, fulln, "r",mp_filetype_metrics); + if(fulln) mp_xfree(fulln); +} +@z --- /dev/null +++ texlive-bin-2013.20130722.31261/texk/web2c/pmpostdir/jmp.ch @@ -0,0 +1,342 @@ +% jMetaPost change file for MetaPost +% +% written by Michio Matsuyama +% Hideyuki Suzuki +% +% $Id: jmp.ch,v 1.42 2000/03/20 02:55:50 hideyuki Exp $ + +% +% +% change file of mp.w for pMetaPost (CWEB version) +% Akira Kakuto (translated the WEB version) +% +% + +@x +@d default_banner "This is MetaPost, Version 1.803" /* printed when \MP\ starts */ +@y +@d default_banner "This is pMetaPost, Version 1.803-0.04" /* printed when \MP\ starts */ +@z + +@x +#define metapost_version "1.803" +@y +#define metapost_version "1.803-0.04" +@z + +@x +# include /* for access */ +#endif +@y +# include /* for access */ +#endif +#include +#include +#include +#include +@z + +@x +void mp_close_file (MP mp, void *f) { + (void) mp; + if (f != NULL) + fclose ((FILE *) f); +@y +void mp_close_file (MP mp, void *f) { + (void) mp; +#ifdef WIN32 + if (f != NULL) { + clear_infile_enc((FILE *)f); + fclose ((FILE *) f); + } +#else + if (f != NULL) + fclose ((FILE *) f); +#endif +@z + +@x +mp->buf_size = 200; +@y +{ + char *kpse_buf = kpse_var_value("buf_size"); + if(kpse_buf) { + mp->buf_size = atoi(kpse_buf); + free(kpse_buf); + } else { + mp->buf_size = 500000; + } +} +@z + +@x +static boolean mp_input_ln (MP mp, void *f) { + /* inputs the next line or returns |false| */ + char *s; + size_t size = 0; + mp->last = mp->first; /* cf.\ Matthew 19\thinspace:\thinspace30 */ + s = (mp->read_ascii_file) (mp, f, &size); + if (s == NULL) + return false; + if (size > 0) { + mp->last = mp->first + size; + if (mp->last >= mp->max_buf_stack) { + mp->max_buf_stack = mp->last + 1; + while (mp->max_buf_stack > mp->buf_size) { + mp_reallocate_buffer (mp, (mp->buf_size + (mp->buf_size >> 2))); + } + } + (void) memcpy ((mp->buffer + mp->first), s, size); + } + free (s); + return true; +} +@y +static boolean mp_input_ln (MP mp, void *f ) { + int i = EOF; + mp->last = input_line2((FILE *)f, mp->buffer, mp->first, mp->buf_size, &i); + if (i == EOF && errno != EINTR && mp->last == mp->first) + return false; + if (i != EOF && i != '\n' && i != '\r') { + fprintf (stderr, "! Unable to read an entire line---bufsize=%u.\n", + (unsigned) mp->buf_size); + fputs ("Please increase buf_size in texmf.cnf.\n", stderr); + exit (1); + } + if (i == '\r') { + while ((i = getc (f)) == EOF && errno == EINTR) + ; + if (i != '\n') + ungetc (i, f); + } + return true; +} +@z + +@x +wterm (mp->banner); +@y +wterm (mp->banner); +wterm(" ("); +wterm((char *)getencstring()); +wterm(")"); +@z + +@x +} four_quarters; +typedef union { + integer sc; + four_quarters qqqq; +} font_data; +@y +} four_quarters; +typedef struct { + halfword RH, LH; +} two_halves; +typedef union { + two_halves hh; + integer sc; + four_quarters qqqq; +} font_data; +@z + +% +% tategaki support +% +% Suppose h==(0,height), d==(0,-depth) && w==(width,0) in horizontal string, +% && h==(height,0), d==(-depth,0) && w==(0,-width) in vertical string. +% Four vertices of the bounding box is h, d, h+w && d+w && those of the +% transformed boundig box is Th, Td, T(h+w) && T(d+w), so that the values +% of Th, Td && Tw are compared here. + +@x +@ The height width and depth information stored in a text node determines a +rectangle that needs to be transformed according to the transformation +parameters stored in the text node. + +@y +@ The height width and depth information stored in a text node determines a +rectangle that needs to be transformed according to the transformation +parameters stored in the text node. + +Boundig box depends on JFM font ID. + +@d yoko_jfm_id 11 /* `yoko-kumi' fonts */ +@d tate_jfm_id 9 /* `tate-kumi' fonts */ +@d font_jfm_p(A) (mp->font_id[(A)]!=0) + +@z + +@x + mp_number x0a, y0a, x1a, y1a, arg1; + mp_text_node p0 = (mp_text_node)p; + new_number (x0a); + new_number (x1a); + new_number (y0a); + new_number (y1a); + new_number (arg1); + number_clone (arg1, p0->depth); + number_negate (arg1); + take_scaled (x1a, p0->txx, p0->width); + take_scaled (y0a, p0->txy, arg1); + take_scaled (y1a, p0->txy, p0->height); +@y + mp_number x0a, y0a, x1a, y1a, arg1, arg2; + mp_text_node p0 = (mp_text_node)p; + new_number (x0a); + new_number (x1a); + new_number (y0a); + new_number (y1a); + new_number (arg1); + new_number (arg2); + number_clone (arg1, p0->depth); + number_negate (arg1); + number_clone (arg2, p0->width); + number_negate (arg2); + if ( mp->font_id[mp_font_n(p)]!=tate_jfm_id ) { + take_scaled (x1a, p0->txx, p0->width); + take_scaled (y0a, p0->txy, arg1); + take_scaled (y1a, p0->txy, p0->height); + } else { + take_scaled (x1a, p0->txy, arg2); + take_scaled (y0a, p0->txx, arg1); + take_scaled (y1a, p0->txx, p0->height); + } +@z + +@x + take_scaled (x1a, p0->tyx, p0->width); + number_clone (arg1, p0->depth); + number_negate (arg1); + take_scaled (y0a, p0->tyy, arg1); + take_scaled (y1a, p0->tyy, p0->height); +@y + if ( mp->font_id[mp_font_n(p)]!=tate_jfm_id ) { + take_scaled (x1a, p0->tyx, p0->width); + number_clone (arg1, p0->depth); + number_negate (arg1); + take_scaled (y0a, p0->tyy, arg1); + take_scaled (y1a, p0->tyy, p0->height); + } else { + number_clone (arg1, p0->depth); + number_negate (arg1); + number_clone (arg2, p0->width); + number_negate (arg2); + take_scaled (x1a, p0->tyy, arg2); + take_scaled (y0a, p0->tyx, arg1); + take_scaled (y1a, p0->tyx, p0->height); + } +@z + +@x + wlog (mp->banner); +@y + wlog (mp->banner); + wlog (" ("); + wlog ((char *)(getencstring())); + wlog (")"); +@z + +% +% char type pointers +@x +eight_bits *font_bc; +eight_bits *font_ec; /* first and last character code */ +@y +eight_bits *font_bc; +eight_bits *font_ec; /* first and last character code */ +halfword *font_nt; +halfword *font_id; +@z + +@x +int *char_base; /* base address for |char_info| */ +@y +int *char_base; /* base address for |char_info| */ +int *ctype_base; +@z + +@x +xfree (mp->char_base); +@y +xfree (mp->font_id); +xfree (mp->font_nt); +xfree (mp->char_base); +xfree (mp->ctype_base); +@z + +@x + XREALLOC (mp->char_base, l, int); +@y + XREALLOC (mp->font_id, l, halfword); + XREALLOC (mp->font_nt, l, halfword); + XREALLOC (mp->char_base, l, int); + XREALLOC (mp->ctype_base, l, int); +@z + + +@x +mp->char_base[null_font] = 0; +@y +mp->font_id[null_font] = 0; +mp->font_nt[null_font] = 0; +mp->char_base[null_font] = 0; +mp->ctype_base[null_font] = 0; +@z + +@x +@d char_mp_info(A,B) mp->font_info[mp->char_base[(A)]+(B)].qqqq +@y +@d char_mp_info(A,B) mp->font_info[mp->char_base[(A)]+(B)].qqqq +@d ctype_char_end(A) (A)].hh.LH +@d ctype_char(A) mp->font_info[mp->ctype_base[(A)]+ctype_char_end +@d ctype_type_end(A) (A)].hh.RH +@d ctype_type(A) mp->font_info[mp->ctype_base[(A)]+ctype_type_end +@z + +% +% lookup character type table +@x +void mp_set_text_box (MP mp, mp_text_node p) { +@y +@; +void mp_set_text_box (MP mp, mp_text_node p) { +@z + +@x + if ((*(mp_text_p (p)->str + k) < bc) || (*(mp_text_p (p)->str + k) > ec)) { + mp_lost_warning (mp, f, *(mp_text_p (p)->str + k)); + } else { + cc = char_mp_info (f, *(mp_text_p (p)->str + k)); +@y + if ( ((*(mp_text_p (p)->str + k) < bc) || (*(mp_text_p (p)->str + k) > ec)) && (mp->font_id[f]==0) ) { + mp_lost_warning (mp, f, *(mp_text_p (p)->str + k)); + } else { + if (mp->font_id[f]!=0) { + cc=char_mp_info(f,mp_lookup_ctype(mp, f,fromBUFF(mp_text_p(p)->str,limit,k))); + k++; + } else { + cc = char_mp_info (f, *(mp_text_p (p)->str + k)); + } +@z + +@x +@* Debugging. +@y +@ @= +int mp_lookup_ctype (MP mp,font_number f, integer c) +{ + int l, u, r, ch; + l=0; u=mp->font_nt[f]-1; + while ( l +@z + +% Treat all Kanji fonts as used +@x + if ( mp->font_info[p].qqqq.b3==mp_used ) +@y + if ( mp->font_info[p].qqqq.b3==mp_used || mp->font_id[f]!=0) +@z + +% +% Kanji string output +@x +static void mp_print_initial_comment(MP mp,mp_edge_object *hh, int prologues); +@y +static void mp_print_initial_comment(MP mp,mp_edge_object *hh, int prologues); +void mp_ps_kanji_string_out (MP mp, unsigned char *s); + +#define Hi(x) (((x) >> 8) & 0xff) +#define Lo(x) ((x) & 0xff) + +@ @c +void mp_ps_kanji_string_out (MP mp, unsigned char *s) +{ +int i, len; +int c; + +len = strlen(s); +i=0; +mp_ps_print(mp, "<"); +while (ips->ps_offset+5>mp->max_print_line ) mp_ps_print_ln(mp); + c=toDVI(fromBUFF(s, i+2, i)); + i=i+2; + mp_hex_digit_out(mp, Hi(c) / 16); + mp_hex_digit_out(mp, Hi(c) % 16); + mp_hex_digit_out(mp, Lo(c) / 16); + mp_hex_digit_out(mp, Lo(c) % 16); + }; +mp_ps_print(mp, ">"); +}; +@z + +@x + mp_ps_print_nl(mp, "%%Creator: MetaPost "); +@y + mp_ps_print_nl(mp, "%%Creator: MetaPost (Japanese version) "); +@z + +% +% Call Kanji string output routine if the font is JFM. +@x + mp_ps_string_out(mp, gr_text_p(p),gr_text_l(p)); + mp_ps_name_out(mp, mp->font_name[gr_font_n(p)],false); +@y + if (mp->font_id[gr_font_n(p)]!=0) + mp_ps_kanji_string_out(mp, gr_text_p(p)); + else + mp_ps_string_out(mp, gr_text_p(p),gr_text_l(p)); + mp_ps_name_out(mp, mp->font_name[gr_font_n(p)],false); +@z --- /dev/null +++ texlive-bin-2013.20130722.31261/texk/web2c/pmpostdir/mpost.ch @@ -0,0 +1,287 @@ +@x +#include +@y +#include +#include +char kanjioption[16]; +@z + +@x +@d TEX "tex" +@d TROFF "soelim | eqn -Tps -d$$ | troff -Tps" + +@c +#ifndef MPXCOMMAND +#define MPXCOMMAND "makempx" +#endif +@y +@d TEX "eptex" +@d TROFF "gsoelim | geqn -Tps -d$$ | gtroff -Tps" + +@c +#ifndef MPXCOMMAND +#define MPXCOMMAND "pmakempx" +#endif +@z + +@x + if (cnf_cmd!=NULL && (strcmp (cnf_cmd, "1")!=0)) { + if (mp_troff_mode(mp)!=0) + cmd = concatn (cnf_cmd, " -troff ", + qmpname, " ", qmpxname, NULL); + else if (mpost_tex_program!=NULL && *mpost_tex_program != '\0') + cmd = concatn (cnf_cmd, " -tex=", mpost_tex_program, " ", + qmpname, " ", qmpxname, NULL); +@y + if (cnf_cmd!=NULL && (strcmp (cnf_cmd, "1")!=0)) { + if (kanjioption[0]) + cnf_cmd = concatn (cnf_cmd, " --kanji=", kanjioption, NULL); + if (mp_troff_mode(mp)) + cmd = concatn (cnf_cmd, " -troff ", + qmpname, " ", qmpxname, NULL); + else if (mpost_tex_program!=NULL && *mpost_tex_program != '\0') + cmd = concatn (cnf_cmd, " -tex=", mpost_tex_program, " ", + qmpname, " ", qmpxname, NULL); +@z + +@x + if (mpost_tex_program != NULL && *mpost_tex_program != '\0') { + maincmd = mpost_xstrdup(mpost_tex_program); + } else { + if (mpxmode == mpx_tex_mode) { + s = kpse_var_value("TEX"); + if (s==NULL) s = kpse_var_value("MPXMAINCMD"); + if (s==NULL) s = mpost_xstrdup (TEX); + maincmd = (char *)mpost_xmalloc (strlen(s)+strlen(default_args)+1); + strcpy(maincmd,s); +@y + if (mpost_tex_program != NULL && *mpost_tex_program != '\0') { + if (kanjioption[0]) { + maincmd = (char *)mpost_xmalloc (strlen(mpost_tex_program) + + strlen(kanjioption) + 15); + strcpy(maincmd, mpost_tex_program); + strcat(maincmd, " --kanji="); + strcat(maincmd, kanjioption); + } else + maincmd = mpost_xstrdup(mpost_tex_program); + } else { + if (mpxmode == mpx_tex_mode) { + s = kpse_var_value("TEX"); + if (s==NULL) s = kpse_var_value("MPXMAINCMD"); + if (s==NULL) s = mpost_xstrdup (TEX); + if (kanjioption[0]) + maincmd = (char *)mpost_xmalloc (strlen(s)+strlen(default_args)+ + strlen(kanjioption)+13); + else + maincmd = (char *)mpost_xmalloc (strlen(s)+strlen(default_args)+1); + strcpy(maincmd,s); + if (kanjioption[0]) { + strcat(maincmd, " --kanji="); + strcat(maincmd, kanjioption); + } +@z + +@x + const char *banner = "% Written by metapost version "; +@y + const char *banner = "% Written by pmpost version "; +@z + +@x + mpost_xfree (cnf_cmd); +@y + if(cnf_cmd) + mpost_xfree (cnf_cmd); +@z + +@x + const char *banner = "% Written by dvitomp version "; +@y + const char *banner = "% Written by pdvitomp version "; +@z + +@x + { "kpathsea-debug", 1, 0, 0 }, +@y + { "kpathsea-debug", 1, 0, 0 }, + { "kanji", 1, 0, 0 }, +@z + +@x + if (user_progname == NULL) + user_progname = optarg; + } +@y + if (user_progname == NULL) + user_progname = optarg; + } + } else if (ARGUMENT_IS ("kanji")) { + strcpy(kanjioption, optarg); + if(!set_enc_string(optarg, optarg)) { + fprintf(stderr,"Ignoring unknown argument `%s' to --kanji", optarg); + } +@z + +@x + { "no-kpathsea", 0, &nokpse, 1 }, +@y + { "no-kpathsea", 0, &nokpse, 1 }, + { "kanji", 1, 0, 0 }, +@z + +@x + } else if (option_is ("progname")) { + user_progname = optarg; +@y + } else if (option_is ("progname")) { + user_progname = optarg; + } else if (option_is ("kanji")) { + strcpy (kanjioption, optarg); + if(!set_enc_string(optarg, optarg)) { + fprintf(stderr,"Ignoring unknown argument `%s' to --kanji", optarg); + } +@z + +@x + fprintf(stdout, "This is dvitomp %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "This is MetaPost %s" WEB2CVERSION "\n", s); +mpost_xfree(s); +fprintf(stdout, +"\n" +"Usage: mpost [OPTION] [&MEMNAME] [MPNAME[.mp]] [COMMANDS]\n" +" mpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +"\n" +" Run MetaPost on MPNAME, usually creating MPNAME.NNN (and perhaps\n" +" MPNAME.tfm), where NNN are the character numbers generated.\n" +" Any remaining COMMANDS are processed as MetaPost input,\n" +" after MPNAME is read.\n\n" +" With a --dvitomp argument, MetaPost acts as DVI-to-MPX converter only.\n" +" Call MetaPost with --dvitomp --help for option explanations.\n\n"); +fprintf(stdout, +" -ini be inimpost, for dumping mem files\n" +" -interaction=STRING set interaction mode (STRING=batchmode/nonstopmode/\n" +" scrollmode/errorstopmode)\n" +" -numbersystem=STRING set number system mode (STRING=scaled/double/binary/decimal)\n" +" -jobname=STRING set the job name to STRING\n" +@y + fprintf(stdout, "This is pdvitomp %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "This is pMetaPost %s" WEB2CVERSION "\n", s); +mpost_xfree(s); +fprintf(stdout, +"\n" +"Usage: pmpost [OPTION] [&MEMNAME] [MPNAME[.mp]] [COMMANDS]\n" +" pmpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +"\n" +" Run pMetaPost on MPNAME, usually creating MPNAME.NNN (and perhaps\n" +" MPNAME.tfm), where NNN are the character numbers generated.\n" +" Any remaining COMMANDS are processed as pMetaPost input,\n" +" after MPNAME is read.\n\n" +" With a --dvitomp argument, pMetaPost acts as DVI-to-MPX converter only.\n" +" Call pMetaPost with --dvitomp --help for option explanations.\n\n"); +fprintf(stdout, +" -ini be inipmpost, for dumping mem files\n" +" -interaction=STRING set interaction mode (STRING=batchmode/nonstopmode/\n" +" scrollmode/errorstopmode)\n" +" -numbersystem=STRING set number system mode (STRING=scaled/double/binary/decimal)\n" +" -jobname=STRING set the job name to STRING\n" +" -kanji=STRING set the Japanese encoding to STRING\n" +@z + +@x +" -version output version information and exit\n" +"\n" +"Email bug reports to mp-implementors@@tug.org.\n" +@y +" -version output version information and exit\n" +@z + +@x + fprintf(stdout, "This is dvitomp %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "This is MetaPost %s" WEB2CVERSION "\n", s); +mpost_xfree(s); +fprintf(stdout, +"\n" +"Usage: dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +" mpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +"\n" +" Convert a TeX DVI file to a MetaPost MPX file.\n\n"); +fprintf(stdout, +" -progname=STRING set program name to STRING\n" +@y + fprintf(stdout, "This is pdvitomp %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "This is pMetaPost %s" WEB2CVERSION "\n", s); +mpost_xfree(s); +fprintf(stdout, +"\n" +"Usage: pdvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +" pmpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +"\n" +" Convert a TeX DVI file to a MetaPost MPX file.\n\n"); +fprintf(stdout, +" -progname=STRING set program name to STRING\n" +" -kanji=STRING set kanji encoding (sjis, jis, euc, utf8)\n" +@z + +@x + fprintf(stdout, "dvitomp (MetaPost) %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "MetaPost %s" WEB2CVERSION "\n", s); +@y + fprintf(stdout, "pdvitomp (pMetaPost) %s" WEB2CVERSION "\n", s); +else + fprintf(stdout, "pMetaPost %s" WEB2CVERSION "\n", s); +@z + +@x +"Author of the CWEB MetaPost: Taco Hoekwater.\n" +@y +"Author of the CWEB MetaPost: Taco Hoekwater.\n" +"Authors of pMetaPost: Michio Matsuyama, Hideyuki Suzuki.\n" +@z + +@x + const char * banner = "This is MetaPost, version "; +@y + const char * banner = "This is pMetaPost, version "; +@z + +@x + options->print_found_names = (int)true; + { + const char *base = cleaned_invocation_name(argv[0]); + if (FILESTRCASEEQ(base, "dvitomp")) + dvitomp_only=1; + } + if (dvitomp_only) { + @; + } else { +@y + options->print_found_names = (int)true; + + kanjioption[0] = '\0'; + enable_UPTEX (false); +#if defined(WIN32) + set_enc_string("sjis", "sjis"); +#else + set_enc_string("utf8", "euc"); +#endif + + { + const char *base = cleaned_invocation_name(argv[0]); + if (FILESTRCASEEQ(base, "dvitomp")) + dvitomp_only=1; + } + if (dvitomp_only) { + @; + } else { +@z + +@x + if(putenv(xstrdup("engine=metapost"))) +@y + if(putenv(xstrdup("engine=pmpost"))) +@z --- /dev/null +++ texlive-bin-2013.20130722.31261/texk/web2c/pmpostdir/mpxout.ch @@ -0,0 +1,8 @@ +@x +#include +@y +#include +#define R_OK 4 +typedef int boolean; +typedef int integer; +@z --- /dev/null +++ texlive-bin-2013.20130722.31261/texk/web2c/pmpostdir/pdvitomp.ch @@ -0,0 +1,492 @@ +@x +#include "pmpxout.h" +@y +#include "pmpxout.h" +#include +@z + +@x +@d max_widths (256*max_fonts) /* maximum number of different characters among all fonts */ +@y +@d max_widths 512000 /* maximum number of different characters among all fonts */ +@z + +@x +@d undefined_commands 250: case 251: case 252: case 253: case 254: case 255 +@y +@d dir 255 /* p\TeX\ direction */ +@d undefined_commands 250: case 251: case 252: case 253: case 254 +@z + +@x +mpx_read_tfm_word(mpx); lh=mpx->b2*(int)(256)+mpx->b3; +@y +mpx_read_tfm_word(mpx); +@;@/ +lh=mpx->b2*(int)(256)+mpx->b3; +@z + +@x + if ( mpx->b0<128 ) + mpx->tfm_check_sum=((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3; + else + mpx->tfm_check_sum=(((mpx->b0-256)*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3; + } + if ( k==5 ) { + if (mpx->mode == mpx_troff_mode) { + mpx->font_design_size[f]=(((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3)/(65536.0*16); + } + } +} +@y + if ( mpx->b0<128 ) + mpx->tfm_check_sum=((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3; + else + mpx->tfm_check_sum=(((mpx->b0-256)*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3; + } + if ( k==5 ) { + if (mpx->mode == mpx_troff_mode) { + mpx->font_design_size[f]=(((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3)/(65536.0*16); + } + } +} +@; +@z + +@x +@= +floor(mpx->dvi_scale*mpx->font_scaled_size[f]*char_width(f,c)) + +@ @= +floor(mpx->dvi_scale*mpx->font_scaled_size[cur_font]*char_width(cur_font,p)) +@y +@ @c @@; /* p\TeX */ +integer mpx_scaled_char_width (MPX mpx,integer f,integer c) +{ + if (mpx->font_id[f]!=0) c=mpx_lookup_ctype(mpx, f,c); + return floor(mpx->dvi_scale*mpx->font_scaled_size[f]*char_width(f,c)); +} +@z + +@x +@ @c @@; +static void mpx_do_set_char (MPX mpx,web_integer f, web_integer c) { + if ( (cfont_bc[f])||(c>mpx->font_ec[f]) ) + mpx_abort(mpx,"attempt to typeset invalid character %d",c); +@.attempt to typeset...@> +@y +@ PDVItoMP: |do_set_char| is called with non-virtual font. +In the case of non-virtual Kanji font, the width is looked up +with the character type, and the character is printed by the +function |set_kanji_char|. + +When the width written in the virtual font is same as +the width of the substituted font, the next character can be +written in the same string in output mpx file. +In other words, the width of the character is calculated +in |do_dvi_commands|. So even if the width is wrong here, the output PostScript file is not affected. + +@ @c @@; +void mpx_do_set_char (MPX mpx,integer f,integer c) +{ +integer kkk; + +if (mpx->font_id[f]!=0) { + kkk=mpx_lookup_ctype(mpx, f,c); + if ( (kkkfont_bc[f]) || (kkk>mpx->font_ec[f]) ) + mpx_abort(mpx,"attempt to typeset invalid character (JFM) %d",c); +} else if ( (cfont_bc[f])||(c>mpx->font_ec[f]) ) { + mpx_abort(mpx,"attempt to typeset invalid character %d",c); +} +@.attempt to typeset...@> +@z + +@x + if ((mpx->h!=mpx->str_h2)||(mpx->v!=mpx->str_v)|| + (f!=mpx->str_f)||(mpx->dvi_scale!=mpx->str_scale) ) { +@y + if ((mpx->h!=mpx->str_h2)||(mpx->v!=mpx->str_v2)|| + (f!=mpx->str_f)||(mpx->dvi_scale!=mpx->str_scale) ) { +@z + +@x + fprintf(mpx->mpxfile,"_s("); mpx->print_col=3;@/ + mpx->str_scale=mpx->dvi_scale; mpx->str_f=f; + mpx->str_v=mpx->v; mpx->str_h1=mpx->h; +@y + if ((mpx->d==0) || (mpx->font_id[f]==9)) { + fprintf(mpx->mpxfile,"_s("); mpx->print_col=3;}@/ + else { + fprintf(mpx->mpxfile,"_sr("); mpx->print_col=4;}@/ + mpx->str_scale=mpx->dvi_scale; mpx->str_f=f; + mpx->str_v1=mpx->v; mpx->str_h1=mpx->h; +@z + +@x + mpx_print_char(mpx, (unsigned char)c); + mpx->str_h2=(web_integer)(mpx->h+@); +@y + if (mpx->font_id[f]!=0) + mpx_print_kanji_char(mpx, c); + else + mpx_print_char(mpx, c); + if (mpx->d==0) { + mpx->str_h2=mpx->h+mpx_scaled_char_width(mpx, f, c); + mpx->str_v2=mpx->v; + } else { + mpx->str_h2=mpx->h; + mpx->str_v2=mpx->v+mpx_scaled_char_width(mpx, f, c); + } +@z + +@x +web_integer str_h1; +web_integer str_v; /* starting position for current output string */ +web_integer str_h2; /* where the current output string ends */ +@y +integer str_h1; +integer str_v1; /* starting position for current output string */ +integer str_h2; +integer str_v2; /* where the current output string ends */ +@z + +@x + fprintf(mpx->mpxfile,"vardef _s(expr _t,_f,_m,_x,_y)(text _c)=\n"); + fprintf(mpx->mpxfile, + " addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef;\n"); +@y + fprintf(mpx->mpxfile,"vardef _s(expr _t,_f,_m,_x,_y)(text _c)=\n"); + fprintf(mpx->mpxfile, + " addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef;\n"); + fprintf(mpx->mpxfile,"vardef _sr(expr _t,_f,_m,_x,_y)=\n"); + fprintf(mpx->mpxfile," addto _p also _t infont _f rotated -90"); + fprintf(mpx->mpxfile," scaled _m shifted (_x,_y); enddef;\n"); +@z + +@x + x=mpx->conv*mpx->str_h1; + y=mpx->conv*(-mpx->str_v); +@y + x=mpx->conv*mpx->str_h1; + y=mpx->conv*(-mpx->str_v1); +@z + +@x +@= +{ + mpx->pic_wd=mpx->h; mpx->pic_dp=mpx->v; mpx->pic_ht=ht-mpx->v; +} +@y +@= +{ if (mpx->d==0) { + mpx->pic_wd=mpx->h; mpx->pic_dp=mpx->v; mpx->pic_ht=ht-mpx->v; + } else { + mpx->pic_wd=mpx->v; mpx->pic_dp=-mpx->h; mpx->pic_ht=ht+mpx->h; + } +} +@z + +@x + mpx->str_v=0; + mpx->str_h2=0; + mpx->str_scale=1.0; /* values don't matter */ +@y + mpx->str_h2=0; + mpx->str_v2=0; + mpx->str_scale=1.0; /* values don't matter */ +@z + +@x +dd=-mpx->pic_dp*mpx->conv; +w=mpx->conv*mpx->pic_wd; +h=mpx->conv*mpx->pic_ht; +fprintf(mpx->mpxfile, + "setbounds _p to (0,%1.4f)--(%1.4f,%1.4f)--\n" + " (%1.4f,%1.4f)--(0,%1.4f)--cycle;\n",dd,w,dd,w,h,h) +@y +if (mpx->d==0) { + dd=-mpx->pic_dp*mpx->conv; + w=mpx->conv*mpx->pic_wd; + h=mpx->conv*mpx->pic_ht; + fprintf(mpx->mpxfile, + "setbounds _p to (0,%1.4f)--(%1.4f,%1.4f)--\n",dd,w,dd); + fprintf(mpx->mpxfile, + " (%1.4f,%1.4f)--(0,%1.4f)--cycle;\n",w,h,h); +} else { + dd=-mpx->pic_dp*mpx->conv; + w=-mpx->pic_wd*mpx->conv; + h=mpx->conv*mpx->pic_ht; + fprintf(mpx->mpxfile, + "setbounds _p to (%1.4f,0)--(%1.4f,%1.4f)--\n",h,h,w); + fprintf(mpx->mpxfile, + " (%1.4f,%1.4f)--(%1.4f,0)--cycle;\n", dd,w,dd); +} +@z + +@x +web_integer w;web_integer x;web_integer y;web_integer z; + /* current state values (|h| and |v| have already been declared) */ +web_integer hstack[(stack_size+1)]; +web_integer vstack[(stack_size+1)]; +web_integer wstack[(stack_size+1)]; +web_integer xstack[(stack_size+1)]; +web_integer ystack[(stack_size+1)]; +web_integer zstack[(stack_size+1)]; /* pushed down values in \.{DVI} units */ +@y +integer w;integer x;integer y;integer z;integer d; + /* current state values (|h| and |v| have already been declared) */ +integer hstack[(stack_size+1)]; +integer vstack[(stack_size+1)]; +integer wstack[(stack_size+1)]; +integer xstack[(stack_size+1)]; +integer ystack[(stack_size+1)]; +integer zstack[(stack_size+1)]; +integer dstack[(stack_size+1)]; /* pushed down values in \.{DVI} units */ +@z + +@x +mpx->h=0; mpx->v=0; +@y +mpx->h=0; mpx->v=0; mpx->d=0; +@z + +@x + mpx->hstack[mpx->stk_siz]=mpx->h; + mpx->vstack[mpx->stk_siz]=mpx->v; mpx->wstack[mpx->stk_siz]=mpx->w; + mpx->xstack[mpx->stk_siz]=mpx->x; + mpx->ystack[mpx->stk_siz]=mpx->y; mpx->zstack[mpx->stk_siz]=mpx->z; +@y + mpx->hstack[mpx->stk_siz]=mpx->h; + mpx->vstack[mpx->stk_siz]=mpx->v; mpx->wstack[mpx->stk_siz]=mpx->w; + mpx->xstack[mpx->stk_siz]=mpx->x; + mpx->ystack[mpx->stk_siz]=mpx->y; mpx->zstack[mpx->stk_siz]=mpx->z; + mpx->dstack[mpx->stk_siz]=mpx->d; +@z + +@x + mpx->h=mpx->hstack[mpx->stk_siz]; + mpx->v=mpx->vstack[mpx->stk_siz]; mpx->w=mpx->wstack[mpx->stk_siz]; + mpx->x=mpx->xstack[mpx->stk_siz]; + mpx->y=mpx->ystack[mpx->stk_siz]; mpx->z=mpx->zstack[mpx->stk_siz]; +@y + mpx->h=mpx->hstack[mpx->stk_siz]; + mpx->v=mpx->vstack[mpx->stk_siz]; mpx->w=mpx->wstack[mpx->stk_siz]; + mpx->x=mpx->xstack[mpx->stk_siz]; + mpx->y=mpx->ystack[mpx->stk_siz]; mpx->z=mpx->zstack[mpx->stk_siz]; + mpx->d=mpx->dstack[mpx->stk_siz]; +@z + +@x + case z0: return mpx->z; break; +@y + case z0: return mpx->z; break; + case dir: return mpx_get_byte(mpx); break; +@z + +@x + mpx->h += @; +@y + if (mpx->d==0) { + mpx->h+=mpx_scaled_char_width(mpx, cur_font, p); + } else { + mpx->v+=mpx_scaled_char_width(mpx, cur_font, p); + } +@z + +@x + mpx->h += q; +@y + if (mpx->d==0) { + mpx->h += q; + } else { + mpx->v += q; + } +@z + +@x +case pop: + mpx_do_pop(mpx); + break; +@y +case pop: + mpx_do_pop(mpx); + break; +case dir: + mpx->d=p; + break; +@z + +@x +case four_cases(right1): + mpx->h += trunc(p*mpx->dvi_scale); + break; +case w0: case four_cases(w1): + mpx->w = (web_integer)trunc(p*mpx->dvi_scale); mpx->h += mpx->w; + break; +case x0: case four_cases(x1): + mpx->x = (web_integer)trunc(p*mpx->dvi_scale); mpx->h += mpx->x; + break; +case four_cases(down1): + mpx->v += trunc(p*mpx->dvi_scale); + break; +case y0: case four_cases(y1): + mpx->y = (web_integer)trunc(p*mpx->dvi_scale); mpx->v += mpx->y; + break; +case z0: case four_cases(z1): + mpx->z = (web_integer)trunc(p*mpx->dvi_scale); mpx->v += mpx->z; + break; +@y +case four_cases(right1): + if (mpx->d==0) { + mpx->h+=trunc(p*mpx->dvi_scale); + } else { + mpx->v+=trunc(p*mpx->dvi_scale); + } + break; +case w0: case four_cases(w1): + if (mpx->d==0) { + mpx->h+=mpx->w; + } else { + mpx->v+=mpx->w; + } + break; +case x0: case four_cases(x1): + if (mpx->d==0) { + mpx->h+=mpx->x; + } else { + mpx->v+=mpx->x; + } + break; +case four_cases(down1): + if (mpx->d==0) { + mpx->v+=trunc(p*mpx->dvi_scale); + } else { + mpx->h-=trunc(p*mpx->dvi_scale); + } + break; +case y0: case four_cases(y1): + if (mpx->d==0) { + mpx->v+=mpx->y; + } else { + mpx->h-=mpx->y; + } + break; +case z0: case four_cases(z1): + if (mpx->d==0) { + mpx->v+=mpx->z; + } else { + mpx->h-=mpx->z; + } + break; +@z + +@x +@= +if (mpx_newer(mpxopt->mpname, mpxopt->mpxname)) + return 0 +@y +@= +if (mpx_newer(mpxopt->mpname, mpxopt->mpxname)) + return 0 + +@ ASCII p\TeX JFM ID +@d yoko_jfm_id 11 /* for `yoko-kumi' fonts */ +@d tate_jfm_id 9 /* for `tate-kumi' fonts */ +@d font_jfm_p(A) (mpx->font_id[(A)]!=0) + +@ @= +integer font_nt[max_fonts+1]; /* number of words in ctype table */ +integer font_id[max_fonts+1]; +integer jfm_char_code[max_widths+1]; +integer jfm_char_type[max_widths+1]; +integer jfm_char_index[max_fonts+1]; +integer next_jfm_char_index; + +@ @= +mpx->font_nt[0]=0; +mpx->font_id[0]=0; +mpx->jfm_char_type[0]=0; +mpx->next_jfm_char_index=0; + +@ JFM character type table is stored in the array |jfm_char_code| and +|jfm_char_type|. The character code and the character type of $i$-th +record is stored in |jfm_char_code[i]| and |jfm_char_type[i]|, respectively. +The table is in the order of character code. + +@= +mpx->font_id[f]=mpx->b0*(int)(256)+mpx->b1; +if ((mpx->font_id[f]==yoko_jfm_id) || (mpx->font_id[f]==tate_jfm_id)) { + mpx->font_nt[f]=mpx->b2*(int)(256)+mpx->b3; + mpx_read_tfm_word(mpx); +} else { + mpx->font_id[f]=0; + mpx->font_nt[f]=0; +} + +@ @= +mpx->jfm_char_index[f]=mpx->next_jfm_char_index; +k=mpx->jfm_char_index[f]; +mpx->next_jfm_char_index+=mpx->font_nt[f]; +while (knext_jfm_char_index) { + mpx_read_tfm_word(mpx); + mpx->jfm_char_code[k]=mpx->b0*(int)(256)+mpx->b1; + mpx->jfm_char_type[k]=mpx->b2*(int)(256)+mpx->b3; + k++; +} + +@ JFM character type table is looked up by binary search. + +@= +integer mpx_lookup_ctype (MPX mpx,integer f, integer c) +{ + integer l, u, r, ch; + l=0; u=mpx->font_nt[f]-1; + while (ljfm_char_code[mpx->jfm_char_index[f]+r]; + if (ch==c) { + return mpx->jfm_char_type[mpx->jfm_char_index[f]+r]; + } + if (ch> 8) & 0xff) +@d Lo(x) ( (x) & 0xff) + +@= +void mpx_print_kanji_char (MPX mpx,integer c) +{ + if (mpx->print_col+2>line_length-2 ) { + if (mpx->state==normal) { + fprintf(mpx->mpxfile, "\""); + mpx->state=special; + } + fprintf(mpx->mpxfile, " \n"); + mpx->print_col=0; + } + if (mpx->state==special) { + fprintf(mpx->mpxfile,"&"); + mpx->print_col++; + } + if (mpx->state!=normal) { + fprintf(mpx->mpxfile, "\""); + mpx->print_col++; + mpx->state=normal; + } + c=toBUFF(fromDVI(c)); + putc2(Hi(c), mpx->mpxfile); + mpx->print_col++; + putc2(Lo(c), mpx->mpxfile); + mpx->print_col++; +} +@z --- /dev/null +++ texlive-bin-2013.20130722.31261/texk/web2c/pmpostdir/psout.ch @@ -0,0 +1,42 @@ +@x +integer ps_offset; +@y +integer ps_offset; +integer is_mapfile_read; +@z + +@x +mp->ps->ps_offset = 0; +@y +mp->ps->ps_offset = 0; +mp->ps->is_mapfile_read = 0; +@z + +@x + mp->ps->fm_file = (mp->open_file)(mp, n, "r", mp_filetype_fontmap); + if (!mp->ps->fm_file) { +@y + mp->ps->fm_file = (mp->open_file)(mp, n, "r", mp_filetype_fontmap); + if (!mp->ps->fm_file) { + mp->ps->mitem->map_line = mp_xstrdup (mp,psf_tab_name); + n = mp->ps->mitem->map_line; + mp->ps->fm_file = (mp->open_file)(mp, n, "r", mp_filetype_fontmap); + } + if (!mp->ps->fm_file) { +@z + +@x +@d ps_tab_name "psfonts.map" /* locates font name translation table */ +@y +@d ps_tab_name "mpost.map" /* locates font name translation table */ +@d psf_tab_name "psfonts.map" /* locates font name translation table */ +@z + +@x + fm_read_info (mp); +@y + if (mp->ps->is_mapfile_read == 0) { + mp->ps->is_mapfile_read++; + fm_read_info (mp); + } +@z --- /dev/null +++ texlive-bin-2013.20130722.31261/texk/web2c/pmpostdir/svgout.ch @@ -0,0 +1,59 @@ +@x +@= + (k=='&')||(k=='>')||(k=='<') +@y +@= + (k=='&')||(k=='>')||(k=='<')||(k>=0x7F) +@z + +@x +@ Now for outputting the actual graphic objects. +@y +@ Now for outputting the actual graphic objects. + +@d yoko_jfm_id 11 /* `yoko-kumi' fonts */ +@d tate_jfm_id 9 /* `tate-kumi' fonts */ +@d font_jfm_p(A) (mp->font_id[(A)]!=0) +@z + +@x Even if prologues=3, Japanese texts are not converted into paths. + if (prologues == 3 ) { +@y + if (prologues == 3 && mp->font_id[gr_font_n(p)]==0) { +@z + +@x To realise vertical Japanese texts ... + mp_svg_attribute(mp, "font-size", mp->svg->buf); +@y + mp_svg_attribute(mp, "font-size", mp->svg->buf); + if ( mp->font_id[gr_font_n(p)]==tate_jfm_id ) { + mp_svg_reset_buf(mp); + append_string("tb-rl"); + mp_svg_attribute(mp, "writing-mode", mp->svg->buf); + } +@z + +@x + while (l-->0) { + k=(int)*s++; + if (@) { +@y + if ( mp->font_id[gr_font_n(p)]!=0 ) { + l >>= 1; + while (l-->0) { + k =((int)*s++)*0x100; k += (int)*s++; + append_string("&#"); + mp_svg_store_int(mp,toUCS(k)); + append_char(';'); + } + } else + while (l-->0) { + k=(int)*s++; + if (@) { +@z + +@x + mp_svg_print(mp, ""); +@y + mp_svg_print(mp, ""); +@z debian/patches/debian-builtin-searchpath0000664000000000000000000001130312213264212015541 0ustar #! /bin/sh /usr/share/dpatch/dpatch-run ## 53_builtin-searchpath-fix.dpatch ## ## DP: adjust built-in search paths for kpathsea library to Debian standard @DPATCH@ texk/kpathsea/texmf.cnf | 52 +++++++++++++----------------------------------- 1 file changed, 15 insertions(+), 37 deletions(-) --- texlive-bin.orig/texk/kpathsea/texmf.cnf +++ texlive-bin/texk/kpathsea/texmf.cnf @@ -54,20 +54,23 @@ TEXMFROOT = $SELFAUTOPARENT % The main tree of distributed packages and programs: -TEXMFDIST = $TEXMFROOT/texmf-dist +TEXMFDIST = /usr/share/texlive/texmf-dist % We used to have a separate /texmf tree with some core programs and files. % Keep the variable name. TEXMFMAIN = $TEXMFDIST +% The Debian search tree +TEXMFDEBIAN = /usr/share/texmf + % Local additions to the distribution trees. -TEXMFLOCAL = $TEXMFROOT/../texmf-local +TEXMFLOCAL = /usr/local/share/texmf % TEXMFSYSVAR, where *-sys store cached runtime data. -TEXMFSYSVAR = $TEXMFROOT/texmf-var +TEXMFSYSVAR = /var/lib/texmf % TEXMFSYSCONFIG, where *-sys store configuration data. -TEXMFSYSCONFIG = $TEXMFROOT/texmf-config +TEXMFSYSCONFIG = /etc/texmf % Per-user texmf tree(s) -- organized per the TDS, as usual. To define % more than one per-user tree, set this to a list of directories in @@ -76,10 +79,10 @@ TEXMFHOME = ~/texmf % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data. -TEXMFVAR = ~/.texlive2013/texmf-var +TEXMFVAR = ~/.texmf-var % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data. -TEXMFCONFIG = ~/.texlive2013/texmf-config +TEXMFCONFIG = ~/.texmf-config % List all the texmf trees. For an explanation of what they are, see the % TeX Live manual. @@ -91,7 +94,7 @@ % should take precedence over distribution files -- although it is % generally a source of confusion to have different versions of a % package installed, whatever the trees, so try to avoid it. -TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFLOCAL,!!$TEXMFDIST} +TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFLOCAL,!!$TEXMFDEBIAN,!!$TEXMFDIST} % Where to look for ls-R files. There need not be an ls-R in the % directories in this path, but if there is one, Kpathsea will use it. @@ -99,13 +102,13 @@ % does not create ls-R files in the non-!! elements -- because if an % ls-R is present, it will be used, and the disk will not be searched. % This is arguably a bug in kpathsea. -TEXMFDBS = {!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFLOCAL,!!$TEXMFDIST} +TEXMFDBS = {!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFLOCAL,!!$TEXMFDEBIAN,!!$TEXMFDIST} % The system trees. These are the trees that are shared by all users. % If a tree appears in this list, the mktex* scripts will use % VARTEXFONTS for generated files, if the original tree isn't writable; % otherwise the current working directory is used. -SYSTEXMF = $TEXMFSYSVAR;$TEXMFLOCAL;$TEXMFDIST +SYSTEXMF = $TEXMFSYSVAR;$TEXMFLOCAL;$TEXMFDEBIAN;$TEXMFDIST % First writable tree here is used by Lua(La)TeX for the font cache. % LuaLaTeX uses the value here, while ConTeXt uses the same variable but @@ -116,7 +119,7 @@ % Where generated fonts may be written. This tree is used when the sources % were found in a system tree and either that tree wasn't writable, or the % varfonts feature was enabled in MT_FEATURES in mktex.cnf. -VARTEXFONTS = $TEXMFVAR/fonts +VARTEXFONTS = /var/cache/fonts % On some systems, there will be a system tree which contains all the font % files that may be created as well as the formats. For example @@ -485,33 +488,8 @@ % since we don't want to scatter ../'s throughout the value. Hence we % explicitly list every directory. Arguably more understandable anyway. % -TEXMFCNF = {\ -$SELFAUTOLOC,\ -$SELFAUTOLOC/share/texmf-local/web2c,\ -$SELFAUTOLOC/share/texmf-dist/web2c,\ -$SELFAUTOLOC/share/texmf/web2c,\ -$SELFAUTOLOC/texmf-local/web2c,\ -$SELFAUTOLOC/texmf-dist/web2c,\ -$SELFAUTOLOC/texmf/web2c,\ -\ -$SELFAUTODIR,\ -$SELFAUTODIR/share/texmf-local/web2c,\ -$SELFAUTODIR/share/texmf-dist/web2c,\ -$SELFAUTODIR/share/texmf/web2c,\ -$SELFAUTODIR/texmf-local/web2c,\ -$SELFAUTODIR/texmf-dist/web2c,\ -$SELFAUTODIR/texmf/web2c,\ -\ -$SELFAUTOPARENT/../texmf-local/web2c,\ -$SELFAUTOPARENT,\ -\ -$SELFAUTOPARENT/share/texmf-local/web2c,\ -$SELFAUTOPARENT/share/texmf-dist/web2c,\ -$SELFAUTOPARENT/share/texmf/web2c,\ -$SELFAUTOPARENT/texmf-local/web2c,\ -$SELFAUTOPARENT/texmf-dist/web2c,\ -$SELFAUTOPARENT/texmf/web2c\ -} +TEXMFCNF = /etc/texmf/web2c;/usr/local/share/texmf/web2c;/usr/share/texmf/web2c;/usr/share/texlive/texmf-dist/web2c + % % For reference, here is the old brace-using definition: %TEXMFCNF = {$SELFAUTOLOC,$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,}/web2c} debian/patches/23_use_xdvi.bin0000664000000000000000000000156012213264212013440 0ustar #! /bin/sh /usr/share/dpatch/dpatch-run ## 23_use_xdvi.bin.dpatch ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: use xdvi.bin as xdvi binary, which is handled via alternatives ## DP: and not xdvi-xaw.real. The alternatives setting updates xdvi.bin ## DP: to xdvi-xaw.real @DPATCH@ texk/xdvik/xdvi-sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: texlive-bin-2009~svn13478/texk/xdvik/xdvi-sh.in =================================================================== --- texlive-bin-2009~svn13478.orig/texk/xdvik/xdvi-sh.in 2009-05-26 10:59:48.000000000 +0200 +++ texlive-bin-2009~svn13478/texk/xdvik/xdvi-sh.in 2009-05-27 22:20:14.000000000 +0200 @@ -50,4 +50,4 @@ XFILESEARCHPATH="$xdviapppath:${XFILESEARCHPATH-%D}"; export XFILESEARCHPATH fi -exec @final_exec_name@ $NAMEOPT ${1+"$@"} +exec xdvi.bin $NAMEOPT ${1+"$@"} debian/libkpathsea-dev.README0000664000000000000000000000206012213264212013103 0ustar Why a new soname of libkpathsea in teTeX 3.0? --------------------------------------------- We're just quoting Olaf Weber, the author of web2c. The full message can be found on: http://lists.debian.org/debian-tetex-maint/2004/03/msg00181.html "libkpathsea moved from using klibtool (a web2c-specific libtool-like hack) to libtool. As a result it acquired a new soname. libkpathsea was not designed to work well as a shared library, and has numerous flaws in that area -- in particular, too many internals are exposed, and too much is hard-coded." Olaf does not expect too many changes in the API of the libkpathsea between teTeX 2.0.2 and 3.0 so just relinking the programs should be sufficient. However that is not really predictable. "So at present my advice is that it's better to be safe than sorry, and enforce that the version of libkpathsea matches the program's version." A new redesigned libkpathsea, which is really a shared lib, is on his TODO list, but he can't say when it will be released. -- Frank Küster , Wed Aug 24 12:54:11 2005 debian/texconfig.sh0000664000000000000000000000343612213264212011513 0ustar #!/bin/sh # # texconfig replacement script in Debian, which does not ship the # original texconfig anymore # # Copyright (C) 2012 Norbert Preining, Julian Gilbey # # Public domain # cat <<'EOF' The original texconfig is not shipped on Debian due to the way texconfig handles config files. Furthermore, all of the texconfig features can be performed in other ways on a Debian system. EOF if [ "$1" = '--help' ] then cat <<'EOF' conf Not needed dvipdfm paper Use paperconf dvips add PRINTERNAME Use touch /etc/texmf/dvips/config/config.PRINTERNAME dvips del PRINTERNAME For a printer you have added: rm /etc/texmf/dvips/config/config.PRINTERNAME You should not remove printers that you have not created, or that are shipped by Debian dvips mode Not supported dvips [-P PRINTER] mode MODE dvips [-P PRINTER] offset x-OFFSET,y-OFFSET dvips [-P PRINTER] printcmd CMD Make a copy of /usr/share/texlive/texmf/dvips/config/config.PRINTER in /etc/texmf/dvips/config/ and edit the file (but that should not be necessary) faq Not needed font vardir DIR, font ro, font rw Please read section 2.5, font caching, in the TeX-on-Debian documentation in /usr/share/doc/tex-common/. formats hyphen FORMAT Should not be used on Debian, see TeX-on-Debian, update-fmtutil for details. init [format] Run fmtutil-sys --all or fmtutil-sys --byfmt format mode-list not supported mode MODE Edit /etc/texmf/web2c/mktex.cnf paper [a4|letter] pdftex paper [a4|letter] xdvi paper PAPER Use paperconf rehash Run mktexlsr EOF else cat <<'EOF' To read a list of replacements for the texconfig features on Debian, run texconfig --help EOF fi debian/libkpathsea6.install0000664000000000000000000000006612213264212013132 0ustar usr/lib/libkpathsea.so.6.*.* usr/lib/libkpathsea.so.6 debian/libkpathsea-dev.install0000664000000000000000000000010412213264212013611 0ustar usr/lib/libkpathsea.a usr/lib/libkpathsea.so usr/include/kpathsea/*