From 62e436955b51c47ee9a84077a448ae3d7b2a59ce Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Mon, 10 Aug 1998 19:40:44 +0000 Subject: do_cmd_moduleauthor(), do_cmd_sectionauthor(): Parallel the new macros. --- Doc/perl/python.perl | 336 +++++++++++++++++++++++++++------------------------ 1 file changed, 180 insertions(+), 156 deletions(-) diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl index f2a319e..065f602 100644 --- a/Doc/perl/python.perl +++ b/Doc/perl/python.perl @@ -14,18 +14,18 @@ sub next_argument_id{ $param = missing_braces() unless ((s/$next_pair_pr_rx/$br_id=$1;$param=$2;''/eo) ||(s/$next_pair_rx/$br_id=$1;$param=$2;''/eo)); - ($param, $br_id); + return ($param, $br_id); } sub next_argument{ my ($param,$br_id) = next_argument_id(); - $param; + return $param; } sub next_optional_argument{ my($param,$rx) = ('', "^\\s*(\\[([^]]*)\\])?"); s/$rx/$param=$2;''/eo; - $param; + return $param; } sub swallow_newline{ @@ -52,7 +52,7 @@ sub ArabictoRoman { $b /= 10; $i++; } - $D2[$c[2]] . $D1[$c[1]] . $D0[$c[0]]; + return $D2[$c[2]] . $D1[$c[1]] . $D0[$c[0]]; } @@ -80,7 +80,7 @@ sub do_cmd_let{ write_warnings("Could not interpret \\let construct..."); } } - $_; + return $_; } @@ -104,13 +104,13 @@ sub do_cmd_version{ $PYTHON_VERSION . @_[0]; } sub do_cmd_release{ local($_) = @_; $PYTHON_VERSION = next_argument(); - $_; + return $_; } sub do_cmd_authoraddress{ local($_) = @_; $DEVELOPER_ADDRESS = next_argument(); - $_; + return $_; } #sub do_cmd_developer{ do_cmd_author(@_[0]); } @@ -120,22 +120,28 @@ sub do_cmd_authoraddress{ sub do_cmd_hackscore{ local($_) = @_; next_argument(); - '_' . $_; + return '_' . $_; } sub use_wrappers{ local($_,$before,$after) = @_; my $stuff = next_argument(); - $before . $stuff . $after . $_; + return $before . $stuff . $after . $_; } -sub use_current{ use_wrappers(@_[0], '', ''); } -sub use_sans_serif{ use_wrappers(@_[0], '', ''); } -sub use_italics{ use_wrappers(@_[0], '', ''); } +sub use_current{ + return use_wrappers(@_[0], '', ''); +} +sub use_sans_serif{ + return use_wrappers(@_[0], '', ''); +} +sub use_italics{ + return use_wrappers(@_[0], '', ''); +} sub do_cmd_optional{ - use_wrappers(@_[0], "\[", - "\]"); + return use_wrappers(@_[0], "\[", + "\]"); } # Logical formatting (some based on texinfo), needs to be converted to @@ -143,39 +149,39 @@ sub do_cmd_optional{ # output files for users that read them over the network rather than # from local repositories. -sub do_cmd_pytype{ use_current(@_); } -sub do_cmd_makevar{ use_current(@_); } -sub do_cmd_code{ use_wrappers(@_[0], '', ''); } -sub do_cmd_module{ do_cmd_code(@_); } -sub do_cmd_keyword{ do_cmd_code(@_); } -sub do_cmd_exception{ do_cmd_code(@_); } -sub do_cmd_class{ do_cmd_code(@_); } -sub do_cmd_function{ do_cmd_code(@_); } -sub do_cmd_constant{ do_cmd_code(@_); } -sub do_cmd_member{ do_cmd_code(@_); } -sub do_cmd_method{ do_cmd_code(@_); } -sub do_cmd_cfunction{ do_cmd_code(@_); } -sub do_cmd_cdata{ do_cmd_code(@_); } -sub do_cmd_ctype{ do_cmd_code(@_); } -sub do_cmd_regexp{ do_cmd_code(@_); } -sub do_cmd_character{ do_cmd_samp(@_); } -sub do_cmd_program{ do_cmd_strong(@_); } -sub do_cmd_email{ use_sans_serif(@_); } -sub do_cmd_mimetype{ use_sans_serif(@_); } -sub do_cmd_var{ use_italics(@_); } -sub do_cmd_dfn{ use_italics(@_); } # make an index entry? -sub do_cmd_emph{ use_italics(@_); } -sub do_cmd_file{ use_wrappers(@_[0], '"', '"'); } -sub do_cmd_samp{ use_wrappers(@_[0], '"', '"'); } -sub do_cmd_kbd{ use_wrappers(@_[0], '', ''); } -sub do_cmd_strong{ use_wrappers(@_[0], '', ''); } +sub do_cmd_pytype{ return use_current(@_); } +sub do_cmd_makevar{ return use_current(@_); } +sub do_cmd_code{ return use_wrappers(@_[0], '', ''); } +sub do_cmd_module{ return do_cmd_code(@_); } +sub do_cmd_keyword{ return do_cmd_code(@_); } +sub do_cmd_exception{ return do_cmd_code(@_); } +sub do_cmd_class{ return do_cmd_code(@_); } +sub do_cmd_function{ return do_cmd_code(@_); } +sub do_cmd_constant{ return do_cmd_code(@_); } +sub do_cmd_member{ return do_cmd_code(@_); } +sub do_cmd_method{ return do_cmd_code(@_); } +sub do_cmd_cfunction{ return do_cmd_code(@_); } +sub do_cmd_cdata{ return do_cmd_code(@_); } +sub do_cmd_ctype{ return do_cmd_code(@_); } +sub do_cmd_regexp{ return do_cmd_code(@_); } +sub do_cmd_character{ return do_cmd_samp(@_); } +sub do_cmd_program{ return do_cmd_strong(@_); } +sub do_cmd_email{ return use_sans_serif(@_); } +sub do_cmd_mimetype{ return use_sans_serif(@_); } +sub do_cmd_var{ return use_italics(@_); } +sub do_cmd_dfn{ return use_italics(@_); } # make an index entry? +sub do_cmd_emph{ return use_italics(@_); } +sub do_cmd_file{ return use_wrappers(@_[0], '"', '"'); } +sub do_cmd_samp{ return use_wrappers(@_[0], '"', '"'); } +sub do_cmd_kbd{ return use_wrappers(@_[0], '', ''); } +sub do_cmd_strong{ return use_wrappers(@_[0], '', ''); } sub do_cmd_newsgroup{ local($_) = @_; my $newsgroup = next_argument(); my $stuff = "" . "$newsgroup"; - $stuff . $_; + return $stuff . $_; } sub do_cmd_envvar{ @@ -187,7 +193,7 @@ sub do_cmd_envvar{ add_index_entry("environment variables!$envvar@\$$envvar", $ahref); add_index_entry("$envvar@\$$envvar", $ahref); - "$aname\$$envvar" . $_; + return "$aname\$$envvar" . $_; } @@ -196,7 +202,7 @@ sub do_cmd_url{ local($_) = @_; my $url = next_argument(); $url =~ s/~/~/g; - "$url" . $_; + return "$url" . $_; } sub do_cmd_manpage{ @@ -204,7 +210,7 @@ sub do_cmd_manpage{ local($_) = @_; my $page = next_argument(); my $section = next_argument(); - "$page($section)" . $_; + return "$page($section)" . $_; } sub do_cmd_rfc{ @@ -214,7 +220,7 @@ sub do_cmd_rfc{ # Save the reference my $nstr = gen_index_id("RFC!RFC $rfcnumber", ''); $index{$nstr} .= make_half_href("$CURRENT_FILE#$br_id"); - "RFC $rfcnumber" .$_; + return "RFC $rfcnumber" .$_; } sub do_cmd_deprecated{ @@ -222,21 +228,21 @@ sub do_cmd_deprecated{ local($_) = @_; my $release = next_argument(); my $reason = next_argument(); - "Deprecated since release $release.\n$reason

" . $_; + return "Deprecated since release $release.\n$reason

" . $_; } sub do_cmd_versionadded{ # one parameter: \versionadded{version} local($_) = @_; my $release = next_argument(); - "New in version $release.

" . $_; + return "New in version $release.

" . $_; } sub do_cmd_versionchanged{ # one parameter: \versionchanged{version} local($_) = @_; my $release = next_argument(); - "Changed in version $release.

" . $_; + return "Changed in version $release.

" . $_; } # file and samp are at the end of this file since they screw up fontlock. @@ -247,13 +253,13 @@ $INDEX_SUBITEM = ""; sub get_indexsubitem{ #$INDEX_SUBITEM ? " $INDEX_SUBITEM" : ''; - ''; + return ''; } sub do_cmd_setindexsubitem{ local($_) = @_; $INDEX_SUBITEM = next_argument(); - $_; + return $_; } sub do_cmd_withsubitem{ @@ -264,13 +270,13 @@ sub do_cmd_withsubitem{ local($_) = @_; next_argument(); my $stuff = next_argument(); - $stuff . $_; + return $stuff . $_; } # This is the prologue macro which is required to start writing the # mod\jobname.idx file; we can just ignore it. # -sub do_cmd_makemodindex{ @_[0]; } +sub do_cmd_makemodindex{ return @_[0]; } # We're in the document subdirectory when this happens! # @@ -286,24 +292,24 @@ $IDXFILE_FIELD_SEP = "\1"; sub gen_target_name{ - "l2h-" . @_[0]; + return "l2h-" . @_[0]; } sub gen_target{ - ''; + return ''; } sub gen_link{ my($node,$target) = @_; print INTLABELS "\$internal_labels{\"$target\"} = \"$URL/$node\";\n"; - ""; + return ""; } sub make_index_entry{ my($br_id,$str) = @_; my($name,$aname,$ahref) = link_info($br_id); add_index_entry($str, $ahref); - "$aname$anchor_invisible_mark"; + return "$aname$anchor_invisible_mark"; } sub add_index_entry{ @@ -328,7 +334,7 @@ sub do_cmd_index{ # my($name,$aname,$ahref) = link_info($br_id); add_index_entry("$str", $ahref); - "$aname$anchor_invisible_mark" . $_; + return "$aname$anchor_invisible_mark" . $_; } sub do_cmd_kwindex{ @@ -338,7 +344,7 @@ sub do_cmd_kwindex{ my($name,$aname,$ahref) = link_info($br_id); add_index_entry("$str!keyword", $ahref); add_index_entry("keyword!$str", $ahref); - "$aname$anchor_invisible_mark" . $_; + return "$aname$anchor_invisible_mark" . $_; } sub do_cmd_indexii{ @@ -349,7 +355,7 @@ sub do_cmd_indexii{ my($name,$aname,$ahref) = link_info($br_id); add_index_entry("$str1!$str2", $ahref); add_index_entry("$str2!$str1", $ahref); - "$aname$anchor_invisible_mark" . $_; + return "$aname$anchor_invisible_mark" . $_; } sub do_cmd_indexiii{ @@ -362,7 +368,7 @@ sub do_cmd_indexiii{ add_index_entry("$str1!$str2 $str3", $ahref); add_index_entry("$str2!$str3, $str1", $ahref); add_index_entry("$str3!$str1 $str2", $ahref); - "$aname$anchor_invisible_mark" . $_; + return "$aname$anchor_invisible_mark" . $_; } sub do_cmd_indexiv{ @@ -377,14 +383,14 @@ sub do_cmd_indexiv{ add_index_entry("$str2!$str3 $str4, $str1", $ahref); add_index_entry("$str3!$str4, $str1 $str2", $ahref); add_index_entry("$str4!$$str1 $str2 $str3", $ahref); - "$aname$anchor_invisible_mark" . $_; + return "$aname$anchor_invisible_mark" . $_; } sub do_cmd_ttindex{ local($_) = @_; my($str,$br_id) = next_argument_id(); swallow_newline(); - make_index_entry($br_id, $str . get_indexsubitem()) . $_; + return make_index_entry($br_id, $str . get_indexsubitem()) . $_; } sub my_typed_index_helper{ @@ -395,19 +401,19 @@ sub my_typed_index_helper{ my($name,$aname,$ahref) = link_info($br_id1); add_index_entry("$str $word", $ahref); add_index_entry("$word!$str", $ahref); - "$aname$anchor_invisible_mark" . $_; + return "$aname$anchor_invisible_mark" . $_; } -sub do_cmd_stindex{ my_typed_index_helper('statement', @_); } -sub do_cmd_opindex{ my_typed_index_helper('operator', @_); } -sub do_cmd_exindex{ my_typed_index_helper('exception', @_); } -sub do_cmd_obindex{ my_typed_index_helper('object', @_); } +sub do_cmd_stindex{ return my_typed_index_helper('statement', @_); } +sub do_cmd_opindex{ return my_typed_index_helper('operator', @_); } +sub do_cmd_exindex{ return my_typed_index_helper('exception', @_); } +sub do_cmd_obindex{ return my_typed_index_helper('object', @_); } sub my_parword_index_helper{ local($word,$_) = @_; my($str,$br_id) = next_argument_id(); swallow_newline(); - make_index_entry($br_id, "$str ($word)") . $_; + return make_index_entry($br_id, "$str ($word)") . $_; } @@ -424,7 +430,7 @@ sub make_mod_index_entry{ my($nstr,$garbage) = split / /, $str, 2; $Modules{$nstr} .= $ahref; } - "$aname$anchor_invisible_mark"; + return "$aname$anchor_invisible_mark"; } $THIS_MODULE = ''; @@ -435,15 +441,15 @@ sub define_module{ my $section_tag = join('', @curr_sec_id); $word = "$word " if $word; $THIS_MODULE = "$name"; - make_mod_index_entry("SECTION$section_tag", - "$name (${word}module)", 'DEF'); + return make_mod_index_entry("SECTION$section_tag", + "$name (${word}module)", 'DEF'); } sub my_module_index_helper{ local($word, $_) = @_; my $name = next_argument(); swallow_newline(); - define_module($word, $name) . $_; + return define_module($word, $name) . $_; } sub ref_module_index_helper{ @@ -451,7 +457,8 @@ sub ref_module_index_helper{ my($str,$br_id) = next_argument(); swallow_newline(); $word = "$word " if $word; - make_mod_index_entry($br_id, "$str (${word}module)", 'REF') . $_; + return make_mod_index_entry($br_id, + "$str (${word}module)", 'REF') . $_; } sub do_cmd_bifuncindex{ @@ -459,21 +466,21 @@ sub do_cmd_bifuncindex{ my($str,$br_id) = next_argument(); swallow_newline(); my $fname = "$str()"; - make_index_entry($br_id, "$fname (built-in function)") . $_; + return make_index_entry($br_id, "$fname (built-in function)") . $_; } -sub do_cmd_modindex{ my_module_index_helper('', @_); } -sub do_cmd_bimodindex{ my_module_index_helper('built-in', @_); } -sub do_cmd_exmodindex{ my_module_index_helper('extension', @_); } -sub do_cmd_stmodindex{ my_module_index_helper('standard', @_); } +sub do_cmd_modindex{ return my_module_index_helper('', @_); } +sub do_cmd_bimodindex{ return my_module_index_helper('built-in', @_); } +sub do_cmd_exmodindex{ return my_module_index_helper('extension', @_); } +sub do_cmd_stmodindex{ return my_module_index_helper('standard', @_); } # these should be adjusted a bit.... -sub do_cmd_refmodindex{ ref_module_index_helper('', @_); } -sub do_cmd_refbimodindex{ ref_module_index_helper('built-in', @_); } -sub do_cmd_refexmodindex{ ref_module_index_helper('extension', @_); } -sub do_cmd_refstmodindex{ ref_module_index_helper('standard', @_); } +sub do_cmd_refmodindex{ return ref_module_index_helper('', @_); } +sub do_cmd_refbimodindex{ return ref_module_index_helper('built-in', @_); } +sub do_cmd_refexmodindex{ return ref_module_index_helper('extension', @_); } +sub do_cmd_refstmodindex{ return ref_module_index_helper('standard', @_); } -sub do_cmd_nodename{ do_cmd_label(@_); } +sub do_cmd_nodename{ return do_cmd_label(@_); } sub init_myformat{ # $anchor_invisible_mark = ''; @@ -489,7 +496,7 @@ sub make_str_index_entry{ my($br_id,$str) = @_; my($name,$aname,$ahref) = link_info($br_id); add_index_entry($str, $ahref); - "$aname$str"; + return "$aname$str"; } sub do_env_cfuncdesc{ @@ -501,10 +508,10 @@ sub do_env_cfuncdesc{ "$function_name()" . get_indexsubitem()); $idx =~ s/ \(.*\)//; $idx =~ s/\(\)//; # ???? - "

$return_type $idx" - . "($arg_list)\n
" - . $_ - . '
'; + return "
$return_type $idx" + . "($arg_list)\n
" + . $_ + . '
'; } sub do_env_ctypedesc{ @@ -513,9 +520,9 @@ sub do_env_ctypedesc{ my $idx = make_str_index_entry($br_id, "$type_name" . get_indexsubitem()); $idx =~ s/ \(.*\)//; - "
$idx\n
" - . $_ - . '
' + return "
$idx\n
" + . $_ + . '
' } sub do_env_cvardesc{ @@ -525,10 +532,10 @@ sub do_env_cvardesc{ my $idx = make_str_index_entry($br_id, "$var_name" . get_indexsubitem()); $idx =~ s/ \(.*\)//; - "
$var_type $idx\n" - . '
' - . $_ - . '
'; + return "
$var_type $idx\n" + . '
' + . $_ + . '
'; } sub do_env_funcdesc{ @@ -539,15 +546,16 @@ sub do_env_funcdesc{ . get_indexsubitem()); $idx =~ s/ \(.*\)//; $idx =~ s/\(\)//; - "
$idx ($arg_list)\n
" . $_ . '
'; + return "
$idx ($arg_list)\n
" . $_ . '
'; } sub do_env_funcdescni{ local($_) = @_; my $function_name = next_argument(); my $arg_list = next_argument(); - "
$function_name ($arg_list)\n
" - . $_ . '
'; + return "
$function_name ($arg_list)\n" + . "
" + . $_ . '
'; } sub do_cmd_funcline{ @@ -557,7 +565,7 @@ sub do_cmd_funcline{ my $idx = make_str_index_entry($br_id, "$function_name()" . get_indexsubitem()); $idx =~ s/\(\)//; - "
$idx ($arg_list)\n
" . $_; + return "
$idx ($arg_list)\n
" . $_; } # Change this flag to index the opcode entries. I don't think it's very @@ -583,7 +591,7 @@ sub do_env_opcodedesc{ if ($arg_list) { $stuff .= "    $arg_list"; } - $stuff . "\n
" . $_ . ''; + return $stuff . "\n
" . $_ . ''; } sub do_env_datadesc{ @@ -592,9 +600,9 @@ sub do_env_datadesc{ my $idx = make_str_index_entry($br_id, "$dataname" . get_indexsubitem()); $idx =~ s/ \(.*\)//; - "
$idx\n
" - . $_ - . '
'; + return "
$idx\n
" + . $_ + . '
'; } sub do_env_datadescni{ @@ -603,7 +611,7 @@ sub do_env_datadescni{ if (! $STRING_INDEX_TT) { $idx = "$idx"; } - "
$idx\n
" . $_ . '
'; + return "
$idx\n
" . $_ . '
'; } sub do_cmd_dataline{ @@ -612,17 +620,17 @@ sub do_cmd_dataline{ my $idx = make_str_index_entry($br_id, "$data_name" . get_indexsubitem()); $idx =~ s/ \(.*\)//; - "
$idx
" . $_; + return "
$idx
" . $_; } sub do_env_excdesc{ local($_) = @_; my($excname,$br_id) = next_argument_id(); my $idx = make_str_index_entry($br_id, "$excname"); - "
$idx\n
" . $_ . '
' + return "
$idx\n
" . $_ . '
' } -sub do_env_fulllineitems{ do_env_itemize(@_); } +sub do_env_fulllineitems{ return do_env_itemize(@_); } sub do_env_classdesc{ @@ -632,7 +640,7 @@ sub do_env_classdesc{ $idx = make_str_index_entry($br_id, "$THIS_CLASS (class in $THIS_MODULE)" ); $idx =~ s/ \(.*\)//; - "
$idx ($arg_list)\n
" . $_ . '
'; + return "
$idx ($arg_list)\n
" . $_ . '
'; } @@ -650,7 +658,7 @@ sub do_env_methoddesc{ my $idx = make_str_index_entry($br_id, "$method_name()$extra"); $idx =~ s/ \(.*\)//; $idx =~ s/\(\)//; - "
$idx ($arg_list)\n
" . $_ . '
'; + return "
$idx ($arg_list)\n
" . $_ . '
'; } @@ -659,7 +667,9 @@ sub do_env_methoddescni{ next_optional_argument(); my $method = next_argument(); my $arg_list = next_argument(); - "
$method ($arg_list)\n
" . $_ . '
'; + return "
$method ($arg_list)\n
" + . $_ + . '
'; } @@ -675,7 +685,7 @@ sub do_env_memberdesc{ my $idx = make_str_index_entry($br_id, "$member$extra"); $idx =~ s/ \(.*\)//; $idx =~ s/\(\)//; - "
$idx\n
" . $_ . '
'; + return "
$idx\n
" . $_ . '
'; } @@ -691,14 +701,14 @@ sub do_cmd_memberline{ my $idx = make_str_index_entry($br_id, "$member$extra"); $idx =~ s/ \(.*\)//; $idx =~ s/\(\)//; - "
$idx
" . $_; + return "
$idx
" . $_; } sub do_env_memberdescni{ local($_) = @_; next_optional_argument(); my $member = next_argument(); - "
$member\n
" . $_ . '
'; + return "
$member\n
" . $_ . '
'; } @@ -706,7 +716,7 @@ sub do_cmd_memberlineni{ local($_) = @_; next_optional_argument(); my $member = next_argument(); - "
$member
" . $_; + return "
$member
" . $_; } @col_aligns = ("", "", "", ""); @@ -728,7 +738,7 @@ sub setup_column_alignments{ : ($a3 eq 'r' ? '' : '')); $th4 = (($a4 eq 'l') ? '' : ($a4 eq 'r' ? '' : '')); - ($th1, $th2, $th3, $th4); + return ($th1, $th2, $th3, $th4); } sub do_env_tableii{ @@ -740,11 +750,11 @@ sub do_env_tableii{ $font = '' if ($font eq 'textrm'); $globals{'lineifont'} = $font; - '' - . "\n $th1$h1" - . "\n $th2$h2" - . $_ - . "\n
"; + return '' + . "\n $th1$h1" + . "\n $th2$h2" + . $_ + . "\n
"; } sub do_cmd_lineii{ @@ -757,9 +767,9 @@ sub do_cmd_lineii{ $efont = ""; } my($c1align,$c2align) = @col_aligns[0,1]; - "$c1align$sfont$c1$efont\n" - . " $c2align$c2" - . $_; + return "$c1align$sfont$c1$efont\n" + . " $c2align$c2" + . $_; } sub do_env_tableiii{ @@ -772,12 +782,12 @@ sub do_env_tableiii{ $font = '' if ($font eq 'textrm'); $globals{'lineifont'} = $font; - '' - . "\n $th1$h1" - . "\n $th2$h2" - . "\n $th3$h3" - . $_ - . "\n
"; + return '' + . "\n $th1$h1" + . "\n $th2$h2" + . "\n $th3$h3" + . $_ + . "\n
"; } sub do_cmd_lineiii{ @@ -791,10 +801,10 @@ sub do_cmd_lineiii{ $efont = ""; } my($c1align,$c2align,$c3align) = @col_aligns[0,1,2]; - "$c1align$sfont$c1$efont\n" - . " $c2align$c2\n" - . " $c3align$c3" - . $_; + return "$c1align$sfont$c1$efont\n" + . " $c2align$c2\n" + . " $c3align$c3" + . $_; } sub do_env_tableiv{ @@ -808,13 +818,13 @@ sub do_env_tableiv{ $font = '' if ($font eq 'textrm'); $globals{'lineifont'} = $font; - '' - . "\n $th1$h1" - . "\n $th2$h2" - . "\n $th3$h3" - . "\n $th4$h4" - . $_ - . "\n
"; + return '' + . "\n $th1$h1" + . "\n $th2$h2" + . "\n $th3$h3" + . "\n $th4$h4" + . $_ + . "\n
"; } sub do_cmd_lineiv{ @@ -829,11 +839,11 @@ sub do_cmd_lineiv{ $efont = ""; } my($c1align,$c2align,$c3align,$c4align) = @col_aligns; - "$c1align$sfont$c1$efont\n" - . " $c2align$c2\n" - . " $c3align$c3\n" - . " $c4align$c4" - . $_; + return "$c1align$sfont$c1$efont\n" + . " $c2align$c2\n" + . " $c3align$c3\n" + . " $c4align$c4" + . $_; } sub do_cmd_maketitle { @@ -871,7 +881,7 @@ sub do_cmd_maketitle { if ($t_email) { $the_title .= "\n

$t_email

"; }# else { $the_title .= "

" } - $the_title . $_ ; + return $the_title . $_ ; } @@ -904,6 +914,20 @@ sub get_synopsis_table($){ return $st; } +sub do_cmd_moduleauthor{ + local($_) = @_; + next_argument(); + next_argument(); + return $_; +} + +sub do_cmd_sectionauthor{ + local($_) = @_; + next_argument(); + next_argument(); + return $_; +} + sub do_cmd_declaremodule{ local($_) = @_; my $key = next_optional_argument(); @@ -915,7 +939,7 @@ sub do_cmd_declaremodule{ $type = 'built-in' if $type eq 'builtin'; $st->declare($name, $key, $type); define_module($type, $name); - anchor_label("module-$key",$CURRENT_FILE,$_) + return anchor_label("module-$key",$CURRENT_FILE,$_) } sub do_cmd_modulesynopsis{ @@ -923,13 +947,13 @@ sub do_cmd_modulesynopsis{ my $st = get_synopsis_table(get_chapter_id()); $st->set_synopsis($THIS_MODULE, next_argument()); swallow_newline(); - $_; + return $_; } sub do_cmd_localmoduletable{ local($_) = @_; my $chap = get_chapter_id(); - "<$chap>\\tableofchildlinks[off]" . $_; + return "<$chap>\\tableofchildlinks[off]" . $_; } sub process_all_localmoduletables{ @@ -948,7 +972,7 @@ sub process_all_localmoduletables{ # sub do_env_seealso{ - "

See Also:

\n" . @_[0]; + return "

See Also:

\n" . @_[0]; } sub do_cmd_seemodule{ @@ -960,13 +984,13 @@ sub do_cmd_seemodule{ my $text = next_argument(); $key = $module unless $key; - "

Module $module" - . "   ($text)

" - . $_; + return "

Module $module" + . "   ($text)

" + . $_; } sub do_cmd_seetext{ - '

' . @_[0]; + return '

' . @_[0]; } @@ -977,7 +1001,7 @@ sub do_cmd_seetext{ sub do_env_definitions{ local($_) = @_; swallow_newline(); - "

$_
\n"; + return "
$_
\n"; } sub do_cmd_term{ @@ -986,7 +1010,7 @@ sub do_cmd_term{ my($name,$aname,$ahref) = link_info($id); swallow_newline(); # could easily add an index entry here... - "
$aname" . $term . "\n
" . $_; + return "
$aname" . $term . "\n
" . $_; } -- cgit v0.12