From 50d8cc7a3f30ae44db35093750238f2d1579d243 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Thu, 17 Jul 2008 15:28:59 +0200 Subject: [PATCH] texi2html: Use a function ref to allow for variable number of params --- lilypond-texi2html.init | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); + } } -- 2.39.2