[Python-checkins] python/dist/src/Doc/perl python.perl,1.123,1.124

fdrake@sourceforge.net fdrake@sourceforge.net
Mon, 15 Apr 2002 13:48:42 -0700


Update of /cvsroot/python/python/dist/src/Doc/perl
In directory usw-pr-cvs1:/tmp/cvs-serv15159/perl

Modified Files:
	python.perl 
Log Message:
Separate out a \cfuncline macro from the cfuncdesc environment.
This matches many other of the *desc environments, and is useful when
multiple functions share a description.


Index: python.perl
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v
retrieving revision 1.123
retrieving revision 1.124
diff -C2 -d -r1.123 -r1.124
*** python.perl	15 Apr 2002 19:35:29 -0000	1.123
--- python.perl	15 Apr 2002 20:48:39 -0000	1.124
***************
*** 908,921 ****
  $TLEND   = '</span>';
  
! sub do_env_cfuncdesc{
!     local($_) = @_;
!     my $return_type = next_argument();
!     my $function_name = next_argument();
!     my $arg_list = next_argument();
      my $idx = make_str_index_entry(
!         "<tt class=\"cfunction\">$function_name()</tt>" . get_indexsubitem());
      $idx =~ s/ \(.*\)//;
      $idx =~ s/\(\)//;		# ???? - why both of these?
!     my $result_rc = get_refcount($function_name, '');
      my $rcinfo = '';
      if ($result_rc eq '+1') {
--- 908,934 ----
  $TLEND   = '</span>';
  
! sub cfuncline_helper{
!     my ($type, $name, $args) = @_;
      my $idx = make_str_index_entry(
!         "<tt class=\"cfunction\">$name()</tt>" . get_indexsubitem());
      $idx =~ s/ \(.*\)//;
      $idx =~ s/\(\)//;		# ???? - why both of these?
!     return "$type <b>$idx</b>(<var>$args</var>)";
! }
! sub do_cmd_cfuncline{
!     local($_) = @_;
!     my $type = next_argument();
!     my $name = next_argument();
!     my $args = next_argument();
!     my $siginfo = cfuncline_helper($type, $name, $args);
!     return "<dt>$siginfo\n<dd>" . $_;
! }
! sub do_env_cfuncdesc{
!     local($_) = @_;
!     my $type = next_argument();
!     my $name = next_argument();
!     my $args = next_argument();
!     my $siginfo = cfuncline_helper($type, $name, $args);
!     my $result_rc = get_refcount($name, '');
      my $rcinfo = '';
      if ($result_rc eq '+1') {
***************
*** 934,938 ****
                     . "\n</div>");
      }
!     return "<dl><dt>$return_type <b>$idx</b>(<var>$arg_list</var>)\n<dd>"
             . $rcinfo
             . $_
--- 947,951 ----
                     . "\n</div>");
      }
!     return "<dl><dt>$siginfo\n<dd>"
             . $rcinfo
             . $_