From: Reinhold Kainhofer Date: Thu, 17 Jul 2008 13:28:59 +0000 (+0200) Subject: texi2html: Use a function ref to allow for variable number of params X-Git-Tag: release/2.11.58-1~32^2~124 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=50d8cc7a3f30ae44db35093750238f2d1579d243;p=lilypond.git texi2html: Use a function ref to allow for variable number of params --- diff --git a/lilypond-texi2html.init b/lilypond-texi2html.init index 18d3af0308..ba6ea538d5 100644 --- a/lilypond-texi2html.init +++ b/lilypond-texi2html.init @@ -179,6 +179,7 @@ sub lilypond_external_href($$$) my $node_id = shift; my $node_xhtml_id = shift; my $file = shift; + my $original_func = \&t2h_default_external_href; # TODO: # 1) Keep a hash of book->section_map @@ -328,7 +329,11 @@ print STDERR "lilypond_external_href: texi_node='$node', node_file='$node_id', n # { # return $file . $file_basename . ".$NODE_FILE_EXTENSION"; # } - return t2h_default_external_href($node, $node_id, $node_hxmlt_id, $file); + if (defined $file) { + return &$original_func($node, $node_id, $node_hxmlt_id, $file); + } else { + return &$original_func($node, $node_id, $node_hxmlt_id); + } }