diff --git a/source/README.2building b/source/README.2building index 9b2a43b598..622c22b70a 100644 --- a/source/README.2building +++ b/source/README.2building @@ -50,9 +50,13 @@ rules when a tool (such as 'tangle', 'ctangle', and 'convert') creates several output files. This allows for parallel builds ('make -j N' with N>1 or even 'make -j') that can considerably speed up the TL build. - Incidentally, a noticeable speed-up can be independently gained by -using a configure cache file, i.e., specifying the 'configure' option -'-C' (recommended). + If you're using TL's 'Build' script, you can enable '-j' with the +environment variable 'TL_MAKE_FLAGS', as in: 'env +TL_MAKE_FLAGS=-j`nproc` ./Build'. + + Independently, a noticeable speed-up can also be gained by using a +configure cache file, i.e., specifying the 'configure' option '-C' +(recommended). 4.3 Build distribution ====================== @@ -230,6 +234,11 @@ test name exactly as specified in the '.am' file: make -C $ww check SUBDIRS=. TESTS=hitexdir/tests/hello.test + Without the 'SUBDIRS=.', errors like this will show up, since 'make' +will descend into every directory. + + fatal: making test-suite.log: failed to create hitexdir/tests/hello.test + If you get tired of looking at the 'Entering'/'Leaving directory' lines, you can add the (GNU) make option '--no-print-dir'. diff --git a/source/README.4layout b/source/README.4layout index 6134378164..a822863c60 100644 --- a/source/README.4layout +++ b/source/README.4layout @@ -27,13 +27,13 @@ many extra hassles, so don't do that, tempting as it may be. Currently the versions we use are: - autoconf (GNU Autoconf) 2.71 + autoconf (GNU Autoconf) 2.72 automake (GNU automake) 1.16.5 bison (GNU Bison) 3.8.2 flex 2.6.0 ltmain.sh (GNU libtool) 2.4.7 m4 (GNU M4) 1.4.19 - makeinfo (GNU texinfo) 7.0.2 + makeinfo (GNU texinfo) 7.1 These versions should be used to update the generated files (e.g., 'configure' or 'Makefile.in') in all or parts of the TL tree after their diff --git a/source/doc/tlbuild-incl/install-tl.texi b/source/doc/tlbuild-incl/install-tl.texi index 0f6dc2f76f..f6bae78e39 100644 --- a/source/doc/tlbuild-incl/install-tl.texi +++ b/source/doc/tlbuild-incl/install-tl.texi @@ -803,5 +803,5 @@ This script and its documentation were written for the TeX Live distribution (@url{https://tug.org/texlive}) and both are licensed under the GNU General Public License Version 2 or later. -$Id: install-tl 66457 2023-03-07 23:07:12Z preining $ +$Id: install-tl 69711 2024-02-05 17:23:27Z karl $ diff --git a/source/doc/tlbuild-incl/tlmgr.texi b/source/doc/tlbuild-incl/tlmgr.texi index 75a5c3cadc..ec539d67a4 100644 --- a/source/doc/tlbuild-incl/tlmgr.texi +++ b/source/doc/tlbuild-incl/tlmgr.texi @@ -74,6 +74,12 @@ repository (typically useful when updating from CTAN). Display detailed information about a package @emph{what}, such as the installation status and description, of searches for @emph{what} in all packages. +@item @code{tlmgr bug} @emph{what} +@anchor{tlmgr @code{tlmgr bug} @emph{what}} + +Display available bug-reporting information for @emph{what}, a package or +file name. + @end table For all the capabilities and details of @code{tlmgr}, please read the @@ -404,6 +410,17 @@ performed are written to the terminal. @end table +@node tlmgr bug [@emph{search-string}] +@appendixsubsec bug [@emph{search-string}] + +Searches for @emph{search-string} (prompted for, if not given) as a package +name and in package descriptions, as complete words, and in filenames, +as any substring, and outputs bug-reporting and other information for +the package selected from the results. + +The search is equivalent to @code{tlmgr search --word --file @emph{search-string}. +Thus, @emph{search-string} is interpreted as a (Perl) regular expression.} + @node tlmgr candidates @emph{pkg} @appendixsubsec candidates @emph{pkg} @@ -2683,5 +2700,18 @@ This script and its documentation were written for the TeX Live distribution (@url{https://tug.org/texlive}) and both are licensed under the GNU General Public License Version 2 or later. -$Id: tlmgr.pl 66457 2023-03-07 23:07:12Z preining $ +$Id: tlmgr.pl 70001 2024-02-19 23:17:07Z karl $ + +@node tlmgr POD ERRORS +@appendixsec POD ERRORS + +Hey! @strong{The above document had some coding errors, which are explained below:} + +@table @asis +@item Around line 8454: +@anchor{tlmgr Around line 8454@asis{:}} + +Unterminated C<...> sequence + +@end table diff --git a/source/doc/tlbuild.info b/source/doc/tlbuild.info index 9fa3edf31e..08cc833a08 100644 --- a/source/doc/tlbuild.info +++ b/source/doc/tlbuild.info @@ -3,7 +3,7 @@ tlbuild.texi. This file documents the TeX Live build system and more. -Copyright (C) 2016-2023 Karl Berry. +Copyright (C) 2016-2024 Karl Berry. Copyright (C) 2013-2015 Karl Berry & Peter Breitenlohner. Permission is granted to make and distribute verbatim copies of this @@ -33,7 +33,7 @@ END-INFO-DIR-ENTRY  File: tlbuild.info, Node: Top, Next: Introduction, Up: (dir) -Building TeX Live (2023) +Building TeX Live (2024) ************************ For an overview of this manual, *note Introduction::. @@ -59,8 +59,7 @@ File: tlbuild.info, Node: Introduction, Next: Overview of build system, Prev: 1 Introduction ************** -This manual (dated December 2023) corresponds to the TeX Live 2023 -release. +This manual (dated March 2024) corresponds to the TeX Live 2024 release. This manual is aimed at system installers and programmers, and focuses on how to configure, build, and develop the TeX Live (TL) @@ -3074,7 +3073,7 @@ This script and its documentation were written for the TeX Live distribution () and both are licensed under the GNU General Public License Version 2 or later. - $Id: install-tl 66457 2023-03-07 23:07:12Z preining $ + $Id: install-tl 69711 2024-02-05 17:23:27Z karl $  File: tlbuild.info, Node: tlmgr, Next: Index, Prev: install-tl, Up: Top @@ -3098,6 +3097,7 @@ Appendix B tlmgr * tlmgr MACHINE-READABLE OUTPUT:: * tlmgr ENVIRONMENT VARIABLES:: * tlmgr AUTHORS AND COPYRIGHT:: +* tlmgr POD ERRORS::  File: tlbuild.info, Node: tlmgr NAME, Next: tlmgr SYNOPSIS, Up: tlmgr @@ -3179,6 +3179,11 @@ with 'tlmgr': installation status and description, of searches for _what_ in all packages. +'tlmgr bug' _what_ + + Display available bug-reporting information for _what_, a package + or file name. + For all the capabilities and details of 'tlmgr', please read the following voluminous information. @@ -3412,6 +3417,7 @@ B.6 ACTIONS * tlmgr help:: * tlmgr version:: * tlmgr backup:: +* tlmgr bug [_search-string_]:: * tlmgr candidates _pkg_:: * tlmgr check [_option_...] [depends|executes|files|runfiles|texmfdbs|all]:: * tlmgr conf:: @@ -3465,7 +3471,7 @@ Gives version information (same as '--version'). reported, too.  -File: tlbuild.info, Node: tlmgr backup, Next: tlmgr candidates _pkg_, Prev: tlmgr version, Up: tlmgr ACTIONS +File: tlbuild.info, Node: tlmgr backup, Next: tlmgr bug [_search-string_], Prev: tlmgr version, Up: tlmgr ACTIONS B.6.3 backup ------------ @@ -3520,9 +3526,24 @@ B.6.3 backup to be performed are written to the terminal.  -File: tlbuild.info, Node: tlmgr candidates _pkg_, Next: tlmgr check [_option_...] [depends|executes|files|runfiles|texmfdbs|all], Prev: tlmgr backup, Up: tlmgr ACTIONS +File: tlbuild.info, Node: tlmgr bug [_search-string_], Next: tlmgr candidates _pkg_, Prev: tlmgr backup, Up: tlmgr ACTIONS + +B.6.4 bug [_search-string_] +--------------------------- + +Searches for _search-string_ (prompted for, if not given) as a package +name and in package descriptions, as complete words, and in filenames, +as any substring, and outputs bug-reporting and other information for +the package selected from the results. + + The search is equivalent to 'tlmgr search --word --file +_search-string_. Thus, _search-string_ is interpreted as a (Perl) +regular expression.' + + +File: tlbuild.info, Node: tlmgr candidates _pkg_, Next: tlmgr check [_option_...] [depends|executes|files|runfiles|texmfdbs|all], Prev: tlmgr bug [_search-string_], Up: tlmgr ACTIONS -B.6.4 candidates _pkg_ +B.6.5 candidates _pkg_ ---------------------- Shows the available candidate repositories for package _pkg_. See *note @@ -3531,7 +3552,7 @@ MULTIPLE REPOSITORIES: tlmgr MULTIPLE REPOSITORIES. below.  File: tlbuild.info, Node: tlmgr check [_option_...] [depends|executes|files|runfiles|texmfdbs|all], Next: tlmgr conf, Prev: tlmgr candidates _pkg_, Up: tlmgr ACTIONS -B.6.5 check [_option_...] [depends|executes|files|runfiles|texmfdbs|all] +B.6.6 check [_option_...] [depends|executes|files|runfiles|texmfdbs|all] ------------------------------------------------------------------------ Execute one (or all) check(s) of the consistency of the installation. @@ -3586,7 +3607,7 @@ what is being done, run 'tlmgr -v check'.)  File: tlbuild.info, Node: tlmgr conf, Next: tlmgr dump-tlpdb [_option_...] [--json], Prev: tlmgr check [_option_...] [depends|executes|files|runfiles|texmfdbs|all], Up: tlmgr ACTIONS -B.6.6 conf +B.6.7 conf ---------- *conf [texmf|tlmgr|updmap [--conffile _file_] [--delete] [_key_ [_value_]]]* @@ -3645,7 +3666,7 @@ B.6.6 conf  File: tlbuild.info, Node: tlmgr dump-tlpdb [_option_...] [--json], Next: tlmgr generate, Prev: tlmgr conf, Up: tlmgr ACTIONS -B.6.7 dump-tlpdb [_option_...] [--json] +B.6.8 dump-tlpdb [_option_...] [--json] --------------------------------------- Dump complete local or remote TLPDB to standard output, as-is. The @@ -3684,7 +3705,7 @@ platform.  File: tlbuild.info, Node: tlmgr generate, Next: tlmgr gui, Prev: tlmgr dump-tlpdb [_option_...] [--json], Up: tlmgr ACTIONS -B.6.8 generate +B.6.9 generate -------------- *generate [_option_...] language* @@ -3790,15 +3811,15 @@ with an extension recreates only that given language file.  File: tlbuild.info, Node: tlmgr gui, Next: tlmgr info, Prev: tlmgr generate, Up: tlmgr ACTIONS -B.6.9 gui ---------- +B.6.10 gui +---------- Start the graphical user interface. See *GUI* below.  File: tlbuild.info, Node: tlmgr info, Next: tlmgr init-usertree, Prev: tlmgr gui, Up: tlmgr ACTIONS -B.6.10 info +B.6.11 info ----------- *info [_option_...] _pkg_...* @@ -3899,7 +3920,7 @@ B.6.10 info  File: tlbuild.info, Node: tlmgr init-usertree, Next: tlmgr install [_option_...] _pkg_..., Prev: tlmgr info, Up: tlmgr ACTIONS -B.6.11 init-usertree +B.6.12 init-usertree -------------------- Sets up a texmf tree for so-called user mode management, either the @@ -3909,7 +3930,7 @@ with '--usertree'. See *note USER MODE: tlmgr USER MODE. below.  File: tlbuild.info, Node: tlmgr install [_option_...] _pkg_..., Next: tlmgr key, Prev: tlmgr init-usertree, Up: tlmgr ACTIONS -B.6.12 install [_option_...] _pkg_... +B.6.13 install [_option_...] _pkg_... ------------------------------------- Install each _pkg_ given on the command line, if it is not already @@ -3981,7 +4002,7 @@ yourself if you are using this feature and want new symlinks added.  File: tlbuild.info, Node: tlmgr key, Next: tlmgr list, Prev: tlmgr install [_option_...] _pkg_..., Up: tlmgr ACTIONS -B.6.13 key +B.6.14 key ---------- *key list* @@ -4007,7 +4028,7 @@ B.6.13 key  File: tlbuild.info, Node: tlmgr list, Next: tlmgr option, Prev: tlmgr key, Up: tlmgr ACTIONS -B.6.14 list +B.6.15 list ----------- Synonym for *note info: tlmgr info. @@ -4015,7 +4036,7 @@ Synonym for *note info: tlmgr info.  File: tlbuild.info, Node: tlmgr option, Next: tlmgr paper, Prev: tlmgr list, Up: tlmgr ACTIONS -B.6.15 option +B.6.16 option ------------- *option [--json] [show]* @@ -4121,7 +4142,7 @@ of only the current user. All three options are on by default.  File: tlbuild.info, Node: tlmgr paper, Next: tlmgr path, Prev: tlmgr option, Up: tlmgr ACTIONS -B.6.16 paper +B.6.17 paper ------------ *paper [a4|letter]* @@ -4161,7 +4182,7 @@ settings.  File: tlbuild.info, Node: tlmgr path, Next: tlmgr pinning, Prev: tlmgr paper, Up: tlmgr ACTIONS -B.6.17 path +B.6.18 path ----------- *path [--windowsmode=user|admin] add* @@ -4202,7 +4223,7 @@ B.6.17 path  File: tlbuild.info, Node: tlmgr pinning, Next: tlmgr platform, Prev: tlmgr path, Up: tlmgr ACTIONS -B.6.18 pinning +B.6.19 pinning -------------- The 'pinning' action manages the pinning file, see *note Pinning: tlmgr @@ -4229,7 +4250,7 @@ Pinning. below.  File: tlbuild.info, Node: tlmgr platform, Next: tlmgr postaction, Prev: tlmgr pinning, Up: tlmgr ACTIONS -B.6.19 platform +B.6.20 platform --------------- *platform list|add|remove _platform_...* @@ -4270,7 +4291,7 @@ B.6.19 platform  File: tlbuild.info, Node: tlmgr postaction, Next: tlmgr print-platform, Prev: tlmgr platform, Up: tlmgr ACTIONS -B.6.20 postaction +B.6.21 postaction ----------------- *postaction [_option_...] install [shortcut|fileassoc|script] [_pkg_...]* @@ -4307,7 +4328,7 @@ B.6.20 postaction  File: tlbuild.info, Node: tlmgr print-platform, Next: tlmgr print-platform-info, Prev: tlmgr postaction, Up: tlmgr ACTIONS -B.6.21 print-platform +B.6.22 print-platform --------------------- Print the TeX Live identifier for the detected platform @@ -4317,7 +4338,7 @@ Print the TeX Live identifier for the detected platform  File: tlbuild.info, Node: tlmgr print-platform-info, Next: tlmgr remove [_option_...] _pkg_..., Prev: tlmgr print-platform, Up: tlmgr ACTIONS -B.6.22 print-platform-info +B.6.23 print-platform-info -------------------------- Print the TeX Live platform identifier, TL platform long name, and @@ -4326,7 +4347,7 @@ original output from guess.  File: tlbuild.info, Node: tlmgr remove [_option_...] _pkg_..., Next: tlmgr repository, Prev: tlmgr print-platform-info, Up: tlmgr ACTIONS -B.6.23 remove [_option_...] _pkg_... +B.6.24 remove [_option_...] _pkg_... ------------------------------------ Remove each _pkg_ specified. Removing a collection removes all package @@ -4385,7 +4406,7 @@ individual package with a symlink in a system directory.  File: tlbuild.info, Node: tlmgr repository, Next: tlmgr restore, Prev: tlmgr remove [_option_...] _pkg_..., Up: tlmgr ACTIONS -B.6.24 repository +B.6.25 repository ----------------- *repository list* @@ -4443,7 +4464,7 @@ B.6.24 repository  File: tlbuild.info, Node: tlmgr restore, Next: tlmgr search, Prev: tlmgr repository, Up: tlmgr ACTIONS -B.6.25 restore +B.6.26 restore -------------- *restore [_option_...] _pkg_ [_rev_]* @@ -4500,7 +4521,7 @@ B.6.25 restore  File: tlbuild.info, Node: tlmgr search, Next: tlmgr shell, Prev: tlmgr restore, Up: tlmgr ACTIONS -B.6.26 search +B.6.27 search ------------- *search [_option_...] _what_* @@ -4539,7 +4560,7 @@ B.6.26 search  File: tlbuild.info, Node: tlmgr shell, Next: tlmgr show, Prev: tlmgr search, Up: tlmgr ACTIONS -B.6.27 shell +B.6.28 shell ------------ Starts an interactive mode, where tlmgr prompts for commands. This can @@ -4601,7 +4622,7 @@ get [_var_] =item set [_var_ [_val_]]  File: tlbuild.info, Node: tlmgr show, Next: tlmgr uninstall, Prev: tlmgr shell, Up: tlmgr ACTIONS -B.6.28 show +B.6.29 show ----------- Synonym for *note info: tlmgr info. @@ -4609,7 +4630,7 @@ Synonym for *note info: tlmgr info.  File: tlbuild.info, Node: tlmgr uninstall, Next: tlmgr update [_option_...] [_pkg_...], Prev: tlmgr show, Up: tlmgr ACTIONS -B.6.29 uninstall +B.6.30 uninstall ---------------- Synonym for *note remove: tlmgr remove [_option_...] _pkg_.... @@ -4617,7 +4638,7 @@ Synonym for *note remove: tlmgr remove [_option_...] _pkg_....  File: tlbuild.info, Node: tlmgr update [_option_...] [_pkg_...], Prev: tlmgr uninstall, Up: tlmgr ACTIONS -B.6.30 update [_option_...] [_pkg_...] +B.6.31 update [_option_...] [_pkg_...] -------------------------------------- Updates the packages given as arguments to the latest version available @@ -5680,7 +5701,7 @@ normal user installations. used, regardless of any setting.  -File: tlbuild.info, Node: tlmgr AUTHORS AND COPYRIGHT, Prev: tlmgr ENVIRONMENT VARIABLES, Up: tlmgr +File: tlbuild.info, Node: tlmgr AUTHORS AND COPYRIGHT, Next: tlmgr POD ERRORS, Prev: tlmgr ENVIRONMENT VARIABLES, Up: tlmgr B.14 AUTHORS AND COPYRIGHT ========================== @@ -5689,7 +5710,20 @@ This script and its documentation were written for the TeX Live distribution () and both are licensed under the GNU General Public License Version 2 or later. - $Id: tlmgr.pl 66457 2023-03-07 23:07:12Z preining $ + $Id: tlmgr.pl 70001 2024-02-19 23:17:07Z karl $ + + +File: tlbuild.info, Node: tlmgr POD ERRORS, Prev: tlmgr AUTHORS AND COPYRIGHT, Up: tlmgr + +B.15 POD ERRORS +=============== + +Hey! *The above document had some coding errors, which are explained +below:* + +Around line 8454: + + Unterminated C<...> sequence  File: tlbuild.info, Node: Index, Prev: tlmgr, Up: Top @@ -6297,425 +6331,429 @@ Index Tag Table: Node: Top1208 Node: Introduction2118 -Node: Overview of build system3946 -Node: Prerequisites5997 -Ref: Prerequisites-Footnote-18996 -Node: Building9299 -Node: Build iteration10641 -Node: Build in parallel11685 -Node: Build distribution12436 -Node: Build one package13084 -Node: Build one engine17797 -Node: Cross compilation20409 -Node: Cross configuring21688 -Node: Cross problems23365 -Node: Installing25027 -Node: Installation directories26047 -Node: Linked scripts27865 -Node: Distro builds29360 -Node: Layout and infrastructure31736 -Node: Build system tools32567 -Node: Top-level directories34784 -Node: Autoconf macros37020 -Node: General setup macros37782 -Node: Macros for programs38657 -Node: Macros for compilers39458 -Node: Macros for libraries40866 -Node: Macros for library and header flags41292 -Node: Macros for Windows43203 -Node: Library modules44798 -Node: png library45287 -Node: zlib library47635 -Node: freetype library48150 -Node: kpathsea library48846 -Node: Program modules50225 -Node: t1utils package50653 -Node: xindy package51198 -Node: xdvik package52314 -Node: asymptote53373 -Node: Extending TeX Live53877 -Node: Adding a new program module54684 -Node: Adding a new engine59447 -Node: Adding a new generic library module61232 -Node: Adding a new TeX-specific library module63453 -Node: Configure options64151 -Node: Global configure options65532 -Node: --disable-native-texlive-build66074 -Node: --prefix --bindir ...67036 -Node: --disable-largefile67576 -Node: --disable-missing68118 -Node: --enable-compiler-warnings=LEVEL68519 -Node: --enable-cxx-runtime-hack69175 -Node: --enable-maintainer-mode69595 -Node: --enable-multiplatform70124 -Node: --enable-shared70697 -Node: --enable-silent-rules71068 -Node: --without-ln-s71520 -Node: --without-x71867 -Node: Program-specific configure options72055 -Node: --enable-PROG --disable-PROG72698 -Node: --disable-all-pkgs72971 -Node: Configure options for texk/web2c73754 -Node: Configure options for texk/bibtex-x76292 -Node: Configure options for texk/dvipdfm-x76835 -Node: Configure options for texk/dvisvgm77611 -Node: Configure options for texk/texlive78492 -Node: Configure options for texk/xdvik78913 -Node: Configure options for utils/xindy79534 -Node: Library-specific configure options80424 -Node: Configure options for kpathsea81385 -Node: Variables for configure82089 -Node: Coding conventions83515 -Node: Declarations and definitions84230 -Node: Const86404 -Node: Continuous integration88268 -Node: Transfer from Subversion to Github88932 -Node: Automatic update of the Git mirror91094 -Node: CI testing on Travis-CI91676 -Node: Releases on Github92385 -Node: install-tl92825 -Node: install-tl NAME93269 -Node: install-tl SYNOPSIS93449 -Node: install-tl DESCRIPTION93687 -Node: install-tl REFERENCES94884 -Node: install-tl EXAMPLES95493 -Ref: install-tl install-tl --paper=letter95944 -Ref: install-tl install-tl --scheme _scheme_96080 -Ref: install-tl install-tl --no-interaction96235 -Ref: install-tl install-tl --profile _texlive.profile_96387 -Node: install-tl OPTIONS96655 -Ref: install-tl *-gui* [[=]_module_]97152 -Ref: install-tl *-no-gui*97163 -Ref: install-tl text97371 -Ref: install-tl tcl (or "perltk" or "wizard" or "expert" or nothing)97556 -Ref: install-tl *-lang* _llcode_98188 -Ref: install-tl *-repository* _url|path_98812 -Ref: install-tl *-select-repository*99706 -Ref: install-tl *-all-options*100124 -Ref: install-tl *-custom-bin* _path_100379 -Ref: install-tl *-debug-fakenet*101211 -Ref: install-tl *-debug-setup-vars*101425 -Ref: install-tl *-debug-translation*101573 -Ref: install-tl *-force-platform* _platform_101849 -Ref: install-tl *-help*, *--help*, *-?*102107 -Ref: install-tl *-in-place*102520 -Ref: install-tl *-init-from-profile* _profile_file_103065 -Ref: install-tl *-logfile* _file_103334 -Ref: install-tl *-no-cls*103685 -Ref: install-tl *-no-continue*103812 -Ref: install-tl *-no-doc-install*104383 -Ref: install-tl *-no-src-install*104402 -Ref: install-tl *-no-installation*105193 -Ref: install-tl *-no-interaction*105344 -Ref: install-tl *-no-persistent-downloads*105601 -Ref: install-tl *-persistent-downloads*105626 -Ref: install-tl *-no-verify-downloads*106233 -Ref: install-tl *-non-admin*106596 -Ref: install-tl *-paper* a4*|*letter106702 -Ref: install-tl *-portable*106898 -Ref: install-tl *-print-platform*107035 -Ref: install-tl *-profile* _profile_file_107233 -Ref: install-tl *-q*107454 -Ref: install-tl *-scheme* _scheme_107516 -Ref: install-tl *-texdir* _dir_107917 -Ref: install-tl *-texuserdir* _dir_108522 -Ref: install-tl *-texmflocal* _dir_108811 -Ref: install-tl *-texmfhome* _dir_109436 -Ref: install-tl *-texmfsysconfig* _dir_109745 -Ref: install-tl *-texmfsysvar* _dir_109767 -Ref: install-tl *-texmfconfig* _dir_109862 -Ref: install-tl *-texmfvar* _dir_109881 -Ref: install-tl *-v*110089 -Ref: install-tl *-version*, *--version*110245 -Node: install-tl PROFILES110379 -Ref: install-tl instopt_adjustpath (default 0 on Unix, 1 on Windows)113395 -Ref: install-tl instopt_adjustrepo (default 1)113471 -Ref: install-tl instopt_letter (default 0)113608 -Ref: install-tl instopt_portable (default 0)113699 -Ref: install-tl instopt_write18_restricted (default 1)114238 -Node: install-tl ENVIRONMENT VARIABLES115577 -Ref: install-tl NOPERLDOC115940 -Ref: install-tl TEXLIVE_DOWNLOADER116025 -Ref: install-tl TL_DOWNLOAD_PROGRAM116048 -Ref: install-tl TL_DOWNLOAD_ARGS116068 -Ref: install-tl TEXLIVE_INSTALL_ENV_NOCHECK116272 -Ref: install-tl TEXLIVE_INSTALL_NO_CONTEXT_CACHE116474 -Ref: install-tl TEXLIVE_INSTALL_NO_DISKCHECK116586 -Ref: install-tl TEXLIVE_INSTALL_NO_RESUME117002 -Ref: install-tl TEXLIVE_INSTALL_NO_WELCOME117154 -Ref: install-tl TEXLIVE_INSTALL_PAPER117275 -Ref: install-tl TEXLIVE_INSTALL_PREFIX117421 -Ref: install-tl TEXLIVE_INSTALL_TEXMFCONFIG117452 -Ref: install-tl TEXLIVE_INSTALL_TEXMFVAR117480 -Ref: install-tl TEXLIVE_INSTALL_TEXMFHOME117509 -Ref: install-tl TEXLIVE_INSTALL_TEXMFLOCAL117539 -Ref: install-tl TEXLIVE_INSTALL_TEXMFSYSCONFIG117573 -Ref: install-tl TEXLIVE_INSTALL_TEXMFSYSVAR117604 -Node: install-tl DIRECTORY TREES118042 -Node: install-tl BUGS120626 -Node: install-tl AUTHORS AND COPYRIGHT121506 -Node: tlmgr121908 -Node: tlmgr NAME122393 -Node: tlmgr SYNOPSIS122537 -Node: tlmgr DESCRIPTION122739 -Node: tlmgr EXAMPLES123850 -Ref: tlmgr tlmgr option repository ctan124113 -Ref: tlmgr tlmgr option repository https://mirror.ctan.org/systems/texlive/tlnet124186 -Ref: tlmgr tlmgr update --list124791 -Ref: tlmgr tlmgr update --all124884 -Ref: tlmgr tlmgr info _what_125041 -Node: tlmgr OPTIONS125303 -Ref: tlmgr *--repository* _url|path_125836 -Ref: tlmgr /some/local/dir127022 -Ref: tlmgr file:/some/local/dir127051 -Ref: tlmgr ctan127124 -Ref: tlmgr https://mirror.ctan.org/systems/texlive/tlnet127178 -Ref: tlmgr http://server/path/to/tlnet127519 -Ref: tlmgr https://server/path/to/tlnet127900 -Ref: tlmgr ftp://server/path/to/tlnet128368 -Ref: tlmgr user@machine:/path/to/tlnet128500 -Ref: tlmgr scp://user@machine/path/to/tlnet128541 -Ref: tlmgr ssh://user@machine/path/to/tlnet128582 -Ref: tlmgr *--gui* [_action_]128976 -Ref: tlmgr *--gui-lang* _llcode_129790 -Ref: tlmgr *--command-logfile* _file_130532 -Ref: tlmgr *--debug-translation*130799 -Ref: tlmgr *--machine-readable*131003 -Ref: tlmgr *--no-execute-actions*131272 -Ref: tlmgr *--package-logfile* _file_131466 -Ref: tlmgr *--pause*131721 -Ref: tlmgr *--persistent-downloads*131877 -Ref: tlmgr *--no-persistent-downloads*131906 -Ref: tlmgr *--pin-file*132401 -Ref: tlmgr *--usermode*132620 -Ref: tlmgr *--usertree* _dir_132741 -Ref: tlmgr *--verify-repo=[none|main|all]*132868 -Node: tlmgr ACTIONS133767 -Node: tlmgr help134628 -Node: tlmgr version135105 -Node: tlmgr backup135368 -Ref: tlmgr *backup [_option_...] --all*135540 -Ref: tlmgr *backup [_option_...] _pkg_...*135573 -Ref: tlmgr *--backupdir* _directory_136640 -Ref: tlmgr *--all*136858 -Ref: tlmgr *--clean*[=_N_]137111 -Ref: tlmgr *--dry-run*137439 -Node: tlmgr candidates _pkg_137569 -Node: tlmgr check [_option_...] [depends|executes|files|runfiles|texmfdbs|all]137924 -Ref: tlmgr *depends*138438 -Ref: tlmgr *executes*138780 -Ref: tlmgr *files*138895 -Ref: tlmgr *runfiles*139031 -Ref: tlmgr *texmfdbs*139168 -Ref: tlmgr - all items in TEXMFDBS have the !! prefix.139398 -Ref: tlmgr - all items in TEXMFBDS have an ls-R file (if they exist at all).139474 -Ref: tlmgr - all items in TEXMF with !! are listed in TEXMFDBS.139539 -Ref: tlmgr - all items in TEXMF with an ls-R file are listed in TEXMFDBS.139614 -Ref: tlmgr *--use-svn*139640 -Node: tlmgr conf139781 -Ref: tlmgr *conf [texmf|tlmgr|updmap [--conffile _file_] [--delete] [_key_ [_value_]]]*140071 -Ref: tlmgr *conf auxtrees [--conffile _file_] [show|add|remove] [_value_]*140136 -Node: tlmgr dump-tlpdb [_option_...] [--json]142552 -Ref: tlmgr *--local*142988 -Ref: tlmgr *--remote*143028 -Ref: tlmgr *--json*143067 -Node: tlmgr generate143638 -Ref: tlmgr *generate [_option_...] language*143834 -Ref: tlmgr *generate [_option_...] language.dat*143873 -Ref: tlmgr *generate [_option_...] language.def*143912 -Ref: tlmgr *generate [_option_...] language.dat.lua*143955 -Ref: tlmgr *--dest* _output_file_146283 -Ref: tlmgr *--localcfg* _local_conf_file_146860 -Ref: tlmgr *--rebuild-sys*146984 -Node: tlmgr gui147799 -Node: tlmgr info147977 -Ref: tlmgr *info [_option_...] _pkg_...*148139 -Ref: tlmgr *info [_option_...] collections*148173 -Ref: tlmgr *info [_option_...] schemes*148203 -Ref: tlmgr *--list*149734 -Ref: tlmgr *--only-installed*150049 -Ref: tlmgr *--only-remote*150238 -Ref: tlmgr *--data item1,item2,...*150543 -Ref: tlmgr *--json* 1151916 -Node: tlmgr init-usertree152299 -Node: tlmgr install [_option_...] _pkg_...152680 -Ref: tlmgr *--dry-run* 1153189 -Ref: tlmgr *--file*153307 -Ref: tlmgr *--force*153530 -Ref: tlmgr *--no-depends*153751 -Ref: tlmgr *--no-depends-at-all*153911 -Ref: tlmgr *--reinstall*154312 -Ref: tlmgr *--with-doc*154691 -Ref: tlmgr *--with-src*154705 -Node: tlmgr key155433 -Ref: tlmgr *key list*155591 -Ref: tlmgr *key add _file_*155609 -Ref: tlmgr *key remove _keyid_*155631 -Node: tlmgr list156225 -Node: tlmgr option156387 -Ref: tlmgr *option [--json] [show]*156543 -Ref: tlmgr *option [--json] showall|help*156575 -Ref: tlmgr *option _key_ [_value_]*156601 -Node: tlmgr paper161180 -Ref: tlmgr *paper [a4|letter]*161329 -Ref: tlmgr *<[xdvi|pdftex|dvips|dvipdfmx|context|psutils] paper [_papersize_|--list]*>161406 -Ref: tlmgr *paper --json*161422 -Node: tlmgr path162637 -Ref: tlmgr *path [--windowsmode=user|admin] add*162803 -Ref: tlmgr *path [--windowsmode=user|admin] remove*162845 -Node: tlmgr pinning164360 -Ref: tlmgr pinning show164601 -Ref: tlmgr pinning add _repo_ _pkgglob_...164674 -Ref: tlmgr pinning remove _repo_ _pkgglob_...164793 -Ref: tlmgr pinning remove _repo_ --all164946 -Node: tlmgr platform165000 -Ref: tlmgr *platform list|add|remove _platform_...*165186 -Ref: tlmgr *platform set _platform_*165213 -Ref: tlmgr *platform set auto*165234 -Ref: tlmgr *--dry-run* 2166112 -Node: tlmgr postaction166231 -Ref: tlmgr *postaction [_option_...] install [shortcut|fileassoc|script] [_pkg_...]*166461 -Ref: tlmgr *postaction [_option_...] remove [shortcut|fileassoc|script] [_pkg_...]*166535 -Ref: tlmgr *--windowsmode=[user|admin]*166855 -Ref: tlmgr *--fileassocmode=[1|2]*167280 -Ref: tlmgr *--all* 1167566 -Node: tlmgr print-platform167621 -Node: tlmgr print-platform-info167952 -Node: tlmgr remove [_option_...] _pkg_...168252 -Ref: tlmgr *--all* 2168737 -Ref: tlmgr *--backup*168848 -Ref: tlmgr *--backupdir* _directory_ 1168875 -Ref: tlmgr *--no-depends* 1169280 -Ref: tlmgr *--no-depends-at-all* 1169343 -Ref: tlmgr *--force* 1169450 -Ref: tlmgr *--dry-run* 3169924 -Node: tlmgr repository170301 -Ref: tlmgr *repository list*170489 -Ref: tlmgr *repository list _path|url|tag_*170523 -Ref: tlmgr *repository add _path_ [_tag_]*170556 -Ref: tlmgr *repository remove _path|tag_*170588 -Ref: tlmgr *repository set _path_[#_tag_] [_path_[#_tag_] ...]*170642 -Ref: tlmgr *repository status*170663 -Ref: tlmgr The tag (which can be the same as the url);171890 -Node: tlmgr restore172368 -Ref: tlmgr *restore [_option_...] _pkg_ [_rev_]*172547 -Ref: tlmgr *restore [_option_...] --all*172578 -Ref: tlmgr *--all* 3173279 -Ref: tlmgr *--backupdir* _directory_ 2173494 -Ref: tlmgr *--dry-run* 4173676 -Ref: tlmgr *--force* 2173809 -Ref: tlmgr *--json* 2173856 -Node: tlmgr search174183 -Ref: tlmgr *search [_option_...] _what_*174347 -Ref: tlmgr *search [_option_...] --file _what_*174385 -Ref: tlmgr *search [_option_...] --all _what_*174422 -Ref: tlmgr *--file* 1174643 -Ref: tlmgr *--all* 4174706 -Ref: tlmgr *--global*174796 -Ref: tlmgr *--word*174924 -Node: tlmgr shell175239 -Ref: tlmgr protocol175974 -Ref: tlmgr help 1176038 -Ref: tlmgr version 1176091 -Ref: tlmgr quit, end, bye, byebye, EOF176159 -Ref: tlmgr restart176180 -Ref: tlmgr load [local|remote]176303 -Ref: tlmgr save176373 -Ref: tlmgr get [_var_] =item set [_var_ [_val_]]176496 -Node: tlmgr show177097 -Node: tlmgr uninstall177264 -Node: tlmgr update [_option_...] [_pkg_...]177496 -Ref: tlmgr *--all* 5177868 -Ref: tlmgr *--self*180048 -Ref: tlmgr *--dry-run* 5180813 -Ref: tlmgr *--list* [_pkg_]180991 -Ref: tlmgr *--exclude* _pkg_181681 -Ref: tlmgr *--no-auto-remove* [_pkg_...]182482 -Ref: tlmgr *--no-auto-install* [_pkg_...]182967 -Ref: tlmgr *--reinstall-forcibly-removed*183730 -Ref: tlmgr *--backup* 1184266 -Ref: tlmgr *--backupdir* _directory_ 3184293 -Ref: tlmgr *--no-depends* 2185460 -Ref: tlmgr *--no-depends-at-all* 2185664 -Ref: tlmgr *--force* 3185771 -Node: tlmgr CONFIGURATION FILE FOR TLMGR186762 -Ref: tlmgr auto-remove = 0 or 1 (default 1), same as command-line option.187764 -Ref: tlmgr gui-expertmode = 0 or 1 (default 1). This switches between the full GUI and a simplified GUI with only the most common settings.187896 -Ref: tlmgr gui-lang = _llcode_, with a language code value as with the command-line option.187980 -Ref: tlmgr no-checksums = 0 or 1 (default 0, see below).188029 -Ref: tlmgr persistent-downloads = 0 or 1 (default 1), same as command-line option.188104 -Ref: tlmgr require-verification = 0 or 1 (default 0), same as command-line option.188179 -Ref: tlmgr tkfontscale = _floating-point number_ (default 1.0); scaling factor for fonts in the Tk-based frontends.188287 -Ref: tlmgr update-exclude = _comma-separated list of packages_ (no spaces allowed). Same as the command line option --exclude for the update action.188432 -Ref: tlmgr verify-downloads = 0 or 1 (default 1), same as command-line option.188503 -Ref: tlmgr allowed-actions = _action1_[,_action2_,...] The value is a comma-separated list (no spaces) of tlmgr actions which are allowed to be executed when tlmgr is invoked in system mode (that is, without --usermode). This allows distributors to include tlmgr in their packaging, but allow only a restricted set of actions that do not interfere with their distro package manager. For native TeX Live installations, it doesn't make sense to set this.189020 -Node: tlmgr CRYPTOGRAPHIC VERIFICATION189852 -Node: tlmgr Configuration of GnuPG invocation192025 -Node: tlmgr USER MODE192663 -Node: tlmgr User mode install195534 -Node: tlmgr User mode backup, restore, remove, update196680 -Node: tlmgr User mode generate, option, paper197126 -Node: tlmgr User mode logs197493 -Node: tlmgr MULTIPLE REPOSITORIES197791 -Node: tlmgr Pinning199520 -Node: tlmgr GUI FOR TLMGR201443 -Node: tlmgr Main display203092 -Node: tlmgr Display configuration area203344 -Ref: tlmgr Status203705 -Ref: tlmgr Category203869 -Ref: tlmgr Match204055 -Ref: tlmgr Selection204236 -Ref: tlmgr Display configuration buttons204440 -Node: tlmgr Package list area204623 -Ref: tlmgr a checkbox205207 -Ref: tlmgr package name205343 -Ref: tlmgr local revision (and version)205442 -Ref: tlmgr remote revision (and version)205817 -Ref: tlmgr short description206114 -Node: tlmgr Main display action buttons206159 -Ref: tlmgr Update all installed206425 -Ref: tlmgr Update206797 -Ref: tlmgr Install206847 -Ref: tlmgr Remove207033 -Ref: tlmgr Backup207211 -Node: tlmgr Menu bar207368 -Ref: tlmgr tlmgr menu207591 -Ref: tlmgr Options menu207899 -Ref: tlmgr Actions menu208982 -Ref: tlmgr Help menu209410 -Node: tlmgr GUI options209544 -Ref: tlmgr -background _color_209790 -Ref: tlmgr -font " _fontname_ _fontsize_ "209855 -Ref: tlmgr -foreground _color_210013 -Ref: tlmgr -geometry _geomspec_210065 -Ref: tlmgr -xrm _xresource_210257 -Node: tlmgr MACHINE-READABLE OUTPUT210526 -Node: tlmgr Machine-readable update and install output211340 -Ref: tlmgr location-url _location_212616 -Ref: tlmgr total-bytes _count_212832 -Ref: tlmgr _pkgname_213242 -Ref: tlmgr _status_213452 -Ref: tlmgr d213530 -Ref: tlmgr f213590 -Ref: tlmgr u213769 -Ref: tlmgr r213815 -Ref: tlmgr a213938 -Ref: tlmgr i214116 -Ref: tlmgr I214235 -Ref: tlmgr _localrev_214337 -Ref: tlmgr _serverrev_214444 -Ref: tlmgr _size_214556 -Ref: tlmgr _runtime_214725 -Ref: tlmgr _esttot_214795 -Node: tlmgr Machine-readable option output214828 -Node: tlmgr ENVIRONMENT VARIABLES215340 -Ref: tlmgr TEXLIVE_COMPRESSOR215851 -Ref: tlmgr TEXLIVE_DOWNLOADER216699 -Ref: tlmgr TL_DOWNLOAD_PROGRAM216722 -Ref: tlmgr TL_DOWNLOAD_ARGS216742 -Ref: tlmgr TEXLIVE_PREFER_OWN217768 -Node: tlmgr AUTHORS AND COPYRIGHT218592 -Node: Index218994 +Node: Overview of build system3943 +Node: Prerequisites5994 +Ref: Prerequisites-Footnote-18993 +Node: Building9296 +Node: Build iteration10638 +Node: Build in parallel11682 +Node: Build distribution12433 +Node: Build one package13081 +Node: Build one engine17794 +Node: Cross compilation20406 +Node: Cross configuring21685 +Node: Cross problems23362 +Node: Installing25024 +Node: Installation directories26044 +Node: Linked scripts27862 +Node: Distro builds29357 +Node: Layout and infrastructure31733 +Node: Build system tools32564 +Node: Top-level directories34781 +Node: Autoconf macros37017 +Node: General setup macros37779 +Node: Macros for programs38654 +Node: Macros for compilers39455 +Node: Macros for libraries40863 +Node: Macros for library and header flags41289 +Node: Macros for Windows43200 +Node: Library modules44795 +Node: png library45284 +Node: zlib library47632 +Node: freetype library48147 +Node: kpathsea library48843 +Node: Program modules50222 +Node: t1utils package50650 +Node: xindy package51195 +Node: xdvik package52311 +Node: asymptote53370 +Node: Extending TeX Live53874 +Node: Adding a new program module54681 +Node: Adding a new engine59444 +Node: Adding a new generic library module61229 +Node: Adding a new TeX-specific library module63450 +Node: Configure options64148 +Node: Global configure options65529 +Node: --disable-native-texlive-build66071 +Node: --prefix --bindir ...67033 +Node: --disable-largefile67573 +Node: --disable-missing68115 +Node: --enable-compiler-warnings=LEVEL68516 +Node: --enable-cxx-runtime-hack69172 +Node: --enable-maintainer-mode69592 +Node: --enable-multiplatform70121 +Node: --enable-shared70694 +Node: --enable-silent-rules71065 +Node: --without-ln-s71517 +Node: --without-x71864 +Node: Program-specific configure options72052 +Node: --enable-PROG --disable-PROG72695 +Node: --disable-all-pkgs72968 +Node: Configure options for texk/web2c73751 +Node: Configure options for texk/bibtex-x76289 +Node: Configure options for texk/dvipdfm-x76832 +Node: Configure options for texk/dvisvgm77608 +Node: Configure options for texk/texlive78489 +Node: Configure options for texk/xdvik78910 +Node: Configure options for utils/xindy79531 +Node: Library-specific configure options80421 +Node: Configure options for kpathsea81382 +Node: Variables for configure82086 +Node: Coding conventions83512 +Node: Declarations and definitions84227 +Node: Const86401 +Node: Continuous integration88265 +Node: Transfer from Subversion to Github88929 +Node: Automatic update of the Git mirror91091 +Node: CI testing on Travis-CI91673 +Node: Releases on Github92382 +Node: install-tl92822 +Node: install-tl NAME93266 +Node: install-tl SYNOPSIS93446 +Node: install-tl DESCRIPTION93684 +Node: install-tl REFERENCES94881 +Node: install-tl EXAMPLES95490 +Ref: install-tl install-tl --paper=letter95941 +Ref: install-tl install-tl --scheme _scheme_96077 +Ref: install-tl install-tl --no-interaction96232 +Ref: install-tl install-tl --profile _texlive.profile_96384 +Node: install-tl OPTIONS96652 +Ref: install-tl *-gui* [[=]_module_]97149 +Ref: install-tl *-no-gui*97160 +Ref: install-tl text97368 +Ref: install-tl tcl (or "perltk" or "wizard" or "expert" or nothing)97553 +Ref: install-tl *-lang* _llcode_98185 +Ref: install-tl *-repository* _url|path_98809 +Ref: install-tl *-select-repository*99703 +Ref: install-tl *-all-options*100121 +Ref: install-tl *-custom-bin* _path_100376 +Ref: install-tl *-debug-fakenet*101208 +Ref: install-tl *-debug-setup-vars*101422 +Ref: install-tl *-debug-translation*101570 +Ref: install-tl *-force-platform* _platform_101846 +Ref: install-tl *-help*, *--help*, *-?*102104 +Ref: install-tl *-in-place*102517 +Ref: install-tl *-init-from-profile* _profile_file_103062 +Ref: install-tl *-logfile* _file_103331 +Ref: install-tl *-no-cls*103682 +Ref: install-tl *-no-continue*103809 +Ref: install-tl *-no-doc-install*104380 +Ref: install-tl *-no-src-install*104399 +Ref: install-tl *-no-installation*105190 +Ref: install-tl *-no-interaction*105341 +Ref: install-tl *-no-persistent-downloads*105598 +Ref: install-tl *-persistent-downloads*105623 +Ref: install-tl *-no-verify-downloads*106230 +Ref: install-tl *-non-admin*106593 +Ref: install-tl *-paper* a4*|*letter106699 +Ref: install-tl *-portable*106895 +Ref: install-tl *-print-platform*107032 +Ref: install-tl *-profile* _profile_file_107230 +Ref: install-tl *-q*107451 +Ref: install-tl *-scheme* _scheme_107513 +Ref: install-tl *-texdir* _dir_107914 +Ref: install-tl *-texuserdir* _dir_108519 +Ref: install-tl *-texmflocal* _dir_108808 +Ref: install-tl *-texmfhome* _dir_109433 +Ref: install-tl *-texmfsysconfig* _dir_109742 +Ref: install-tl *-texmfsysvar* _dir_109764 +Ref: install-tl *-texmfconfig* _dir_109859 +Ref: install-tl *-texmfvar* _dir_109878 +Ref: install-tl *-v*110086 +Ref: install-tl *-version*, *--version*110242 +Node: install-tl PROFILES110376 +Ref: install-tl instopt_adjustpath (default 0 on Unix, 1 on Windows)113392 +Ref: install-tl instopt_adjustrepo (default 1)113468 +Ref: install-tl instopt_letter (default 0)113605 +Ref: install-tl instopt_portable (default 0)113696 +Ref: install-tl instopt_write18_restricted (default 1)114235 +Node: install-tl ENVIRONMENT VARIABLES115574 +Ref: install-tl NOPERLDOC115937 +Ref: install-tl TEXLIVE_DOWNLOADER116022 +Ref: install-tl TL_DOWNLOAD_PROGRAM116045 +Ref: install-tl TL_DOWNLOAD_ARGS116065 +Ref: install-tl TEXLIVE_INSTALL_ENV_NOCHECK116269 +Ref: install-tl TEXLIVE_INSTALL_NO_CONTEXT_CACHE116471 +Ref: install-tl TEXLIVE_INSTALL_NO_DISKCHECK116583 +Ref: install-tl TEXLIVE_INSTALL_NO_RESUME116999 +Ref: install-tl TEXLIVE_INSTALL_NO_WELCOME117151 +Ref: install-tl TEXLIVE_INSTALL_PAPER117272 +Ref: install-tl TEXLIVE_INSTALL_PREFIX117418 +Ref: install-tl TEXLIVE_INSTALL_TEXMFCONFIG117449 +Ref: install-tl TEXLIVE_INSTALL_TEXMFVAR117477 +Ref: install-tl TEXLIVE_INSTALL_TEXMFHOME117506 +Ref: install-tl TEXLIVE_INSTALL_TEXMFLOCAL117536 +Ref: install-tl TEXLIVE_INSTALL_TEXMFSYSCONFIG117570 +Ref: install-tl TEXLIVE_INSTALL_TEXMFSYSVAR117601 +Node: install-tl DIRECTORY TREES118039 +Node: install-tl BUGS120623 +Node: install-tl AUTHORS AND COPYRIGHT121503 +Node: tlmgr121901 +Node: tlmgr NAME122407 +Node: tlmgr SYNOPSIS122551 +Node: tlmgr DESCRIPTION122753 +Node: tlmgr EXAMPLES123864 +Ref: tlmgr tlmgr option repository ctan124127 +Ref: tlmgr tlmgr option repository https://mirror.ctan.org/systems/texlive/tlnet124200 +Ref: tlmgr tlmgr update --list124805 +Ref: tlmgr tlmgr update --all124898 +Ref: tlmgr tlmgr info _what_125055 +Ref: tlmgr tlmgr bug _what_125233 +Node: tlmgr OPTIONS125428 +Ref: tlmgr *--repository* _url|path_125961 +Ref: tlmgr /some/local/dir127147 +Ref: tlmgr file:/some/local/dir127176 +Ref: tlmgr ctan127249 +Ref: tlmgr https://mirror.ctan.org/systems/texlive/tlnet127303 +Ref: tlmgr http://server/path/to/tlnet127644 +Ref: tlmgr https://server/path/to/tlnet128025 +Ref: tlmgr ftp://server/path/to/tlnet128493 +Ref: tlmgr user@machine:/path/to/tlnet128625 +Ref: tlmgr scp://user@machine/path/to/tlnet128666 +Ref: tlmgr ssh://user@machine/path/to/tlnet128707 +Ref: tlmgr *--gui* [_action_]129101 +Ref: tlmgr *--gui-lang* _llcode_129915 +Ref: tlmgr *--command-logfile* _file_130657 +Ref: tlmgr *--debug-translation*130924 +Ref: tlmgr *--machine-readable*131128 +Ref: tlmgr *--no-execute-actions*131397 +Ref: tlmgr *--package-logfile* _file_131591 +Ref: tlmgr *--pause*131846 +Ref: tlmgr *--persistent-downloads*132002 +Ref: tlmgr *--no-persistent-downloads*132031 +Ref: tlmgr *--pin-file*132526 +Ref: tlmgr *--usermode*132745 +Ref: tlmgr *--usertree* _dir_132866 +Ref: tlmgr *--verify-repo=[none|main|all]*132993 +Node: tlmgr ACTIONS133892 +Node: tlmgr help134785 +Node: tlmgr version135262 +Node: tlmgr backup135525 +Ref: tlmgr *backup [_option_...] --all*135702 +Ref: tlmgr *backup [_option_...] _pkg_...*135735 +Ref: tlmgr *--backupdir* _directory_136802 +Ref: tlmgr *--all*137020 +Ref: tlmgr *--clean*[=_N_]137273 +Ref: tlmgr *--dry-run*137601 +Node: tlmgr bug [_search-string_]137731 +Node: tlmgr candidates _pkg_138317 +Node: tlmgr check [_option_...] [depends|executes|files|runfiles|texmfdbs|all]138687 +Ref: tlmgr *depends*139201 +Ref: tlmgr *executes*139543 +Ref: tlmgr *files*139658 +Ref: tlmgr *runfiles*139794 +Ref: tlmgr *texmfdbs*139931 +Ref: tlmgr - all items in TEXMFDBS have the !! prefix.140161 +Ref: tlmgr - all items in TEXMFBDS have an ls-R file (if they exist at all).140237 +Ref: tlmgr - all items in TEXMF with !! are listed in TEXMFDBS.140302 +Ref: tlmgr - all items in TEXMF with an ls-R file are listed in TEXMFDBS.140377 +Ref: tlmgr *--use-svn*140403 +Node: tlmgr conf140544 +Ref: tlmgr *conf [texmf|tlmgr|updmap [--conffile _file_] [--delete] [_key_ [_value_]]]*140834 +Ref: tlmgr *conf auxtrees [--conffile _file_] [show|add|remove] [_value_]*140899 +Node: tlmgr dump-tlpdb [_option_...] [--json]143315 +Ref: tlmgr *--local*143751 +Ref: tlmgr *--remote*143791 +Ref: tlmgr *--json*143830 +Node: tlmgr generate144401 +Ref: tlmgr *generate [_option_...] language*144597 +Ref: tlmgr *generate [_option_...] language.dat*144636 +Ref: tlmgr *generate [_option_...] language.def*144675 +Ref: tlmgr *generate [_option_...] language.dat.lua*144718 +Ref: tlmgr *--dest* _output_file_147046 +Ref: tlmgr *--localcfg* _local_conf_file_147623 +Ref: tlmgr *--rebuild-sys*147747 +Node: tlmgr gui148562 +Node: tlmgr info148742 +Ref: tlmgr *info [_option_...] _pkg_...*148904 +Ref: tlmgr *info [_option_...] collections*148938 +Ref: tlmgr *info [_option_...] schemes*148968 +Ref: tlmgr *--list*150499 +Ref: tlmgr *--only-installed*150814 +Ref: tlmgr *--only-remote*151003 +Ref: tlmgr *--data item1,item2,...*151308 +Ref: tlmgr *--json* 1152681 +Node: tlmgr init-usertree153064 +Node: tlmgr install [_option_...] _pkg_...153445 +Ref: tlmgr *--dry-run* 1153954 +Ref: tlmgr *--file*154072 +Ref: tlmgr *--force*154295 +Ref: tlmgr *--no-depends*154516 +Ref: tlmgr *--no-depends-at-all*154676 +Ref: tlmgr *--reinstall*155077 +Ref: tlmgr *--with-doc*155456 +Ref: tlmgr *--with-src*155470 +Node: tlmgr key156198 +Ref: tlmgr *key list*156356 +Ref: tlmgr *key add _file_*156374 +Ref: tlmgr *key remove _keyid_*156396 +Node: tlmgr list156990 +Node: tlmgr option157152 +Ref: tlmgr *option [--json] [show]*157308 +Ref: tlmgr *option [--json] showall|help*157340 +Ref: tlmgr *option _key_ [_value_]*157366 +Node: tlmgr paper161945 +Ref: tlmgr *paper [a4|letter]*162094 +Ref: tlmgr *<[xdvi|pdftex|dvips|dvipdfmx|context|psutils] paper [_papersize_|--list]*>162171 +Ref: tlmgr *paper --json*162187 +Node: tlmgr path163402 +Ref: tlmgr *path [--windowsmode=user|admin] add*163568 +Ref: tlmgr *path [--windowsmode=user|admin] remove*163610 +Node: tlmgr pinning165125 +Ref: tlmgr pinning show165366 +Ref: tlmgr pinning add _repo_ _pkgglob_...165439 +Ref: tlmgr pinning remove _repo_ _pkgglob_...165558 +Ref: tlmgr pinning remove _repo_ --all165711 +Node: tlmgr platform165765 +Ref: tlmgr *platform list|add|remove _platform_...*165951 +Ref: tlmgr *platform set _platform_*165978 +Ref: tlmgr *platform set auto*165999 +Ref: tlmgr *--dry-run* 2166877 +Node: tlmgr postaction166996 +Ref: tlmgr *postaction [_option_...] install [shortcut|fileassoc|script] [_pkg_...]*167226 +Ref: tlmgr *postaction [_option_...] remove [shortcut|fileassoc|script] [_pkg_...]*167300 +Ref: tlmgr *--windowsmode=[user|admin]*167620 +Ref: tlmgr *--fileassocmode=[1|2]*168045 +Ref: tlmgr *--all* 1168331 +Node: tlmgr print-platform168386 +Node: tlmgr print-platform-info168717 +Node: tlmgr remove [_option_...] _pkg_...169017 +Ref: tlmgr *--all* 2169502 +Ref: tlmgr *--backup*169613 +Ref: tlmgr *--backupdir* _directory_ 1169640 +Ref: tlmgr *--no-depends* 1170045 +Ref: tlmgr *--no-depends-at-all* 1170108 +Ref: tlmgr *--force* 1170215 +Ref: tlmgr *--dry-run* 3170689 +Node: tlmgr repository171066 +Ref: tlmgr *repository list*171254 +Ref: tlmgr *repository list _path|url|tag_*171288 +Ref: tlmgr *repository add _path_ [_tag_]*171321 +Ref: tlmgr *repository remove _path|tag_*171353 +Ref: tlmgr *repository set _path_[#_tag_] [_path_[#_tag_] ...]*171407 +Ref: tlmgr *repository status*171428 +Ref: tlmgr The tag (which can be the same as the url);172655 +Node: tlmgr restore173133 +Ref: tlmgr *restore [_option_...] _pkg_ [_rev_]*173312 +Ref: tlmgr *restore [_option_...] --all*173343 +Ref: tlmgr *--all* 3174044 +Ref: tlmgr *--backupdir* _directory_ 2174259 +Ref: tlmgr *--dry-run* 4174441 +Ref: tlmgr *--force* 2174574 +Ref: tlmgr *--json* 2174621 +Node: tlmgr search174948 +Ref: tlmgr *search [_option_...] _what_*175112 +Ref: tlmgr *search [_option_...] --file _what_*175150 +Ref: tlmgr *search [_option_...] --all _what_*175187 +Ref: tlmgr *--file* 1175408 +Ref: tlmgr *--all* 4175471 +Ref: tlmgr *--global*175561 +Ref: tlmgr *--word*175689 +Node: tlmgr shell176004 +Ref: tlmgr protocol176739 +Ref: tlmgr help 1176803 +Ref: tlmgr version 1176856 +Ref: tlmgr quit, end, bye, byebye, EOF176924 +Ref: tlmgr restart176945 +Ref: tlmgr load [local|remote]177068 +Ref: tlmgr save177138 +Ref: tlmgr get [_var_] =item set [_var_ [_val_]]177261 +Node: tlmgr show177862 +Node: tlmgr uninstall178029 +Node: tlmgr update [_option_...] [_pkg_...]178261 +Ref: tlmgr *--all* 5178633 +Ref: tlmgr *--self*180813 +Ref: tlmgr *--dry-run* 5181578 +Ref: tlmgr *--list* [_pkg_]181756 +Ref: tlmgr *--exclude* _pkg_182446 +Ref: tlmgr *--no-auto-remove* [_pkg_...]183247 +Ref: tlmgr *--no-auto-install* [_pkg_...]183732 +Ref: tlmgr *--reinstall-forcibly-removed*184495 +Ref: tlmgr *--backup* 1185031 +Ref: tlmgr *--backupdir* _directory_ 3185058 +Ref: tlmgr *--no-depends* 2186225 +Ref: tlmgr *--no-depends-at-all* 2186429 +Ref: tlmgr *--force* 3186536 +Node: tlmgr CONFIGURATION FILE FOR TLMGR187527 +Ref: tlmgr auto-remove = 0 or 1 (default 1), same as command-line option.188529 +Ref: tlmgr gui-expertmode = 0 or 1 (default 1). This switches between the full GUI and a simplified GUI with only the most common settings.188661 +Ref: tlmgr gui-lang = _llcode_, with a language code value as with the command-line option.188745 +Ref: tlmgr no-checksums = 0 or 1 (default 0, see below).188794 +Ref: tlmgr persistent-downloads = 0 or 1 (default 1), same as command-line option.188869 +Ref: tlmgr require-verification = 0 or 1 (default 0), same as command-line option.188944 +Ref: tlmgr tkfontscale = _floating-point number_ (default 1.0); scaling factor for fonts in the Tk-based frontends.189052 +Ref: tlmgr update-exclude = _comma-separated list of packages_ (no spaces allowed). Same as the command line option --exclude for the update action.189197 +Ref: tlmgr verify-downloads = 0 or 1 (default 1), same as command-line option.189268 +Ref: tlmgr allowed-actions = _action1_[,_action2_,...] The value is a comma-separated list (no spaces) of tlmgr actions which are allowed to be executed when tlmgr is invoked in system mode (that is, without --usermode). This allows distributors to include tlmgr in their packaging, but allow only a restricted set of actions that do not interfere with their distro package manager. For native TeX Live installations, it doesn't make sense to set this.189785 +Node: tlmgr CRYPTOGRAPHIC VERIFICATION190617 +Node: tlmgr Configuration of GnuPG invocation192790 +Node: tlmgr USER MODE193428 +Node: tlmgr User mode install196299 +Node: tlmgr User mode backup, restore, remove, update197445 +Node: tlmgr User mode generate, option, paper197891 +Node: tlmgr User mode logs198258 +Node: tlmgr MULTIPLE REPOSITORIES198556 +Node: tlmgr Pinning200285 +Node: tlmgr GUI FOR TLMGR202208 +Node: tlmgr Main display203857 +Node: tlmgr Display configuration area204109 +Ref: tlmgr Status204470 +Ref: tlmgr Category204634 +Ref: tlmgr Match204820 +Ref: tlmgr Selection205001 +Ref: tlmgr Display configuration buttons205205 +Node: tlmgr Package list area205388 +Ref: tlmgr a checkbox205972 +Ref: tlmgr package name206108 +Ref: tlmgr local revision (and version)206207 +Ref: tlmgr remote revision (and version)206582 +Ref: tlmgr short description206879 +Node: tlmgr Main display action buttons206924 +Ref: tlmgr Update all installed207190 +Ref: tlmgr Update207562 +Ref: tlmgr Install207612 +Ref: tlmgr Remove207798 +Ref: tlmgr Backup207976 +Node: tlmgr Menu bar208133 +Ref: tlmgr tlmgr menu208356 +Ref: tlmgr Options menu208664 +Ref: tlmgr Actions menu209747 +Ref: tlmgr Help menu210175 +Node: tlmgr GUI options210309 +Ref: tlmgr -background _color_210555 +Ref: tlmgr -font " _fontname_ _fontsize_ "210620 +Ref: tlmgr -foreground _color_210778 +Ref: tlmgr -geometry _geomspec_210830 +Ref: tlmgr -xrm _xresource_211022 +Node: tlmgr MACHINE-READABLE OUTPUT211291 +Node: tlmgr Machine-readable update and install output212105 +Ref: tlmgr location-url _location_213381 +Ref: tlmgr total-bytes _count_213597 +Ref: tlmgr _pkgname_214007 +Ref: tlmgr _status_214217 +Ref: tlmgr d214295 +Ref: tlmgr f214355 +Ref: tlmgr u214534 +Ref: tlmgr r214580 +Ref: tlmgr a214703 +Ref: tlmgr i214881 +Ref: tlmgr I215000 +Ref: tlmgr _localrev_215102 +Ref: tlmgr _serverrev_215209 +Ref: tlmgr _size_215321 +Ref: tlmgr _runtime_215490 +Ref: tlmgr _esttot_215560 +Node: tlmgr Machine-readable option output215593 +Node: tlmgr ENVIRONMENT VARIABLES216105 +Ref: tlmgr TEXLIVE_COMPRESSOR216616 +Ref: tlmgr TEXLIVE_DOWNLOADER217464 +Ref: tlmgr TL_DOWNLOAD_PROGRAM217487 +Ref: tlmgr TL_DOWNLOAD_ARGS217507 +Ref: tlmgr TEXLIVE_PREFER_OWN218533 +Node: tlmgr AUTHORS AND COPYRIGHT219357 +Node: tlmgr POD ERRORS219780 +Ref: tlmgr Around line 8454:220005 +Node: Index220041  End Tag Table diff --git a/source/doc/tlbuild.texi b/source/doc/tlbuild.texi index 1f4052f12b..776c309e68 100644 --- a/source/doc/tlbuild.texi +++ b/source/doc/tlbuild.texi @@ -1,8 +1,8 @@ \input texinfo @setfilename tlbuild.info -@set version 2023 -@set month-year December 2023 +@set version 2024 +@set month-year March 2024 @set mytitle Building @TeX{} Live (@value{version}) @settitle @value{mytitle} @@ -15,7 +15,7 @@ This file documents the @TL{} build system and more. @noindent -Copyright @copyright{} 2016--2023 Karl Berry.@* +Copyright @copyright{} 2016--2024 Karl Berry.@* Copyright @copyright{} 2013--2015 Karl Berry & Peter Breitenlohner. Permission is granted to make and distribute verbatim copies of this diff --git a/source/libs/README b/source/libs/README index dc3b253311..5afad1e711 100644 --- a/source/libs/README +++ b/source/libs/README @@ -37,7 +37,7 @@ icu 74.2 - checked 22dec23 libpaper 1.1.29 - checked 07jan24 https://ftp.debian.org/debian/pool/main/libp/libpaper/ -libpng 1.6.42 - checked 31jan24 +libpng 1.6.43 - checked 24feb24 https://sourceforge.net/projects/libpng/files/ - used by many lua 5.2.4 diff --git a/source/libs/libpng/ChangeLog b/source/libs/libpng/ChangeLog index 5862f02861..7ff3abddff 100644 --- a/source/libs/libpng/ChangeLog +++ b/source/libs/libpng/ChangeLog @@ -1,3 +1,8 @@ +2024-02-24 Akira Kakuto + + Import libpng-1.6.43. + * version.ac: Adjust. + 2024-01-31 Akira Kakuto Import libpng-1.6.42. diff --git a/source/libs/libpng/README b/source/libs/libpng/README index 96e5b52e30..f4ae444eb2 100644 --- a/source/libs/libpng/README +++ b/source/libs/libpng/README @@ -1,4 +1,4 @@ - Building libpng-1.6.42 as part of the TL tree + Building libpng-1.6.43 as part of the TL tree ============================================= This directory libs/libpng/ uses a proxy Makefile.am to build the libpng library @@ -14,4 +14,4 @@ copied to libs/libpng/configure.ac. ============================= 2009-07-23 Peter Breitenlohner -2024-01-31 Akira Kakuto +2024-02-24 Akira Kakuto diff --git a/source/libs/libpng/TLpatches/ChangeLog b/source/libs/libpng/TLpatches/ChangeLog index bdeec6b431..996e52a48f 100644 --- a/source/libs/libpng/TLpatches/ChangeLog +++ b/source/libs/libpng/TLpatches/ChangeLog @@ -1,3 +1,7 @@ +2024-02-24 Akira Kakuto + + Import libpng-1.6.43. + 2024-01-31 Akira Kakuto Import libpng-1.6.42. diff --git a/source/libs/libpng/TLpatches/TL-Changes b/source/libs/libpng/TLpatches/TL-Changes index 833c6a94e0..f22fe37d33 100644 --- a/source/libs/libpng/TLpatches/TL-Changes +++ b/source/libs/libpng/TLpatches/TL-Changes @@ -1,11 +1,13 @@ -Changes applied to the libpng-1.6.42/ tree as obtained from: - https://sourceforge.net/projects/libpng/files/libpng16/1.6.42/ +Changes applied to the libpng-1.6.43/ tree as obtained from: + https://sourceforge.net/projects/libpng/files/libpng16/1.6.43/ Copied: scripts/pnglibconf.h.prebuilt -> pnglibconf.h Removed: + .github (dir) .appveyor.yml + .editorconfig .gitignore .travis.yml .yamllint.yml diff --git a/source/libs/libpng/configure b/source/libs/libpng/configure index cb83ccbe85..c532197fc6 100755 --- a/source/libs/libpng/configure +++ b/source/libs/libpng/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for libpng (TeX Live) 1.6.42. +# Generated by GNU Autoconf 2.72 for libpng (TeX Live) 1.6.43. # # Report bugs to . # @@ -604,8 +604,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libpng (TeX Live)' PACKAGE_TARNAME='libpng--tex-live-' -PACKAGE_VERSION='1.6.42' -PACKAGE_STRING='libpng (TeX Live) 1.6.42' +PACKAGE_VERSION='1.6.43' +PACKAGE_STRING='libpng (TeX Live) 1.6.43' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1338,7 +1338,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures libpng (TeX Live) 1.6.42 to adapt to many kinds of systems. +'configure' configures libpng (TeX Live) 1.6.43 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1410,7 +1410,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libpng (TeX Live) 1.6.42:";; + short | recursive ) echo "Configuration of libpng (TeX Live) 1.6.43:";; esac cat <<\_ACEOF @@ -1530,7 +1530,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libpng (TeX Live) configure 1.6.42 +libpng (TeX Live) configure 1.6.43 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. @@ -1857,7 +1857,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libpng (TeX Live) $as_me 1.6.42, which was +It was created by libpng (TeX Live) $as_me 1.6.43, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -4456,7 +4456,7 @@ fi # Define the identity of the package. PACKAGE='libpng--tex-live-' - VERSION='1.6.42' + VERSION='1.6.43' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -6051,6 +6051,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # Checks for header files. +# Autoupdate added the next two lines to ensure that your configure +# script's behavior did not change. They are probably safe to remove. ac_header= ac_cache= for ac_item in $ac_header_c_list do @@ -6151,9 +6153,6 @@ printf "%s\n" "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -# Autoupdate added the next two lines to ensure that your configure -# script's behavior did not change. They are probably safe to remove. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} @@ -7474,7 +7473,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libpng (TeX Live) $as_me 1.6.42, which was +This file was extended by libpng (TeX Live) $as_me 1.6.43, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7542,7 +7541,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -libpng (TeX Live) config.status 1.6.42 +libpng (TeX Live) config.status 1.6.43 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" diff --git a/source/libs/libpng/configure.ac b/source/libs/libpng/configure.ac index ade69b838f..b85452791f 100644 --- a/source/libs/libpng/configure.ac +++ b/source/libs/libpng/configure.ac @@ -9,8 +9,8 @@ dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl m4_include([version.ac])[] dnl define libpng_version -AC_INIT([libpng (TeX Live)], libpng_version, [tex-k@tug.org]) -AC_PREREQ([2.65]) +AC_INIT([libpng (TeX Live)],[libpng_version],[tex-k@tug.org]) +AC_PREREQ([2.72]) AC_CONFIG_SRCDIR([libpng-src/pngget.c]) AC_CONFIG_AUX_DIR([../../build-aux]) AC_CONFIG_MACRO_DIR([../../m4]) @@ -49,7 +49,15 @@ AC_COMPILE_IFELSE( ]) # Checks for header files. -AC_HEADER_STDC +m4_warn([obsolete], +[The preprocessor macro 'STDC_HEADERS' is obsolete. + Except in unusual embedded environments, you can safely include all + C89 headers unconditionally.])dnl +# Autoupdate added the next two lines to ensure that your configure +# script's behavior did not change. They are probably safe to remove. +AC_CHECK_INCLUDES_DEFAULT +AC_PROG_EGREP + AC_CHECK_HEADERS([malloc.h stdlib.h string.h strings.h]) # Checks for typedefs, structures, and compiler characteristics. @@ -60,8 +68,8 @@ AC_C_RESTRICT # Checks for library functions. AC_FUNC_STRTOD -AC_CHECK_FUNCS([memset], , [AC_ERROR([memset not found in libc])]) -AC_SEARCH_LIBS([pow], [m], , [AC_ERROR([cannot find pow])]) +AC_CHECK_FUNCS([memset], , [AC_MSG_ERROR(memset not found in libc)]) +AC_SEARCH_LIBS([pow], [m], , [AC_MSG_ERROR(cannot find pow)]) KPSE_ZLIB_FLAGS @@ -70,7 +78,7 @@ AM_CONDITIONAL([build], [test "x$enable_build" != xno]) if test "x$enable_build" != xno || test -f config.force; then KPSE_ADD_FLAGS([zlib]) -AC_CHECK_FUNC([zlibVersion], , [AC_ERROR([zlib not found])]) +AC_CHECK_FUNC([zlibVersion], , [AC_MSG_ERROR(zlib not found)]) KPSE_RESTORE_FLAGS echo timestamp >config.force diff --git a/source/libs/libpng/libpng-src/ANNOUNCE b/source/libs/libpng/libpng-src/ANNOUNCE index 44d6722d05..bc147adb78 100644 --- a/source/libs/libpng/libpng-src/ANNOUNCE +++ b/source/libs/libpng/libpng-src/ANNOUNCE @@ -1,5 +1,5 @@ -libpng 1.6.42 - January 29, 2024 -================================ +libpng 1.6.43 - February 23, 2024 +================================= This is a public release of libpng, intended for use in production code. @@ -9,13 +9,13 @@ Files available for download Source files with LF line endings (for Unix/Linux): - * libpng-1.6.42.tar.xz (LZMA-compressed, recommended) - * libpng-1.6.42.tar.gz (deflate-compressed) + * libpng-1.6.43.tar.xz (LZMA-compressed, recommended) + * libpng-1.6.43.tar.gz (deflate-compressed) Source files with CRLF line endings (for Windows): - * lpng1642.7z (LZMA-compressed, recommended) - * lpng1642.zip (deflate-compressed) + * lpng1643.7z (LZMA-compressed, recommended) + * lpng1643.zip (deflate-compressed) Other information: @@ -25,47 +25,36 @@ Other information: * TRADEMARK.md -Changes from version 1.6.41 to version 1.6.42 +Changes from version 1.6.42 to version 1.6.43 --------------------------------------------- - * Fixed the implementation of the macro function `png_check_sig`. - This was an API regression, introduced in libpng-1.6.41. - (Reported by Matthieu Darbois) - - -Changes from version 1.6.40 to version 1.6.41 ---------------------------------------------- - - * Added SIMD-optimized code for the Loongarch LSX hardware. - (Contributed by GuXiWei, JinBo and ZhangLixia) - * Fixed the run-time discovery of MIPS MSA hardware. - (Contributed by Sui Jingfeng) - * Fixed an off-by-one error in the function `png_do_check_palette_indexes`, - which failed to recognize errors that might have existed in the first - column of a broken palette-encoded image. This was a benign regression - accidentally introduced in libpng-1.6.33. No pixel was harmed. - (Contributed by Adam Richter; reviewed by John Bowler) - * Fixed, improved and modernized the contrib/pngminus programs, i.e., - png2pnm.c and pnm2png.c - * Removed old and peculiar portability hacks that were meant to silence - warnings issued by gcc version 7.1 alone. + * Fixed the row width check in png_check_IHDR(). + This corrected a bug that was specific to the 16-bit platforms, + and removed a spurious compiler warning from the 64-bit builds. + (Reported by Jacek Caban; fixed by John Bowler) + * Added eXIf chunk support to the push-mode reader in pngpread.c. + (Contributed by Chris Blume) + * Added contrib/pngexif for the benefit of the users who would like + to inspect the content of eXIf chunks. + * Added contrib/conftest/basic.dfa, a basic build-time configuration. (Contributed by John Bowler) - * Fixed and modernized the CMake file, and raised the minimum required - CMake version from 3.1 to 3.6. - (Contributed by Clinton Ingram, Timothy Lyanguzov, Tyler Kropp, et al.) - * Allowed the configure script to disable the building of auxiliary tools - and tests, thus catching up with the CMake file. - (Contributed by Carlo Bramini) - * Fixed a build issue on Mac. - (Contributed by Zixu Wang) - * Moved the Autoconf macro files to scripts/autoconf. - * Moved the CMake files (except for the main CMakeLists.txt) to - scripts/cmake and moved the list of their contributing authors to - scripts/cmake/AUTHORS.md - * Updated the CI configurations and scripts. - * Relicensed the CI scripts to the MIT License. - * Improved the test coverage. + * Fixed a preprocessor condition in pngread.c that broke build-time + configurations like contrib/conftest/pngcp.dfa. (Contributed by John Bowler) + * Added CMake build support for LoongArch LSX. + (Contributed by GuXiWei) + * Fixed a CMake build error that occurred under a peculiar state of the + dependency tree. This was a regression introduced in libpng-1.6.41. + (Contributed by Dan Rosser) + * Marked the installed libpng headers as system headers in CMake. + (Contributed by Benjamin Buch) + * Updated the build support for RISCOS. + (Contributed by Cameron Cawley) + * Updated the makefiles to allow cross-platform builds to initialize + conventional make variables like AR and ARFLAGS. + * Added various improvements to the CI scripts in areas like version + consistency verification and text linting. + * Added version consistency verification to pngtest.c also. Send comments/corrections/commendations to png-mng-implement at lists.sf.net. diff --git a/source/libs/libpng/libpng-src/AUTHORS b/source/libs/libpng/libpng-src/AUTHORS index bf962f6e16..544341694a 100644 --- a/source/libs/libpng/libpng-src/AUTHORS +++ b/source/libs/libpng/libpng-src/AUTHORS @@ -6,6 +6,7 @@ Authors, for copyright and licensing purposes. * Adam Richter * Andreas Dilger + * Chris Blume * Cosmin Truta * Dave Martindale * Eric S. Raymond diff --git a/source/libs/libpng/libpng-src/CHANGES b/source/libs/libpng/libpng-src/CHANGES index 137761a815..441b57ecf1 100644 --- a/source/libs/libpng/libpng-src/CHANGES +++ b/source/libs/libpng/libpng-src/CHANGES @@ -6130,7 +6130,7 @@ Version 1.6.40 [June 21, 2023] Cleaned up the code, the build scripts, and the documentation. Version 1.6.41 [January 24, 2024] - Added SIMD-optimized code for the Loongarch LSX hardware. + Added SIMD-optimized code for the LoongArch LSX hardware. (Contributed by GuXiWei, JinBo and ZhangLixia) Fixed the run-time discovery of MIPS MSA hardware. (Contributed by Sui Jingfeng) @@ -6165,6 +6165,36 @@ Version 1.6.42 [January 29, 2024] Fixed the implementation of the macro function png_check_sig(). This was an API regression, introduced in libpng-1.6.41. (Reported by Matthieu Darbois) + Fixed and updated the libpng manual. + +Version 1.6.43 [February 23, 2024] + Fixed the row width check in png_check_IHDR(). + This corrected a bug that was specific to the 16-bit platforms, + and removed a spurious compiler warning from the 64-bit builds. + (Reported by Jacek Caban; fixed by John Bowler) + Added eXIf chunk support to the push-mode reader in pngpread.c. + (Contributed by Chris Blume) + Added contrib/pngexif for the benefit of the users who would like + to inspect the content of eXIf chunks. + Added contrib/conftest/basic.dfa, a basic build-time configuration. + (Contributed by John Bowler) + Fixed a preprocessor condition in pngread.c that broke build-time + configurations like contrib/conftest/pngcp.dfa. + (Contributed by John Bowler) + Added CMake build support for LoongArch LSX. + (Contributed by GuXiWei) + Fixed a CMake build error that occurred under a peculiar state of the + dependency tree. This was a regression introduced in libpng-1.6.41. + (Contributed by Dan Rosser) + Marked the installed libpng headers as system headers in CMake. + (Contributed by Benjamin Buch) + Updated the build support for RISCOS. + (Contributed by Cameron Cawley) + Updated the makefiles to allow cross-platform builds to initialize + conventional make variables like AR and ARFLAGS. + Added various improvements to the CI scripts in areas like version + consistency verification and text linting. + Added version consistency verification to pngtest.c also. Send comments/corrections/commendations to png-mng-implement at lists.sf.net. Subscription is required; visit diff --git a/source/libs/libpng/libpng-src/CMakeLists.txt b/source/libs/libpng/libpng-src/CMakeLists.txt index 0d40ce0b77..ad3f2427dc 100644 --- a/source/libs/libpng/libpng-src/CMakeLists.txt +++ b/source/libs/libpng/libpng-src/CMakeLists.txt @@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.6) set(PNGLIB_MAJOR 1) set(PNGLIB_MINOR 6) -set(PNGLIB_REVISION 41) +set(PNGLIB_REVISION 43) set(PNGLIB_SUBREVISION 0) #set(PNGLIB_SUBREVISION "git") set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_REVISION}) @@ -62,9 +62,18 @@ if(APPLE) endif() # Allow the users to switch on/off the auxiliary build and test artifacts. -# NOTE: These artifacts are NOT part of libpng proper, and are subject to change at any time. +# These artifacts are NOT part of libpng proper, and are subject to change +# at any time. option(PNG_TESTS "Build the libpng tests" ON) -option(PNG_TOOLS "Build the libpng tools" ON) + +# Same as above, but for the third-party tools. +# Although these tools are targetted at development environments only, +# the users are allowed to override the option to build by default. +if (ANDROID OR IOS) + option(PNG_TOOLS "Build the libpng tools" OFF) +else() + option(PNG_TOOLS "Build the libpng tools" ON) +endif() # Maintain backwards compatibility with the deprecated option PNG_EXECUTABLES. option(PNG_EXECUTABLES "[Deprecated; please use PNG_TOOLS]" ON) @@ -89,7 +98,6 @@ option(PNG_BUILD_ZLIB "Custom zlib location, else find_package is used" OFF) if(NOT PNG_BUILD_ZLIB) find_package(ZLIB REQUIRED) elseif(POLICY CMP0074) - # TODO: Remove the policy check if CMake version 3.12 or greater becomes the minimum required. if("x${ZLIB_ROOT}" STREQUAL "x") message(DEPRECATION "The option PNG_BUILD_ZLIB has been deprecated; please use ZLIB_ROOT instead") @@ -249,6 +257,35 @@ if(TARGET_ARCH MATCHES "^(mipsel|mips64el)") endif() endif() +# Set definitions and sources for LoongArch. +if(TARGET_ARCH MATCHES "^(loongarch)") + include(CheckCCompilerFlag) + set(PNG_LOONGARCH_LSX_POSSIBLE_VALUES on off) + set(PNG_LOONGARCH_LSX "on" + CACHE STRING "Enable LOONGARCH_LSX optimizations: on|off; on is default") + set_property(CACHE PNG_LOONGARCH_LSX + PROPERTY STRINGS ${PNG_LOONGARCH_LSX_POSSIBLE_VALUES}) + list(FIND PNG_LOONGARCH_LSX_POSSIBLE_VALUES ${PNG_LOONGARCH_LSX} index) + if(index EQUAL -1) + message(FATAL_ERROR "PNG_LOONGARCH_LSX must be one of [${PNG_LOONGARCH_LSX_POSSIBLE_VALUES}]") + elseif(NOT PNG_LOONGARCH_LSX STREQUAL "off") + CHECK_C_COMPILER_FLAG("-mlsx" COMPILER_SUPPORTS_LSX) + if(COMPILER_SUPPORTS_LSX) + set(libpng_loongarch_sources + loongarch/loongarch_lsx_init.c + loongarch/filter_lsx_intrinsics.c) + set_source_files_properties(${libpng_loongarch_sources} + PROPERTIES + COMPILE_FLAGS "-mlsx") + add_definitions(-DPNG_LOONGARCH_LSX_OPT=1) + else() + message(FATAL_ERROR "Compiler does not support -mlsx option") + endif() + else() + add_definitions(-DPNG_LOONGARCH_LSX_OPT=0) + endif() +endif() + else(PNG_HARDWARE_OPTIMIZATIONS) # Set definitions and sources for ARM. @@ -271,6 +308,11 @@ if(TARGET_ARCH MATCHES "^(mipsel|mips64el)") add_definitions(-DPNG_MIPS_MSA_OPT=0) endif() +# Set definitions and sources for LoongArch. +if(TARGET_ARCH MATCHES "^(loongarch)") + add_definitions(-DPNG_LOONGARCH_LSX_OPT=0) +endif() + endif(PNG_HARDWARE_OPTIMIZATIONS) option(ld-version-script "Enable linker version script" ON) @@ -310,7 +352,15 @@ int main(void) { return 0; } file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map") endif() -find_program(AWK NAMES gawk awk) +# Find an AWK language processor. +# Start with specific AWK implementations like gawk and nawk, which are +# known to work with our scripts, then fall back to the system awk. +find_program(AWK NAMES gawk nawk awk) +if(AWK) + message(STATUS "Found AWK program: ${AWK}") +else() + message(STATUS "Could not find an AWK-compatible program") +endif() include_directories(${CMAKE_CURRENT_BINARY_DIR}) @@ -352,7 +402,7 @@ else() COMMAND "${CMAKE_COMMAND}" "-DINPUT=${_GC_INPUT}" "-DOUTPUT=${_GC_OUTPUT}" - -P "${CMAKE_CURRENT_BINARY_DIR}/genchk.cmake" + -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/genchk.cmake" DEPENDS "${_GC_INPUT}" ${_GC_DEPENDS} WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") endfunction() @@ -375,7 +425,7 @@ else() COMMAND "${CMAKE_COMMAND}" "-DINPUT=${_GO_INPUT}" "-DOUTPUT=${_GO_OUTPUT}" - -P "${CMAKE_CURRENT_BINARY_DIR}/genout.cmake" + -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/genout.cmake" DEPENDS "${_GO_INPUT}" ${_GO_DEPENDS} WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") endfunction() @@ -394,7 +444,7 @@ else() add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_GSO_OUTPUT}" COMMAND "${CMAKE_COMMAND}" "-DOUTPUT=${_GSO_OUTPUT}" - -P "${CMAKE_CURRENT_BINARY_DIR}/gensrc.cmake" + -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/gensrc.cmake" DEPENDS ${_GSO_DEPENDS} WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") endfunction() @@ -524,7 +574,7 @@ else() add_custom_target(png_genprebuilt COMMAND "${CMAKE_COMMAND}" "-DOUTPUT=scripts/pnglibconf.h.prebuilt" - -P "${CMAKE_CURRENT_BINARY_DIR}/gensrc.cmake" + -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/gensrc.cmake" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") # A single target handles generation of all generated files. @@ -581,6 +631,7 @@ set(libpng_sources ${libpng_intel_sources} ${libpng_mips_sources} ${libpng_powerpc_sources} + ${libpng_loongarch_sources} ) set(pngtest_sources pngtest.c @@ -662,10 +713,9 @@ if(PNG_SHARED) set_target_properties(png_shared PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL) endif() target_include_directories(png_shared - PUBLIC - $ - $ - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) + PUBLIC $) + target_include_directories(png_shared SYSTEM + INTERFACE $) target_link_libraries(png_shared PUBLIC ZLIB::ZLIB ${M_LIBRARY}) endif() @@ -677,14 +727,19 @@ if(PNG_STATIC) OUTPUT_NAME "${PNG_STATIC_OUTPUT_NAME}" DEBUG_POSTFIX "${PNG_DEBUG_POSTFIX}") target_include_directories(png_static - PUBLIC - $ - $ - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) + PUBLIC $) + target_include_directories(png_static SYSTEM + INTERFACE $) target_link_libraries(png_static PUBLIC ZLIB::ZLIB ${M_LIBRARY}) endif() -if(PNG_FRAMEWORK AND APPLE) +if(PNG_FRAMEWORK AND NOT APPLE) + message(AUTHOR_WARNING + "Setting PNG_FRAMEWORK to OFF, as it only applies to Apple systems") + set(PNG_FRAMEWORK OFF) +endif() + +if(PNG_FRAMEWORK) add_library(png_framework SHARED ${libpng_sources}) add_dependencies(png_framework png_genfiles) list(APPEND PNG_LIBRARY_TARGETS png_framework) @@ -701,10 +756,9 @@ if(PNG_FRAMEWORK AND APPLE) # Avoid CMake's implicit compile definition "-Dpng_framework_EXPORTS". set_target_properties(png_framework PROPERTIES DEFINE_SYMBOL "") target_include_directories(png_framework - PUBLIC - $ - $ - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) + PUBLIC $) + target_include_directories(png_framework SYSTEM + INTERFACE $) target_link_libraries(png_framework PUBLIC ZLIB::ZLIB ${M_LIBRARY}) endif() @@ -967,13 +1021,13 @@ endfunction() # Create source generation scripts. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/genchk.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/genchk.cmake + ${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/genchk.cmake @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/genout.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/genout.cmake + ${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/genout.cmake @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/gensrc.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/gensrc.cmake + ${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/gensrc.cmake @ONLY) # libpng is a library so default to 'lib' diff --git a/source/libs/libpng/libpng-src/README b/source/libs/libpng/libpng-src/README index 0bf27bcfe6..a6ca3ae9f9 100644 --- a/source/libs/libpng/libpng-src/README +++ b/source/libs/libpng/libpng-src/README @@ -1,4 +1,4 @@ -README for libpng version 1.6.42 +README for libpng version 1.6.43 ================================ See the note about version numbers near the top of `png.h`. @@ -142,10 +142,11 @@ Files included in this distribution pngwrite.c => High-level write functions pngwtran.c => Write data transformations pngwutil.c => Write utility functions - arm/ => Optimized code for the ARM platform - intel/ => Optimized code for the INTEL-SSE2 platform - mips/ => Optimized code for the MIPS platform - powerpc/ => Optimized code for the PowerPC platform + arm/ => Optimized code for ARM Neon + intel/ => Optimized code for INTEL SSE2 + loongarch/ => Optimized code for LoongArch LSX + mips/ => Optimized code for MIPS MSA and MIPS MMI + powerpc/ => Optimized code for PowerPC VSX ci/ => Scripts for continuous integration contrib/ => External contributions arm-neon/ => Optimized code for the ARM-NEON platform @@ -158,6 +159,7 @@ Files included in this distribution libtests/ => Test programs oss-fuzz/ => Files used by the OSS-Fuzz project for fuzz-testing libpng + pngexif/ => Program to inspect the EXIF information in PNG files pngminim/ => Minimal decoder, encoder, and progressive decoder programs demonstrating the use of pngusr.dfa pngminus/ => Simple pnm2png and png2pnm programs diff --git a/source/libs/libpng/libpng-src/ci/.shellcheckrc b/source/libs/libpng/libpng-src/ci/.shellcheckrc index 0260dcca30..3c035d60c9 100644 --- a/source/libs/libpng/libpng-src/ci/.shellcheckrc +++ b/source/libs/libpng/libpng-src/ci/.shellcheckrc @@ -1,3 +1,7 @@ +# Disable the "expressions don't expand in single quotes, use double quotes" +# advice. We need the regular expressions to remain uninterpolated. +disable=SC2016 + # Disable the "variable appears unused" warning caused by the use of getopts # with an obligatory (but unused) variable name in the main function. disable=SC2034 @@ -5,7 +9,3 @@ disable=SC2034 # Disable all the "quote to prevent globbing or word splitting" advice. # We need word splitting for well-known variables like MAKEFLAGS and CFLAGS. disable=SC2086,SC2206 - -# Disable the "possible misspelling" warnings that might be flagged, e.g., -# inside function ci_trace_build. -disable=SC2153 diff --git a/source/libs/libpng/libpng-src/ci/ci_lint.sh b/source/libs/libpng/libpng-src/ci/ci_lint.sh new file mode 100644 index 0000000000..d1754715d2 --- /dev/null +++ b/source/libs/libpng/libpng-src/ci/ci_lint.sh @@ -0,0 +1,140 @@ +#!/usr/bin/env bash +set -o errexit -o pipefail -o posix + +# Copyright (c) 2019-2024 Cosmin Truta. +# +# Use, modification and distribution are subject to the MIT License. +# Please see the accompanying file LICENSE_MIT.txt +# +# SPDX-License-Identifier: MIT + +# shellcheck source=ci/lib/ci.lib.sh +source "$(dirname "$0")/lib/ci.lib.sh" +cd "$CI_TOPLEVEL_DIR" + +# Initialize the global constants CI_{...}{CHECK,CHECKER,LINT}. +CI_SHELLCHECK="${CI_SHELLCHECK:-shellcheck}" +CI_EDITORCONFIG_CHECKER="${CI_EDITORCONFIG_CHECKER:-editorconfig-checker}" +CI_YAMLLINT="${CI_YAMLLINT:-yamllint}" + +# Initialize the global lint status. +CI_LINT_STATUS=0 + +function ci_init_lint { + ci_info "## START OF LINTING ##" + local my_program + # Complete the initialization of CI_SHELLCHECK. + # Set it to the empty string if the shellcheck program is unavailable. + my_program="$(command -v "$CI_SHELLCHECK")" || { + ci_warn "program not found: '$CI_SHELLCHECK'" + } + CI_SHELLCHECK="$my_program" + # Complete the initialization of CI_EDITORCONFIG_CHECKER. + # Set it to the empty string if the editorconfig-checker program is unavailable. + my_program="$(command -v "$CI_EDITORCONFIG_CHECKER")" || { + ci_warn "program not found: '$CI_EDITORCONFIG_CHECKER'" + } + CI_EDITORCONFIG_CHECKER="$my_program" + # Complete the initialization of CI_YAMLLINT. + # Set it to the empty string if the yamllint program is unavailable. + my_program="$(command -v "$CI_YAMLLINT")" || { + ci_warn "program not found: '$CI_YAMLLINT'" + } + CI_YAMLLINT="$my_program" +} + +function ci_finish_lint { + ci_info "## END OF LINTING ##" + if [[ $CI_LINT_STATUS -eq 0 ]] + then + ci_info "## SUCCESS ##" + else + ci_info "linting failed" + fi + return "$CI_LINT_STATUS" +} + +function ci_lint_ci_scripts { + [[ -x $CI_SHELLCHECK ]] || { + ci_warn "## NOT LINTING: CI scripts ##" + return 0 + } + ci_info "## LINTING: CI scripts ##" + ci_spawn "$CI_SHELLCHECK" --version + find ./ci -maxdepth 1 -name "*.sh" | { + local my_file + while IFS="" read -r my_file + do + ci_spawn "$CI_SHELLCHECK" -x "$my_file" || { + # Linting failed. + return 1 + } + done + } +} + +function ci_lint_text_files { + [[ -x $CI_EDITORCONFIG_CHECKER ]] || { + ci_warn "## NOT LINTING: text files ##" + return 0 + } + ci_info "## LINTING: text files ##" + ci_spawn "$CI_EDITORCONFIG_CHECKER" --version + ci_spawn "$CI_EDITORCONFIG_CHECKER" || { + # Linting failed. + return 1 + } +} + +function ci_lint_yaml_files { + [[ -x $CI_YAMLLINT ]] || { + ci_warn "## NOT LINTING: YAML files ##" + return 0 + } + ci_info "## LINTING: YAML files ##" + ci_spawn "$CI_YAMLLINT" --version + find . \( -iname "*.yml" -o -iname "*.yaml" \) -not -path "./out/*" | { + local my_file + while IFS="" read -r my_file + do + ci_spawn "$CI_YAMLLINT" --strict "$my_file" || { + # Linting failed. + return 1 + } + done + } +} + +function ci_lint { + ci_init_lint + ci_lint_ci_scripts || CI_LINT_STATUS=1 + ci_lint_text_files || CI_LINT_STATUS=1 + ci_lint_yaml_files || CI_LINT_STATUS=1 + # TODO: ci_lint_png_files, etc. + ci_finish_lint +} + +function usage { + echo "usage: $CI_SCRIPT_NAME []" + echo "options: -?|-h|--help" + exit "${@:-0}" +} + +function main { + local opt + while getopts ":" opt + do + # This ain't a while-loop. It only pretends to be. + [[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0 + ci_err "unknown option: '$1'" + done + shift $((OPTIND - 1)) + [[ $# -eq 0 ]] || { + echo >&2 "error: unexpected argument: '$1'" + usage 2 + } + # And... go! + ci_lint +} + +main "$@" diff --git a/source/libs/libpng/libpng-src/ci/ci_lint_ci.sh b/source/libs/libpng/libpng-src/ci/ci_lint_ci.sh deleted file mode 100644 index 123ed482f1..0000000000 --- a/source/libs/libpng/libpng-src/ci/ci_lint_ci.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env bash -set -e - -# Copyright (c) 2019-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -# shellcheck source="ci/lib/ci.lib.sh" -source "$(dirname "$0")/lib/ci.lib.sh" -cd "$CI_TOPLEVEL_DIR" - -CI_SHELLCHECK="$(command -v shellcheck || true)" -CI_YAMLLINT="$(command -v yamllint || true)" -CI_LINT_COUNTER=0 - -function ci_lint_ci_config_files { - ci_info "linting: CI config files" - local MY_FILE - if [[ -x $CI_YAMLLINT ]] - then - ci_spawn "$CI_YAMLLINT" --version - for MY_FILE in "$CI_TOPLEVEL_DIR"/.*.yml - do - ci_spawn "$CI_YAMLLINT" --strict "$MY_FILE" || - CI_LINT_COUNTER=$((CI_LINT_COUNTER + 1)) - done - else - ci_warn "program not found: 'yamllint'; skipping checks" - fi -} - -function ci_lint_ci_scripts { - ci_info "linting: CI scripts" - local MY_FILE - if [[ -x $CI_SHELLCHECK ]] - then - ci_spawn "$CI_SHELLCHECK" --version - for MY_FILE in "$CI_SCRIPT_DIR"/*.sh - do - ci_spawn "$CI_SHELLCHECK" -x "$MY_FILE" || - CI_LINT_COUNTER=$((CI_LINT_COUNTER + 1)) - done - else - ci_warn "program not found: 'shellcheck'; skipping checks" - fi -} - -function ci_lint_ci_scripts_license { - ci_info "linting: CI scripts license" - ci_spawn grep -F "MIT License" ci/LICENSE_MIT.txt || { - ci_warn "bad or missing CI license file: '$CI_SCRIPT_DIR/LICENSE_MIT.txt'" - CI_LINT_COUNTER=$((CI_LINT_COUNTER + 1)) - } -} - -function usage { - echo "usage: $CI_SCRIPT_NAME" - exit 0 -} - -function main { - local opt - while getopts ":" opt - do - # This ain't a while-loop. It only pretends to be. - [[ $1 == -[?h]* || $1 == --help ]] && usage - ci_err "unknown option: '$1'" - done - shift $((OPTIND - 1)) - # And... go! - [[ $# -eq 0 ]] || ci_err "unexpected argument: '$1'" - ci_lint_ci_config_files - ci_lint_ci_scripts - ci_lint_ci_scripts_license - if [[ $CI_LINT_COUNTER -eq 0 ]] - then - ci_info "success!" - exit 0 - else - ci_info "failed on $CI_LINT_COUNTER file(s)" - exit 1 - fi -} - -main "$@" diff --git a/source/libs/libpng/libpng-src/ci/ci_shellify.sh b/source/libs/libpng/libpng-src/ci/ci_shellify.sh new file mode 100644 index 0000000000..e6693af97a --- /dev/null +++ b/source/libs/libpng/libpng-src/ci/ci_shellify.sh @@ -0,0 +1,92 @@ +#!/usr/bin/env bash +set -o errexit -o pipefail -o posix + +# Copyright (c) 2019-2024 Cosmin Truta. +# +# Use, modification and distribution are subject to the MIT License. +# Please see the accompanying file LICENSE_MIT.txt +# +# SPDX-License-Identifier: MIT + +# shellcheck source=ci/lib/ci.lib.sh +source "$(dirname "$0")/lib/ci.lib.sh" +cd "$CI_TOPLEVEL_DIR" + +function ci_shellify_c { + # Convert C preprocessor text, specifically originating + # from png.h, to shell scripting text. + # Select only the easy-to-parse definitions of PNG_LIBPNG_*. + sed -n -e '/^\# *define * PNG_LIBPNG_[^ ]* * ["0-9A-Za-z_]/ p' | + sed -e 's/^\# *define * PNG\([^ ]*\) * \([^ ]*\)/PNG\1=\2/' \ + -e 's/=PNG\([0-9A-Za-z_]*\)/=\${PNG\1}/' \ + -e 's/^\([^ ]*=[^ ]*\).*$/export \1;/' +} + +function ci_shellify_autoconf { + # Convert autoconf (M4) text, specifically originating + # from configure.ac, to shell scripting text. + # Select only the easy-to-parse definitions of PNGLIB_*. + sed -n -e '/^ *PNGLIB_[^ ]*=[$"0-9A-Za-z_]/ p' | + sed -e 's/^ *PNG\([0-9A-Za-z_]*\)=\([^# ]*\).*$/PNG\1=\2/' \ + -e 's/^\([^ ]*=[^ ]*\).*$/export \1;/' +} + +function ci_shellify_cmake { + # Convert CMake lists text, specifically originating + # from CMakeLists.txt, to shell scripting text. + # Select only the easy-to-parse definitions of PNGLIB_*. + sed -n -e '/^ *set *(PNGLIB_[^ ]* * [$"0-9A-Za-z_].*)/ p' | + sed -e 's/^ *set *(PNG\([^ ]*\) * \([^() ]*\)).*$/PNG\1=\2/' \ + -e 's/^\([^ ]*=[^ ]*\).*$/export \1;/' +} + +function ci_shellify { + local arg filename + for arg in "$@" + do + test -f "$arg" || ci_err "no such file: '$arg'" + filename="$(basename -- "$arg")" + case "$filename" in + ( *.[ch] ) + [[ $filename == png.h ]] || { + ci_err "unable to shellify: '$filename' (expecting: 'png.h')" + } + ci_shellify_c <"$arg" ;; + ( config* | *.ac ) + [[ $filename == configure.ac ]] || { + ci_err "unable to shellify: '$filename' (expecting: 'configure.ac')" + } + ci_shellify_autoconf <"$arg" ;; + ( *CMake* | *cmake* | *.txt ) + [[ $filename == [Cc][Mm]ake[Ll]ists.txt ]] || { + ci_err "unable to shellify: '$filename' (expecting: 'CMakeLists.txt')" + } + ci_shellify_cmake <"$arg" ;; + ( * ) + ci_err "unable to shellify: '$arg'" ;; + esac + done +} + +function usage { + echo "usage: $CI_SCRIPT_NAME [] ..." + echo "options: -?|-h|--help" + echo "files: png.h|configure.ac|CMakeLists.txt" + exit "${@:-0}" +} + +function main { + local opt + while getopts ":" opt + do + # This ain't a while-loop. It only pretends to be. + [[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0 + ci_err "unknown option: '$1'" + done + shift $((OPTIND - 1)) + [[ $# -eq 0 ]] && usage 2 + # And... go! + ci_shellify "$@" +} + +main "$@" diff --git a/source/libs/libpng/libpng-src/ci/ci_verify_cmake.sh b/source/libs/libpng/libpng-src/ci/ci_verify_cmake.sh index 1d3e9734e6..9fe6340263 100644 --- a/source/libs/libpng/libpng-src/ci/ci_verify_cmake.sh +++ b/source/libs/libpng/libpng-src/ci/ci_verify_cmake.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -e +set -o errexit -o pipefail -o posix # Copyright (c) 2019-2024 Cosmin Truta. # @@ -8,7 +8,7 @@ set -e # # SPDX-License-Identifier: MIT -# shellcheck source="ci/lib/ci.lib.sh" +# shellcheck source=ci/lib/ci.lib.sh source "$(dirname "$0")/lib/ci.lib.sh" cd "$CI_TOPLEVEL_DIR" @@ -28,8 +28,6 @@ function ci_init_build { CI_CMAKE="${CI_CMAKE:-cmake}" CI_CTEST="${CI_CTEST:-ctest}" CI_CMAKE_BUILD_TYPE="${CI_CMAKE_BUILD_TYPE:-Release}" - [[ -x $(command -v ninja) ]] && - CI_CMAKE_GENERATOR="${CI_CMAKE_GENERATOR:-Ninja}" if [[ $CI_CMAKE_GENERATOR == "Visual Studio"* ]] then # Clean up incidental mixtures of Windows and Bash-on-Windows @@ -37,8 +35,12 @@ function ci_init_build { [[ $TEMP && ( $Temp || $temp ) ]] && unset TEMP [[ $TMP && ( $Tmp || $tmp ) ]] && unset TMP # Ensure that CI_CMAKE_GENERATOR_PLATFORM is initialized for this generator. - [[ $CI_CMAKE_GENERATOR_PLATFORM ]] || + [[ $CI_CMAKE_GENERATOR_PLATFORM ]] || { ci_err_internal "missing \$CI_CMAKE_GENERATOR_PLATFORM" + } + elif [[ -x $(command -v ninja) ]] + then + CI_CMAKE_GENERATOR="${CI_CMAKE_GENERATOR:-Ninja}" fi } @@ -67,109 +69,130 @@ function ci_trace_build { ci_info "environment option: \$CI_AR: '$CI_AR'" ci_info "environment option: \$CI_RANLIB: '$CI_RANLIB'" ci_info "environment option: \$CI_SANITIZERS: '$CI_SANITIZERS'" + ci_info "environment option: \$CI_FORCE: '$CI_FORCE'" ci_info "environment option: \$CI_NO_TEST: '$CI_NO_TEST'" ci_info "environment option: \$CI_NO_INSTALL: '$CI_NO_INSTALL'" ci_info "environment option: \$CI_NO_CLEAN: '$CI_NO_CLEAN'" ci_info "executable: \$CI_CMAKE: $(command -V "$CI_CMAKE")" ci_info "executable: \$CI_CTEST: $(command -V "$CI_CTEST")" - [[ $CI_CC ]] && + [[ $CI_CC ]] && { ci_info "executable: \$CI_CC: $(command -V "$CI_CC")" - [[ $CI_AR ]] && + } + [[ $CI_AR ]] && { ci_info "executable: \$CI_AR: $(command -V "$CI_AR")" - [[ $CI_RANLIB ]] && + } + [[ $CI_RANLIB ]] && { ci_info "executable: \$CI_RANLIB: $(command -V "$CI_RANLIB")" + } ci_info "## END OF CONFIGURATION ##" } function ci_cleanup_old_build { - if [[ -e $CI_BUILD_DIR || -e $CI_INSTALL_DIR ]] - then - ci_info "## START OF PRE-BUILD CLEANUP ##" + ci_info "## START OF PRE-BUILD CLEANUP ##" + [[ ! -e $CI_BUILD_DIR && ! -e $CI_INSTALL_DIR ]] || { ci_spawn rm -fr "$CI_BUILD_DIR" ci_spawn rm -fr "$CI_INSTALL_DIR" - ci_info "## END OF PRE-BUILD CLEANUP ##" - fi + } + ci_info "## END OF PRE-BUILD CLEANUP ##" } function ci_build { ci_info "## START OF BUILD ##" - ci_spawn "$(command -v "$CI_CMAKE")" --version - ci_spawn "$(command -v "$CI_CTEST")" --version - [[ $CI_CMAKE_GENERATOR == *"Ninja"* ]] && - ci_spawn "$(command -v ninja)" --version - # Initialize ALL_CC_FLAGS as a string. - local ALL_CC_FLAGS="$CI_CC_FLAGS" - [[ $CI_SANITIZERS ]] && - ALL_CC_FLAGS="-fsanitize=$CI_SANITIZERS $ALL_CC_FLAGS" - # Initialize ALL_CMAKE_VARS, ALL_CMAKE_BUILD_FLAGS and ALL_CTEST_FLAGS as arrays. - local ALL_CMAKE_VARS=() - [[ $CI_CMAKE_TOOLCHAIN_FILE ]] && - ALL_CMAKE_VARS+=(-DCMAKE_TOOLCHAIN_FILE="$CI_CMAKE_TOOLCHAIN_FILE") - [[ $CI_CC ]] && - ALL_CMAKE_VARS+=(-DCMAKE_C_COMPILER="$CI_CC") - [[ $ALL_CC_FLAGS ]] && - ALL_CMAKE_VARS+=(-DCMAKE_C_FLAGS="$ALL_CC_FLAGS") + # Adjust the CI environment variables, as needed. + CI_CMAKE="$(command -v "$CI_CMAKE")" || ci_err "bad or missing \$CI_CMAKE" + ci_spawn "$CI_CMAKE" --version + CI_CTEST="$(command -v "$CI_CTEST")" || ci_err "bad or missing \$CI_CTEST" + ci_spawn "$CI_CTEST" --version + [[ $CI_CMAKE_GENERATOR == *"Ninja"* ]] && { + CI_NINJA="$(command -v ninja)" || ci_err "bad or missing ninja, no pun intended" + ci_spawn "$CI_NINJA" --version + } [[ $CI_AR ]] && { - # Use the full path of CI_AR to work around a CMake error. - ALL_CMAKE_VARS+=(-DCMAKE_AR="$(command -v "$CI_AR")") + # Use the full path of CI_AR to work around a mysterious CMake error. + CI_AR="$(command -v "$CI_AR")" || ci_err "bad or missing \$CI_AR" } [[ $CI_RANLIB ]] && { - # Use the full path of CI_RANLIB to work around a CMake error. - ALL_CMAKE_VARS+=(-DCMAKE_RANLIB="$(command -v "$CI_RANLIB")") - } - ALL_CMAKE_VARS+=(-DCMAKE_BUILD_TYPE="$CI_CMAKE_BUILD_TYPE") - ALL_CMAKE_VARS+=(-DCMAKE_VERBOSE_MAKEFILE=ON) - ALL_CMAKE_VARS+=($CI_CMAKE_VARS) - local ALL_CMAKE_BUILD_FLAGS=($CI_CMAKE_BUILD_FLAGS) - local ALL_CTEST_FLAGS=($CI_CTEST_FLAGS) + # Use the full path of CI_RANLIB to work around a mysterious CMake error. + CI_RANLIB="$(command -v "$CI_RANLIB")" || ci_err "bad or missing \$CI_RANLIB" + } # Export the CMake environment variables. - [[ $CI_CMAKE_GENERATOR ]] && + [[ $CI_CMAKE_GENERATOR ]] && { ci_spawn export CMAKE_GENERATOR="$CI_CMAKE_GENERATOR" - [[ $CI_CMAKE_GENERATOR_PLATFORM ]] && + } + [[ $CI_CMAKE_GENERATOR_PLATFORM ]] && { ci_spawn export CMAKE_GENERATOR_PLATFORM="$CI_CMAKE_GENERATOR_PLATFORM" - # Build! + } + # Initialize and populate the local arrays. + local all_cmake_vars=() + local all_cmake_build_flags=() + local all_ctest_flags=() + [[ $CI_CMAKE_TOOLCHAIN_FILE ]] && { + all_cmake_vars+=("-DCMAKE_TOOLCHAIN_FILE=$CI_CMAKE_TOOLCHAIN_FILE") + } + [[ $CI_CC ]] && { + all_cmake_vars+=("-DCMAKE_C_COMPILER=$CI_CC") + } + [[ $CI_CC_FLAGS || $CI_SANITIZERS ]] && { + [[ $CI_SANITIZERS ]] && CI_CC_FLAGS+="${CI_CC_FLAGS:+" "}-fsanitize=$CI_SANITIZERS" + all_cmake_vars+=("-DCMAKE_C_FLAGS=$CI_CC_FLAGS") + } + [[ $CI_AR ]] && { + all_cmake_vars+=("-DCMAKE_AR=$CI_AR") + } + [[ $CI_RANLIB ]] && { + all_cmake_vars+=("-DCMAKE_RANLIB=$CI_RANLIB") + } + all_cmake_vars+=("-DCMAKE_BUILD_TYPE=$CI_CMAKE_BUILD_TYPE") + all_cmake_vars+=("-DCMAKE_VERBOSE_MAKEFILE=ON") + all_cmake_vars+=($CI_CMAKE_VARS) + all_cmake_build_flags+=($CI_CMAKE_BUILD_FLAGS) + all_ctest_flags+=($CI_CTEST_FLAGS) + # And... build! # Use $CI_BUILD_TO_SRC_RELDIR and $CI_BUILD_TO_INSTALL_RELDIR # instead of $CI_SRC_DIR and $CI_INSTALL_DIR from this point onwards. ci_spawn mkdir -p "$CI_BUILD_DIR" ci_spawn cd "$CI_BUILD_DIR" - [[ $CI_BUILD_TO_SRC_RELDIR -ef $CI_SRC_DIR ]] || + [[ $CI_BUILD_TO_SRC_RELDIR -ef $CI_SRC_DIR ]] || { ci_err_internal "bad or missing \$CI_BUILD_TO_SRC_RELDIR" + } ci_spawn mkdir -p "$CI_INSTALL_DIR" - [[ $CI_BUILD_TO_INSTALL_RELDIR -ef $CI_INSTALL_DIR ]] || + [[ $CI_BUILD_TO_INSTALL_RELDIR -ef $CI_INSTALL_DIR ]] || { ci_err_internal "bad or missing \$CI_BUILD_TO_INSTALL_RELDIR" + } # Spawn "cmake ...". ci_spawn "$CI_CMAKE" -DCMAKE_INSTALL_PREFIX="$CI_BUILD_TO_INSTALL_RELDIR" \ - "${ALL_CMAKE_VARS[@]}" \ + "${all_cmake_vars[@]}" \ "$CI_BUILD_TO_SRC_RELDIR" # Spawn "cmake --build ...". ci_spawn "$CI_CMAKE" --build . \ --config "$CI_CMAKE_BUILD_TYPE" \ - "${ALL_CMAKE_BUILD_FLAGS[@]}" + "${all_cmake_build_flags[@]}" ci_expr $((CI_NO_TEST)) || { # Spawn "ctest" if testing is not disabled. ci_spawn "$CI_CTEST" --build-config "$CI_CMAKE_BUILD_TYPE" \ - "${ALL_CTEST_FLAGS[@]}" + "${all_ctest_flags[@]}" } ci_expr $((CI_NO_INSTALL)) || { # Spawn "cmake --build ... --target install" if installation is not disabled. ci_spawn "$CI_CMAKE" --build . \ --config "$CI_CMAKE_BUILD_TYPE" \ --target install \ - "${ALL_CMAKE_BUILD_FLAGS[@]}" + "${all_cmake_build_flags[@]}" } ci_expr $((CI_NO_CLEAN)) || { # Spawn "make --build ... --target clean" if cleaning is not disabled. ci_spawn "$CI_CMAKE" --build . \ --config "$CI_CMAKE_BUILD_TYPE" \ --target clean \ - "${ALL_CMAKE_BUILD_FLAGS[@]}" + "${all_cmake_build_flags[@]}" } ci_info "## END OF BUILD ##" } function usage { - echo "usage: $CI_SCRIPT_NAME" - exit 0 + echo "usage: $CI_SCRIPT_NAME []" + echo "options: -?|-h|--help" + exit "${@:-0}" } function main { @@ -177,15 +200,17 @@ function main { while getopts ":" opt do # This ain't a while-loop. It only pretends to be. - [[ $1 == -[?h]* || $1 == --help ]] && usage + [[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0 ci_err "unknown option: '$1'" done shift $((OPTIND - 1)) + # And... go! ci_init_build ci_trace_build [[ $# -eq 0 ]] || { - ci_info "note: this program accepts environment options only" - ci_err "unexpected argument: '$1'" + echo >&2 "error: unexpected argument: '$1'" + echo >&2 "note: this program accepts environment options only" + usage 2 } ci_cleanup_old_build ci_build diff --git a/source/libs/libpng/libpng-src/ci/ci_verify_configure.sh b/source/libs/libpng/libpng-src/ci/ci_verify_configure.sh index 9be76d9862..141c7a2834 100644 --- a/source/libs/libpng/libpng-src/ci/ci_verify_configure.sh +++ b/source/libs/libpng/libpng-src/ci/ci_verify_configure.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -e +set -o errexit -o pipefail -o posix # Copyright (c) 2019-2024 Cosmin Truta. # @@ -8,7 +8,7 @@ set -e # # SPDX-License-Identifier: MIT -# shellcheck source="ci/lib/ci.lib.sh" +# shellcheck source=ci/lib/ci.lib.sh source "$(dirname "$0")/lib/ci.lib.sh" cd "$CI_TOPLEVEL_DIR" @@ -26,10 +26,12 @@ function ci_init_build { [[ -x $(command -v cc) ]] && CI_CC="${CI_CC:-cc}" } # Ensure that the CI_ variables that cannot be customized reliably are not initialized. - [[ ! $CI_CONFIGURE_VARS ]] || + [[ ! $CI_CONFIGURE_VARS ]] || { ci_err "unsupported: \$CI_CONFIGURE_VARS='$CI_CONFIGURE_VARS'" - [[ ! $CI_MAKE_VARS ]] || + } + [[ ! $CI_MAKE_VARS ]] || { ci_err "unsupported: \$CI_MAKE_VARS='$CI_MAKE_VARS'" + } } function ci_trace_build { @@ -55,31 +57,54 @@ function ci_trace_build { ci_info "environment option: \$CI_LD: '$CI_LD'" ci_info "environment option: \$CI_LD_FLAGS: '$CI_LD_FLAGS'" ci_info "environment option: \$CI_SANITIZERS: '$CI_SANITIZERS'" + ci_info "environment option: \$CI_FORCE: '$CI_FORCE'" ci_info "environment option: \$CI_NO_TEST: '$CI_NO_TEST'" ci_info "environment option: \$CI_NO_INSTALL: '$CI_NO_INSTALL'" ci_info "environment option: \$CI_NO_CLEAN: '$CI_NO_CLEAN'" ci_info "executable: \$CI_MAKE: $(command -V "$CI_MAKE")" - [[ $CI_CC ]] && + [[ $CI_CC ]] && { ci_info "executable: \$CI_CC: $(command -V "$CI_CC")" - [[ $CI_CPP ]] && + } + [[ $CI_CPP ]] && { ci_info "executable: \$CI_CPP: $(command -V "$CI_CPP")" - [[ $CI_AR ]] && + } + [[ $CI_AR ]] && { ci_info "executable: \$CI_AR: $(command -V "$CI_AR")" - [[ $CI_RANLIB ]] && + } + [[ $CI_RANLIB ]] && { ci_info "executable: \$CI_RANLIB: $(command -V "$CI_RANLIB")" - [[ $CI_LD ]] && + } + [[ $CI_LD ]] && { ci_info "executable: \$CI_LD: $(command -V "$CI_LD")" + } ci_info "## END OF CONFIGURATION ##" } function ci_cleanup_old_build { - if [[ -e $CI_BUILD_DIR || -e $CI_INSTALL_DIR ]] - then - ci_info "## START OF PRE-BUILD CLEANUP ##" + ci_info "## START OF PRE-BUILD CLEANUP ##" + [[ ! -e $CI_BUILD_DIR && ! -e $CI_INSTALL_DIR ]] || { ci_spawn rm -fr "$CI_BUILD_DIR" ci_spawn rm -fr "$CI_INSTALL_DIR" - ci_info "## END OF PRE-BUILD CLEANUP ##" - fi + } + [[ ! -e "$CI_SRC_DIR/config.status" ]] || { + ci_warn "unexpected build configuration file: '$CI_SRC_DIR/config.status'" + if ci_expr $((CI_FORCE)) + then + # Delete the old config and (possibly) the old build. + ci_info "note: forcing an in-tree build cleanup" + if [[ -f $CI_SRC_DIR/Makefile ]] + then + ci_spawn make -C "$CI_SRC_DIR" distclean + else + ci_spawn rm -fr "$CI_SRC_DIR"/config.{log,status} + fi + else + # Alert the user, but do not delete their files. + ci_warn "the configure script might fail" + ci_info "hint: consider using the option \$CI_FORCE=1" + fi + } + ci_info "## END OF PRE-BUILD CLEANUP ##" } function ci_build { @@ -94,10 +119,10 @@ function ci_build { [[ $CI_LD ]] && ci_spawn export LD="$CI_LD" [[ $CI_LD_FLAGS ]] && ci_spawn export LDFLAGS="$CI_LD_FLAGS" [[ $CI_SANITIZERS ]] && { - ci_spawn export CFLAGS="-fsanitize=$CI_SANITIZERS ${CFLAGS:-"-O2"}" - ci_spawn export LDFLAGS="-fsanitize=$CI_SANITIZERS $LDFLAGS" + ci_spawn export CFLAGS="${CFLAGS:-"-O2"} -fsanitize=$CI_SANITIZERS" + ci_spawn export LDFLAGS="${LDFLAGS}${LDFLAGS:+" "}-fsanitize=$CI_SANITIZERS" } - # Build! + # And... build! ci_spawn mkdir -p "$CI_BUILD_DIR" ci_spawn cd "$CI_BUILD_DIR" # Spawn "configure". @@ -121,8 +146,9 @@ function ci_build { } function usage { - echo "usage: $CI_SCRIPT_NAME" - exit 0 + echo "usage: $CI_SCRIPT_NAME []" + echo "options: -?|-h|--help" + exit "${@:-0}" } function main { @@ -130,7 +156,7 @@ function main { while getopts ":" opt do # This ain't a while-loop. It only pretends to be. - [[ $1 == -[?h]* || $1 == --help ]] && usage + [[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0 ci_err "unknown option: '$1'" done shift $((OPTIND - 1)) @@ -138,8 +164,9 @@ function main { ci_init_build ci_trace_build [[ $# -eq 0 ]] || { - ci_info "note: this program accepts environment options only" - ci_err "unexpected argument: '$1'" + echo >&2 "error: unexpected argument: '$1'" + echo >&2 "note: this program accepts environment options only" + usage 2 } ci_cleanup_old_build ci_build diff --git a/source/libs/libpng/libpng-src/ci/ci_verify_makefiles.sh b/source/libs/libpng/libpng-src/ci/ci_verify_makefiles.sh index beda3b470e..e0681b4d8c 100644 --- a/source/libs/libpng/libpng-src/ci/ci_verify_makefiles.sh +++ b/source/libs/libpng/libpng-src/ci/ci_verify_makefiles.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -e +set -o errexit -o pipefail -o posix # Copyright (c) 2019-2024 Cosmin Truta. # @@ -8,7 +8,7 @@ set -e # # SPDX-License-Identifier: MIT -# shellcheck source="ci/lib/ci.lib.sh" +# shellcheck source=ci/lib/ci.lib.sh source "$(dirname "$0")/lib/ci.lib.sh" cd "$CI_TOPLEVEL_DIR" @@ -50,19 +50,25 @@ function ci_trace_build { ci_info "environment option: \$CI_LD_FLAGS: '$CI_LD_FLAGS'" ci_info "environment option: \$CI_LIBS: '$CI_LIBS'" ci_info "environment option: \$CI_SANITIZERS: '$CI_SANITIZERS'" + ci_info "environment option: \$CI_FORCE: '$CI_FORCE'" ci_info "environment option: \$CI_NO_TEST: '$CI_NO_TEST'" ci_info "environment option: \$CI_NO_CLEAN: '$CI_NO_CLEAN'" ci_info "executable: \$CI_MAKE: $(command -V "$CI_MAKE")" - [[ $CI_CC ]] && + [[ $CI_CC ]] && { ci_info "executable: \$CI_CC: $(command -V "$CI_CC")" - [[ $CI_CPP ]] && + } + [[ $CI_CPP ]] && { ci_info "executable: \$CI_CPP: $(command -V "$CI_CPP")" - [[ $CI_AR ]] && + } + [[ $CI_AR ]] && { ci_info "executable: \$CI_AR: $(command -V "$CI_AR")" - [[ $CI_RANLIB ]] && + } + [[ $CI_RANLIB ]] && { ci_info "executable: \$CI_RANLIB: $(command -V "$CI_RANLIB")" - [[ $CI_LD ]] && + } + [[ $CI_LD ]] && { ci_info "executable: \$CI_LD: $(command -V "$CI_LD")" + } ci_info "## END OF CONFIGURATION ##" } @@ -74,61 +80,87 @@ function ci_cleanup_old_build { # Fortunately, for a clean makefiles-based build, it should be # sufficient to remove the old object files only. ci_info "## START OF PRE-BUILD CLEANUP ##" - local MY_FILE - find "$CI_SRC_DIR" -maxdepth 1 \( -iname "*.o" -o -iname "*.obj" \) | - while IFS="" read -r MY_FILE - do - ci_spawn rm -fr "$MY_FILE" - done - ci_info "## END OF PRE-BUILD CLEANUP ##" + local find_args=(-maxdepth 1 \( -iname "*.o" -o -iname "*.obj" \)) + [[ ! $(find "$CI_SRC_DIR" "${find_args[@]}" | head -n1) ]] || { + ci_warn "unexpected build found in '$CI_SRC_DIR'" + if ci_expr $((CI_FORCE)) + then + # Delete the old build. + local my_file + find "$CI_SRC_DIR" "${find_args[@]}" | + while IFS="" read -r my_file + do + ci_spawn rm -fr "$my_file" + done + ci_info "## END OF PRE-BUILD CLEANUP ##" + else + # Alert the user, but do not delete their existing files, + # and do not mess up their existing build. + ci_info "hint: consider using the option \$CI_FORCE=1" + ci_err "unable to continue" + fi + } } function ci_build { ci_info "## START OF BUILD ##" - # Initialize ALL_CC_FLAGS and ALL_LD_FLAGS as strings. - local ALL_CC_FLAGS="$CI_CC_FLAGS" - local ALL_LD_FLAGS="$CI_LD_FLAGS" - [[ $CI_SANITIZERS ]] && { - ALL_CC_FLAGS="-fsanitize=$CI_SANITIZERS ${ALL_CC_FLAGS:-"-O2"}" - ALL_LD_FLAGS="-fsanitize=$CI_SANITIZERS $ALL_LD_FLAGS" - } - # Initialize ALL_MAKE_FLAGS and ALL_MAKE_VARS as arrays. - local ALL_MAKE_FLAGS=($CI_MAKE_FLAGS) - local ALL_MAKE_VARS=() - [[ $CI_CC ]] && ALL_MAKE_VARS+=(CC="$CI_CC") - [[ $ALL_CC_FLAGS ]] && ALL_MAKE_VARS+=(CFLAGS="$ALL_CC_FLAGS") - [[ $CI_CPP ]] && ALL_MAKE_VARS+=(CPP="$CI_CPP") - [[ $CI_CPP_FLAGS ]] && ALL_MAKE_VARS+=(CPPFLAGS="$CI_CPP_FLAGS") - [[ $CI_AR ]] && ALL_MAKE_VARS+=( - AR="${CI_AR:-ar}" - AR_RC="${CI_AR:-ar} rc" - ) - [[ $CI_RANLIB ]] && ALL_MAKE_VARS+=(RANLIB="$CI_RANLIB") - [[ $CI_LD ]] && ALL_MAKE_VARS+=(LD="$CI_LD") - [[ $ALL_LD_FLAGS ]] && ALL_MAKE_VARS+=(LDFLAGS="$ALL_LD_FLAGS") - [[ $CI_LIBS ]] && ALL_MAKE_VARS+=(LIBS="$CI_LIBS") - ALL_MAKE_VARS+=($CI_MAKE_VARS) - # Build! - local MY_MAKEFILE - for MY_MAKEFILE in $CI_MAKEFILES + # Initialize and populate the local arrays. + local all_make_flags=() + local all_make_vars=() + [[ $CI_MAKE_FLAGS ]] && { + all_make_flags+=($CI_MAKE_FLAGS) + } + [[ $CI_CC ]] && { + all_make_vars+=("CC=$CI_CC") + } + [[ $CI_CC_FLAGS || $CI_SANITIZERS ]] && { + [[ $CI_SANITIZERS ]] && CI_CC_FLAGS="${CI_CC_FLAGS:-"-O2"} -fsanitize=$CI_SANITIZERS" + all_make_vars+=("CFLAGS=$CI_CC_FLAGS") + } + [[ $CI_CPP ]] && { + all_make_vars+=("CPP=$CI_CPP") + } + [[ $CI_CPP_FLAGS ]] && { + all_make_vars+=("CPPFLAGS=$CI_CPP_FLAGS") + } + [[ $CI_AR ]] && { + all_make_vars+=("AR=$CI_AR") + } + [[ $CI_RANLIB ]] && { + all_make_vars+=("RANLIB=$CI_RANLIB") + } + [[ $CI_LD ]] && { + all_make_vars+=("LD=$CI_LD") + } + [[ $CI_LD_FLAGS || $CI_SANITIZERS ]] && { + [[ $CI_SANITIZERS ]] && CI_LD_FLAGS+="${CI_LD_FLAGS:+" "}-fsanitize=$CI_SANITIZERS" + all_make_vars+=("LDFLAGS=$CI_LD_FLAGS") + } + [[ $CI_LIBS ]] && { + all_make_vars+=("LIBS=$CI_LIBS") + } + all_make_vars+=($CI_MAKE_VARS) + # And... build! + local my_makefile + for my_makefile in $CI_MAKEFILES do - ci_info "using makefile: $MY_MAKEFILE" + ci_info "using makefile: $my_makefile" # Spawn "make". - ci_spawn "$CI_MAKE" -f "$MY_MAKEFILE" \ - "${ALL_MAKE_FLAGS[@]}" \ - "${ALL_MAKE_VARS[@]}" + ci_spawn "$CI_MAKE" -f "$my_makefile" \ + "${all_make_flags[@]}" \ + "${all_make_vars[@]}" ci_expr $((CI_NO_TEST)) || { # Spawn "make test" if testing is not disabled. - ci_spawn "$CI_MAKE" -f "$MY_MAKEFILE" \ - "${ALL_MAKE_FLAGS[@]}" \ - "${ALL_MAKE_VARS[@]}" \ + ci_spawn "$CI_MAKE" -f "$my_makefile" \ + "${all_make_flags[@]}" \ + "${all_make_vars[@]}" \ test } ci_expr $((CI_NO_CLEAN)) || { # Spawn "make clean" if cleaning is not disabled. - ci_spawn "$CI_MAKE" -f "$MY_MAKEFILE" \ - "${ALL_MAKE_FLAGS[@]}" \ - "${ALL_MAKE_VARS[@]}" \ + ci_spawn "$CI_MAKE" -f "$my_makefile" \ + "${all_make_flags[@]}" \ + "${all_make_vars[@]}" \ clean } done @@ -136,8 +168,9 @@ function ci_build { } function usage { - echo "usage: $CI_SCRIPT_NAME" - exit 0 + echo "usage: $CI_SCRIPT_NAME []" + echo "options: -?|-h|--help" + exit "${@:-0}" } function main { @@ -145,7 +178,7 @@ function main { while getopts ":" opt do # This ain't a while-loop. It only pretends to be. - [[ $1 == -[?h]* || $1 == --help ]] && usage + [[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0 ci_err "unknown option: '$1'" done shift $((OPTIND - 1)) @@ -153,8 +186,9 @@ function main { ci_init_build ci_trace_build [[ $# -eq 0 ]] || { - ci_info "note: this program accepts environment options only" - ci_err "unexpected argument: '$1'" + echo >&2 "error: unexpected argument: '$1'" + echo >&2 "note: this program accepts environment options only" + usage 2 } ci_cleanup_old_build ci_build diff --git a/source/libs/libpng/libpng-src/ci/ci_verify_version.sh b/source/libs/libpng/libpng-src/ci/ci_verify_version.sh new file mode 100644 index 0000000000..c786f06acd --- /dev/null +++ b/source/libs/libpng/libpng-src/ci/ci_verify_version.sh @@ -0,0 +1,163 @@ +#!/usr/bin/env bash +set -o errexit -o pipefail -o posix + +# Copyright (c) 2019-2024 Cosmin Truta. +# +# Use, modification and distribution are subject to the MIT License. +# Please see the accompanying file LICENSE_MIT.txt +# +# SPDX-License-Identifier: MIT + +# shellcheck source=ci/lib/ci.lib.sh +source "$(dirname "$0")/lib/ci.lib.sh" +cd "$CI_TOPLEVEL_DIR" + +function ci_init_shellify { + [[ -f $CI_SCRIPT_DIR/ci_shellify.sh ]] || { + ci_err_internal "missing script: '$CI_SCRIPT_DIR/ci_shellify.sh'" + } +} + +function ci_run_shellify { + ci_info "shellifying:" "$@" + local my_result + "$BASH" "$CI_SCRIPT_DIR/ci_shellify.sh" "$@" + echo "$my_result" | "$BASH" --posix || ci_err "bad shellify output" + echo "$my_result" +} + +function ci_verify_version { + ci_info "## START OF VERIFICATION ##" + local my_env_libpng_ver my_env_autoconf_ver my_env_cmake_ver my_expect + ci_init_shellify + my_env_libpng_ver="$(ci_run_shellify png.h)" + echo "$my_env_libpng_ver" + my_env_autoconf_ver="$(ci_run_shellify configure.ac)" + echo "$my_env_autoconf_ver" + my_env_cmake_ver="$(ci_run_shellify CMakeLists.txt)" + echo "$my_env_cmake_ver" + ci_info "## VERIFYING: png.h version definitions ##" + eval "$my_env_libpng_ver" + local my_expect="${PNG_LIBPNG_VER_MAJOR}.${PNG_LIBPNG_VER_MINOR}.${PNG_LIBPNG_VER_RELEASE}" + if [[ "$PNG_LIBPNG_VER_STRING" == "$my_expect"* ]] + then + ci_info "matched: \$PNG_LIBPNG_VER_STRING == $my_expect*" + else + ci_err "mismatched: \$PNG_LIBPNG_VER_STRING != $my_expect*" + fi + my_expect=$((PNG_LIBPNG_VER_MAJOR*10000 + PNG_LIBPNG_VER_MINOR*100 + PNG_LIBPNG_VER_RELEASE)) + if [[ "$PNG_LIBPNG_VER" == "$my_expect" ]] + then + ci_info "matched: \$PNG_LIBPNG_VER == $my_expect" + else + ci_err "mismatched: \$PNG_LIBPNG_VER != $my_expect" + fi + my_expect=$((PNG_LIBPNG_VER_MAJOR*10 + PNG_LIBPNG_VER_MINOR)) + if [[ "$PNG_LIBPNG_VER_SHAREDLIB" == "$my_expect" ]] + then + ci_info "matched: \$PNG_LIBPNG_VER_SHAREDLIB == $my_expect" + else + ci_err "mismatched: \$PNG_LIBPNG_VER_SHAREDLIB != $my_expect" + fi + if [[ "$PNG_LIBPNG_VER_SONUM" == "$my_expect" ]] + then + ci_info "matched: \$PNG_LIBPNG_VER_SONUM == $my_expect" + else + ci_err "mismatched: \$PNG_LIBPNG_VER_SONUM != $my_expect" + fi + if [[ "$PNG_LIBPNG_VER_DLLNUM" == "$my_expect" ]] + then + ci_info "matched: \$PNG_LIBPNG_VER_DLLNUM == $my_expect" + else + ci_err "mismatched: \$PNG_LIBPNG_VER_DLLNUM != $my_expect" + fi + if [[ "$PNG_LIBPNG_VER_BUILD" == [01] ]] + then + ci_info "matched: \$PNG_LIBPNG_VER_BUILD == [01]" + else + ci_err "mismatched: \$PNG_LIBPNG_VER_BUILD != [01]" + fi + ci_info "## VERIFYING: png.h build definitions ##" + my_expect="${PNG_LIBPNG_VER_MAJOR}.${PNG_LIBPNG_VER_MINOR}.${PNG_LIBPNG_VER_RELEASE}" + if [[ "$PNG_LIBPNG_VER_STRING" == "$my_expect" ]] + then + if [[ $PNG_LIBPNG_VER_BUILD -eq 0 ]] + then + ci_info "matched: \$PNG_LIBPNG_VER_BUILD -eq 0" + else + ci_err "mismatched: \$PNG_LIBPNG_VER_BUILD -ne 0" + fi + if [[ $PNG_LIBPNG_BUILD_BASE_TYPE -eq $PNG_LIBPNG_BUILD_STABLE ]] + then + ci_info "matched: \$PNG_LIBPNG_BUILD_BASE_TYPE -eq \$PNG_LIBPNG_BUILD_BETA" + else + ci_err "mismatched: \$PNG_LIBPNG_BUILD_BASE_TYPE -ne \$PNG_LIBPNG_BUILD_BETA" + fi + elif [[ "$PNG_LIBPNG_VER_STRING" == "$my_expect".git ]] + then + if [[ $PNG_LIBPNG_VER_BUILD -ne 0 ]] + then + ci_info "matched: \$PNG_LIBPNG_VER_BUILD -ne 0" + else + ci_err "mismatched: \$PNG_LIBPNG_VER_BUILD -eq 0" + fi + if [[ $PNG_LIBPNG_BUILD_BASE_TYPE -eq $PNG_LIBPNG_BUILD_BETA ]] + then + ci_info "matched: \$PNG_LIBPNG_BUILD_BASE_TYPE -eq \$PNG_LIBPNG_BUILD_BETA" + else + ci_err "mismatched: \$PNG_LIBPNG_BUILD_BASE_TYPE -ne \$PNG_LIBPNG_BUILD_BETA" + fi + else + ci_err "unexpected: \$PNG_LIBPNG_VER_STRING == '$PNG_LIBPNG_VER_STRING'" + fi + ci_info "## VERIFYING: png.h type definitions ##" + my_expect="$(echo "png_libpng_version_${PNG_LIBPNG_VER_STRING}" | tr . _)" + ci_spawn grep -w -e "$my_expect" png.h + ci_info "## VERIFYING: configure.ac version definitions ##" + eval "$my_env_autoconf_ver" + if [[ "$PNGLIB_VERSION" == "$PNG_LIBPNG_VER_STRING" ]] + then + ci_info "matched: \$PNGLIB_VERSION == \$PNG_LIBPNG_VER_STRING" + else + ci_err "mismatched: \$PNGLIB_VERSION != \$PNG_LIBPNG_VER_STRING" + fi + ci_info "## VERIFYING: CMakeLists.txt version definitions ##" + eval "$my_env_cmake_ver" + if [[ "$PNGLIB_VERSION" == "$PNG_LIBPNG_VER_STRING" && "$PNGLIB_SUBREVISION" == 0 ]] + then + ci_info "matched: \$PNGLIB_VERSION == \$PNG_LIBPNG_VER_STRING" + ci_info "matched: \$PNGLIB_SUBREVISION == 0" + elif [[ "$PNGLIB_VERSION.$PNGLIB_SUBREVISION" == "$PNG_LIBPNG_VER_STRING" ]] + then + ci_info "matched: \$PNGLIB_VERSION.\$PNGLIB_SUBREVISION == \$PNG_LIBPNG_VER_STRING" + else + ci_err "mismatched: \$PNGLIB_VERSION != \$PNG_LIBPNG_VER_STRING" + fi + ci_info "## END OF VERIFICATION ##" + ci_info "success!" +} + +function usage { + echo "usage: $CI_SCRIPT_NAME []" + echo "options: -?|-h|--help" + exit "${@:-0}" +} + +function main { + local opt + while getopts ":" opt + do + # This ain't a while-loop. It only pretends to be. + [[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0 + ci_err "unknown option: '$1'" + done + shift $((OPTIND - 1)) + [[ $# -eq 0 ]] || { + echo >&2 "error: unexpected argument: '$1'" + usage 2 + } + # And... go! + ci_verify_version +} + +main "$@" diff --git a/source/libs/libpng/libpng-src/ci/lib/ci.lib.sh b/source/libs/libpng/libpng-src/ci/lib/ci.lib.sh index 1f3c698b5d..03e866b5c3 100644 --- a/source/libs/libpng/libpng-src/ci/lib/ci.lib.sh +++ b/source/libs/libpng/libpng-src/ci/lib/ci.lib.sh @@ -5,10 +5,12 @@ # # SPDX-License-Identifier: MIT -test -f "$BASH_SOURCE" || +test -f "$BASH_SOURCE" || { echo >&2 "warning: this module requires Bash version 3 or newer" -test "${#BASH_SOURCE[@]}" -gt 1 || +} +test "${#BASH_SOURCE[@]}" -gt 1 || { echo >&2 "warning: this module should be sourced from a Bash script" +} # Reset the locale to avoid surprises from locale-dependent commands. export LC_ALL=C @@ -72,19 +74,29 @@ function ci_spawn { } # Ensure that the internal initialization is correct. -[[ $CI_TOPLEVEL_DIR/ci/lib/ci.lib.sh -ef ${BASH_SOURCE[0]} ]] || +[[ $CI_TOPLEVEL_DIR/ci/lib/ci.lib.sh -ef ${BASH_SOURCE[0]} ]] || { ci_err_internal "bad or missing \$CI_TOPLEVEL_DIR" -[[ $CI_SCRIPT_DIR/$CI_SCRIPT_NAME -ef $0 ]] || +} +[[ $CI_SCRIPT_DIR/$CI_SCRIPT_NAME -ef $0 ]] || { ci_err_internal "bad or missing \$CI_SCRIPT_DIR/\$CI_SCRIPT_NAME" -[[ $CI_BUILD_ARCH && $CI_BUILD_SYSTEM ]] || +} +[[ $CI_BUILD_ARCH && $CI_BUILD_SYSTEM ]] || { ci_err_internal "missing \$CI_BUILD_ARCH or \$CI_BUILD_SYSTEM" -[[ $CI_TARGET_ARCH && $CI_TARGET_SYSTEM ]] || +} +[[ $CI_TARGET_ARCH && $CI_TARGET_SYSTEM ]] || { ci_err_internal "missing \$CI_TARGET_ARCH or \$CI_TARGET_SYSTEM" +} # Ensure that the user initialization is correct. -[[ ${CI_NO_TEST:-0} == [01] ]] || +[[ ${CI_FORCE:-0} == [01] ]] || { + ci_err "bad boolean option: \$CI_FORCE: '$CI_FORCE'" +} +[[ ${CI_NO_TEST:-0} == [01] ]] || { ci_err "bad boolean option: \$CI_NO_TEST: '$CI_NO_TEST'" -[[ ${CI_NO_INSTALL:-0} == [01] ]] || +} +[[ ${CI_NO_INSTALL:-0} == [01] ]] || { ci_err "bad boolean option: \$CI_NO_INSTALL: '$CI_NO_INSTALL'" -[[ ${CI_NO_CLEAN:-0} == [01] ]] || +} +[[ ${CI_NO_CLEAN:-0} == [01] ]] || { ci_err "bad boolean option: \$CI_NO_CLEAN: '$CI_NO_CLEAN'" +} diff --git a/source/libs/libpng/libpng-src/configure.ac b/source/libs/libpng/libpng-src/configure.ac index 6124234062..505d72ff60 100644 --- a/source/libs/libpng/libpng-src/configure.ac +++ b/source/libs/libpng/libpng-src/configure.ac @@ -25,7 +25,7 @@ AC_PREREQ([2.68]) dnl Version number stuff here: -AC_INIT([libpng],[1.6.42],[png-mng-implement@lists.sourceforge.net]) +AC_INIT([libpng],[1.6.43],[png-mng-implement@lists.sourceforge.net]) AC_CONFIG_MACRO_DIR([scripts/autoconf]) # libpng does not follow GNU file name conventions (hence 'foreign') @@ -46,17 +46,17 @@ dnl automake, so the following is not necessary (and is not defined anyway): dnl AM_PREREQ([1.11.2]) dnl stop configure from automagically running automake -PNGLIB_VERSION=1.6.42 +PNGLIB_VERSION=1.6.43 PNGLIB_MAJOR=1 PNGLIB_MINOR=6 -PNGLIB_RELEASE=41 +PNGLIB_RELEASE=43 dnl End of version number stuff AC_CONFIG_SRCDIR([pngget.c]) AC_CONFIG_HEADERS([config.h]) -# Checks for programs. +# Check for basic programs. AC_LANG([C]) AC_PROG_CC AM_PROG_AS @@ -72,16 +72,19 @@ dnl compatible later version may be used LT_INIT([win32-dll]) LT_PREREQ([2.4.2]) -# Some awks crash when confronted with pnglibconf.dfa, do a test run now -# to make sure this doesn't happen -AC_MSG_CHECKING([that AWK works]) +dnl Declare the AWK variable. +AC_ARG_VAR(AWK, [AWK language processor]) + +# Some awk implementations crash when confronted with pnglibconf.dfa. +# Run a test now, to make sure this doesn't happen. +AC_MSG_CHECKING([if awk ($AWK) works]) if ${AWK} -f ${srcdir}/scripts/options.awk out="/dev/null" version=search\ ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\ ${srcdir}/pngusr.dfa 1>&2 then - AC_MSG_RESULT([ok]) + AC_MSG_RESULT([yes]) else - AC_MSG_FAILURE([failed], 1) + AC_MSG_FAILURE([no], 1) fi # This is a remnant of the old cc -E validation, where it may have been @@ -111,7 +114,7 @@ AM_CONDITIONAL([ENABLE_TOOLS], # (it checks the compiler with a program that generates a warning). # Add the following option to deal with this: AC_ARG_VAR(PNG_COPTS, - [additional flags for the C compiler, use this for options that would] + [additional flags for the C compiler, to be used for options that would] [cause configure itself to fail]) AC_ARG_ENABLE(werror, AS_HELP_STRING([[[--enable-werror[=OPT]]]], @@ -223,9 +226,9 @@ AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes") if test "$have_ld_version_script" = "yes"; then AC_MSG_CHECKING([for symbol prefix]) SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \ - | ${CPP-${CC-gcc} -E} - 2>&1 \ - | ${EGREP-grep} "^PREFIX=" \ - | ${SED-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"` + | ${CPP:-${CC:-gcc} -E} - 2>&1 \ + | ${EGREP:-grep} "^PREFIX=" \ + | ${SED:-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"` AC_SUBST(SYMBOL_PREFIX) AC_MSG_RESULT($SYMBOL_PREFIX) fi @@ -318,7 +321,7 @@ AM_CONDITIONAL([DO_INSTALL_LIBPNG_CONFIG], # AC_ARG_ENABLE([hardware-optimizations], AS_HELP_STRING([[[--enable-hardware-optimizations]]], - [Enable hardware optimizations: =no/off, yes/on:]), + [Enable hardware optimizations: =no/off, yes/on.]), [case "$enableval" in no|off) # disable hardware optimization on all systems: @@ -376,17 +379,16 @@ AC_ARG_ENABLE([hardware-optimizations], ;; esac]) -# ARM -# === -# -# ARM NEON (SIMD) support. +# ARM NEON +# ======== AC_ARG_ENABLE([arm-neon], AS_HELP_STRING([[[--enable-arm-neon]]], - [Enable ARM NEON optimizations: =no/off, check, api, yes/on:] - [no/off: disable the optimizations; check: use internal checking code] - [(deprecated and poorly supported); api: disable by default, enable by] - [a call to png_set_option; yes/on: turn on unconditionally.] + [Enable ARM NEON optimizations: =no/off, check, api, yes/on.] + [no/off: disable the optimizations;] + [check: use internal checking code (deprecated and poorly supported);] + [api: disable by default, enable by a call to png_set_option;] + [yes/on: turn on unconditionally.] [If not specified: determined by the compiler.]), [case "$enableval" in no|off) @@ -404,16 +406,17 @@ AC_ARG_ENABLE([arm-neon], yes|on) AC_DEFINE([PNG_ARM_NEON_OPT], [2], [Enable ARM Neon optimizations]) - AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api', if] - [you want the optimizations unconditionally pass -mfpu=neon] - [to the compiler.]);; + AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api';] + [if you want the optimizations unconditionally,] + [pass '-mfpu=neon' to the compiler.]);; *) - AC_MSG_ERROR([--enable-arm-neon=${enable_arm_neon}: invalid value]) + AC_MSG_ERROR([--enable-arm-neon=${enable_arm_neon}:] + [invalid argument]) esac]) # Add ARM-specific files to all builds where $host_cpu is arm ('arm*') or -# where ARM optimizations were explicitly requested (this allows a fallback -# if a future host CPU does not match 'arm*') +# where ARM optimizations were explicitly requested. (This allows a fallback +# if a future host CPU does not match 'arm*'.) AM_CONDITIONAL([PNG_ARM_NEON], [test "$enable_arm_neon" != 'no' && @@ -422,17 +425,16 @@ AM_CONDITIONAL([PNG_ARM_NEON], *) test "$enable_arm_neon" != '' ;; esac]) -# MIPS -# ==== -# -# MIPS MSA (SIMD) support. +# MIPS MSA +# ======== AC_ARG_ENABLE([mips-msa], AS_HELP_STRING([[[--enable-mips-msa]]], - [Enable MIPS MSA optimizations: =no/off, check, api, yes/on:] - [no/off: disable the optimizations; check: use internal checking code] - [(deprecated and poorly supported); api: disable by default, enable by] - [a call to png_set_option; yes/on: turn on unconditionally.] + [Enable MIPS MSA optimizations: =no/off, check, api, yes/on.] + [no/off: disable the optimizations;] + [check: use internal checking code (deprecated and poorly supported);] + [api: disable by default, enable by a call to png_set_option;] + [yes/on: turn on unconditionally.] [If not specified: determined by the compiler.]), [case "$enableval" in no|off) @@ -450,16 +452,17 @@ AC_ARG_ENABLE([mips-msa], yes|on) AC_DEFINE([PNG_MIPS_MSA_OPT], [2], [Enable MIPS MSA optimizations]) - AC_MSG_WARN([--enable-mips-msa: please specify 'check' or 'api', if] - [you want the optimizations unconditionally pass '-mmsa -mfp64'] - [to the compiler.]);; + AC_MSG_WARN([--enable-mips-msa: please specify 'check' or 'api';] + [if you want the optimizations unconditionally,] + [pass '-mmsa -mfp64' to the compiler.]);; *) - AC_MSG_ERROR([--enable-mips-msa=${enable_mips_msa}: invalid value]) + AC_MSG_ERROR([--enable-mips-msa=${enable_mips_msa}:] + [invalid argument]) esac]) # Add MIPS-specific files to all builds where $host_cpu is mips ('mips*') or -# where MIPS optimizations were explicitly requested (this allows a fallback -# if a future host CPU does not match 'mips*') +# where MIPS optimizations were explicitly requested. (This allows a fallback +# if a future host CPU does not match 'mips*'.) AM_CONDITIONAL([PNG_MIPS_MSA], [test "$enable_mips_msa" != 'no' && @@ -467,17 +470,16 @@ AM_CONDITIONAL([PNG_MIPS_MSA], mipsel*|mips64el*) : ;; esac]) -# MIPS -# === -# -# MIPS MMI (SIMD) support. +# MIPS MMI +# ======== AC_ARG_ENABLE([mips-mmi], AS_HELP_STRING([[[--enable-mips-mmi]]], - [Enable MIPS MMI optimizations: =no/off, check, api, yes/on:] - [no/off: disable the optimizations; check: use internal checking code] - [(deprecated and poorly supported); api: disable by default, enable by] - [a call to png_set_option; yes/on: turn on unconditionally.] + [Enable MIPS MMI optimizations: =no/off, check, api, yes/on.] + [no/off: disable the optimizations;] + [check: use internal checking code (deprecated and poorly supported);] + [api: disable by default, enable by a call to png_set_option;] + [yes/on: turn on unconditionally.] [If not specified: determined by the compiler.]), [case "$enableval" in no|off) @@ -495,31 +497,30 @@ AC_ARG_ENABLE([mips-mmi], yes|on) AC_DEFINE([PNG_MIPS_MMI_OPT], [1], [Enable MIPS MMI optimizations]) - AC_MSG_WARN([--enable-mips-mmi: please specify 'check' or 'api', if] - [you want the optimizations unconditionally pass '-mloongson-mmi -march=loongson3a'] - [to the compiler.]);; + AC_MSG_WARN([--enable-mips-mmi: please specify 'check' or 'api';] + [if you want the optimizations unconditionally] + [pass '-mloongson-mmi -march=loongson3a' to the compiler.]);; *) - AC_MSG_ERROR([--enable-mips-mmi=${enable_mips_mmi}: invalid value]) + AC_MSG_ERROR([--enable-mips-mmi=${enable_mips_mmi}:] + [invalid argument]) esac]) # Add MIPS specific files to all builds where the host_cpu is mips ('mips*') or -# where MIPS optimizations were explicitly requested (this allows a fallback if a -# future host CPU does not match 'mips*') +# where MIPS optimizations were explicitly requested. (This allows a fallback +# if a future host CPU does not match 'mips*'.) AM_CONDITIONAL([PNG_MIPS_MMI], [test "$enable_mips_mmi" != 'no' && case "$host_cpu" in - mipsel*|mips64el*) :;; + mipsel*|mips64el*) : ;; esac]) -# INTEL -# ===== -# -# INTEL SSE (SIMD) support. +# INTEL SSE +# ========= AC_ARG_ENABLE([intel-sse], AS_HELP_STRING([[[--enable-intel-sse]]], - [Enable Intel SSE optimizations: =no/off, yes/on:] + [Enable Intel SSE optimizations: =no/off, yes/on.] [no/off: disable the optimizations;] [yes/on: enable the optimizations.] [If not specified: determined by the compiler.]), @@ -534,12 +535,13 @@ AC_ARG_ENABLE([intel-sse], AC_DEFINE([PNG_INTEL_SSE_OPT], [1], [Enable Intel SSE optimizations]);; *) - AC_MSG_ERROR([--enable-intel-sse=${enable_intel_sse}: invalid value]) + AC_MSG_ERROR([--enable-intel-sse=${enable_intel_sse}:] + [invalid argument]) esac]) # Add Intel-specific files to all builds where $host_cpu is Intel ('x86*') or -# where Intel optimizations were explicitly requested (this allows a fallback -# if a future host CPU does not match 'x86*') +# where Intel optimizations were explicitly requested. (This allows a fallback +# if a future host CPU does not match 'x86*'.) AM_CONDITIONAL([PNG_INTEL_SSE], [test "$enable_intel_sse" != 'no' && case "$host_cpu" in @@ -547,16 +549,15 @@ AM_CONDITIONAL([PNG_INTEL_SSE], *) test "$enable_intel_sse" != '' ;; esac]) -# PowerPC -# ======= -# -# PowerPC VSX (SIMD) support. +# POWERPC VSX +# =========== AC_ARG_ENABLE([powerpc-vsx], AS_HELP_STRING([[[--enable-powerpc-vsx]]], - [Enable POWERPC VSX optimizations: =no/off, check, api, yes/on:] - [no/off: disable the optimizations; check: use internal checking code] - [api: disable by default, enable by a call to png_set_option] + [Enable POWERPC VSX optimizations: =no/off, check, api, yes/on.] + [no/off: disable the optimizations;] + [check: use internal checking code;] + [api: disable by default, enable by a call to png_set_option;] [yes/on: turn on unconditionally.] [If not specified: determined by the compiler.]), [case "$enableval" in @@ -569,24 +570,25 @@ AS_HELP_STRING([[[--enable-powerpc-vsx]]], check) AC_DEFINE([PNG_POWERPC_VSX_CHECK_SUPPORTED], [], [Check for POWERPC VSX support at run-time]) - AC_MSG_WARN([--enable-powerpc-vsx Please check contrib/powerpc/README file] - [for the list of supported OSes.]);; + AC_MSG_WARN([--enable-powerpc-vsx: please see contrib/powerpc/README] + [for the list of supported systems.]);; api) AC_DEFINE([PNG_POWERPC_VSX_API_SUPPORTED], [], [Turn on POWERPC VSX optimizations at run-time]);; yes|on) AC_DEFINE([PNG_POWERPC_VSX_OPT], [2], [Enable POWERPC VSX optimizations]) - AC_MSG_WARN([--enable-powerpc-vsx: please specify 'check' or 'api', if] - [you want the optimizations unconditionally pass '-maltivec -mvsx'] - [or '-mcpu=power8' to the compiler.]);; + AC_MSG_WARN([--enable-powerpc-vsx: please specify 'check' or 'api';] + [if you want the optimizations unconditionally,] + [pass '-maltivec -mvsx' or '-mcpu=power8' to the compiler.]);; *) - AC_MSG_ERROR([--enable-powerpc-vsx=${enable_powerpc_vsx}: invalid value]) + AC_MSG_ERROR([--enable-powerpc-vsx=${enable_powerpc_vsx}:] + [invalid argument]) esac]) -# Add PowerPC-specific files to all builds where $host_cpu is powerpc('powerpc*') -# or where PowerPC optimizations were explicitly requested (this allows a fallback -# if a future host CPU does not match 'powerpc*') +# Add PowerPC-specific files to all builds where $host_cpu is powerpc +# ('powerpc*') or where PowerPC optimizations were explicitly requested. +# (This allows a fallback if a future host CPU does not match 'powerpc*'.) AM_CONDITIONAL([PNG_POWERPC_VSX], [test "$enable_powerpc_vsx" != 'no' && @@ -594,28 +596,8 @@ AM_CONDITIONAL([PNG_POWERPC_VSX], powerpc*|ppc64*) : ;; esac]) -# LOONGARCH -# === -# -# LOONGARCH LSX (SIMD) support - -if test "$LSX_CFLAGS" = ''; then - LSX_CFLAGS="-mlsx" -fi - -compiler_support_loongarch_lsx=no -AC_MSG_CHECKING(whether to use loongarch LSX intrinsics) -save_CFLAGS=$CFLAGS -CFLAGS="$CFLAGS $LSX_CFLAGS" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ -#include -int main(){ - __m128i a, b, c; - a = __lsx_vadd_w(b, c); - return 0; -}]])],compiler_support_loongarch_lsx=yes) -CFLAGS=$save_CFLAGS -AC_MSG_RESULT($compiler_support_loongarch_lsx) +# LOONGARCH LSX +# ============= AC_ARG_ENABLE([loongarch-lsx], AS_HELP_STRING([[[--enable-loongarch-lsx]]], @@ -635,26 +617,48 @@ AC_ARG_ENABLE([loongarch-lsx], [Enable LOONGARCH LSX optimizations]) ;; *) - AC_MSG_ERROR([--enable-loongarch-lsx=${enable_loongarch_lsx}: invalid value]) + AC_MSG_ERROR([--enable-loongarch-lsx=${enable_loongarch_lsx}:] + [invalid argument]) esac]) -if test "$enable_loongarch_lsx" != 'no'; then - if test $compiler_support_loongarch_lsx = yes; then - AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [1], [Enable LOONGARCH LSX optimizations]) +if test "$enable_loongarch_lsx" != "no" && + case "$host_cpu" in + loongarch*) : ;; + *) test "$enable_loongarch_lsx" != '' ;; + esac +then + compiler_support_loongarch_lsx=no + AC_MSG_CHECKING(whether to use LoongArch LSX intrinsics) + save_CFLAGS="$CFLAGS" + LSX_CFLAGS="${LSX_CFLAGS:-"-mlsx"}" + CFLAGS="$CFLAGS $LSX_CFLAGS" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +#include +int main(){ + __m128i a, b, c; + a = __lsx_vadd_w(b, c); + return 0; +}]])],compiler_support_loongarch_lsx=yes) + CFLAGS="$save_CFLAGS" + AC_MSG_RESULT($compiler_support_loongarch_lsx) + if test "$compiler_support_loongarch_lsx" = "yes"; then + AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [1], + [Enable LOONGARCH LSX optimizations]) else AC_MSG_WARN([Compiler does not support loongarch LSX.]) fi fi -# Add LOONGARCH specific files to all builds where the host_cpu is loongarch ('loongarch*') or -# where LOONGARCH optimizations were explicitly requested (this allows a fallback if a -# future host CPU does not match 'loongarch*') +# Add LoongArch specific files to all builds where the host_cpu is loongarch +# ('loongarch*') or where LoongArch optimizations were explicitly requested. +# (This allows a fallback if a future host CPU does not match 'loongarch*'.) AM_CONDITIONAL([PNG_LOONGARCH_LSX], - [test "$enable_loongarch_lsx" != 'no' && test $compiler_support_loongarch_lsx = yes && + [test "$enable_loongarch_lsx" != "no" && + test "$compiler_support_loongarch_lsx" = "yes" && case "$host_cpu" in - loongarch*) :;; - *) test "$enable_loongarch_lsx" != '';; + loongarch*) : ;; + *) test "$enable_loongarch_lsx" != '' ;; esac]) AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]]) diff --git a/source/libs/libpng/libpng-src/contrib/.editorconfig b/source/libs/libpng/libpng-src/contrib/.editorconfig new file mode 100644 index 0000000000..e1b551df73 --- /dev/null +++ b/source/libs/libpng/libpng-src/contrib/.editorconfig @@ -0,0 +1,7 @@ +# https://editorconfig.org + +root = false + +[*.[ch]] +max_doc_length = unset +max_line_length = unset diff --git a/source/libs/libpng/libpng-src/contrib/conftest/basic.dfa b/source/libs/libpng/libpng-src/contrib/conftest/basic.dfa new file mode 100644 index 0000000000..f9ae5c3466 --- /dev/null +++ b/source/libs/libpng/libpng-src/contrib/conftest/basic.dfa @@ -0,0 +1,133 @@ +# basic.dfa +# Build time configuration of libpng +# +# Author: John Bowler +# Copyright: (c) John Bowler, 2024 +# Usage rights: +# To the extent possible under law, the author has waived all copyright and +# related or neighboring rights to this work. This work is published from: +# United States. +# +# Build libpng with basic read and write support. This enables the lowest +# level libpng read and write APIs - the "row-by-row" ones. +# +# Support is enabled only for those transformations that are observed to be +# required by widely used apps or are in the v3 specification. +# + +everything = off + +# The sequential read code is enabled here; the progressive code can be used +# instead but there is no point enabling both. + +option READ on +option SEQUENTIAL_READ on +option EASY_ACCESS on +option SET_USER_LIMITS on +option INFO_IMAGE on +option READ_16BIT on + +# Errors: these can be disabled but then there won't be any error messages +# just failures and the error messages are really needed for apps: +option WARNINGS on +option ERROR_TEXT on +option BENIGN_READ_ERRORS on + +# Required for many display programs such as web browsers: +option PROGRESSIVE_READ on + +# Switch on the write code - this makes a minimalist encoder but with +# interlace support turned on; otherwise png_read_png..png_write_png will +# fail on an interlaced image. +option WRITE on +option WRITE_INTERLACING on +option WRITE_16BIT on + +# Usages of the 'fixed' APIs are relatively rare but they do occur +# one or the other for both the API and the internal math. + +#Fixed point: +option FIXED_POINT on + +#Floating point: +option FLOATING_POINT on +option FLOATING_ARITHMETIC on + +# Basic error handling, IO and user memory support. The latter allows the +# application program to provide its own implementations of 'malloc' and 'free'. +option SETJMP on +option STDIO on +option USER_MEM on + +# Gamma handling: this needs to be on for the gamma handling +option READ_GAMMA on + +# The supported chunks +chunk bKGD on +chunk cHRM on +chunk eXIf on +chunk gAMA on +chunk iCCP on +chunk iTXt on +chunk pHYs on +chunk sBIT on +chunk sRGB on +chunk tEXt on +chunk tIME on +chunk tRNS on +chunk zTXt on + +# These don't seem to be used anywhere: +# chunk pCAL +# chunk sCAL +# chunk sPLT + +# The rest of this is app dependent: none of these options are required for +# read/write of the full range of PNG files and the normal chunk handling on +# read. +option WRITE_CUSTOMIZE_ZTXT_COMPRESSION on +option WRITE_CUSTOMIZE_COMPRESSION on + +option READ_EXPAND on +option READ_FILLER on +option READ_GRAY_TO_RGB on +option READ_INVERT on +option READ_PACK on +option READ_RGB_TO_GRAY on +option READ_SCALE_16_TO_8 on +option READ_SHIFT on +option READ_STRIP_16_TO_8 on +option READ_STRIP_ALPHA on +option READ_SWAP on + +option CONVERT_tIME on + +# optipng +option IO_STATE on +option STORE_UNKNOWN_CHUNKS on +option HANDLE_AS_UNKNOWN on + +# pngcrush +option READ_USER_TRANSFORM on +option WRITE_FLUSH on + +# pnmtopng +chunk hIST on + +# cairo +option WRITE_PACKSWAP on +option WRITE_USER_TRANSFORM on + +# graphicsmagick +option READ_USER_CHUNKS on + +# Qt5.15 qtgui (gentoo package split) Qt6.6 qtbase +option READ_BGR on +option WRITE_BGR on +option READ_SWAP_ALPHA on +option WRITE_SWAP_ALPHA on +chunk oFFs on + +# ghostscript-gpl +option WRITE_INVERT_ALPHA on +option WRITE_INVERT on diff --git a/source/libs/libpng/libpng-src/contrib/examples/iccfrompng.c b/source/libs/libpng/libpng-src/contrib/examples/iccfrompng.c index 00056abfd7..0f86714a81 100644 --- a/source/libs/libpng/libpng-src/contrib/examples/iccfrompng.c +++ b/source/libs/libpng/libpng-src/contrib/examples/iccfrompng.c @@ -80,7 +80,7 @@ extract(FILE *fp, png_uint_32 *proflen) } else - result = no_profile; + result = no_profile; } png_destroy_read_struct(&png_ptr, &info_ptr, NULL); @@ -155,7 +155,7 @@ extract_one_file(const char *filename) } else if (verbose && profile == no_profile) - printf("%s has no profile\n", filename); + printf("%s has no profile\n", filename); } else diff --git a/source/libs/libpng/libpng-src/contrib/gregbook/rpng-x.c b/source/libs/libpng/libpng-src/contrib/gregbook/rpng-x.c index 92effaa6d2..2fc9272c64 100644 --- a/source/libs/libpng/libpng-src/contrib/gregbook/rpng-x.c +++ b/source/libs/libpng/libpng-src/contrib/gregbook/rpng-x.c @@ -21,7 +21,7 @@ - 1.10: added support for non-default visuals; fixed X pixel-conversion - 1.11: added extra set of parentheses to png_jmpbuf() macro; fixed command-line parsing bug - - 1.12: fixed some small X memory leaks (thanks to François Petitjean) + - 1.12: fixed some small X memory leaks (thanks to François Petitjean) - 1.13: fixed XFreeGC() crash bug (thanks to Patrick Welche) - 1.14: added support for X resources (thanks to Gerhard Niklasch) - 2.00: dual-licensed (added GNU GPL) diff --git a/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-x.c b/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-x.c index af944c0f2b..1375dc9a6d 100644 --- a/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-x.c +++ b/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-x.c @@ -27,7 +27,7 @@ - 1.11: added -usleep option for demos; fixed command-line parsing bug - 1.12: added -pause option for demos and testing - 1.20: added runtime MMX-enabling/disabling and new -mmx* options - - 1.21: fixed some small X memory leaks (thanks to François Petitjean) + - 1.21: fixed some small X memory leaks (thanks to François Petitjean) - 1.22: fixed XFreeGC() crash bug (thanks to Patrick Welche) - 1.23: added -bgpat 0 mode (std white/gray checkerboard, 8x8 squares) - 1.30: added -loop option for -bgpat (ifdef FEATURE_LOOP); fixed bpp = diff --git a/source/libs/libpng/libpng-src/contrib/libtests/pngvalid.c b/source/libs/libpng/libpng-src/contrib/libtests/pngvalid.c index 6a7422e886..3d66154dd4 100644 --- a/source/libs/libpng/libpng-src/contrib/libtests/pngvalid.c +++ b/source/libs/libpng/libpng-src/contrib/libtests/pngvalid.c @@ -70,9 +70,12 @@ #endif /* pngvalid requires write support and one of the fixed or floating point APIs. + * progressive read is also required currently as the progressive read pointer + * is used to record the 'display' structure. */ -#if defined(PNG_WRITE_SUPPORTED) &&\ - (defined(PNG_FIXED_POINT_SUPPORTED) || defined(PNG_FLOATING_POINT_SUPPORTED)) +#if defined PNG_WRITE_SUPPORTED &&\ + (defined PNG_PROGRESSIVE_READ_SUPPORTED) &&\ + (defined PNG_FIXED_POINT_SUPPORTED || defined PNG_FLOATING_POINT_SUPPORTED) #if PNG_LIBPNG_VER < 10500 /* This deliberately lacks the const. */ @@ -10009,9 +10012,12 @@ gamma_component_validate(const char *name, const validate_info *vi, case ALPHA_MODE_OFFSET + PNG_ALPHA_BROKEN: case ALPHA_MODE_OFFSET + PNG_ALPHA_OPTIMIZED: # endif /* ALPHA_MODE_SUPPORTED */ +# if (defined PNG_READ_BACKGROUND_SUPPORTED) ||\ + (defined PNG_READ_ALPHA_MODE_SUPPORTED) do_compose = (alpha > 0 && alpha < 1); use_input = (alpha != 0); break; +# endif default: break; @@ -11924,7 +11930,14 @@ int main(int argc, char **argv) pm.test_gamma_alpha_mode = 0; else if (strcmp(*argv, "--expand16") == 0) - pm.test_gamma_expand16 = 1; + { +# ifdef PNG_READ_EXPAND_16_SUPPORTED + pm.test_gamma_expand16 = 1; +# else + fprintf(stderr, "pngvalid: --expand16: no read support\n"); + return SKIP; +# endif + } else if (strcmp(*argv, "--noexpand16") == 0) pm.test_gamma_expand16 = 0; @@ -11939,10 +11952,15 @@ int main(int argc, char **argv) pm.test_lbg_gamma_transform = pm.test_lbg_gamma_sbit = pm.test_lbg_gamma_composition = 0; -# ifdef PNG_WRITE_tRNS_SUPPORTED - else if (strcmp(*argv, "--tRNS") == 0) + else if (strcmp(*argv, "--tRNS") == 0) + { +# ifdef PNG_WRITE_tRNS_SUPPORTED pm.test_tRNS = 1; -# endif +# else + fprintf(stderr, "pngvalid: --tRNS: no write support\n"); + return SKIP; +# endif + } else if (strcmp(*argv, "--notRNS") == 0) pm.test_tRNS = 0; diff --git a/source/libs/libpng/libpng-src/contrib/pngexif/.editorconfig b/source/libs/libpng/libpng-src/contrib/pngexif/.editorconfig new file mode 100644 index 0000000000..ce8fbbfc1b --- /dev/null +++ b/source/libs/libpng/libpng-src/contrib/pngexif/.editorconfig @@ -0,0 +1,11 @@ +# https://editorconfig.org + +root = true + +[*] +charset = utf-8 +indent_style = space +insert_final_newline = true +max_doc_length = 79 +max_line_length = 79 +trim_trailing_whitespace = true diff --git a/source/libs/libpng/libpng-src/contrib/pngexif/.gitignore b/source/libs/libpng/libpng-src/contrib/pngexif/.gitignore new file mode 100644 index 0000000000..016f70a803 --- /dev/null +++ b/source/libs/libpng/libpng-src/contrib/pngexif/.gitignore @@ -0,0 +1,3 @@ +__pycache__ +*.py[co] +*$py.class diff --git a/source/libs/libpng/libpng-src/contrib/pngexif/.pylintrc b/source/libs/libpng/libpng-src/contrib/pngexif/.pylintrc new file mode 100644 index 0000000000..50cf1152da --- /dev/null +++ b/source/libs/libpng/libpng-src/contrib/pngexif/.pylintrc @@ -0,0 +1,8 @@ +[COMPATIBILITY] +disable=consider-using-f-string + +[COMPLEXITY] +disable=too-many-branches,too-many-instance-attributes + +[STYLE] +disable=consider-using-in diff --git a/source/libs/libpng/libpng-src/contrib/pngexif/LICENSE_MIT.txt b/source/libs/libpng/libpng-src/contrib/pngexif/LICENSE_MIT.txt new file mode 100644 index 0000000000..9cf106272a --- /dev/null +++ b/source/libs/libpng/libpng-src/contrib/pngexif/LICENSE_MIT.txt @@ -0,0 +1,19 @@ +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/source/libs/libpng/libpng-src/contrib/pngexif/README.md b/source/libs/libpng/libpng-src/contrib/pngexif/README.md new file mode 100644 index 0000000000..c9ff88b647 --- /dev/null +++ b/source/libs/libpng/libpng-src/contrib/pngexif/README.md @@ -0,0 +1,20 @@ +pngexifinfo +=========== + +Show the EXIF information embedded in a PNG file. + + +Sample usage +------------ + +Show the EXIF info inside a PNG file: + + pngexifinfo /path/to/file.png + +Show the EXIF info inside a raw `.exif` file, using base 16 for the EXIF tags: + + pngexifinfo --hex /path/to/file.exif + +Show the help text: + + pngexifinfo --help diff --git a/source/libs/libpng/libpng-src/contrib/pngexif/bytepack.py b/source/libs/libpng/libpng-src/contrib/pngexif/bytepack.py new file mode 100644 index 0000000000..93af21994a --- /dev/null +++ b/source/libs/libpng/libpng-src/contrib/pngexif/bytepack.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python + +""" +Byte packing and unpacking utilities. + +Copyright (C) 2017-2020 Cosmin Truta. + +Use, modification and distribution are subject to the MIT License. +Please see the accompanying file LICENSE_MIT.txt +""" + +from __future__ import absolute_import, division, print_function + +import struct + + +def unpack_uint32be(buffer, offset=0): + """Unpack an unsigned int from its 32-bit big-endian representation.""" + return struct.unpack(">I", buffer[offset:offset + 4])[0] + + +def unpack_uint32le(buffer, offset=0): + """Unpack an unsigned int from its 32-bit little-endian representation.""" + return struct.unpack("H", buffer[offset:offset + 2])[0] + + +def unpack_uint16le(buffer, offset=0): + """Unpack an unsigned int from its 16-bit little-endian representation.""" + return struct.unpack(" "ascii" + value_or_offset >>= 24 + elif tag_type == 3: + # 3 --> "short" + value_or_offset >>= 16 + else: + # ... FIXME + pass + if count == 0: + raise RuntimeError("unsupported count=0 in tag 0x%x" % tag_id) + if tag_id == _TIFF_EXIF_IFD: + if tag_type != 4: + raise RuntimeError("incorrect tag type for EXIF IFD") + self._exif_ifd_offset = value_or_offset + elif tag_id == _GPS_IFD: + if tag_type != 4: + raise RuntimeError("incorrect tag type for GPS IFD") + self._gps_ifd_offset = value_or_offset + elif tag_id == _INTEROPERABILITY_IFD: + if tag_type != 4: + raise RuntimeError("incorrect tag type for Interop IFD") + self._interoperability_ifd_offset = value_or_offset + yield (tag_id, tag_type, count, value_or_offset) + + def tags(self): + """Yield all TIFF/EXIF tags.""" + if self._verbose: + print("TIFF IFD : 0x%08x" % self._global_ifd_offset) + for tag in self._tags_for_ifd(self._global_ifd_offset): + yield tag + if self._exif_ifd_offset > 0: + if self._verbose: + print("EXIF IFD : 0x%08x" % self._exif_ifd_offset) + for tag in self._tags_for_ifd(self._exif_ifd_offset): + yield tag + if self._gps_ifd_offset > 0: + if self._verbose: + print("GPS IFD : 0x%08x" % self._gps_ifd_offset) + for tag in self._tags_for_ifd(self._gps_ifd_offset): + yield tag + if self._interoperability_ifd_offset > 0: + if self._verbose: + print("Interoperability IFD : 0x%08x" % + self._interoperability_ifd_offset) + for tag in self._tags_for_ifd(self._interoperability_ifd_offset): + yield tag + + def tagid2str(self, tag_id): + """Return an informative string representation of a TIFF tag id.""" + idstr = _TIFF_TAGS.get(tag_id, "[Unknown]") + if self._hex: + idnum = "0x%04x" % tag_id + else: + idnum = "%d" % tag_id + return "%s (%s)" % (idstr, idnum) + + @staticmethod + def tagtype2str(tag_type): + """Return an informative string representation of a TIFF tag type.""" + typestr = _TIFF_TAG_TYPES.get(tag_type, "[unknown]") + return "%d:%s" % (tag_type, typestr) + + def tag2str(self, tag_id, tag_type, count, value_or_offset): + """Return an informative string representation of a TIFF tag tuple.""" + return "%s (type=%s) (count=%d) : 0x%08x" \ + % (self.tagid2str(tag_id), self.tagtype2str(tag_type), count, + value_or_offset) + + def _ui32(self): + """Decode a 32-bit unsigned int found at the current offset; + advance the offset by 4. + """ + if self._offset + 4 > len(self._buffer): + raise RuntimeError("out-of-bounds uint32 access in EXIF") + if self._endian == "MM": + result = unpack_uint32be(self._buffer, self._offset) + else: + result = unpack_uint32le(self._buffer, self._offset) + self._offset += 4 + return result + + def _ui16(self): + """Decode a 16-bit unsigned int found at the current offset; + advance the offset by 2. + """ + if self._offset + 2 > len(self._buffer): + raise RuntimeError("out-of-bounds uint16 access in EXIF") + if self._endian == "MM": + result = unpack_uint16be(self._buffer, self._offset) + else: + result = unpack_uint16le(self._buffer, self._offset) + self._offset += 2 + return result + + def _ui8(self): + """Decode an 8-bit unsigned int found at the current offset; + advance the offset by 1. + """ + if self._offset + 1 > len(self._buffer): + raise RuntimeError("out-of-bounds uint8 access in EXIF") + result = unpack_uint8(self._buffer, self._offset) + self._offset += 1 + return result + + +def print_raw_exif_info(buffer, **kwargs): + """Print the EXIF information found in a raw byte stream.""" + lister = ExifInfo(buffer, **kwargs) + print("EXIF (endian=%s)" % lister.endian()) + for (tag_id, tag_type, count, value_or_offset) in lister.tags(): + print(lister.tag2str(tag_id=tag_id, + tag_type=tag_type, + count=count, + value_or_offset=value_or_offset)) + + +if __name__ == "__main__": + # For testing only. + for arg in sys.argv[1:]: + with open(arg, "rb") as test_stream: + test_buffer = test_stream.read(_READ_DATA_SIZE_MAX) + print_raw_exif_info(test_buffer, hex=True, verbose=True) diff --git a/source/libs/libpng/libpng-src/contrib/pngexif/pngexifinfo b/source/libs/libpng/libpng-src/contrib/pngexif/pngexifinfo new file mode 100644 index 0000000000..16f8eaab14 --- /dev/null +++ b/source/libs/libpng/libpng-src/contrib/pngexif/pngexifinfo @@ -0,0 +1,10 @@ +#!/bin/sh +set -eu + +my_python="$(command -v python3 || command -v python)" || { + echo >&2 "error: program not found: Python interpreter" + exit 127 +} +my_python_flags="-BES" + +exec "$my_python" "$my_python_flags" "$(dirname "$0")/pngexifinfo.py" "$@" diff --git a/source/libs/libpng/libpng-src/contrib/pngexif/pngexifinfo.bat b/source/libs/libpng/libpng-src/contrib/pngexif/pngexifinfo.bat new file mode 100644 index 0000000000..ab8bd358cc --- /dev/null +++ b/source/libs/libpng/libpng-src/contrib/pngexif/pngexifinfo.bat @@ -0,0 +1,4 @@ +@echo off +@setlocal enableextensions + +python.exe -BES %~dp0.\pngexifinfo.py %* diff --git a/source/libs/libpng/libpng-src/contrib/pngexif/pngexifinfo.py b/source/libs/libpng/libpng-src/contrib/pngexif/pngexifinfo.py new file mode 100644 index 0000000000..37d4c4bcd8 --- /dev/null +++ b/source/libs/libpng/libpng-src/contrib/pngexif/pngexifinfo.py @@ -0,0 +1,178 @@ +#!/usr/bin/env python + +""" +Show the PNG EXIF information. + +Copyright (C) 2017-2020 Cosmin Truta. + +Use, modification and distribution are subject to the MIT License. +Please see the accompanying file LICENSE_MIT.txt +""" + +from __future__ import absolute_import, division, print_function + +import argparse +import io +import re +import sys +import zlib + +from bytepack import unpack_uint32be, unpack_uint8 +from exifinfo import print_raw_exif_info + +_PNG_SIGNATURE = b"\x89PNG\x0d\x0a\x1a\x0a" +_PNG_CHUNK_SIZE_MAX = 0x7fffffff +_READ_DATA_SIZE_MAX = 0x3ffff + + +def print_error(msg): + """Print an error message to stderr.""" + sys.stderr.write("%s: error: %s\n" % (sys.argv[0], msg)) + + +def print_debug(msg): + """Print a debug message to stderr.""" + sys.stderr.write("%s: debug: %s\n" % (sys.argv[0], msg)) + + +def _check_png(condition, chunk_sig=None): + """Check a PNG-specific assertion.""" + if condition: + return + if chunk_sig is None: + raise RuntimeError("bad PNG data") + raise RuntimeError("bad PNG data in '%s'" % chunk_sig) + + +def _check_png_crc(data, checksum, chunk_sig): + """Check a CRC32 value inside a PNG stream.""" + if unpack_uint32be(data) == (checksum & 0xffffffff): + return + raise RuntimeError("bad PNG checksum in '%s'" % chunk_sig) + + +def _extract_png_exif(data, **kwargs): + """Extract the EXIF header and data from a PNG chunk.""" + debug = kwargs.get("debug", False) + if unpack_uint8(data, 0) == 0: + if debug: + print_debug("found compressed EXIF, compression method 0") + if (unpack_uint8(data, 1) & 0x0f) == 0x08: + data = zlib.decompress(data[1:]) + elif unpack_uint8(data, 1) == 0 \ + and (unpack_uint8(data, 5) & 0x0f) == 0x08: + if debug: + print_debug("found uncompressed-length EXIF field") + data_len = unpack_uint32be(data, 1) + data = zlib.decompress(data[5:]) + if data_len != len(data): + raise RuntimeError( + "incorrect uncompressed-length field in PNG EXIF") + else: + raise RuntimeError("invalid compression method in PNG EXIF") + if data.startswith(b"MM\x00\x2a") or data.startswith(b"II\x2a\x00"): + return data + raise RuntimeError("invalid TIFF/EXIF header in PNG EXIF") + + +def print_png_exif_info(instream, **kwargs): + """Print the EXIF information found in the given PNG datastream.""" + debug = kwargs.get("debug", False) + has_exif = False + while True: + chunk_hdr = instream.read(8) + _check_png(len(chunk_hdr) == 8) + chunk_len = unpack_uint32be(chunk_hdr, offset=0) + chunk_sig = chunk_hdr[4:8].decode("latin_1", errors="ignore") + _check_png(re.search(r"^[A-Za-z]{4}$", chunk_sig), chunk_sig=chunk_sig) + _check_png(chunk_len < _PNG_CHUNK_SIZE_MAX, chunk_sig=chunk_sig) + if debug: + print_debug("processing chunk: %s" % chunk_sig) + if chunk_len <= _READ_DATA_SIZE_MAX: + # The chunk size does not exceed an arbitrary, reasonable limit. + chunk_data = instream.read(chunk_len) + chunk_crc = instream.read(4) + _check_png(len(chunk_data) == chunk_len and len(chunk_crc) == 4, + chunk_sig=chunk_sig) + checksum = zlib.crc32(chunk_hdr[4:8]) + checksum = zlib.crc32(chunk_data, checksum) + _check_png_crc(chunk_crc, checksum, chunk_sig=chunk_sig) + else: + # The chunk is too big. Skip it. + instream.seek(chunk_len + 4, io.SEEK_CUR) + continue + if chunk_sig == "IEND": + _check_png(chunk_len == 0, chunk_sig=chunk_sig) + break + if chunk_sig.lower() in ["exif", "zxif"] and chunk_len > 8: + has_exif = True + exif_data = _extract_png_exif(chunk_data, **kwargs) + print_raw_exif_info(exif_data, **kwargs) + if not has_exif: + raise RuntimeError("no EXIF data in PNG stream") + + +def print_exif_info(file, **kwargs): + """Print the EXIF information found in the given file.""" + with open(file, "rb") as stream: + header = stream.read(4) + if header == _PNG_SIGNATURE[0:4]: + if stream.read(4) != _PNG_SIGNATURE[4:8]: + raise RuntimeError("corrupted PNG file") + print_png_exif_info(instream=stream, **kwargs) + elif header == b"II\x2a\x00" or header == b"MM\x00\x2a": + data = header + stream.read(_READ_DATA_SIZE_MAX) + print_raw_exif_info(data, **kwargs) + else: + raise RuntimeError("not a PNG file") + + +def main(): + """The main function.""" + parser = argparse.ArgumentParser( + prog="pngexifinfo", + usage="%(prog)s [options] [--] files...", + description="Show the PNG EXIF information.") + parser.add_argument("files", + metavar="file", + nargs="*", + help="a PNG file or a raw EXIF blob") + parser.add_argument("-x", + "--hex", + dest="hex", + action="store_true", + help="show EXIF tags in base 16") + parser.add_argument("-v", + "--verbose", + dest="verbose", + action="store_true", + help="run in verbose mode") + parser.add_argument("--debug", + dest="debug", + action="store_true", + help="run in debug mode") + args = parser.parse_args() + if not args.files: + parser.error("missing file operand") + result = 0 + for file in args.files: + try: + print_exif_info(file, + hex=args.hex, + debug=args.debug, + verbose=args.verbose) + except (IOError, OSError) as err: + print_error(str(err)) + result = 66 # os.EX_NOINPUT + except RuntimeError as err: + print_error("%s: %s" % (file, str(err))) + result = 69 # os.EX_UNAVAILABLE + parser.exit(result) + + +if __name__ == "__main__": + try: + main() + except KeyboardInterrupt: + sys.stderr.write("INTERRUPTED\n") + sys.exit(130) # SIGINT diff --git a/source/libs/libpng/libpng-src/contrib/pngminim/decoder/makefile b/source/libs/libpng/libpng-src/contrib/pngminim/decoder/makefile index 4acf3c1779..bbacea4bb8 100644 --- a/source/libs/libpng/libpng-src/contrib/pngminim/decoder/makefile +++ b/source/libs/libpng/libpng-src/contrib/pngminim/decoder/makefile @@ -54,7 +54,7 @@ ZOBJS = adler32$(O) crc32$(O) \ PNGSRCS=png$(C) pngerror$(C) pngget$(C) pngmem$(C) \ pngread$(C) pngrio$(C) pngrtran$(C) pngrutil$(C) \ pngset$(C) pngtrans$(C) - + # Standard headers PNGH =png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h diff --git a/source/libs/libpng/libpng-src/contrib/tools/pngfix.c b/source/libs/libpng/libpng-src/contrib/tools/pngfix.c index 025e68790e..8d5dc46c22 100644 --- a/source/libs/libpng/libpng-src/contrib/tools/pngfix.c +++ b/source/libs/libpng/libpng-src/contrib/tools/pngfix.c @@ -133,11 +133,6 @@ /* Is it safe to copy? */ #define SAFE_TO_COPY(chunk) (((chunk) & PNG_U32(0,0,0,32)) != 0) -/* Fix ups for builds with limited read support */ -#ifndef PNG_ERROR_TEXT_SUPPORTED -# define png_error(a,b) png_err(a) -#endif - /********************************* UTILITIES **********************************/ /* UNREACHED is a value to cause an assert to fail. Because of the way the * assert macro is written the string "UNREACHED" is produced in the error diff --git a/source/libs/libpng/libpng-src/contrib/visupng/.editorconfig b/source/libs/libpng/libpng-src/contrib/visupng/.editorconfig new file mode 100644 index 0000000000..d946b14461 --- /dev/null +++ b/source/libs/libpng/libpng-src/contrib/visupng/.editorconfig @@ -0,0 +1,22 @@ +# https://editorconfig.org + +root = true + +[*] +charset = utf-8 +end_of_line = unset +indent_style = unset +insert_final_newline = true +max_doc_length = 80 +max_line_length = 100 +trim_trailing_whitespace = true + +[*.rc] +end_of_line = crlf +trim_trailing_whitespace = unset + +[*.ds[pw]] +end_of_line = crlf +max_doc_length = unset +max_line_length = unset +trim_trailing_whitespace = unset diff --git a/source/libs/libpng/libpng-src/libpng-manual.txt b/source/libs/libpng/libpng-src/libpng-manual.txt index eb24ef4831..7988057599 100644 --- a/source/libs/libpng/libpng-src/libpng-manual.txt +++ b/source/libs/libpng/libpng-src/libpng-manual.txt @@ -9,7 +9,7 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng version 1.6.36, December 2018, through 1.6.42 - January 2024 + libpng version 1.6.36, December 2018, through 1.6.43 - February 2024 Updated and distributed by Cosmin Truta Copyright (c) 2018-2024 Cosmin Truta @@ -1178,11 +1178,11 @@ where row_pointers is an array of pointers to the pixel data for each row: If you know your image size and pixel size ahead of time, you can allocate row_pointers prior to calling png_read_png() with - if (height > PNG_UINT_32_MAX/(sizeof (png_byte))) + if (height > PNG_UINT_32_MAX / (sizeof (png_bytep))) png_error(png_ptr, "Image is too tall to process in memory"); - if (width > PNG_UINT_32_MAX/pixel_size) + if (width > PNG_UINT_32_MAX / pixel_size) png_error(png_ptr, "Image is too wide to process in memory"); diff --git a/source/libs/libpng/libpng-src/libpng.3 b/source/libs/libpng/libpng-src/libpng.3 index 57d06f2db6..45e76e4837 100644 --- a/source/libs/libpng/libpng-src/libpng.3 +++ b/source/libs/libpng/libpng-src/libpng.3 @@ -1,6 +1,6 @@ -.TH LIBPNG 3 "January 29, 2024" +.TH LIBPNG 3 "February 23, 2024" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.6.42 +libpng \- Portable Network Graphics (PNG) Reference Library 1.6.43 .SH SYNOPSIS \fB#include \fP @@ -528,7 +528,7 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng version 1.6.36, December 2018, through 1.6.42 - January 2024 + libpng version 1.6.36, December 2018, through 1.6.43 - February 2024 Updated and distributed by Cosmin Truta Copyright (c) 2018-2024 Cosmin Truta @@ -1697,11 +1697,11 @@ where row_pointers is an array of pointers to the pixel data for each row: If you know your image size and pixel size ahead of time, you can allocate row_pointers prior to calling png_read_png() with - if (height > PNG_UINT_32_MAX/(sizeof (png_byte))) + if (height > PNG_UINT_32_MAX / (sizeof (png_bytep))) png_error(png_ptr, "Image is too tall to process in memory"); - if (width > PNG_UINT_32_MAX/pixel_size) + if (width > PNG_UINT_32_MAX / pixel_size) png_error(png_ptr, "Image is too wide to process in memory"); diff --git a/source/libs/libpng/libpng-src/libpngpf.3 b/source/libs/libpng/libpng-src/libpngpf.3 index a469205030..0abec74a2d 100644 --- a/source/libs/libpng/libpng-src/libpngpf.3 +++ b/source/libs/libpng/libpng-src/libpngpf.3 @@ -1,6 +1,6 @@ -.TH LIBPNGPF 3 "January 29, 2024" +.TH LIBPNGPF 3 "February 23, 2024" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.6.42 +libpng \- Portable Network Graphics (PNG) Reference Library 1.6.43 (private functions) .SH SYNOPSIS diff --git a/source/libs/libpng/libpng-src/loongarch/.editorconfig b/source/libs/libpng/libpng-src/loongarch/.editorconfig new file mode 100644 index 0000000000..de2e98ab42 --- /dev/null +++ b/source/libs/libpng/libpng-src/loongarch/.editorconfig @@ -0,0 +1,8 @@ +# https://editorconfig.org + +root = false + +# FIXME +[*.[ch]] +max_doc_length = unset +max_line_length = unset diff --git a/source/libs/libpng/libpng-src/mips/.editorconfig b/source/libs/libpng/libpng-src/mips/.editorconfig new file mode 100644 index 0000000000..de2e98ab42 --- /dev/null +++ b/source/libs/libpng/libpng-src/mips/.editorconfig @@ -0,0 +1,8 @@ +# https://editorconfig.org + +root = false + +# FIXME +[*.[ch]] +max_doc_length = unset +max_line_length = unset diff --git a/source/libs/libpng/libpng-src/png.5 b/source/libs/libpng/libpng-src/png.5 index 1737ba5105..a8a681813f 100644 --- a/source/libs/libpng/libpng-src/png.5 +++ b/source/libs/libpng/libpng-src/png.5 @@ -1,4 +1,4 @@ -.TH PNG 5 "January 29, 2024" +.TH PNG 5 "February 23, 2024" .SH NAME png \- Portable Network Graphics (PNG) format diff --git a/source/libs/libpng/libpng-src/png.c b/source/libs/libpng/libpng-src/png.c index cf9f361070..9ed3157009 100644 --- a/source/libs/libpng/libpng-src/png.c +++ b/source/libs/libpng/libpng-src/png.c @@ -14,7 +14,7 @@ #include "pngpriv.h" /* Generate a compiler error if there is an old png.h in the search path. */ -typedef png_libpng_version_1_6_42 Your_png_h_is_not_version_1_6_42; +typedef png_libpng_version_1_6_43 Your_png_h_is_not_version_1_6_43; /* Tells libpng that we have already handled the first "num_bytes" bytes * of the PNG file signature. If the PNG data is embedded into another @@ -794,7 +794,7 @@ png_get_copyright(png_const_structrp png_ptr) return PNG_STRING_COPYRIGHT #else return PNG_STRING_NEWLINE \ - "libpng version 1.6.42" PNG_STRING_NEWLINE \ + "libpng version 1.6.43" PNG_STRING_NEWLINE \ "Copyright (c) 2018-2024 Cosmin Truta" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \ PNG_STRING_NEWLINE \ @@ -1821,14 +1821,14 @@ png_icc_profile_error(png_const_structrp png_ptr, png_colorspacerp colorspace, } # ifdef PNG_WARNINGS_SUPPORTED else - { - char number[PNG_NUMBER_BUFFER_SIZE]; /* +24 = 114 */ + { + char number[PNG_NUMBER_BUFFER_SIZE]; /* +24 = 114 */ - pos = png_safecat(message, (sizeof message), pos, - png_format_number(number, number+(sizeof number), - PNG_NUMBER_FORMAT_x, value)); - pos = png_safecat(message, (sizeof message), pos, "h: "); /* +2 = 116 */ - } + pos = png_safecat(message, (sizeof message), pos, + png_format_number(number, number+(sizeof number), + PNG_NUMBER_FORMAT_x, value)); + pos = png_safecat(message, (sizeof message), pos, "h: "); /* +2 = 116 */ + } # endif /* The 'reason' is an arbitrary message, allow +79 maximum 195 */ pos = png_safecat(message, (sizeof message), pos, reason); @@ -2511,17 +2511,6 @@ png_colorspace_set_rgb_coefficients(png_structrp png_ptr) #endif /* COLORSPACE */ -#ifdef __GNUC__ -/* This exists solely to work round a warning from GNU C. */ -static int /* PRIVATE */ -png_gt(size_t a, size_t b) -{ - return a > b; -} -#else -# define png_gt(a,b) ((a) > (b)) -#endif - void /* PRIVATE */ png_check_IHDR(png_const_structrp png_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, @@ -2543,8 +2532,16 @@ png_check_IHDR(png_const_structrp png_ptr, error = 1; } - if (png_gt(((width + 7) & (~7U)), - ((PNG_SIZE_MAX + /* The bit mask on the first line below must be at least as big as a + * png_uint_32. "~7U" is not adequate on 16-bit systems because it will + * be an unsigned 16-bit value. Casting to (png_alloc_size_t) makes the + * type of the result at least as bit (in bits) as the RHS of the > operator + * which also avoids a common warning on 64-bit systems that the comparison + * of (png_uint_32) against the constant value on the RHS will always be + * false. + */ + if (((width + 7) & ~(png_alloc_size_t)7) > + (((PNG_SIZE_MAX - 48 /* big_row_buf hack */ - 1) /* filter byte */ / 8) /* 8-byte RGBA pixels */ diff --git a/source/libs/libpng/libpng-src/png.h b/source/libs/libpng/libpng-src/png.h index f537c5bb08..83d3903126 100644 --- a/source/libs/libpng/libpng-src/png.h +++ b/source/libs/libpng/libpng-src/png.h @@ -1,7 +1,7 @@ /* png.h - header file for PNG reference library * - * libpng version 1.6.42 + * libpng version 1.6.43 * * Copyright (c) 2018-2024 Cosmin Truta * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson @@ -15,7 +15,7 @@ * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger * libpng versions 0.97, January 1998, through 1.6.35, July 2018: * Glenn Randers-Pehrson - * libpng versions 1.6.36, December 2018, through 1.6.42, January 2024: + * libpng versions 1.6.36, December 2018, through 1.6.43, February 2024: * Cosmin Truta * See also "Contributing Authors", below. */ @@ -239,7 +239,7 @@ * ... * 1.5.30 15 10530 15.so.15.30[.0] * ... - * 1.6.42 16 10641 16.so.16.41[.0] + * 1.6.43 16 10643 16.so.16.43[.0] * * Henceforth the source version will match the shared-library major and * minor numbers; the shared-library major version number will be used for @@ -255,9 +255,6 @@ * to the info_ptr or png_ptr members through png.h, and the compiled * application is loaded with a different version of the library. * - * DLLNUM will change each time there are forward or backward changes - * in binary compatibility (e.g., when a new feature is added). - * * See libpng.txt or libpng.3 for more information. The PNG specification * is available as a W3C Recommendation and as an ISO/IEC Standard; see * @@ -278,19 +275,21 @@ */ /* Version information for png.h - this should match the version in png.c */ -#define PNG_LIBPNG_VER_STRING "1.6.42" +#define PNG_LIBPNG_VER_STRING "1.6.43" #define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n" -#define PNG_LIBPNG_VER_SONUM 16 -#define PNG_LIBPNG_VER_DLLNUM 16 +/* The versions of shared library builds should stay in sync, going forward */ +#define PNG_LIBPNG_VER_SHAREDLIB 16 +#define PNG_LIBPNG_VER_SONUM PNG_LIBPNG_VER_SHAREDLIB /* [Deprecated] */ +#define PNG_LIBPNG_VER_DLLNUM PNG_LIBPNG_VER_SHAREDLIB /* [Deprecated] */ /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ #define PNG_LIBPNG_VER_MAJOR 1 #define PNG_LIBPNG_VER_MINOR 6 -#define PNG_LIBPNG_VER_RELEASE 41 +#define PNG_LIBPNG_VER_RELEASE 43 /* This should be zero for a public release, or non-zero for a - * development version. [Deprecated] + * development version. */ #define PNG_LIBPNG_VER_BUILD 0 @@ -318,7 +317,7 @@ * From version 1.0.1 it is: * XXYYZZ, where XX=major, YY=minor, ZZ=release */ -#define PNG_LIBPNG_VER 10641 /* 1.6.42 */ +#define PNG_LIBPNG_VER 10643 /* 1.6.43 */ /* Library configuration: these options cannot be changed after * the library has been built. @@ -428,7 +427,7 @@ extern "C" { /* This triggers a compiler error in png.c, if png.c and png.h * do not agree upon the version number. */ -typedef char* png_libpng_version_1_6_42; +typedef char* png_libpng_version_1_6_43; /* Basic control structions. Read libpng-manual.txt or libpng.3 for more info. * diff --git a/source/libs/libpng/libpng-src/pngconf.h b/source/libs/libpng/libpng-src/pngconf.h index 99851f4f9c..000d7b1a8a 100644 --- a/source/libs/libpng/libpng-src/pngconf.h +++ b/source/libs/libpng/libpng-src/pngconf.h @@ -1,7 +1,7 @@ /* pngconf.h - machine-configurable file for libpng * - * libpng version 1.6.42 + * libpng version 1.6.43 * * Copyright (c) 2018-2024 Cosmin Truta * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson diff --git a/source/libs/libpng/libpng-src/pnglibconf.h b/source/libs/libpng/libpng-src/pnglibconf.h index 330453c139..83f09fbe77 100644 --- a/source/libs/libpng/libpng-src/pnglibconf.h +++ b/source/libs/libpng/libpng-src/pnglibconf.h @@ -1,6 +1,6 @@ /* pnglibconf.h - library build configuration */ -/* libpng version 1.6.42 */ +/* libpng version 1.6.43 */ /* Copyright (c) 2018-2024 Cosmin Truta */ /* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */ diff --git a/source/libs/libpng/libpng-src/pngpread.c b/source/libs/libpng/libpng-src/pngpread.c index be640f77a9..ffab19c08c 100644 --- a/source/libs/libpng/libpng-src/pngpread.c +++ b/source/libs/libpng/libpng-src/pngpread.c @@ -294,6 +294,14 @@ png_push_read_chunk(png_structrp png_ptr, png_inforp info_ptr) png_handle_cHRM(png_ptr, info_ptr, png_ptr->push_length); } +#endif +#ifdef PNG_READ_eXIf_SUPPORTED + else if (png_ptr->chunk_name == png_eXIf) + { + PNG_PUSH_SAVE_BUFFER_IF_FULL + png_handle_eXIf(png_ptr, info_ptr, png_ptr->push_length); + } + #endif #ifdef PNG_READ_sRGB_SUPPORTED else if (chunk_name == png_sRGB) diff --git a/source/libs/libpng/libpng-src/pngread.c b/source/libs/libpng/libpng-src/pngread.c index 008a41856b..07a39df6e2 100644 --- a/source/libs/libpng/libpng-src/pngread.c +++ b/source/libs/libpng/libpng-src/pngread.c @@ -568,7 +568,11 @@ png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row) #endif #ifdef PNG_READ_TRANSFORMS_SUPPORTED - if (png_ptr->transformations || png_ptr->num_palette_max >= 0) + if (png_ptr->transformations +# ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED + || png_ptr->num_palette_max >= 0 +# endif + ) png_do_read_transformations(png_ptr, &row_info); #endif diff --git a/source/libs/libpng/libpng-src/pngrtran.c b/source/libs/libpng/libpng-src/pngrtran.c index 16474741aa..1526123e02 100644 --- a/source/libs/libpng/libpng-src/pngrtran.c +++ b/source/libs/libpng/libpng-src/pngrtran.c @@ -297,14 +297,13 @@ png_set_alpha_mode_fixed(png_structrp png_ptr, int mode, output_gamma = translate_gamma_flags(png_ptr, output_gamma, 1/*screen*/); - /* Validate the value to ensure it is in a reasonable range. The value + /* Validate the value to ensure it is in a reasonable range. The value * is expected to be 1 or greater, but this range test allows for some - * viewing correction values. The intent is to weed out users of this API - * who use the inverse of the gamma value accidentally! Since some of these - * values are reasonable this may have to be changed: + * viewing correction values. The intent is to weed out the API users + * who might use the inverse of the gamma value accidentally! * - * 1.6.x: changed from 0.07..3 to 0.01..100 (to accommodate the optimal 16-bit - * gamma of 36, and its reciprocal.) + * In libpng 1.6.0, we changed from 0.07..3 to 0.01..100, to accommodate + * the optimal 16-bit gamma of 36 and its reciprocal. */ if (output_gamma < 1000 || output_gamma > 10000000) png_error(png_ptr, "output gamma out of expected range"); @@ -441,7 +440,7 @@ png_set_quantize(png_structrp png_ptr, png_colorp palette, int i; png_ptr->quantize_index = (png_bytep)png_malloc(png_ptr, - (png_alloc_size_t)((png_uint_32)num_palette * (sizeof (png_byte)))); + (png_alloc_size_t)num_palette); for (i = 0; i < num_palette; i++) png_ptr->quantize_index[i] = (png_byte)i; } @@ -458,7 +457,7 @@ png_set_quantize(png_structrp png_ptr, png_colorp palette, /* Initialize an array to sort colors */ png_ptr->quantize_sort = (png_bytep)png_malloc(png_ptr, - (png_alloc_size_t)((png_uint_32)num_palette * (sizeof (png_byte)))); + (png_alloc_size_t)num_palette); /* Initialize the quantize_sort array */ for (i = 0; i < num_palette; i++) @@ -592,11 +591,9 @@ png_set_quantize(png_structrp png_ptr, png_colorp palette, /* Initialize palette index arrays */ png_ptr->index_to_palette = (png_bytep)png_malloc(png_ptr, - (png_alloc_size_t)((png_uint_32)num_palette * - (sizeof (png_byte)))); + (png_alloc_size_t)num_palette); png_ptr->palette_to_index = (png_bytep)png_malloc(png_ptr, - (png_alloc_size_t)((png_uint_32)num_palette * - (sizeof (png_byte)))); + (png_alloc_size_t)num_palette); /* Initialize the sort array */ for (i = 0; i < num_palette; i++) @@ -761,12 +758,11 @@ png_set_quantize(png_structrp png_ptr, png_colorp palette, size_t num_entries = ((size_t)1 << total_bits); png_ptr->palette_lookup = (png_bytep)png_calloc(png_ptr, - (png_alloc_size_t)(num_entries * (sizeof (png_byte)))); + (png_alloc_size_t)(num_entries)); - distance = (png_bytep)png_malloc(png_ptr, (png_alloc_size_t)(num_entries * - (sizeof (png_byte)))); + distance = (png_bytep)png_malloc(png_ptr, (png_alloc_size_t)num_entries); - memset(distance, 0xff, num_entries * (sizeof (png_byte))); + memset(distance, 0xff, num_entries); for (i = 0; i < num_palette; i++) { diff --git a/source/libs/libpng/libpng-src/pngtest.c b/source/libs/libpng/libpng-src/pngtest.c index d967501024..45ef66a701 100644 --- a/source/libs/libpng/libpng-src/pngtest.c +++ b/source/libs/libpng/libpng-src/pngtest.c @@ -1,5 +1,5 @@ -/* pngtest.c - a simple test program to test libpng +/* pngtest.c - a test program for libpng * * Copyright (c) 2018-2024 Cosmin Truta * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson @@ -37,73 +37,91 @@ #include #include -/* Defined so I can write to a file on gui/windowing platforms */ -/* #define STDERR stderr */ -#define STDERR stdout /* For DOS */ +#ifdef PNG_ZLIB_HEADER +# include PNG_ZLIB_HEADER /* defined by pnglibconf.h from 1.7 */ +#else +# include +#endif #include "png.h" -/* Known chunks that exist in pngtest.png must be supported or pngtest will fail - * simply as a result of re-ordering them. This may be fixed in 1.7 +/* Generate a compiler error if there is an old png.h in the search path. */ +typedef png_libpng_version_1_6_43 Your_png_h_is_not_version_1_6_43; + +/* Ensure that all version numbers in png.h are consistent with one another. */ +#if (PNG_LIBPNG_VER != PNG_LIBPNG_VER_MAJOR * 10000 + \ + PNG_LIBPNG_VER_MINOR * 100 + \ + PNG_LIBPNG_VER_RELEASE) || \ + (PNG_LIBPNG_VER_SHAREDLIB != PNG_LIBPNG_VER_MAJOR * 10 + \ + PNG_LIBPNG_VER_MINOR) || \ + (PNG_LIBPNG_VER_SHAREDLIB != PNG_LIBPNG_VER_SONUM) || \ + (PNG_LIBPNG_VER_SHAREDLIB != PNG_LIBPNG_VER_DLLNUM) +# error "Inconsistent version numbers in png.h" +#endif + +/* In version 1.6.1, we added support for the configure test harness, which + * uses 77 to indicate a skipped test. On the other hand, in cmake build tests, + * we still need to succeed on a skipped test, so: + */ +#if defined(HAVE_CONFIG_H) +# define SKIP 77 +#else +# define SKIP 0 +#endif + +/* Known chunks that exist in pngtest.png must be supported, or pngtest will + * fail simply as a result of re-ordering them. This may be fixed in the next + * generation of libpng. * * pngtest allocates a single row buffer for each row and overwrites it, * therefore if the write side doesn't support the writing of interlaced images * nothing can be done for an interlaced image (and the code below will fail * horribly trying to write extra data after writing garbage). */ -#if defined PNG_READ_SUPPORTED && /* else nothing can be done */\ - defined PNG_READ_bKGD_SUPPORTED &&\ - defined PNG_READ_cHRM_SUPPORTED &&\ - defined PNG_READ_gAMA_SUPPORTED &&\ - defined PNG_READ_oFFs_SUPPORTED &&\ - defined PNG_READ_pCAL_SUPPORTED &&\ - defined PNG_READ_pHYs_SUPPORTED &&\ - defined PNG_READ_sBIT_SUPPORTED &&\ - defined PNG_READ_sCAL_SUPPORTED &&\ - defined PNG_READ_sRGB_SUPPORTED &&\ - defined PNG_READ_sPLT_SUPPORTED &&\ - defined PNG_READ_tEXt_SUPPORTED &&\ - defined PNG_READ_tIME_SUPPORTED &&\ - defined PNG_READ_zTXt_SUPPORTED &&\ - (defined PNG_WRITE_INTERLACING_SUPPORTED || PNG_LIBPNG_VER >= 10700) - -#ifdef PNG_ZLIB_HEADER -# include PNG_ZLIB_HEADER /* defined by pnglibconf.h from 1.7 */ -#else -# include "zlib.h" -#endif +#if defined PNG_READ_SUPPORTED && /* else nothing can be done */ \ + defined PNG_READ_bKGD_SUPPORTED && \ + defined PNG_READ_cHRM_SUPPORTED && \ + defined PNG_READ_gAMA_SUPPORTED && \ + defined PNG_READ_oFFs_SUPPORTED && \ + defined PNG_READ_pCAL_SUPPORTED && \ + defined PNG_READ_pHYs_SUPPORTED && \ + defined PNG_READ_sBIT_SUPPORTED && \ + defined PNG_READ_sCAL_SUPPORTED && \ + defined PNG_READ_sRGB_SUPPORTED && \ + defined PNG_READ_sPLT_SUPPORTED && \ + defined PNG_READ_tEXt_SUPPORTED && \ + defined PNG_READ_tIME_SUPPORTED && \ + defined PNG_READ_zTXt_SUPPORTED && \ + (defined PNG_WRITE_INTERLACING_SUPPORTED || PNG_LIBPNG_VER >= 10700) /* Copied from pngpriv.h but only used in error messages below. */ #ifndef PNG_ZBUF_SIZE # define PNG_ZBUF_SIZE 8192 #endif -#define FCLOSE(file) fclose(file) #ifndef PNG_STDIO_SUPPORTED -typedef FILE * png_FILE_p; +typedef FILE * png_FILE_p; #endif -/* Makes pngtest verbose so we can find problems. */ +/* This hack was introduced for historical reasons, and we are + * still keeping it in libpng-1.6.x for compatibility reasons. + */ +#define STDERR stdout + #ifndef PNG_DEBUG # define PNG_DEBUG 0 #endif #if PNG_DEBUG > 1 -# define pngtest_debug(m) ((void)fprintf(stderr, m "\n")) -# define pngtest_debug1(m,p1) ((void)fprintf(stderr, m "\n", p1)) -# define pngtest_debug2(m,p1,p2) ((void)fprintf(stderr, m "\n", p1, p2)) -#else -# define pngtest_debug(m) ((void)0) -# define pngtest_debug1(m,p1) ((void)0) -# define pngtest_debug2(m,p1,p2) ((void)0) -#endif - -#if !PNG_DEBUG -# define SINGLE_ROWBUF_ALLOC /* Makes buffer overruns easier to nail */ -#endif - -#ifndef PNG_UNUSED -# define PNG_UNUSED(param) (void)param; +# define pngtest_debug(m) ((void)fprintf(stderr, m "\n")) +# define pngtest_debug1(m, p1) ((void)fprintf(stderr, m "\n", p1)) +# define pngtest_debug2(m, p1, p2) ((void)fprintf(stderr, m "\n", p1, p2)) +#elif PNG_DEBUG == 0 || PNG_DEBUG == 1 +# define pngtest_debug(m) ((void)0) +# define pngtest_debug1(m, p1) ((void)0) +# define pngtest_debug2(m, p1, p2) ((void)0) +#else /* PNG_DEBUG < 0 */ +# error "Bad PNG_DEBUG value" #endif /* Turn on CPU timing @@ -120,25 +138,11 @@ static float t_start, t_stop, t_decode, t_encode, t_misc; #endif #ifdef PNG_TIME_RFC1123_SUPPORTED -#define PNG_tIME_STRING_LENGTH 29 static int tIME_chunk_present = 0; -static char tIME_string[PNG_tIME_STRING_LENGTH] = "tIME chunk is not present"; - -#if PNG_LIBPNG_VER < 10619 -#define png_convert_to_rfc1123_buffer(ts, t) tIME_to_str(read_ptr, ts, t) - -static int -tIME_to_str(png_structp png_ptr, png_charp ts, png_const_timep t) -{ - png_const_charp str = png_convert_to_rfc1123(png_ptr, t); - - if (str == NULL) - return 0; - - strcpy(ts, str); - return 1; -} -#endif /* older libpng */ +static char tIME_string[29] = "tIME chunk is not present"; +/* This use case is deprecated. + * See the declaration of png_convert_to_rfc1123_buffer for more details. + */ #endif static int verbose = 0; @@ -149,22 +153,6 @@ static int unsupported_chunks = 0; /* chunk unsupported by libpng in input */ static int error_count = 0; /* count calls to png_error */ static int warning_count = 0; /* count calls to png_warning */ -/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */ -#ifndef png_jmpbuf -# define png_jmpbuf(png_ptr) png_ptr->jmpbuf -#endif - -/* Defines for unknown chunk handling if required. */ -#ifndef PNG_HANDLE_CHUNK_ALWAYS -# define PNG_HANDLE_CHUNK_ALWAYS 3 -#endif -#ifndef PNG_HANDLE_CHUNK_IF_SAFE -# define PNG_HANDLE_CHUNK_IF_SAFE 2 -#endif - -/* Utility to save typing/errors, the argument must be a name */ -#define MEMZERO(var) ((void)memset(&var, 0, sizeof var)) - /* Example of using row callbacks to make a simple progress meter */ static int status_pass = 1; static int status_dots_requested = 0; @@ -173,8 +161,13 @@ static int status_dots = 1; static void PNGCBAPI read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) { - if (png_ptr == NULL || row_number > PNG_UINT_31_MAX) - return; + /* The callback should always receive correct parameters. */ + if (png_ptr == NULL) + png_error(png_ptr, "read_row_callback: bad png_ptr"); + if (row_number > PNG_UINT_31_MAX) + png_error(png_ptr, "read_row_callback: bad row number"); + if (pass < 0 || pass > 7) + png_error(png_ptr, "read_row_callback: bad pass"); if (status_pass != pass) { @@ -188,7 +181,7 @@ read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) if (status_dots == 0) { fprintf(stdout, "\n "); - status_dots=30; + status_dots = 30; } fprintf(stdout, "r"); @@ -198,8 +191,13 @@ read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) static void PNGCBAPI write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) { - if (png_ptr == NULL || row_number > PNG_UINT_31_MAX || pass > 7) - return; + /* The callback should always receive correct parameters. */ + if (png_ptr == NULL) + png_error(png_ptr, "write_row_callback: bad png_ptr"); + if (row_number > PNG_UINT_31_MAX) + png_error(png_ptr, "write_row_callback: bad row number"); + if (pass < 0 || pass > 7) + png_error(png_ptr, "write_row_callback: bad pass"); fprintf(stdout, "w"); } @@ -212,9 +210,13 @@ write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) static void PNGCBAPI read_user_callback(png_structp png_ptr, png_row_infop row_info, png_bytep data) { - PNG_UNUSED(png_ptr) - PNG_UNUSED(row_info) - PNG_UNUSED(data) + /* The callback should always receive correct parameters. */ + if (png_ptr == NULL) + png_error(png_ptr, "read_user_callback: bad png_ptr"); + if (row_info == NULL) + png_error(png_ptr, "read_user_callback: bad row info"); + if (data == NULL) + png_error(png_ptr, "read_user_callback: bad data"); } #endif @@ -229,8 +231,14 @@ static void PNGCBAPI count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data) { png_bytep dp = data; + + /* The callback should always receive correct parameters. */ if (png_ptr == NULL) - return; + png_error(png_ptr, "count_zero_samples: bad png_ptr"); + if (row_info == NULL) + png_error(png_ptr, "count_zero_samples: bad row info"); + if (data == NULL) + png_error(png_ptr, "count_zero_samples: bad data"); /* Contents of row_info: * png_uint_32 width width of row @@ -248,7 +256,7 @@ count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data) int pos = 0; png_uint_32 n, nstop; - for (n = 0, nstop=row_info->width; nwidth; n < nstop; n++) { if (row_info->bit_depth == 1) { @@ -294,7 +302,7 @@ count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data) { if ((*dp | *(dp+1)) == 0) zero_samples++; - dp+=2; + dp += 2; } } } @@ -306,7 +314,7 @@ count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data) if (row_info->color_type > 3) color_channels--; - for (n = 0, nstop=row_info->width; nwidth; n < nstop; n++) { for (channel = 0; channel < color_channels; channel++) { @@ -319,7 +327,7 @@ count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data) if ((*dp | *(dp+1)) == 0) zero_samples++; - dp+=2; + dp += 2; } } if (row_info->color_type > 3) @@ -345,9 +353,6 @@ count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data) #ifdef PNG_IO_STATE_SUPPORTED void -pngtest_check_io_state(png_structp png_ptr, size_t data_length, - png_uint_32 io_op); -void pngtest_check_io_state(png_structp png_ptr, size_t data_length, png_uint_32 io_op) { @@ -361,7 +366,7 @@ pngtest_check_io_state(png_structp png_ptr, size_t data_length, /* Check if the buffer size specific to the current location * (file signature / header / data / crc) is as expected. */ - switch (io_state & PNG_IO_MASK_LOC) + switch ((io_state & PNG_IO_MASK_LOC) != 0) { case PNG_IO_SIGNATURE: if (data_length > 8) @@ -391,19 +396,18 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, size_t length) size_t check = 0; png_voidp io_ptr; + if (png_ptr == NULL) + png_error(png_ptr, "pngtest_read_data: bad png_ptr"); + /* fread() returns 0 on error, so it is OK to store this in a size_t * instead of an int, which is what fread() actually returns. */ io_ptr = png_get_io_ptr(png_ptr); if (io_ptr != NULL) - { check = fread(data, 1, length, (png_FILE_p)io_ptr); - } if (check != length) - { png_error(png_ptr, "Read Error"); - } #ifdef PNG_IO_STATE_SUPPORTED pngtest_check_io_state(png_ptr, length, PNG_IO_READING); @@ -414,8 +418,10 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, size_t length) static void PNGCBAPI pngtest_flush(png_structp png_ptr) { + if (png_ptr == NULL) + png_error(png_ptr, "pngtest_flush: bad png_ptr"); + /* Do nothing; fflush() is said to be just a waste of energy. */ - PNG_UNUSED(png_ptr) /* Stifle compiler warning */ } #endif @@ -429,12 +435,13 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, size_t length) { size_t check; + if (png_ptr == NULL) + png_error(png_ptr, "pngtest_write_data: bad png_ptr"); + check = fwrite(data, 1, length, (png_FILE_p)png_get_io_ptr(png_ptr)); if (check != length) - { png_error(png_ptr, "Write Error"); - } #ifdef PNG_IO_STATE_SUPPORTED pngtest_check_io_state(png_ptr, length, PNG_IO_WRITING); @@ -537,7 +544,7 @@ PNGCBAPI png_debug_malloc(png_structp png_ptr, png_alloc_size_t size) pinfo->size = size; current_allocation += size; total_allocation += size; - num_allocations ++; + ++num_allocations; if (current_allocation > maximum_allocation) maximum_allocation = current_allocation; @@ -635,15 +642,14 @@ png_debug_free(png_structp png_ptr, png_voidp ptr) /* (sTER is a public chunk not yet known by libpng. vpAg is a private chunk used in ImageMagick to store "virtual page" size). */ -static struct user_chunk_data +typedef struct user_chunk_info_def { png_const_infop info_ptr; png_uint_32 vpAg_width, vpAg_height; png_byte vpAg_units; png_byte sTER_mode; int location[2]; -} -user_chunk_data; +} user_chunk_info; /* Used for location and order; zero means nothing. */ #define have_sTER 0x01 @@ -653,37 +659,38 @@ user_chunk_data; #define after_IDAT 0x40 static void -init_callback_info(png_const_infop info_ptr) +init_user_chunk_info(png_const_infop info_ptr, user_chunk_info *chunk_data) { - MEMZERO(user_chunk_data); - user_chunk_data.info_ptr = info_ptr; + memset(chunk_data, 0, sizeof(*chunk_data)); + chunk_data->info_ptr = info_ptr; } static int -set_location(png_structp png_ptr, struct user_chunk_data *data, int what) +set_chunk_location(png_structp png_ptr, user_chunk_info *chunk_data, int what) { int location; - if ((data->location[0] & what) != 0 || (data->location[1] & what) != 0) - return 0; /* already have one of these */ + if ((chunk_data->location[0] & what) != 0 || + (chunk_data->location[1] & what) != 0) + return 0; /* we already have one of these */ /* Find where we are (the code below zeroes info_ptr to indicate that the * chunks before the first IDAT have been read.) */ - if (data->info_ptr == NULL) /* after IDAT */ + if (chunk_data->info_ptr == NULL) /* after IDAT */ location = what | after_IDAT; - else if (png_get_valid(png_ptr, data->info_ptr, PNG_INFO_PLTE) != 0) + else if (png_get_valid(png_ptr, chunk_data->info_ptr, PNG_INFO_PLTE) != 0) location = what | before_IDAT; else location = what | before_PLTE; - if (data->location[0] == 0) - data->location[0] = location; + if (chunk_data->location[0] == 0) + chunk_data->location[0] = location; else - data->location[1] = location; + chunk_data->location[1] = location; return 1; /* handled */ } @@ -691,11 +698,11 @@ set_location(png_structp png_ptr, struct user_chunk_data *data, int what) static int PNGCBAPI read_user_chunk_callback(png_struct *png_ptr, png_unknown_chunkp chunk) { - struct user_chunk_data *my_user_chunk_data = - (struct user_chunk_data*)png_get_user_chunk_ptr(png_ptr); + user_chunk_info *my_user_chunk_data = + (user_chunk_info*)png_get_user_chunk_ptr(png_ptr); if (my_user_chunk_data == NULL) - png_error(png_ptr, "lost user chunk pointer"); + png_error(png_ptr, "lost pointer to user chunk data"); /* Return one of the following: * return -n; chunk had an error @@ -720,9 +727,9 @@ read_user_chunk_callback(png_struct *png_ptr, png_unknown_chunkp chunk) if (chunk->data[0] != 0 && chunk->data[0] != 1) return -1; /* Invalid mode */ - if (set_location(png_ptr, my_user_chunk_data, have_sTER) != 0) + if (set_chunk_location(png_ptr, my_user_chunk_data, have_sTER) != 0) { - my_user_chunk_data->sTER_mode=chunk->data[0]; + my_user_chunk_data->sTER_mode = chunk->data[0]; return 1; } @@ -739,7 +746,7 @@ read_user_chunk_callback(png_struct *png_ptr, png_unknown_chunkp chunk) if (chunk->size != 9) return -1; /* Error return */ - if (set_location(png_ptr, my_user_chunk_data, have_vpAg) == 0) + if (set_chunk_location(png_ptr, my_user_chunk_data, have_vpAg) == 0) return 0; /* duplicate vpAg */ my_user_chunk_data->vpAg_width = png_get_uint_31(png_ptr, chunk->data); @@ -751,18 +758,18 @@ read_user_chunk_callback(png_struct *png_ptr, png_unknown_chunkp chunk) #ifdef PNG_WRITE_SUPPORTED static void -write_sTER_chunk(png_structp write_ptr) +write_sTER_chunk(png_structp write_ptr, user_chunk_info *data) { png_byte sTER[5] = {115, 84, 69, 82, '\0'}; if (verbose != 0) - fprintf(STDERR, "\n stereo mode = %d\n", user_chunk_data.sTER_mode); + fprintf(STDERR, "\n stereo mode = %d\n", data->sTER_mode); - png_write_chunk(write_ptr, sTER, &user_chunk_data.sTER_mode, 1); + png_write_chunk(write_ptr, sTER, &data->sTER_mode, 1); } static void -write_vpAg_chunk(png_structp write_ptr) +write_vpAg_chunk(png_structp write_ptr, user_chunk_info *data) { png_byte vpAg[5] = {118, 112, 65, 103, '\0'}; @@ -770,18 +777,18 @@ write_vpAg_chunk(png_structp write_ptr) if (verbose != 0) fprintf(STDERR, " vpAg = %lu x %lu, units = %d\n", - (unsigned long)user_chunk_data.vpAg_width, - (unsigned long)user_chunk_data.vpAg_height, - user_chunk_data.vpAg_units); + (unsigned long)data->vpAg_width, + (unsigned long)data->vpAg_height, + data->vpAg_units); - png_save_uint_32(vpag_chunk_data, user_chunk_data.vpAg_width); - png_save_uint_32(vpag_chunk_data + 4, user_chunk_data.vpAg_height); - vpag_chunk_data[8] = user_chunk_data.vpAg_units; + png_save_uint_32(vpag_chunk_data, data->vpAg_width); + png_save_uint_32(vpag_chunk_data + 4, data->vpAg_height); + vpag_chunk_data[8] = data->vpAg_units; png_write_chunk(write_ptr, vpAg, vpag_chunk_data, 9); } static void -write_chunks(png_structp write_ptr, int location) +write_chunks(png_structp write_ptr, user_chunk_info *data, int location) { int i; @@ -791,13 +798,13 @@ write_chunks(png_structp write_ptr, int location) * vpAg chunks, resulting in an error later. This is not worth worrying * about - the chunks should not be duplicated! */ - for (i=0; i<2; ++i) + for (i = 0; i < 2; ++i) { - if (user_chunk_data.location[i] == (location | have_sTER)) - write_sTER_chunk(write_ptr); + if (data->location[i] == (location | have_sTER)) + write_sTER_chunk(write_ptr, data); - else if (user_chunk_data.location[i] == (location | have_vpAg)) - write_vpAg_chunk(write_ptr); + else if (data->location[i] == (location | have_vpAg)) + write_vpAg_chunk(write_ptr, data); } } #endif /* WRITE */ @@ -872,9 +879,9 @@ test_one_file(const char *inname, const char *outname) png_bytep row_buf; png_uint_32 y; png_uint_32 width, height; - volatile int num_passes; - int pass; int bit_depth, color_type; + user_chunk_info my_user_chunk_data; + int pass, num_passes; row_buf = NULL; error_parameters.file_name = inname; @@ -888,7 +895,7 @@ test_one_file(const char *inname, const char *outname) if ((fpout = fopen(outname, "wb")) == NULL) { fprintf(STDERR, "Could not open output file %s\n", outname); - FCLOSE(fpin); + fclose(fpin); return 1; } @@ -925,8 +932,8 @@ test_one_file(const char *inname, const char *outname) #endif #ifdef PNG_READ_USER_CHUNKS_SUPPORTED - init_callback_info(read_info_ptr); - png_set_read_user_chunk_fn(read_ptr, &user_chunk_data, + init_user_chunk_info(read_info_ptr, &my_user_chunk_data); + png_set_read_user_chunk_fn(read_ptr, &my_user_chunk_data, read_user_chunk_callback); #endif @@ -946,8 +953,8 @@ test_one_file(const char *inname, const char *outname) png_destroy_info_struct(write_ptr, &write_end_info_ptr); png_destroy_write_struct(&write_ptr, &write_info_ptr); #endif - FCLOSE(fpin); - FCLOSE(fpout); + fclose(fpin); + fclose(fpout); return 1; } @@ -966,8 +973,8 @@ test_one_file(const char *inname, const char *outname) fprintf(STDERR, " destroying write structs\n"); png_destroy_info_struct(write_ptr, &write_end_info_ptr); png_destroy_write_struct(&write_ptr, &write_info_ptr); - FCLOSE(fpin); - FCLOSE(fpout); + fclose(fpin); + fclose(fpout); return 1; } #endif @@ -1053,13 +1060,13 @@ test_one_file(const char *inname, const char *outname) #endif #ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED - /* Preserve all the unknown chunks, if possible. If this is disabled then, + /* Preserve all the unknown chunks, if possible. If this is disabled, then * even if the png_{get,set}_unknown_chunks stuff is enabled, we can't use * libpng to *save* the unknown chunks on read (because we can't switch the * save option on!) * - * Notice that if SET_UNKNOWN_CHUNKS is *not* supported read will discard all - * unknown chunks and write will write them all. + * Notice that if SET_UNKNOWN_CHUNKS is *not* supported, the reader will + * discard all unknown chunks, and the writer will write them all. */ #ifdef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED png_set_keep_unknown_chunks(read_ptr, PNG_HANDLE_CHUNK_ALWAYS, @@ -1080,7 +1087,7 @@ test_one_file(const char *inname, const char *outname) * remove the info_ptr (which is only used to determine position relative to * PLTE) here to indicate that we are after the IDAT. */ - user_chunk_data.info_ptr = NULL; + my_user_chunk_data.info_ptr = NULL; #endif pngtest_debug("Transferring info struct"); @@ -1196,14 +1203,12 @@ test_one_file(const char *inname, const char *outname) png_color_16p background; if (png_get_bKGD(read_ptr, read_info_ptr, &background) != 0) - { png_set_bKGD(write_ptr, write_info_ptr, background); - } } #endif #ifdef PNG_READ_eXIf_SUPPORTED { - png_bytep exif=NULL; + png_bytep exif = NULL; png_uint_32 exif_length; if (png_get_eXIf_1(read_ptr, read_info_ptr, &exif_length, &exif) != 0) @@ -1232,9 +1237,7 @@ test_one_file(const char *inname, const char *outname) if (png_get_oFFs(read_ptr, read_info_ptr, &offset_x, &offset_y, &unit_type) != 0) - { png_set_oFFs(write_ptr, write_info_ptr, offset_x, offset_y, unit_type); - } } #endif #ifdef PNG_pCAL_SUPPORTED @@ -1246,10 +1249,8 @@ test_one_file(const char *inname, const char *outname) if (png_get_pCAL(read_ptr, read_info_ptr, &purpose, &X0, &X1, &type, &nparams, &units, ¶ms) != 0) - { png_set_pCAL(write_ptr, write_info_ptr, purpose, X0, X1, type, nparams, units, params); - } } #endif #ifdef PNG_pHYs_SUPPORTED @@ -1279,9 +1280,7 @@ test_one_file(const char *inname, const char *outname) if (png_get_sCAL(read_ptr, read_info_ptr, &unit, &scal_width, &scal_height) != 0) - { png_set_sCAL(write_ptr, write_info_ptr, unit, scal_width, scal_height); - } } #else #ifdef PNG_FIXED_POINT_SUPPORTED @@ -1304,11 +1303,9 @@ test_one_file(const char *inname, const char *outname) { png_sPLT_tp entries; - int num_entries = (int) png_get_sPLT(read_ptr, read_info_ptr, &entries); - if (num_entries) - { + int num_entries = png_get_sPLT(read_ptr, read_info_ptr, &entries); + if (num_entries != 0) png_set_sPLT(write_ptr, write_info_ptr, entries, num_entries); - } } #endif @@ -1328,7 +1325,7 @@ test_one_file(const char *inname, const char *outname) int i; fprintf(STDERR,"\n"); - for (i=0; i lasto) { - print "highest symbol ordinal in png.h,", symbolo ", exceeds last ordinal from png.h", lasto + print "highest symbol ordinal in png.h,", + symbolo ", exceeds last ordinal from png.h", lasto err = 1 } if (mastero > lasto) { - print "highest symbol ordinal in", master ",", mastero ", exceeds last ordinal from png.h", lasto + print "highest symbol ordinal in", master ",", + mastero ", exceeds last ordinal from png.h", lasto err = 1 } unexported=0 @@ -149,17 +151,21 @@ END{ unexported = 0 } if (symbol[o] != "" && removed[o] != "") { - print "png.h: symbol", o, "both exported as '" symbol[o] "' and removed as '" removed[o] "'" + print "png.h: symbol", o, + "both exported as '" symbol[o] "' and removed as '" removed[o] "'" err = 1 } else if (symbol[o] != official[o]) { # either the symbol is missing somewhere or it changed err = 1 if (symbol[o] == "") - print "png.h: symbol", o, "is exported as '" official[o] "' in", master + print "png.h: symbol", o, + "is exported as '" official[o] "' in", master else if (official[o] == "") - print "png.h: exported symbol", o, "'" symbol[o] "' not present in", master + print "png.h: exported symbol", o, + "'" symbol[o] "' not present in", master else - print "png.h: exported symbol", o, "'" symbol[o] "' exists as '" official[o] "' in", master + print "png.h: exported symbol", o, + "'" symbol[o] "' exists as '" official[o] "' in", master } # Finally generate symbols.new diff --git a/source/libs/libpng/libpng-src/scripts/cmake/AUTHORS.md b/source/libs/libpng/libpng-src/scripts/cmake/AUTHORS.md index 1c1173ab3f..641dde265f 100644 --- a/source/libs/libpng/libpng-src/scripts/cmake/AUTHORS.md +++ b/source/libs/libpng/libpng-src/scripts/cmake/AUTHORS.md @@ -5,8 +5,12 @@ Author List ----------- * Alex Gaynor + * Alexey Petruchik * Andreas Franek + * Andrew Hundt * B. Scott Michel + * Benjamin Buch + * Bernd Kuhls * Cameron Cawley * Christian Ehrlicher * Christopher Sean Morrison @@ -14,7 +18,9 @@ Author List * Clifford Yapp * Clinton Ingram * Cosmin Truta + * Dan Rosser * David Callu + * Gianfranco Costamagna * Gleb Mazovetskiy * Glenn Randers-Pehrson * Gunther Nikl @@ -24,6 +30,7 @@ Author List * Kyle Bentley * Martin StorsjĂś * Owen Rudge + * Philip Lowman * Roger Leigh * Roger Lowman * Sam Serrels diff --git a/source/libs/libpng/libpng-src/scripts/libpng-config-head.in b/source/libs/libpng/libpng-src/scripts/libpng-config-head.in index 5fde8aeaf2..37577f4134 100644 --- a/source/libs/libpng/libpng-src/scripts/libpng-config-head.in +++ b/source/libs/libpng/libpng-src/scripts/libpng-config-head.in @@ -11,7 +11,7 @@ # Modeled after libxml-config. -version=1.6.42 +version=1.6.43 prefix="" libdir="" libs="" diff --git a/source/libs/libpng/libpng-src/scripts/libpng.pc.in b/source/libs/libpng/libpng-src/scripts/libpng.pc.in index 2d578b68cc..6a581d1a48 100644 --- a/source/libs/libpng/libpng-src/scripts/libpng.pc.in +++ b/source/libs/libpng/libpng-src/scripts/libpng.pc.in @@ -5,6 +5,6 @@ includedir=@includedir@/libpng16 Name: libpng Description: Loads and saves PNG files -Version: 1.6.42 +Version: 1.6.43 Libs: -L${libdir} -lpng16 Cflags: -I${includedir} diff --git a/source/libs/libpng/libpng-src/scripts/makefile.32sunu b/source/libs/libpng/libpng-src/scripts/makefile.32sunu index ea4894e741..822e8a9235 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.32sunu +++ b/source/libs/libpng/libpng-src/scripts/makefile.32sunu @@ -1,6 +1,6 @@ # makefile for libpng on Solaris 2.x with cc # Contributed by William L. Sebok, based on makefile.linux -# Copyright (C) 2020-2022 Cosmin Truta +# Copyright (C) 2020-2024 Cosmin Truta # Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger @@ -19,9 +19,8 @@ LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) # Utilities: CC=cc -AR_RC=ar rc +AR=ar RANLIB=echo -MKDIR_P=mkdir -p LN_SF=ln -f -s RM_F=/bin/rm -f @@ -42,6 +41,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ -Wstrict-prototypes -Wmissing-prototypes # -Wconversion CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5 CFLAGS=$(SUN_CC_FLAGS) # $(WARNMORE) -g +ARFLAGS=rc LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ @@ -65,7 +65,7 @@ DELETE = $(RM_F) DFNFLAGS = $(DEFS) $(CPPFLAGS) libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ $(LIBSO): $(LIBSOMAJ) diff --git a/source/libs/libpng/libpng-src/scripts/makefile.64sunu b/source/libs/libpng/libpng-src/scripts/makefile.64sunu index 3f603d3f1d..65414b6b57 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.64sunu +++ b/source/libs/libpng/libpng-src/scripts/makefile.64sunu @@ -1,6 +1,6 @@ # makefile for libpng on Solaris 2.x with cc # Contributed by William L. Sebok, based on makefile.linux -# Copyright (C) 2020-2022 Cosmin Truta +# Copyright (C) 2020-2024 Cosmin Truta # Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger @@ -19,9 +19,8 @@ LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) # Utilities: CC=cc -AR_RC=ar rc +AR=ar RANLIB=echo -MKDIR_P=mkdir -p LN_SF=ln -f -s RM_F=/bin/rm -f @@ -41,7 +40,8 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ -Wmissing-declarations -Wtraditional -Wcast-align \ -Wstrict-prototypes -Wmissing-prototypes # -Wconversion CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5 -CFLAGS= $(SUN_CC_FLAGS) # $(WARNMORE) -g +CFLAGS=$(SUN_CC_FLAGS) # $(WARNMORE) -g +ARFLAGS=rc LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ @@ -65,7 +65,7 @@ DELETE = $(RM_F) DFNFLAGS = $(DEFS) $(CPPFLAGS) libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ $(LIBSO): $(LIBSOMAJ) diff --git a/source/libs/libpng/libpng-src/scripts/makefile.aix b/source/libs/libpng/libpng-src/scripts/makefile.aix index f00734e907..5b24f54fc7 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.aix +++ b/source/libs/libpng/libpng-src/scripts/makefile.aix @@ -1,5 +1,5 @@ # makefile for libpng using gcc (generic, static library) -# Copyright (C) 2000, 2022 Cosmin Truta +# Copyright (C) 2000, 2020-2024 Cosmin Truta # Copyright (C) 2002, 2006-2009, 2014 Glenn Randers-Pehrson # Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc) # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. @@ -15,9 +15,8 @@ ZLIBLIB = ../zlib # Compiler, linker, lib and other tools CC = gcc LD = $(CC) -AR_RC = ar rcs +AR = ar RANLIB = ranlib -MKDIR_P = mkdir -p RM_F = rm -f LIBNAME = libpng16 @@ -26,6 +25,7 @@ PNGMAJ = 16 WARNMORE = CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5 CFLAGS = -O2 -Wall -Wextra -Wundef # $(WARNMORE) -g +ARFLAGS = rc LDFLAGS = -L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g # File lists @@ -44,7 +44,7 @@ REMOVE = $(RM_F) DFNFLAGS = $(DEFS) $(CPPFLAGS) $(LIBNAME).a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ test: pngtest diff --git a/source/libs/libpng/libpng-src/scripts/makefile.amiga b/source/libs/libpng/libpng-src/scripts/makefile.amiga index 2dae9af99c..321c7112aa 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.amiga +++ b/source/libs/libpng/libpng-src/scripts/makefile.amiga @@ -26,8 +26,6 @@ LN= slink RM= delete quiet # library (.lib) file creation command AR= oml -# make directory command -MKDIR= makedir # Pre-built configuration # See scripts/pnglibconf.mak for more options diff --git a/source/libs/libpng/libpng-src/scripts/makefile.beos b/source/libs/libpng/libpng-src/scripts/makefile.beos index e02bdc3f48..fcc7f9caca 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.beos +++ b/source/libs/libpng/libpng-src/scripts/makefile.beos @@ -1,6 +1,6 @@ # makefile for libpng on BeOS x86 ELF with gcc # modified from makefile.linux by Sander Stoks -# Copyright (C) 2020-2022 Cosmin Truta +# Copyright (C) 2020-2024 Cosmin Truta # Copyright (C) 2002, 2006, 2008, 2010-2014 Glenn Randers-Pehrson # Copyright (C) 1999 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger @@ -19,9 +19,8 @@ LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) # Utilities: CC=gcc -AR_RC=ar rc +AR=ar RANLIB=ranlib -MKDIR_P=mkdir -p LN_SF=ln -sf CP=cp RM_F=/bin/rm -f @@ -42,6 +41,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ # still here in R4.5 CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5 CFLAGS=-O1 -funroll-loops $(ALIGN) -Wall -Wextra -Wundef # $(WARNMORE) -g +ARFLAGS=rc # LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz # -g @@ -66,7 +66,7 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ $(LIBSO): $(LIBSOMAJ) diff --git a/source/libs/libpng/libpng-src/scripts/makefile.clang b/source/libs/libpng/libpng-src/scripts/makefile.clang index 2e154236f6..08aaccf858 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.clang +++ b/source/libs/libpng/libpng-src/scripts/makefile.clang @@ -1,5 +1,5 @@ # makefile for libpng using clang (generic, static library) -# Copyright (C) 2000, 2014, 2019-2022 Cosmin Truta +# Copyright (C) 2000, 2014, 2019-2024 Cosmin Truta # Copyright (C) 2008, 2014 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # @@ -14,7 +14,7 @@ ZLIBLIB = ../zlib # Compiler, linker, lib and other tools CC = clang LD = $(CC) -AR_RC = ar rcs +AR = ar RANLIB = ranlib CP = cp RM_F = rm -f @@ -28,6 +28,7 @@ WARNMORE = -Wwrite-strings -Wpointer-arith -Wshadow \ DEFS = $(NOHWOPT) CPPFLAGS = -I$(ZLIBINC) $(DEFS) # -DPNG_DEBUG=5 CFLAGS = -O2 -Wall -Wextra -Wundef # $(WARNMORE) -g +ARFLAGS = rc LDFLAGS = -L$(ZLIBLIB) # -g LIBS = -lz -lm @@ -60,7 +61,7 @@ shared: @false libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ test: pngtest$(EXEEXT) diff --git a/source/libs/libpng/libpng-src/scripts/makefile.darwin b/source/libs/libpng/libpng-src/scripts/makefile.darwin index 0c50b57e6f..e68797e5e1 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.darwin +++ b/source/libs/libpng/libpng-src/scripts/makefile.darwin @@ -1,5 +1,5 @@ # makefile for libpng on Darwin / macOS -# Copyright (C) 2020-2022 Cosmin Truta +# Copyright (C) 2020-2024 Cosmin Truta # Copyright (C) 2002, 2004, 2006, 2008, 2010-2014 Glenn Randers-Pehrson # Copyright (C) 2001 Christoph Pfisterer # derived from makefile.linux: @@ -24,9 +24,8 @@ LIBSOMAJ=$(LIBNAME).$(PNGMAJ).dylib # Utilities: CC=cc -AR_RC=ar rc +AR=ar RANLIB=ranlib -MKDIR_P=mkdir -p LN_SF=ln -sf CP=cp RM_F=rm -f @@ -36,6 +35,7 @@ NOHWOPT=-DPNG_ARM_NEON_OPT=0 -DPNG_MIPS_MSA_OPT=0 \ DEFS=$(NOHWOPT) CPPFLAGS=-I$(ZLIBINC) $(DEFS) CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef +ARFLAGS=rc LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz # Pre-built configuration @@ -63,7 +63,7 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ $(LIBSO): $(LIBSOMAJ) diff --git a/source/libs/libpng/libpng-src/scripts/makefile.dec b/source/libs/libpng/libpng-src/scripts/makefile.dec index b788b5aa39..2cca020df6 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.dec +++ b/source/libs/libpng/libpng-src/scripts/makefile.dec @@ -1,5 +1,5 @@ # makefile for libpng on DEC Alpha Unix -# Copyright (C) 2020-2022 Cosmin Truta +# Copyright (C) 2020-2024 Cosmin Truta # Copyright (C) 2000-2002, 2006, 2010-2014 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # @@ -17,9 +17,8 @@ LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) # Utilities: CC=cc -AR_RC=ar rc +AR=ar RANLIB=ranlib -MKDIR_P=mkdir LN_SF=ln -f -s CP=cp RM_F=/bin/rm -f @@ -32,6 +31,7 @@ ZLIBINC=../zlib CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5 CFLAGS=-std -w1 -O # -g +ARFLAGS=rc LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm # Pre-built configuration @@ -51,7 +51,7 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ $(LIBSO): $(LIBSOMAJ) diff --git a/source/libs/libpng/libpng-src/scripts/makefile.dj2 b/source/libs/libpng/libpng-src/scripts/makefile.dj2 index ff0d33286f..3767150978 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.dj2 +++ b/source/libs/libpng/libpng-src/scripts/makefile.dj2 @@ -1,5 +1,5 @@ # DJGPP (DOS gcc) makefile for libpng -# Copyright (C) 2020-2022 Cosmin Truta +# Copyright (C) 2020-2024 Cosmin Truta # Copyright (C) 2002, 2006, 2009-2014 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # @@ -8,8 +8,11 @@ # and license in png.h CC=gcc +AR=ar +RANLIB=ranlib CPPFLAGS=-I../zlib -DPNG_NO_SNPRINTF CFLAGS=-O +ARFLAGS=rc LDFLAGS=-L. -L../zlib/ -lpng -lz -lm CP=cp @@ -32,8 +35,8 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ libpng.a: $(OBJS) - ar rc $@ $(OBJS) - ranlib $@ + $(AR) $(ARFLAGS) $@ $(OBJS) + $(RANLIB) $@ pngtest: pngtest.o libpng.a $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) diff --git a/source/libs/libpng/libpng-src/scripts/makefile.emcc b/source/libs/libpng/libpng-src/scripts/makefile.emcc index 5d27621c07..1ab01b8db7 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.emcc +++ b/source/libs/libpng/libpng-src/scripts/makefile.emcc @@ -1,5 +1,5 @@ # makefile for libpng using emscripten -# Copyright (C) 2000, 2014, 2019-2022 Cosmin Truta +# Copyright (C) 2000, 2014, 2019-2024 Cosmin Truta # Copyright (C) 2021 Kirk Roerig # Copyright (C) 2008, 2014 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. @@ -15,13 +15,14 @@ ZLIBLIB = ../zlib # Compiler, linker, lib and other tools CC = emcc LD = $(CC) -AR_RC = emar rcs +AR = emar RANLIB = emranlib CP = cp RM_F = rm -f CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5 CFLAGS = -O2 -Wall -Wextra -Wundef +ARFLAGS = rc LDFLAGS = -L$(ZLIBLIB) PNGTEST_LDFLAGS = --preload-file=pngtest.png LIBS = -lz -lm @@ -51,7 +52,7 @@ shared: @false libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ test: pngtest diff --git a/source/libs/libpng/libpng-src/scripts/makefile.gcc b/source/libs/libpng/libpng-src/scripts/makefile.gcc index b215a70fbe..fc0a1a0907 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.gcc +++ b/source/libs/libpng/libpng-src/scripts/makefile.gcc @@ -1,5 +1,5 @@ # makefile for libpng using gcc (generic, static library) -# Copyright (C) 2000, 2014, 2019-2022 Cosmin Truta +# Copyright (C) 2000, 2014, 2019-2024 Cosmin Truta # Copyright (C) 2008, 2014 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # @@ -14,7 +14,7 @@ ZLIBLIB = ../zlib # Compiler, linker, lib and other tools CC = gcc LD = $(CC) -AR_RC = ar rcs +AR = ar RANLIB = ranlib CP = cp RM_F = rm -f @@ -28,6 +28,7 @@ WARNMORE = -Wwrite-strings -Wpointer-arith -Wshadow \ DEFS = $(NOHWOPT) CPPFLAGS = -I$(ZLIBINC) $(DEFS) # -DPNG_DEBUG=5 CFLAGS = -O2 -Wall -Wextra -Wundef # $(WARNMORE) -g +ARFLAGS = rc LDFLAGS = -L$(ZLIBLIB) # -g LIBS = -lz -lm @@ -60,7 +61,7 @@ shared: @false libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ test: pngtest$(EXEEXT) diff --git a/source/libs/libpng/libpng-src/scripts/makefile.hp64 b/source/libs/libpng/libpng-src/scripts/makefile.hp64 index e9c0a6938f..c974d2f334 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.hp64 +++ b/source/libs/libpng/libpng-src/scripts/makefile.hp64 @@ -1,5 +1,5 @@ # makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product. -# Copyright (C) 2020-2022 Cosmin Truta +# Copyright (C) 2020-2024 Cosmin Truta # Copyright (C) 1999-2002, 2006, 2009, 2010-2014 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42 # Contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard @@ -29,9 +29,8 @@ LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) # Utilities: CC=cc -AR_RC=ar rc +AR=ar RANLIB=ranlib -MKDIR_P=mkdir -p LN_SF=ln -sf CP=cp RM_F=/bin/rm -f @@ -41,7 +40,7 @@ CPPFLAGS=-I$(ZLIBINC) \ CFLAGS=-O -Ae -Wl,+vnocompatwarnings +DD64 +Z # Caution: be sure you have built zlib with the same CFLAGS. CCFLAGS=-O -Ae -Wl,+vnocompatwarnings +DD64 +Z - +ARFLAGS=rc LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm # Pre-built configuration @@ -68,7 +67,7 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ $(LIBSO): $(LIBSOMAJ) diff --git a/source/libs/libpng/libpng-src/scripts/makefile.hpgcc b/source/libs/libpng/libpng-src/scripts/makefile.hpgcc index 3686bd0ae0..a24fb93398 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.hpgcc +++ b/source/libs/libpng/libpng-src/scripts/makefile.hpgcc @@ -1,5 +1,5 @@ # makefile for libpng on HP-UX using GCC with the HP ANSI/C linker. -# Copyright (C) 2020-2022 Cosmin Truta +# Copyright (C) 2020-2024 Cosmin Truta # Copyright (C) 2002, 2006-2008, 2010-2014 Glenn Randers-Pehrson # Copyright (C) 2001, Laurent faillie # Copyright (C) 1998, 1999 Greg Roelofs @@ -19,10 +19,9 @@ LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) # Utilities: CC=gcc -LD=ld -AR_RC=ar rc +AR=ar RANLIB=ranlib -MKDIR_P=mkdir -p +LD=ld LN_SF=ln -sf CP=cp RM_F=/bin/rm -f @@ -44,6 +43,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5 CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef # $(WARNMORE) -g +ARFLAGS=rc #LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g @@ -64,7 +64,7 @@ OBJSDLL = $(OBJS:.o=.pic.o) all: libpng.a $(LIBSO) pngtest libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ $(LIBSO): $(LIBSOMAJ) diff --git a/source/libs/libpng/libpng-src/scripts/makefile.hpux b/source/libs/libpng/libpng-src/scripts/makefile.hpux index 59041f02a6..c3950ae3f5 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.hpux +++ b/source/libs/libpng/libpng-src/scripts/makefile.hpux @@ -1,5 +1,5 @@ # makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product. -# Copyright (C) 2020-2022 Cosmin Truta +# Copyright (C) 2020-2024 Cosmin Truta # Copyright (C) 1999-2002, 2006, 2010-2014 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42 # Contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard @@ -30,9 +30,8 @@ LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) # Utilities: CC=cc -AR_RC=ar rc +AR=ar RANLIB=ranlib -MKDIR_P=mkdir -p LN_SF=ln -sf RM_F=/bin/rm -f @@ -40,6 +39,7 @@ CPPFLAGS=-I$(ZLIBINC) CFLAGS=-O -Ae +DA1.1 +DS2.0 # Caution: be sure you have built zlib with the same CFLAGS. CCFLAGS=-O -Ae +DA1.1 +DS2.0 +ARFLAGS=rc LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm # Pre-built configuration @@ -66,7 +66,7 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ $(LIBSO): $(LIBSOMAJ) diff --git a/source/libs/libpng/libpng-src/scripts/makefile.linux b/source/libs/libpng/libpng-src/scripts/makefile.linux index 3fece3d6c9..c49cdde9d2 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.linux +++ b/source/libs/libpng/libpng-src/scripts/makefile.linux @@ -1,5 +1,5 @@ # makefile for libpng.a and libpng16.so on Linux ELF with gcc -# Copyright (C) 2020-2022 Cosmin Truta +# Copyright (C) 2020-2024 Cosmin Truta # Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2014 Greg Roelofs and # Glenn Randers-Pehrson # Copyright (C) 1996, 1997 Andreas Dilger @@ -18,9 +18,8 @@ LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) # Utilities: CC=gcc -AR_RC=ar rc +AR=ar RANLIB=ranlib -MKDIR_P=mkdir -p LN_SF=ln -sf CP=cp RM_F=rm -f @@ -40,6 +39,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ DEFS=$(NOHWOPT) CPPFLAGS=-I$(ZLIBINC) $(DEFS) # -DPNG_DEBUG=5 CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef # $(WARNMORE) -g +ARFLAGS=rc LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm # -g @@ -68,7 +68,7 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ $(LIBSO): $(LIBSOMAJ) diff --git a/source/libs/libpng/libpng-src/scripts/makefile.mips b/source/libs/libpng/libpng-src/scripts/makefile.mips index ca50f6077c..45de36d46f 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.mips +++ b/source/libs/libpng/libpng-src/scripts/makefile.mips @@ -1,5 +1,5 @@ # makefile for libpng -# Copyright (C) 2020-2022 Cosmin Truta +# Copyright (C) 2020-2024 Cosmin Truta # Copyright (C) 1998-2014 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # @@ -8,15 +8,15 @@ # and license in png.h CC=cc +AR=ar +#RANLIB=ranlib +RANLIB=echo CPPFLAGS=-I../zlib -DSYSV -Dmips CFLAGS=-O -systype sysv -w #CFLAGS=-O +ARFLAGS=rc LDFLAGS=-L. -L../zlib/ -lpng -lz -lm -AR_RC=ar rc -#RANLIB=ranlib -RANLIB=echo - # Pre-built configuration # See scripts/pnglibconf.mak for more options PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt @@ -34,7 +34,7 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) cp $(PNGLIBCONF_H_PREBUILT) $@ libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ pngtest: pngtest.o libpng.a diff --git a/source/libs/libpng/libpng-src/scripts/makefile.msys b/source/libs/libpng/libpng-src/scripts/makefile.msys index e2878233c2..8ebcaab992 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.msys +++ b/source/libs/libpng/libpng-src/scripts/makefile.msys @@ -1,5 +1,5 @@ # makefile for libpng using MSYS/gcc (shared, static library) -# Copyright (C) 2019-2022 Cosmin Truta +# Copyright (C) 2000, 2019-2024 Cosmin Truta # Copyright (C) 2012 Glenn Randers-Pehrson and Christopher M. Wheeler # # Portions taken from makefile.linux and makefile.gcc: @@ -30,20 +30,20 @@ ZLIBINC=/usr/local/include # Compiler, linker, lib and other tools CC = gcc LD = $(CC) -AR_RC = ar rcs +AR = ar RANLIB = ranlib CP = cp RM_F = rm -rf -MKDIR_P=mkdir -p -LN_SF=ln -sf +LN_SF = ln -sf CPPFLAGS = # -DPNG_DEBUG=5 CFLAGS = -O2 -Wall -Wextra -Wundef # -g +ARFLAGS = rc LDFLAGS = # -g LIBS = -lz -lm # File extensions -EXEEXT=.exe +EXEEXT = .exe # Pre-built configuration # See scripts/pnglibconf.mak for more options @@ -75,7 +75,7 @@ $(LIBSOMAJ): $(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOMAJ) libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ install: diff --git a/source/libs/libpng/libpng-src/scripts/makefile.acorn b/source/libs/libpng/libpng-src/scripts/makefile.riscos similarity index 70% rename from source/libs/libpng/libpng-src/scripts/makefile.acorn rename to source/libs/libpng/libpng-src/scripts/makefile.riscos index 00b8fb5b35..7baa148436 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.acorn +++ b/source/libs/libpng/libpng-src/scripts/makefile.riscos @@ -1,14 +1,12 @@ # Project: libpng +# Copyright (C) 2020 Cameron Cawley +# Copyright (C) 1997 Tom Tanner # Toolflags: -CCflags = -c -depend !Depend -IC:,Zlib: -g -throwback -DRISCOS -fnah -C++flags = -c -depend !Depend -IC: -throwback -Linkflags = -aif -c++ -o $@ -ObjAsmflags = -throwback -NoCache -depend !Depend -CMHGflags = +CCflags = -c -depend !Depend -IC:,C:zlib -g -throwback -DRISCOS -fnah -wz +Linkflags = -aif -o $@ LibFileflags = -c -l -o $@ -Squeezeflags = -o $@ # Final targets: @.libpng-lib: @.o.png @.o.pngerror @.o.pngrio @.o.pngwio @.o.pngmem \ @@ -27,14 +25,13 @@ Squeezeflags = -o $@ # User-editable dependencies: -# (C) Copyright 1997 Tom Tanner Test: @.pngtest - .pngtest - @remove .pngtest + Run @.pngtest + @Remove @.pngtest #It would be nice if you could stop "make" listing from here on! -@.pngtest: @.o.pngtest @.libpng-lib C:o.Stubs Zlib:zlib_lib - Link $(Linkflags) @.o.pngtest @.libpng-lib C:o.Stubs Zlib:zlib_lib +@.pngtest: @.o.pngtest @.libpng-lib C:o.Stubs C:zlib.o.zlib + Link $(Linkflags) @.o.pngtest @.libpng-lib C:o.Stubs C:zlib.o.zlib .SUFFIXES: .o .mm .c @@ -43,15 +40,15 @@ Test: @.pngtest .c.o: cc $(ccflags) -o $@ $< -# See scripts.mak.libpngconf for how to generate this: -@.h.libpngconf: @.scripts.h.libpngconf - copy @.scripts.h.libpngconf $@ +# See scripts.pnglibconf/mak for how to generate this: +@.h.pnglibconf: @.scripts.pnglibconf/h/prebuilt + Copy @.scripts.pnglibconf/h/prebuilt $@ ~CF~V # Static dependencies: @.o.png @.o.pngerror @.o.pngrio @.o.pngwio @.o.pngmem \ @.o.pngpread @.o.pngset @.o.pngget @.o.pngread @.o.pngrtran \ @.o.pngrutil @.o.pngtrans @.o.pngwrite @.o.pngwtran @.o.pngwutil \ -@.o.pngtest: @.h.libpngconf +@.o.pngtest: @.h.pnglibconf # Dynamic dependencies: diff --git a/source/libs/libpng/libpng-src/scripts/makefile.sco b/source/libs/libpng/libpng-src/scripts/makefile.sco index 002cd3f9b3..8a8e50ffc7 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.sco +++ b/source/libs/libpng/libpng-src/scripts/makefile.sco @@ -1,7 +1,7 @@ # makefile for SCO OSr5 ELF and Unixware 7 with Native cc # Contributed by Mike Hopkirk (hops at sco.com) modified from Makefile.lnx # force ELF build dynamic linking, SONAME setting in lib and RPATH in app -# Copyright (C) 2020-2022 Cosmin Truta +# Copyright (C) 2020-2024 Cosmin Truta # Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger @@ -20,9 +20,8 @@ LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) # Utilities: CC=cc -AR_RC=ar rc +AR=ar RANLIB=echo -MKDIR_P=mkdir LN_SF=ln -f -s CP=cp RM_F=/bin/rm -f @@ -34,7 +33,8 @@ ZLIBLIB=../zlib ZLIBINC=../zlib CPPFLAGS=-I$(ZLIBINC) -CFLAGS= -dy -belf -O3 +CFLAGS=-dy -belf -O3 +ARFLAGS=rc LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm # Pre-built configuration @@ -61,7 +61,7 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ $(LIBSO): $(LIBSOMAJ) diff --git a/source/libs/libpng/libpng-src/scripts/makefile.sggcc b/source/libs/libpng/libpng-src/scripts/makefile.sggcc index e017916ef3..f694f6eedb 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.sggcc +++ b/source/libs/libpng/libpng-src/scripts/makefile.sggcc @@ -1,5 +1,5 @@ # makefile for libpng.a and libpng16.so, SGI IRIX with 'cc' -# Copyright (C) 2020-2022 Cosmin Truta +# Copyright (C) 2020-2024 Cosmin Truta # Copyright (C) 2001-2002, 2006, 2010-2014 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # @@ -17,9 +17,8 @@ LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) # Utilities: CC=gcc -AR_RC=ar rc +AR=ar RANLIB=echo -MKDIR_P=mkdir -p LN_SF=ln -sf CP=cp RM_F=/bin/rm -f @@ -39,6 +38,7 @@ ABI= WARNMORE= CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5 CFLAGS=$(ABI) -O $(WARNMORE) -fPIC -mabi=n32 # -g +ARFLAGS=rc LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm # -g LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \ -set_version sgi$(PNGMAJ).0 @@ -61,7 +61,7 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ shared: $(LIBSOMAJ) diff --git a/source/libs/libpng/libpng-src/scripts/makefile.sgi b/source/libs/libpng/libpng-src/scripts/makefile.sgi index c7f8720e53..a60650c251 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.sgi +++ b/source/libs/libpng/libpng-src/scripts/makefile.sgi @@ -1,5 +1,5 @@ # makefile for libpng.a and libpng16.so, SGI IRIX with 'cc' -# Copyright (C) 2020-2022 Cosmin Truta +# Copyright (C) 2020-2024 Cosmin Truta # Copyright (C) 2001-2002, 2006, 2007, 2010-2014 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # @@ -17,9 +17,8 @@ LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) # Utilities: CC=cc -AR_RC=ar rc +AR=ar RANLIB=echo -MKDIR_P=mkdir -p LN_SF=ln -sf CP=cp RM_F=/bin/rm -f @@ -41,6 +40,7 @@ WARNMORE=-fullwarn CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5 #CFLAGS= $(ABI) -O $(WARNMORE) -KPIC # -g CFLAGS=$(ABI) -O $(WARNMORE) # -g +ARFLAGS=rc LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm # -g LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \ @@ -64,7 +64,7 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ $(LIBSO): $(LIBSOMAJ) diff --git a/source/libs/libpng/libpng-src/scripts/makefile.so9 b/source/libs/libpng/libpng-src/scripts/makefile.so9 index 2fd8e7017f..5af3ad9956 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.so9 +++ b/source/libs/libpng/libpng-src/scripts/makefile.so9 @@ -1,7 +1,7 @@ # makefile for libpng on Solaris 9 (beta) with Forte cc # Updated by Chad Schrock for Solaris 9 # Contributed by William L. Sebok, based on makefile.linux -# Copyright (C) 2020-2022 Cosmin Truta +# Copyright (C) 2020-2024 Cosmin Truta # Copyright (C) 2002, 2006, 2008, 2010-2014 Glenn Randers-Pehrson # Copyright (C) 1998-2001 Greg Roelofs # Copyright (C) 1996-1997 Andreas Dilger @@ -21,9 +21,8 @@ LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) # Utilities: # gcc 2.95 doesn't work. CC=cc -AR_RC=ar rc +AR=ar RANLIB=echo -MKDIR_P=mkdir -p LN_SF=ln -f -s CP=cp RM_F=/bin/rm -f @@ -41,6 +40,7 @@ ZLIBINC=/usr/include CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5 CFLAGS=-O3 +ARFLAGS=rc LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm # Pre-built configuration @@ -67,7 +67,7 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ $(LIBSO): $(LIBSOMAJ) diff --git a/source/libs/libpng/libpng-src/scripts/makefile.solaris b/source/libs/libpng/libpng-src/scripts/makefile.solaris index 4aa672deb5..c4d7709785 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.solaris +++ b/source/libs/libpng/libpng-src/scripts/makefile.solaris @@ -1,5 +1,5 @@ # makefile for libpng on Solaris 2.x with gcc -# Copyright (C) 2020-2022 Cosmin Truta +# Copyright (C) 2020-2024 Cosmin Truta # Copyright (C) 2004, 2006-2008, 2010-2014 Glenn Randers-Pehrson # Contributed by William L. Sebok, based on makefile.linux # Copyright (C) 1998 Greg Roelofs @@ -19,9 +19,8 @@ LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) # Utilities: CC=gcc -AR_RC=ar rc +AR=ar RANLIB=echo -MKDIR_P=mkdir -p LN_SF=ln -f -s CP=cp RM_F=/bin/rm -f @@ -40,6 +39,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ -Wstrict-prototypes -Wmissing-prototypes # -Wconversion CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5 CFLAGS=-O -Wall -Wextra -Wundef # $(WARNMORE) -g +ARFLAGS=rc LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm # -g # Pre-built configuration @@ -66,7 +66,7 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ $(LIBSO): $(LIBSOMAJ) diff --git a/source/libs/libpng/libpng-src/scripts/makefile.std b/source/libs/libpng/libpng-src/scripts/makefile.std index 6ce0a498ad..6d69bf586b 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.std +++ b/source/libs/libpng/libpng-src/scripts/makefile.std @@ -1,5 +1,5 @@ # makefile for libpng -# Copyright (C) 2020-2022 Cosmin Truta +# Copyright (C) 2020-2024 Cosmin Truta # Copyright (C) 2002, 2006, 2014 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # @@ -16,9 +16,8 @@ ZLIBINC=../zlib CC = cc CPP = $(CC) -E LD = $(CC) -AR_RC = ar rc +AR = ar RANLIB = ranlib -MKDIR_P = mkdir MV_F = mv -f RM_F = rm -f AWK = awk @@ -29,6 +28,7 @@ DFNFLAGS = # DFNFLAGS contains -D options to use in the libpng build DFA_EXTRA = # extra files that can be used to control configuration CPPFLAGS = -I$(ZLIBINC) $(NOHWOPT) # -DPNG_DEBUG=5 CFLAGS = -O # -g +ARFLAGS = rc LDFLAGS = -L$(ZLIBLIB) # -g LIBS = -lz -lm @@ -66,7 +66,7 @@ pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(MV_F) pnglibconf.tmp $@ libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ pngtest: pngtest.o libpng.a diff --git a/source/libs/libpng/libpng-src/scripts/makefile.sunos b/source/libs/libpng/libpng-src/scripts/makefile.sunos index 675e8760f1..e8c046bb00 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.sunos +++ b/source/libs/libpng/libpng-src/scripts/makefile.sunos @@ -1,5 +1,5 @@ # makefile for libpng -# Copyright (C) 2020-2022 Cosmin Truta +# Copyright (C) 2020-2024 Cosmin Truta # Copyright (C) 2002, 2006, 2014 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # @@ -14,14 +14,14 @@ ZLIBLIB=../zlib ZLIBINC=../zlib CC=gcc -AR_RC=ar rc +AR=ar RANLIB=ranlib -MKDIR_P=mkdir -p CP=cp RM_F=/bin/rm -f CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5 CFLAGS=-O +ARFLAGS=rc LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm # Pre-built configuration @@ -41,7 +41,7 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ pngtest: pngtest.o libpng.a diff --git a/source/libs/libpng/libpng-src/scripts/makefile.vcwin-arm64 b/source/libs/libpng/libpng-src/scripts/makefile.vcwin-arm64 index 9795ba6b0e..1e98d1667f 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.vcwin-arm64 +++ b/source/libs/libpng/libpng-src/scripts/makefile.vcwin-arm64 @@ -31,7 +31,7 @@ RM = del PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt # File extensions -O=.obj +O = .obj # File lists OBJS1 = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) diff --git a/source/libs/libpng/libpng-src/scripts/makefile.vcwin32 b/source/libs/libpng/libpng-src/scripts/makefile.vcwin32 index ebc053da29..762032216f 100644 --- a/source/libs/libpng/libpng-src/scripts/makefile.vcwin32 +++ b/source/libs/libpng/libpng-src/scripts/makefile.vcwin32 @@ -30,7 +30,7 @@ RM = del PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt # File extensions -O=.obj +O = .obj # File lists OBJS1 = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) diff --git a/source/libs/libpng/libpng-src/scripts/options.awk b/source/libs/libpng/libpng-src/scripts/options.awk index 284811967f..b74223ab7c 100644 --- a/source/libs/libpng/libpng-src/scripts/options.awk +++ b/source/libs/libpng/libpng-src/scripts/options.awk @@ -401,8 +401,10 @@ pre != 0 && $1 == "chunk" && NF >= 2{ if (i > NF) { # Output new 'option' lines to the intermediate file (out) - print "option READ_" opt, "requires READ_ANCILLARY_CHUNKS" reqread, "enables", opt enables , onoff >out - print "option WRITE_" opt, "requires WRITE_ANCILLARY_CHUNKS" reqwrite, "enables", opt enables, onoff >out + print "option READ_" opt, "requires READ_ANCILLARY_CHUNKS" reqread, + "enables", opt enables , onoff >out + print "option WRITE_" opt, "requires WRITE_ANCILLARY_CHUNKS" reqwrite, + "enables", opt enables, onoff >out next } # Else hit the error handler below - bad line format! @@ -731,7 +733,9 @@ END{ # 'have_ifs' here means that everything = "off" still allows an 'if' on # an otherwise enabled option to turn it on; otherwise the 'if' # handling is effectively disabled by 'everything = off' - if (option[i] == "off" || option[i] == "disabled" && everything != "on" || option[i] == "enabled" && everything == "off" && !have_ifs) { + if ((option[i] == "off") || + (option[i] == "disabled" && everything != "on") || + (option[i] == "enabled" && everything == "off" && !have_ifs)) { print "# undef PNG_on /*default off*/" >out } else { print "# ifdef PNG_NO_" i >out @@ -752,7 +756,8 @@ END{ # pnglibconf.h print "# ifdef PNG_on" >out if (i ~ /^fail_/) { - print error, i, "is on: enabled by:" iffs[i] enabledby[i] ", requires" requires[i] end >out + print error, i, "is on:", + "enabled by:" iffs[i] enabledby[i] ", requires" requires[i] end >out } else if (i !~ /^ok_/) { print def i sup >out # Supported option, set required settings @@ -779,7 +784,8 @@ END{ print und i une >out } if (i ~ /^ok_/) { - print error, i, "not enabled: requires:" requires[i] ", enabled by:" iffs[i] enabledby[i] end >out + print error, i, "not enabled: ", + "requires:" requires[i] ", enabled by:" iffs[i] enabledby[i] end >out } print "#endif" >out } diff --git a/source/libs/libpng/libpng-src/scripts/pnglibconf.dfa b/source/libs/libpng/libpng-src/scripts/pnglibconf.dfa index 739805d2d9..fe8e481238 100644 --- a/source/libs/libpng/libpng-src/scripts/pnglibconf.dfa +++ b/source/libs/libpng/libpng-src/scripts/pnglibconf.dfa @@ -204,26 +204,33 @@ option SET_OPTION disabled # These options are specific to the ARM NEON hardware optimizations. At present # these optimizations depend on GCC specific pre-processing of an assembler (.S) -# file so they probably won't work with other compilers. -# -# ARM_NEON_OPT: unset: check at compile time (__ARM_NEON__ must be defined by -# the compiler, typically as a result of specifying -# CC="gcc -mfpu=neon".) -# 0: disable (even if the CPU has a NEON FPU.) -# 1: check at run time (via ARM_NEON_{API,CHECK}) -# 2: switch on unconditionally (inadvisable - instead pass -# -mfpu=neon to GCC in CC) -# When building libpng avoid using any setting other than '0'; '1' is -# set automatically when either 'API' or 'CHECK' are configured in, -# '2' should not be necessary as -mfpu=neon will achieve the same -# effect as well as applying NEON optimizations to the rest of the -# libpng code. -# NOTE: any setting other than '0' requires ALIGNED_MEMORY -# ARM_NEON_API: (PNG_ARM_NEON == 1) allow the optimization to be switched on -# with png_set_option -# ARM_NEON_CHECK: (PNG_ARM_NEON == 1) compile a run-time check to see if Neon -# extensions are supported. This is poorly supported and -# deprecated - use the png_set_option API. +# file, so they probably won't work with other compilers. +# +# ARM_NEON_OPT: +# unset: check at compile time +# (__ARM_NEON__ must be predefined by the compiler, as a result of +# passing "-mfpu=neon" to the compiler options) +# 0: disable (even if the CPU has a NEON FPU) +# 1: check at run time (via ARM_NEON_{API,CHECK}) +# 2: switch on unconditionally +# (inadvisable - instead, pass "-mfpu=neon" to the compiler) +# NOTE: +# When building libpng, avoid using any setting other than '0'; +# '1' is set automatically when either 'API' or 'CHECK' are configured in; +# '2' should not be necessary, as "-mfpu=neon" will achieve the same effect +# as well as applying the NEON optimizations to the rest of libpng. +# NOTE: +# Any setting other than '0' requires ALIGNED_MEMORY. +# +# ARM_NEON_API: +# (PNG_ARM_NEON == 1) +# Allow the optimization to be switched on with png_set_option. +# +# ARM_NEON_CHECK: +# (PNG_ARM_NEON == 1) +# Compile a run-time check to see if Neon extensions are supported. +# This is poorly supported and deprecated - use the png_set_option API. +# setting ARM_NEON_OPT option ARM_NEON_API disabled requires ALIGNED_MEMORY enables SET_OPTION, sets ARM_NEON_OPT 1 @@ -232,24 +239,29 @@ option ARM_NEON_CHECK disabled requires ALIGNED_MEMORY, # These options are specific to the PowerPC VSX hardware optimizations. # -# POWERPC_VSX_OPT: unset: check at compile time (__PPC64__,__ALTIVEC__,__VSX__ -# must be defined by the compiler, typically as a result -# of specifying -# "-mvsx -maltivec" compiler flags) -# 0: disable (even if the CPU supports VSX.) -# 1: check at run time (via POWERPC_VSX_{API,CHECK}) -# 2: switch on unconditionally (inadvisable - instead pass -# -mvsx -maltivec to compiler options) -# When building libpng avoid using any setting other than '0'; '1' is -# set automatically when either 'API' or 'CHECK' are configured in, -# '2' should not be necessary as "-mvsx -maltivec" will achieve the same -# effect as well as applying VSX optimizations to the rest of the -# libpng code. -# POWERPC_VSX_API: (PNG_POWERPC_VSX == 1) allow the optimization to be switched on -# with png_set_option -# POWERPC_VSX_CHECK: (PNG_POWERPC_VSX == 1) compile a run-time check to see if VSX -# extensions are supported. This is supported not for all OSes -# (see contrib/powerpc/README) +# POWERPC_VSX_OPT: +# unset: check at compile time +# (__PPC64__,__ALTIVEC__,__VSX__ must be predefined by the compiler, +# as a result of passing "-mvsx -maltivec" to the compiler options) +# 0: disable (even if the CPU supports VSX) +# 1: check at run time (via POWERPC_VSX_{API,CHECK}) +# 2: switch on unconditionally +# (inadvisable - instead, pass "-mvsx -maltivec" to the compiler) +# NOTE: +# When building libpng, avoid using any setting other than '0'; +# '1' is set automatically when either 'API' or 'CHECK' are configured in; +# '2' should not be necessary, as "-mvsx -maltivec" will achieve the same +# effect as well as applying the VSX optimizations to the rest of libpng. +# +# POWERPC_VSX_API: +# (PNG_POWERPC_VSX == 1) +# Allow the optimization to be switched on with png_set_option. +# +# POWERPC_VSX_CHECK: +# (PNG_POWERPC_VSX == 1) +# Compile a run-time check to see if VSX extensions are supported. +# This is not supported on all systems. See contrib/powerpc-vsx/README. +# setting POWERPC_VSX_OPT option POWERPC_VSX_API disabled enables SET_OPTION, sets POWERPC_VSX_OPT 1 @@ -258,23 +270,30 @@ option POWERPC_VSX_CHECK disabled, # These options are specific to the MIPS MSA hardware optimizations. # -# MIPS_MSA_OPT: unset: check at compile time (__mips_msa must be defined by -# the compiler, typically as a result of specifying -# "-mmsa -mfp64" compiler flags) -# 0: disable (even if the CPU supports MSA.) -# 1: check at run time (via MIPS_MSA_{API,CHECK}) -# 2: switch on unconditionally (inadvisable - instead pass -# -mmsa -mfp64 to compiler options) -# When building libpng avoid using any setting other than '0'; '1' is -# set automatically when either 'API' or 'CHECK' are configured in, -# '2' should not be necessary as "-mmsa -mfp64" will achieve the same -# effect as well as applying MSA optimizations to the rest of the -# libpng code. -# NOTE: any setting other than '0' requires ALIGNED_MEMORY -# MIPS_MSA_API: (PNG_MIPS_MSA == 1) allow the optimization to be switched on -# with png_set_option. -# MIPS_MSA_CHECK: (PNG_MIPS_MSA == 1) compile a run-time check to see if MSA -# extensions are supported. +# MIPS_MSA_OPT: +# unset: check at compile time +# (__mips_msa must be predefined by the compiler, as a result of +# passing "-mmsa -mfp64" to the compiler options) +# 0: disable (even if the CPU supports MSA) +# 1: check at run time (via MIPS_MSA_{API,CHECK}) +# 2: switch on unconditionally +# (inadvisable - instead, pass "-mmsa -mfp64" to the compiler) +# NOTE: +# When building libpng, avoid using any setting other than '0'; +# '1' is set automatically when either 'API' or 'CHECK' are configured in; +# '2' should not be necessary, as "-mmsa -mfp64" will achieve the same +# effect as well as applying the MSA optimizations to the rest of libpng. +# NOTE: +# Any setting other than '0' requires ALIGNED_MEMORY. +# +# MIPS_MSA_API: +# (PNG_MIPS_MSA == 1) +# Allow the optimization to be switched on with png_set_option. +# +# MIPS_MSA_CHECK: +# (PNG_MIPS_MSA == 1) +# Compile a run-time check to see if MSA extensions are supported. +# setting MIPS_MSA_OPT option MIPS_MSA_API disabled requires ALIGNED_MEMORY enables SET_OPTION, sets MIPS_MSA_OPT 1 @@ -283,22 +302,30 @@ option MIPS_MSA_CHECK disabled requires ALIGNED_MEMORY, # These options are specific to the MIPS MMI hardware optimizations. # -# MIPS_MMI_OPT: unset: check at compile time (__mips_loongson_mmi must be defined by -# the compiler, typically as a result of specifying -# "-mloongson-mmi -march=loongson3a" compiler flags) -# 0: disable (even if the CPU supports MMI.) -# 1: check at run time (via MIPS_MMI_{API,CHECK}) -# 2: switch on unconditionally (inadvisable - instead pass -# -mloongson-mmi -march=loongson3a to compiler options) -# When building libpng avoid using any setting other than '0'; '1' is -# set automatically when either 'API' or 'CHECK' are configured in, -# '2' should not be necessary as "-mloongson-mmi -march=loongson3a" will achieve the same -# effect as well as applying MMI optimizations to the rest of the -# libpng code. -# MIPS_MMI_API: (PNG_MIPS_MMI == 1) allow the optimization to be switched on -# with png_set_option -# MIPS_MMI_CHECK: (PNG_MIPS_MMI == 1) compile a run-time check to see if MMI -# extensions are supported. +# MIPS_MMI_OPT: +# unset: check at compile time +# (__mips_loongson_mmi must be defined by the compiler, as a result of +# passing "-mloongson-mmi -march=loongson3a" to the compiler options) +# 0: disable (even if the CPU supports MMI) +# 1: check at run time (via MIPS_MMI_{API,CHECK}) +# 2: switch on unconditionally +# (inadvisable - instead, pass "-mloongson-mmi -march=loongson3a" to the +# compiler) +# NOTE: +# When building libpng, avoid using any setting other than '0'; +# '1' is set automatically when either 'API' or 'CHECK' are configured in; +# '2' should not be necessary, as "-mloongson-mmi -march=loongson3a" will +# achieve the same effect as well as applying the MMI optimizations to the +# rest of libpng. +# +# MIPS_MMI_API: +# (PNG_MIPS_MMI == 1) +# Allow the optimization to be switched on with png_set_option. +# +# MIPS_MMI_CHECK: +# (PNG_MIPS_MMI == 1) +# Compile a run-time check to see if MMI extensions are supported. +# setting MIPS_MMI_OPT option MIPS_MMI_API disabled requires ALIGNED_MEMORY enables SET_OPTION, sets MIPS_MMI_OPT 1 diff --git a/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt b/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt index 330453c139..83f09fbe77 100644 --- a/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt +++ b/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt @@ -1,6 +1,6 @@ /* pnglibconf.h - library build configuration */ -/* libpng version 1.6.42 */ +/* libpng version 1.6.43 */ /* Copyright (c) 2018-2024 Cosmin Truta */ /* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */ diff --git a/source/libs/libpng/libpng-src/scripts/pngwin.rc b/source/libs/libpng/libpng-src/scripts/pngwin.rc index 9335cbbe03..87702a4fbf 100644 --- a/source/libs/libpng/libpng-src/scripts/pngwin.rc +++ b/source/libs/libpng/libpng-src/scripts/pngwin.rc @@ -89,12 +89,12 @@ BEGIN #endif /* PNG_USER_VERSIONINFO_COMPANYNAME */ VALUE "FileDescription", "PNG image compression library\000" VALUE "FileVersion", PNG_LIBPNG_VER_STRING "\000" - VALUE "InternalName", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) PNG_LIBPNG_DLLFNAME_POSTFIX " (Windows 32 bit)\000" - VALUE "LegalCopyright", "\251 1998-2009 Glenn Randers-Pehrson et al.\000" + VALUE "InternalName", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_SHAREDLIB) PNG_LIBPNG_DLLFNAME_POSTFIX " (Windows)\000" + VALUE "LegalCopyright", "\251 1998-2024 PNG Reference Library Authors\000" #ifdef PNG_USER_VERSIONINFO_LEGALTRADEMARKS VALUE "LegalTrademarks", PNG_USER_VERSIONINFO_LEGALTRADEMARKS "\000" #endif /* PNG_USER_VERSIONINFO_LEGALTRADEMARKS */ - VALUE "OriginalFilename", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) PNG_LIBPNG_DLLFNAME_POSTFIX ".DLL\000" + VALUE "OriginalFilename", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_SHAREDLIB) PNG_LIBPNG_DLLFNAME_POSTFIX ".DLL\000" #ifdef PNG_USER_PRIVATEBUILD VALUE "PrivateBuild", PNG_USER_PRIVATEBUILD "\000" #endif /* PNG_USER_PRIVATEBUILD */ diff --git a/source/libs/libpng/libpng-src/scripts/smakefile.ppc b/source/libs/libpng/libpng-src/scripts/smakefile.ppc index 2fa5b65108..9212d2f062 100644 --- a/source/libs/libpng/libpng-src/scripts/smakefile.ppc +++ b/source/libs/libpng/libpng-src/scripts/smakefile.ppc @@ -11,13 +11,12 @@ CFLAGS = NOSTKCHK NOSINT OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL IDIR /zlib \ OPTLOOP OPTRDEP=8 OPTDEP=8 OPTCOMP=8 LIBNAME = libpng.a AR = ppc-amigaos-ar -AR_FLAGS = cr +ARFLAGS = cr RANLIB = ppc-amigaos-ranlib LDFLAGS = -r -o LDLIBS = ../zlib/libzip.a LIB:scppc.a LN = ppc-amigaos-ld RM = delete quiet -MKDIR = makedir OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \ @@ -26,7 +25,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ all: $(LIBNAME) pngtest $(LIBNAME): $(OBJS) - $(AR) $(AR_FLAGS) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ pngtest: pngtest.o $(LIBNAME) diff --git a/source/libs/libpng/libpng-src/tests/pngtest-all b/source/libs/libpng/libpng-src/tests/pngtest-all index 7a9b64ae67..668d92e9c3 100644 --- a/source/libs/libpng/libpng-src/tests/pngtest-all +++ b/source/libs/libpng/libpng-src/tests/pngtest-all @@ -1,17 +1,24 @@ #!/bin/sh -st=0 # exit status (set to 1 if a test fails) +st=0 # exit status (set to 1 if a test fails) +skipped= fail="**FAIL**" +skip="**SKIP**" success=" SUCCESS" TEST(){ # Try to make the log file easier to read: - test_status="$success" - echo "=============== PNGTEST $* ====================" - ./pngtest "$@" || { - st=$? - test_status="$fail" - } + echo "=============== pngtest $* ====================" + ./pngtest "$@" + status=$? + case "$status" in + 0) test_status="$success";; + 77) test_status="$skip" + skipped=1;; + *) test_status="$fail" + st="$status";; + esac echo "===============$test_status $* ====================" + return "$status" } # The "standard" test @@ -48,15 +55,17 @@ check_stdout(){ # variable 'line' below. The pattern matching ignores this because of the # '*' at the end of the pattern match. found= + skipped= while read line do case "$line" in *"$2"*) found=1;; + *"TEST SKIPPED"*) skipped=1;; esac echo "$line" # preserve the original output verbatim done # output the missing warning on descriptor 3: - test -z "$found" && echo "$1: $2" >&3 + test -z "$found" -a -z "$skipped" && echo "$1: $2" >&3 } # NOTE: traditionally the Bourne shell executed the last element in a pipe # sequence in the original shell so it could set variables in the original @@ -74,7 +83,10 @@ exec 4>&1 # original stdout - the log file # The exit code is ignored here, the test is that the particular errors # (warnings) are produced. The original output still ends up in the log # file. - TEST "$file" | + { + TEST "$file" + test "$?" -eq 77 && echo "TEST SKIPPED" + } | check_stdout "$file" 'IDAT: Read palette index exceeding num_palette' | check_stdout "$file" 'Wrote palette index exceeding num_palette' >&4 done @@ -90,4 +102,6 @@ exec 4>&1 # original stdout - the log file exit $st } || st=$? -exit $st +test "$st" -gt 0 && exit "$st" +test -n "$skipped" && exit 77 +exit 0 diff --git a/source/libs/libpng/version.ac b/source/libs/libpng/version.ac index 260e5ac610..8f85bd0edc 100644 --- a/source/libs/libpng/version.ac +++ b/source/libs/libpng/version.ac @@ -8,4 +8,4 @@ dnl dnl -------------------------------------------------------- dnl dnl m4-include this file to define the current libpng version -m4_define([libpng_version], [1.6.42]) +m4_define([libpng_version], [1.6.43]) diff --git a/source/texk/dvipdfm-x/ChangeLog b/source/texk/dvipdfm-x/ChangeLog index 5d748d72c5..f0e073ceee 100644 --- a/source/texk/dvipdfm-x/ChangeLog +++ b/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,9 @@ +2024-02-25 Max Chernoff + + * spc_util.{c,h}: Add "named" keyword to "pdf:image" special + * pdfdoc.{c,h}: Allow selecting a page by named destination + * {epdf,pdfximage,spc_pdfm,xbb}.{c,h}: Refactor to support above. + 2024-02-10 Yukimasa Morimi * cidtype2.c, sfnt.h, tt_cmap.{c,h}: diff --git a/source/texk/dvipdfm-x/configure b/source/texk/dvipdfm-x/configure index f3ef5bd011..ffd037865d 100755 --- a/source/texk/dvipdfm-x/configure +++ b/source/texk/dvipdfm-x/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for dvipdfm-x (TeX Live) 20240210. +# Generated by GNU Autoconf 2.72 for dvipdfm-x (TeX Live) 20240225. # # Report bugs to . # @@ -614,8 +614,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dvipdfm-x (TeX Live)' PACKAGE_TARNAME='dvipdfm-x--tex-live-' -PACKAGE_VERSION='20240210' -PACKAGE_STRING='dvipdfm-x (TeX Live) 20240210' +PACKAGE_VERSION='20240225' +PACKAGE_STRING='dvipdfm-x (TeX Live) 20240225' PACKAGE_BUGREPORT='dvipdfmx@tug.org' PACKAGE_URL='' @@ -1383,7 +1383,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures dvipdfm-x (TeX Live) 20240210 to adapt to many kinds of systems. +'configure' configures dvipdfm-x (TeX Live) 20240225 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1455,7 +1455,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20240210:";; + short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20240225:";; esac cat <<\_ACEOF @@ -1586,7 +1586,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dvipdfm-x (TeX Live) configure 20240210 +dvipdfm-x (TeX Live) configure 20240225 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. @@ -2367,7 +2367,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dvipdfm-x (TeX Live) $as_me 20240210, which was +It was created by dvipdfm-x (TeX Live) $as_me 20240225, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -8928,7 +8928,7 @@ fi # Define the identity of the package. PACKAGE='dvipdfm-x--tex-live-' - VERSION='20240210' + VERSION='20240225' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -15995,7 +15995,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -dvipdfm-x (TeX Live) config.lt 20240210 +dvipdfm-x (TeX Live) config.lt 20240225 configured by $0, generated by GNU Autoconf 2.72. Copyright (C) 2011 Free Software Foundation, Inc. @@ -17938,7 +17938,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by dvipdfm-x (TeX Live) $as_me 20240210, which was +This file was extended by dvipdfm-x (TeX Live) $as_me 20240225, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18010,7 +18010,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -dvipdfm-x (TeX Live) config.status 20240210 +dvipdfm-x (TeX Live) config.status 20240225 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" diff --git a/source/texk/dvipdfm-x/configure.ac b/source/texk/dvipdfm-x/configure.ac index 10e084c9c1..477133bb98 100644 --- a/source/texk/dvipdfm-x/configure.ac +++ b/source/texk/dvipdfm-x/configure.ac @@ -8,7 +8,7 @@ dnl This file is free software; the copyright holder dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl -AC_INIT([dvipdfm-x (TeX Live)], [20240210], [dvipdfmx@tug.org]) +AC_INIT([dvipdfm-x (TeX Live)], [20240225], [dvipdfmx@tug.org]) AC_PREREQ([2.65]) AC_CONFIG_SRCDIR([agl.c]) AC_CONFIG_AUX_DIR([../../build-aux]) diff --git a/source/texk/dvipdfm-x/epdf.c b/source/texk/dvipdfm-x/epdf.c index 95094823c7..f065193429 100644 --- a/source/texk/dvipdfm-x/epdf.c +++ b/source/texk/dvipdfm-x/epdf.c @@ -129,8 +129,9 @@ pdf_include_page (pdf_ximage *ximage, if (options.page_no == 0) options.page_no = 1; page = pdf_doc_get_page(pf, - options.page_no, options.bbox_type, - &info.bbox, &info.matrix, &resources); + options.page_no, options.page_name, + options.bbox_type, &info.bbox, &info.matrix, + &resources); if(!page) goto error_silent; @@ -304,7 +305,7 @@ pdf_copy_clip (FILE *image_file, int pageNo, double x_user, double y_user) pdf_invertmatrix(&M); M.e += x_user; M.f += y_user; - page_tree = pdf_doc_get_page(pf, pageNo, 0, &bbox, &mtrx, NULL); + page_tree = pdf_doc_get_page(pf, pageNo, NULL, 0, &bbox, &mtrx, NULL); if (!page_tree) { pdf_close(pf); return -1; diff --git a/source/texk/dvipdfm-x/pdfdoc.c b/source/texk/dvipdfm-x/pdfdoc.c index 75ed8179dd..48a4575b54 100644 --- a/source/texk/dvipdfm-x/pdfdoc.c +++ b/source/texk/dvipdfm-x/pdfdoc.c @@ -1024,6 +1024,19 @@ set_transform_matrix (pdf_tmatrix *matrix, pdf_rect *bbox, pdf_obj *rotate) return 0; } +/* Stores references to the needed boxes and resources for a page */ +typedef struct pdf_boxes { + pdf_obj *page_tree; + pdf_obj *resources; + pdf_obj *rotate; + pdf_obj *art_box; + pdf_obj *trim_box; + pdf_obj *bleed_box; + pdf_obj *media_box; + pdf_obj *crop_box; +} pdf_boxes; + + /* * From PDFReference15_v6.pdf (p.119 and p.834) * @@ -1046,7 +1059,7 @@ set_transform_matrix (pdf_tmatrix *matrix, pdf_rect *bbox, pdf_obj *rotate) * in the absence of additional information (such as imposition instructions * specified in a JDF or PJTF job ticket), the crop box will determine how * the page's contents are to be positioned on the output medium. The default - * value is the page's media box. + * value is the page's media box. * * BleedBox rectangle (Optional; PDF 1.3) * @@ -1055,14 +1068,14 @@ set_transform_matrix (pdf_tmatrix *matrix, pdf_rect *bbox, pdf_obj *rotate) * include any extra "bleed area" needed to accommodate the physical * limitations of cutting, folding, and trimming equipment. The actual printed * page may include printing marks that fall outside the bleed box. - * The default value is the page's crop box. + * The default value is the page's crop box. * * TrimBox rectangle (Optional; PDF 1.3) * * The trim box (PDF 1.3) defines the intended dimensions of the finished page * after trimming. It may be smaller than the media box, to allow for * production-related content such as printing instructions, cut marks, or - * color bars. The default value is the page's crop box. + * color bars. The default value is the page's crop box. * * ArtBox rectangle (Optional; PDF 1.3) * @@ -1075,28 +1088,241 @@ set_transform_matrix (pdf_tmatrix *matrix, pdf_rect *bbox, pdf_obj *rotate) * The number of degrees by which the page should be rotated clockwise when * displayed or printed. The value must be a multiple of 90. Default value: 0. */ +static void +get_page_properties (pdf_boxes *boxes) { + pdf_obj *tmp; -/* count_p removed: Please use different interface if you want to get total page - * number. pdf_doc_get_page() is obviously not an interface to do such. - */ -pdf_obj * -pdf_doc_get_page (pdf_file *pf, - int page_no, enum pdf_page_boundary opt_bbox, /* load options */ - pdf_rect *bbox, pdf_tmatrix *matrix, /* returned value */ - pdf_obj **resources_p /* returned values */ - ) { - pdf_obj *catalog = NULL, *page_tree = NULL; - pdf_obj *resources = NULL, *rotate = NULL; - pdf_obj *art_box = NULL, *trim_box = NULL, *bleed_box = NULL; - pdf_obj *media_box = NULL, *crop_box = NULL; - int error = 0; + if ((tmp = pdf_deref_obj(pdf_lookup_dict(boxes->page_tree, "MediaBox")))) { + if (boxes->media_box) + pdf_release_obj(boxes->media_box); + boxes->media_box = tmp; + } + if ((tmp = pdf_deref_obj(pdf_lookup_dict(boxes->page_tree, "CropBox")))) { + if (boxes->crop_box) + pdf_release_obj(boxes->crop_box); + boxes->crop_box = tmp; + } + if ((tmp = pdf_deref_obj(pdf_lookup_dict(boxes->page_tree, "ArtBox")))) { + if (boxes->art_box) + pdf_release_obj(boxes->art_box); + boxes->art_box = tmp; + } + if ((tmp = pdf_deref_obj(pdf_lookup_dict(boxes->page_tree, "TrimBox")))) { + if (boxes->trim_box) + pdf_release_obj(boxes->trim_box); + boxes->trim_box = tmp; + } + if ((tmp = pdf_deref_obj(pdf_lookup_dict(boxes->page_tree, "BleedBox")))) { + if (boxes->bleed_box) + pdf_release_obj(boxes->bleed_box); + boxes->bleed_box = tmp; + } + if ((tmp = pdf_deref_obj(pdf_lookup_dict(boxes->page_tree, "Rotate")))) { + if (boxes->rotate) + pdf_release_obj(boxes->rotate); + boxes->rotate = tmp; + } + if ((tmp = pdf_deref_obj(pdf_lookup_dict(boxes->page_tree, "Resources")))) { + if (boxes->resources) + pdf_release_obj(boxes->resources); + boxes->resources = tmp; + } +} - catalog = pdf_file_get_catalog(pf); - page_tree = pdf_deref_obj(pdf_lookup_dict(catalog, "Pages")); +/* + * Gets the page dictionary that a PDF "named destination" points to. + */ +static void +page_by_name (pdf_obj * catalog, char * page_name, pdf_boxes * boxes) { + pdf_obj *page = NULL; + pdf_obj *dests; + pdf_obj *up_dests; + int pos[5] = {0, 0, 0, 0, 0}; + int level = 0; + int i; + int recurse; + pdf_obj *limits; + pdf_obj *start_obj; + pdf_obj *end_obj; + char *start; + char *end; + pdf_obj *kids; + int kids_length; + int names_length; + + /* Get the top-level /Names dict */ + pdf_obj *names = pdf_deref_obj(pdf_lookup_dict(catalog, "Names")); + if (!PDF_OBJ_DICTTYPE(names)) { + if (names) + pdf_release_obj(names); + goto error_exit; + } - if (!PDF_OBJ_DICTTYPE(page_tree)) + /* The /Names dict should have a /Dests child */ + dests = pdf_deref_obj(pdf_lookup_dict(names, "Dests")); + pdf_release_obj(names); + if (!PDF_OBJ_DICTTYPE(dests)) { + if (dests) + pdf_release_obj(dests); goto error_exit; + } + + /* Loop over all the destinations until we find a matching one */ + + for (i = 0; i < 1000; i++) { + if (level < 0 || level >= sizeof(pos) / sizeof(pos[0])) + goto error_exit; + + if (i == 0) { + /* No /Limits for the root */ + recurse = true; + } else { + if (!dests) + goto error_exit; + + limits = pdf_deref_obj(pdf_lookup_dict(dests, "Limits")); + if (!PDF_OBJ_ARRAYTYPE(limits)) { + if (limits) + pdf_release_obj(limits); + goto error_exit; + } + + /* Get the current limits */ + start_obj = pdf_deref_obj(pdf_get_array(limits, 0)); + end_obj = pdf_deref_obj(pdf_get_array(limits, 1)); + pdf_release_obj(limits); + if (!PDF_OBJ_STRINGTYPE(start_obj) || !PDF_OBJ_STRINGTYPE(end_obj)) { + if (start_obj) + pdf_release_obj(start_obj); + if (end_obj) + pdf_release_obj(end_obj); + goto error_exit; + } + start = pdf_string_value(start_obj); + end = pdf_string_value(end_obj); + pdf_release_obj(start_obj); + pdf_release_obj(end_obj); + + recurse = strcmp(page_name, start) >= 0 && strcmp(page_name, end) <= 0; + } + + /* If the name is between the current limits, search the list */ + if (recurse) { + names = pdf_deref_obj(pdf_lookup_dict(dests, "Names")); + if (!PDF_OBJ_ARRAYTYPE(names)) { + if (names) + pdf_release_obj(names); + } else { + goto found; + } + + kids = pdf_deref_obj(pdf_lookup_dict(dests, "Kids")); + if (!PDF_OBJ_ARRAYTYPE(kids)) { + if (kids) + pdf_release_obj(kids); + goto error_exit; + } + + kids_length = pdf_array_length(kids); + for (; pos[level] < kids_length; pos[level]++) { + up_dests = dests; + dests = pdf_deref_obj(pdf_get_array(kids, pos[level])); + level++; + goto continue_outer; + } + } else { + if (--level >= 0) + pos[level]++; + pdf_release_obj(dests); + dests = up_dests; + } + continue_outer: ; + } + goto error_exit; + + /* Loop over the bottom-level Names array */ +found: + names_length = pdf_array_length(names); + for (i = 0; i < names_length; i++) { + char *name; + pdf_obj *dest; + pdf_obj *dest_inner; + pdf_obj *name_obj = pdf_deref_obj(pdf_get_array(names, i)); + if (!PDF_OBJ_STRINGTYPE(name_obj)) { + if (name_obj) + pdf_release_obj(name_obj); + continue; + } + + name = pdf_string_value(name_obj); + pdf_release_obj(name_obj); + + if (strcmp(page_name, name) != 0) + continue; + + dest = pdf_deref_obj(pdf_get_array(names, ++i)); + if (PDF_OBJ_DICTTYPE(dest)) { + dest_inner = pdf_deref_obj(pdf_lookup_dict(dest, "D")); + pdf_release_obj(dest); + if (!PDF_OBJ_ARRAYTYPE(dest_inner)) { + if (dest_inner) + pdf_release_obj(dest_inner); + goto error_exit; + } + } else if (PDF_OBJ_ARRAYTYPE(dest)) { + dest_inner = dest; + } else { + if (dest) + pdf_release_obj(dest); + continue; + } + + page = pdf_deref_obj(pdf_get_array(dest_inner, 0)); + pdf_release_obj(dest_inner); + if (!PDF_OBJ_DICTTYPE(page)) { + if (page) + pdf_release_obj(page); + goto error_exit; + } + + break; + } + + /* Traverse back upwards to get any inherited boxes */ + boxes->page_tree = page; + + while (true) { + get_page_properties(boxes); + + if (boxes->media_box) + break; + + boxes->page_tree = pdf_deref_obj(pdf_lookup_dict(boxes->page_tree, "Parent")); + if (!PDF_OBJ_DICTTYPE(boxes->page_tree)) { + if (boxes->page_tree) + pdf_release_obj(boxes->page_tree); + goto error_exit; + } + }; + + /* Set the page back to the current page (not the parent) */ + boxes->page_tree = page; + return; + +error_exit: + WARN("Bad named destination: %s", page_name); + return; +} + + +/* + * Gets the page dictionary by the page's number. + */ +static void +page_by_number (pdf_obj *page_tree, int page_no, pdf_boxes *boxes) { + pdf_obj *catalog = NULL; + int error = 0; { int count; @@ -1110,7 +1336,7 @@ pdf_doc_get_page (pdf_file *pf, pdf_release_obj(tmp); if (page_no <= 0 || page_no > count) { WARN("Page %ld does not exist.", page_no); - goto error_silent; + goto error_exit; } } @@ -1124,41 +1350,8 @@ pdf_doc_get_page (pdf_file *pf, int page_idx = page_no - 1, kids_length = 1, i = 0; while (--depth && i != kids_length) { - if ((tmp = pdf_deref_obj(pdf_lookup_dict(page_tree, "MediaBox")))) { - if (media_box) - pdf_release_obj(media_box); - media_box = tmp; - } - if ((tmp = pdf_deref_obj(pdf_lookup_dict(page_tree, "CropBox")))) { - if (crop_box) - pdf_release_obj(crop_box); - crop_box = tmp; - } - if ((tmp = pdf_deref_obj(pdf_lookup_dict(page_tree, "ArtBox")))) { - if (art_box) - pdf_release_obj(art_box); - art_box = tmp; - } - if ((tmp = pdf_deref_obj(pdf_lookup_dict(page_tree, "TrimBox")))) { - if (trim_box) - pdf_release_obj(trim_box); - trim_box = tmp; - } - if ((tmp = pdf_deref_obj(pdf_lookup_dict(page_tree, "BleedBox")))) { - if (bleed_box) - pdf_release_obj(bleed_box); - bleed_box = tmp; - } - if ((tmp = pdf_deref_obj(pdf_lookup_dict(page_tree, "Rotate")))) { - if (rotate) - pdf_release_obj(rotate); - rotate = tmp; - } - if ((tmp = pdf_deref_obj(pdf_lookup_dict(page_tree, "Resources")))) { - if (resources) - pdf_release_obj(resources); - resources = tmp; - } + boxes->page_tree = page_tree; + get_page_properties(boxes); kids = pdf_deref_obj(pdf_lookup_dict(page_tree, "Kids")); if (!kids) @@ -1199,17 +1392,61 @@ pdf_doc_get_page (pdf_file *pf, goto error_exit; } - if (!PDF_OBJ_DICTTYPE(resources)) + boxes->page_tree = page_tree; + + return; + +error_exit: + WARN("Error found in including PDF image."); + if (page_tree) + pdf_release_obj(page_tree); + + return; +} + + +/* count_p removed: Please use different interface if you want to get total page + * number. pdf_doc_get_page() is obviously not an interface to do such. + */ +pdf_obj * +pdf_doc_get_page (pdf_file *pf, + int page_no, char * page_name, + enum pdf_page_boundary opt_bbox, /* load options */ + pdf_rect *bbox, pdf_tmatrix *matrix, /* returned value */ + pdf_obj **resources_p /* returned values */ + ) { + pdf_obj *catalog = NULL, *page_tree = NULL; + pdf_boxes boxes = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; + int error = 0; + + catalog = pdf_file_get_catalog(pf); + + if (page_name) { + page_by_name(catalog, page_name, &boxes); + } else if (page_no > 0) { + page_tree = pdf_deref_obj(pdf_lookup_dict(catalog, "Pages")); + page_by_number(page_tree, page_no, &boxes); + } else { + WARN("Invalid page number: %d", page_no); + goto error_exit; + } + + page_tree = boxes.page_tree; + + if (!PDF_OBJ_DICTTYPE(page_tree)) + goto error_exit; + + if (!PDF_OBJ_DICTTYPE(boxes.resources)) goto error_exit; if (resources_p) - *resources_p = pdf_link_obj(resources); + *resources_p = pdf_link_obj(boxes.resources); /* Select page boundary box */ - error = set_bounding_box(bbox, opt_bbox, media_box, crop_box, art_box, trim_box, bleed_box); + error = set_bounding_box(bbox, opt_bbox, boxes.media_box, boxes.crop_box, boxes.art_box, boxes.trim_box, boxes.bleed_box); if (error) goto error_exit; /* Set transformation matrix */ - error = set_transform_matrix(matrix, bbox, rotate); + error = set_transform_matrix(matrix, bbox, boxes.rotate); if (error) goto error_exit; @@ -1223,20 +1460,20 @@ goto clean_exit; /* Success */ page_tree = NULL; clean_exit: - if (crop_box) - pdf_release_obj(crop_box); - if (bleed_box) - pdf_release_obj(bleed_box); - if (trim_box) - pdf_release_obj(trim_box); - if (art_box) - pdf_release_obj(art_box); - if (media_box) - pdf_release_obj(media_box); - if (rotate) - pdf_release_obj(rotate); - if (resources) - pdf_release_obj(resources); + if (boxes.crop_box) + pdf_release_obj(boxes.crop_box); + if (boxes.bleed_box) + pdf_release_obj(boxes.bleed_box); + if (boxes.trim_box) + pdf_release_obj(boxes.trim_box); + if (boxes.art_box) + pdf_release_obj(boxes.art_box); + if (boxes.media_box) + pdf_release_obj(boxes.media_box); + if (boxes.rotate) + pdf_release_obj(boxes.rotate); + if (boxes.resources) + pdf_release_obj(boxes.resources); return page_tree; } diff --git a/source/texk/dvipdfm-x/pdfdoc.h b/source/texk/dvipdfm-x/pdfdoc.h index bd8bf3beda..85e05bf92d 100644 --- a/source/texk/dvipdfm-x/pdfdoc.h +++ b/source/texk/dvipdfm-x/pdfdoc.h @@ -94,7 +94,8 @@ extern pdf_obj *pdf_doc_get_reference(const char *category); #define pdf_doc_this_page() pdf_doc_get_dictionary("@THISPAGE") extern int pdf_doc_get_page_count(pdf_file *pf); -extern pdf_obj *pdf_doc_get_page(pdf_file *pf, int page_no, enum pdf_page_boundary opt_bbox, +extern pdf_obj *pdf_doc_get_page(pdf_file *pf, int page_no, char * page_name, + enum pdf_page_boundary opt_bbox, pdf_rect *bbox, pdf_tmatrix *matrix, pdf_obj **resources_p); extern int pdf_doc_current_page_number(void); diff --git a/source/texk/dvipdfm-x/pdfximage.c b/source/texk/dvipdfm-x/pdfximage.c index 92ee5142d2..016583fdd5 100644 --- a/source/texk/dvipdfm-x/pdfximage.c +++ b/source/texk/dvipdfm-x/pdfximage.c @@ -79,6 +79,7 @@ struct attr_ int bbox_type; /* Ugh */ pdf_obj *dict; char tempfile; + char *page_name; }; struct pdf_ximage_ @@ -143,6 +144,8 @@ pdf_init_ximage_struct (pdf_ximage *I) I->attr.dict = NULL; I->attr.tempfile = 0; + + I->attr.page_name = NULL; } static void @@ -302,6 +305,7 @@ load_image (const char *ident, const char *filename, const char *fullname, int f } I->attr.page_no = options.page_no; + I->attr.page_name = options.page_name; I->attr.bbox_type = options.bbox_type; I->attr.dict = options.dict; /* unsafe? */ @@ -411,6 +415,7 @@ pdf_ximage_load_image (const char *ident, const char *filename, load_options opt } if (id >= 0) { if (I->attr.page_no == options.page_no && + strcmp(I->attr.page_name, options.page_name) == 0 && !pdf_compare_object(I->attr.dict, options.dict) && /* ????? */ I->attr.bbox_type == options.bbox_type) { return id; diff --git a/source/texk/dvipdfm-x/pdfximage.h b/source/texk/dvipdfm-x/pdfximage.h index 6cd99055dc..92f9021d4a 100644 --- a/source/texk/dvipdfm-x/pdfximage.h +++ b/source/texk/dvipdfm-x/pdfximage.h @@ -54,6 +54,7 @@ typedef struct { int page_no; enum pdf_page_boundary bbox_type; pdf_obj *dict; + char *page_name; } load_options; typedef struct pdf_ximage_ pdf_ximage; diff --git a/source/texk/dvipdfm-x/spc_pdfm.c b/source/texk/dvipdfm-x/spc_pdfm.c index f6375cdcec..fffe27146e 100644 --- a/source/texk/dvipdfm-x/spc_pdfm.c +++ b/source/texk/dvipdfm-x/spc_pdfm.c @@ -1235,7 +1235,7 @@ spc_handler_pdfm_image (struct spc_env *spe, struct spc_arg *args) char *ident = NULL; pdf_obj *fspec; transform_info ti; - load_options options = {1, 0, NULL}; + load_options options = {1, 0, NULL, NULL}; skip_white(&args->curptr, args->endptr); if (args->curptr[0] == '@') { @@ -1250,7 +1250,8 @@ spc_handler_pdfm_image (struct spc_env *spe, struct spc_arg *args) */ transform_info_clear(&ti); if (spc_util_read_blahblah(spe, &ti, - &options.page_no, &options.bbox_type, args) < 0) { + &options.page_no, &options.bbox_type, + &options.page_name, args) < 0) { spc_warn(spe, "Reading option field in pdf:image failed."); if (ident) RELEASE(ident); diff --git a/source/texk/dvipdfm-x/spc_util.c b/source/texk/dvipdfm-x/spc_util.c index efe44bef6b..de13c584c6 100644 --- a/source/texk/dvipdfm-x/spc_util.c +++ b/source/texk/dvipdfm-x/spc_util.c @@ -898,6 +898,7 @@ int spc_util_read_blahblah (struct spc_env *spe, transform_info *p, int *page_no, enum pdf_page_boundary *bbox_type, + char **page_name, struct spc_arg *ap) { int has_scale, has_xscale, has_yscale, has_rotate, has_matrix; @@ -912,6 +913,8 @@ spc_util_read_blahblah (struct spc_env *spe, "page", #define K__PAGEBOX 12 "pagebox", +#define K__NAMED 13 + "named", NULL }; double xscale, yscale, rotate; @@ -1055,6 +1058,11 @@ spc_util_read_blahblah (struct spc_env *spe, } } break; + case K__NAMED: + { + *page_name = parse_c_string (&ap->curptr, ap->endptr); + } + break; default: error = -1; diff --git a/source/texk/dvipdfm-x/spc_util.h b/source/texk/dvipdfm-x/spc_util.h index 63ec8f83c6..6310477ed9 100644 --- a/source/texk/dvipdfm-x/spc_util.h +++ b/source/texk/dvipdfm-x/spc_util.h @@ -45,6 +45,7 @@ extern int spc_util_read_blahblah (struct spc_env *spe, transform_info *dimtrns, int *page_no, enum pdf_page_boundary *bbox_type, + char **page_name, struct spc_arg *args); diff --git a/source/texk/dvipdfm-x/xbb.c b/source/texk/dvipdfm-x/xbb.c index e3a9c8dae3..1786396ac0 100644 --- a/source/texk/dvipdfm-x/xbb.c +++ b/source/texk/dvipdfm-x/xbb.c @@ -260,7 +260,7 @@ static void do_pdf (FILE *fp, char *filename) return; } count = pdf_doc_get_page_count(pf); - page = pdf_doc_get_page(pf, page_no, PageBox, &bbox, &matrix, NULL); + page = pdf_doc_get_page(pf, page_no, NULL, PageBox, &bbox, &matrix, NULL); pdf_close(pf); diff --git a/source/texk/kpathsea/ChangeLog b/source/texk/kpathsea/ChangeLog index 4d166d0ebd..3bdb457c7b 100644 --- a/source/texk/kpathsea/ChangeLog +++ b/source/texk/kpathsea/ChangeLog @@ -1,3 +1,15 @@ +2024-02-23 Karl Berry + + * texmf.cnf (XE_FONTCONFIG_PATH, XE_FC_CACHEDIR): rename from + FONTCONFIG_PATH resp. FC_CACHEDIR so we don't collide with + system directories specified by those paths, such as /etc/fonts. + +2024-02-22 Karl Berry + + * tests/kpsereadlink.test: create and use our own test file and + symlink, instead of using libtool's, in case slibtool is in use. + From orbea, https://github.com/TeX-Live/texlive-source/pull/65. + 2023-02-10 Karl Berry * texmf.cnf (TEXMFVAR, TEXMFCONFIG, doc): 2024. diff --git a/source/texk/kpathsea/tests/kpsereadlink.test b/source/texk/kpathsea/tests/kpsereadlink.test index 3b3570aa8d..2e1a852494 100755 --- a/source/texk/kpathsea/tests/kpsereadlink.test +++ b/source/texk/kpathsea/tests/kpsereadlink.test @@ -1,14 +1,23 @@ #! /bin/sh -vx # $Id$ -# Copyright 2017 Karl Berry +# Copyright 2017-2024 Karl Berry # Copyright 2010 Peter Breitenlohner # You may freely use, modify and/or distribute this file. +test -n "$LN_S" || LN_S="ln -s" # standalone testing + test "x$LN_S" = 'xln -s' || exit 77 -./kpsereadlink $LT_OBJDIR/libkpathsea.lai && exit 1 +rm -f readlink_test_file readlink_test_symlink + +touch readlink_test_file + +$LN_S readlink_test_file readlink_test_symlink || exit 1 + +./kpsereadlink readlink_test_file && exit 1 -link=`./kpsereadlink $LT_OBJDIR/libkpathsea.la` || exit 1 +link=`./kpsereadlink readlink_test_symlink` || exit 1 -test "x$link" = x../libkpathsea.la || exit 1 +test "x$link" = xreadlink_test_file || exit 1 +rm -f readlink_test_file readlink_test_symlink diff --git a/source/texk/kpathsea/texmf.cnf b/source/texk/kpathsea/texmf.cnf index 83faca77da..4cb01e45b1 100644 --- a/source/texk/kpathsea/texmf.cnf +++ b/source/texk/kpathsea/texmf.cnf @@ -455,12 +455,12 @@ MIMELIBDIR = $TEXMFROOT/etc MAILCAPLIBDIR = $TEXMFROOT/etc % Default settings for the fontconfig library as used by the Windows -% versions of xetex/xdvipdfmx. Not used by xetex on Unixish systems. -% ConTeXT MkIV (all platforms) also use these values. +% versions of xetex/xdvipdfmx. Not used by xetex itself on Unixish systems, +% but the postaction for xetex uses all of these on all systems. % FONTCONFIG_FILE = fonts.conf -FONTCONFIG_PATH = $TEXMFSYSVAR/fonts/conf -FC_CACHEDIR = $TEXMFSYSVAR/fonts/cache +XE_FONTCONFIG_PATH = $TEXMFSYSVAR/fonts/conf +XE_FC_CACHEDIR = $TEXMFSYSVAR/fonts/cache % TeX documentation and source files, for use with texdoc and kpsewhich. TEXDOCS = $TEXMF/doc// diff --git a/source/texk/tests/TeXLive/TLUtils.pm b/source/texk/tests/TeXLive/TLUtils.pm index 2f963f081c..c49e701b94 100644 --- a/source/texk/tests/TeXLive/TLUtils.pm +++ b/source/texk/tests/TeXLive/TLUtils.pm @@ -7,7 +7,7 @@ use strict; use warnings; package TeXLive::TLUtils; -my $svnrev = '$Revision: 69653 $'; +my $svnrev = '$Revision: 69980 $'; my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown"; sub module_revision { return $_modulerevision; } @@ -4863,29 +4863,30 @@ sub report_tlpdb_differences { if (defined($ret{'removed_packages'})) { info ("removed packages from A to B:\n"); - for my $f (@{$ret{'removed_packages'}}) { + for my $f (sort @{$ret{'removed_packages'}}) { info (" $f\n"); } } if (defined($ret{'added_packages'})) { info ("added packages from A to B:\n"); - for my $f (@{$ret{'added_packages'}}) { + for my $f (sort @{$ret{'added_packages'}}) { info (" $f\n"); } } if (defined($ret{'different_packages'})) { info ("different packages from A to B:\n"); - for my $p (keys %{$ret{'different_packages'}}) { + for my $p (sort keys %{$ret{'different_packages'}}) { info (" $p\n"); - for my $k (keys %{$ret{'different_packages'}->{$p}}) { + for my $k (sort keys %{$ret{'different_packages'}->{$p}}) { if ($k eq "revision") { info(" revision differ: $ret{'different_packages'}->{$p}->{$k}\n"); } elsif ($k eq "removed" || $k eq "added") { info(" $k files:\n"); - for my $f (@{$ret{'different_packages'}->{$p}->{$k}}) { + for my $f (sort @{$ret{'different_packages'}->{$p}->{$k}}) { info(" $f\n"); } } else { + # e.g., fmttriggers; don't bother making a nice report. info(" unknown differ $k\n"); } } diff --git a/source/texk/texlive/tl_support/fmtutil.1 b/source/texk/texlive/tl_support/fmtutil.1 index 8b5e015375..3e8c6c3c9f 100644 --- a/source/texk/texlive/tl_support/fmtutil.1 +++ b/source/texk/texlive/tl_support/fmtutil.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH FMTUTIL "1" "February 2023" "TeX Live" "User Commands" +.TH FMTUTIL "1" "February 2024" "TeX Live" "User Commands" .SH NAME fmtutil \- manage TeX formats and Metafont bases, per-user .br @@ -19,7 +19,7 @@ mktexfmt \- create a TeX format or Metafont base .B mktexfmt \fI\,FORMAT.fmt|BASE.base|FMTNAME\/\fR .SH DESCRIPTION -fmtutil version r65989 (2023\-02\-20 22:52:59 +0100) +fmtutil version r68962 (2023\-11\-25 00:01:43 +0100) .PP Rebuild and manage TeX fmts and Metafont bases, collectively called "formats" here. (MetaPost no longer uses the past\-equivalent "mems".) @@ -96,7 +96,7 @@ be silent .TP \fB\-\-test\fR (does nothing, exists for compatibility) -.SS "Commands:" +.SS "Commands (exactly one must be specified):" .TP \fB\-\-all\fR recreate all format files @@ -253,6 +253,11 @@ If an engine name ends with "\-dev", formats are created in the respective directory with the \fB\-dev\fR stripped. This allows for easily running development binaries in parallel with the released binaries. +.SH ENVIRONMENT +.IP +This script runs TeX and Metafont to generate the fmt/base file, and +thus all normal environment variables and search path rules for TeX/MF +apply. .SH "REPORTING BUGS" Report bugs to: tex\-live@tug.org .br diff --git a/source/texk/texlive/tl_support/updmap.1 b/source/texk/texlive/tl_support/updmap.1 index de409b33f3..bb17e99872 100644 --- a/source/texk/texlive/tl_support/updmap.1 +++ b/source/texk/texlive/tl_support/updmap.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH UPDMAP "1" "February 2023" "TeX Live" "User Commands" +.TH UPDMAP "1" "February 2024" "TeX Live" "User Commands" .SH NAME updmap \- manage TeX font maps .br diff --git a/source/texk/web2c/ChangeLog b/source/texk/web2c/ChangeLog index 9a68c6de1b..c2d202632b 100644 --- a/source/texk/web2c/ChangeLog +++ b/source/texk/web2c/ChangeLog @@ -1,3 +1,7 @@ +2024-02-20 Karl Berry + + * doc/web2c.texi: 2024. + 2024-02-11 Karl Berry * am/cweb.am (dist_bin_SCRIPTS): add cwebdir/twill-refsort. diff --git a/source/texk/web2c/doc/web2c.info b/source/texk/web2c/doc/web2c.info index 38de4baf44..c8fe8cf6c2 100644 --- a/source/texk/web2c/doc/web2c.info +++ b/source/texk/web2c/doc/web2c.info @@ -1,10 +1,10 @@ -This is web2c.info, produced by makeinfo version 7.0.3 from web2c.texi. +This is web2c.info, produced by makeinfo version 6.7 from web2c.texi. This file documents the installation and use of the programs in Web2c, -an implementation of Donald Knuth’s TeX system. +an implementation of Donald Knuth's TeX system. - Copyright Š 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -2005, 2007, 2008, 2009, 2010–2023 Karl Berry & Olaf Weber. + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +2005, 2007, 2008, 2009, 2010-2023 Karl Berry & Olaf Weber. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -58,7 +58,7 @@ Web2c This document describes how to install and use the programs in the Web2c implementation of the TeX system, especially for Unix systems. It -corresponds to Web2c version 2023, released in October 2023. +corresponds to Web2c version 2024, released in March 2024. * Menu: @@ -83,12 +83,12 @@ File: web2c.info, Node: Introduction, Next: Installation, Prev: Top, Up: Top 1 Introduction ************** -This manual corresponds to version 2023 of Web2c, released in October -2023. +This manual corresponds to version 2024 of Web2c, released in March +2024. - “Web2c” (also spelled Web2C) is the name of a TeX implementation, + "Web2c" (also spelled Web2C) is the name of a TeX implementation, originally for Unix, but now also running under Windows and other -operating systems. By “TeX implementation”, we mean all of the standard +operating systems. By "TeX implementation", we mean all of the standard programs developed by the Stanford TeX project led by Donald E. Knuth: Metafont, DVItype, GFtoDVI, BibTeX, Tangle, etc., as well as TeX itself. Other programs are also included: DVIcopy, written by Peter @@ -98,10 +98,10 @@ John Hobby, and many more. General strategy: Web2c works, as its name implies, by translating the WEB source in which TeX is written into C source code. Its output is not self-contained, however; it makes extensive use of many macros -and functions in a library (the ‘web2c/lib’ directory in the sources). +and functions in a library (the 'web2c/lib' directory in the sources). Therefore, it will not work without change on an arbitrary WEB program. - Availability: All of Web2c is freely available—“free” both in the + Availability: All of Web2c is freely available--"free" both in the sense of no cost (free ice cream) and of having the source code to modify and/or redistribute (free speech). *Note (kpathsea)unixtex.ftp::, for the practical details of how to obtain @@ -115,7 +115,7 @@ executables are covered by the GNU General Public License or GNU Lesser General Public License, and therefore anyone who gets a binary distribution must also be able to get the sources, as explained by the terms of the GPL (). The GPL covers the -Web2c executables, including ‘tex’, because the Free Software Foundation +Web2c executables, including 'tex', because the Free Software Foundation sponsored the initial development of the Kpathsea library that Web2c uses. The basic source files from Stanford, however, have their own copyright terms or are in the public domain, and are not covered by the @@ -130,7 +130,7 @@ He made many changes to the original sources, and started using the shorter name Web2c. In 1997, Olaf Weber took over, and then in 2006, Karl started taking care of it again. No significant development or changes have been needed for many years, though dozens of other people -have contributed in many ways; their names are listed in the ‘ChangeLog’ +have contributed in many ways; their names are listed in the 'ChangeLog' files. Originally, Web2c was distributed as its own package, alongside the @@ -156,109 +156,109 @@ File: web2c.info, Node: Installation, Next: Commonalities, Prev: Introduction 2 Installation ************** -(A copy of this chapter is in the distribution file ‘web2c/INSTALL’.) +(A copy of this chapter is in the distribution file 'web2c/INSTALL'.) Installing Web2c is mostly the same as installing any other Kpathsea-using program. Therefore, for the basic steps involved, see *note (kpathsea)Installation::. (A copy is in the file -‘kpathsea/INSTALL’.) +'kpathsea/INSTALL'.) One peculiarity to Web2c is that the source distribution comes in two -files: ‘web.tar.gz’ and ‘web2c.tar.gz’. You must retrieve and unpack +files: 'web.tar.gz' and 'web2c.tar.gz'. You must retrieve and unpack them both. (We have two because the former archive contains the very large and seldom-changing original WEB source files.) *Note (kpathsea)unixtex.ftp::. Another peculiarity is the MetaPost program. Although it has been -installed previously as ‘mp’, as of Web2c 7.0 the installed name is now -‘mpost’, to avoid conflict with the ‘mp’ program that does +installed previously as 'mp', as of Web2c 7.0 the installed name is now +'mpost', to avoid conflict with the 'mp' program that does prettyprinting. This approach was recommended by the MetaPost author, John Hobby. If you as the TeX administrator wish to make it available under its shorter name as well, you will have to set up a link or some such yourself. And of course individual users can do the same. For solutions to common installation problems and information on how -to report a bug, see the file ‘kpathsea/BUGS’ (*note (kpathsea)Bugs::). +to report a bug, see the file 'kpathsea/BUGS' (*note (kpathsea)Bugs::). See also the Web2c home page, . Points worth repeating: - • Before starting the standard compilation and installation you must + * Before starting the standard compilation and installation you must install the basic fonts, macros, and other library files. *Note (kpathsea)Installation::. - • If you do not wish to use the standard file locations, see *note + * If you do not wish to use the standard file locations, see *note (kpathsea)Changing search paths::. - • Some Web2c features are enabled or disabled at ‘configure’ time, as + * Some Web2c features are enabled or disabled at 'configure' time, as described in the first section below. * Menu: -* configure options:: Especially –with and –enable. -* Compile-time options:: Unusual -D’s. +* configure options:: Especially -with and -enable. +* Compile-time options:: Unusual -D's. * Additional targets:: Breaking down the task. * Triptrap:: Running the torture tests.  File: web2c.info, Node: configure options, Next: Compile-time options, Up: Installation -2.1 ‘configure’ options +2.1 'configure' options ======================= -This section gives pointers to descriptions of the ‘--with’ and -‘--enable’ ‘configure’ arguments that Web2c accepts. Some are specific +This section gives pointers to descriptions of the '--with' and +'--enable' 'configure' arguments that Web2c accepts. Some are specific to Web2c, others are generic to all Kpathsea-using programs. - For a list of all the options ‘configure’ accepts, run ‘configure ---help’. The generic options are listed first, and the package-specific + For a list of all the options 'configure' accepts, run 'configure +--help'. The generic options are listed first, and the package-specific options come last. For a description of the generic options (which mainly allow you to -specify installation directories) and basic ‘configure’ usage, see *note -Running ‘configure’ scripts: (autoconf)Invoking configure, a copy is in -the file ‘kpathsea/CONFIGURE’. +specify installation directories) and basic 'configure' usage, see *note +Running 'configure' scripts: (autoconf)Invoking configure, a copy is in +the file 'kpathsea/CONFIGURE'. -‘--disable-dump-share’ +'--disable-dump-share' Do not make fmt/base/mem files sharable across different endian architectures. *Note Hardware and memory dumps::. -‘--without-maketexmf-default’ -‘--without-maketexpk-default’ -‘--without-maketextfm-default’ -‘--with-maketextex-default’ +'--without-maketexmf-default' +'--without-maketexpk-default' +'--without-maketextfm-default' +'--with-maketextex-default' Enable or disable the dynamic generation programs. *Note (kpathsea)mktex configuration::. The defaults are the inverse of - the options, i.e., everything is enabled except ‘mktextex’. + the options, i.e., everything is enabled except 'mktextex'. -‘--enable-shared’ +'--enable-shared' Build Kpathsea as a shared library. *Note (kpathsea)Shared library::. -‘--with-editor=CMD’ - Change the default editor invoked by the ‘e’ interactive command. +'--with-editor=CMD' + Change the default editor invoked by the 'e' interactive command. *Note Editor invocation::. -‘--with-epsfwin’ -‘--with-hp2627win’ -‘--with-mftalkwin’ -‘--with-nextwin’ -‘--with-regiswin’ -‘--with-suntoolswin’ -‘--with-tektronixwin’ -‘--with-unitermwin’ -‘--with-x’ -‘--with-x-toolkit=KIT’ -‘--with-x11win’ -‘--with-x11’ +'--with-epsfwin' +'--with-hp2627win' +'--with-mftalkwin' +'--with-nextwin' +'--with-regiswin' +'--with-suntoolswin' +'--with-tektronixwin' +'--with-unitermwin' +'--with-x' +'--with-x-toolkit=KIT' +'--with-x11win' +'--with-x11' Define Metafont graphics support; by default, no graphics support is enabled. *Note Online Metafont graphics::. -‘--x-includes=DIR’ -‘--x-libraries=DIR’ +'--x-includes=DIR' +'--x-libraries=DIR' Define the locations of the X11 include files and libraries; by - default, ‘configure’ does its best to guess). *Note - (autoconf)Optional Features::. A copy is in ‘kpathsea/CONFIGURE’. + default, 'configure' does its best to guess). *Note + (autoconf)Optional Features::. A copy is in 'kpathsea/CONFIGURE'.  File: web2c.info, Node: Compile-time options, Next: Additional targets, Prev: configure options, Up: Installation @@ -266,28 +266,28 @@ File: web2c.info, Node: Compile-time options, Next: Additional targets, Prev: 2.2 Compile-time options ======================== -In addition to the ‘configure’ options listed in the previous section, +In addition to the 'configure' options listed in the previous section, there are a few things that can be affected at compile-time with C -definitions, rather than with ‘configure’. Using any of these is +definitions, rather than with 'configure'. Using any of these is unusual. - To specify extra compiler flags (‘-DNAME’ in this case), the simplest + To specify extra compiler flags ('-DNAME' in this case), the simplest thing to do is: make XCFLAGS="CCOPTIONS" -You can also set the ‘CFLAGS’ environment variable before running -‘configure’. *Note (kpathsea)configure environment::. +You can also set the 'CFLAGS' environment variable before running +'configure'. *Note (kpathsea)configure environment::. Anyway, here are the possibilities: -‘-DFIXPT’ -‘-DNO_MF_ASM’ +'-DFIXPT' +'-DNO_MF_ASM' Use the original WEB fixed-point routines for Metafont and MetaPost arithmetic calculations regarding fractions. By default, assembly-language routines are used on x86 hardware with GNU C - (unless ‘NO_MF_ASM’ is defined), and floating-point routines are + (unless 'NO_MF_ASM' is defined), and floating-point routines are used otherwise. -‘-DIPC_DEBUG’ +'-DIPC_DEBUG' Report on various interprocess communication activities. *Note IPC and TeX: IPC and TeX. @@ -299,39 +299,39 @@ File: web2c.info, Node: Additional targets, Next: Triptrap, Prev: Compile-tim Web2c has several Make targets besides the standard ones. You can invoke these either in the top level directory of the source -distribution (the one containing ‘kpathsea/’ and ‘web2c/’), or in the -‘web2c/’ directory. +distribution (the one containing 'kpathsea/' and 'web2c/'), or in the +'web2c/' directory. -‘c-sources’ +'c-sources' Make only the C files, translated from the Web sources, presumably because you want to take them to a non-Unix machine. -‘formats’ -‘install-formats’ +'formats' +'install-formats' Make or install all the memory dumps (*note Memory dumps::). By - default, the standard plain formats plus ‘latex.fmt’ are made. You - can add other formats by redefining the ‘fmts’, ‘bases’, and ‘mems’ - variables. See the top of ‘web2c/Makefile’ for the possibilities. + default, the standard plain formats plus 'latex.fmt' are made. You + can add other formats by redefining the 'fmts', 'bases', and 'mems' + variables. See the top of 'web2c/Makefile' for the possibilities. -‘fmts’ -‘install-fmts’ - Make or install the TeX ‘.fmt’ files. *Note Initial TeX::. +'fmts' +'install-fmts' + Make or install the TeX '.fmt' files. *Note Initial TeX::. -‘bases’ -‘install-bases’ +'bases' +'install-bases' - Make or install the Metafont ‘.base’ files. *Note Initial + Make or install the Metafont '.base' files. *Note Initial Metafont::. -‘mems’ -‘install-mems’ - Make or install the MetaPost ‘.mem’ files. *Note Initial +'mems' +'install-mems' + Make or install the MetaPost '.mem' files. *Note Initial MetaPost::. -‘triptrap’ -‘trip’ -‘trap’ -‘mptrap’ +'triptrap' +'trip' +'trap' +'mptrap' To run the torture tests for TeX, Metafont, and MetaPost (respectively). See the next section. @@ -341,38 +341,38 @@ File: web2c.info, Node: Triptrap, Prev: Additional targets, Up: Installation 2.4 Trip, trap, and mptrap: Torture tests ========================================= -To validate your TeX, Metafont, and MetaPost executables, run ‘make -triptrap’. This runs the trip, trap, and mptrap “torture tests”. See -the files ‘triptrap/tripman.tex’, ‘triptrap/trapman.tex’, and -‘triptrap/mptrap.readme’ for detailed information and background on the +To validate your TeX, Metafont, and MetaPost executables, run 'make +triptrap'. This runs the trip, trap, and mptrap "torture tests". See +the files 'triptrap/tripman.tex', 'triptrap/trapman.tex', and +'triptrap/mptrap.readme' for detailed information and background on the tests. - The differences between your executables’ behavior and the standard + The differences between your executables' behavior and the standard values will show up on your terminal. The usual differences (these are all acceptable) are: - • string usage and table sizes; - • glue set ratios; - • ‘down4’, ‘right4’, and ‘y4’ commands in DVItype output; - • dates and times. + * string usage and table sizes; + * glue set ratios; + * 'down4', 'right4', and 'y4' commands in DVItype output; + * dates and times. Any other differences are trouble. The most common culprit in the past has been compiler bugs, especially when optimizing. *Note TeX or Metafont failing: (kpathsea)TeX or Metafont failing. - The files ‘trip.diffs’, ‘mftrap.diffs’, and ‘mptrap.diffs’ in the -‘triptrap’ directory show the standard diffs against the original + The files 'trip.diffs', 'mftrap.diffs', and 'mptrap.diffs' in the +'triptrap' directory show the standard diffs against the original output. If you diff your diffs against these files, you should come up clean. For example make trip >&mytrip.diffs diff triptrap/trip.diffs mytrip.diffs - To run the tests separately, use the targets ‘trip’, ‘trap’, and -‘mptrap’. + To run the tests separately, use the targets 'trip', 'trap', and +'mptrap'. To run simple tests for all the programs as well as the torture -tests, run ‘make check’. You can compare the output to the distributed -file ‘tests/check.log’ if you like. +tests, run 'make check'. You can compare the output to the distributed +file 'tests/check.log' if you like.  File: web2c.info, Node: Commonalities, Next: Three programs, Prev: Installation, Up: Top @@ -388,10 +388,10 @@ available across all the engines; *note TeX extensions::. * Menu: -* Option conventions:: – or -, = or ‘ ’ for values. -* Common options:: –help –version –verbose, and TeX/MF/MP options. +* Option conventions:: - or -, = or ' ' for values. +* Common options:: -help -version -verbose, and TeX/MF/MP options. * Path searching:: Features of the common path searching library. -* Output file location:: TEXMFOUTPUT allows output in places other than ‘.’. +* Output file location:: TEXMFOUTPUT allows output in places other than '.'.  File: web2c.info, Node: Option conventions, Next: Common options, Up: Commonalities @@ -400,20 +400,20 @@ File: web2c.info, Node: Option conventions, Next: Common options, Up: Commona ====================== To provide a clean and consistent behavior, we chose to have all these -programs use the GNU function ‘getopt_long_only’ to parse command lines. +programs use the GNU function 'getopt_long_only' to parse command lines. However, we do use in a restricted mode, where all the options have to come before the rest of the arguments. As a result, you can: - • use ‘-’ or ‘--’ to start an option name; + * use '-' or '--' to start an option name; - • use any unambiguous abbreviation for an option name; + * use any unambiguous abbreviation for an option name; - • separate option names and values with either ‘=’ or one or more + * separate option names and values with either '=' or one or more spaces; - • use filenames that would otherwise look like options by putting - them after an option ‘--’. + * use filenames that would otherwise look like options by putting + them after an option '--'. By convention, non-option arguments, if specified, generally define the name of an input file, as documented for each program. @@ -421,9 +421,9 @@ the name of an input file, as documented for each program. If a particular option with a value is given more than once, it is the last value that counts. - For example, the following command line specifies the options ‘foo’, -‘bar’, and ‘verbose’; gives the value ‘baz’ to the ‘abc’ option, and the -value ‘xyz’ to the ‘quux’ option; and specifies the filename ‘-myfile-’. + For example, the following command line specifies the options 'foo', +'bar', and 'verbose'; gives the value 'baz' to the 'abc' option, and the +value 'xyz' to the 'quux' option; and specifies the filename '-myfile-'. -foo --bar -verb -abc=baz -quux karl --quux xyz -- -myfile- @@ -433,114 +433,114 @@ File: web2c.info, Node: Common options, Next: Path searching, Prev: Option co 3.2 Common options ================== -All of these programs accept the standard GNU ‘--help’ and ‘--version’ -options, and several programs accept ‘--verbose’. Rather than writing +All of these programs accept the standard GNU '--help' and '--version' +options, and several programs accept '--verbose'. Rather than writing identical descriptions for every program, they are described here. -‘--help’ +'--help' Print a usage message listing basic usage and all available options to standard output, then exit successfully. -‘--verbose’ +'--verbose' Print progress reports to standard output. -‘--version’ +'--version' Print the version number to standard output, then exit successfully. TeX, Metafont, and MetaPost have a number of additional options in common: -‘-cnf-line=STR’ - Parse STR as if it were a line in the ‘texmf.cnf’ configuration +'-cnf-line=STR' + Parse STR as if it were a line in the 'texmf.cnf' configuration file, overriding all other settings. *Note (kpathsea)Path searching options::. -‘-file-line-error’ -‘-no-file-line-error’ +'-file-line-error' +'-no-file-line-error' Change (or do not change) the way error messages are printed. The alternate style looks like error messages from many compilers and is easier to parse for some editors that invoke TeX. This option - used to be called ‘-file-line-error-style’. - -‘-fmt=DUMPNAME’ -‘-base=DUMPNAME’ -‘-mem=DUMPNAME’ - Use DUMPNAME instead of the program name or a ‘%&’ line to - determine the name of the memory dump file read (‘fmt’ for TeX, - ‘base’ for Metafont, ‘mem’ for MetaPost). *Note Memory dumps::. - Also sets the program name to DUMPNAME if no ‘-progname’ option was + used to be called '-file-line-error-style'. + +'-fmt=DUMPNAME' +'-base=DUMPNAME' +'-mem=DUMPNAME' + Use DUMPNAME instead of the program name or a '%&' line to + determine the name of the memory dump file read ('fmt' for TeX, + 'base' for Metafont, 'mem' for MetaPost). *Note Memory dumps::. + Also sets the program name to DUMPNAME if no '-progname' option was given. -‘-halt-on-error’ +'-halt-on-error' Stop processing and exit when an error occurs, as opposed to the normal process of trying to recover and continue. -‘-ini’ - Enable the “initial” form of the program (*note Initial and - virgin::). This is implicitly set if the program name is ‘initex’ - resp. ‘inimf’. +'-ini' + Enable the "initial" form of the program (*note Initial and + virgin::). This is implicitly set if the program name is 'initex' + resp. 'inimf'. -‘-interaction=STRING’ +'-interaction=STRING' Set the interaction mode from the command line. The STRING must be - one of ‘batchmode’, ‘nonstopmode’, ‘scrollmode’, or - ‘errorstopmode’. + one of 'batchmode', 'nonstopmode', 'scrollmode', or + 'errorstopmode'. -‘-jobname=STRING’ +'-jobname=STRING' Set the job name to STRING, instead of deriving it from the name of the input file. -‘-kpathsea-debug=NUMBER’ +'-kpathsea-debug=NUMBER' Set path searching debugging flags according to the bits of NUMBER (*note (kpathsea)Debugging::). You can also specify this in - ‘KPATHSEA_DEBUG’ environment variable (for all Web2c programs). - (The command line value overrides.) The most useful value is ‘-1’, + 'KPATHSEA_DEBUG' environment variable (for all Web2c programs). + (The command line value overrides.) The most useful value is '-1', to get all available output. -‘-output-directory=DIRNAME’ +'-output-directory=DIRNAME' Specify the directory DIRNAME to which output files are written. Also look for input files in DIRNAME first, before looking along the normal search path. Input files are only looked for as specified; no default extension is added. *Note Output file location::. -‘-parse-first-line’ -‘-no-parse-first-line’ +'-parse-first-line' +'-no-parse-first-line' Check or disable checking whether the first line of the main input - file starts with ‘%&’, and parse it if it does. This line can be + file starts with '%&', and parse it if it does. This line can be used specify the format and/or a TCX file. -‘-progname=STRING’ +'-progname=STRING' Set program (and memory dump) name to STRING. This may affect the search paths and other values used (*note (kpathsea)Config files::). Using this option is equivalent to making a link named STRING to the binary and then invoking the binary under that name. *Note Memory dumps::. -‘-recorder’ +'-recorder' Enable the filename recorder. This makes the program save a list - of the opened files into a file with (by default) extension ‘.fls’. + of the opened files into a file with (by default) extension '.fls'. For Aleph, this option is always on, and the file has extension - ‘.ofl’. + '.ofl'. - Ordinarily, the ‘.fls’ file is written to the same location as the - ‘.log’ file, for example, respecting ‘-output-directory’ if it is + Ordinarily, the '.fls' file is written to the same location as the + '.log' file, for example, respecting '-output-directory' if it is given (*note Output file location::). However, if TeX processing - is done on the command line (or in response to the ‘**’ prompt), - the ‘.fls’ might be written to the current directory, or include an - integer (the current pid), as in ‘texput1234.fls’. You can use - ‘-jobname’ to explicitly set the basename. + is done on the command line (or in response to the '**' prompt), + the '.fls' might be written to the current directory, or include an + integer (the current pid), as in 'texput1234.fls'. You can use + '-jobname' to explicitly set the basename. -‘-translate-file=TCXFILE’ +'-translate-file=TCXFILE' Use TCXFILE to define which characters are printable and translations between the internal and external character sets. Moreover, TCXFILE can be explicitly declared in the first line of - the main input file ‘%& -translate-file=TCXFILE’. This is the + the main input file '%& -translate-file=TCXFILE'. This is the recommended method for portability reasons. *Note TCX files::. -‘-8bit’ +'-8bit' This option specifies that by default all characters should be - considered printable. If ‘-translate-file’ was given as well, then + considered printable. If '-translate-file' was given as well, then the TCX file may mark characters as non-printable. This is a no-op in engines natively supporting Unicode. @@ -554,14 +554,14 @@ All of the Web2c programs, including TeX, which do path searching use the Kpathsea routines to do so. The precise names of the environment and configuration file variables which get searched for particular file formatted are therefore documented in the Kpathsea manual (*note -(kpathsea)Supported file formats::). Reading ‘texmf.cnf’ (*note -(kpathsea)Config files::), invoking ‘mktex...’ scripts (*note +(kpathsea)Supported file formats::). Reading 'texmf.cnf' (*note +(kpathsea)Config files::), invoking 'mktex...' scripts (*note (kpathsea)mktex scripts::), and so on are all handled by Kpathsea. The programs which read fonts make use of another Kpathsea feature: -‘texfonts.map’, which allows arbitrary aliases for the actual names of -font files; for example, ‘Times-Roman’ for ‘ptmr8r.tfm’. The -distributed (and installed by default) ‘texfonts.map’ includes aliases +'texfonts.map', which allows arbitrary aliases for the actual names of +font files; for example, 'Times-Roman' for 'ptmr8r.tfm'. The +distributed (and installed by default) 'texfonts.map' includes aliases for many widely available PostScript fonts by their PostScript names.  @@ -576,62 +576,62 @@ run, regardless of any input file location; or, in a few cases, output is to standard output. The main programs (TeX, Metafont, MetaPost) provide several ways to override this, as explained below. - For example, if you run ‘tex /tmp/foo’, by default the output will be -in ‘./foo.dvi’ and ‘./foo.log’, not ‘/tmp/foo.dvi’ and ‘/tmp/foo.log’. + For example, if you run 'tex /tmp/foo', by default the output will be +in './foo.dvi' and './foo.log', not '/tmp/foo.dvi' and '/tmp/foo.log'. An explicitly-given output location is also checked for input files, as TeX often generates files that need to be subsequently read. For input, the input filename is simply checked as given. No suffixes, such -as ‘.tex’, are added by default, and no exhaustive path searching is +as '.tex', are added by default, and no exhaustive path searching is done. -Override 1: ‘-output-directory’ option +Override 1: '-output-directory' option -------------------------------------- -If the ‘-output-directory’ option is specified, all output files that +If the '-output-directory' option is specified, all output files that would normally be written in the current directory are written in the specified directory instead. *Note Common options::. -Override 2: ‘TEXMF_OUTPUT_DIRECTORY’ environment variable +Override 2: 'TEXMF_OUTPUT_DIRECTORY' environment variable --------------------------------------------------------- -Furthermore, if the ‘-output-directory’ option is specified, its -argument is saved in the environment variable ‘TEXMF_OUTPUT_DIRECTORY’. +Furthermore, if the '-output-directory' option is specified, its +argument is saved in the environment variable 'TEXMF_OUTPUT_DIRECTORY'. This is for the benefit of any subprograms that might be called via -‘\write18’ (*note Shell escapes::), such as ‘kpsewhich’ (*note +'\write18' (*note Shell escapes::), such as 'kpsewhich' (*note (kpathsea)Invoking kpsewhich::). (This feature was added in TeX Live 2024.) - If the ‘-output-directory’ option is not specified, but the -environment variable ‘TEXMF_OUTPUT_DIRECTORY’ is set, then the + If the '-output-directory' option is not specified, but the +environment variable 'TEXMF_OUTPUT_DIRECTORY' is set, then the environment variable value is used just as if it had been given to the option. Warning: we most strongly recommend always setting -‘TEXMF_OUTPUT_DIRECTORY’ temporarily, for a given run. It has great +'TEXMF_OUTPUT_DIRECTORY' temporarily, for a given run. It has great potential for confusion, since with it set, output files will not be in the expected place. To reduce this chance somewhat, -‘TEXMF_OUTPUT_DIRECTORY’ must be set in the environment, not a +'TEXMF_OUTPUT_DIRECTORY' must be set in the environment, not a configuration file. -Override 3: ‘TEXMFOUTPUT’ environment variable +Override 3: 'TEXMFOUTPUT' environment variable ---------------------------------------------- -Finally, if neither ‘-output-directory’ nor ‘TEXMF_OUTPUT_DIRECTORY’ is +Finally, if neither '-output-directory' nor 'TEXMF_OUTPUT_DIRECTORY' is set, _and_ an output file is not writable, then the main programs (TeX, Metafont, MetaPost), plus BibTeX for this one case, make an exception: -if the config file or environment variable value ‘TEXMFOUTPUT’ is set +if the config file or environment variable value 'TEXMFOUTPUT' is set (it is not by default), the output file is written to the directory specified. Usually this is because the current directory is not -writable, and thus all output files are written to ‘TEXMFOUTPUT’, but +writable, and thus all output files are written to 'TEXMFOUTPUT', but technically it works on a file-by-file basis. None of these explicitly-given output locations are checked until (and unless) the program actually needs to write a file. For example, the invocation -‘tex --output-directory=/nonesuch \\end’ -won’t generate an error until TeX tries to write the log file: -‘! I can't write on file `texput.log'.’. +'tex --output-directory=/nonesuch \\end' +won't generate an error until TeX tries to write the log file: +'! I can't write on file `texput.log'.'.  File: web2c.info, Node: Three programs, Next: TeX, Prev: Commonalities, Up: Top @@ -645,10 +645,10 @@ described in the previous section. * Menu: -* Runtime options:: The ‘texmf.cnf’ configuration file. +* Runtime options:: The 'texmf.cnf' configuration file. * Initial and virgin:: Making memory dumps vs. production runs. * Memory dumps:: .fmt/.base files for fast startup. -* Editor invocation:: The ‘e’ response at errors. +* Editor invocation:: The 'e' response at errors. * \input filenames:: Filename delimiters and Kpathsea expansion.  @@ -659,26 +659,26 @@ File: web2c.info, Node: Runtime options, Next: Initial and virgin, Up: Three Besides the configure- and compile-time options described in the installation section (*note Installation::), you can control a number of -parameters in the ‘texmf.cnf’ runtime file read by Kpathsea (*note +parameters in the 'texmf.cnf' runtime file read by Kpathsea (*note (kpathsea)Config files::). - The main purpose of ‘texmf.cnf’ is to specify search paths, but array + The main purpose of 'texmf.cnf' is to specify search paths, but array sizes and other options are also set there. Most are rather obscure. Here are a few of the more interesting values: -‘main_memory’ +'main_memory' Total words of memory available, for TeX, Metafont, and MetaPost. Must remake the format file after changing. -‘extra_mem_bot’ - Extra space for “large” TeX data structures (default 0): boxes, +'extra_mem_bot' + Extra space for "large" TeX data structures (default 0): boxes, glue, breakpoints, et al. If you use PiCTeX, you may well want to set this. -‘expand_depth’ +'expand_depth' Limit on recursive expansion calls before TeX aborts (default 10000). If a TeX program does an unterminated recursive expansion, - TeX will dutifully expand macros until the system’s runtime stack + TeX will dutifully expand macros until the system's runtime stack overflows, typically with a segmentation fault (SIGSEGV). This parameter was introduced to minimize the chance of that unpleasant (though not dangerous) crash, instead allowing TeX to quit with a @@ -688,12 +688,12 @@ Here are a few of the more interesting values: exceptionally small memory allocation for its stack. There is no quantitative way to determine the limit, and it does not seem worth implementing system-dependent heuristics to guess at the number, - since it’s highly improbable that any real TeX code will ever need + since it's highly improbable that any real TeX code will ever need more than 10000 recursive expansions (it has never happened). For the same reason, using the libsigsegv library () does not seem worth the effort. -‘texmf_casefold_search’ +'texmf_casefold_search' *Note (kpathsea)Casefolding search::. Ideally all arrays would be dynamically expanded as necessary, so the @@ -708,13 +708,13 @@ hand, the Web2c BibTeX implementation does do true dynamic reallocation of some arrays.) Nowadays there is rarely a reason to modify the values. But if you -do wish to modify ‘texmf.cnf’, in TeX Live the best approach is to put +do wish to modify 'texmf.cnf', in TeX Live the best approach is to put your changes, and only your changes at the top of the TL installation -tree. That is, if the system ‘texmf.cnf’ is installed in -‘/some/path/to/texlive/YYYY/texmf-dist/web2c/texmf.cnf’ is put your -custom settings in ‘/some/path/to/texlive/YYY/texmf.cnf’, where YYYY is -the year of installation (if you use that subdirectory; it’s the -default). That way, unrelated changes to the system ‘texmf.cnf’ can +tree. That is, if the system 'texmf.cnf' is installed in +'/some/path/to/texlive/YYYY/texmf-dist/web2c/texmf.cnf' is put your +custom settings in '/some/path/to/texlive/YYY/texmf.cnf', where YYYY is +the year of installation (if you use that subdirectory; it's the +default). That way, unrelated changes to the system 'texmf.cnf' can happen with normal updates, without affecting your local values.  @@ -724,19 +724,19 @@ File: web2c.info, Node: Initial and virgin, Next: Memory dumps, Prev: Runtime ====================== The TeX and Metafont programs each have two main variants, called -“initial” and “virgin”. MetaPost no longer makes this distinction. +"initial" and "virgin". MetaPost no longer makes this distinction. The initial form is enabled if: - 1. the ‘-ini’ option was specified; or - 2. the program name is ‘initex’ resp. ‘inimf’; or - 3. the first line of the main input file is ‘%&ini’; + 1. the '-ini' option was specified; or + 2. the program name is 'initex' resp. 'inimf'; or + 3. the first line of the main input file is '%&ini'; otherwise, the virgin form is used. - The “virgin” form is the one generally invoked for production use. + The "virgin" form is the one generally invoked for production use. The first thing it does is read a memory dump (*note Determining the memory dump to use::), and then proceeds on with the main job. - The “initial” form is generally used only to create memory dumps (see + The "initial" form is generally used only to create memory dumps (see the next section). It starts up more slowly than the virgin form, because it must do lengthy initializations that are encapsulated in the memory dump file. @@ -748,7 +748,7 @@ File: web2c.info, Node: Memory dumps, Next: Editor invocation, Prev: Initial ================ In typical use, TeX and Metafont require a large number of macros to be -predefined; therefore, they support “memory dump” files, which can be +predefined; therefore, they support "memory dump" files, which can be read much more efficiently than ordinary source code. * Menu: @@ -767,7 +767,7 @@ The programs all create memory dumps in slightly idiosyncratic (thought substantially similar) way, so we describe the details in separate sections (references below). The basic idea is to run the initial version of the program (*note Initial and virgin::), read the source -file to define the macros, and then execute the ‘\dump’ primitive. +file to define the macros, and then execute the '\dump' primitive. Also, each program uses a different filename extension for its memory dumps, since although they are completely analogous they are not @@ -777,10 +777,10 @@ interchangeable (TeX cannot read a Metafont memory dump, for example). creating memory dumps: TeX - (‘.fmt’) *Note Initial TeX: Initial TeX. + ('.fmt') *Note Initial TeX: Initial TeX. Metafont - (‘.base’) *Note Initial Metafont::. + ('.base') *Note Initial Metafont::. When making memory dumps, the programs read environment variables and configuration files for path searching and other values as usual. If @@ -798,29 +798,29 @@ The virgin form (*note Initial and virgin::) of each program always reads a memory dump before processing normal source input. All three programs determine the memory dump to use in the same way: - 1. If the first non-option command-line argument begins with ‘&’, the + 1. If the first non-option command-line argument begins with '&', the program uses the remainder of that argument as the memory dump - name. For example, running ‘tex \&super’ reads ‘super.fmt’. (The - backslash protects the ‘&’ against interpretation by the shell.) + name. For example, running 'tex \&super' reads 'super.fmt'. (The + backslash protects the '&' against interpretation by the shell.) - 2. If the ‘-fmt’ resp. ‘-base’ option is specified, its value is used. + 2. If the '-fmt' resp. '-base' option is specified, its value is used. - 3. If the ‘-progname’ option is specified, its value is used. + 3. If the '-progname' option is specified, its value is used. 4. If the first line of the main input file (which must be specified - on the command line, not in response to ‘**’) is ‘%&DUMP’, and DUMP + on the command line, not in response to '**') is '%&DUMP', and DUMP is an existing memory dump of the appropriate type, DUMP is used. The first line of the main input file can also specify which character translation file is to be used: - ‘%&-translate-file=TCXFILE’ (*note TCX files::). + '%&-translate-file=TCXFILE' (*note TCX files::). - These two roles can be combined: ‘%&DUMP -translate-file=TCXFILE’. + These two roles can be combined: '%&DUMP -translate-file=TCXFILE'. If this is done, the name of the dump must be given first. 5. Otherwise, the program uses the program invocation name, most - commonly ‘tex’ resp. ‘mf’. For example, if ‘latex’ is a link to - ‘tex’, and the user runs ‘latex foo’, ‘latex.fmt’ will be used. + commonly 'tex' resp. 'mf'. For example, if 'latex' is a link to + 'tex', and the user runs 'latex foo', 'latex.fmt' will be used.  File: web2c.info, Node: Hardware and memory dumps, Prev: Determining the memory dump to use, Up: Memory dumps @@ -830,41 +830,41 @@ File: web2c.info, Node: Hardware and memory dumps, Prev: Determining the memor By default, memory dump files are sharable between architectures of different types; specifically, on machines of different endianness -(*note (libc)Byte order::) and with different word sizes (4-byte ‘long’ -vs. 8-byte ‘long’). This is a feature of the Web2c implementation, and +(*note (libc)Byte order::) and with different word sizes (4-byte 'long' +vs. 8-byte 'long'). This is a feature of the Web2c implementation, and is not true of all TeX implementations. - The script ‘tl-check-fmtshare’ in the TeX Live source tree -(‘Master/tlpkg/bin’) provides a relatively easy way to test that a -‘.fmt’ built on the local host can be loaded by a TeX engine built on + The script 'tl-check-fmtshare' in the TeX Live source tree +('Master/tlpkg/bin') provides a relatively easy way to test that a +'.fmt' built on the local host can be loaded by a TeX engine built on some remote host. - If you specify ‘--disable-dump-share’ to ‘configure’, however, memory + If you specify '--disable-dump-share' to 'configure', however, memory dumps will be endian-dependent. The reason to do this is speed. To achieve endian-independence, the reading of memory dumps on LittleEndian -architectures, such as PC’s and DEC architectures, is somewhat slowed +architectures, such as PC's and DEC architectures, is somewhat slowed (all the multibyte values have to be swapped). Usually, this is not noticeable, and the advantage of being able to share memory dumps across -all platforms at a site far outweighs the speed loss. But if you’re +all platforms at a site far outweighs the speed loss. But if you're trying to squeeze out every possible bit of performance, you may wish to do this. - TeXnically, even without ‘--disable-dump-share’, sharing of ‘.fmt’ + TeXnically, even without '--disable-dump-share', sharing of '.fmt' files cannot be guaranteed to work. Floating-point values are always written in native format, and hence will generally not be readable across platforms. Fortunately, TeX uses floating point only to represent glue ratios, and none of the common formats (plain, LaTeX, -AMSTeX, ...) do any glue setting at ‘.fmt’-creation time. Metafont does +AMSTeX, ...) do any glue setting at '.fmt'-creation time. Metafont does not use floating point in any dumped value at all. Incidentally, different memory dump files will never compare equal byte-for-byte, because the programs dump the current date and time. So -don’t be alarmed by a few bytes difference. +don't be alarmed by a few bytes difference. - If you don’t know what endianness your machine is, and you’re -curious, here is a little C program to tell you. (The ‘configure’ -script contains a similar program.) This is from the book ‘C: A -Reference Manual’, by Samuel P. Harbison and Guy L. Steele Jr. (*note + If you don't know what endianness your machine is, and you're +curious, here is a little C program to tell you. (The 'configure' +script contains a similar program.) This is from the book 'C: A +Reference Manual', by Samuel P. Harbison and Guy L. Steele Jr. (*note References::). main () @@ -886,8 +886,8 @@ References::). exit (u.c[sizeof (long) - 1] == 1); } - You can add ‘printf("long %d\n", sizeof(long));’ to see the size of -the ‘long’ data type. + You can add 'printf("long %d\n", sizeof(long));' to see the size of +the 'long' data type.  File: web2c.info, Node: Editor invocation, Next: \input filenames, Prev: Memory dumps, Up: Three programs @@ -897,45 +897,45 @@ File: web2c.info, Node: Editor invocation, Next: \input filenames, Prev: Memo TeX, Metafont, and MetaPost all (by default) stop and ask for user intervention at an error. If the input came from a file, and the user -responds with ‘e’ or ‘E’, the program invokes an editor. +responds with 'e' or 'E', the program invokes an editor. - Specifying ‘--with-editor=CMD’ to ‘configure’ sets the default editor + Specifying '--with-editor=CMD' to 'configure' sets the default editor command string to CMD. The environment variables/configuration values -‘TEXEDIT’, ‘MFEDIT’, and ‘MPEDIT’ (respectively) override this. If -‘--with-editor’ is not specified, the default is ‘vi +%d %s’ on Unix, -and an invocation of the TeXworks editor on Windows. (See ‘texmf.cnf’ +'TEXEDIT', 'MFEDIT', and 'MPEDIT' (respectively) override this. If +'--with-editor' is not specified, the default is 'vi +%d %s' on Unix, +and an invocation of the TeXworks editor on Windows. (See 'texmf.cnf' for the precise values.) - In this string, ‘%d’ is replaced by the line number of the error, and -‘%s’ is replaced by the name of the current input file. + In this string, '%d' is replaced by the line number of the error, and +'%s' is replaced by the name of the current input file.  File: web2c.info, Node: \input filenames, Prev: Editor invocation, Up: Three programs -4.5 ‘\input’ filenames +4.5 '\input' filenames ====================== TeX, Metafont, and MetaPost source programs can all read other source -files with the ‘\input’ (TeX) and ‘input’ (MF and MP) primitives: +files with the '\input' (TeX) and 'input' (MF and MP) primitives: \input NAME % in TeX The file NAME can always be terminated with whitespace; for Metafont -and MetaPost, the statement terminator ‘;’ also works. (LaTeX and other -macro packages provide other interfaces to ‘\input’ that allow different +and MetaPost, the statement terminator ';' also works. (LaTeX and other +macro packages provide other interfaces to '\input' that allow different notation; here we are concerned only with the primitive operation.) As (allowed) extensions to standard TeX, Web2c also supports -specifying the filename in double quotes (‘"some name"’) and in braces -(‘{some name}’), which is convenient for filenames containing spaces or +specifying the filename in double quotes ('"some name"') and in braces +('{some name}'), which is convenient for filenames containing spaces or other special characters, as described in the sections below. In all cases, space tokens are ignored after the filename is read. - Also, double quote (‘"’) characters are ignored within the filename; -there is no way to read files whose names contain a ‘"’. + Also, double quote ('"') characters are ignored within the filename; +there is no way to read files whose names contain a '"'. However, for maximal portability of your document across systems, use -only the characters ‘a’–‘z’, ‘0’–‘9’, and at most one ‘.’. Do not use +only the characters 'a'-'z', '0'-'9', and at most one '.'. Do not use anything but simple filenames, since directory separators vary among systems; instead, add the necessary directories to the appropriate search path. @@ -949,11 +949,11 @@ search path.  File: web2c.info, Node: \input quoted filename, Next: \input braced filename, Up: \input filenames -4.5.1 ‘\input’ quoted filename: ‘\input "some name"’ +4.5.1 '\input' quoted filename: '\input "some name"' ---------------------------------------------------- As of Web2c version 7.5.3 (2004), double-quote characters can be used to -include spaces or other special characters. In typical use, the ‘"’ +include spaces or other special characters. In typical use, the '"' characters surround the entire filename: \input "filename with spaces" @@ -962,7 +962,7 @@ can enclose any characters, as in: \input filename" "with" "spaces One more point. In LaTeX, the quotes are needed inside the braces of -its ‘\input’ macro, thus: +its '\input' macro, thus: \input{a b} % fails \input{"a b"} % ok @@ -971,16 +971,16 @@ its ‘\input’ macro, thus:  File: web2c.info, Node: \input braced filename, Next: \input filename caveats, Prev: \input quoted filename, Up: \input filenames -4.5.2 ‘\input’ braced filename: ‘\input{some name}’ +4.5.2 '\input' braced filename: '\input{some name}' --------------------------------------------------- -As of Web2c 2020, ‘\input’ filenames in TeX engines (this does not apply +As of Web2c 2020, '\input' filenames in TeX engines (this does not apply in Metafont and MetaPost) can also be specified within a TeX group, typically curly braces. For example: \input{filename with spaces} As always with TeX, the brace characters are not hardwired; what -counts is the category code: the first token after the ‘\input’ must be +counts is the category code: the first token after the '\input' must be of catcode 1 (begin group), and it is matched with the next character of catcode 2 (end group). @@ -988,18 +988,18 @@ catcode 2 (end group). characters. As with all forms of filenames, following spaces are ignored (after -the end group), and double quote (‘"’) characters are ignored within the +the end group), and double quote ('"') characters are ignored within the filename.  File: web2c.info, Node: \input filename caveats, Prev: \input braced filename, Up: \input filenames -4.5.3 ‘\input’ filename caveats +4.5.3 '\input' filename caveats ------------------------------- The quoting mechanisms just described come into play _after_ TeX has tokenized and expanded the input. So, multiple spaces and tabs will -generally be seen as a single space, active characters such as ‘~’ are +generally be seen as a single space, active characters such as '~' are expanded first (generally causing an error), and so on. More examples below. @@ -1008,22 +1008,22 @@ null byte (character code zero, ASCII NUL) to terminate strings. So filenames in Web2c cannot contain nulls, even though TeX itself does not treat NUL specially. - Finally, the present Web2c implementation does ‘~’ and ‘$’ expansion -on NAME, unlike Knuth’s original implementation. Thus: + Finally, the present Web2c implementation does '~' and '$' expansion +on NAME, unlike Knuth's original implementation. Thus: \input ~jsmith/$foo.bar will dereference the environment variable or Kpathsea config file -value ‘foo’ and read that file, extended with ‘.bar’, in user ‘jsmith’’s +value 'foo' and read that file, extended with '.bar', in user 'jsmith''s home directory. You can also use braces in the variable expansion, as -in ‘${foo}bar’, if you want to follow the variable name with a letter, -numeral, or ‘_’. +in '${foo}bar', if you want to follow the variable name with a letter, +numeral, or '_'. (So another way to get a program to read a filename containing whitespace is to define an environment variable and dereference it.) In all the common TeX formats (plain TeX, LaTeX, ConTeXt, AMSTeX, -...), the characters ‘~’ and ‘$’ have special category codes, so to +...), the characters '~' and '$' have special category codes, so to actually use these in a document you have to change their catcodes or -use ‘\string’. +use '\string'.  File: web2c.info, Node: TeX, Next: Metafont, Prev: Three programs, Up: Top @@ -1035,11 +1035,11 @@ TeX is a typesetting system: it was especially designed to handle complex mathematics, as well as most ordinary text typesetting. TeX is a batch language, like C or Pascal, and not an interactive -“word processor”: you compile a TeX input file into a corresponding +"word processor": you compile a TeX input file into a corresponding device-independent (DVI) file (and then translate the DVI file to the commands for a particular output device). This approach has both considerable disadvantages and considerable advantages. For a complete -description of the TeX language, see ‘The TeXbook’ (*note References::). +description of the TeX language, see 'The TeXbook' (*note References::). Many other books on TeX, introductory and otherwise, are available. * Menu: @@ -1055,14 +1055,14 @@ Many other books on TeX, introductory and otherwise, are available.  File: web2c.info, Node: tex invocation, Next: Initial TeX, Up: TeX -5.1 ‘tex’ invocation +5.1 'tex' invocation ==================== -TeX (usually invoked as ‘tex’) formats the given text and commands, and +TeX (usually invoked as 'tex') formats the given text and commands, and outputs a corresponding device-independent representation of the typeset document. This section merely describes the options available in the Web2c implementation. For a complete description of the TeX typesetting -language, see ‘The TeXbook’ (*note References::). +language, see 'The TeXbook' (*note References::). TeX, Metafont, and MetaPost process the command line (described here) and determine their memory dump (fmt) file in the same way (*note Memory @@ -1073,20 +1073,20 @@ dumps::). Synopses: tex [OPTION]... &FMT ARGS TeX searches the usual places for the main input file TEXNAME (*note -(kpathsea)Supported file formats::), extending TEXNAME with ‘.tex’ if +(kpathsea)Supported file formats::), extending TEXNAME with '.tex' if necessary. To see all the relevant paths, set the environment variable -‘KPATHSEA_DEBUG’ to ‘-1’ before running the program. +'KPATHSEA_DEBUG' to '-1' before running the program. After TEXNAME is read, TeX processes any remaining TEX-COMMANDS on the command line as regular TeX input. Also, if the first non-option -argument begins with a TeX escape character (usually ‘\’), TeX processes +argument begins with a TeX escape character (usually '\'), TeX processes all non-option command-line arguments as a line of regular TeX input. If no arguments or options are specified, TeX prompts for an input -filename with ‘**’. +filename with '**'. - TeX writes the main DVI output to the file ‘BASETEXNAME.dvi’, where -BASETEXNAME is the basename of TEXNAME, or ‘texput’ if no input file was + TeX writes the main DVI output to the file 'BASETEXNAME.dvi', where +BASETEXNAME is the basename of TEXNAME, or 'texput' if no input file was specified. A DVI file is a device-independent binary representation of your TeX document. The idea is that after running TeX, you translate the DVI file using a separate program to the commands for a particular @@ -1094,125 +1094,125 @@ output device, such as a PostScript printer (*note Introduction: (dvips)Top.) or an X Window System display (see xdvi(1)). TeX also reads TFM files for any fonts you load in your document with -the ‘\font’ primitive. By default, it runs an external program named -‘mktextfm’ to create any nonexistent TFM files. You can disable this at +the '\font' primitive. By default, it runs an external program named +'mktextfm' to create any nonexistent TFM files. You can disable this at configure-time or runtime (*note (kpathsea)mktex configuration::). This is enabled mostly for the sake of the EC fonts, which can be generated at any size. - TeX can write output files, via the ‘\openout’ primitive; this opens + TeX can write output files, via the '\openout' primitive; this opens a security hole vulnerable to Trojan horse attack: an unwitting user -could run a TeX program that overwrites, say, ‘~/.rhosts’. (MetaPost -has a ‘write’ primitive with similar implications). To alleviate this -and similar problems the functions ‘kpathsea_out_name_ok’ and -‘kpathsea_in_name_ok’ from the Kpathsea library (*note (kpathsea)Calling +could run a TeX program that overwrites, say, '~/.rhosts'. (MetaPost +has a 'write' primitive with similar implications). To alleviate this +and similar problems the functions 'kpathsea_out_name_ok' and +'kpathsea_in_name_ok' from the Kpathsea library (*note (kpathsea)Calling sequence::) are used to determine if a given filename is acceptable to be opened for output or input, depending on the setting of the -configuration variables ‘openout_any’ and ‘openin_any’: ‘a’ (for “any”, -the default for ‘openin_any’), ‘r’ (for “restricted”), or ‘p’ (for -“paranoid”, the default for ‘openout_any’). +configuration variables 'openout_any' and 'openin_any': 'a' (for "any", +the default for 'openin_any'), 'r' (for "restricted"), or 'p' (for +"paranoid", the default for 'openout_any'). - In any case, all ‘\openout’ filenames are recorded in the log file, + In any case, all '\openout' filenames are recorded in the log file, except those opened on the first line of input, which is processed when the log file has not yet been opened. The program accepts the following options, as well as the standard -‘-help’ and ‘-version’ (*note Common options::): -‘-enc’ -‘-[no]-file-line-error’ -‘-fmt=FMTNAME’ -‘-halt-on-error’ -‘-ini’ -‘-interaction=STRING’ -‘-ipc’ -‘-ipc-start’ -‘-jobname=STRING’ -‘-kpathsea-debug=NUMBER’ -‘-[no]parse-first-line’ -‘-output-directory’ -‘-progname=STRING’ -‘-recorder’ -‘-translate-file=TCXFILE’ -‘-8bit’ +'-help' and '-version' (*note Common options::): +'-enc' +'-[no]-file-line-error' +'-fmt=FMTNAME' +'-halt-on-error' +'-ini' +'-interaction=STRING' +'-ipc' +'-ipc-start' +'-jobname=STRING' +'-kpathsea-debug=NUMBER' +'-[no]parse-first-line' +'-output-directory' +'-progname=STRING' +'-recorder' +'-translate-file=TCXFILE' +'-8bit' These options are common to TeX, Metafont, and MetaPost. *Note Common options::. -‘-enc’ - Enable encTeX extensions, such as ‘\mubyte’. This can be used to +'-enc' + Enable encTeX extensions, such as '\mubyte'. This can be used to support the Unicode UTF-8 input encoding, although using an engine with native Unicode support is more common nowadays. . -‘-ipc’ -‘-ipc-start’ +'-ipc' +'-ipc-start' With either option, TeX writes its DVI output to a socket as well - as to the usual ‘.dvi’ file. With ‘-ipc-start’, TeX also opens a + as to the usual '.dvi' file. With '-ipc-start', TeX also opens a server program at the other end to read the output. *Note IPC and TeX: IPC and TeX. - These options are available only if the ‘--enable-ipc’ option was - specified to ‘configure’ during installation of Web2c. + These options are available only if the '--enable-ipc' option was + specified to 'configure' during installation of Web2c. -‘-mktex=FILETYPE’ -‘-no-mktex=FILETYPE’ - Turn on or off the ‘mktex’ script associated with FILETYPE. For - TeX proper, FILETYPE can only be ‘tex’ and ‘tfm’, but for pdfTeX - and luaTeX, it can also be ‘pk’. +'-mktex=FILETYPE' +'-no-mktex=FILETYPE' + Turn on or off the 'mktex' script associated with FILETYPE. For + TeX proper, FILETYPE can only be 'tex' and 'tfm', but for pdfTeX + and luaTeX, it can also be 'pk'. -‘-mltex’ - If we are ‘INITEX’ (*note Initial and virgin::), enable MLTeX - extensions such as ‘\charsubdef’. Implicitly set if the program - name is ‘mltex’. *Note MLTeX: MLTeX. +'-mltex' + If we are 'INITEX' (*note Initial and virgin::), enable MLTeX + extensions such as '\charsubdef'. Implicitly set if the program + name is 'mltex'. *Note MLTeX: MLTeX. -‘-output-comment=STRING’ +'-output-comment=STRING' Use STRING as the DVI file comment. Ordinarily, this comment records the date and time of the TeX run, but if you are doing regression testing, you may not want the DVI file to have this spurious difference. This is also taken from the environment - variable and config file value ‘output_comment’. + variable and config file value 'output_comment'. -‘-shell-escape’ -‘-no-shell-escape’ -‘-shell-restricted’ +'-shell-escape' +'-no-shell-escape' +'-shell-restricted' Enable, or disable, or enable with restrictions the - ‘\write18{SHELL-COMMAND}’ feature for external executing shell + '\write18{SHELL-COMMAND}' feature for external executing shell commands. *Note Shell escapes::. -‘-enable-write18’ -‘-disable-write18’ - Synonyms for ‘-shell-escape’ and ‘-no-shell-escape’, for +'-enable-write18' +'-disable-write18' + Synonyms for '-shell-escape' and '-no-shell-escape', for compatibility with MiKTeX. (MiKTeX also accepts both pairs of options.) *Note Shell escapes::. -‘-src-specials’ -‘-src-specials=STRING’ +'-src-specials' +'-src-specials=STRING' This option makes TeX output specific source information using - ‘\special’ commands in the DVI file. These ‘\special’ track the + '\special' commands in the DVI file. These '\special' track the current filename and line number. - Using the first form of this option, the ‘\special’ commands are + Using the first form of this option, the '\special' commands are inserted automatically. In the second form of the option, STRING is a comma separated list - of the following values: ‘cr’, ‘display’, ‘hbox’, ‘math’, ‘par’, - ‘parend’, ‘vbox’. You can use this list to specify where you want - TeX to output such commands. For example, ‘-src-specials=cr,math’ + of the following values: 'cr', 'display', 'hbox', 'math', 'par', + 'parend', 'vbox'. You can use this list to specify where you want + TeX to output such commands. For example, '-src-specials=cr,math' will output source information every line and every math formula. These commands can be used with the appropriate DVI viewer and text editor to switch from the current position in the editor to the same position in the viewer and back from the viewer to the editor. - This option works by inserting ‘\special’ commands into the token + This option works by inserting '\special' commands into the token stream, and thus in principle these additional tokens can be recovered or seen by the tricky-enough macros. If you run across a case, let us know, because this counts as a bug. However, such bugs are very hard to fix, requiring significant changes to TeX, so - please don’t count on it. + please don't count on it. - Redefining ‘\special’ will not affect the functioning of this + Redefining '\special' will not affect the functioning of this option. The commands inserted into the token stream are hard-coded - to always use the ‘\special’ primitive. + to always use the '\special' primitive. TeX does not pass the trip test when this option is enabled. @@ -1222,27 +1222,27 @@ File: web2c.info, Node: Initial TeX, Next: Formats, Prev: tex invocation, Up 5.2 Initial TeX =============== -The “initial” form of TeX is invoked by ‘tex -ini’. It does lengthy -initializations avoided by the “virgin” (‘vir’) form, so as to be -capable of dumping ‘.fmt’ files (*note Memory dumps::). For a detailed +The "initial" form of TeX is invoked by 'tex -ini'. It does lengthy +initializations avoided by the "virgin" ('vir') form, so as to be +capable of dumping '.fmt' files (*note Memory dumps::). For a detailed comparison of virgin and initial forms, *note Initial and virgin::. For a list of options and other information, *note tex invocation::. Unlike Metafont and MetaPost, many format files are commonly used with TeX. The standard one implementing the features described in the -‘TeXbook’ is ‘plain.fmt’, also known as ‘tex.fmt’ (again, *note Memory +'TeXbook' is 'plain.fmt', also known as 'tex.fmt' (again, *note Memory dumps::). It is created by default during installation, but you can -also do so by hand if necessary (e.g., if an update to ‘plain.tex’ is +also do so by hand if necessary (e.g., if an update to 'plain.tex' is issued): tex -ini '\input plain \dump' (The quotes prevent interpretation of the backslashes from the shell.) -Then install the resulting ‘plain.fmt’ in ‘$(fmtdir)’ -(‘/usr/local/share/texmf/web2c’ by default), and link ‘tex.fmt’ to it. +Then install the resulting 'plain.fmt' in '$(fmtdir)' +('/usr/local/share/texmf/web2c' by default), and link 'tex.fmt' to it. The necessary invocation for generating a format file differs for each format, so instructions that come with the format should explain. -The top-level ‘web2c’ Makefile has targets for making most common +The top-level 'web2c' Makefile has targets for making most common formats: plain latex amstex texinfo eplain. *Note Formats::, for more details on TeX formats. @@ -1252,25 +1252,25 @@ File: web2c.info, Node: Formats, Next: Languages and hyphenation, Prev: Initi 5.3 Formats =========== -TeX “formats” are large collections of macros, often dumped into a -‘.fmt’ file (*note Memory dumps::) by ‘tex -ini’ (*note Initial TeX::). +TeX "formats" are large collections of macros, often dumped into a +'.fmt' file (*note Memory dumps::) by 'tex -ini' (*note Initial TeX::). A number of formats are in reasonably widespread use, and the Web2c Makefile has targets to make the versions current at the time of release. You can change which formats are automatically built by -setting the ‘fmts’ Make variable; by default, only the ‘plain’ and -‘latex’ formats are made. +setting the 'fmts' Make variable; by default, only the 'plain' and +'latex' formats are made. Nowadays, the formats are generally installed and updated as part of a larger TeX distribution, such as TeX Live (). latex The most widely used format. The current release is named - ‘LaTeX2e’; new versions are released approximately every six + 'LaTeX2e'; new versions are released approximately every six months, with patches issued as needed. The old release was called - ‘LaTeX 2.09’, and is no longer maintained or supported. LaTeX + 'LaTeX 2.09', and is no longer maintained or supported. LaTeX attempts to provide generic markup instructions, such as - “emphasize”, instead of specific typesetting instructions, such as - “use the 10pt Computer Modern italic font”. The LaTeX home page: + "emphasize", instead of specific typesetting instructions, such as + "use the 10pt Computer Modern italic font". The LaTeX home page: . context @@ -1285,18 +1285,18 @@ amstex Society. Like LaTeX, it encourages generic markup commands. The AMS also provides many LaTeX packages for authors who prefer LaTeX. Taken together, they are used to produce nearly all AMS - publications, e.g., ‘Mathematical Reviews’. The AMSTeX home page: + publications, e.g., 'Mathematical Reviews'. The AMSTeX home page: . texinfo The documentation system developed and maintained by the Free Software Foundation for their software manuals. It can be automatically converted into plain text, a machine-readable on-line - format called ‘info’, HTML, etc. The Texinfo home page: + format called 'info', HTML, etc. The Texinfo home page: . eplain - The “expanded plain” format provides various common features (e.g., + The "expanded plain" format provides various common features (e.g., symbolic cross-referencing, tables of contents, indexing, citations using BibTeX), for those authors who prefer to handle their own high-level formatting. The Eplain home page: @@ -1304,7 +1304,7 @@ eplain slitex An obsolete LaTeX 2.09 format for making slides. It is replaced by - the ‘slides’ document class, although the ‘beamer’ package is the + the 'slides' document class, although the 'beamer' package is the most commonly method for making slides nowadays. The Beamer page on CTAN: . @@ -1329,7 +1329,7 @@ File: web2c.info, Node: MLTeX, Next: TCX files, Up: Languages and hyphenation 5.4.1 MLTeX: Multi-lingual TeX ------------------------------ -Multi-lingual TeX (‘mltex’) is an extension of TeX originally written by +Multi-lingual TeX ('mltex') is an extension of TeX originally written by Michael Ferguson and now updated and maintained by Bernd Raichle. With the advent of Unicode, it has become obsolete, though it is still supported in Web2c in the event of bugs or compilation bugs. @@ -1337,19 +1337,19 @@ supported in Web2c in the event of bugs or compilation bugs. MLTeX allows the use of non-existing glyphs in a font by declaring glyph substitutions. These are restricted to substitutions of an accented character glyph, which need not be defined in the current font, -by its appropriate ‘\accent’ construction using a base and accent +by its appropriate '\accent' construction using a base and accent character glyph, which do have to exist in the current font. This substitution is automatically done behind the scenes, if necessary, and thus MLTeX additionally supports hyphenation of words containing an accented character glyph for fonts missing this glyph (e.g., Computer Modern). Standard TeX suppresses hyphenation in this case. - MLTeX works at ‘.fmt’-creation time: the basic idea is to specify the -‘-mltex’ option to TeX when you ‘\dump’ a format. Then, when you -subsequently invoke TeX and read that ‘.fmt’ file, the MLTeX features + MLTeX works at '.fmt'-creation time: the basic idea is to specify the +'-mltex' option to TeX when you '\dump' a format. Then, when you +subsequently invoke TeX and read that '.fmt' file, the MLTeX features described below will be enabled. - Generally, you use special macro files to create an MLTeX ‘.fmt’ + Generally, you use special macro files to create an MLTeX '.fmt' file. The sections below describe the two new primitives that MLTeX @@ -1364,65 +1364,65 @@ TeX.  File: web2c.info, Node: \charsubdef, Next: \tracingcharsubdef, Up: MLTeX -5.4.1.1 ‘\charsubdef’: Character substitutions +5.4.1.1 '\charsubdef': Character substitutions .............................................. -The most important primitive MLTeX adds is ‘\charsubdef’, used in a way -reminiscent of ‘\chardef’: +The most important primitive MLTeX adds is '\charsubdef', used in a way +reminiscent of '\chardef': \charsubdef COMPOSITE [=] ACCENT BASE Each of COMPOSITE, ACCENT, and BASE are font glyph numbers, expressed in the usual TeX syntax: `\e symbolically, '145 for octal, "65 for hex, 101 for decimal. - MLTeX’s ‘\charsubdef’ declares how to construct an accented character + MLTeX's '\charsubdef' declares how to construct an accented character glyph (not necessarily existing in the current font) using two character glyphs (that do exist). Thus it defines whether a character glyph code, -either typed as a single character or using the ‘\char’ primitive, will -be mapped to a font glyph or to an ‘\accent’ glyph construction. +either typed as a single character or using the '\char' primitive, will +be mapped to a font glyph or to an '\accent' glyph construction. For example, if you assume glyph code 138 (decimal) for an e-circumflex and you are using the Computer Modern fonts, which have the -circumflex accent in position 18 and lowercase ‘e’ in the usual ASCII -position 101 decimal, you would use ‘\charsubdef’ as follows: +circumflex accent in position 18 and lowercase 'e' in the usual ASCII +position 101 decimal, you would use '\charsubdef' as follows: \charsubdef 138 = 18 101 For the plain TeX format to make use of this substitution, you have -to redefine the circumflex accent macro ‘\^’ in such a way that if its -argument is character ‘e’ the expansion ‘\char138 ’ is used instead of -‘\accent18 e’. Similar ‘\charsubdef’ declaration and macro +to redefine the circumflex accent macro '\^' in such a way that if its +argument is character 'e' the expansion '\char138 ' is used instead of +'\accent18 e'. Similar '\charsubdef' declaration and macro redefinitions have to be done for all other accented characters. - To disable a previous ‘\charsubdef C’, redefine C as a pair of zeros. + To disable a previous '\charsubdef C', redefine C as a pair of zeros. For example: \charsubdef '321 = 0 0 % disable N tilde (Octal '321 is the ISO Latin-1 value for the Spanish N tilde.) - ‘\charsubdef’ commands should only be given once. Although in -principle you can use ‘\charsubdef’ at any time, the result is -unspecified. If ‘\charsubdef’ declarations are changed, usually either + '\charsubdef' commands should only be given once. Although in +principle you can use '\charsubdef' at any time, the result is +unspecified. If '\charsubdef' declarations are changed, usually either incorrect character dimensions will be used or MLTeX will output missing -character warnings. (The substitution of a ‘\charsubdef’ is used by TeX +character warnings. (The substitution of a '\charsubdef' is used by TeX when appending the character node to the current horizontal list, to compute the width of a horizontal box when the box gets packed, and when -building the ‘\accent’ construction at ‘\shipout’-time. In summary, the +building the '\accent' construction at '\shipout'-time. In summary, the substitution is accessed often, so changing it is not desirable, nor generally useful.)  File: web2c.info, Node: \tracingcharsubdef, Prev: \charsubdef, Up: MLTeX -5.4.1.2 ‘\tracingcharsubdef’: Substitution diagnostics +5.4.1.2 '\tracingcharsubdef': Substitution diagnostics ...................................................... -To help diagnose problems with ‘\charsubdef’, MLTeX provides a new -primitive parameter, ‘\tracingcharsubdef’. If positive, every use of -‘\charsubdef’ will be reported. This can help track down when a +To help diagnose problems with '\charsubdef', MLTeX provides a new +primitive parameter, '\tracingcharsubdef'. If positive, every use of +'\charsubdef' will be reported. This can help track down when a character is redefined. - In addition, if the TeX parameter ‘\tracinglostchars’ is 100 or more, -the character substitutions actually performed at ‘\shipout’-time will + In addition, if the TeX parameter '\tracinglostchars' is 100 or more, +the character substitutions actually performed at '\shipout'-time will be recorded.  @@ -1437,8 +1437,8 @@ being used. Specifically, they map an input (keyboard) character code to the internal TeX character code (a superset of ASCII). Of the various proposals for handling more than one input encoding, -TCX files were chosen because they follow Knuth’s original ideas for the -use of the ‘xchr’ and ‘xord’ tables. He ventured that these would be +TCX files were chosen because they follow Knuth's original ideas for the +use of the 'xchr' and 'xord' tables. He ventured that these would be changed in the WEB source in order to adjust the actual version to a given environment. It turns out, however, that recompiling the WEB sources is not as simple a task as Knuth may have imagined; therefore, @@ -1454,56 +1454,56 @@ typeset output. But we feel the benefits outweigh these disadvantages. This is entirely independent of the MLTeX extension (*note MLTeX::): whereas a TCX file defines how an input keyboard character is mapped to -TeX’s internal code, MLTeX defines substitutions for a non-existing -character glyph in a font with a ‘\accent’ construction made out of two +TeX's internal code, MLTeX defines substitutions for a non-existing +character glyph in a font with a '\accent' construction made out of two separate character glyphs. TCX files involve no new primitives; it is not possible to specify that an input (keyboard) character maps to more than one character. Information on specifying TCX files: - • The best way to specify a TCX file is to list it explicitly in the + * The best way to specify a TCX file is to list it explicitly in the first line of the main document: %& -translate-file=TCXFILE - • You can also specify a TCX file to be used on a particular TeX run - with the command-line option ‘-translate-file=TCXFILE’. + * You can also specify a TCX file to be used on a particular TeX run + with the command-line option '-translate-file=TCXFILE'. - • TCX files are searched for along the ‘WEB2C’ path. + * TCX files are searched for along the 'WEB2C' path. - • Initial TeX (*note Initial TeX: Initial TeX.) ignores TCX files. + * Initial TeX (*note Initial TeX: Initial TeX.) ignores TCX files. The Web2c distribution comes with a number of TCX files. Two -important ones are ‘il1-t1.tcx’ and ‘il2-t1.tcx’, which support ISO +important ones are 'il1-t1.tcx' and 'il2-t1.tcx', which support ISO Latin 1 and ISO Latin 2, respectively, with Cork-encoded fonts (a.k.a. the LaTeX T1 encoding). TCX files for Czech, Polish, and Slovak are also provided. - One other notable TCX file is ‘empty.tcx’, which is, well, empty. -Its purpose is to reset Web2C’s behavior to the default (only visible + One other notable TCX file is 'empty.tcx', which is, well, empty. +Its purpose is to reset Web2C's behavior to the default (only visible ASCII being printable, as described below) when a format was dumped with -another TCX being active—which is in fact the case for everything but +another TCX being active--which is in fact the case for everything but plain TeX in the TeX Live and other distributions. Thus: latex somefile8.tex - ⇒ terminal etc. output with 8-bit chars + => terminal etc. output with 8-bit chars latex --translate-file=empty.tcx somefile8.tex - ⇒ terminal etc. output with ^^ notation + => terminal etc. output with ^^ notation Syntax of TCX files: 1. Line-oriented. Blank lines are ignored. 2. Whitespace is ignored except as a separator. - 3. Comments start with ‘%’ and continue to the end of the line. + 3. Comments start with '%' and continue to the end of the line. 4. Otherwise, a line consists of one or two character codes, optionally followed by 0 or 1. The last number indicates whether DEST is considered printable. SRC [DEST [PRNT]] - 5. Each character code may be specified in octal with a leading ‘0’, - hexadecimal with a leading ‘0x’, or decimal otherwise. Values must + 5. Each character code may be specified in octal with a leading '0', + hexadecimal with a leading '0x', or decimal otherwise. Values must be between 0 and 255, inclusive (decimal). 6. If the DEST code is not specified, it is taken to be the same as @@ -1512,35 +1512,35 @@ plain TeX in the TeX Live and other distributions. Thus: 7. If the same SRC code is specified more than once, it is the last definition that counts. - Finally, here’s what happens: when TeX sees an input character with + Finally, here's what happens: when TeX sees an input character with code SRC, it 1) changes SRC to DEST; and 2) makes the DEST code -“printable”, i.e., printed as-is in diagnostics and the log file rather -than in ‘^^’ notation. +"printable", i.e., printed as-is in diagnostics and the log file rather +than in '^^' notation. By default, no characters are translated, and character codes between 32 and 126 inclusive (decimal) are printable. Specifying translations for the printable ASCII characters (codes -32–127) will yield unpredictable results. Additionally you shouldn’t -make the following characters printable: ‘^^I’ (TAB), ‘^^J’ (line feed), -‘^^M’ (carriage return), and ‘^^?’ (delete), since TeX uses them in +32-127) will yield unpredictable results. Additionally you shouldn't +make the following characters printable: '^^I' (TAB), '^^J' (line feed), +'^^M' (carriage return), and '^^?' (delete), since TeX uses them in various ways. Thus, the idea is to specify the input (keyboard) character code for SRC, and the output (font) character code for DEST. By default, only the printable ASCII characters are considered -printable by TeX. If you specify the ‘-8bit’ option, all characters are -considered printable by default. If you specify both the ‘-8bit’ option +printable by TeX. If you specify the '-8bit' option, all characters are +considered printable by default. If you specify both the '-8bit' option and a TCX file, then the TCX can set specific characters to be non-printable. Both the specified TCX encoding and whether characters are printable -are saved in the dump files (like ‘tex.fmt’). So by giving these -options in combination with ‘-ini’, you control the defaults seen by +are saved in the dump files (like 'tex.fmt'). So by giving these +options in combination with '-ini', you control the defaults seen by anyone who uses the resulting dump file. - When loading a dump, if the ‘-8bit’ option was given, then all + When loading a dump, if the '-8bit' option was given, then all characters become printable by default. When loading a dump, if a TCX file was specified, then the TCX data @@ -1562,10 +1562,10 @@ is written to the file OUTPUT. In addition, Patgen prompts interactively for other values. - For more information, see ‘Word hy-phen-a-tion by com-put-er’ by -Frank Liang (*note References::), and also the ‘patgen.web’ source file. + For more information, see 'Word hy-phen-a-tion by com-put-er' by +Frank Liang (*note References::), and also the 'patgen.web' source file. - The only options are ‘-help’ and ‘-version’ (*note Common options::). + The only options are '-help' and '-version' (*note Common options::).  File: web2c.info, Node: Shell escapes, Next: IPC and TeX, Prev: Languages and hyphenation, Up: TeX @@ -1573,45 +1573,45 @@ File: web2c.info, Node: Shell escapes, Next: IPC and TeX, Prev: Languages and 5.5 Shell escapes ================= -TeX can execute “shell escapes”, that is, arbitrary shell commands. +TeX can execute "shell escapes", that is, arbitrary shell commands. Although tremendously useful, this also has obvious security -implications. Therefore, as of TeX Live 2009, a “restricted” mode for +implications. Therefore, as of TeX Live 2009, a "restricted" mode for shell escapes is the default mode of operation, which allows executing -only certain commands, as specified in the ‘texmf.cnf’ configuration +only certain commands, as specified in the 'texmf.cnf' configuration file. - • Unrestricted shell escapes are allowed if the option - ‘--shell-escape’ is specified, or if the environment variable or - config file value ‘shell_escape’ is set to ‘t’ or ‘y’ and ‘1’. + * Unrestricted shell escapes are allowed if the option + '--shell-escape' is specified, or if the environment variable or + config file value 'shell_escape' is set to 't' or 'y' and '1'. - • Restricted shell escapes are allowed if ‘shell_escape’ is set to - ‘p’. This is the default. + * Restricted shell escapes are allowed if 'shell_escape' is set to + 'p'. This is the default. - • Shell escapes are completely disabled if ‘--no-shell-escape’ is - specified, or if ‘shell_escape’ is set to anything else. + * Shell escapes are completely disabled if '--no-shell-escape' is + specified, or if 'shell_escape' is set to anything else. When enabled, the TeX construct to execute a system command is -‘\write18{SHELL-COMMAND}’; for example: +'\write18{SHELL-COMMAND}'; for example: \write18{echo "hello, world"} - From TeX’s point of view, this is a normal ‘\write’ command, and is + From TeX's point of view, this is a normal '\write' command, and is therefore subject to the usual TeX expansions. Also, the system call -either happens during the ‘\output’ routine or right away, according to -the absence or presence of the ‘\immediate’ prefix, as usual for -‘\write’. +either happens during the '\output' routine or right away, according to +the absence or presence of the '\immediate' prefix, as usual for +'\write'. The SHELL-COMMAND string is passed to the command shell (via the C -library function ‘system’). The output of SHELL-COMMAND is not diverted +library function 'system'). The output of SHELL-COMMAND is not diverted anywhere, so it will not appear in the log file, or anywhere but the terminal output. The exit status of the system call is also not available to TeX. In unrestricted mode, the argument is simply passed straight to -‘system’ unaltered. +'system' unaltered. In restricted mode, ASCII double quote characters (") should always -be used in the argument to ‘\write18’ where quoting of arguments is +be used in the argument to '\write18' where quoting of arguments is needed, as in the example above. This is to achieve some measure of system independence. On Unix systems, these are replaced with single quote (') characters to avoid insecure further expansion (from, e.g., @@ -1621,20 +1621,20 @@ message in the log file, and no execution is performed. After quotation processing, if the first word (delimited by a space or tab) of the command is in the list specified by the -‘shell_escape_commands’ configuration value, the command is executed. +'shell_escape_commands' configuration value, the command is executed. Otherwise it is not. In any case, a message is written to the log file. - The ‘shell_escape_commands’ value is a comma-separated list of words. + The 'shell_escape_commands' value is a comma-separated list of words. Whitespace is significant, and typically should not be present. The -default definition in ‘texmf.cnf’ looks like this, with more commands +default definition in 'texmf.cnf' looks like this, with more commands included: shell_escape_commands = bibtex,kpsewhich,repstopdf,... - pdfTeX and luaTeX support reading (via ‘\input’ and ‘\openin’) and -writing (via ‘\openout’) from pipes if the first character is ‘|’. The + pdfTeX and luaTeX support reading (via '\input' and '\openin') and +writing (via '\openout') from pipes if the first character is '|'. The following command is then treated exactly the same as the argument to -‘\write18’. In these engines, the primitive variable ‘\pdfshellescape’ +'\write18'. In these engines, the primitive variable '\pdfshellescape' is set to 0 if shell escapes are disabled, 1 if they are enabled, and 2 if they are enabled with restrictions. @@ -1645,7 +1645,7 @@ environments such as CGI scripts or wikis where the input has to be considered untrustworthy, shell escapes should be completely disabled. Programs intended to be called from TeX in restricted should -implement the “paranoid” safety measures regarding output files that TeX +implement the "paranoid" safety measures regarding output files that TeX itself does. *Note (kpathsea)Calling sequence::.  @@ -1657,12 +1657,12 @@ File: web2c.info, Node: IPC and TeX, Next: TeX extensions, Prev: Shell escape (If anyone uses this feature and needs documentation, write .) - This functionality is available only if the ‘--enable-ipc’ option was -specified to ‘configure’ during installation of Web2c (*note + This functionality is available only if the '--enable-ipc' option was +specified to 'configure' during installation of Web2c (*note Installation::). - If you define ‘IPC_DEBUG’ before compilation (e.g., with ‘make -XCFLAGS=-DIPC_DEBUG’), TeX will print messages to standard error about + If you define 'IPC_DEBUG' before compilation (e.g., with 'make +XCFLAGS=-DIPC_DEBUG'), TeX will print messages to standard error about its socket operations. This may be helpful if you are, well, debugging.  @@ -1676,13 +1676,13 @@ The base TeX program has been extended in many ways. There has been a substantial effort to make a set of extended functionality available across all actively-updated engines, so that formats, notably LaTeX, can rely on it. A list of this common extended -functionality is in a ‘LaTeX News’ article, +functionality is in a 'LaTeX News' article, . For engines in TeX Live, the detailed documentation for these primitives is mostly in the pdfTeX manual (). In addition, each engine (naturally) has its own particular features, -described in its own manual. Here’s a partial list of the engines. +described in its own manual. Here's a partial list of the engines. e-TeX Adds many new primitives, including right-to-left typesetting and @@ -1700,7 +1700,7 @@ pdfTeX Can produce PDF as well as DVI files. It also incorporates the e-TeX extensions, new primitives for hypertext and micro-typography, reading/writing from pipes, and much more. In - TeX Live, the command ‘etex’ invokes pdfTeX to make all these + TeX Live, the command 'etex' invokes pdfTeX to make all these additions available with DVI output. Home page: . @@ -1751,7 +1751,7 @@ drawing lines or curves. This approach has both considerable disadvantages (people unfamiliar with conventional programming languages will be unlikely to find it usable) and considerable advantages (you can make your design intentions specific and parameterizable). For a -complete description of the Metafont language, see ‘The METAFONTbook’ +complete description of the Metafont language, see 'The METAFONTbook' (*note References::). * Menu: @@ -1766,14 +1766,14 @@ complete description of the Metafont language, see ‘The METAFONTbook’  File: web2c.info, Node: mf invocation, Next: Initial Metafont, Up: Metafont -6.1 ‘mf’ invocation +6.1 'mf' invocation =================== -Metafont (usually invoked as ‘mf’) reads character definitions specified +Metafont (usually invoked as 'mf') reads character definitions specified in the Metafont programming language, and outputs the corresponding font. This section merely describes the options available in the Web2c implementation. For a complete description of the Metafont language, -see ‘The Metafontbook’ (*note References::). +see 'The Metafontbook' (*note References::). Metafont processes its command line and determines its memory dump (base) file in a way exactly analogous to MetaPost and TeX (*note tex @@ -1788,18 +1788,18 @@ invocation::, and *note Memory dumps::). Synopses: (The single quotes avoid unwanted interpretation by the shell.) Metafont searches the usual places for the main input file MFNAME -(*note (kpathsea)Supported file formats::), extending MFNAME with ‘.mf’ +(*note (kpathsea)Supported file formats::), extending MFNAME with '.mf' if necessary. To see all the relevant paths, set the environment -variable ‘KPATHSEA_DEBUG’ to ‘-1’ before running the program. By -default, Metafont runs an external program named ‘mktexmf’ to create any +variable 'KPATHSEA_DEBUG' to '-1' before running the program. By +default, Metafont runs an external program named 'mktexmf' to create any nonexistent Metafont source files you input. You can disable this at configure-time or runtime (*note (kpathsea)mktex configuration::). This is mostly for the sake of the EC fonts, which can be generated at any size. - Metafont writes the main GF output to the file ‘BASEMFNAME.NNNgf’, + Metafont writes the main GF output to the file 'BASEMFNAME.NNNgf', where NNN is the font resolution in pixels per inch, and BASEMFNAME is -the basename of MFNAME, or ‘mfput’ if no input file was specified. A GF +the basename of MFNAME, or 'mfput' if no input file was specified. A GF file contains bitmaps of the actual character shapes. Usually GF files are converted immediately to PK files with GFtoPK (*note gftopk invocation::), since PK files contain equivalent information, but are @@ -1807,23 +1807,23 @@ more compact. (Metafont output in GF format rather than PK for only historical reasons.) Metafont also usually writes a metric file in TFM format to -‘BASEMFNAME.tfm’. A TFM file contains character dimensions, kerns, and +'BASEMFNAME.tfm'. A TFM file contains character dimensions, kerns, and ligatures, and spacing parameters. TeX reads only this .tfm file, not the GF file. The MODE in the example command above is a name referring to a device -definition (*note Modes::); for example, ‘localfont’ or ‘ljfour’. These +definition (*note Modes::); for example, 'localfont' or 'ljfour'. These device definitions must generally be precompiled into the base file. If -you leave this out, the default is ‘proof’ mode, as stated in ‘The -Metafontbook’, in which Metafont outputs at a resolution of 2602dpi; +you leave this out, the default is 'proof' mode, as stated in 'The +Metafontbook', in which Metafont outputs at a resolution of 2602dpi; this is usually not what you want. The remedy is simply to assign a -different mode—‘localfont’, for example. +different mode--'localfont', for example. The MAGNIFICATION assignment in the example command above is a magnification factor; for example, if the device is 600dpi and you -specify ‘mag:=2’, Metafont will produce output at 1200dpi. Very often, -the MAGNIFICATION is an expression such as ‘magstep(.5)’, corresponding -to a TeX “magstep”, which are factors of 1.2 * sqrt(2). +specify 'mag:=2', Metafont will produce output at 1200dpi. Very often, +the MAGNIFICATION is an expression such as 'magstep(.5)', corresponding +to a TeX "magstep", which are factors of 1.2 * sqrt(2). After running Metafont, you can use the font in a TeX document as usual. For example: @@ -1831,27 +1831,27 @@ usual. For example: \myfont Now I am typesetting in my new font (minimum hamburgers). The program accepts the following options, as well as the standard -‘-help’ and ‘-version’ (*note Common options::): -‘-[no]-file-line-error’ -‘-fmt=FMTNAME’ -‘-halt-on-error’ -‘-ini’ -‘-interaction=STRING’ -‘-jobname=STRING’ -‘-kpathsea-debug=NUMBER’ -‘-[no]parse-first-line’ -‘-output-directory’ -‘-progname=STRING’ -‘-recorder’ -‘-translate-file=TCXFILE’ -‘-8bit’ +'-help' and '-version' (*note Common options::): +'-[no]-file-line-error' +'-fmt=FMTNAME' +'-halt-on-error' +'-ini' +'-interaction=STRING' +'-jobname=STRING' +'-kpathsea-debug=NUMBER' +'-[no]parse-first-line' +'-output-directory' +'-progname=STRING' +'-recorder' +'-translate-file=TCXFILE' +'-8bit' These options are common to TeX, Metafont, and MetaPost. *Note Common options::. -‘-mktex=FILETYPE’ -‘-no-mktex=FILETYPE’ - Turn on or off the ‘mktex’ script associated with FILETYPE. The - only value that makes sense for FILETYPE is ‘mf’. +'-mktex=FILETYPE' +'-no-mktex=FILETYPE' + Turn on or off the 'mktex' script associated with FILETYPE. The + only value that makes sense for FILETYPE is 'mf'.  File: web2c.info, Node: Initial Metafont, Next: Modes, Prev: mf invocation, Up: Metafont @@ -1859,32 +1859,32 @@ File: web2c.info, Node: Initial Metafont, Next: Modes, Prev: mf invocation, 6.2 Initial Metafont ==================== -‘inimf’ is the “initial” form of Metafont, which does lengthy -initializations avoided by the “virgin” (‘vir’) form, so as to be -capable of dumping ‘.base’ files (*note Memory dumps::). For a detailed +'inimf' is the "initial" form of Metafont, which does lengthy +initializations avoided by the "virgin" ('vir') form, so as to be +capable of dumping '.base' files (*note Memory dumps::). For a detailed comparison of virgin and initial forms, see *note Initial and virgin::. For a list of options and other information, see *note mf invocation::. The only memory dump file commonly used with Metafont is the default -‘plain.base’, also known as ‘mf.base’ (again, *note Memory dumps::). It +'plain.base', also known as 'mf.base' (again, *note Memory dumps::). It is created by default during installation, but you can also do so by hand if necessary (e.g., if a Metafont update is issued): mf -ini '\input plain; input modes; dump' (The quotes prevent interpretation of the backslashes from the shell.) -Then install the resulting ‘plain.base’ in ‘$(basedir)’ -(‘/usr/local/share/texmf/web2c’ by default), and link ‘mf.base’ to it. +Then install the resulting 'plain.base' in '$(basedir)' +('/usr/local/share/texmf/web2c' by default), and link 'mf.base' to it. - For an explanation of the additional ‘modes.mf’ file, see *note + For an explanation of the additional 'modes.mf' file, see *note Modes::. This file has no counterpart in TeX or MetaPost. In the past, it was sometimes useful to create a base file -‘cmmf.base’ (a.k.a. ‘cm.base’), with the Computer Modern macros also +'cmmf.base' (a.k.a. 'cm.base'), with the Computer Modern macros also included in the base file. Nowadays, however, the additional time -required to read ‘cmbase.mf’ is exceedingly small, usually not enough to -be worth the administrative hassle of updating the ‘cmmf.base’ file when -you install a new version of ‘modes.mf’. People actually working on a +required to read 'cmbase.mf' is exceedingly small, usually not enough to +be worth the administrative hassle of updating the 'cmmf.base' file when +you install a new version of 'modes.mf'. People actually working on a typeface may still find it worthwhile to create their own base file, of course. @@ -1895,38 +1895,38 @@ File: web2c.info, Node: Modes, Next: Online Metafont graphics, Prev: Initial ========================================== Running Metafont and creating Metafont base files requires information -that TeX and MetaPost do not: “mode” definitions which specify device +that TeX and MetaPost do not: "mode" definitions which specify device characteristics, so Metafont can properly rasterize the shapes. When making a base file, a file containing modes for -locally-available devices should be input after ‘plain.mf’. One +locally-available devices should be input after 'plain.mf'. One commonly used file is ; it includes all known definitions. If, however, for some reason you have decreased the memory available -in your Metafont, you may need to copy ‘modes.mf’ and remove the +in your Metafont, you may need to copy 'modes.mf' and remove the definitions irrelevant to you (probably most of them) instead of using -it directly. (Or, if you’re a Metafont hacker, maybe you can suggest a -way to redefine ‘mode_def’ and/or ‘mode_setup’; right now, the amount of +it directly. (Or, if you're a Metafont hacker, maybe you can suggest a +way to redefine 'mode_def' and/or 'mode_setup'; right now, the amount of memory used is approximately four times the total length of the -‘mode_def’ names, and that’s a lot.) +'mode_def' names, and that's a lot.) - If you have a device not included in ‘modes.mf’, please see comments + If you have a device not included in 'modes.mf', please see comments in that file for how to create the new definition, and please send the definition to to get it included in the next -release of ‘modes.mf’. +release of 'modes.mf'. Usually, when you run Metafont you must supply the name of a mode that was dumped in the base file. But you can also define the mode characteristics dynamically, by invoking Metafont with an assignment to -‘smode’ instead of ‘mode’, like this: +'smode' instead of 'mode', like this: mf '\smode:="newmode.mf"; mag:=MAGNIFICATION; input MFNAME' This is most useful when you are working on the definition of a new mode. The MAGNIFICATION and MFNAME arguments are explained in *note mf -invocation::. In the file ‘newmode.mf’, you should have the following -(with no ‘mode_def’ or ‘enddef’), if you are using ‘modes.mf’ +invocation::. In the file 'newmode.mf', you should have the following +(with no 'mode_def' or 'enddef'), if you are using 'modes.mf' conventions: mode_param (pixels_per_inch, DPI); mode_param (blacker, B); @@ -1935,8 +1935,8 @@ conventions: mode_common_setup_; (Of course, you should use real numbers for DPI, B, F, and O.) - For more information on the use of ‘smode’, or if you are not using -‘modes.mf’, see page 269 of ‘The Metafontbook’. + For more information on the use of 'smode', or if you are not using +'modes.mf', see page 269 of 'The Metafontbook'.  File: web2c.info, Node: Online Metafont graphics, Next: gftodvi invocation, Prev: Modes, Up: Metafont @@ -1949,79 +1949,79 @@ number of devices. (See the Metafont manual for more information about how to draw on your screen.) By default, no graphics support is enabled. - Metafont examines the ‘MFTERM’ environment variable or config file -value at runtime, or the ‘TERM’ environment variable if ‘MFTERM’ is not + Metafont examines the 'MFTERM' environment variable or config file +value at runtime, or the 'TERM' environment variable if 'MFTERM' is not set, to determine the device support to use. Naturally, only the devices for which support has been compiled in can be selected. - Here is a table of the possibilities, showing the ‘MFTERM’ value and -the corresponding ‘configure’ option(s) in parentheses. + Here is a table of the possibilities, showing the 'MFTERM' value and +the corresponding 'configure' option(s) in parentheses. -‘epsf’ - (‘--enable-epsfwin’) Pseudo-window server for Encapsulated - PostScript (see ‘web2c/window/epsf.c’). This device produces an +'epsf' + ('--enable-epsfwin') Pseudo-window server for Encapsulated + PostScript (see 'web2c/window/epsf.c'). This device produces an EPS file containing the graphics which would be displayed online on other devices. The name of the EPS file defaults to metafont.eps but can be changed by setting the MFEPSF environment variable to the new filename. Contributed by Mathias Herberts. -‘hp2627’ - (‘--enable-hp2627win’) HP2627a color graphics terminals. +'hp2627' + ('--enable-hp2627win') HP2627a color graphics terminals. -‘mftalk’ - (‘--enable-mftalkwin’) Generic window server (see - ‘web2c/window/mftalk.c’). +'mftalk' + ('--enable-mftalkwin') Generic window server (see + 'web2c/window/mftalk.c'). -‘next’ - (‘--enable-next’) NeXT window system. This requires a separate - program, called ‘DrawingServant’, available separately. See the - ‘web2c/window/next.c’. +'next' + ('--enable-next') NeXT window system. This requires a separate + program, called 'DrawingServant', available separately. See the + 'web2c/window/next.c'. -‘regis’ - (‘--enable-regiswin’) Regis terminals. +'regis' + ('--enable-regiswin') Regis terminals. -‘sun’ - (‘--enable-suntoolswin’) The old Suntools (not any flavor of X) - window system. (You can get the even older SunWindows ‘gfx’ system - by using ‘sun-gfx.c’.) +'sun' + ('--enable-suntoolswin') The old Suntools (not any flavor of X) + window system. (You can get the even older SunWindows 'gfx' system + by using 'sun-gfx.c'.) -‘tek’ - (‘--enable-tektronixwin’) Tektronix terminals. +'tek' + ('--enable-tektronixwin') Tektronix terminals. -‘uniterm’ - (‘--enable-unitermwin’) Uniterm, Simon Poole’s emulator of a smart +'uniterm' + ('--enable-unitermwin') Uniterm, Simon Poole's emulator of a smart Tektronix 4014 terminal. This may work with regular Tektronix - terminals as well; it’s faster than the driver - ‘--enable-tektronixwin’ selects. + terminals as well; it's faster than the driver + '--enable-tektronixwin' selects. -‘xterm’ - ‘--with-x’ The X window system (version 11). +'xterm' + '--with-x' The X window system (version 11). There are two variants of the X11 support, one that works with the Xt toolkit, and another that works directly with Xlib. The Xt support is more efficient and has more functionality, so it is the - default. If you must use the Xlib support, use ‘configure --with-x - --with-kf-x-toolkit=no’. + default. If you must use the Xlib support, use 'configure --with-x + --with-kf-x-toolkit=no'. - Specify ‘--disable-mf-nowin’ in order not to build a separate - non-windows-capable Metafont executable ‘mf-nowin’ (or - ‘mf-nowin.exe’). + Specify '--disable-mf-nowin' in order not to build a separate + non-windows-capable Metafont executable 'mf-nowin' (or + 'mf-nowin.exe'). - You cannot specify any of the usual X options (e.g., ‘-geometry’) + You cannot specify any of the usual X options (e.g., '-geometry') on the Metafont command line, but you can specify X resources in - your ‘~/.Xdefaults’ or ‘~/.Xresources’ file. The class name is - ‘Metafont’. If you’re using the Xt support, all the usual X - toolkit resources are supported. If you’re using the Xlib support, - only the ‘geometry’ resource is supported. + your '~/.Xdefaults' or '~/.Xresources' file. The class name is + 'Metafont'. If you're using the Xt support, all the usual X + toolkit resources are supported. If you're using the Xlib support, + only the 'geometry' resource is supported. You specify the X display to which Metafont connects in the - ‘DISPLAY’ environment variable, as usual. + 'DISPLAY' environment variable, as usual. Writing support for a new device is straightforward. Aside from -defining the basic drawing routines that Metafont uses (see ‘mf.web’), +defining the basic drawing routines that Metafont uses (see 'mf.web'), you only have to add another entry to the tables on the last page of -‘web2c/lib/texmfmp.c’. Or you can write an independent program and use -MFtalk (see ‘web2c/window/mftalk.c’). +'web2c/lib/texmfmp.c'. Or you can write an independent program and use +MFtalk (see 'web2c/window/mftalk.c').  File: web2c.info, Node: gftodvi invocation, Next: mft invocation, Prev: Online Metafont graphics, Up: Metafont @@ -2029,7 +2029,7 @@ File: web2c.info, Node: gftodvi invocation, Next: mft invocation, Prev: Onlin 6.5 GFtoDVI: Character proofs of fonts ====================================== -GFtoDVI makes “proof sheets” from a GF bitmap file as output by, for +GFtoDVI makes "proof sheets" from a GF bitmap file as output by, for example, Metafont (*note Metafont::). This is an indispensable aid for font designers or Metafont hackers. Synopsis: @@ -2037,51 +2037,51 @@ font designers or Metafont hackers. Synopsis: The font GFNAME is searched for in the usual places (*note (kpathsea)Glyph lookup::). To see all the relevant paths, set the -environment variable ‘KPATHSEA_DEBUG’ to ‘-1’ before running the +environment variable 'KPATHSEA_DEBUG' to '-1' before running the program. - The suffix ‘gf’ is supplied if not already present. This suffix is -not an extension, no ‘.’ precedes it; for instance, ‘cmr10.600gf’. + The suffix 'gf' is supplied if not already present. This suffix is +not an extension, no '.' precedes it; for instance, 'cmr10.600gf'. - The output filename is the basename of GFNAME extended with ‘.dvi’, -e.g., ‘gftodvi /wherever/foo.600gf’ creates ‘./foo.dvi’. + The output filename is the basename of GFNAME extended with '.dvi', +e.g., 'gftodvi /wherever/foo.600gf' creates './foo.dvi'. The characters from GFNAME appear one per page in the DVI output, with labels, titles, and annotations, as specified in Appendix H -(Hardcopy Proofs) of ‘The Metafontbook’. +(Hardcopy Proofs) of 'The Metafontbook'. GFtoDVI uses several fonts besides GFNAME itself: - • “gray font” (default ‘gray’): for the pixels that actually make up + * "gray font" (default 'gray'): for the pixels that actually make up the character. Simply using black is not right, since then labels, key points, and other information could not be shown. - • “title font” (default ‘cmr8’): for the header information at the + * "title font" (default 'cmr8'): for the header information at the top of each output page. - • “label font” (default ‘cmtt10’): for the labels on key points of + * "label font" (default 'cmtt10'): for the labels on key points of the figure. - • “slant font” (no default): for diagonal lines, which are otherwise + * "slant font" (no default): for diagonal lines, which are otherwise simulated using horizontal and vertical rules. - To change the default fonts, you must use ‘special’ commands in your -Metafont source file, typically via commands like ‘slantfont slantlj4’. + To change the default fonts, you must use 'special' commands in your +Metafont source file, typically via commands like 'slantfont slantlj4'. There is no default slant font since no one printer is suitable as a default. You can make your own by copying one of the existing files, -such as ‘.../fonts/source/public/misc/slantlj4.mf’ and then running ‘mf’ +such as '.../fonts/source/public/misc/slantlj4.mf' and then running 'mf' on it. - For testing purposes, you may it useful to run ‘mf-nowin rtest’ (hit -RETURN when it stops) to get a ‘gf’ file of a thorn glyph. Or use ‘mf’ -instead of ‘mf-nowin’ to have the glyph(s) displayed on the screen. -After that, ‘gftodvi rtest.2602gf’ should produce ‘rtest.dvi’, which you + For testing purposes, you may it useful to run 'mf-nowin rtest' (hit +RETURN when it stops) to get a 'gf' file of a thorn glyph. Or use 'mf' +instead of 'mf-nowin' to have the glyph(s) displayed on the screen. +After that, 'gftodvi rtest.2602gf' should produce 'rtest.dvi', which you process as usual. The program accepts the following option, as well as the standard -‘-verbose’, ‘-help’, and ‘-version’ (*note Common options::): +'-verbose', '-help', and '-version' (*note Common options::): -‘-overflow-label-offset=POINTS’ +'-overflow-label-offset=POINTS' Typeset the so-called overflow labels, if any, POINTS TeX points from the right edge of the character bounding box. The default is a little over two inches (ten million scaled points, to be @@ -2096,15 +2096,15 @@ File: web2c.info, Node: mft invocation, Prev: gftodvi invocation, Up: Metafon MFT translates a Metafont program into a TeX document suitable for typesetting, with the aid of TeX macros defined in the file -‘mftmac.tex’. Synopsis: +'mftmac.tex'. Synopsis: mft [OPTION]... MFNAME[.mf] MFT searches the usual places for MFNAME (*note (kpathsea)Supported file formats::). To see all the relevant paths, set the environment -variable ‘KPATHSEA_DEBUG’ to ‘-1’ before running the program. The -output goes to the basename of MFNAME extended with ‘.tex’, e.g., ‘mft -/wherever/foo.mf’ creates ‘./foo.tex’. +variable 'KPATHSEA_DEBUG' to '-1' before running the program. The +output goes to the basename of MFNAME extended with '.tex', e.g., 'mft +/wherever/foo.mf' creates './foo.tex'. Line breaks in the input are carried over into the output; moreover, blank spaces at the beginning of a line are converted to quads of @@ -2113,57 +2113,57 @@ indentation and line breaks. Each line of input is translated independently of the others. Further control is allowed via Metafont comments: - • Metafont comments following a single ‘%’ should be valid TeX input. + * Metafont comments following a single '%' should be valid TeX input. But Metafont material can be included within vertical bars in a comment; this will be translated by MFT as if it were regular - Metafont code. For example, a comment like ‘% |x2r| is the tip of - the bowl’ will be translated into the TeX ‘% $x_{2r}$ is the ...’, - i.e., the ‘x2r’ is treated as an identifier. + Metafont code. For example, a comment like '% |x2r| is the tip of + the bowl' will be translated into the TeX '% $x_{2r}$ is the ...', + i.e., the 'x2r' is treated as an identifier. - • ‘%%’ indicates that the remainder of an input line should be copied + * '%%' indicates that the remainder of an input line should be copied verbatim to the output. This is typically used to introduce additional TeX material at the beginning or an MFT job, e.g. code to modify the standard layout or the formatting macros defined in - ‘mftmac.tex’, or to add a line saying ‘%%\bye’ at the end of the - job. (MFT doesn’t add this automatically in order to allow + 'mftmac.tex', or to add a line saying '%%\bye' at the end of the + job. (MFT doesn't add this automatically in order to allow processing several files produces by MFT in the same TeX job.) - • ‘%%% TOKEN1 OTHER-TOKENS’ introduces a change in MFT’s formatting + * '%%% TOKEN1 OTHER-TOKENS' introduces a change in MFT's formatting rules; all the OTHER-TOKENS will henceforth be translated according to the current conventions for TOKEN1. The tokens must be symbolic (i.e., not numeric or string tokens). For example, the input line %%% addto fill draw filldraw - says to format the ‘fill’, ‘draw’, and ‘filldraw’ operations of - plain Metafont just like the primitive token ‘addto’, i.e., in + says to format the 'fill', 'draw', and 'filldraw' operations of + plain Metafont just like the primitive token 'addto', i.e., in boldface type. Without such reformatting commands, MFT would treat - ‘fill’ like an ordinary tag or variable name. In fact, you need a - ‘%%%’ command even to get parentheses to act like delimiters. + 'fill' like an ordinary tag or variable name. In fact, you need a + '%%%' command even to get parentheses to act like delimiters. - • ‘%%%%’ introduces an MFT comment, i.e., MFT ignores the remainder + * '%%%%' introduces an MFT comment, i.e., MFT ignores the remainder of such a line. - • Five or more ‘%’ signs should not be used. + * Five or more '%' signs should not be used. - (The above description was edited from ‘mft.web’, written by + (The above description was edited from 'mft.web', written by D.E. Knuth.) The program accepts the following options, as well as the standard -‘-help’ and ‘-version’ (*note Common options::): -‘-change=CHFILE[.ch]’ +'-help' and '-version' (*note Common options::): +'-change=CHFILE[.ch]' Apply the change file CHFILE as with Tangle and Weave (*note WEB::). -‘-style=MFTFILE[.mft]’ +'-style=MFTFILE[.mft]' Read MFTFILE before anything else; a MFT style file typically contains only MFT directives as described above. The default style - file is named ‘plain.mft’, which defines this properly for programs + file is named 'plain.mft', which defines this properly for programs using plain Metafont. The MFT files is searched along the - ‘MFTINPUTS’ path; see *note (kpathsea)Supported file formats::. + 'MFTINPUTS' path; see *note (kpathsea)Supported file formats::. - Other examples of MFT style files are ‘cmbase.mft’, which defines - formatting rules for the macros defined in ‘cm.base’, and ‘e.mft’, - which was used in the production of Knuth’s Volume E, ‘Computer - Modern Typefaces’. + Other examples of MFT style files are 'cmbase.mft', which defines + formatting rules for the macros defined in 'cm.base', and 'e.mft', + which was used in the production of Knuth's Volume E, 'Computer + Modern Typefaces'. Using an appropriate MFT style file, it is also possible to configure MFT for typesetting MetaPost sources. However, MFT does @@ -2180,8 +2180,8 @@ File: web2c.info, Node: MetaPost, Next: BibTeX, Prev: Metafont, Up: Top ********************************* MetaPost is a picture-drawing language similar to Metafont (*note -Metafont::), but instead of outputting bitmaps in a “font”, it outputs -PostScript commands. It’s primarily intended for creating technical +Metafont::), but instead of outputting bitmaps in a "font", it outputs +PostScript commands. It's primarily intended for creating technical illustrations, but can also be used to create PostScript or OpenType fonts (). @@ -2198,23 +2198,23 @@ supported) and a number of other subsidiary programs, described below.  File: web2c.info, Node: mpost invocation, Next: Initial MetaPost, Up: MetaPost -7.1 ‘mpost’ invocation +7.1 'mpost' invocation ====================== -MetaPost (installed as ‘mpost’) reads a series of pictures specified in +MetaPost (installed as 'mpost') reads a series of pictures specified in the MetaPost programming language, and outputs corresponding PostScript code. This section merely describes the options available in the Web2c implementation. For a complete description of the MetaPost language, see AT&T technical report CSTR-162, generally available in -‘TEXMF/doc/metapost/’, where TEXMF is the root of TeX directory +'TEXMF/doc/metapost/', where TEXMF is the root of TeX directory structure. The MetaPost home page: . Also, a standard MetaPost package for drawing graphs is documented in -AT&T technical report CSTR-164, available as the file ‘mpgraph.ps’, -generally stored alongside ‘mpman.ps’. +AT&T technical report CSTR-164, available as the file 'mpgraph.ps', +generally stored alongside 'mpman.ps'. MetaPost processes its command line and determines its memory dump -(mem) file in a way analogous to Metafont and TeX (*note ‘tex’ +(mem) file in a way analogous to Metafont and TeX (*note 'tex' invocation: tex invocation, and *note Memory dumps::). Synopses: mpost [OPTION]... [MPNAME[.mp]] [MP-COMMANDS] @@ -2222,22 +2222,22 @@ invocation: tex invocation, and *note Memory dumps::). Synopses: mpost [OPTION]... &MEM ARGS MetaPost searches the usual places for the main input file MPNAME -(*note (kpathsea)Supported file formats::), extending MPNAME with ‘.mp’ +(*note (kpathsea)Supported file formats::), extending MPNAME with '.mp' if necessary. To see all the relevant paths, set the environment -variable ‘KPATHSEA_DEBUG’ to ‘-1’ before running the program. +variable 'KPATHSEA_DEBUG' to '-1' before running the program. MetaPost writes its PostScript output to a series of files -‘BASEMPNAME.NNN’ (or perhaps ‘BASEMPNAME.ps’, very occasionally -‘BASEMPNAME.tfm’), where NNN are the figure numbers specified in the -input, typically to the ‘beginfig’ macro, and BASEMPNAME is the basename -of MPNAME, or ‘mpout’ if no input file was specified. MetaPost uses the -‘.ps’ extension when the figure number is out of range, e.g., if you say -‘beginfig(-1)’. +'BASEMPNAME.NNN' (or perhaps 'BASEMPNAME.ps', very occasionally +'BASEMPNAME.tfm'), where NNN are the figure numbers specified in the +input, typically to the 'beginfig' macro, and BASEMPNAME is the basename +of MPNAME, or 'mpout' if no input file was specified. MetaPost uses the +'.ps' extension when the figure number is out of range, e.g., if you say +'beginfig(-1)'. You can use the output files as figures in a TeX document just as with any other PostScript figures. For example, with this TeX command: \special{psfile="FILENAME"} -or by using ‘epsf.tex’ (*note (dvips)EPSF macros::). +or by using 'epsf.tex' (*note (dvips)EPSF macros::). The MetaPost construct btex ... TEX-INPUT ... etex @@ -2246,18 +2246,18 @@ generates a MetaPost picture expression corresponding to TEX-INPUT. The construct verbatimtex ... TEX-INPUT ... etex simply passes the TEX-INPUT through to TeX. For example, if you are -using LaTeX, your MetaPost input file must start with a ‘verbatimtex’ -block that gives the necessary ‘\documentclass’ (or ‘\documentstyle’) -‘\begin{document}’ command. You will also need to set the environment -variable ‘TEX’ to ‘latex’. +using LaTeX, your MetaPost input file must start with a 'verbatimtex' +block that gives the necessary '\documentclass' (or '\documentstyle') +'\begin{document}' command. You will also need to set the environment +variable 'TEX' to 'latex'. TEX-INPUT need not be specifically TeX input; it could also be Troff. -In that case, you will need the ‘-m pictures’ Troff macro package +In that case, you will need the '-m pictures' Troff macro package (unfortunately absent from many Troff implementations), or an equivalent -such as the ‘-m pspic’ macros from GNU groff described in grops(1). +such as the '-m pspic' macros from GNU groff described in grops(1). Naturally, you must use fonts that are supported by the typesetter; -specifically, you’ll probably want to use standard PostScript fonts with +specifically, you'll probably want to use standard PostScript fonts with Troff. And only the TeX system understands Computer Modern or other Metafont fonts; you can also use PostScript fonts with TeX, of course. @@ -2266,49 +2266,49 @@ fonts for labels cannot be directly previewed or printed. Instead, you must include them in a TeX document and run the resulting DVI file through Dvips to arrange for the downloading of the required fonts (*note (dvips)Fonts in figures::). To help with this, the MetaPost -distribution provides a small TeX file ‘mproof.tex’ which is typically +distribution provides a small TeX file 'mproof.tex' which is typically called as: tex mproof MP-OUTPUT-FILES... ; dvips mproof -o -The resulting file ‘mproof.ps’ can then be printed or previewed. +The resulting file 'mproof.ps' can then be printed or previewed. To generate EPSF files, set the internal MetaPost variable -‘prologues’ positive. To make the output files self-contained, use only -standard PostScript fonts. MetaPost reads the same ‘psfonts.map’ file +'prologues' positive. To make the output files self-contained, use only +standard PostScript fonts. MetaPost reads the same 'psfonts.map' file as Dvips, to determine PostScript fonts that need to be downloaded (*note (dvips)psfonts.map::). It is possible for pdfTeX to read MetaPost output directly; this is in contrast to general EPSF files, which have to be converted for use with PDF output. The easiest way is to name the MetaPost output files -with the ‘.mps’ extension. Then the LaTeX ‘\includegraphics’ command, +with the '.mps' extension. Then the LaTeX '\includegraphics' command, for example, will be able to read them, even when outputting PDF. - MetaPost can write output files, via the ‘write’ primitive; this + MetaPost can write output files, via the 'write' primitive; this opens a security hole. *Note tex invocation::. The program accepts the following options, as well as the standard -‘-help’ and ‘-version’ (*note Common options::): -‘-[no]-file-line-error’ -‘-fmt=FMTNAME’ -‘-halt-on-error’ -‘-ini’ -‘-interaction=STRING’ -‘-jobname=STRING’ -‘-kpathsea-debug=NUMBER’ -‘-[no]parse-first-line’ -‘-output-directory’ -‘-progname=STRING’ -‘-recorder’ -‘-translate-file=TCXFILE’ -‘-8bit’ +'-help' and '-version' (*note Common options::): +'-[no]-file-line-error' +'-fmt=FMTNAME' +'-halt-on-error' +'-ini' +'-interaction=STRING' +'-jobname=STRING' +'-kpathsea-debug=NUMBER' +'-[no]parse-first-line' +'-output-directory' +'-progname=STRING' +'-recorder' +'-translate-file=TCXFILE' +'-8bit' These options are common to TeX, Metafont, and MetaPost. *Note Common options::. -‘-T’ -‘-troff’ - Set the ‘prologues’ internal variable to ‘1’. +'-T' +'-troff' + Set the 'prologues' internal variable to '1'. -‘-tex=TEXPROGRAM’ +'-tex=TEXPROGRAM' When this option is given, the program TEXPROGRAM is used to typeset the labels. @@ -2318,18 +2318,18 @@ File: web2c.info, Node: Initial MetaPost, Next: dvitomp invocation, Prev: mpo 7.2 Initial MetaPost ==================== -As of MetaPost 1.504 (TeX Live 2011), MetaPost no longer dumps ‘.mem’ +As of MetaPost 1.504 (TeX Live 2011), MetaPost no longer dumps '.mem' files (*note Memory dumps::) and does not distinguish virgin and initial -forms (*note Initial and virgin::). Instead, the “initial” file name is -read in its source form—that is, ‘mpost.mp’ when the program is invoked -as ‘mpost’. +forms (*note Initial and virgin::). Instead, the "initial" file name is +read in its source form--that is, 'mpost.mp' when the program is invoked +as 'mpost'. For a list of options and other information, see *note mpost invocation::. MetaPost provides a format with all the features of plain Metafont, -called ‘mfplain’. You can use that in the same way; just run ‘mfplain’ -instead of ‘mpost’. This lets you directly process Metafont source +called 'mfplain'. You can use that in the same way; just run 'mfplain' +instead of 'mpost'. This lets you directly process Metafont source files with MetaPost, producing character proofs (one file for each character) similar to those produced with Metafont in proof mode and GFtoDVI (*note gftodvi invocation::). @@ -2346,13 +2346,13 @@ so-called MPX file. Synopsis: dvitomp DVIFILE[.dvi] [MPXFILE[.mpx]] If MPXFILE is not specified, the output goes to the basename of DVIFILE -extended with ‘.mpx’, e.g., ‘dvitomp /wherever/foo.dvi’ creates -‘./foo.mpx’. +extended with '.mpx', e.g., 'dvitomp /wherever/foo.dvi' creates +'./foo.mpx'. - DVItoMP supports Dvips-style color specials, such as ‘color push -NAME’ and ‘color pop’, outputting them as ‘withcolor’ MetaPost commands. + DVItoMP supports Dvips-style color specials, such as 'color push +NAME' and 'color pop', outputting them as 'withcolor' MetaPost commands. - The only options are ‘-help’ and ‘-version’ (*note Common options::). + The only options are '-help' and '-version' (*note Common options::).  File: web2c.info, Node: BibTeX, Next: WEB, Prev: MetaPost, Up: Top @@ -2374,33 +2374,33 @@ File: web2c.info, Node: bibtex invocation, Next: Basic BibTeX style files, Up 8.1 BibTeX invocation ===================== -BibTeX creates a printable bibliography (‘.bbl’) file from references in -a ‘.aux’ file, generally written by TeX or LaTeX. The ‘.bbl’ file is +BibTeX creates a printable bibliography ('.bbl') file from references in +a '.aux' file, generally written by TeX or LaTeX. The '.bbl' file is then incorporated on a subsequent run. The basic bibliographic -information comes from ‘.bib’ files, and a BibTeX style (‘.bst’) file -controls the precise contents of the ‘.bbl’ file. Synopsis: +information comes from '.bib' files, and a BibTeX style ('.bst') file +controls the precise contents of the '.bbl' file. Synopsis: bibtex [OPTION]... AUXFILE[.aux] -The output goes to the basename of AUXFILE extended with ‘.bbl’; for -example, ‘bibtex /wherever/foo.aux’ creates ‘./foo.bbl’. BibTeX also -writes a log file to the basename of AUXFILE extended with ‘.blg’. +The output goes to the basename of AUXFILE extended with '.bbl'; for +example, 'bibtex /wherever/foo.aux' creates './foo.bbl'. BibTeX also +writes a log file to the basename of AUXFILE extended with '.blg'. - The names of the ‘.bib’ and ‘.bst’ files are specified in the ‘.aux’ -file as well, via the ‘\bibliography’ and ‘\bibliographystyle’ (La)TeX -macros. BibTeX searches for ‘.bib’ files using the ‘BIBINPUTS’ and -‘TEXBIB’ paths, and for ‘.bst’ files using ‘BSTINPUTS’ (*note + The names of the '.bib' and '.bst' files are specified in the '.aux' +file as well, via the '\bibliography' and '\bibliographystyle' (La)TeX +macros. BibTeX searches for '.bib' files using the 'BIBINPUTS' and +'TEXBIB' paths, and for '.bst' files using 'BSTINPUTS' (*note (kpathsea)Supported file formats::). It does no path searching for -‘.aux’ files. +'.aux' files. The program accepts the following options, as well as the standard -‘-help’ and ‘-version’ (*note Common options::): -‘-terse’ +'-help' and '-version' (*note Common options::): +'-terse' Suppress the program banner and progress reports normally output. -‘-min-crossrefs=N’ +'-min-crossrefs=N' If at least N (2 by default) bibliography entries refer to another - entry E via their ‘crossref’ field, include E in the .bbl file, + entry E via their 'crossref' field, include E in the .bbl file, even if it was not explicitly referenced in the .aux file. For example, E might be a conference proceedings as a whole, with the cross-referencing entries being individual articles published in @@ -2413,20 +2413,20 @@ macros. BibTeX searches for ‘.bib’ files using the ‘BIBINPUTS’ and .aux, and nothing will remove it. See also: -‘btxdoc.tex’ +'btxdoc.tex' Basic LaTeXable documentation for general BibTeX users. -‘btxhak.tex’ +'btxhak.tex' LaTeXable documentation for style designers. -‘btxdoc.bib’ +'btxdoc.bib' BibTeX database file for the two above documents. -‘xampl.bib’ +'xampl.bib' Example database file with all the standard entry types. -‘’ - A very large ‘.bib’ and ‘.bst’ collection, including references for +'' + A very large '.bib' and '.bst' collection, including references for all the standard TeX books and a complete bibliography for TUGboat.  @@ -2436,41 +2436,41 @@ File: web2c.info, Node: Basic BibTeX style files, Prev: bibtex invocation, Up ============================ Here are descriptions of the four standard and four semi-standard basic -BibTeX styles. ‘CTAN:/biblio/bibtex’ contains these and many more (for +BibTeX styles. 'CTAN:/biblio/bibtex' contains these and many more (for CTAN info, *note (kpathsea)unixtex.ftp::). -‘plain’ +'plain' Sorts entries alphabetically, with numeric labels. Generally - formatted according to van Leunen’s ‘A Handbook for Scholars’. The - other style files listed here are based on ‘plain’. + formatted according to van Leunen's 'A Handbook for Scholars'. The + other style files listed here are based on 'plain'. -‘abbrv’ +'abbrv' First names, month names, and journal names are abbreviated. -‘acm’ +'acm' Names are printed in small caps. -‘alpha’ - Alphanumeric labels, e.g., ‘Knu66’. +'alpha' + Alphanumeric labels, e.g., 'Knu66'. -‘apalike’ +'apalike' No labels at all; instead, the year appears in parentheses after - the author. Use this in conjunction with ‘apalike.tex’ (plain TeX) - or ‘apalike.sty’ (LaTeX), which also changes the citations in the - text to be ‘(AUTHOR, YEAR)’. + the author. Use this in conjunction with 'apalike.tex' (plain TeX) + or 'apalike.sty' (LaTeX), which also changes the citations in the + text to be '(AUTHOR, YEAR)'. -‘ieeetr’ +'ieeetr' Numeric labels, entries in citation order, IEEE abbreviations, article titles in quotes. -‘siam’ - Numeric labels, alphabetic order, ‘Math. Reviews’ abbreviations, +'siam' + Numeric labels, alphabetic order, 'Math. Reviews' abbreviations, names in small caps. -‘unsrt’ +'unsrt' Lists entries in citation order, i.e., unsorted. -‘btxbst.doc’ +'btxbst.doc' The template file and documentation for the standard styles.  @@ -2479,21 +2479,21 @@ File: web2c.info, Node: WEB, Next: DVI utilities, Prev: BibTeX, Up: Top 9 WEB: Literate programming *************************** -“WEB” languages allow you to write a single source file that can produce +"WEB" languages allow you to write a single source file that can produce both a compilable program and a well-formatted document describing the program in as much detail as you wish to prepare. Writing in this kind -of dual-purpose language is called “literate programming”. (The Usenet -newsgroup ‘comp.programming.literate’ is devoted to this subject.) +of dual-purpose language is called "literate programming". (The Usenet +newsgroup 'comp.programming.literate' is devoted to this subject.) WEB-like languages have been implemented with many pairs of base languages: Cweb provides C and Troff (*note References::); CWEB provides -C and TeX (‘CTAN:/web/c_cpp/cweb’); Spiderweb provides C, C++, Awk, Ada, -many others, and TeX (‘CTAN:/web/spiderweb’); and, of course, the +C and TeX ('CTAN:/web/c_cpp/cweb'); Spiderweb provides C, C++, Awk, Ada, +many others, and TeX ('CTAN:/web/spiderweb'); and, of course, the original WEB provides Pascal and TeX, the implementation languages for the original TeX, Metafont, MetaPost, and related programs to come from the TeX project at Stanford. - The original WEB language is documented in the file ‘webman.tex’, + The original WEB language is documented in the file 'webman.tex', which is included in the archive (and available in many other places, of course). @@ -2515,44 +2515,44 @@ WEB::). Synopsis: tangle [OPTION]... WEBFILE[.web] [CHANGEFILE[.ch]] The Pascal output is written to the basename of WEBFILE extended with -‘.p’; for example, ‘tangle /wherever/foo.web’ creates ‘./foo.p’. Tangle +'.p'; for example, 'tangle /wherever/foo.web' creates './foo.p'. Tangle applies CHANGEFILE to WEBFILE before writing the output; by default, there is no change file. If the program makes use of the WEB string facility, Tangle writes -the string pool to the basename of WEBFILE extended with ‘.pool’. +the string pool to the basename of WEBFILE extended with '.pool'. The Pascal output 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. The program accepts the following options, as well as the standard -‘--help’ and ‘--version’ (*note Common options::): +'--help' and '--version' (*note Common options::): -‘-length=NUMBER’ +'-length=NUMBER' The number of characters that are considered significant in an identifier. Whether underline characters are counted depends on - the ‘-underline’ option. The default value is 32, the original + the '-underline' option. The default value is 32, the original tangle used 7, but this proved too restrictive for use by Web2c. -‘-lowercase’ -‘-mixedcase’ -‘-uppercase’ +'-lowercase' +'-mixedcase' +'-uppercase' These options specify the case of identifiers in the output of - tangle. If ‘-uppercase’ (‘-lowercase’) is specified, tangle will + tangle. If '-uppercase' ('-lowercase') is specified, tangle will convert all identifiers to uppercase (lowercase). The default is - ‘-mixedcase’, which specifies that the case will not be changed. + '-mixedcase', which specifies that the case will not be changed. -‘-underline’ +'-underline' When this option is given, tangle does not strip underline characters from identifiers. -‘-loose’ -‘-strict’ +'-loose' +'-strict' These options specify how strict tangle must be when checking - identifiers for equality. The default is ‘-loose’, which means + identifiers for equality. The default is '-loose', which means that tangle will follow the rules set by the case-smashing and - underline options above. If ‘-strict’ is set, then identifiers + underline options above. If '-strict' is set, then identifiers will always be stripped of underlines and converted to uppercase before checking whether they collide. @@ -2563,29 +2563,29 @@ File: web2c.info, Node: weave invocation, Next: pooltype invocation, Prev: ta =============================== Weave creates a TeX document from a WEB source file (*note WEB::), -assuming various macros defined in ‘webmac.tex’. It takes care of +assuming various macros defined in 'webmac.tex'. It takes care of typographic details such as page layout, indentation, and italicizing identifiers. It also automatically gathers and outputs extensive cross-reference information. Synopsis: weave [OPTION]... WEBFILE[.web] [CHANGEFILE[.ch]] -The output is to the basename of WEBFILE extended with ‘.tex’; for -example, ‘weave /wherever/foo.web’ creates ‘./foo.tex’. Weave applies +The output is to the basename of WEBFILE extended with '.tex'; for +example, 'weave /wherever/foo.web' creates './foo.tex'. Weave applies CHANGEFILE to WEBFILE before writing the output; by default, there is no change file. The program accepts the following option, as well as the standard -‘-verbose’, ‘-help’ and ‘-version’ (*note Common options::): -‘-x’ +'-verbose', '-help' and '-version' (*note Common options::): +'-x' Omit the cross-reference information: the index, the list of WEB - module names, and the table of contents (an empty ‘CONTENTS.tex’ + module names, and the table of contents (an empty 'CONTENTS.tex' file will still be written when the Weave output file is processed - by TeX using the default ‘webmac.tex’, though). + by TeX using the default 'webmac.tex', though). - Conventionally, WEB programmers should define the TeX ‘\title’ macro + Conventionally, WEB programmers should define the TeX '\title' macro at the beginning of the source file. Also, to get output of only -changed modules, one can say ‘\let\maybe=\iffalse’ (usually as the first +changed modules, one can say '\let\maybe=\iffalse' (usually as the first change in the change file).  @@ -2594,7 +2594,7 @@ File: web2c.info, Node: pooltype invocation, Prev: weave invocation, Up: WEB 9.3 Pooltype: Display WEB pool files ==================================== -Pooltype shows the so-called “string number” of each string in a WEB +Pooltype shows the so-called "string number" of each string in a WEB pool file (*note WEB::), as output by Tangle (*note tangle invocation::), including the first 256 strings corresponding to the possible input characters. Pooltype primarily serves as an example of @@ -2604,11 +2604,11 @@ WEB conventions to implementors of the TeX system. Synopsis: No path searching is done for POOLFILE. Output is to standard output. - The only options are ‘--help’ and ‘--version’ (*note Common + The only options are '--help' and '--version' (*note Common options::). As an example of the output, here is the (edited) output for -‘tex.pool’: +'tex.pool': 0: "^^@" 1: "^^A" ... @@ -2619,7 +2619,7 @@ options::). (23617 characters in all.) In Metafont and MetaPost, the first 256 characters are actually -represented as single bytes (i.e., themselves), not in the ‘^^’ +represented as single bytes (i.e., themselves), not in the '^^' notation. Consider Pooltype as showing the results after conversion for output. @@ -2629,16 +2629,16 @@ File: web2c.info, Node: DVI utilities, Next: Font utilities, Prev: WEB, Up: 10 DVI utilities **************** -TeX outputs a file in “DVI” (DeVice Independent) format as a compact +TeX outputs a file in "DVI" (DeVice Independent) format as a compact representation of the original document. DVI files can be translated to meet the requirements of a real physical device, such as PostScript printers (*note Introduction: (dvips)Top.), PCL printers (see dvilj(1)), and X displays (see xdvi(1)). In fact, DVI translators are available -for virtually all common devices: see ‘CTAN:/dviware’ (for CTAN info, +for virtually all common devices: see 'CTAN:/dviware' (for CTAN info, *note (kpathsea)unixtex.ftp::). For the precise definition of the DVI file format, see (for example) -the source file ‘web2c/dvitype.web’. +the source file 'web2c/dvitype.web'. The DVI-processing programs in the Web2c distribution are not device drivers; they perform generic utility functions. @@ -2666,20 +2666,20 @@ Synopsis: standard output if OUTDVI is not specified. The program accepts the following options, as well as the standard -‘-help’ and ‘-version’ (*note Common options::): -‘-magnification=INTEGER’ +'-help' and '-version' (*note Common options::): +'-magnification=INTEGER' Override existing magnification in INDVI with INTEGER; 1000 - specifies no magnification. This is equivalent to setting TeX’s - ‘\mag’ parameter. + specifies no magnification. This is equivalent to setting TeX's + '\mag' parameter. -‘-max-pages=N’ +'-max-pages=N' Process N pages; default is one million. -‘-page-start=PAGE-SPEC’ +'-page-start=PAGE-SPEC' Start at the first page matching PAGE-SPEC, which is one or more - (signed) integers separated by periods, corresponding to TeX’s - ‘\count0...9’ parameters at ‘\shipout’ time; ‘*’ matches anything. - Examples: ‘3’, ‘1.*.-4’. + (signed) integers separated by periods, corresponding to TeX's + '\count0...9' parameters at '\shipout' time; '*' matches anything. + Examples: '3', '1.*.-4'.  File: web2c.info, Node: dvitype invocation, Prev: dvicopy invocation, Up: DVI utilities @@ -2689,7 +2689,7 @@ File: web2c.info, Node: dvitype invocation, Prev: dvicopy invocation, Up: DVI DVItype translates a DeVice Independent (DVI) file (as output by TeX, for example) to a plain text file that humans can read. It also serves -as a DVI-validating program, i.e., if DVItype can read a file, it’s +as a DVI-validating program, i.e., if DVItype can read a file, it's correct. Synopsis: dvitype [OPTION]... DVIFILE[.dvi] @@ -2697,46 +2697,46 @@ correct. Synopsis: DVItype does not read any bitmap files, but it does read TFM files for fonts referenced in DVIFILE. The usual places are searched (*note (kpathsea)Supported file formats::). To see all the relevant paths, set -the environment variable ‘KPATHSEA_DEBUG’ to ‘-1’ before running the +the environment variable 'KPATHSEA_DEBUG' to '-1' before running the program. Output goes to standard output. The program accepts the following options, as well as the standard -‘-help’ and ‘-version’ (*note Common options::): -‘-dpi=REAL’ +'-help' and '-version' (*note Common options::): +'-dpi=REAL' Do pixel movement calculations at REAL pixels per inch; default 300.0. -‘-magnification=INTEGER’ +'-magnification=INTEGER' Override existing magnification in INDVI with INTEGER; 1000 - specifies no magnification. This is equivalent to setting TeX’s - ‘\mag’ parameter. + specifies no magnification. This is equivalent to setting TeX's + '\mag' parameter. -‘-max-pages=N’ +'-max-pages=N' Process N pages; default is one million. -‘-output-level=N’ +'-output-level=N' Verbosity level of output, from 0 to 4 (default 4): - • 0: Global document information only. - • 1: Most DVI commands included, and typeset characters + * 0: Global document information only. + * 1: Most DVI commands included, and typeset characters summarized. - • 2: Character and movement commands explicitly included. - • 3: DVI stack and current position calculations included. - • 4: Same information as level 3, but DVItype does random + * 2: Character and movement commands explicitly included. + * 3: DVI stack and current position calculations included. + * 4: Same information as level 3, but DVItype does random positioning in the file, reading the DVI postamble first. -‘-page-start=PAGE-SPEC’ +'-page-start=PAGE-SPEC' Start at the first page matching PAGE-SPEC, which is one or more - (signed) integers separated by periods, corresponding to TeX’s - ‘\count0...9’ parameters at ‘\shipout’ time; ‘*’ matches anything. - Examples: ‘1’, ‘5.*.-9’. + (signed) integers separated by periods, corresponding to TeX's + '\count0...9' parameters at '\shipout' time; '*' matches anything. + Examples: '1', '5.*.-9'. -‘-show-opcodes’ +'-show-opcodes' Show numeric opcode values (in decimal) for DVI commands, in braces after the command name. This can help in debugging DVI utilities. We use decimal because in the DVI format documentation (in - ‘dvitype.web’, among others) the opcodes are shown in decimal. + 'dvitype.web', among others) the opcodes are shown in decimal. * Menu: @@ -2749,8 +2749,8 @@ File: web2c.info, Node: dvitype output example, Up: dvitype invocation ----------------------------- As an example of the output from DVItype (see section above), here is -its (abridged) translation of the ‘story.dvi’ resulting from running the -example in ‘The TeXbook’, with ‘-output-level=4’ and ‘-show-opcodes’ on. +its (abridged) translation of the 'story.dvi' resulting from running the +example in 'The TeXbook', with '-output-level=4' and '-show-opcodes' on. ... Options selected: @@ -2806,19 +2806,19 @@ example in ‘The TeXbook’, with ‘-output-level=4’ and ‘-show-opcodes’ Explanation: - • The DVItype options are recorded at the beginning, followed by + * The DVItype options are recorded at the beginning, followed by global information about the document, including fonts used. - • Each DVI command is preceded by its byte position in the file - (‘42:’, ‘87:’, ...), and (because of the ‘-show-opcodes’) followed - by its decimal opcode value in braces (‘{141}’, ‘{142}’, ...). + * Each DVI command is preceded by its byte position in the file + ('42:', '87:', ...), and (because of the '-show-opcodes') followed + by its decimal opcode value in braces ('{141}', '{142}', ...). - • The ‘level’ lines record information about the DVI stack; ‘h’ and - ‘v’ define the current position in DVI units, while ‘hh’ and ‘vv’ + * The 'level' lines record information about the DVI stack; 'h' and + 'v' define the current position in DVI units, while 'hh' and 'vv' are the same in pixels. - • Text sequences are summarized in brackets, as in ‘[A SHORT STORY]’ - and the ‘[ 1]’. + * Text sequences are summarized in brackets, as in '[A SHORT STORY]' + and the '[ 1]'.  File: web2c.info, Node: Font utilities, Next: Legalisms, Prev: DVI utilities, Up: Top @@ -2829,11 +2829,11 @@ File: web2c.info, Node: Font utilities, Next: Legalisms, Prev: DVI utilities, The Web2c programs described here convert between various TeX-related font formats; the first section below briefly describes the formats. GFtoPK is the only one that is routinely used, as Metafont outputs GF -format, but it’s most efficient for device drivers to use PK. +format, but it's most efficient for device drivers to use PK. The precise definitions of the PK, GF, TFM, PL, VF, and VPL formats -mentioned below are in the source files that read them; ‘pktype.web’, -‘gftype.web’, ‘tftopl.web’, etc. +mentioned below are in the source files that read them; 'pktype.web', +'gftype.web', 'tftopl.web', etc. * Menu: @@ -2882,10 +2882,10 @@ source document. In order to print DVI files on real devices, you need font files defining digitized character shapes and other data. Then previewers and printer-driver programs can translate your DVI files into something usable by your monitor or printer. Bitmap fonts come with -suffixes such as ‘.600pk’ or ‘.600gf’ or ‘.3000pxl’, where the ‘600’ is +suffixes such as '.600pk' or '.600gf' or '.3000pxl', where the '600' is the horizontal dots-per-inch resolution at which the font was produced, -and the ‘pk’ or ‘gf’ or ‘pxl’ indicates the font format. Outline fonts -in PostScript Type 1 format have suffixes such as ‘.pfa’ or ‘.pfb’. +and the 'pk' or 'gf' or 'pxl' indicates the font format. Outline fonts +in PostScript Type 1 format have suffixes such as '.pfa' or '.pfb'. Fonts in pk (packed) format are in the tightly packed raster format that is pretty much the standard today. They take up less space than @@ -2894,20 +2894,20 @@ less space than fonts in pxl format. Fonts in pxl format take up gross amounts of disk space and permit only 128 characters. They are obsolete. - Font files with the ‘.pl’ (property list) suffix are the plain text -(human-readable) analog of the binary ‘.tfm’ files. The TFtoPL and + Font files with the '.pl' (property list) suffix are the plain text +(human-readable) analog of the binary '.tfm' files. The TFtoPL and PLtoTF programs convert between the two formats (*note tftopl invocation:: and *note pltotf invocation::). - Font files with the ‘.mf’ suffix are in Metafont source format. + Font files with the '.mf' suffix are in Metafont source format. These are the files used by Metafont to generate rastered fonts for specific typefaces at specific magnifications for the specific resolution and type of mapping used by your device. - The suffix ‘.vf’ identifies “virtual font” files, for which ‘.vpl’ is + The suffix '.vf' identifies "virtual font" files, for which '.vpl' is the human-readable analog. See *Note vftovp invocation::, and *note vptovf invocation::. For further discussion of virtual fonts, see -‘CTAN:/doc/virtual-fonts.knuth’, ‘CTAN:/help/virtualfonts.txt’, and +'CTAN:/doc/virtual-fonts.knuth', 'CTAN:/help/virtualfonts.txt', and *note (dvips)Virtual fonts::. (This section is based on documentation in the original Unix TeX @@ -2930,17 +2930,17 @@ Synopsis: The font GFNAME is searched for in the usual places (*note (kpathsea)Glyph lookup::). To see all the relevant paths, set the -environment variable ‘KPATHSEA_DEBUG’ to ‘-1’ before running the +environment variable 'KPATHSEA_DEBUG' to '-1' before running the program. - The suffix ‘gf’ is supplied if not already present. This suffix is -not an extension; no ‘.’ precedes it: for instance, ‘cmr10.600gf’. + The suffix 'gf' is supplied if not already present. This suffix is +not an extension; no '.' precedes it: for instance, 'cmr10.600gf'. If PKFILE is not specified, the output is written to the basename of -‘GFNAME.DPIpk’, e.g., ‘gftopk /wherever/cmr10.600gf’ creates -‘./cmr10.600pk’. +'GFNAME.DPIpk', e.g., 'gftopk /wherever/cmr10.600gf' creates +'./cmr10.600pk'. - The only options are ‘--verbose’, ‘--help’, and ‘--version’ (*note + The only options are '--verbose', '--help', and '--version' (*note Common options::).  @@ -2959,17 +2959,17 @@ programs do not support PK format. Synopsis: The font PKNAME is searched for in the usual places (*note (kpathsea)Glyph lookup::). To see all the relevant paths, set the -environment variable ‘KPATHSEA_DEBUG’ to ‘-1’ before running the +environment variable 'KPATHSEA_DEBUG' to '-1' before running the program. - The suffix ‘pk’ is supplied if not already present. This suffix is -not an extension; no ‘.’ precedes it: for instance, ‘cmr10.600pk’. + The suffix 'pk' is supplied if not already present. This suffix is +not an extension; no '.' precedes it: for instance, 'cmr10.600pk'. If GFFILE is not specified, the output is written to the basename of -‘PKNAME.DPIgf’, e.g., ‘pktogf /wherever/cmr10.600pk’ creates -‘./cmr10.600gf’. +'PKNAME.DPIgf', e.g., 'pktogf /wherever/cmr10.600pk' creates +'./cmr10.600gf'. - The only options are ‘--verbose’, ‘--help’, and ‘--version’ (*note + The only options are '--verbose', '--help', and '--version' (*note Common options::).  @@ -2980,26 +2980,26 @@ File: web2c.info, Node: pktype invocation, Next: gftype invocation, Prev: pkt PKtype translates a packed font (PK) bitmap file (as output by GFtoPK, for example) to a plain text file that humans can read. It also serves -as a PK-validating program, i.e., if PKtype can read a file, it’s +as a PK-validating program, i.e., if PKtype can read a file, it's correct. Synopsis: pktype PKNAME.DPI[pk] The font PKNAME is searched for in the usual places (*note (kpathsea)Glyph lookup::). To see all the relevant paths, set the -environment variable ‘KPATHSEA_DEBUG’ to ‘-1’ before running the +environment variable 'KPATHSEA_DEBUG' to '-1' before running the program. - The suffix ‘pk’ is supplied if not already present. This suffix is -not an extension; no ‘.’ precedes it: for instance, ‘cmr10.600pk’. + The suffix 'pk' is supplied if not already present. This suffix is +not an extension; no '.' precedes it: for instance, 'cmr10.600pk'. The translation is written to standard output. - The only options are ‘-help’ and ‘-version’ (*note Common options::). + The only options are '-help' and '-version' (*note Common options::). As an example of the output, here is the (abridged) translation of -the letter ‘K’ in ‘cmr10’, as rendered at 600dpi with the mode ‘ljfour’ -from (available from ‘ftp://ftp.tug.org/tex/modes.mf’). +the letter 'K' in 'cmr10', as rendered at 600dpi with the mode 'ljfour' +from (available from 'ftp://ftp.tug.org/tex/modes.mf'). 955: Flag byte = 184 Character = 75 Packet length = 174 Dynamic packing variable = 11 @@ -3011,43 +3011,43 @@ from (available from ‘ftp://ftp.tug.org/tex/modes.mf’). Explanation: -‘955’ +'955' The byte position in the file where this character starts. -‘Flag byte’ -‘Dynamic packing variable’ +'Flag byte' +'Dynamic packing variable' Related to the packing for this character; see the source code. -‘Character’ +'Character' The character code, in decimal. -‘Packet length’ +'Packet length' The total length of this character definition, in bytes. -‘TFM width’ +'TFM width' The device-independent (TFM) width of this character. It is 2^24 - times the ratio of the true width to the font’s design size. + times the ratio of the true width to the font's design size. -‘dx’ - The device-dependent width, in “scaled pixels”, i.e., units of +'dx' + The device-dependent width, in "scaled pixels", i.e., units of horizontal pixels times 2^16. -‘Height’ -‘Width’ +'Height' +'Width' The bitmap height and width, in pixels. -‘X-offset’ -‘Y-offset’ +'X-offset' +'Y-offset' Horizontal and vertical offset from the upper left pixel to the reference (origin) pixel for this character, in pixels (right and - down are positive). The “reference pixel” is the pixel that + down are positive). The "reference pixel" is the pixel that occupies the unit square in Metafont; the Metafont reference point is the lower left hand corner of this pixel. Put another way, the x-offset is the negative of the left side bearing; the right side bearing is the horizontal escapement minus the bitmap width plus the x-offset. -‘[2]23(16)...’ +'[2]23(16)...' Finally, run lengths of black pixels alternate with parenthesized run lengths of white pixels, and brackets indicate a repeated row. @@ -3060,32 +3060,32 @@ File: web2c.info, Node: gftype invocation, Next: tftopl invocation, Prev: pkt GFtype translates a generic font (GF) bitmap file (as output by Metafont, for example) to a plain text file that humans can read. It also serves as a GF-validating program, i.e., if GFtype can read a file, -it’s correct. Synopsis: +it's correct. Synopsis: gftype [OPTION]... GFNAME.DPI[gf] The font GFNAME is searched for in the usual places (*note (kpathsea)Glyph lookup::). To see all the relevant paths, set the -environment variable ‘KPATHSEA_DEBUG’ to ‘-1’ before running the +environment variable 'KPATHSEA_DEBUG' to '-1' before running the program. - The suffix ‘gf’ is supplied if not already present. This suffix is -not an extension; no ‘.’ precedes it: for instance, ‘cmr10.600gf’. + The suffix 'gf' is supplied if not already present. This suffix is +not an extension; no '.' precedes it: for instance, 'cmr10.600gf'. The translation is written to standard output. The program accepts the following options, as well as the standard -‘-help’ and ‘-version’ (*note Common options::): -‘-images’ - Show the characters’ bitmaps using asterisks and spaces. +'-help' and '-version' (*note Common options::): +'-images' + Show the characters' bitmaps using asterisks and spaces. -‘-mnemonics’ +'-mnemonics' Translate all commands in the GF file. As an example of the output, here is the (abridged) translation of -the letter ‘K’ in ‘cmr10’, as rendered at 600dpi with the mode ‘ljfour’ -from ‘modes.mf’ (available from ), with -both ‘-mnemonics’ and ‘-images’ enabled. +the letter 'K' in 'cmr10', as rendered at 600dpi with the mode 'ljfour' +from 'modes.mf' (available from ), with +both '-mnemonics' and '-images' enabled. GFtype outputs the information about a character in two places: a main definition and a one-line summary at the end. We show both. Here @@ -3124,30 +3124,30 @@ is the main definition: Explanation: -‘2033’ -‘2043’ -‘...’ +'2033' +'2043' +'...' The byte position in the file where each GF command starts. -‘beginning of char 75’ +'beginning of char 75' The character code, in decimal. -‘3<=m<=60 0<=n<=56’ - The character’s bitmap lies between 3 and 60 (inclusive) +'3<=m<=60 0<=n<=56' + The character's bitmap lies between 3 and 60 (inclusive) horizontally, and between 0 and 56 (inclusive) vertically. (m is a column position and n is a row position.) Thus, 3 is the left side bearing. The right side bearing is the horizontal escapement (given below) minus the maximum m. -‘(initially n=56) paint (0)24(12)20’ +'(initially n=56) paint (0)24(12)20' The first row of pixels: 0 white pixels, 24 black pixels, 12 white pixels, etc. -‘newrow 0 (n=55) paint 24(12)20’ +'newrow 0 (n=55) paint 24(12)20' The second row of pixels, with zero leading white pixels on the row. -‘eoc’ +'eoc' The end of the main character definition. Here is the GF postamble information that GFtype outputs at the end: @@ -3156,18 +3156,18 @@ Explanation: Explanation: -‘dx’ - The device-dependent width, in “scaled pixels”, i.e., units of - horizontal pixels times 2^16. The ‘(65)’ is simply the same number +'dx' + The device-dependent width, in "scaled pixels", i.e., units of + horizontal pixels times 2^16. The '(65)' is simply the same number rounded. If the vertical escapement is nonzero, it would appear - here as a ‘dy’ value. + here as a 'dy' value. -‘width’ +'width' The device-independent (TFM) width of this character. It is 2^24 - times the ratio of the true width to the font’s design size. The - ‘64.57289’ is the same number converted to pixels. + times the ratio of the true width to the font's design size. The + '64.57289' is the same number converted to pixels. -‘loc’ +'loc' The byte position in the file where this character starts.  @@ -3177,44 +3177,44 @@ File: web2c.info, Node: tftopl invocation, Next: pltotf invocation, Prev: gft ======================================================== TFtoPL translates a TeX font metric (TFM, *note (dvips)Metric files::) -file (as output by Metafont, for example) to “property list format” (a +file (as output by Metafont, for example) to "property list format" (a list of parenthesized items describing the font) that humans can edit or read. This program is mostly used by people debugging TeX implementations, writing font utilities, etc. Synopsis: tftopl [OPTION]... TFMNAME[.tfm] [PLFILE[.pl]] - The font TFMNAME (extended with ‘.tfm’ if necessary) is searched for + The font TFMNAME (extended with '.tfm' if necessary) is searched for in the usual places (*note (kpathsea)Supported file formats::). To see -all the relevant paths, set the environment variable ‘KPATHSEA_DEBUG’ to -‘-1’ before running the program. +all the relevant paths, set the environment variable 'KPATHSEA_DEBUG' to +'-1' before running the program. - If PLFILE (which is extended with ‘.pl’ if necessary) is not + If PLFILE (which is extended with '.pl' if necessary) is not specified, the property list file is written to standard output. The property list file can be converted back to TFM format by the companion program TFtoPL (see the next section). The program accepts the following option, as well as the standard -‘-verbose’, ‘-help’ and ‘-version’ (*note Common options::): -‘-charcode-format=TYPE’ +'-verbose', '-help' and '-version' (*note Common options::): +'-charcode-format=TYPE' Output character codes in the PL file according to TYPE: either - ‘octal’ or ‘ascii’. Default is ‘ascii’ for letters and digits, - octal for all other characters. Exception: if the font’s coding - scheme starts with ‘TeX math sy’ or ‘TeX math ex’, all character + 'octal' or 'ascii'. Default is 'ascii' for letters and digits, + octal for all other characters. Exception: if the font's coding + scheme starts with 'TeX math sy' or 'TeX math ex', all character codes are output in octal. - In ‘ascii’ format, character codes that correspond to graphic + In 'ascii' format, character codes that correspond to graphic characters, except for left and right parentheses, are output as a - ‘C’ followed by the single character: ‘C K’, for example. In octal - format, character codes are output as the letter ‘O’ followed by - octal digits, as in ‘O 113’ for ‘K’. + 'C' followed by the single character: 'C K', for example. In octal + format, character codes are output as the letter 'O' followed by + octal digits, as in 'O 113' for 'K'. - ‘octal’ format is useful for symbol and other non-alphabetic fonts, + 'octal' format is useful for symbol and other non-alphabetic fonts, where using ASCII characters for the character codes is merely confusing. As an example of the output, here is the (abridged) property list -translation of ‘cmr10.tfm’: +translation of 'cmr10.tfm': (FAMILY CMR) (FACE O 352) @@ -3263,28 +3263,28 @@ translation of ‘cmr10.tfm’: ... As you can see, the general format is a list of parenthesized -“properties”, nested where necessary. +"properties", nested where necessary. - • The first few items (‘FAMILY’, ‘FACE’, and so on) are the so-called - “headerbyte” information from Metafont, giving general information + * The first few items ('FAMILY', 'FACE', and so on) are the so-called + "headerbyte" information from Metafont, giving general information about the font. - • The ‘FONTDIMEN’ property defines the TeX ‘\fontdimen’ values. + * The 'FONTDIMEN' property defines the TeX '\fontdimen' values. - • The ‘LIGTABLE’ property defines the ligature and kerning table. - ‘LIG’ properties define ligatures: in the example above, an ‘f’ (in - the ‘LABEL’) followed by an ‘i’ is a ligature, i.e., a typesetting + * The 'LIGTABLE' property defines the ligature and kerning table. + 'LIG' properties define ligatures: in the example above, an 'f' (in + the 'LABEL') followed by an 'i' is a ligature, i.e., a typesetting program like TeX replaces those two consecutive characters by the - character at position octal ’014 in the current font—presumably the - ‘fi’ ligature. ‘KRN’ properties define kerns: if an ‘f’ is - followed by character octal ’047 (an apostrophe), TeX inserts a + character at position octal '014 in the current font--presumably + the 'fi' ligature. 'KRN' properties define kerns: if an 'f' is + followed by character octal '047 (an apostrophe), TeX inserts a small amount of space between them: 0.077779 times the design size - the font was loaded at (about three-quarters of a printer’s point + the font was loaded at (about three-quarters of a printer's point by default in this case, or .001 inches). - • The ‘CHARACTER’ property defines the dimensions of a character: its + * The 'CHARACTER' property defines the dimensions of a character: its width, height, depth, and italic correction, also in design-size - units, as explained in the previous item. For our example ‘f’, the + units, as explained in the previous item. For our example 'f', the depth is zero, so that property is omitted. TFtoPL also inserts any kerns and ligatures for this character as a comment. @@ -3296,18 +3296,18 @@ File: web2c.info, Node: pltotf invocation, Next: vftovp invocation, Prev: tft PLtoTF translates a property list file (as output by TFtoPL, for example) to TeX font metric (TFM, *note (dvips)Metric files::) format. -It’s much easier for both programs and humans to create the (plain text) +It's much easier for both programs and humans to create the (plain text) property list files and let PLtoTF take care of creating the binary TFM equivalent than to output TFM files directly. Synopsis: pltotf [OPTION]... PLFILE[.pl] [TFMFILE[.tfm]] - If TFMFILE (extended with ‘.tfm’ if necessary) is not specified, the -TFM file is written to the basename of ‘PLFILE.tfm’, e.g., ‘pltotf -/wherever/cmr10.pl’ creates ‘./cmr10.tfm’. (Since TFM files are binary, + If TFMFILE (extended with '.tfm' if necessary) is not specified, the +TFM file is written to the basename of 'PLFILE.tfm', e.g., 'pltotf +/wherever/cmr10.pl' creates './cmr10.tfm'. (Since TFM files are binary, writing to standard output by default is undesirable.) - The only options are ‘-verbose’, ‘-help’, and ‘-version’ (*note + The only options are '-verbose', '-help', and '-version' (*note Common options::). For an example of property list format, see the previous section. @@ -3321,40 +3321,40 @@ File: web2c.info, Node: vftovp invocation, Next: vptovf invocation, Prev: plt VFtoVP translates a virtual font metric (VF, *note (dvips)Virtual fonts::) file and its accompanying TeX font metric (TFM, *note (dvips)Metric files::) file (as output by VPtoVF, for example) to -“virtual property list format” (a list of parenthesized items describing +"virtual property list format" (a list of parenthesized items describing the virtual font) that humans can edit or read. This program is mostly used by people debugging virtual font utilities. Synopsis: vftovp [OPTION]... VFNAME[.vf] [TFMNAME[.tfm] [VPLFILE[.vpl]]] - The fonts VFNAME and TFMNAME (extended with ‘.vf’ and ‘.tfm’ if + The fonts VFNAME and TFMNAME (extended with '.vf' and '.tfm' if necessary) are searched for in the usual places (*note (kpathsea)Supported file formats::). To see all the relevant paths, set -the environment variable ‘KPATHSEA_DEBUG’ to ‘-1’ before running the -program. If TFMNAME is not specified, VFNAME (without a trailing ‘.vf’) +the environment variable 'KPATHSEA_DEBUG' to '-1' before running the +program. If TFMNAME is not specified, VFNAME (without a trailing '.vf') is used. - If VPLFILE (extended with ‘.vpl’ if necessary) is not specified, the + If VPLFILE (extended with '.vpl' if necessary) is not specified, the property list file is written to standard output. The property list file can be converted back to VF and TFM format by the companion program VFtoVP (see the next section). The program accepts the following option, as well as the standard -‘-verbose’, ‘-help’ and ‘-version’ (*note Common options::): -‘-charcode-format=TYPE’ +'-verbose', '-help' and '-version' (*note Common options::): +'-charcode-format=TYPE' Output character codes in the PL file according to TYPE: either - ‘octal’ or ‘ascii’. Default is ‘ascii’ for letters and digits, - octal for all other characters. Exception: if the font’s coding - scheme starts with ‘TeX math sy’ or ‘TeX math ex’, all character + 'octal' or 'ascii'. Default is 'ascii' for letters and digits, + octal for all other characters. Exception: if the font's coding + scheme starts with 'TeX math sy' or 'TeX math ex', all character codes are output in octal. - In ‘ascii’ format, character codes that correspond to graphic + In 'ascii' format, character codes that correspond to graphic characters, except for left and right parentheses, are output as a - ‘C’ followed by the single character: ‘C K’, for example. In octal - format, character codes are output as the letter ‘O’ followed by - octal digits, as in ‘O 113’ for ‘K’. + 'C' followed by the single character: 'C K', for example. In octal + format, character codes are output as the letter 'O' followed by + octal digits, as in 'O 113' for 'K'. - ‘octal’ format is useful for symbol and other non-alphabetic fonts, + 'octal' format is useful for symbol and other non-alphabetic fonts, where using ASCII characters for the character codes is merely confusing. @@ -3366,19 +3366,19 @@ File: web2c.info, Node: vptovf invocation, Next: Font utilities available else VPtoVF translates a virtual property list file (as output by VFtoVP, for example) to virtual font (VF, *note (dvips)Virtual fonts::) and TeX font -metric (TFM, *note (dvips)Metric files::) files. It’s much easier for +metric (TFM, *note (dvips)Metric files::) files. It's much easier for both programs and humans to create the (plain text) property list files and let VPtoVF take care of creating the binary VF and TFM equivalents than to output them directly. Synopsis: vptovf [OPTION]... VPLFILE[.vpl] [VFFILE[.vf] [TFMFILE[.tfm]]] - If VFFILE (extended with ‘.vf’ if necessary) is not specified, the VF -output is written to the basename of ‘VPLFILE.vf’; similarly for -TFMFILE. For example, ‘vptovf /wherever/ptmr.vpl’ creates ‘./ptmr.vf’ -and ‘./ptmr.tfm’. + If VFFILE (extended with '.vf' if necessary) is not specified, the VF +output is written to the basename of 'VPLFILE.vf'; similarly for +TFMFILE. For example, 'vptovf /wherever/ptmr.vpl' creates './ptmr.vf' +and './ptmr.tfm'. - The only options are ‘-verbose’, ‘-help’, and ‘-version’ (*note + The only options are '-verbose', '-help', and '-version' (*note Common options::).  @@ -3389,48 +3389,48 @@ File: web2c.info, Node: Font utilities available elsewhere, Prev: vptovf invoc The Web2c complement of font utilities merely implements a few basic conversions. Many other more sophisticated font utilities exist; most -are in ‘CTAN:/fonts/utilities’ (for CTAN info, *note +are in 'CTAN:/fonts/utilities' (for CTAN info, *note (kpathsea)unixtex.ftp::). Here are some of the most commonly-requested items: - • AFM (Adobe font metric) to TFM conversion: *note (dvips)Invoking - afm2tfm::, and ‘CTAN:/fonts/utilities/afmtopl’. + * AFM (Adobe font metric) to TFM conversion: *note (dvips)Invoking + afm2tfm::, and 'CTAN:/fonts/utilities/afmtopl'. - • BDF (the X bitmap format) conversion: + * BDF (the X bitmap format) conversion: . - • Creating fonts using MetaPost: MetaType1. + * Creating fonts using MetaPost: MetaType1. . This is used to create the - excellent Latin Modern font family (‘CTAN:/fonts/lm’), which + excellent Latin Modern font family ('CTAN:/fonts/lm'), which extends Computer Modern to a vast repertoire of scripts. - • Editing of bitmap fonts: Xbfe from the GNU font utilities mentioned + * Editing of bitmap fonts: Xbfe from the GNU font utilities mentioned below; the X BDF-editing programs available from and ; and finally, if your - fonts have only 128 characters, you can use the old ‘gftopxl’, - ‘pxtoch’, and ‘chtopx’ programs from . + fonts have only 128 characters, you can use the old 'gftopxl', + 'pxtoch', and 'chtopx' programs from . - • Editing of outline fonts: FontForge, . + * Editing of outline fonts: FontForge, . This is a very elaborate program with support for many outline formats (Type 1, OpenType, TrueType, ...), and many advanced font editing features. - • PK bitmaps from PostScript outline fonts: gsftopk from the ‘xdvi’ - distribution. Alternatively, ‘ps2pk’, from - ‘CTAN:/fonts/utilities/ps2pk’. + * PK bitmaps from PostScript outline fonts: gsftopk from the 'xdvi' + distribution. Alternatively, 'ps2pk', from + 'CTAN:/fonts/utilities/ps2pk'. - • PostScript Type 1 font format conversion (i.e., between PFA and PFB + * PostScript Type 1 font format conversion (i.e., between PFA and PFB formats): . - • Tracing bitmaps to fitted outlines: Autotrace + * Tracing bitmaps to fitted outlines: Autotrace (), Potrace (). For Metafont fonts, either of - the two programs ‘mftrace’ () - or ‘textrace’ () make the job + the two programs 'mftrace' () + or 'textrace' () make the job easier. - • Virtual font creation: . + * Virtual font creation: .  File: web2c.info, Node: Legalisms, Next: References, Prev: Font utilities, Up: Top @@ -3445,15 +3445,15 @@ permissions for that file. Following is a summary. domain (). The sources may be copied verbatim, or used as the starting point of new software under different names; however, per the wishes of the authors, they should be -modified only through a ‘.ch’ file, but this is in the nature of a +modified only through a '.ch' file, but this is in the nature of a development request rather than a legal requirement. MLTeX, pdfTeX, LuaTeX, XeTeX, and all the other derived engines have used various license terms for their additions to the base code, often the GPL (see ) or (for example) the -file ‘web2c/pdftexdir/COPYINGv2’. They also mostly make use of +file 'web2c/pdftexdir/COPYINGv2'. They also mostly make use of additional libraries with their own (compatible) terms. Please see each -program’s sources. +program's sources. The Kpathsea library is covered by the GNU Lesser General Public License (*note (kpathsea)Introduction::). Therefore, the _binaries_ @@ -3461,7 +3461,7 @@ resulting from a standard Web2c compilation are also covered by the LGPL; so if you (re)distribute the binaries, you must also (offer to) distribute the complete source that went into those binaries. See or the file -‘kpathsea/COPYING.LESSERv2’. +'kpathsea/COPYING.LESSERv2'.  File: web2c.info, Node: References, Next: Index, Prev: Legalisms, Up: Top @@ -3483,30 +3483,30 @@ Appendix B References . 6. For a bibliography of formal articles and technical reports on the - TeX project, see the books ‘TeX: The Program’ or ‘Metafont: The - Program’ cited below. + TeX project, see the books 'TeX: The Program' or 'Metafont: The + Program' cited below. 7. [Bil87] Neenie Billawala. Write-white printing engines and tuning - fonts with Metafont. ‘TUGboat’, 8(1):29–32, April 1987. + fonts with Metafont. 'TUGboat', 8(1):29-32, April 1987. . 8. [Hob89] John D. Hobby. A Metafont-like system with PS output. - ‘TUGboat’, 10(4):505–512, December 1989. + 'TUGboat', 10(4):505-512, December 1989. . - 9. [Hob92] John D. Hobby. A User’s Manual for MetaPost. Technical + 9. [Hob92] John D. Hobby. A User's Manual for MetaPost. Technical Report CSTR-162, AT&T Bell Laboratories, 1992. 10. [Hob93] John D. Hobby. Drawing Graphs with MetaPost. Technical Report CSTR-164, AT&T Bell Laboratories, 1993. - 11. [HS91] Samuel P. Harbison and Guy L. Steele Jr. ‘C—A Reference - Manual’. Prentice-Hall, Upper Saddle River, NJ 07458, USA, third + 11. [HS91] Samuel P. Harbison and Guy L. Steele Jr. 'C--A Reference + Manual'. Prentice-Hall, Upper Saddle River, NJ 07458, USA, third edition, 1991. An authoritative reference to the C programming language, and a good companion to Kernighan and Ritchie. - 12. [KL93] Donald E. Knuth and Silvio Levy. ‘The CWEB System of - Structured Documentation, Version 3.0’. Addison-Wesley, Reading, + 12. [KL93] Donald E. Knuth and Silvio Levy. 'The CWEB System of + Structured Documentation, Version 3.0'. Addison-Wesley, Reading, MA, USA, 1993. . 13. [Knu84] Donald E. Knuth. A torture test for TeX. Report No. @@ -3517,39 +3517,39 @@ Appendix B References STAN-CS-86-1095, Stanford University, Department of Computer Science, 1986. - 15. [Knu86b] Donald E. Knuth. ‘The TeXbook’, volume A of ‘Computers - and Typesetting’. Addison-Wesley, Reading, MA, USA, 1986. + 15. [Knu86b] Donald E. Knuth. 'The TeXbook', volume A of 'Computers + and Typesetting'. Addison-Wesley, Reading, MA, USA, 1986. - 16. [Knu86c] Donald E. Knuth. ‘TeX: The Program’, volume B of - ‘Computers and Typesetting’. Addison-Wesley, Reading, MA, USA, + 16. [Knu86c] Donald E. Knuth. 'TeX: The Program', volume B of + 'Computers and Typesetting'. Addison-Wesley, Reading, MA, USA, 1986. - 17. [Knu86d] Donald E. Knuth. ‘The METAFONTbook’, volume C of - ‘Computers and Typesetting’. Addison-Wesley, Reading, MA, USA, + 17. [Knu86d] Donald E. Knuth. 'The METAFONTbook', volume C of + 'Computers and Typesetting'. Addison-Wesley, Reading, MA, USA, 1986. - 18. [Knu86e] Donald E. Knuth. ‘METAFONT: The Program’, volume D of - ‘Computers and Typesetting’. Addison-Wesley, Reading, MA, USA, + 18. [Knu86e] Donald E. Knuth. 'METAFONT: The Program', volume D of + 'Computers and Typesetting'. Addison-Wesley, Reading, MA, USA, 1986. - 19. [Knu86f] Donald E. Knuth. ‘Computer Modern Typefaces’, volume E - of ‘Computers and Typesetting’. Addison-Wesley, Reading, MA, USA, + 19. [Knu86f] Donald E. Knuth. 'Computer Modern Typefaces', volume E + of 'Computers and Typesetting'. Addison-Wesley, Reading, MA, USA, 1986. - 20. [Knu89] Donald E. Knuth. The errors of TeX. ‘Software—Practice - and Experience’, 19(7):607–681, July 1989. This is an updated + 20. [Knu89] Donald E. Knuth. The errors of TeX. 'Software--Practice + and Experience', 19(7):607-681, July 1989. This is an updated version of Knuth:1988:ET. 21. [Knu90] Donald Knuth. Virtual Fonts: More Fun for Grand Wizards. - ‘TUGboat’, 11(1):13–23, April 1990. + 'TUGboat', 11(1):13-23, April 1990. . - 22. [Knu92] Donald E. Knuth. ‘Literate Programming’. CSLI Lecture + 22. [Knu92] Donald E. Knuth. 'Literate Programming'. CSLI Lecture Notes Number 27. Stanford University Center for the Study of Language and Information, Stanford, CA, USA, 1992. - 23. [Lam94] Leslie Lamport. ‘LaTeX: A Document Preparation System: - User’s Guide and Reference Manual’. Addison-Wesley, Reading, MA, + 23. [Lam94] Leslie Lamport. 'LaTeX: A Document Preparation System: + User's Guide and Reference Manual'. Addison-Wesley, Reading, MA, USA, second edition, 1994. Reprinted with corrections, 1996. 24. [Lia83] Franklin Mark Liang. Word hy-phen-a-tion by com-put-er. @@ -3558,9 +3558,9 @@ Appendix B References 25. [Mac91] Pierre A. MacKay. Looking at the pixels: Quality control for 300 dpi laser printer fonts, especially Metafonts. In Robert - A. Morris and Jacques Andre, editors, ‘Raster Imaging and Digital - Typography II—Papers from the second RIDT meeting, held in Boston, - Oct. 14–16, 1991’, pages 205–215, New York, 1991. Cambridge + A. Morris and Jacques Andre, editors, 'Raster Imaging and Digital + Typography II--Papers from the second RIDT meeting, held in Boston, + Oct. 14-16, 1991', pages 205-215, New York, 1991. Cambridge University Press.  @@ -3615,7 +3615,7 @@ Index * -base=BASE: Determining the memory dump to use. (line 15) * -base=DUMPNAME: Common options. (line 39) -* -change=CHFILE: mft invocation. (line 62) +* -change=CHFILE: mft invocation. (line 63) * -charcode-format=TYPE: tftopl invocation. (line 27) * -charcode-format=TYPE <1>: vftovp invocation. (line 30) * -cnf-line: Common options. (line 25) @@ -3677,7 +3677,7 @@ Index * -shell-restricted: tex invocation. (line 122) * -show-opcodes: dvitype invocation. (line 52) * -strict: tangle invocation. (line 46) -* -style=MFTFILE: mft invocation. (line 66) +* -style=MFTFILE: mft invocation. (line 67) * -T: mpost invocation. (line 111) * -terse: bibtex invocation. (line 28) * -tex=TEXPROGRAM: mpost invocation. (line 114) @@ -3829,7 +3829,7 @@ Index * c-sources Makefile target: Additional targets. (line 12) * caveats for \input filenames: \input filename caveats. (line 6) -* change files, and MFT: mft invocation. (line 62) +* change files, and MFT: mft invocation. (line 63) * change files, and Tangle: tangle invocation. (line 11) * change files, and Weave: weave invocation. (line 14) * changing error messages style: Common options. (line 31) @@ -3849,7 +3849,7 @@ Index (line 69) * cm.base: Initial Metafont. (line 26) * cmbase.mf: Initial Metafont. (line 26) -* cmbase.mft: mft invocation. (line 72) +* cmbase.mft: mft invocation. (line 73) * cmmf.base not recommended: Initial Metafont. (line 26) * color, in DVItoMP: dvitomp invocation. (line 15) * comments, in TCX files: TCX files. (line 70) @@ -3862,7 +3862,7 @@ Index (line 6) * Computer Modern fonts, and Troff: mpost invocation. (line 61) * Computer Modern macros: Initial Metafont. (line 26) -* Computer Modern Typefaces, production of: mft invocation. (line 72) +* Computer Modern Typefaces, production of: mft invocation. (line 73) * configuration: Installation. (line 6) * configuration file reading: Path searching. (line 6) * configuration file values: Runtime options. (line 6) @@ -3935,7 +3935,7 @@ Index * e response at error prompt: Editor invocation. (line 6) * e-circumflex: \charsubdef. (line 20) * e-TeX: TeX extensions. (line 20) -* e.mft: mft invocation. (line 72) +* e.mft: mft invocation. (line 73) * EC fonts: tex invocation. (line 41) * EC fonts <1>: mf invocation. (line 24) * editing of bitmap fonts: Font utilities available elsewhere. @@ -4189,7 +4189,7 @@ Index (line 15) * MetaPost input files: mpost invocation. (line 26) * MetaPost invocation: mpost invocation. (line 6) -* MetaPost source, prettyprinting: mft invocation. (line 77) +* MetaPost source, prettyprinting: mft invocation. (line 79) * MetaPost, initial: Initial MetaPost. (line 6) * MetaPost, TeX, and Metafont: Three programs. (line 6) * metatype1: Font utilities available elsewhere. @@ -4306,7 +4306,7 @@ Index * plain.bst: Basic BibTeX style files. (line 11) * plain.fmt: Initial TeX. (line 13) -* plain.mft: mft invocation. (line 66) +* plain.mft: mft invocation. (line 67) * pltotf: pltotf invocation. (line 6) * pool file, writing: tangle invocation. (line 16) * Poole, Simon: Online Metafont graphics. @@ -4354,7 +4354,7 @@ Index * Raichle, Bernd: MLTeX. (line 6) * reading from the output directory: Output file location. (line 15) -* reading, additional: Introduction. (line 71) +* reading, additional: Introduction. (line 72) * readonly directory, running TeX in: Output file location. (line 53) * readonly directory, running TeX in <1>: Output file location. @@ -4417,7 +4417,7 @@ Index * string pool, writing: tangle invocation. (line 16) * string representation: pooltype invocation. (line 30) * style design, for BibTeX: bibtex invocation. (line 49) -* style files: mft invocation. (line 66) +* style files: mft invocation. (line 67) * substitutions of font glyphs: MLTeX. (line 6) * sun: Online Metafont graphics. (line 42) @@ -4603,79 +4603,79 @@ Index  Tag Table: -Node: Top2764 -Node: Introduction3838 -Node: Installation7621 -Node: configure options9713 -Node: Compile-time options11871 -Node: Additional targets13009 -Node: Triptrap14382 -Node: Commonalities15963 -Node: Option conventions16636 -Node: Common options17919 -Node: Path searching22833 -Node: Output file location23829 -Node: Three programs27052 -Node: Runtime options27767 -Node: Initial and virgin30962 -Node: Memory dumps31943 -Node: Creating memory dumps32399 -Node: Determining the memory dump to use33618 -Node: Hardware and memory dumps35263 -Node: Editor invocation38079 -Node: \input filenames38990 -Node: \input quoted filename40601 -Node: \input braced filename41394 -Node: \input filename caveats42344 -Node: TeX43910 -Node: tex invocation45086 -Node: Initial TeX52432 -Node: Formats53852 -Node: Languages and hyphenation56729 -Node: MLTeX57159 -Node: \charsubdef58815 -Node: \tracingcharsubdef61220 -Node: TCX files61819 -Node: patgen invocation67370 -Node: Shell escapes68093 -Node: IPC and TeX71989 -Node: TeX extensions72575 -Node: Metafont75366 -Node: mf invocation76658 -Node: Initial Metafont80644 -Node: Modes82342 -Node: Online Metafont graphics84664 -Node: gftodvi invocation88269 -Node: mft invocation91221 -Node: MetaPost95367 -Node: mpost invocation96209 -Node: Initial MetaPost101455 -Node: dvitomp invocation102406 -Node: BibTeX103103 -Node: bibtex invocation103464 -Node: Basic BibTeX style files106070 -Node: WEB107470 -Node: tangle invocation108703 -Node: weave invocation110903 -Node: pooltype invocation112358 -Node: DVI utilities113508 -Node: dvicopy invocation114454 -Node: dvitype invocation115787 -Node: dvitype output example118202 -Node: Font utilities121327 -Node: Font file formats122521 -Node: gftopk invocation125856 -Node: pktogf invocation127091 -Node: pktype invocation128301 -Node: gftype invocation131228 -Node: tftopl invocation135859 -Node: pltotf invocation140621 -Node: vftovp invocation141702 -Node: vptovf invocation144031 -Node: Font utilities available elsewhere145092 -Node: Legalisms147359 -Node: References148820 -Node: Index153056 +Node: Top2759 +Node: Introduction3831 +Node: Installation7587 +Node: configure options9631 +Node: Compile-time options11653 +Node: Additional targets12755 +Node: Triptrap14032 +Node: Commonalities15535 +Node: Option conventions16192 +Node: Common options17415 +Node: Path searching22121 +Node: Output file location23093 +Node: Three programs26218 +Node: Runtime options26925 +Node: Initial and virgin30066 +Node: Memory dumps31015 +Node: Creating memory dumps31467 +Node: Determining the memory dump to use32674 +Node: Hardware and memory dumps34251 +Node: Editor invocation37001 +Node: \input filenames37864 +Node: \input quoted filename39415 +Node: \input braced filename40192 +Node: \input filename caveats41122 +Node: TeX42636 +Node: tex invocation43804 +Node: Initial TeX50788 +Node: Formats52152 +Node: Languages and hyphenation54969 +Node: MLTeX55399 +Node: \charsubdef57027 +Node: \tracingcharsubdef59350 +Node: TCX files59925 +Node: patgen invocation65365 +Node: Shell escapes66072 +Node: IPC and TeX69840 +Node: TeX extensions70410 +Node: Metafont73191 +Node: mf invocation74479 +Node: Initial Metafont78316 +Node: Modes79946 +Node: Online Metafont graphics82196 +Node: gftodvi invocation85621 +Node: mft invocation88441 +Node: MetaPost92439 +Node: mpost invocation93275 +Node: Initial MetaPost98311 +Node: dvitomp invocation99233 +Node: BibTeX99898 +Node: bibtex invocation100259 +Node: Basic BibTeX style files102733 +Node: WEB104063 +Node: tangle invocation105272 +Node: weave invocation107396 +Node: pooltype invocation108803 +Node: DVI utilities109933 +Node: dvicopy invocation110867 +Node: dvitype invocation112152 +Node: dvitype output example114483 +Node: Font utilities117536 +Node: Font file formats118716 +Node: gftopk invocation121983 +Node: pktogf invocation123174 +Node: pktype invocation124340 +Node: gftype invocation127163 +Node: tftopl invocation131666 +Node: pltotf invocation136259 +Node: vftovp invocation137310 +Node: vptovf invocation139545 +Node: Font utilities available elsewhere140572 +Node: Legalisms142777 +Node: References144224 +Node: Index148357  End Tag Table diff --git a/source/texk/web2c/doc/web2c.texi b/source/texk/web2c/doc/web2c.texi index f3e59c3d19..5f691e4615 100644 --- a/source/texk/web2c/doc/web2c.texi +++ b/source/texk/web2c/doc/web2c.texi @@ -11,8 +11,8 @@ The latest version is available from ftp://ftp.tug.org/tex/texinfo.tex.} \fi @end tex -@set version 2023 -@set month-year October 2023 +@set version 2024 +@set month-year March 2024 @c Define new indices for commands in auxiliary files, filenames, and options. @defcodeindex cm diff --git a/source/texk/web2c/man/ChangeLog b/source/texk/web2c/man/ChangeLog index 282e21ef5e..267a281864 100644 --- a/source/texk/web2c/man/ChangeLog +++ b/source/texk/web2c/man/ChangeLog @@ -1,3 +1,9 @@ +2024-02-21 Andreas Scherer + + * ctwill.man, + * cweb.man, + * twill.man: Unmask hyphen in manpages. + 2024-02-16 Andreas Scherer * ctwill.man, diff --git a/source/texk/web2c/man/ctwill.man b/source/texk/web2c/man/ctwill.man index 76c14c1218..f1826cf561 100644 --- a/source/texk/web2c/man/ctwill.man +++ b/source/texk/web2c/man/ctwill.man @@ -2,36 +2,36 @@ .\" .TH "CTWILL" "1" "February 16, 2024" "Web2c @VERSION@" "General Commands Manual" .SH NAME -ctwill, ctwill\-proofsort, ctwill\-refsort, ctwill\-twinx \- translate CWEB to TeX with -mini\-indexes +ctwill, ctwill-proofsort, ctwill-refsort, ctwill-twinx \- translate CWEB to TeX with +mini-indexes .SH SYNOPSIS \f[B]ctwill\f[R] [\f[I]options\f[R]] \f[I]webfile\f[R][.w] [{\f[I]changefile\f[R][.ch]|\-} [\f[I]outfile\f[R][.tex]]] .PD 0 .P .PD -( \f[B]ctwill\-proofsort\f[R] < \f[I]texfile\f[R].tex ) 1<> +( \f[B]ctwill-proofsort\f[R] < \f[I]texfile\f[R].tex ) 1<> \f[I]texfile\f[R].tex .PD 0 .P .PD -\f[B]ctwill\-refsort\f[R] < \f[I]indexfile\f[R].ref > \f[I]indexfile\f[R].sref +\f[B]ctwill-refsort\f[R] < \f[I]indexfile\f[R].ref > \f[I]indexfile\f[R].sref .PD 0 .P .PD -\f[B]ctwill\-twinx\f[R] \f[I]outfile\f[R].tex [\f[I]outfile\f[R].tex \&...] +\f[B]ctwill-twinx\f[R] \f[I]outfile\f[R].tex [\f[I]outfile\f[R].tex \&...] > index.tex .SH DESCRIPTION The \f[B]ctwill\f[R] program converts a CWEB source document into a TeX\ file that may be formatted and printed in the usual way. It takes appropriate care of typographic details like page layout and the use of indentation, \f[I]italics\f[R], \f[B]boldface\f[R], etc., and -it supplies extensive cross\-index information that it gathers +it supplies extensive cross-index information that it gathers automatically. .PP CWEB allows you to prepare a single document containing all the information that is needed both to produce a compilable C/C++\ program -and to produce a well\-formatted document describing the program in as +and to produce a well-formatted document describing the program in as much detail as the writer may desire. The user of CWEB ought to be familiar with TeX as well as C/C++. .SH USAGE @@ -55,23 +55,23 @@ to get decent answers. Moreover, you must run the output twice through TeX. .PP After \f[B]tex foo\f[R] you will have output that looks like final pages -except that the entries of mini\-indexes won\[cq]t be alphabetized. +except that the entries of mini-indexes won\[cq]t be alphabetized. The first run produces a weird file called \f[B]foo.ref\f[R]. -Say \f[B]ctwill\-refsort < foo.ref > foo.sref\f[R] and then another \f[B]tex +Say \f[B]ctwill-refsort < foo.ref > foo.sref\f[R] and then another \f[B]tex foo\f[R] will produce alphabetized output. .PP -The \f[B]ctwill\-twinx\f[R] program compiles a master index for a set of related +The \f[B]ctwill-twinx\f[R] program compiles a master index for a set of related programs that have been processed by \f[B]ctwill\f[R] (\f[I]not\f[R] by \f[B]cweave\f[R], mind you!). The individual programs should define their names with a line of the form \f[B]\[rs]def\[rs]title{NAME}\f[R]. -For your convenience, \f[B]ctwill\-twinx\f[R] grabs the first \[lq]word\[rq] in +For your convenience, \f[B]ctwill-twinx\f[R] grabs the first \[lq]word\[rq] in \f[B]\[rs]title\f[R] and turns it into uppercase form. -You should adapt file \f[B]ctwill\-twinx\-startup.tex\f[R] for the first page of +You should adapt file \f[B]twinx-startup.tex\f[R] for the first page of the master index. .PP -The mini\-indexes list identifiers that are used but not defined on each -two\-page spread. +The mini-indexes list identifiers that are used but not defined on each +two-page spread. At the end of each section, \f[B]ctwill\f[R] gives TeX a list of identifiers used in that section and information about where they are defined. @@ -86,7 +86,7 @@ for a file called \f[B]system.bux\f[R], which will be read if present. And after \f[B]foo.aux\f[R], a third possibility is \f[B]foo.bux\f[R]. The general convention is to put definitions of system procedures such as \f[I]printf\f[R] into \f[B]system.bux\f[R], and to put definitions -found in specifically foo\-ish header files into \f[B]foo.bux\f[R]. +found in specifically foo-ish header files into \f[B]foo.bux\f[R]. Like the \f[B].aux\f[R] files, \f[B].bux\f[R] files should contain only \f[B]\[at]$\f[R] specifications. .PP @@ -95,31 +95,31 @@ components: an identifier (followed by space), a program name (enclosed in braces), a section number (followed by space), and a TeX\ part. .PP A special \f[I]proofmode\f[R] is provided so that you can check -\f[B]ctwill\f[R]\[cq]s conclusions about cross\-references. +\f[B]ctwill\f[R]\[cq]s conclusions about cross-references. Run \f[B]ctwill\f[R] with the flag \f[B]+P\f[R], and TeX will produce a -specially formatted document with mini\-indexes for each section, so +specially formatted document with mini-indexes for each section, so that you can check that your specifications are correct. .PP This \f[I]proofmode\f[R] format is used in conjunction with \f[B]pdfctproofmac.tex\f[R] that creates active hyperlinks in PDF and HINT output. -You can use \f[B]ctwill\-proofsort\f[R] to get the index entries in alphabetical +You can use \f[B]ctwill-proofsort\f[R] to get the index entries in alphabetical order; just invoke .PP -( \f[B]ctwill\-proofsort\f[R] < \f[I]texfile\f[R].tex ) 1<> +( \f[B]ctwill-proofsort\f[R] < \f[I]texfile\f[R].tex ) 1<> \f[I]texfile\f[R].tex .PP after invoking \f[B]ctwill\f[R] (twice), but before invoking TeX (once). .PP More details how to use \f[B]ctwill\f[R] can be found in the first sections of its source code, respectively the change file -\f[B]cweav\-twill.ch\f[R] applicable to the \f[B]cweave.w\f[R] source. +\f[B]cweav-twill.ch\f[R] applicable to the \f[B]cweave.w\f[R] source. A complete example with all bells and whistles is described in -\f[B]Mini\-Indexes for Literate Programs\f[R], pages 225\[en]245 of +\f[B]Mini-Indexes for Literate Programs\f[R], pages 225\[en]245 of Knuth\[cq]s \f[B]Digital Typography\f[R] (\f[I]CSLI\f[R], 1999). .SH DIFFERENCES TO ORIGINAL CTWILL The present incarnation of \f[B]ctwill\f[R] and its utilities tries hard -to be a drop\-in replacement for the original package. +to be a drop-in replacement for the original package. There are, however, a few differences worth noting: .IP \[bu] 2 This version is based on the most recent version of CWEB (4.11). @@ -143,7 +143,7 @@ active hyperlinks (\f[B]+lpdf\f[R]). \f[B]\-\-verbose\f[R] option to get the original behavior. .IP \[bu] 2 File lookup with the environment variable CWEBINPUTS is extended to -permit several, colon\-separated, paths; see ENVIRONMENT below. +permit several, colon-separated, paths; see ENVIRONMENT below. .IP \[bu] 2 If properly configured, the main program \f[B]ctwill\f[R] is localized with the \[lq]GNU gettext utilities\[rq]. diff --git a/source/texk/web2c/man/cweb.man b/source/texk/web2c/man/cweb.man index 0ae9f37c80..ab0b286e25 100644 --- a/source/texk/web2c/man/cweb.man +++ b/source/texk/web2c/man/cweb.man @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc .\" -.TH "CWEB" "1" "August 20, 2022" "Web2c @VERSION@" "General Commands Manual" +.TH "CWEB" "1" "February 21, 2024" "Web2c @VERSION@" "General Commands Manual" .SH NAME ctangle, cweave \- translate CWEB to C/C++ and/or TeX .SH SYNOPSIS @@ -21,12 +21,12 @@ The \f[B]cweave\f[R] program converts the same CWEB file into a TeX\ file that may be formatted and printed in the usual way. It takes appropriate care of typographic details like page layout and the use of indentation, \f[I]italics\f[R], \f[B]boldface\f[R], etc., and -it supplies extensive cross\-index information that it gathers +it supplies extensive cross-index information that it gathers automatically. .PP CWEB allows you to prepare a single document containing all the information that is needed both to produce a compilable C/C++\ program -and to produce a well\-formatted document describing the program in as +and to produce a well-formatted document describing the program in as much detail as the writer may desire. The user of CWEB ought to be familiar with TeX as well as C/C++. .SH USAGE @@ -43,7 +43,7 @@ the current directory) with the extension \f[B].tex\f[R]. If you just want to change the output file name, but don\[cq]t have a change file to apply, you can use `\f[B]\-\f[R]' as the second argument. .SH DIFFERENCES TO ORIGINAL CWEB -CWEBbin tries hard to be a drop\-in replacement for CWEB, so in general +CWEBbin tries hard to be a drop-in replacement for CWEB, so in general you should not notice any differences in invoking the programs nor in the resulting output. There are, however, a few differences worth noting: @@ -61,7 +61,7 @@ CWEB in TeX\ Live operates silently by default (as of 2019); use the \f[B]\-\-verbose\f[R] option to get the original behavior. .IP \[bu] 2 File lookup with the environment variable CWEBINPUTS is extended to -permit several, colon\-separated, paths; see ENVIRONMENT below. +permit several, colon-separated, paths; see ENVIRONMENT below. .IP \[bu] 2 If properly configured, the main programs \f[B]ctangle\f[R] and \f[B]cweave\f[R] are localized with the \[lq]GNU gettext utilities\[rq]. @@ -101,7 +101,7 @@ There is one other option applicable to \f[B]ctangle\f[R] only: .IP \[bu] 2 \f[B]+k\f[R]: keep separators in numeric literals in the output .IP \[bu] 2 -\f[B]+u\f[R]: transliterate UTF\-8 charcters in C code +\f[B]+u\f[R]: transliterate UTF-8 characters in C code .PP There are seven other options applicable to \f[B]cweave\f[R] only: .IP \[bu] 2 diff --git a/source/texk/web2c/man/twill.man b/source/texk/web2c/man/twill.man index 9983731372..663fd5267a 100644 --- a/source/texk/web2c/man/twill.man +++ b/source/texk/web2c/man/twill.man @@ -16,7 +16,7 @@ .if t .ds WB W\s-2EB\s0 .\"===================================================================== .SH NAME -twill, twill\-refsort \- translate \*(WB to \*(TX with mini\-indexes +twill, twill-refsort \- translate \*(WB to \*(TX with mini-indexes .SH SYNOPSIS .PP \f[B]twill\f[R] [\f[B]\-x\f[R]] @@ -25,7 +25,7 @@ twill, twill\-refsort \- translate \*(WB to \*(TX with mini\-indexes [\f[I]outfile\f[R][\f[B].tex\f[R]]]] .PD 0 .PP -\f[B]twill\-refsort\f[R] < +\f[B]twill-refsort\f[R] < \f[I]reffile\f[B].ref\f[R] > \f[I]sreffile\f[B].sref\f[R] .PD @@ -36,7 +36,7 @@ The program is used to create a \*(TX file for viewing a \*(WB program. It takes appropriate care of typographic details like page layout and the use of indentation, italics, boldface, etc., and it supplies -extensive cross\-index information in the form of 'mini\-indexes' for each +extensive cross-index information in the form of 'mini-indexes' for each spread of pages and a 'master index' at the end that it gathers automatically. .PP The command line arguments are the same as for @@ -48,7 +48,7 @@ says to omit the indexes, module name list, and table of contents pages. .I CONTENTS.tex file will still be written when the \*(TX file is processed, however, unless some macros in -.I twimac\-web.tex +.I twimac-web.tex are redefined.) .PP The output \*(TX file name is formed by adding @@ -71,11 +71,11 @@ Moreover, you must run the output twice through \*(TX. After .B tex foo you will have output that looks like final pages -except that the entries of mini\-indexes won\[cq]t be alphabetized. +except that the entries of mini-indexes won\[cq]t be alphabetized. The first run produces a weird file called .B foo.ref. Say -.B twill\-refsort < foo.ref > foo.sref +.B twill-refsort < foo.ref > foo.sref and then another .B tex foo will produce alphabetized output. @@ -88,7 +88,7 @@ for the details of the searching. .\"===================================================================== .SH FILES .TP \w'@@'u+2n -.I $TEXMFMAIN/tex/plain/cweb/cwebbin/twimac\-web.tex +.I $TEXMFMAIN/tex/plain/cweb/cwebbin/twimac-web.tex \*(TX macros used by .B twill output. diff --git a/source/texk/web2c/mplibdir/ChangeLog b/source/texk/web2c/mplibdir/ChangeLog index e9c1d2c766..1bce2fdae0 100644 --- a/source/texk/web2c/mplibdir/ChangeLog +++ b/source/texk/web2c/mplibdir/ChangeLog @@ -1,65 +1,64 @@ -2024-02-01 Luigi Scarso +2024-02-16 Luigi Scarso + * Updated manual. MetaPost 2.1 - * final integration and commit of mpfi into (u)(p)mpost. - * am/libmplib.am, - * am/mplib.am: link with mpfi. - * mplibdir/mp.w: support mpfi; version 2.10. - * mplibdir/mpmathinterval.w: new file. - * mplibdir/mpost.w: new option --numbersystem=interval. +2024-02-12 Luigi Scarso + * Fixed "warning: strncat specified bound 1 equals source length [-Wstringop-overflow=]" in mpxout.w + +2024-01-28 Luigi Scarso + * Merge branch mpfi. 2024-01-26 Luigi Scarso - * Added source/libs/mpfi/TLpatches and source/libs/mpfi/m4 + * Interval arithmetic: Added source/libs/mpfi/TLpatches and source/libs/mpfi/m4 2024-01-03 Luigi Scarso - * Fixed "++" and "+-+" by replacing a*a with sqr(a). Better error message for square root of negative numbers. + * Interval arithmetic: Fixed "++" and "+-+" by replacing a*a with sqr(a). Better error message for square root of negative numbers. 2024-01-02 Luigi Scarso - * fixed negate for mpfi. + * Interval arithmetic: fixed negate for mpfi. 2023-12-31 Luigi Scarso - * fixed check interval for square root + * Interval arithmetic: fixed check interval for square root 2023-12-30 Luigi Scarso - * Fixed allocation of the buffer for the file extension. - * Fixed position of verbatim_written in mpxout.w - -2023-09-17 TANAKA Takuji + * Interval arithmetic: Fixed allocation of the buffer for the file extension. + * Interval arithmetic: Fixed position of verbatim_written in mpxout.w - * mptraptest.test: - Make easier to test on Windows. +2023-09-17 Luigi Scarso + * Interval arithmetic: mp.w: Fixed a buffer overflow. + * Interval arithmetic: decContext.{c,h}, decNumber.{c,h}, decNumberLocal.h: Convert newline from CRLF to LF (thanks to TANAKA Takuji). -2023-09-16 TANAKA Takuji - - * mp.w: Fixed a buffer overflow. - -2023-09-10 TANAKA Takuji +2023-01-19 Luigi Scarso + * MetaPost: svg->dx, svg->dy are now double (better precision) . - * decContext.{c,h}, decNumber.{c,h}, decNumberLocal.h: - Convert newline from CRLF to LF. +2022-11-06 Luigi Scarso + * Fixed the value of the clip-path attribute for the svg output. -2023-08-20 TANAKA Takuji + +2022-09-20 Luigi Scarso + * Interval arithmetic: code for remainder (work in progress). - * {dvitomp,mptraptest}.test: - Make easier to test on Windows. + +2022-09-13 Luigi Scarso + * Interval arithmetic: new primitives interval_get_left_endpoint, + interval_get_right_endpoint, interval_set. -2023-03-09 Karl Berry - * TL'23 release. +2022-09-01 Luigi Scarso + * Interval arithmetic: mpost compiles without errors. -2023-01-19 Luigi Scarso - * MetaPost: svg->dx, svg->dy are now double (better precision) . +2022-08-25 Luigi Scarso + * Interval arithmetic: support for interval arithmetic. Initial commit 2022-07-31 Luigi Scarso - * MetaPost: Working on the file extension (work in progress). + * MetaPost: Working on the file extension (work in progress). 2022-05-28 Akira Kakuto - * mp.w: Typo. 2022-05-23 Luigi Scarso - * Fixed mp_begin_iteration (H.Hagen) + * Fixed mp_begin_iteration (H.Hagen) 2022-05-15 Luigi Scarso - * Fixed a memory leak in mplib (H.Hagen) + * Fixed a memory leak in mplib (H.Hagen) 2022-03-21 Karl Berry * TL'22 release. @@ -68,7 +67,6 @@ * mp.w: MetaPost 2.02 (twice). 2022-01-10 Karl Berry - * am/libmplib.am, * am/mplib.am: do not silence tangle-sh. diff --git a/source/texk/web2c/mplibdir/NEWS b/source/texk/web2c/mplibdir/NEWS new file mode 100644 index 0000000000..32606d23b0 --- /dev/null +++ b/source/texk/web2c/mplibdir/NEWS @@ -0,0 +1,1630 @@ + +This file is public domain. + +---------------------------------------------------------------------- +What is new in MetaPost version 2.10: +---------------------------------------------------------------------- +* New interval number system based on MPFI. The implementation is somewhat experimental, + given the "unusual" nature of interval arithmetic. + The internal functions are almost verbatim copies of the MPFR-based binary system + (on which MPFI is based). +* Several bugs fixes. + + +---------------------------------------------------------------------- +What is new in MetaPost version 2.01: +---------------------------------------------------------------------- +* It's a version needed to mark the patch mpx_copy_mpto. + + +---------------------------------------------------------------------- +What is new in MetaPost version 2.0rc2: +---------------------------------------------------------------------- + +* Small cleanup of the code +* Bump to version 2.0rc2: the current version is 2.00 +* Added the envelope primitives to mpman + + +---------------------------------------------------------------------- +What is new in MetaPost version 2.0rc1: +---------------------------------------------------------------------- + +* Mainly fixes for wrong path directions, minor issues on tfm and png + backend. The version says "2.000" to keep the version as a valid + number. + + +---------------------------------------------------------------------- +What is new in MetaPost version 1.9991: +---------------------------------------------------------------------- + +* Some issues fixed, but really this is in preparation of metapost 2.0. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.999: +---------------------------------------------------------------------- + +* The numbersystem 'binary' is now operational. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.902: +---------------------------------------------------------------------- + +* Fixed a crash in 'decimal' mode during choose_scale calculations. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.901: +---------------------------------------------------------------------- + +* Fixed a bug in 'decimal' mode that affected (among other things) + the directionpoint and bbox calculations. + +* Fixed a bug in 'decimal' mode calculation of sine / cosine that + affected the precision of the answer in situations where + 'numberprecision' was less than 34. + +* Updated the number parsing in 'decimal' mode to detect 'too precise' + input and optionally generate an error in that case (depends on + 'warningcheck') + +* Fixed a bug in the svg output where it could crash in 'decimal' mode. + +* Fixed a bug in the png output where it could get confused if there + was more than one text label + +* Fixed a bug in the png output for stroked paths + +---------------------------------------------------------------------- +What is new in MetaPost version 1.900: +---------------------------------------------------------------------- + +* Updated the embedded libraries, and a few build system fixes. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.890: +---------------------------------------------------------------------- + +* The numbersystem 'decimal' is now operational. + +* New internal: 'numberprecision', for use with 'the 'decimal' number + system. The (numeric) value expresses the desired calculation precision, + in decimal places. + + system default min max + ============================ + scaled 10 10 10 (assignment effectively ignored) + double 16 16 16 (assignment effectively ignored) + decimal 34 1 1000 + +* Bug fix: in the 'double' numbersystem, + + if X = scantokens decimal X: + + will now always be true, because the 'decimal' operator now has + the same resolution as the scanning routine (which is two decimal + places more than in the previous release). + +* Fixed a bug in the handling of the / operator (wrong precendence). + +* Fixed a bug in arctime (did not handle negative values currectly). + +* Fixed TFM generation issues (various scale-related errors). + +* Fixed application crashes when there was no TEXMF tree to be found + anywhere. + +* It is no longer possible to assign to the 'numbersystem' internal. + +* There is a new definition of 'drawdot' in plain.mp. + +* PNG output did not output anything for draws of a single point. + +* Metapost now prints the full name of any preloaded files. + +* Fixed a bug in the handling of labels with embedded ascii zero(es). + +* Fixed handling of unknown command-line options, the reporting + on used libraries in the --version output, and the banner line. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.803: +---------------------------------------------------------------------- + +* Fixed a bug in the path tension handling that sometimes caused + distorted output. + +* A number of small alterations to the build system making it easier + to integrate metapost with W32TEX. + +* Fix the internal rounding functions in --numbersystem=double so that + they round exactly like in --numbersystem=scaled mode. + +* From Elie Roux: a fix to graph.mp to prevent log-scaled graphs with + large ranges from causing the "Value is too large" error. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.802: +---------------------------------------------------------------------- + +* Fixed a bug causing overly large characters in SVG output mode when + prologues != 3. + +* Removed a crash during free-ing of TFM metric data at the end of the + run. + +* Fixed a problem with colors in SVG output mode. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.801: +---------------------------------------------------------------------- + +* fixed an off-by-one error in the SVG output that prevented the last + font's glyphs from actually being output to the svg file under + prologues:=3; + +* fixed a bug in bbox calculations in that caused the max y to be set + based on the maximum x coordinate internal value instead of the + maximum y coordinate. + +* fixed a bug where metapost incorrectly produced a 'degenerate spec' + error. + +* build fixes for various platforms imported from TeXLive 2013, as + well as the latest kpathsea development etc. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.800: +---------------------------------------------------------------------- + +* A new string valued internal "outputformatoptions" is used by PNG + output mode to control the png file format. In the future, this + internal may also be used for options to the other output formats. + + The syntax for "outputformatoptions" is a space-separated list of + settings. Individual settings are keyword+'='+value. The only + currently allowed ones are: + format=[rgba|rgb|graya|gray] + antialias=[none|fast|good|best] + No spaces are allowed on the left, nor on the right, of the equals + sign inside a setting. + + The assignment that would match the compiled-in default setup is: + outputformatoptions := "format=rgba antialias=fast"; + however, "outputformatoptions" is initially the empty string. + + Some notes on the (new) PNG output formats: + - The 'rgb' and 'gray' subformats have a white background. The + 'rgba' and 'graya' subformats have a transparent background. + - Bitdepth is always 8. + - In all cases, the image is initially created in 8-bit RGB + mode. For 'gray' and 'graya', the RGB colors are reduced just + before the actual PNG file is written, using a standard rule: + g = 0.2126*r + 0.7152*g + 0.0722*b + - CMYK colors are always converted to RGB during generation of + the output image using: + r = 1 - (c+k>1 ? 1 : c+k); + g = 1 - (m+k>1 ? 1 : m+k); + b = 1 - (y+k>1 ? 1 : y+k); + - If you care about color conversions, you should be doing a + "within " loop inside "extra_endfig". The built-in + conversions are more of a fallback. + +* A new string-valued internal "outputfilename", which is set by + "shipout" to the value of the just created file name. Until the + first shipout has occurred, it is the empty string. + + +* Fixed a number of bugs where Metapost loaded the default font map + file multiple times, resulting in lots of "fontmap entry for + `' already exists, duplicates ignored" warnings. + +* The "glyph <> of <>" operation could crash on fonts with empty + subpaths in the charstrings. + +* Fixed a bug in the postscript encoding reader that caused a buffer + overflow (fatal error) for encoding files that do not end with a + newline. + +* Sped up png creation a bit by using smarter libpng options. + +* In the 'double' numbersystem, lots of precision was lost due to a bad + internal conversion of fractions to scaled values. This affected the + "rotated by", "directiontime", "sind" and "cosd" primitives, as well + as internal dependency calculations. + +* In the 'double' numbersystem, an internal rounding error caused + "directiontime" to return bad results for requests near zero. + +* There was a big scaling miscalculation while outputting glyphs in SVG + mode with "prologues:=3". The output labels were so big that they + fell completely outside of the generated image. + +* A problem resulting in 'This can't happen (endinput)' caused by a + missing "end" at the end of the run was fixed. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.790: +---------------------------------------------------------------------- + +* Lots of speedups. + +* Fixed bug in division expressions that started with a literal number. + +* A few problems with bad deallocations were solved. + +* A bug where after saving and redefinition of primitives, they later + were restored to 'undefined' instead of to their primitive meaning. + +* The "double" literal number parser now only accepts scientific + notation if the character following 'E' or 'e' is '+', '-', or + a digit. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.780: +---------------------------------------------------------------------- + +* The turningnumber calculation in 1.770 was bugged. + +* The picture export in 1.770 forgot to add trailing zeroes to the + log and term output channel resulting in rubbish output. + +* The arguments of the PS "dtransform" operator have been fixed + (was wrong since 1.750). + +* The warning limit in numbersystem=double mode is now exactly 2**52. + +* A bunch of obvious memory leaks fixed. Not all yet, but now the + MPlib seems to be usable even with many graphics. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.770: +---------------------------------------------------------------------- + +This is an alpha release for testing & debugging only! + +* The command line switch --numbersystem replaces --math. + +* Two new internals: numbersystem (string, read-only, either "scaled" + or "double" at the moment) and numberprecision (numeric, currently + a no-op). + +* There is a new bitmap backend: + + outputformat:="png"; + + This backend uses cairo and libpng to generate PNG bitmap data. + The created PNG used RGB + Alpha, with anti-aliasing, at 72dpi, + and with a transparent background. + +* Associated with this, there are new internals "hppp" and "vppp", + that are used by the bitmap backend to decide on the scale of + the generated bitmap. Default value for both new internals is + "1.0", i.e. one pixel per Metapost point. + + The internal names come from metafont. + +* There are two new primitives for use with picture item objects: + + prescriptpart + postscriptpart + +* The C API has been extended to allow path control point resolution + without going through the Metapost input language, see + manual/mplibapi.tex for details. + +* The C API has been extended with a "math_mode" switch in the options + structure, and the memory size options as well as "ini_mode" have + been removed (the MPlib instance now always starts up in inimp mode) + +* The code for picture shipout now uses "double" for all floating point + values. This can give small differences in the actual output files in + traditional mode due to the required scaled -> double conversion, but + was necessary to support the new numerical backend code. + +* The Lua API internals have been updated to reflect the C API changes. + +* All known crashes in earlier versions of Metapost have been fixed. + +Known issues: + +* The manual is not up-to-date yet on the metapost input language + changes. + +* There are various memory leaks. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.750: +---------------------------------------------------------------------- + +This is an alpha release for testing & debugging only! + +* mpost now accepts --math=double as an argument. This switches the + internal arithmetic functions from using a scaled 32-bit data type + to 64-bit floating point. + +* With --math=double, the input scanner has been changed to allow + a := 1.0E20 + as valid input format for a numerical value + +---------------------------------------------------------------------- +What is new in MetaPost version 1.504: +---------------------------------------------------------------------- + +* Small build system tweaks from TeXLive 2012. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.503: +---------------------------------------------------------------------- + +* String comparisons have been fixed, these were broken in previous + 1.50x versions. + +* verbatimtex ... etex processing had a horrible bug that is now + fixed. + +* A fix has been applied for a bug that made redeclared variable + subscript tags disappear. + +* The behavior of the %{} escape sequence in 'outputtemplate' + changed (but not that of the single-letter shortcuts). Internal + variables within %{...} are neither rounded nor zero-padded. + +* A very long list of improvements to the manual. + +* MetaPost now adheres to the openin_any / openout_any settings in + texmf.cnf + +* The 'prologues:=3 output' with embedded labels was unreliable, + especially when the resulting eps was included into a TeX document + via dvips. + +* 'newinternal numeric' has been fixed, it generated an error in + metapost 1.211 and earlier 1.50x versions. + +* Label regeneration sometimes failed to run when the file time stamps + were close together. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.502: +---------------------------------------------------------------------- + +* New build system and kpathsea imported from TeX Live. + +* Various bugfixes. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.501: +---------------------------------------------------------------------- + +* The maximum number of variable instances has increased from approx. + 33 million (2^25-1) to 2 billion (2^31-1). + +* New build system and kpathsea imported from TeX Live. + +* Many small bugfixes to 1.500. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.500: +---------------------------------------------------------------------- + +* Actual memory dump files do not exist any more. --mem= and + all other methods of supplying a MEM file are now interpreted + somewhat like this pseudo-metapost-code: + + begingroup; + let dump = end; + input MEM[.mp]; + endgroup; + + this process is supposed to be transparent besides the facto that + there is some extra terminal output and logging. + +* All memory is now allocated and freed dynamically. There are only + two remaining overflow errors(1): + + "expansion depth" : this is a guard against infinite recursion, + the value is 10000. + "sizes per font" : this is maxed out for data-structure reasons, + the value is 32767. + + from texmf.cnf, now only the "error_line", "half_error_line" and + "print_line settings" are used. + + (1) but now you can reach the operating system limits, of course. + +* As this is an alpha release containing lots and lots of new code, + MetaPost starts up with the internal equivalent of 'loggingall;' + in effect. This results in log files that can help in debugging. + +* Expect bugs and (minor) memory leaks. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.212: +---------------------------------------------------------------------- + +* Small build system tweaks from TeXLive 2011. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.211: +---------------------------------------------------------------------- + +* In previous 1.20X versions, the 'glyph infont' operator did not handle + fonts with seac (old-style composite characters) properly. + +* Incorporated the latest versions of kpathsea and the build system + from TeXLive. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.210: +---------------------------------------------------------------------- + +* In previous 1.20X versions, btex ... etex handling forgot to take + the passed directory location of input-ed files into account. + +* verbatimtex ... etex is now copied as is. Whitespace stripping + and appending of % no longer happen. + +* The mpost executable now always strips exactly one extension from + the jobname (unless explicit --jobname was given) + +---------------------------------------------------------------------- +What is new in MetaPost version 1.209: +---------------------------------------------------------------------- + +* Previous 1.20X mem files were architecture-dependent. + +* Metapost now uses getopt once again, which makes the commandline + handling compatible with pre-1.20X versions. However, the syntax + -sprologues=1 is now no longer supported (the space between -s + prologues is now mandatory). + +* On some systems, metapost would crash inside the function that prints + the 'fatal error' message. + +* The 'glyph infont' operator would sometimes cause crashes, and in + other cases it generated bad output. + +* There was a space missing in the generated output when mpprocset + was set. This was still legal PostScript, but it confused mptopdf. + +* In previous 1.20X versions, the font map file was read for each + figure that contained a label, resulting in lots of harmless + but scary warnings being reported. + +* The --debug switch is now documented in the command-line help. + +* The help text now mentions the metapost version. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.208: +---------------------------------------------------------------------- + +* Previous versions of MetaPost 1.20x were overeager to remove file + extensions from the end of the jobname. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.207: +---------------------------------------------------------------------- + +* With the -file-line-error commandline option, MetaPost 1.20x always + reported the name of the most recently 'input' file instead of the + name of the actual current file. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.206: +---------------------------------------------------------------------- + +Bug fixes: + +* Many of the commands in the MP language cause strings in the string + pool to be printed to new strings that are also built up in the + string pool. This could cause crashes when the new string wouldn't + fit in the memory allocated. + +* Failure to initialize the jobname in the MP_options struct could + cause crashes in library mode. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.205: +---------------------------------------------------------------------- + +Bug fixes: + +* Metapost did not handle well files with extensions other than .mp. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.204: +---------------------------------------------------------------------- + +Bug fixes: + +* Metapost could go into an endless output loop when characters in + bitmap fonts where used, because it tried to limit the %*Font output + line to a specific number of bytes. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.203: +---------------------------------------------------------------------- + +Bug fixes: + +* Building version 1.202 for source required X11 headers to be installed. + +* Another infinite recursion trap added, now for erroneous vardefs + with suffixes (reported by Nicola Vitacolonna). + +* Fix infinite loop recursion on integer overflow (reported by Nicola + Vitacolonna, fix based on a hint from Dan Luecking). + +* In version 1.202, setting "job_name" from lua code caused a crash. + +* The "filename" field on the lua figure object in 1.202 was just the + extension, instead of the whole file name. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.202: +---------------------------------------------------------------------- + +Bug fixes: + +* Fix greypart (always returned 0). + +* Make 'withcolor true' explicitly reset the color model to uninitialized. + +* Report which mem file can't be found, and use 'plain' instead of PLAIN + in the mem search warning messages. + +* Fix a crash on subsetting of some Type1 fonts because of a temporary + buffer overrun. + +* Correct a crash on SVG text output when the 8th bit is set. + +* Fix the use (reference) of 8-bit glyphs in SVG mode when prologues:=3. + +* Fix the output of text strings that reference the character at index 0. + +* Use ".ps" as file extension for negative charcodes (backward compatility). + +* Metapost sometimes printed "mp_vacuous" instead of "vacuous". + +* Fix rounding of negative scaled and fraction values. + +* Restore the error for 'arctime' out-of-bounds. + +* Moved the "turningnumber algorithms do not agree" message out of reach + (now only printed if tracingchoices>2 ) + +* Fix a problem with dash scaling during picture copying. + +* TFM header bytes were written out with an offset of one. + +* Updated the mptrap files. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.201: +---------------------------------------------------------------------- + +Bug fixes: + +* There was a bug where sometimes the outer contour of a glyph that was + asked for via 'glyph X of' was missing from te output, depending on + the path drawing order inside the Type1 font. + +* Handling of MPTEXPRE label prefix files was broken. + +* Font subsetting for 8-bit characters in Type1 fonts was broken. + +* The use of "%{outputtemplate}" inside "outputtemplate" now generates + an error. + +* The first letter of the input file name was swallowed in the log file. + +* There is some rudimentary support for infinite recursion trapping now, + to help prevent segfaults&crashes due to C call stack exhaustion. + +* An unlucky change in glibc made compilation fail on new GNU/Linux + systems due to multiple incompatible definitions of 'getline()'. + +* There was a bug in the handling of quoted external commands for + MPXCOMMAND | MPXMAINCMD | TEX. + +* The main input file's opening brace and filename were not shown in + the log file output. + +* Non-colored picture objects (clipping and setbounds paths) are now + ignored when the color part is asked from within "within", for + backward compatibility reasons. + +* The trip and trap files are now part of the distribution and the + mptrap files have been updated. + +* The standard web2c argv[0] mem file mimicri was broken: 1.200 was + always looking for "mpost.mem" even when called under another name. + +* The manual pages for "mpost" and "dvitomp" have been updated, and the + old "mp" manual page has been removed. + +* The first letter of any missing input file name was not shown in the + terminal error message. + +* Output files are now once again written in the current directory even + if an explicit source directory is given. This includes the creation + of mpx files, but some trickery is used so that up-to-date existing + mpx files from the source directory take precedence. + + +---------------------------------------------------------------------- +What is new in MetaPost version 1.200: +---------------------------------------------------------------------- + +New features: + +* It is now possible to get the actual path drawing routines from a + font glyph. The syntax is : + + q := glyph 113 of "cmr10"; + q := glyph "one.oldstyle" of "lmr10"; + + "glyph" is a primary binary operator (like "subpath") that accepts + a string or number and a string, and the result is a picture. + + The second argument is a tfm name. This will be combined with + a fontmap entry to find the font's PostScript source file. + + If the first argument is a string, then it should be a Charstring + name in the postscript font source. If the first argument is + an integer, it is an index into the encoding of the font, and + the Charstring that is mapped to that index is taken (it follows + that numeric values have to be integers between 0 and 255). + + The returned picture can be empty (if the tfm or the pfb or the + encoding or the Charstring was not found), otherwise it consists + of a list of 'fill' objects that use the the 'grey' color model. + Counterclockwise paths receive the grey value matching 'white', + clockwise paths 'black'. + +* MetaPost now supports string valued internal variables. Three of + these are predefined ("jobname", "outputformat", "outputtemplate"), + you can add more of them via "newinternal". + + newinternal string s; + s := "hello"; + + The type of a new internal is either 'string' or 'numeric', + and defaults to numeric (this is for backward compatibility with + older versions of MetaPost). String internals are initialized to + the empty string, numeric internals are initialized to zero. + +* MetaPost now has a second backend that generates Scalable Vector + Graphics output. This new backend was requested by Dave Crossland, who + also provided the funding to make it possible. Dave, thank you again! + + The default value of "outputformat" is "eps"; when you assign "svg" + you will get SVG output. + + If you use text labels with SVG, you will probably also want to set + + prologues:=3; + + With this setting, MetaPost will convert the font into curves + (of course you also need a correct font map line, just as for + PostScript output). + + With any other value of "prologues" you will simply get the SVG + default text font in a system-dependant encoding. This is unlikely + to be what you want! + + A simple example: + + outputformat := "svg"; + outputtemplate := "%j-%c.svg"; + beginfig(1); + fill fullcircle scaled 100 withcolor .4red; + endfig; + end. + + In the lua bindings, there is the new figure method "svg()", that + gives back the SVG output string. This is subtly different from the + direct file output: the lua method does not prepend an XML declaration + (this makes embedded use of the generated XML easier). + +* The new internal string variable "outputtemplate" replaces + "filenametemplate". The big difference is that "outputtemplate" + is a true 'internal', so that you need a proper assignment. + On the positive side, this means that you can use its current + value with e.g. show and message. + +* "outputtemplate" has a new type of replacement: internal variable + names. Instead of the short "%j.%c", you could write: + + outputtemplate := "%{jobname}.%{charcode}" ; + + this type of replacement works for all internal variables, + including those defined via "newinternal". + +* There are two new numeric internals: "hour" and "minute". + (these are a consequence of the outputtemplate change) + +* The primitive "jobname" is now a string internal instead of a + special case. This implies you can assign to "jobname", but + such an assignment will only affect the picture output. The + job name for the purposes of log and mem file names is fixed + permanently at startup time and cannot be altered. + +* "mpost" can now pretend to be dvitomp. Either copy the executable + to the name "dvitomp", or pass the switch --dvitomp on the command + line. + +* The command line option --halt-on-error has been reinstated. + +* There is a new -s= command line switch that can + be used to setup run time values. Such assignment will be executed + after initialization is complete (i.e. after mem file loading) but + before any other code is executed. + + This works for all internal variables, including one defined + that may have been defined in the mem file via "newinternal". + +* "tracingstats:=1;" now prints the highest and total input levels. + +Bug fixes: + +* The turningnumber calculation had a rounding error in the internal + arithmetic that could cause incorrect numbers to be calculated + (typically resulting in a 'turning numbers do not match' error). + +* The parsing of command line arguments with options was broken. + +* Reading of files with 8-bit names has been fixed. + +* A patch by Melissa O'Neill fixes inclusion of some special Type1 + formats. + +* There was a bug where, when "prologues:=3;", the lists of the + DocumentResources/DocumentSuppliedResources could appear in the eps + output partially uncommented. + +* Troff labels were completely broken in all MPlib-based versions. + +Other changes: + +* Many, many improvements to the manual and the tutorial. Sorry + Stephan, I don't know enough to list them all! + +* The old executable build system has been replaced by the new build + system from the TeXLive 2009 repository. + +* The MetaPost (and mplib) source code is now released under LGPL + instead of GPL, and uses a derivative of PyAvl instead of GNU libavl. + +* The web2c 'mktexfmt' feature is enabled for the program "mpost" once + again. + + +---------------------------------------------------------------------- +What is new in MetaPost version 1.102: +---------------------------------------------------------------------- + +* Printing of 8-bit string characters has been fixed. + +* In previous versions, TFM files and PFB fonts would not be read + properly on big-endian machines (e.g. powerpc) + +* The MetaPost distribution now contains "A Beginner's Guide to + MetaPost for Creating High-Quality Graphics" by Troy Henderson + and Stephan Hennig. This tutorial replaces Hobby's mpintro.tex. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.101: +---------------------------------------------------------------------- + +This is just a bugfix release. The following bugs / problem areas in +MetaPost 1.100 have been fixed / improved: + +* TFM file generation was completely broken. + +* The job name discovery on the commandline has been improved. + +* Under some (rare) conditions MetaPost forgot to create a log file. + +* Labels containing char0 were exported to PostScript incorrectly. + +* On Windows, the DVI file that is the result from the internal call + to TeX for btex .. etex lables was not deleted automatically. + +---------------------------------------------------------------------- +What is new in MetaPost version 1.100: +---------------------------------------------------------------------- + +CHANGES compared to the previous release, 1.005: + +* This version is based on MPlib, the C conversion of MetaPost. + + The one user-visible change is that the btex ... etex + label conversion is now handled internally instead of via + the external "mpware" programs. These programs are therefore + no longer distributed. + +* There is a new manual, mplibapi.pdf, that describes the internal + interface to MPlib. + +* The file 'mpintro' is no longer distributed because it is + obsolete (it has been that way for some time). + +* The distribution now includes Dan Luecking's mpsproof.tex. + + +CHANGES compared to the previous beta, 1.091: + +* The DVI -> mpx converter was bugged when virtual fonts were used. + +* MP could crash when a string was added to the string pool that + was too large to fit. + +* The string pool compaction routine was called much too often, thus + preventing unnecessary slowdowns. + +* Various problems with uninitialized option settings and missing mem + files or pfb files have been fixed. + +* There was a line buffer overrun possible in the file reader. + +* mpost now honours --recorder and --file-line-error. + +* MP now accepts file names with paths (separator is /) and with + embedded spaces (using " for quoting) + +* There could be empty lines in the PS output. + +* Full 8-bit fonts (i.e. font using character slot 255) could create + an eternal loop. + +* The handling of equations with addition or substractions between two + unknowns in the right hand side was wrong. + +* The first line of the PS font encoding output could be broken + inbetween a glyph name and its preceding slash. + +* Font inclusion in the PS backend would fail for all fonts that had + glyph ids using the 8th bit. + + +---------------------------------------------------------------------- +What is new in MetaPost beta version 1.091: +---------------------------------------------------------------------- + +* Dash lists were interfaced incorrectly by the lua bindings. + +* The Type 1 Font inclusion in the previous version produced invalid + subsets. + +* The configure script now also checks for sys/time.h + +* The error message you get for invalid mem files now mentions the + name of the file as well as the nature of the problem. + +---------------------------------------------------------------------- +What is new in MetaPost beta version 1.090: +---------------------------------------------------------------------- + +This MetaPost release is based on MPlib. For those of you who are not +aware of the MPlib project yet: + +MPlib is the name of the new, revamped version of the MetaPost +interpreter. It is implemented in Cweb, and internally consists +of a core library, an mpx generation library, and a frontend +driver program (mpost). + +There are no changes to the MetaPost language, but nevertheless there +are some minor differences with the last pascal-web based version of +MetaPost (1.005): + +* The MPlib distribution is released under the GPL version 2 or, + at your option, any later version. + +* The commandline is slightly different, run mpost --help for details. + +* The mem file format is changed, you have to regenerate any + existing ones. + +* The new mpx generation library includes the label generation + functionality that was previously provided by 'makempx', and + this internal code will be used instead of an external program. + That is, unless the MPXCOMMAND variable is set in the environment + or texmf.cnf. The 'mpware' programs became obsolete and are no + longer included in the distribution. + +* Most of the memory configuration variables from texmf.cnf + have become obsolete due to dynamic reallocation. The four remaining + ones are 'main_memory', 'hash_size', 'max_in_open', 'param_size'. + These are only taken into account at mem generation time, the + values are stored in and reloaded from the mem file. + +* The core MPlib library does not interpret an initial '&' as anything + special and it does not support re-initialization using a different + mem file either. The command line program mpost _does_ interpret '&' + as an alias for the -mem switch to preserve (some) compatility. + +* The MPlib distribution includes lua script language bindings. + +Following are the NEWS items for the previous beta releases of MPlib. + +---------------------------------------------------------------------- +What is new in the beta release of MPlib 1.090: +---------------------------------------------------------------------- + +* The lua bindings to MPlib are added to the distribution, and + build.sh can now build an mplib.so loadable module for lua + (this needs an installed lua 5.1 distribution) + +* Some internal macros are renamed so that the exported C structure + fields could have better names, and a new document (mplibapi.tex) + provides the documentation of the C api and Lua bindings. + +* The texmf and manual trees are now included again. + +* (un)dumping mem files is delegated to a separate cweb source file. + +* All gcc-isms in the build and configure scripts have been removed. + +* The kpathsea library is updated. + +---------------------------------------------------------------------- +What is new in the beta release of MPlib 1.085: +---------------------------------------------------------------------- + +* Determination of the mem name to use in non-ini mode is now much + closer to the web2c approach. + +* There is now a magic word in the beginning of the mem file to make + sure it is written by the correct version of MPlib. + +* Fixed the disappearing comment sign in the to-be-typeset document + created by the mpx generation subsystem. + +* Various identifiers have been renamed to avoid clashes (that prevented + the source from building correctly on many platforms) + +* A great many small changes and fixes have been added after running + splint on the generated C source. + + +---------------------------------------------------------------------- +What is new in the beta release of MPlib 1.080: +---------------------------------------------------------------------- + +* The MPlib distribution is released under the GPL version 2 or, at + your option, any later version. The copyright statements in the source + files have been updated to reflect this. + +* The mpost program banner now contains the kpathsea version, and no + longer mentions the fact that the source is now cweb at all. + +* The mpost program once again supports 'E' error responses. + +* There are some minor internal API changes, but there is still no + documentation for the API, so that is not very interesting yet. + + +---------------------------------------------------------------------- +What is new in the beta release of MPlib 1.060: +---------------------------------------------------------------------- + +* The MPlib distribution is released under the GPL version 2. + +* This release is the first that replaces the old metapost distribution + completely. The executable is now named 'mpost' with engine name + 'metapost'. + +* The release now includes a cweb implementation of the makempx + functionality that is linked into the mpost executable. + This internal code will be used unless the MPXCOMMAND variable is set. + Because of this functionality, the mpware directory is no longer + included and the standalone programs 'makempx', 'newer', 'mpto', + 'dvitomp' and 'dmp'. are no longer maintained. + +* This is the first development release of the new cycle, and contains + all of the functionality of Metapost 1.005. The mpost version is now + 1.060, and the special version number for the cweb version has been + removed from the banner. + +---------------------------------------------------------------------- +What is new in the alpha release of MPlib (0.20.0): +---------------------------------------------------------------------- + +* Two bugs in MP 1.002 were fixed by Giuseppe Bilotta, both fixes + are about polygonals pens and will be included in the upcoming + MP 1.003 release also. + +* It is now possible to ask for the envelope of a path drawn as + traced by a (non-elliptical) pen: + + path p,q; + p = fullcircle scaled 30; + q = envelope pensquare of p; + +* There is a lua interface now, and it is already used by luatex. + + To play with this, currently the best solution is to fetch the + 0.25.0 beta of luatex: http://foundry.supelec.fr/projects/luatex + This embeds MPlib 0.25.0 as well as its documentation. + +* Many bugs were fixed. + +---------------------------------------------------------------------- +What is new in the alpha release of MPlib (0.10.0): +---------------------------------------------------------------------- + +* The source is converted to cweb, and split into a library part + (mpdir/lib/*.w) and a frontend executable (mpdir/mpost.w). + +* The front end executable is named "newmpost", this takes + care of configuring the MPlib library via C code, and uses + kpathsea for file searching. There is no change file involved, + and the web2c runtime library is not used. + +* Some of the internal arrays now grow dynamically when needed: + + * the input buffer + * the string pool and number of strings + * the font memory and number of fonts + * the number of "readfrom" and "write" files + * the path segment size + * the input nesting stack + * the number of new internals + * the TFM writing arrays (but these are limited by TFM format) + + Still not doing that (so these can only be changed in --ini mode): + + * the main memory + * the hash size + * the number of simultaneous macro parameters + * the level of "input" file nesting + +* The following command-line options are ignored by the front-end + command (for now): + + -[no-]file-line-error + -halt-on-error + -output-directory= + -[no-]parse-first-line + -recorder + -translate-file= + -8bit + -T + + The other web2c command-line options should work as normal. + +* the mpware tools are not in this distribution, their functionality + will eventually be assimilated into the frontend application. + +* the build process depends on a local "ctangle" command being in the + path, for now. The confiration and building system is not yet complete. + +* API documentation is still missing, but the MetaPost input language + has not changed. + + +---------------------------------------------------------------------- +What is new in version 1.005: +---------------------------------------------------------------------- + +* In MetaPost 1.004, mpost --version still incorrectly reported 1.003 + +* C Compilation of MetaPost 1.004 was broken on MacOS X 10.5 + +* The sources package did not contain mpboxes.pdf + +* Some last-minute fixes to the manual + + +---------------------------------------------------------------------- +What is new in version 1.004: +---------------------------------------------------------------------- + +* The picture color component commands misbehaved in 1.003: + the current (default) colormodel was not taken into consideration, + so all colors had to be explicit for "redpart" etc. to work. + (this bug is the one broke the graph.mp package) + + In 1.004 for "defaulted" colors, the suitable value in the current + (default) colormodel is returned without any errors. This change + also reverts to silently defaulting a 'black' color when asking + for the redpart etc. of an object that cannot be colored at all. + +* The picture color component commands misbehaved in 1.003 in + a different manner also: the defaults for uninitialized CMYK + color picture parts were still assuming 'black' was defined as + (1,1,1,1) instead of as (0,0,0,1). + +* The macro Gwithpc_ in the graph.mp package did not work properly + with non-rgb colormodel objects. + +* plain.mp has a new macro, 'colorpart', that returns the color + parts of a graphical object within a picture in a form suitable + for feeding it back to 'withcolor'. + +* The latest kpathsea library from TeXLive is included. + +* There is now a separate manual for the boxes package (mpboxes.pdf). + + +---------------------------------------------------------------------- +What is new in version 1.003: +---------------------------------------------------------------------- + +* Polygonal pens now work better (bug #3 and #7 at supelec.fr). + +* When asking for a color part in a picture object, the color models + now have to match each other, otherwise an error will be reported + and the return value will be set to a 'black' part. + +* The Makefile fragment (metapost.mk) now defines a separate mpost + target for better integration in TeXLive. + +* There was a bug in the internal handling of withprescript and + withpostscript, resulting in incorrect output when paths using + such scripts were stored in picture variables. + +* A newline was missing from the PostScript output when the + procset internal variable was set, so the first line of that + accidentally became a PostScript comment. + +* Applicable changes from Knuth's updates for MetaFont 2.718281 + are incorporated. + +* Mpto did not play nice with %& verbatimtex lines, it now + automatically tries to detect comment-lines. + +* Dvitomp 1.003 has higher limits for some internal constants like + the number of allowed fonts in DVI files. + +* The manual is improved. + + + +---------------------------------------------------------------------- +What is new in version 1.002: +---------------------------------------------------------------------- + +* Version 1.001 introduced a memory allocation error in mpto that could + result in the program looping endlessly + +---------------------------------------------------------------------- +What is new in version 1.001: +---------------------------------------------------------------------- + +* The default cmyk 'black' color now uses only black, not all four + ink colors (after a discussion on the mailing list). + +* Some issues were reported with the new turningnumber algorithm, + all known problems are now fixed. + +* Gábor Braun discovered that mpost did not always download the font + encodings into all the created output files. + +* Akira Kakuto and Hartmut Henkel found some small issues in mpto + regarding trailing and leading whitespace. + +* A fix for the 'Helvetica' entries in trfonts.map was provided by + Werner Lemberg, and Michail Vidiassov supplied two extra font + entries for troff.map (Symbol and ZapfDingbats). Karl Berry + provided the new file troff-updmap.map, to be used by the updmap + tool in texlive. + +* Mpost now supports web2c's --output-directory option. + +* Any warnings about missing fonts and characters are now always + written to the terminal as well as to the log. + +* Now that makempx is a C program, it needed a different install line + in build.sh. Also, Olaf Mersmann contributed a patch to recognize + 'gmake' in build.sh + +* Luigi Scarso found some typing errors in the web source that prevented + clean weaving of the source. + +* Stephan Hennig fixed a number of problems in the manual (mpman.tex) + and the introduction paper (mpintro.tex). He also wrote new sections on + how to preview metapost graphics and on how to use metapost graphics + inside other documents. On top of that, the manual is now hypertext-aware, + and fixes for a whole series of small problems have been applied. + +---------------------------------------------------------------------- +What is new in version 1.000: +---------------------------------------------------------------------- + +* The use of DSC (document structuring) comments has been + been cleaned up, thanks to comments by Michail Vidiassov. + +* By setting prologues to 2 or 3, you can ask MetaPost to + reencode and include the used labels fonts in the output, + thus creating proper Encapsulated PostScript files even + if labels are present. + +* Support for greyscale and cmykcolor models is added. + +* The new drawing options "withprescript" and withpostscript" + allow the user to attach PostSCript special text to a specific + drawing object. + +* Setting the new internal "mpprocset" to 1 will make MetaPost + create a somewhat extended preamble that defines shortcuts + for the postscript commands (e..g "l" instead of "lineto"). + For big images, this can help shrink the output a bit. + +* The pool file is now integrated in the executable, so there + is not separate 'mp.pool' anymore, except at build time. + +* Groff support is redone, and dmp now uses kpathsea searching. + Groff related changes are thanks to the efforts of Werner + Lemberg and Michail Vidiassov + +* makempx is now a compiled executable on all systems, + thank you Akira Kakuto + +* The error for 'special's longer then 255 characters + is removed, so specials can now be of any length. + +* There is new turningnumber implementation that attempts + to find the mathematically correct "turningnumber" of a + path. The formulae are derived from a mailinglist discussion + between (especially) Dan Luecking and Giuseppe Bilotta. + +* The manual is updated and modernized. It is currently + maintained by Stephan Hennig and Troy Henderson. + +------------------------------------------------------------------ +Changes in version 0.920: +---------------------------------------------------------------------- + +* Fixed a long-standing bug in web2c where changing values of the + memory_size setting in web2c could cause crashes and other random + problems. The memory array size is now written to the dump file + and loading is aborted if the values do not match. +* Implement configurable figure output filename templates. +* Implement cmyk, greyscale, and marking only color models. +* The mpost executable is now version 0.920 +* mpost no longer autoconverts r==g==b colors to grayscale in the + postscript output. + +---------------------------------------------------------------------- +Changes in version 0.902: +---------------------------------------------------------------------- +* Fix a bug in mpto resulting in correctly placed labels (with + thanks to Dan Luecking) +* Fix a bug blocking compilation of dmp on MacOSX +* The mpost,dmp,mpto executables are now version 0.902 + + +---------------------------------------------------------------------- +Changes in version 0.901: +---------------------------------------------------------------------- +* A corrected bugfix for bug item 3 from version 0.9 (the old fix + made metapost fail the trap test) +* Included mpost.mp for mem generation +* Updated the trap test output. +* The mpost executable is now version 0.901 + +---------------------------------------------------------------------- +What is new in version 0.9: +---------------------------------------------------------------------- +1. There is a new internal quantity called mpversion that reports the + current metapost version, and the version information is also written + to the PostScript file. +2. The LaTeX sources of the mpman, mpintro, and mpgraph manuals have + become part of the distribution package. +3. TEX.mp now has TeX format support through a pair of macros called + TEXPRE() and TEXPOST(). This llows you to process the contents of + the TEX() macro with, for example, LaTeX (instead of plain TeX). + An example is given in the manual. +4. metapost now writes a %%HiReSBoundingBox comment +5. The EPS output no longer contains actual spaces within PostScript + strings as for example output by label("a space"), but their + octal escape (\040) instead. +6. The EPS output now also has a %%BeginProlog DSC comment + as well as %%EndProlog +7. The comments in the Web source have been changed to point out + that on modern machines, acquiring the random seed has actually + become a system-dependant operation (a granularity of whole seconds + is not small enough on new machines). +8. The 'newer' command now accepts more than 2 arguments, testing + each of the files in turn. + +---------------------------------------------------------------------- +Bugfixes in version 0.9: +---------------------------------------------------------------------- +1. Documentation improvements: all known errata and typos have been + removed, better explanations of e.g. dash patterns and dotlabel have + been provided, and a number of omissions has been rectified. +2. The BoundingBox was not computed correctly when a filldraw command + with a noticeable pen size was used at the edge of the picture. +3. Paths starting with degenerate constructions like (0,0)--(0,0)--(0,0) + could overflow memory. +4. The PostScript output could accidentally contain 8-bit characters + within PostScript strings in previous versions because a test was + shared between terminal printing and PostScript printing. +5. A bug has been found in the assignment of serial numbers to independant + variables in metafont 2.71828. This bug affected MP as well, and the + same patch has been applied. +6. The turningnumber was sometimes wrong in unexpected ways. The new + implementation is still sometimes wrong (when there are strange path + segments involved), but in a much more predictable way: the new code + always draws straight lines between the actual points, and calculates + the turningnumber based on that path instead of the actual path. The + effect is that cusps and loops within segments are now completely + ignored. A more thorough fix of turningnumber is planned for the + next release. +7. There was an 'off by one' error in dvitomp wrt. the interpretation + of virtual fonts. +8. mpto uses a new TeX macro for the generation of labels, making it + more robust wrt. strange user code within the actual label text. +9. A missing colon in boxes.mp has been added +10. A missing save in mfplain.mp has been added +11. The generisize in boxes.mp has been fixed so that it now accepts [[ as + a valid variable name + +---------------------------------------------------------------------- +Version 0.641: +---------------------------------------------------------------------- +The only change was to fix the code for transforming a picture that +contains a filldraw. Version 0.64 introduced a bug that caused an +inappropriate memory reference in that case. + +---------------------------------------------------------------------- +What is new in Version 0.64: +---------------------------------------------------------------------- +1. A new primitive command closefrom filename closes a readfrom file + so that subsequent calls to readfrom with that file name will go back + to the beginning of the file. +2. The ^^ notation for unprintable characters is now used only when printing + on the terminal or the log file. Internal computations and the write + command are all 8-bit clean. (This is partly due to material in mp.ch + that changes the initialization of the xchr array. Without these + system-dependent changes, the write command would map all non-ascii + characters to spaces.) +3. Arithmetic overflow during a comparison such as 20000>-20000 is now + ignored. This avoids extraneous error message when using the graph.mp + macro package. +4. Transformations with negative determinants now work properly on pictures + drawn with polygonal pens. +5. When the readfrom operator is applied to a file that does not exist, + an attempt to close a non-open file could cause problems in some + implementations. This has now been fixed. +6. Using draw picture_expression withpen where the picture_expression + was a scaled picture containing dashed lines, the dash lengths would + change. This bug has been fixed. +7. The dashpart operator could return an invalid picture or a picture that + is not properly scaled. This has also been fixed. +8. The |char_base| variable could become negative when using fonts that + do not start at character 0. There was also bad Pascal code in function + b_open_in. This has all been fixed. +9. Dvitomp has been fixed to avoid a font data structure problem that + could cause some characters to come out in the wrong font when you + mix virtual and non-virtual fonts. +10. Dvitomp now correctly prints font names when there is a checksum + mismatch, and it aborts instead of just printing an error if a tfm + or vf file is bad. +11. In plain.mp, the drawdblarrow macro now uses filldraw so that it works + better with large pen sizes. + +---------------------------------------------------------------------- +Version 0.632: +---------------------------------------------------------------------- +When prologues is negative, the output files use full precision for +coordinates in "%%BoundingBox" comments. In btex..etex blocks, +"number too large" and "invalid character" errors are suppressed. +The result of btex..etex is now guaranteed to be in a setbounds path +so that a for...within iteration will always treat it as a unit. + +There are also some obscure bug fixes involving string compaction when +scanning a file name or when mp is compiled in debug mode. Some possible +identifier name conflicts and range check errors have also been fixed. + + +---------------------------------------------------------------------- +Version 0.631: +---------------------------------------------------------------------- +This version fixes an obscure bug that could cause certain perfectly valid +strings to be printed as "???" or " NONEXISTENT". It also includes a minor +fix to the PATHEXPAND code that prevents running out of file descriptors. + + +---------------------------------------------------------------------- +What is new in Version 0.63: +---------------------------------------------------------------------- +1. Backslashes in the PostScript output are rendered correctly. They used + to come out as (\) instead of (\\). +2. Recycling an independent variable should no longer cause spurious overflows. + (This bug was recently found in mf.web.) +3. Pythagorean addition should now be faster in certain trivial cases. +4. Rotating text by arbitrary angles should no longer cause bad PostScript + output. The problem was that arguments to "fshow" could be inaccurate. +5. Obscure bugs inherited from mf.web are now fixed. These involve + balancing parentheses showing on the terminal, reporting the correct + line number in case of buffer overflow, and removing spurious reference + counts that could effect end-of-job statistics. +6. Fonts with ec=255 should no longer cause mp's PostScript output routines + to go into a loop. +7. When mp's string mechanism was heavily used, file names could occaisonally + be printed on the terminal and log file as "(?)". This has been fixed. +8. Setting PATHEXPAND in site.h causes mp, dvitomp and dmp to understand "//" + in path variables as "search multiple levels of subdirectories". This is + for compatibility with recent versions of the Web2c TeX distribution. +9. A typo in mpware/makempx and mpware/troffmpx has been fixed. Previous + versions of these scripts would not run on some systems. +10. Data files *.d have been added to the doc directory. These are used by + doc/mpgraph.mp which generates figures for "Drawing Graphs with MetaPost". +11. Typos in mpintro.tex and mp.web's TeX material have been fixed. +12. Files examples.mp, mpintro.tex and mpintro.bib have moved from mplib to + the doc directory. +13. The author's email address now appears in the README file. + + +---------------------------------------------------------------------- +Macros added to the mplib directory between Versions 0.50 and 0.62: +---------------------------------------------------------------------- +rboxes.mp is a slightly more general version of boxes.mp +TEX.mp provides a way of running tex dynamically instead of as a pre-processor +graph.mp, format.mp, and sarith.mp are documented in doc/mpgraph.ps +(This is the same as ftp://netlib.att.com/netlib/att/cs/cstr/164.ps.Z) +marith.mp, string.mp, texnum.mp, and troffnum.mp are low-level packages +used by graph.mp, format.mp, and sarith.mp. + + +---------------------------------------------------------------------- +Other minor bug fixes subsequent to Version 0.60 +---------------------------------------------------------------------- +1. plain.mp has been fixed so that the x**y works properly when x<0 and y is + a negative integer. +2. Programs mptotex.c and mptotr.c which extract btex..etex material have been + fixed so they work properly with input files that do not end with a newline + character. +3. Program dmp.c which handles troff output from btex..etex blocks has been + modified to avoid outputting any non-ASCII characters that the C function + isprint() accepts. +4. Program dmp.c no longer gets troff graphics specials confused with text. + This seldom matters because btex..etex blocks are unlikely to contain + troff graphics. +5. Pictures containing clipped subpictures could come out with some colors + in the subpicture wrong. +6. Colors in PostSript output were not being restricted to the standard 0..1 + range. +7. Transforming a path or a pen should no longer generate extraneous overflow + errors in certain unusual situations. +8. Drawing with a degenerate 2-vertex polygonal pen such as penrazor should + no longer cause an infinite loop in certain unusual situations. +9. There were some bugs in the mfplain macros. (These macros are designed + to similate plain METAFONT.) The drawing and filling macros now apply + currenttransform to the path but not the pen rather than vice versa. + The predefined modes now set o_correction to 1.0. +10. For security reasons, mp can no longer read or write files whose names + begin with '.' + + +---------------------------------------------------------------------- +Changes to the MetaPost language between Version 0.50 and Version 0.60 +---------------------------------------------------------------------- +1. New operator `readfrom ' and new command + `write to ' do file I/O. Plain defines + a special string EOF that readfrom returns to indicate end-of-file + and write..to understands as well. +2. New iteration type `for p within : endfor' + iterates through the interior components of the picture. An `interior + component' is a single pen stroke, filled outline, or piece of typeset + text. A part of the picture enclosed in a clipping or setbounds path + also counts as an interior component. If the whole picture is enclosed + in such a path, the for..within iteration looks inside. Note that a + picture generated by btex..etex is enclosed in a setbounds path. +3. The length operator now applies to pictures. It returns the number of + interior components. +4. New boolean operators stroked, filled, textual, clipped, bounded test + the first component of a picture. A picture enclosed in a clipping or + setbounds path counts as a single component. +5. Part extraction operators now work for pictures. Standard operators + redpart, greenpart, bluepart apply to the color of the first component + and xpart, ypart, xxpart, xypart, yxpart, yypart extract parts of the + tranformation that has been applied to a text component. If `textual p' + is false, the transform components are all zero; if `clipped p' or + `bounded p' is true, the color parts are all zero. Additional operators + fontpart, textpart, pathpart, penpart, dashpart extract other information + from the first component of a picture. They all return null values when + the first component has the wrong type: fontpart and textpart return + null strings; pathpart returns the path (0,0); penpart returns nullpen; + and dashpart returns nullpicture. +6. The construction `dashed nullpicture' is now a no-op. It used to be + an error. +7. The clip and setbounds statements used to ignore operations on empty + pictures. Now they do not. +8. Structuring comments in the PostScript output are now based on EPSF-3.0 + as described in the 2nd Edition of the PostScript Reference Manual. + When prologues is 0, some structuring comments are included but the + output is not flagged a `conforming document'. Previous versions of + MetaPost behaved similarly but used slightly different structuring + comments. +9. When warningcheck is 0, numeric tokens and results from the hex and + oct operators can be as large as 32767.99998. The old limit of about + 4096 applies only when warningcheck is positive. +10. Various optimizations should make the output a little more compact. +11. For PostScript engines that obey the scan-conversion rules documented + in the 2nd edition PostScript Language Reference Manual, hrules and + vrules in btex..etex blocks should now come out to exactly the right + number of pixels. The change affects all pen strokes drawn in MetaPost + It is implemented via PostScripts dtransform and idtransform operators. +12. A bug involving setbounds and MetaPost's corner operators has been fixed. +13. Degenerate elliptical pens no longer cause PostScript to divide by zero. +14. Fixed a very obscure bug involving readstring and end-of-file. +15. String compaction statistics are now printed correctly when the job + terminates with tracingstats positive. + + + +---------------------------------------------------------------------- +Changes to the source files between Version 0.50 and Version 0.60 +---------------------------------------------------------------------- + +CHANGES to ./README.MP +The installation instructions should now be clearer. They also explain +how to cope with verious versions of WEB2C. + +CHANGES to ./site.h +I removed unused entries and clarified instructions in commentary material. +Confusing comments about possibly merging it with the WEB2C version of site.h +were removed--I think such merging is a bad idea. + +CHANGES TO ./Makefile, mp/Makefile, mpware/Makefile: +Improved default settings, simplified the `install' recipe, +fixed a few missing depencies, portability problems, etc. + +RENAMED FILES + mp/mp.defines, mpware/mpware.defines, mpware/dvitompext.c +TO mp/mp.def, mpware/mpware.def, mpware/dvimpext.c +(The names also changed in the Makefiles and convert scripts) + +CHANGES TO mp/mp.web, mp/mp.ch, mp/mp.def, mp/mpext.c: +Lots of new features were added as noted above. The only new system- +dependencies are for `readfrom' and `write...to'. +The change file now increases max_read_files; it doesn't bother with +max_write_files, but perhaps it should. There is a new change entitled +"Path selector for..readfrom file". From the web2C sources I borrowed +a change "`logname' is declared in in some systems". I also +added a PASCAL-like eof() routine to mpext, removed a change entitled +"avoid using eof() in read_psname_table" and added a new change +"[48.1199] `eof'...[in read_mem_file]". + +Reorganization of math routines in the mp directory: +I moved the floating-point math routines from mpext.c to mpath.c. A +C-language version of the standard math routines was moved from mpmath.c +to a new file pmath.c for use in mathtest only. This required chages to +mathtest.c and time.c (also used only for mathtest). The point of all +this is that there is now just one copy of the floating-point math routines +and it is used for mathtest and (optionally) for mp itself. + +Routines in doc and mp/trapdir: +The output was updated to Version 0.60. Another test file mptrap.mp +tests new features. There have also been minor updates to the manual, +although the new features for Version 0.60 are not included yet. + +CHANGES to macros in mplib: +A minor change to boxes.mp should make it more robust. Changed default +setting of tracinglostchars in mfplain.mp and plain.mp. Added a string +constant EOF to plain.mp for use with readfrom and write..to. +Changed mproof.tex to make it more portable as suggested by Knuth. + +CHANGES to mpware/dvitomp.web, mpware/dvitomp.ch: +The web file was changed to output rules as horizontal or vertical +penstrokes with butt endcaps. This also affected dvitomp.ch. Also in +dvitomp.ch, put terminal output on stdout instead of stderr and require +the output file to be given on the command line. + +CHANGES to mpware/makempx, mpware/troffmpx: +Added comments explaining what path names need fixing. Portability improvements +and dvitomp's output change affect makempx only. + +CHANGES to mpware/mptotex.c mpware/mptotr.c mpware/testex.err mpware/testex.mp: +Ignore an initial newline in the TeX (or troff) material to avoid generating +a blank line in the output file. The test file now covers this case. + +CHANGE to mpware/newer.c +Minor changes to make it compile in strict ANSI/POSIX environments. diff --git a/source/texk/web2c/window/win32.c b/source/texk/web2c/window/win32.c index 15815baf82..3f0f7342ee 100644 --- a/source/texk/web2c/window/win32.c +++ b/source/texk/web2c/window/win32.c @@ -32,7 +32,7 @@ static void Win32Error(const char *caller); #undef DEBUG /* #define DEBUG 1 */ -static char szTitle[] = " MetaFont V2.71828182 Online Display"; +static char szTitle[] = " METAFONT Online Display"; static HWND my_window; static HDC my_dc; static HDC drawing_dc;