Not yet triaged patches from wml_2.0.11ds1-0.4.diff.gz

Index: wml/Makefile.in
===================================================================
--- wml.orig/Makefile.in	2011-07-26 16:27:19.000000000 +0200
+++ wml/Makefile.in	2011-07-26 16:33:36.000000000 +0200
@@ -15,10 +15,10 @@
 VPATH           = @srcdir@
 
 SHTOOL	        = $(top_srcdir)/etc/shtool
-INSTALL_PROGRAM = $(SHTOOL) install -c -m 755 -s
-INSTALL_SCRIPT  = $(SHTOOL) install -c -m 755
-INSTALL_DATA    = $(SHTOOL) install -c -m 644
-MKDIR           = $(SHTOOL) mkdir -f -p -m 755
+INSTALL_PROGRAM = install -c -m 755 -s
+INSTALL_SCRIPT  = install -c -m 755
+INSTALL_DATA    = install -c -m 644
+MKDIR           = mkdir -p -m 755
 VERSION_TOOL    = $(SHTOOL) version
 FIXPERM         = $(SHTOOL) fixperm
 TARBALL         = $(SHTOOL) tarball -t
@@ -28,6 +28,7 @@
 bindir          = $(prefix)/bin
 libsubdir       = @libsubdir@
 libdir          = $(prefix)/lib$(libsubdir)
+datadir         = $(prefix)/share$(libsubdir)
 mandir          = $(prefix)/man
 catdir          = @catdir@
 tmpdir          = @tmpdir@
@@ -99,10 +100,11 @@
 	@[ -f .build-ok ] || $(MAKE) all
 	@echo "___ INSTALL: prepare directory structure ___"
 	$(MKDIR) $(bindir)
+	$(MKDIR) $(datadir)
+	$(MKDIR) $(datadir)/include
 	$(MKDIR) $(libdir)
 	$(MKDIR) $(libdir)/data
 	$(MKDIR) $(libdir)/exec
-	$(MKDIR) $(libdir)/include
 	$(MKDIR) $(libdir)/perl
 	$(MKDIR) $(mandir)
 	$(MKDIR) $(mandir)/man1
@@ -130,23 +132,23 @@
 	$(INSTALL_SCRIPT) wml_frontend/wmu.pl $(bindir)/wmu
 	$(INSTALL_DATA) wml_frontend/wmu.1 $(mandir)/man1/wmu.1
 	$(INSTALL_SCRIPT) wml_backend/p1_ipp/ipp.pl $(libdir)/exec/wml_p1_ipp
-	$(INSTALL_DATA) wml_backend/p1_ipp/ipp.1 $(mandir)/man1/wml_p1_ipp.1
-	$(INSTALL_PROGRAM) wml_backend/p2_mp4h/src/mp4h@EXEEXT@ $(libdir)/exec/wml_p2_mp4h@EXEEXT@
-	$(INSTALL_DATA) wml_backend/p2_mp4h/doc/mp4h.1 $(mandir)/man1/wml_p2_mp4h.1
-	$(INSTALL_PROGRAM) wml_backend/p3_eperl/eperl@EXEEXT@ $(libdir)/exec/wml_p3_eperl@EXEEXT@
-	$(INSTALL_DATA) wml_backend/p3_eperl/eperl.1 $(mandir)/man1/wml_p3_eperl.1
-	$(INSTALL_PROGRAM) wml_backend/p4_gm4/src/m4@EXEEXT@ $(libdir)/exec/wml_p4_gm4@EXEEXT@
-	$(INSTALL_DATA) wml_backend/p4_gm4/doc/m4.txt $(mandir)/$(catdir)1/wml_p4_gm4.1
+	$(INSTALL_DATA) wml_backend/p1_ipp/ipp.3 $(mandir)/man3/wml_p1_ipp.3
+#	$(INSTALL_PROGRAM) wml_backend/p2_mp4h/src/mp4h@EXEEXT@ $(libdir)/exec/wml_p2_mp4h@EXEEXT@
+#	$(INSTALL_DATA) wml_backend/p2_mp4h/doc/mp4h.1 $(mandir)/man1/wml_p2_mp4h.1
+#	$(INSTALL_PROGRAM) wml_backend/p3_eperl/eperl@EXEEXT@ $(libdir)/exec/wml_p3_eperl@EXEEXT@
+#	$(INSTALL_DATA) wml_backend/p3_eperl/eperl.1 $(mandir)/man1/wml_p3_eperl.1
+#	$(INSTALL_PROGRAM) wml_backend/p4_gm4/src/m4@EXEEXT@ $(libdir)/exec/wml_p4_gm4@EXEEXT@
+#	$(INSTALL_DATA) wml_backend/p4_gm4/doc/m4.txt $(mandir)/$(catdir)1/wml_p4_gm4.1
 	$(INSTALL_SCRIPT) wml_backend/p5_divert/divert.pl $(libdir)/exec/wml_p5_divert
-	$(INSTALL_DATA) wml_backend/p5_divert/divert.1 $(mandir)/man1/wml_p5_divert.1
+	$(INSTALL_DATA) wml_backend/p5_divert/divert.3 $(mandir)/man3/wml_p5_divert.3
 	$(INSTALL_SCRIPT) wml_backend/p6_asubst/asubst.pl $(libdir)/exec/wml_p6_asubst
-	$(INSTALL_DATA) wml_backend/p6_asubst/asubst.1 $(mandir)/man1/wml_p6_asubst.1
+	$(INSTALL_DATA) wml_backend/p6_asubst/asubst.3 $(mandir)/man3/wml_p6_asubst.3
 	$(INSTALL_SCRIPT) wml_backend/p7_htmlfix/htmlfix.pl $(libdir)/exec/wml_p7_htmlfix
-	$(INSTALL_DATA) wml_backend/p7_htmlfix/htmlfix.1 $(mandir)/man1/wml_p7_htmlfix.1
+	$(INSTALL_DATA) wml_backend/p7_htmlfix/htmlfix.3 $(mandir)/man3/wml_p7_htmlfix.3
 	$(INSTALL_SCRIPT) wml_backend/p8_htmlstrip/htmlstrip.pl $(libdir)/exec/wml_p8_htmlstrip
-	$(INSTALL_DATA) wml_backend/p8_htmlstrip/htmlstrip.1 $(mandir)/man1/wml_p8_htmlstrip.1
-	$(INSTALL_SCRIPT) wml_backend/p9_slice/slice $(libdir)/exec/wml_p9_slice
-	$(INSTALL_DATA) wml_backend/p9_slice/slice.1 $(mandir)/man1/wml_p9_slice.1
+	$(INSTALL_DATA) wml_backend/p8_htmlstrip/htmlstrip.3 $(mandir)/man3/wml_p8_htmlstrip.3
+#	$(INSTALL_SCRIPT) wml_backend/p9_slice/slice $(libdir)/exec/wml_p9_slice
+#	$(INSTALL_DATA) wml_backend/p9_slice/slice.1 $(mandir)/man1/wml_p9_slice.1
 
 install-perl:
 	@echo ""
@@ -163,37 +165,37 @@
 	$(INSTALL_DATA) wml_docs/wml_macros.7 $(mandir)/man7/wml_macros.7
 	$(INSTALL_DATA) wml_docs/wml_faq.7 $(mandir)/man7/wml_faq.7
 	$(INSTALL_DATA) wml_docs/wml_tags.7 $(mandir)/man7/wml_tags.7
-	$(INSTALL_DATA) wml_docs/wml_std_html20.txt $(mandir)/$(catdir)7/wml_std_html20.7
-	$(INSTALL_DATA) wml_docs/wml_std_html32.txt $(mandir)/$(catdir)7/wml_std_html32.7
-	$(INSTALL_DATA) wml_docs/wml_std_html40.txt $(mandir)/$(catdir)7/wml_std_html40.7
-	$(INSTALL_DATA) wml_docs/wml_std_html401.txt $(mandir)/$(catdir)7/wml_std_html401.7
-	$(INSTALL_DATA) wml_docs/wml_std_xhtml10.txt $(mandir)/$(catdir)7/wml_std_xhtml10.7
-	$(INSTALL_DATA) wml_docs/wml_std_css1.txt $(mandir)/$(catdir)7/wml_std_css1.7
-	$(INSTALL_DATA) wml_docs/wml_std_css2.txt $(mandir)/$(catdir)7/wml_std_css2.7
-	$(INSTALL_DATA) wml_docs/wml_std_csspos.txt $(mandir)/$(catdir)7/wml_std_csspos.7
-	$(INSTALL_DATA) wml_docs/wml_std_wai10.txt $(mandir)/$(catdir)7/wml_std_wai10.7
-	$(INSTALL_DATA) wml_docs/wml_barebone.txt $(mandir)/$(catdir)7/wml_barebone.7
+#	$(INSTALL_DATA) wml_docs/wml_std_html20.txt $(mandir)/$(catdir)7/wml_std_html20.7
+#	$(INSTALL_DATA) wml_docs/wml_std_html32.txt $(mandir)/$(catdir)7/wml_std_html32.7
+#	$(INSTALL_DATA) wml_docs/wml_std_html40.txt $(mandir)/$(catdir)7/wml_std_html40.7
+#	$(INSTALL_DATA) wml_docs/wml_std_html401.txt $(mandir)/$(catdir)7/wml_std_html401.7
+#	$(INSTALL_DATA) wml_docs/wml_std_xhtml10.txt $(mandir)/$(catdir)7/wml_std_xhtml10.7
+#	$(INSTALL_DATA) wml_docs/wml_std_css1.txt $(mandir)/$(catdir)7/wml_std_css1.7
+#	$(INSTALL_DATA) wml_docs/wml_std_css2.txt $(mandir)/$(catdir)7/wml_std_css2.7
+#	$(INSTALL_DATA) wml_docs/wml_std_csspos.txt $(mandir)/$(catdir)7/wml_std_csspos.7
+#	$(INSTALL_DATA) wml_docs/wml_std_wai10.txt $(mandir)/$(catdir)7/wml_std_wai10.7
+#	$(INSTALL_DATA) wml_docs/wml_barebone.txt $(mandir)/$(catdir)7/wml_barebone.7
 
 install-aux:
 	@echo ""
 	@echo "___ INSTALL: auxiliary programs and manpages ___"
-	$(INSTALL_SCRIPT) wml_aux/htmlclean/htmlclean.pl $(libdir)/exec/wml_aux_htmlclean
-	$(INSTALL_DATA) wml_aux/htmlclean/htmlclean.1 $(mandir)/man1/wml_aux_htmlclean.1
-	$(INSTALL_PROGRAM) wml_aux/iselect/iselect@EXEEXT@ $(libdir)/exec/wml_aux_iselect@EXEEXT@
-	$(INSTALL_DATA) wml_aux/iselect/iselect.1 $(mandir)/man1/wml_aux_iselect.1
+#	$(INSTALL_SCRIPT) wml_aux/htmlclean/htmlclean.pl $(libdir)/exec/wml_aux_htmlclean
+#	$(INSTALL_DATA) wml_aux/htmlclean/htmlclean.1 $(mandir)/man1/wml_aux_htmlclean.1
+#	$(INSTALL_PROGRAM) wml_aux/iselect/iselect@EXEEXT@ $(libdir)/exec/wml_aux_iselect@EXEEXT@
+#	$(INSTALL_DATA) wml_aux/iselect/iselect.1 $(mandir)/man1/wml_aux_iselect.1
 	$(INSTALL_SCRIPT) wml_aux/map2html/map2html.pl $(libdir)/exec/wml_aux_map2html
-	$(INSTALL_DATA) wml_aux/map2html/map2html.1 $(mandir)/man1/wml_aux_map2html.1
-	$(INSTALL_PROGRAM) wml_aux/tidy/tidy@EXEEXT@ $(libdir)/exec/wml_aux_tidy@EXEEXT@
-	$(INSTALL_DATA) wml_aux/tidy/tidy.txt $(mandir)/$(catdir)1/wml_aux_tidy.1
+	$(INSTALL_DATA) wml_aux/map2html/map2html.3 $(mandir)/man3/wml_aux_map2html.3
+#	$(INSTALL_PROGRAM) wml_aux/tidy/tidy@EXEEXT@ $(libdir)/exec/wml_aux_tidy@EXEEXT@
+#	$(INSTALL_DATA) wml_aux/tidy/tidy.txt $(mandir)/$(catdir)1/wml_aux_tidy.1
 	$(INSTALL_SCRIPT) wml_aux/htmlinfo/htmlinfo.pl $(libdir)/exec/wml_aux_htmlinfo
-	$(INSTALL_DATA) wml_aux/htmlinfo/htmlinfo.1 $(mandir)/man1/wml_aux_htmlinfo.1
-	$(INSTALL_SCRIPT) wml_aux/linklint/linklint.pl $(libdir)/exec/wml_aux_linklint
-	$(INSTALL_DATA) wml_aux/linklint/linklint.1 $(mandir)/man1/wml_aux_linklint.1
-	$(INSTALL_SCRIPT) wml_aux/weblint/weblint.pl $(libdir)/exec/wml_aux_weblint
-	$(INSTALL_DATA) wml_aux/weblint/weblint.1 $(mandir)/man1/wml_aux_weblint.1
-	$(INSTALL_DATA) wml_aux/weblint/weblintrc $(libdir)/data/weblintrc
-	$(INSTALL_SCRIPT) wml_aux/freetable/freetable.pl $(libdir)/exec/wml_aux_freetable
-	$(INSTALL_DATA) wml_aux/freetable/freetable.1 $(mandir)/man1/wml_aux_freetable.1
+	$(INSTALL_DATA) wml_aux/htmlinfo/htmlinfo.3 $(mandir)/man3/wml_aux_htmlinfo.3
+#	$(INSTALL_SCRIPT) wml_aux/linklint/linklint.pl $(libdir)/exec/wml_aux_linklint
+#	$(INSTALL_DATA) wml_aux/linklint/linklint.1 $(mandir)/man1/wml_aux_linklint.1
+#	$(INSTALL_SCRIPT) wml_aux/weblint/weblint.pl $(libdir)/exec/wml_aux_weblint
+#	$(INSTALL_DATA) wml_aux/weblint/weblint.1 $(mandir)/man1/wml_aux_weblint.1
+#	$(INSTALL_DATA) wml_aux/weblint/weblintrc $(libdir)/data/weblintrc
+#	$(INSTALL_SCRIPT) wml_aux/freetable/freetable.pl $(libdir)/exec/wml_aux_freetable
+#	$(INSTALL_DATA) wml_aux/freetable/freetable.1 $(mandir)/man1/wml_aux_freetable.1
 
 install-misc:
 	@echo ""
Index: wml/wml_common/Makefile.in
===================================================================
--- wml.orig/wml_common/Makefile.in	2010-03-28 23:27:59.000000000 +0200
+++ wml/wml_common/Makefile.in	2011-07-26 16:33:36.000000000 +0200
@@ -32,16 +32,16 @@
                   INSTALLMAN1DIR= \
                   INST_MAN3DIR= \
                   INSTALLMAN3DIR=
-PERL_OPTS       = @PERL_OPTS@
+PERL_OPTS       = @PERL_OPTS@ LD_RUN_PATH=
 
 INITVARS = \
-     have_getoptlong=@have_getoptlong@ \
-     have_bitvector=@have_bitvector@ \
-     have_filepathconvert=@have_filepathconvert@ \
-     have_imagesize=@have_imagesize@ \
-     have_io=@have_io@ \
-     have_termreadkey=@have_termreadkey@ \
-     have_htmlclean=0 \
+     have_getoptlong=1 \
+     have_imagesize=1 \
+     have_io=1 \
+     have_termreadkey=1 \
+     have_htmlclean=1 \
+     have_bitvector=1 \
+     have_filepathconvert=0 \
      have_gd=0
 
 SUBDIRS = \
Index: wml/wml_docs/wml_tags.L.main
===================================================================
--- wml.orig/wml_docs/wml_tags.L.main	2010-03-28 23:27:59.000000000 +0200
+++ wml/wml_docs/wml_tags.L.main	2011-07-26 16:33:36.000000000 +0200
@@ -1,15 +1,15 @@
 #!wml                                     wml(1)
 <protect>...</protect>                    wml(1)
 
-#include                                  wml_p1_ipp(1)
-#use                                      wml_p1_ipp(1)
-#depends                                  wml_p1_ipp(1)
-\                                         wml_p1_ipp(1)
-__FILE__                                  wml_p1_ipp(1)
-__LINE__                                  wml_p1_ipp(1)
-__END__                                   wml_p1_ipp(1)
-$(...)                                    wml_p1_ipp(1)
-#                                         wml_p1_ipp(1)
+#include                                  wml_p1_ipp(3)
+#use                                      wml_p1_ipp(3)
+#depends                                  wml_p1_ipp(3)
+\                                         wml_p1_ipp(3)
+__FILE__                                  wml_p1_ipp(3)
+__LINE__                                  wml_p1_ipp(3)
+__END__                                   wml_p1_ipp(3)
+$(...)                                    wml_p1_ipp(3)
+#                                         wml_p1_ipp(3)
 
 <__file__>                                wml_p2_mp4h(1)
 <__line__>                                wml_p2_mp4h(1)
@@ -89,11 +89,10 @@
 <string-neq>                              wml_p2_mp4h(1)
 <string-compare>                          wml_p2_mp4h(1)
 <char-offsets>                            wml_p2_mp4h(1)
+<printf>                                  wml_p2_mp4h(1)
 <subst-in-string>                         wml_p2_mp4h(1)
 <subst-in-var>                            wml_p2_mp4h(1)
 <match>                                   wml_p2_mp4h(1)
-<set-regexp-syntax>                       wml_p2_mp4h(1)
-<get-regexp-syntax>                       wml_p2_mp4h(1)
 <get-var>                                 wml_p2_mp4h(1)
 <get-var-once>                            wml_p2_mp4h(1)
 <set-var>                                 wml_p2_mp4h(1)
@@ -121,6 +120,11 @@
 <divnum>                                  wml_p2_mp4h(1)
 <undivert>                                wml_p2_mp4h(1)
 
+<gettext>...</gettext>                    intl:gettext(3)
+<textdomain>                              intl:gettext(3)
+<bindtextdomain>                          intl:gettext(3)
+<bind_textdomain_codeset>                 intl:gettext(3)
+
 <: ... :>                                 wml_p3_eperl(1)
 <:= ... :>                                wml_p3_eperl(1)
 
@@ -131,18 +135,18 @@
 m4_ifdef                                  wml_p4_gm4(1)
 m4_ifelse                                 wml_p4_gm4(1)
 
-{#NAME#}                                  wml_p5_divert(1)
-{#NAME#:                                  wml_p5_divert(1)
-:#NAME#}                                  wml_p5_divert(1)
-<<NAME>>                                  wml_p5_divert(1)
-..NAME>>                                  wml_p5_divert(1)
-<<NAME..                                  wml_p5_divert(1)
+{#NAME#}                                  wml_p5_divert(3)
+{#NAME#:                                  wml_p5_divert(3)
+:#NAME#}                                  wml_p5_divert(3)
+<<NAME>>                                  wml_p5_divert(3)
+..NAME>>                                  wml_p5_divert(3)
+<<NAME..                                  wml_p5_divert(3)
 
-{: ... :}                                 wml_p6_asubst(1)
-[[..]]                                    wml_p6_asubst(1)
+{: ... :}                                 wml_p6_asubst(3)
+[[..]]                                    wml_p6_asubst(3)
 
-<nostrip>...</nostrip>                    wml_p8_htmlstrip(1)
-<suck>                                    wml_p8_htmlstrip(1)
+<nostrip>...</nostrip>                    wml_p8_htmlstrip(3)
+<suck>                                    wml_p8_htmlstrip(3)
 
 [NAME:...:]                               wml_p9_slice(1)
 [NAME:...:NAME]                           wml_p9_slice(1)
Index: wml/wml_frontend/wml.src
===================================================================
--- wml.orig/wml_frontend/wml.src	2010-03-28 23:27:59.000000000 +0200
+++ wml/wml_frontend/wml.src	2011-07-26 16:33:36.000000000 +0200
@@ -50,6 +50,7 @@
 
 use Getopt::Long 2.13;
 use File::PathConvert;
+use File::Temp;
 use IO::File 1.06;
 use Term::ReadKey;
 use Cwd;
@@ -262,6 +263,16 @@
     $arg =~ s/\\([\$"`])/$1/g;
     return $arg;
 }
+#   replace $(xxx) with value from -D flags
+sub var_expand {
+    my $arg = shift;
+    return $arg unless $arg =~ m/\$\(/;
+    foreach my $v (@opt_D) {
+        my ($key, $value) = split /=/, $v, 2;
+        $arg =~ s/\$\($key\)/$value/g;
+    }
+    return $arg;
+}
 
 #   1. process options in WMLOPTS variable
 if ($var = $ENV{'WMLOPTS'}) {
@@ -423,6 +434,7 @@
         print STDERR "    Prefix: ".'@prefix@'."\n";
         print STDERR "    BinDir: ".'@bindir@'."\n";
         print STDERR "    LibDir: ".'@libdir@'."\n";
+        print STDERR "   DataDir: ".'@datadir@'."\n";
         print STDERR "    ManDir: ".'@mandir@'."\n";
     }
     if ($opt_V > 2) {
@@ -450,7 +462,8 @@
     $opt_q = 1;
 }
 
-$tmpdir = $ENV{'TMPDIR'} || '/tmp';
+my $tmpldir = ($ENV{'TMPDIR'} || '/tmp') . '/wml.XXXXXX';
+$tmpdir = mkdtemp($tmpldir) or die "Unable to create temporary directory: $!\n";
 
 #   if input is stdin we create a temporary file
 $src_istmp = 0;
@@ -1004,6 +1017,7 @@
 unshift(@opt_D, "WML_LOC_PREFIX=@prefix@");
 unshift(@opt_D, "WML_LOC_BINDIR=@bindir@");
 unshift(@opt_D, "WML_LOC_LIBDIR=@libdir@");
+unshift(@opt_D, "WML_LOC_DATADIR=@datadir@");
 unshift(@opt_D, "WML_LOC_MANDIR=@mandir@");
 unshift(@opt_D, "WML_VERSION=$VERSION");
 unshift(@opt_D, "WML_TMPDIR=$tmpdir");
@@ -1062,7 +1076,7 @@
 $preload = '';
 foreach $p (@p) {
     $preload .= " -s 'sys/bootp${p}.wml'"
-      if -f "@libdir@/include/sys/bootp${p}.wml" and $p =~ m/^[34]$/;
+      if -f "@datadir@/include/sys/bootp${p}.wml" and $p =~ m/^[34]$/;
 }
 foreach $i (@opt_i) {
     if ($i =~ m|^<(.+)>$|) {
@@ -1073,6 +1087,10 @@
     }
 }
 
+#   replace $(xxx) with value from -D flags in prolog and epilog filters
+map {$_ = &var_expand($_)} @opt_E;
+map {$_ = &var_expand($_)} @opt_P;
+
 #   determine prologs
 $prolog = '';
 foreach $p (@opt_P) {
@@ -1187,7 +1205,7 @@
     $out_istmp = 1;
 }
 
-$opt_pass1 = "$defipp $verbose -S @libdir@/include -n $src $inc $preload $prolog";
+$opt_pass1 = "$defipp $verbose -S @datadir@/include -n $src $inc $preload $prolog";
 $opt_pass2 = "$defmp4h";
 $opt_pass3 = "$defeperl";
 $opt_pass4 = "$defgm4";
@@ -1222,6 +1240,7 @@
     unlink($tmp[2]);
     unlink($tmp[3]);
     unlink($src) if ($src_istmp);
+    rmdir($tmpdir);
 }
 
 if ($opt_M ne '-') {
@@ -1478,7 +1497,7 @@
 =item B<-I>, B<--include=>I<PATH>
 
 Adds a I<directory> to the list of user include paths. Use this option to set the
-runtime environment for pass 1. See wml_p1_ipp(1) for more details.
+runtime environment for pass 1. See wml_p1_ipp(3) for more details.
 
 =item B<-i>, B<--includefile=>I<PATH>
 
@@ -1719,6 +1738,10 @@
 
 The directory where WML's library files were installed to at built time.
 
+=item WML_LOC_DATADIR
+
+The directory where WML's data files were installed to at built time.
+
 =item WML_LOC_MANDIR
 
 The directory where WML's manual pages were installed to at built time.
@@ -1861,7 +1884,7 @@
  Denis Barbier
  barbier@engelschall.com
 
-=head1 SEEALSO
+=head1 SEE ALSO
 
 wmd(1),
 wml_faq(7),
Index: wml/wml_frontend/wmd.txt
===================================================================
--- wml.orig/wml_frontend/wmd.txt	2010-03-28 23:27:59.000000000 +0200
+++ wml/wml_frontend/wmd.txt	2011-07-26 16:33:36.000000000 +0200
@@ -15,18 +15,6 @@
 wml_macros(7) ............<s> Writing WML powerful macros
 wml_faq(7) ...............<s> Frequently Asked Questions on WML 
 wml_tags(7) ..............<s> Permuted index of defined WML tags
-wml_barebone(7) ..........<s> Bare Bones Guide to HTML 4.0
-
-Standard References:
-wml_std_xhtml10(7) .......<s> XHTML 1.0 Specification   (W3C REC 26-Jan-2000)
-wml_std_html401(7) .......<s> HTML 4.01 Specification   (W3C REC 24-Dec-1999)
-wml_std_html40(7) ........<s> HTML 4.0 Specification    (W3C REC 18-Dec-1997)
-wml_std_html32(7) ........<s> HTML 3.2 Specification    (W3C REC 14-Jan-1997)
-wml_std_html20(7) ........<s> HTML 2.0 Specification    (W3C REC 22-Sep-1995)
-wml_std_css1(7) ..........<s> Cascading Style Sheets L1 (W3C REC 17-Dec-1996)
-wml_std_css2(7) ..........<s> Cascading Style Sheets L2 (W3C REC 12-May-1998)
-wml_std_csspos(7) ........<s> HTML Positioning with CSS (W3C WD  19-Aug-1997)
-wml_std_wai10(7) .........<s> Web Content Accessibility (W3C REC 05-May-1999)
 
 Frontends:
 wml(1) ...................<s> Website META Language Control
@@ -36,24 +24,25 @@
 wmu(1) ...................<s> Website META Language Upgrade Tool
 
 Backends:
-wml_p1_ipp(1) ............<s> Include Pre-Processor
+wml_p1_ipp(3) ............<s> Include Pre-Processor
 wml_p2_mp4h(1) ...........<s> Macro Processor for HTML
 wml_p3_eperl(1) ..........<s> Embedded Perl 5 Language
 wml_p4_gm4(1) ............<s> GNU m4 Macro Processor
-wml_p5_divert(1) .........<s> Diversion Filter
-wml_p6_asubst(1) .........<s> Area Substitution Filter
-wml_p7_htmlfix(1) ........<s> HTML Fixup Filter
-wml_p8_htmlstrip(1) ......<s> HTML Stripping Filter
+wml_p5_divert(3) .........<s> Diversion Filter
+wml_p6_asubst(3) .........<s> Area Substitution Filter
+wml_p7_htmlfix(3) ........<s> HTML Fixup Filter
+wml_p8_htmlstrip(3) ......<s> HTML Stripping Filter
 wml_p9_slice(1) ..........<s> Slicing and Output Filter
 
 Auxiliaries:
-wml_aux_htmlinfo(1) ......<s> HTML Information
+wml_aux_htmlinfo(3) ......<s> HTML Information
 wml_aux_linklint(1) ......<s> Hyperlink Checker
 wml_aux_weblint(1) .......<s> HTML Checker
 wml_aux_tidy(1) ..........<s> HTML Clean up
 wml_aux_htmlclean(1) .....<s> HTML Optimizer
-wml_aux_map2html(1) ......<s> Server-Side to Client-Side Map Converter
-wml_aux_txt2html(1) ......<s> Text to HTML Converter
+wml_aux_map2html(3) ......<s> Server-Side to Client-Side Map Converter
+wml_aux_txt2html(3) ......<s> Text to HTML Converter
+wml_aux_newtxt2html(1) ...<s> Text to HTML Converter, new version
 wml_aux_freetable(1) .....<s> Table to HTML Converter
 wml_aux_iselect(1) .......<s> Interactive Selection
 
Index: wml/wml_frontend/Makefile.in
===================================================================
--- wml.orig/wml_frontend/Makefile.in	2010-03-28 23:27:59.000000000 +0200
+++ wml/wml_frontend/Makefile.in	2011-07-26 16:33:36.000000000 +0200
@@ -19,7 +19,8 @@
 bindir          = $(prefix)/bin
 libsubdir       = @libsubdir@
 libdir          = $(prefix)/lib$(libsubdir)
-mandir          = $(prefix)/man
+datadir         = $(prefix)/share$(libsubdir)
+mandir          = @mandir@
 
 WML_VERSION     = @WML_VERSION@
 WML_CONFIG_ARGS = @WML_CONFIG_ARGS@
@@ -58,6 +59,7 @@
         -e 's|\@prefix\@|$(prefix)|g' \
         -e 's|\@bindir\@|$(bindir)|g' \
         -e 's|\@libdir\@|$(libdir)|g' \
+        -e 's|\@datadir\@|$(datadir)|g' \
         -e 's|\@mandir\@|$(mandir)|g' \
         -e 's|\@PATH_PERL\@|$(PATH_PERL)|g' \
         -e 's|\@INSTALLPRIVLIB\@|$(INSTALLPRIVLIB)|g' \
Index: wml/wml_frontend/wmb.src
===================================================================
--- wml.orig/wml_frontend/wmb.src	2010-03-28 23:28:00.000000000 +0200
+++ wml/wml_frontend/wmb.src	2011-07-26 16:33:36.000000000 +0200
@@ -46,6 +46,7 @@
 
 use Getopt::Long 2.13;
 use Term::ReadKey;
+use File::Temp;
 
 
 ##
@@ -202,7 +203,8 @@
 #
 print STDERR "Creating bug report skeleton...";
 
-$tmpdir = $ENV{'TMPDIR'} || '/tmp';
+my $tmpldir = ($ENV{'TMPDIR'} || '/tmp') . '/wmb.XXXXXX';
+$tmpdir = mkdtemp($tmpldir) or die "Unable to create temporary directory: $!\n";
 
 $tmpfile  = "$tmpdir/wmb.$$.1.tmp";
 $tmpfile2 = "$tmpdir/wmb.$$.2.tmp";
@@ -308,6 +310,7 @@
 #
 unlink($tmpfile)  if (-f $tmpfile);
 unlink($tmpfile2) if (-f $tmpfile2);
+rmdir($tmpdir);
 
 #   exit gracefully
 exit(0);
@@ -358,7 +361,7 @@
  rse@engelschall.com
  www.engelschall.com
 
-=head1 SEEALSO
+=head1 SEE ALSO
 
 wml(1)
 
Index: wml/wml_include/Makefile.in
===================================================================
--- wml.orig/wml_include/Makefile.in	2010-03-28 23:27:59.000000000 +0200
+++ wml/wml_include/Makefile.in	2011-07-26 16:33:36.000000000 +0200
@@ -15,15 +15,16 @@
 VPATH           = @srcdir@
 
 PATH_PERL       = @PATH_PERL@
-INSTALL_PROGRAM = $(top_srcdir)/etc/shtool install -c -m 755 -s
-INSTALL_DATA    = $(top_srcdir)/etc/shtool install -c -m 644
-MKDIR           = $(top_srcdir)/etc/shtool mkdir -f -p -m 755
+INSTALL_PROGRAM = install -c -m 755 -s
+INSTALL_DATA    = install -c -m 644
+MKDIR           = mkdir -p -m 755
 
 prefix          = @prefix@
 exec_prefix     = $(prefix)
 bindir          = $(prefix)/bin
 libsubdir       = @libsubdir@
 libdir          = $(prefix)/lib$(libsubdir)
+datadir         = $(prefix)/share$(libsubdir)
 mandir          = $(prefix)/man
 
 INSTALLPRIVLIB  = @INSTALLPRIVLIB@
@@ -49,7 +50,7 @@
 	        sed -e '/^=head1/,/^=cut/d' -e '/^__END__/,$$d' \
                    <$$base.src >$$base.wml; \
 	        cp $$base.src $$name.pod; \
-	        pod2man --section=1 \
+	        pod2man --section=3 \
 	            --center="EN Tools" \
 	            --release="EN Tools" \
 	                $$name.pod >$$base.3; \
@@ -69,13 +70,13 @@
 	    base=`echo $$file | sed -e 's/\.wml$$//g'`; \
 	    dir=`echo $$file | sed -e 's/[a-zA-Z0-9_]*.wml$$//g'`; \
 	    name=`echo wml/$$base | sed -e 's/\//$(DCOLON)/g'`; \
-	    if [ ! -d "$(libdir)/include/$$dir" ]; then \
-	        echo "$(MKDIR) $(libdir)/include/$$dir"; \
-	        $(MKDIR) $(libdir)/include/$$dir; \
+	    if [ ! -d "$(datadir)/include/$$dir" ]; then \
+	        echo "$(MKDIR) $(datadir)/include/$$dir"; \
+	        $(MKDIR) $(datadir)/include/$$dir; \
 	    else :; \
 	    fi; \
-          echo "$(INSTALL_DATA) $$file $(libdir)/include/$$file"; \
-          $(INSTALL_DATA) $$file $(libdir)/include/$$file; \
+          echo "$(INSTALL_DATA) $$file $(datadir)/include/$$file"; \
+          $(INSTALL_DATA) $$file $(datadir)/include/$$file; \
           echo "$(INSTALL_DATA) $$base.3 $(mandir)/man3/$$name.3"; \
           $(INSTALL_DATA) $$base.3 $(mandir)/man3/$$name.3; \
 	done
Index: wml/wml_include/std/page.src
===================================================================
--- wml.orig/wml_include/std/page.src	2010-03-28 23:27:59.000000000 +0200
+++ wml/wml_include/std/page.src	2011-07-26 16:33:36.000000000 +0200
@@ -24,14 +24,15 @@
 <set-var slices=* />
 <set-var %attributes />
 <increment __std_page_cnt />
-<ifeq "<get-var slices />" "" "[WML_STDPAGE_HEAD:" /><html*>
+<ifeq "<get-var slices />" "" "[WML_STDPAGE_HEAD:" /><html*<attributes-quote <attributes-extract :html:(.*) %attributes />/>>
 <head*>
 <ifeq "<get-var info />" "" <info style=meta /> />\
 <if "<get-var title />" "<title*><get-var title /></title*>
 " />\
 {#WML_PAGE_HEAD_<get-var __std_page_cnt />#}\
 </head*>
-<body*<if <get-var background /> " background=\"<get-var background />\"" "" />\
+<body*<attributes-quote <attributes-extract :body:(.*) %attributes />/>\
+      <if <get-var background /> " background=\"<get-var background />\"" "" />\
       <when <not <get-var color /> />>\
       <if <get-var bgcolor /> <group <ifeq "<get-var bgcolor />" "none" "" " bgcolor=\"<get-var bgcolor />\"" /> /> " bgcolor=\"#ffffff\"" />\
       <if <get-var text /> " text=\"<get-var text />\"" " text=\"#000000\"" />\
@@ -176,6 +177,11 @@
 C<WML_STDPAGE_BODY> and C<WML_STDPAGE_FOOT>. These can be used later in
 Pass 9 (Slice) for cutting out parts of the page.
 
+=item :html:I<ATTR>=I<STR> :body:I<ATTR>=I<STR>
+
+The ``I<ATTR>=I<STR>'' pairs are passed along to the C<E<lt>htmlE<gt>>
+and C<E<lt>bodyE<gt>> HTML tags.
+
 =back
 
 =head1 OTHER COMMANDS
@@ -198,7 +204,7 @@
  Internal: P1, P2, P5
  External: --
 
-=head1 SEEALSO
+=head1 SEE ALSO
 
 HTML C<E<lt>headE<gt>>, C<E<lt>bodyE<gt>> and C<E<lt>titleE<gt>> tags;
 wml::std::info(3)
Index: wml/wml_contrib/wmg.cgi
===================================================================
--- wml.orig/wml_contrib/wmg.cgi	2011-07-26 13:44:21.000000000 +0200
+++ wml/wml_contrib/wmg.cgi	2011-07-26 16:33:36.000000000 +0200
@@ -1,6 +1,5 @@
-:
-eval 'exec perl -S $0 ${1+"$@"}'
-    if $running_under_some_shell;
+#! /usr/bin/perl
+
 ##
 ##  wmg.cgi -- webdesign magnifying glass
 ##  Copyright (c) 1998,1999 Ralf S. Engelschall, All Rights Reserved. 
@@ -426,8 +425,8 @@
         $im->string(gdSmallFont,1,1, sprintf("%s %dx%d", $t, $w, $h), $col3);
         $im->string(gdSmallFont,1,12, "$alt", $col3) if ($alt ne '');
         $im->string(gdSmallFont,1,12, "[$file]", $col3) if ($alt eq '');
-        $contents = $im->gif;
-        $type = 'image/gif';
+        $contents = $im->png;
+        $type = 'image/png';
     }
 }
 if ($level >= 4) {
Index: wml/wml_contrib/tkwmd
===================================================================
--- wml.orig/wml_contrib/tkwmd	2010-03-28 23:27:59.000000000 +0200
+++ wml/wml_contrib/tkwmd	2011-07-26 16:33:36.000000000 +0200
@@ -77,10 +77,7 @@
 }
 
 add_doc_menu('Basics', 
-    qw(wml_intro wml_tutorial wml_faq wml_tags wml_barebone));
-add_doc_menu('References', 
-    qw(wml_std_html40 wml_std_html32 wml_std_html20 wml_std_css1
-       wml_std_css2 wml_std_csspos));
+    qw(wml_intro wml_tutorial wml_faq wml_tags));
 add_doc_menu('Frontends', qw(wml wmk wmd wmb wmu));
 add_doc_menu('Backends',
     qw(wml_p1_ipp wml_p2_mhc wml_p3_eperl wml_p4_gm4 wml_p5_divert
Index: wml/wml_misc/Makefile.in
===================================================================
--- wml.orig/wml_misc/Makefile.in	2010-03-28 23:27:59.000000000 +0200
+++ wml/wml_misc/Makefile.in	2011-07-26 16:33:36.000000000 +0200
@@ -15,15 +15,15 @@
 VPATH           = @srcdir@
 
 PATH_PERL       = @PATH_PERL@
-INSTALL_PROGRAM = $(top_srcdir)/etc/shtool install -c -m 755 -s
-INSTALL_DATA    = $(top_srcdir)/etc/shtool install -c -m 644
-MKDIR           = $(top_srcdir)/etc/shtool mkdir -f -p -m 755
+INSTALL_PROGRAM = install -c -m 755 -s
+INSTALL_DATA    = install -c -m 644
+MKDIR           = mkdir -p -m 755
 
 prefix          = @prefix@
 exec_prefix     = $(prefix)
 bindir          = $(prefix)/bin
 libsubdir       = @libsubdir@
-libdir          = $(prefix)/lib$(libsubdir)
+datadir         = $(prefix)/share$(libsubdir)
 mandir          = $(prefix)/man
 
 # ------------------------------------------------
