diff --git a/Build.PL b/Build.PL new file mode 100644 index 0000000..e5d11c0 --- /dev/null +++ b/Build.PL @@ -0,0 +1,58 @@ +use strict; +use warnings; + +use Module::Build; + +# These are required by the test suite. +use lib "t"; +use lib "bin"; + +my $build = Module::Build->new( + module_name => 'Stow', + keywords => [ qw/stow symlink software package management install/ ], + license => 'gpl', + + # Module::Build forces us to use v1.4 of the CPAN Meta Spec: + # https://rt.cpan.org/Ticket/Display.html?id=71502 + # 'meta-spec' => { + # version => '2.0', + # url => 'http://search.cpan.org/perldoc?CPAN::Meta::Spec', + # }, + meta_add => { + resources => { + license => 'http://www.gnu.org/licenses/gpl-2.0.html' , + homepage => 'https://savannah.gnu.org/projects/stow', + + # Module::Build forces us to use v1.4 of the CPAN Meta Spec: + # https://rt.cpan.org/Ticket/Display.html?id=71502 + # bugtracker => { + # web => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Stow', + # mailto => 'mysqldiff@adamspiers.org', + # }, + #bugtracker => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Stow', + + # Module::Build forces us to use v1.4 of the CPAN Meta Spec: + # https://rt.cpan.org/Ticket/Display.html?id=71502 + # repository => { + # url => 'git:github.com/aspiers/stow.git', + # web => 'http://github.com/aspiers/stow', + # type => 'git', + # }, + repository => 'http://github.com/aspiers/stow', + #repository => 'https://savannah.gnu.org/git/?group=stow', + }, + }, + requires => { + 'perl' => '5.006', + 'Carp' => 0, + 'File::Slurp' => 0, + 'IO::File' => 0, + }, + script_files => [ 'bin/stow' ], + all_from => 'lib/Stow.pm', + configure_requires => { + 'Module::Build' => 0, + }, +); + +$build->create_build_script(); diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 0000000..c063667 --- /dev/null +++ b/MANIFEST @@ -0,0 +1,46 @@ +aclocal.m4 +AUTHORS +automake/install-sh +automake/mdate-sh +automake/missing +automake/stamp-vti +bin/chkstow +bin/chkstow.in +bin/stow +bin/stow.in +Build.PL +ChangeLog +configure +configure.ac +COPYING +doc/stow.8 +doc/stow.info +doc/stow.texi +doc/texinfo.tex +doc/version.texi +INSTALL +lib/Stow.pm +lib/Stow.pm.in +lib/Stow/Util.pm +Makefile.am +Makefile.in +MANIFEST This list of files +NEWS +README +t/chkstow.t +t/cleanup_invalid_links.t +t/defer.t +t/examples.t +t/find_stowed_path.t +t/foldable.t +t/join_paths.t +t/parent.t +t/stow.t +t/stow_contents.t +t/testutil.pm +t/unstow_contents.t +t/unstow_contents_orig.t +THANKS +TODO +META.yml +META.json diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP new file mode 100644 index 0000000..c8beef8 --- /dev/null +++ b/MANIFEST.SKIP @@ -0,0 +1,78 @@ + +#!start included /usr/share/perl5/ExtUtils/MANIFEST.SKIP +# Avoid version control files. +\bRCS\b +\bCVS\b +\bSCCS\b +,v$ +\B\.svn\b +\B\.git\b +\B\.gitignore\b +\b_darcs\b +\B\.cvsignore$ + +# Avoid VMS specific MakeMaker generated files +\bDescrip.MMS$ +\bDESCRIP.MMS$ +\bdescrip.mms$ + +# Avoid Makemaker generated and utility files. +\bMANIFEST\.bak +\bMakefile$ +\bblib/ +\bMakeMaker-\d +\bpm_to_blib\.ts$ +\bpm_to_blib$ +\bblibdirs\.ts$ # 6.18 through 6.25 generated this + +# Avoid Module::Build generated and utility files. +\bBuild$ +\b_build/ +\bBuild.bat$ +\bBuild.COM$ +\bBUILD.COM$ +\bbuild.com$ + +# Avoid temp and backup files. +~$ +\.old$ +\#$ +\b\.# +\.bak$ +\.tmp$ +\.# +\.rej$ + +# Avoid OS-specific files/dirs +# Mac OSX metadata +\B\.DS_Store +# Mac OSX SMB mount metadata files +\B\._ + +# Avoid Devel::Cover files. +\bcover_db\b +#!end included /usr/share/perl5/ExtUtils/MANIFEST.SKIP + +# Avoid configuration metadata file +^MYMETA\. + +# Avoid Module::Build generated and utility files. +\bBuild$ +\bBuild.bat$ +\b_build +\bBuild.COM$ +\bBUILD.COM$ +\bbuild.com$ +^MANIFEST\.SKIP + +# Avoid archives of this distribution +\bStow-[\d\.\_]+ + +# Avoid autotools stuff +^autom4te\.cache/.+$ +^config\.(log|status)$ +^doc/\.dirstamp$ +^doc/stamp-vti$ + +# Avoid test files +^t/(stow|target)/.+$ diff --git a/META.json b/META.json new file mode 100644 index 0000000..c622c81 --- /dev/null +++ b/META.json @@ -0,0 +1,52 @@ +{ + "abstract" : "manage the installation of multiple software packages", + "author" : [ + "unknown" + ], + "dynamic_config" : 1, + "generated_by" : "Module::Build version 0.38, CPAN::Meta::Converter version 2.112621", + "license" : [ + "open_source" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "Stow", + "prereqs" : { + "configure" : { + "requires" : { + "Module::Build" : 0 + } + }, + "runtime" : { + "requires" : { + "Carp" : 0, + "File::Slurp" : 0, + "IO::File" : 0, + "perl" : "5.006" + } + } + }, + "provides" : { + "Stow" : { + "file" : "lib/Stow.pm", + "version" : "v2.0.2" + }, + "Stow::Util" : { + "file" : "lib/Stow/Util.pm", + "version" : 0 + } + }, + "release_status" : "stable", + "resources" : { + "homepage" : "https://savannah.gnu.org/projects/stow", + "license" : [ + "http://www.gnu.org/licenses/gpl-2.0.html" + ], + "repository" : { + "url" : "http://github.com/aspiers/stow" + } + }, + "version" : "v2.0.2" +} diff --git a/META.yml b/META.yml new file mode 100644 index 0000000..d1d2748 --- /dev/null +++ b/META.yml @@ -0,0 +1,31 @@ +--- +abstract: 'manage the installation of multiple software packages' +author: + - unknown +build_requires: {} +configure_requires: + Module::Build: 0 +dynamic_config: 1 +generated_by: 'Module::Build version 0.38, CPAN::Meta::Converter version 2.112621' +license: open_source +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: 1.4 +name: Stow +provides: + Stow: + file: lib/Stow.pm + version: v2.0.2 + Stow::Util: + file: lib/Stow/Util.pm + version: 0 +requires: + Carp: 0 + File::Slurp: 0 + IO::File: 0 + perl: 5.006 +resources: + homepage: https://savannah.gnu.org/projects/stow + license: http://www.gnu.org/licenses/gpl-2.0.html + repository: http://github.com/aspiers/stow +version: v2.0.2 diff --git a/Makefile.am b/Makefile.am index e72767e..bf11f6d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,11 +1,14 @@ ## Process this file with Automake to produce Makefile.in -bin_SCRIPTS = stow chkstow -info_TEXINFOS = stow.texi -dist_man_MANS = stow.8 +dist_bin_SCRIPTS = bin/stow bin/chkstow +info_TEXINFOS = doc/stow.texi +TEXINFO_TEX = doc/texinfo.tex +dist_man_MANS = doc/stow.8 dist_doc_DATA = README pmdir = $(libdir)/perl5 -pm_DATA = lib/Stow.pm lib/Stow/Util.pm +dist_pm_DATA = lib/Stow.pm +pmstowdir = $(pmdir)/Stow +dist_pmstow_DATA = lib/Stow/Util.pm TESTS_ENVIRONMENT=$(PERL) -I $(top_srcdir) TESTS = \ @@ -23,8 +26,13 @@ TESTS = \ t/chkstow.t AUTOMAKE_OPTIONS = dist-shar -EXTRA_DIST = $(TESTS) t/testutil.pm -CLEANFILES = $(bin_SCRIPTS) +CPAN_FILES = MANIFEST MANIFEST.SKIP Build.PL META.yml META.json +EXTRA_DIST = \ + bin/stow.in bin/chkstow.in lib/Stow.pm.in \ + $(TESTS) t/testutil.pm \ + $(TEXINFO_TEX) \ + $(CPAN_FILES) +CLEANFILES = $(bin_SCRIPTS) $(dist_pm_DATA) # clean up files left behind by test suite clean-local: @@ -34,11 +42,11 @@ clean-local: edit = sed -e 's|[@]PERL[@]|$(PERL)|g' \ -e 's|[@]VERSION[@]|$(VERSION)|g' -stow: stow.in Makefile +bin/stow: bin/stow.in Makefile $(edit) < $< > $@ chmod +x $@ -chkstow: chkstow.in Makefile +bin/chkstow: bin/chkstow.in Makefile $(edit) < $< > $@ chmod +x $@ @@ -47,15 +55,15 @@ lib/Stow.pm: lib/Stow.pm.in # The rules for manual.html and manual.texi are only used by # the developer -manual.html: manual.texi +doc/manual.html: doc/manual.texi -rm -f $@ texi2html -expandinfo -menu -monolithic -verbose $< -manual.texi: stow.texi +doc/manual.texi: doc/stow.texi -rm -f $@ cp $< $@ MODULES = lib/Stow.pm lib/Stow/Util.pm -test: stow chkstow $(MODULES) +test: bin/stow bin/chkstow $(MODULES) perl -MTest::Harness -Ilib -It -Ibin -e 'runtests(@ARGV)' t/*.t diff --git a/install-sh b/automake/install-sh similarity index 100% rename from install-sh rename to automake/install-sh diff --git a/mdate-sh b/automake/mdate-sh similarity index 100% rename from mdate-sh rename to automake/mdate-sh diff --git a/missing b/automake/missing similarity index 100% rename from missing rename to automake/missing diff --git a/chkstow.in b/bin/chkstow.in similarity index 91% rename from chkstow.in rename to bin/chkstow.in index 3fe1741..caf50bb 100755 --- a/chkstow.in +++ b/bin/chkstow.in @@ -37,11 +37,11 @@ sub usage { print <<"EOT"; USAGE: chkstow [options] -Options: +Options: -b, --badlinks Report symlinks that point to non-existant files. -a, --aliens Report non-symlinks in the target directory. -l, --list List packages in the target directory. - -t DIR, --target=DIR Set the target directory to DIR (default + -t DIR, --target=DIR Set the target directory to DIR (default is /usr/local) EOT exit(0); @@ -51,7 +51,7 @@ sub check_stow { #my ($Target, $Wanted) = @_; my (%options) = ( - wanted => $Wanted, + wanted => $Wanted, preprocess => \&skip_dirs, ); @@ -81,12 +81,12 @@ sub skip_dirs { # checking for files that do not link to anything sub bad_links { - -l && !-e && print "Bogus link: $File::Find::name\n"; + -l && !-e && print "Bogus link: $File::Find::name\n"; } # checking for files that are not owned by stow -sub aliens { - !-l && !-d && print "Unstowed file: $File::Find::name\n"; +sub aliens { + !-l && !-d && print "Unstowed file: $File::Find::name\n"; } # just list the packages in the the target directory diff --git a/stow.in b/bin/stow.in similarity index 96% rename from stow.in rename to bin/stow.in index 34cb13a..320711a 100755 --- a/stow.in +++ b/bin/stow.in @@ -87,34 +87,34 @@ sub process_options { 'version|V', 'compat|p', 'dir|d=s', 'target|t=s', # clean and pre-compile any regex's at parse time - 'ignore=s' => + 'ignore=s' => sub { # FIXME: do we really need strip_quotes here? my $regex = strip_quotes($_[1]); push @{$options{'ignore'}}, qr($regex\z); }, - 'override=s' => - sub { + 'override=s' => + sub { my $regex = strip_quotes($_[1]); push @{$options{'override'}}, qr(\A$regex); }, - 'defer=s' => - sub { + 'defer=s' => + sub { my $regex = strip_quotes($_[1]); push @{$options{'defer'}}, qr(\A$regex); }, # a little craziness so we can do different actions on the same line: - # a -D, -S, or -R changes the action that will be performed on the + # a -D, -S, or -R changes the action that will be performed on the # package arguments that follow it. 'D|delete' => sub { $action = 'unstow' }, 'S|stow' => sub { $action = 'stow' }, 'R|restow' => sub { $action = 'restow' }, # Handler for non-option arguments - '<>' => + '<>' => sub { if ($action eq 'restow') { push @pkgs_to_unstow, $_[0]; @@ -146,7 +146,7 @@ sub sanitize_path_options { $options->{'dir'} =~ s/ +\z//; } else { - $options->{'dir'} = exists $ENV{STOW_DIR} ? $ENV{STOW_DIR} : getcwd(); + $options->{'dir'} = exists $ENV{STOW_DIR} ? $ENV{STOW_DIR} : getcwd(); } if (exists $options->{'target'}) { @@ -176,7 +176,7 @@ sub check_packages { #===== SUBROUTINE ============================================================ -# Name : get_config_file_options() +# Name : get_config_file_options() # Purpose : search for default settings in any .stowrc files # Parameters: none # Returns : a list of default options @@ -190,7 +190,7 @@ sub get_config_file_options { for my $file ("$ENV{'HOME'}/.stowrc", '.stowrc') { if (-r $file) { warn "Loading defaults from $file\n"; - open my $FILE, '<', $file + open my $FILE, '<', $file or die "Could not open $file for reading\n"; while (my $line = <$FILE>){ chomp $line; @@ -200,13 +200,13 @@ sub get_config_file_options { } } return @defaults; -} +} #===== SUBROUTINE =========================================================== # Name : usage() # Purpose : print program usage message and exit # Parameters: $msg => string to prepend to the usage message -# Returns : n/a +# Returns : n/a # Throws : n/a # Comments : if 'msg' is given, then exit with non-zero status #============================================================================ @@ -255,7 +255,7 @@ sub version { } #===== METHOD ================================================================ -# Name : strip_quotes +# Name : strip_quotes # Purpose : remove matching outer quotes from the given string # Parameters: none # Returns : n/a diff --git a/configure.ac b/configure.ac index 063733e..a9b6fa7 100644 --- a/configure.ac +++ b/configure.ac @@ -2,6 +2,7 @@ dnl Process this file with Autoconf to produce configure dnl AC_INIT([stow], [2.0.2], [bug-stow@gnu.org]) AC_PREREQ([2.61]) +AC_CONFIG_AUX_DIR([automake]) AM_INIT_AUTOMAKE([-Wall -Werror]) AC_PROG_INSTALL diff --git a/stow.8 b/doc/stow.8 similarity index 99% rename from stow.8 rename to doc/stow.8 index 38de9d6..3e59c62 100644 --- a/stow.8 +++ b/doc/stow.8 @@ -146,7 +146,7 @@ The target of a relative symlink is computed starting from the symlink's own directory. Stow only creates relative symlinks. .SH OPTIONS -The stow directory is assumed to be the value of the 'STOW_DIR' environment +The stow directory is assumed to be the value of the 'STOW_DIR' environment variable or if unset the current directory, and the target directory is assumed to be the parent of the current directory (so it is typical to execute diff --git a/stow.texi b/doc/stow.texi similarity index 99% rename from stow.texi rename to doc/stow.texi index 5286e13..79cc3d3 100644 --- a/stow.texi +++ b/doc/stow.texi @@ -129,7 +129,7 @@ remove files in independent packages without confusing them with other files sharing the same file system space. For instance, it is common to install Perl and Emacs in @file{/usr/local}. When one does so, one winds up with the following files@footnote{As of Perl 4.036 and Emacs -19.22.} in @file{/usr/local/man/man1}: +19.22.} in @file{/usr/local/man/man1}: @example a2p.1 @@ -138,7 +138,7 @@ emacs.1 etags.1 h2ph.1 perl.1 -s2p.1 +s2p.1 @end example @noindent @@ -269,7 +269,7 @@ given perl regular expression. For example, using the options @end example @noindent -will cause stow to ignore emacs and CVS backup files. +will cause stow to ignore emacs and CVS backup files. Note that the regular expression is anchored to the end of the filename, because this is what you will want to do most of the time. @@ -299,7 +299,7 @@ a Perl regex. Note that the regular expression is anchored to the beginning of the path relative to the target directory, because this is what you will want to do most -of the time. +of the time. @item --override='' This (repeatable) option forces any file matching the regular expression to be @@ -312,7 +312,7 @@ the following options @noindent will permit stow to overwrite links that point to pre-existing man and info -pages that are owned by stow and would otherwise cause a conflict. +pages that are owned by stow and would otherwise cause a conflict. The regular expression is anchored to the beginning of the path relative to the target directory, because this is what you will want to do most of the time. @@ -321,7 +321,7 @@ the target directory, because this is what you will want to do most of the time. @itemx --no @itemx --simulate Do not perform any operations that modify the file system; in combination with -@samp{-v} can be used to merely show what would happen. +@samp{-v} can be used to merely show what would happen. @item -v @itemx --verbose[=@var{n}] @@ -335,8 +335,8 @@ doing. Verbosity levels are 0, 1, 2, and 3; 0 is the default. Using Scan the whole target tree when unstowing. By default, only directories specified in the @dfn{installation image} are scanned during an unstow operation. Scanning the whole tree can be prohibitive if your target tree is -very large. This option restores the legacy behaviour; however, the -@samp{--badlinks} option may be a better way of ensuring that your +very large. This option restores the legacy behaviour; however, the +@samp{--badlinks} option may be a better way of ensuring that your installation does not have any dangling symlinks. @item -V @@ -377,7 +377,7 @@ The following options are useful for cleaning up your target tree: @item -b @itemx --badlinks Checks target directory for bogus symbolic links. That is, links that point to -non-existent files. +non-existent files. @item -a @itemx --aliens @@ -387,7 +387,7 @@ contain a @file{.stow} file. @item -l @itemx --list -Will display the target package for every symbolic link in the stow target +Will display the target package for every symbolic link in the stow target directory. The following options are deprecated: @end table @@ -398,9 +398,9 @@ The following options are deprecated as of Stow version 2: @itemx --conflicts Print any conflicts that are encountered. This option implies @samp{-n}, and is used to search for all conflicts that might -arise from an actual Stow operation. +arise from an actual Stow operation. -This option is deprecated as conflicts are now printed by default and no +This option is deprecated as conflicts are now printed by default and no operations will be performed if any conflicts are detected. @end table @@ -460,8 +460,8 @@ tree-folding symlink. @cindex unfolding trees The time often comes when a tree-folding symlink has to be undone because another package uses one or more of the folded subdirectories in -its installation image. This operation is called @dfn{splitting open} or -@dfn{unfolding} a folded tree. It involves removing the original symlink from +its installation image. This operation is called @dfn{splitting open} or +@dfn{unfolding} a folded tree. It involves removing the original symlink from the target tree, creating a true directory in its place, and then populating the new directory with symlinks to the newly-installed package @emph{and} to the old package that used the old symlink. For example, suppose that @@ -561,7 +561,7 @@ un-populatable symlink. For complex packages, scanning the stow and target trees in tandem, and deciding whether to make directories or links, split-open or fold directories, -can actually take a long time (a number of seconds). Moreover, an accurate +can actually take a long time (a number of seconds). Moreover, an accurate analysis of potential conflicts requires us to take into account all of these operations. @@ -585,7 +585,7 @@ stow -D emacs-21.3 -S emacs-21.4a @end example @noindent -which will replace emacs-21.3 with emacs-21.4a using a single invocation. +which will replace emacs-21.3 with emacs-21.4a using a single invocation. This is much faster and cleaner than performing two separate invocations of stow, because redundant folding/unfolding operations can be factored out. In @@ -593,7 +593,7 @@ addition, all the operations are calculated and merged before being executed @pxref{Deferred Operation}, so the amount of of time in which GNU Emacs is unavailable is minimised. -You can mix and match any number of actions, for example, +You can mix and match any number of actions, for example, @example stow -S pkg1 pkg2 -D pkg3 pkg4 -S pkg5 -R pkg6 @@ -631,7 +631,7 @@ symlink, and thus cannot remove it). @chapter Target Maintenance From time to time you will need to clean up your target tree. -Stow includes three operational modes that performs checks that +Stow includes three operational modes that performs checks that would generally be too expensive to performed during normal stow execution. @@ -1020,8 +1020,8 @@ the output from the command (preferably verbose output, obtained by adding @samp{--verbose=3} to the Stow command line). @end itemize -If you are really keen, consider developing a minimal test case and creating a -new test. See the @file{t/} for lots of examples. +If you are really keen, consider developing a minimal test case and +creating a new test. See the @file{t/} for lots of examples. Before reporting a bug, please read the manual carefully, especially @ref{Known Bugs}, to see whether you're encountering diff --git a/texinfo.tex b/doc/texinfo.tex similarity index 99% rename from texinfo.tex rename to doc/texinfo.tex index 8083622..f15767d 100644 --- a/texinfo.tex +++ b/doc/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2006-10-04.17} +\def\texinfoversion{2011-11-21.13} % % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free @@ -310,7 +310,7 @@ % We don't want .vr (or whatever) entries like this: % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; - % it needs to be + % it needs to be % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. @@ -661,7 +661,7 @@ \def\?{?\spacefactor=\endofsentencespacefactor\space} % @frenchspacing on|off says whether to put extra space after punctuation. -% +% \def\onword{on} \def\offword{off} % @@ -1216,7 +1216,7 @@ where each line of input produces a line of output.} % that's what we do). % double active backslashes. -% +% {\catcode`\@=0 \catcode`\\=\active @gdef@activebackslashdouble{% @catcode`@\=@active @@ -1227,11 +1227,11 @@ where each line of input produces a line of output.} % not active characters. hyperref.dtx (which has the same problem as % us) handles it with this amazing macro to replace tokens. I've % tinkered with it a little for texinfo, but it's definitely from there. -% +% % #1 is the tokens to replace. % #2 is the replacement. % #3 is the control sequence with the string. -% +% \def\HyPsdSubst#1#2#3{% \def\HyPsdReplace##1#1##2\END{% ##1% @@ -1420,7 +1420,7 @@ where each line of input produces a line of output.} % tried to figure out what each command should do in the context % of @url. for now, just make @/ a no-op, that's the only one % people have actually reported a problem with. - % + % \normalturnoffactive \def\@{@}% \let\/=\empty @@ -1547,7 +1547,7 @@ where each line of input produces a line of output.} % Definitions for a main text size of 11pt. This is the default in % Texinfo. -% +% \def\definetextfontsizexi{ % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} @@ -1672,7 +1672,7 @@ where each line of input produces a line of output.} % section, chapter, etc., sizes following suit. This is for the GNU % Press printing of the Emacs 22 manual. Maybe other manuals in the % future. Used with @smallbook, which sets the leading to 12pt. -% +% \def\definetextfontsizex{% % Text fonts (10pt). \def\textnominalsize{10pt} @@ -1758,7 +1758,7 @@ where each line of input produces a line of output.} \setfont\secsf\sfbshape{12}{1000} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep1} -\font\seci=cmmi12 +\font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 % Subsection fonts (10pt). @@ -1799,7 +1799,7 @@ where each line of input produces a line of output.} % We provide the user-level command % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. -% +% \def\xword{10} \def\xiword{11} % @@ -1809,7 +1809,7 @@ where each line of input produces a line of output.} % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. - % + % \begingroup \globaldefs=1 \ifx\textsizearg\xword \definetextfontsizex \else \ifx\textsizearg\xiword \definetextfontsizexi @@ -2094,7 +2094,7 @@ where each line of input produces a line of output.} % each of the four underscores in __typeof__. This is undesirable in % some manuals, especially if they don't have long identifiers in % general. @allowcodebreaks provides a way to control this. -% +% \newif\ifallowcodebreaks \allowcodebreakstrue \def\keywordtrue{true} @@ -2225,7 +2225,7 @@ where each line of input produces a line of output.} % @acronym for "FBI", "NATO", and the like. % We print this one point size smaller, since it's intended for % all-uppercase. -% +% \def\acronym#1{\doacronym #1,,\finish} \def\doacronym#1,#2,#3\finish{% {\selectfonts\lsize #1}% @@ -2237,7 +2237,7 @@ where each line of input produces a line of output.} % @abbr for "Comput. J." and the like. % No font change, but don't do end-of-sentence spacing. -% +% \def\abbr#1{\doabbr #1,,\finish} \def\doabbr#1,#2,#3\finish{% {\plainfrenchspacing #1}% @@ -2256,43 +2256,43 @@ where each line of input produces a line of output.} % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need). % It is available from http://www.ctan.org/tex-archive/fonts/eurosym. -% +% % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular % font height. -% +% % feymr - regular % feymo - slanted % feybr - bold % feybo - bold slanted -% +% % There is no good (free) typewriter version, to my knowledge. % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. % Hmm. -% +% % Also doesn't work in math. Do we need to do math with euro symbols? % Hope not. -% -% +% +% \def\euro{{\eurofont e}} \def\eurofont{% % We set the font at each command, rather than predefining it in % \textfonts and the other font-switching commands, so that % installations which never need the symbol don't have to have the % font installed. - % + % % There is only one designed size (nominal 10pt), so we always scale % that to the current nominal size. - % + % % By the way, simply using "at 1em" works for cmr10 and the like, but % does not work for cmbx10 and other extended/shrunken fonts. - % + % \def\eurosize{\csname\curfontsize nominalsize\endcsname}% % - \ifx\curfontstyle\bfstylename + \ifx\curfontstyle\bfstylename % bold: \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize - \else + \else % regular: \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize \fi @@ -2316,7 +2316,7 @@ where each line of input produces a line of output.} % Laurent Siebenmann reports \Orb undefined with: % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. -% +% \ifx\Orb\undefined \def\Orb{\mathhexbox20D} \fi @@ -2632,7 +2632,7 @@ where each line of input produces a line of output.} % cause the example and the item to crash together. So we use this % bizarre value of 10001 as a signal to \aboveenvbreak to insert % \parskip glue after all. Section titles are handled this way also. - % + % \penalty 10001 \endgroup \itemxneedsnegativevskipfalse @@ -3428,7 +3428,7 @@ where each line of input produces a line of output.} % processing continues to some further point. On the other hand, it % seems \endinput does not hurt in the printed index arg, since that % is still getting written without apparent harm. - % + % % Sample source (mac-idx3.tex, reported by Graham Percival to % help-texinfo, 22may06): % @macro funindex {WORD} @@ -3436,12 +3436,12 @@ where each line of input produces a line of output.} % @end macro % ... % @funindex commtest - % + % % The above is not enough to reproduce the bug, but it gives the flavor. - % + % % Sample whatsit resulting: % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} - % + % % So: \let\endinput = \empty % @@ -3677,11 +3677,11 @@ where each line of input produces a line of output.} % makeinfo does not expand macros in the argument to @deffn, which ends up % writing an index entry, and texindex isn't prepared for an index sort entry % that starts with \. - % + % % Since macro invocations are followed by braces, we can just redefine them % to take a single TeX argument. The case of a macro invocation that % goes to end-of-line is not handled. - % + % \macrolist } @@ -3807,7 +3807,7 @@ where each line of input produces a line of output.} % to re-insert the same penalty (values >10000 are used for various % signals); since we just inserted a non-discardable item, any % following glue (such as a \parskip) would be a breakpoint. For example: - % + % % @deffn deffn-whatever % @vindex index-whatever % Description. @@ -4759,11 +4759,11 @@ where each line of input produces a line of output.} % glue accumulate. (Not a breakpoint because it's preceded by a % discardable item.) \vskip-\parskip - % + % % This is purely so the last item on the list is a known \penalty > % 10000. This is so \startdefun can avoid allowing breakpoints after % section headings. Otherwise, it would insert a valid breakpoint between: - % + % % @section sec-whatever % @deffn def-whatever \penalty 10001 @@ -4821,7 +4821,7 @@ where each line of input produces a line of output.} % These characters do not print properly in the Computer Modern roman % fonts, so we must take special care. This is more or less redundant % with the Texinfo input format setup at the end of this file. -% +% \def\activecatcodes{% \catcode`\"=\active \catcode`\$=\active @@ -5416,8 +5416,8 @@ where each line of input produces a line of output.} % from cmtt (char 0x0d). The undirected quote is ugly, so don't make it % the default, but it works for pasting with more pdf viewers (at least % evince), the lilypond developers report. xpdf does work with the -% regular 0x27. -% +% regular 0x27. +% \def\codequoteright{% \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax '% @@ -5429,7 +5429,7 @@ where each line of input produces a line of output.} % and a similar option for the left quote char vs. a grave accent. % Modern fonts display ASCII 0x60 as a grave accent, so some people like % the code environments to do likewise. -% +% \def\codequoteleft{% \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax `% @@ -5572,7 +5572,7 @@ where each line of input produces a line of output.} % by \defargscommonending, instead of 10000, since the sectioning % commands also insert a nobreak penalty, and we don't want to allow % a break between a section heading and a defun. - % + % \ifnum\lastpenalty=10002 \penalty2000 \fi % % Similarly, after a section heading, do not allow a break. @@ -5950,7 +5950,7 @@ where each line of input produces a line of output.} % This does \let #1 = #2, with \csnames; that is, % \let \csname#1\endcsname = \csname#2\endcsname % (except of course we have to play expansion games). -% +% \def\cslet#1#2{% \expandafter\let \csname#1\expandafter\endcsname @@ -7420,7 +7420,7 @@ should work if nowhere else does.} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. -% +% @def@normalturnoffactive{% @let\=@normalbackslash @let"=@normaldoublequote