From 691ef658b6d650327b82abf2a346336b176736e9 Mon Sep 17 00:00:00 2001 From: John Ousterhout Date: Thu, 17 Dec 2015 15:29:33 -0800 Subject: [PATCH] Make docs compile again With newer versions oF packages such as texinfo and Perl, the documentation no longer compiled. Fixed various issues, and removed dvi and ps from default output formats, since software to generate them is becoming less widely available. --- doc/Makefile | 4 ++-- doc/standards.texi | 2 +- doc/texi2html | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index ed8bb23..0a01cc3 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -3,7 +3,7 @@ filesys.texi license.texi reference.texi 44bsd.texi standards.texi \ doc.texi sample.tmpl.texi devel.texi debug.texi installation.texi \ bibliography.texi localsettings.texi -all: pintos.html pintos.info pintos.dvi pintos.ps pintos.pdf +all: pintos.html pintos.info pintos.pdf pintos.html: $(TEXIS) texi2html ./texi2html -toc_file=$@ -split=chapter -nosec_nav -nomenu -init_file pintos-t2h.init $< @@ -21,7 +21,7 @@ pintos.ps: pintos.dvi dvips $< -o $@ pintos.pdf: $(TEXIS) - texi2pdf $< -o $@ + pdftex $< -o $@ %.texi: % sed < $< > $@ 's/\([{}@]\)/\@\1/g;' diff --git a/doc/standards.texi b/doc/standards.texi index 8e4b370..7d30a4b 100644 --- a/doc/standards.texi +++ b/doc/standards.texi @@ -151,7 +151,7 @@ A few of the string functions declared in the standard The worst offenders are intentionally not included in the Pintos C library: -@table @func +@table @code @item strcpy When used carelessly this function can overflow the buffer reserved for its output string. Use @func{strlcpy} instead. Refer to diff --git a/doc/texi2html b/doc/texi2html index 16ecd4a..30416a6 100755 --- a/doc/texi2html +++ b/doc/texi2html @@ -3443,7 +3443,7 @@ sub pass1 ############################################################# # value substitution before macro expansion, so that # it works in macro arguments - s/\@value{($VARRE)}/$value{$1}/eg; + s/\@value\{($VARRE)}/$value{$1}/eg; ############################################################# # macro substitution @@ -3512,7 +3512,7 @@ sub pass1 $after = ''; } $args =~ s|\\\\|\\|g; - $args =~ s|\\{|{|g; + $args =~ s|\\\{|{|g; $args =~ s|\\}|}|g; if (@{$macros->{$name}->{Args}} > 1) { @@ -4920,7 +4920,7 @@ sub pass2 # # xref # - while (/\@(x|px|info|)ref{([^{}]+)(}?)/) + while (/\@(x|px|info|)ref\{([^{}]+)(}?)/) { # note: Texinfo may accept other characters ($type, $nodes, $full) = ($1, $2, $3); @@ -5644,10 +5644,10 @@ sub update_sec_num my $ret; $level--; # here we start at 0 - if ($name =~ /^appendix/ || defined(@appendix_sec_num)) + if ($name =~ /^appendix/ || @appendix_sec_num) { # appendix style - if (defined(@appendix_sec_num)) + if (@appendix_sec_num) { &incr_sec_num($level, @appendix_sec_num); } @@ -5660,7 +5660,7 @@ sub update_sec_num else { # normal style - if (defined(@normal_sec_num)) + if (@normal_sec_num) { &incr_sec_num($level, @normal_sec_num); } -- 2.30.2