comparison extra/soundsoftware/matlab-docs.pl @ 388:dad587ecb8d0 feature_113

Use mixed-case version (not lower-case function name key) for link target
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Wed, 06 Apr 2011 17:49:54 +0100
parents f89765996ef9
children 0bc92382a86b
comparison
equal deleted inserted replaced
387:f89765996ef9 388:dad587ecb8d0
73 # 73 #
74 # 29.03.2011 (Chris Cannam) add frames option. 74 # 29.03.2011 (Chris Cannam) add frames option.
75 75
76 $VERSION = '1.23'; 76 $VERSION = '1.23';
77 ($PROGRAM = $0) =~ s@.*/@@; $PROGRAM = "\U$PROGRAM\E"; 77 ($PROGRAM = $0) =~ s@.*/@@; $PROGRAM = "\U$PROGRAM\E";
78 $debug = 0; 78 $debug = 2;
79 79
80 #------------------------------------------------------------------------ 80 #------------------------------------------------------------------------
81 # Define platform specific things 81 # Define platform specific things
82 #------------------------------------------------------------------------ 82 #------------------------------------------------------------------------
83 # suffix for files to search is defined twice 83 # suffix for files to search is defined twice
370 # $filename = $name; 370 # $filename = $name;
371 371
372 # Contents file in unix must start with a capital letter (Contents.m) 372 # Contents file in unix must start with a capital letter (Contents.m)
373 # ensure, that m-file name is lower case, except the contents file 373 # ensure, that m-file name is lower case, except the contents file
374 if (! ($filewosuffix =~ /^contents$/i)) { 374 if (! ($filewosuffix =~ /^contents$/i)) {
375 # if ($var{'links2filescase'} eq 'low') { $filewosuffix = "\L$filewosuffix\E"; } 375 # if ($var{'links2filescase'} eq 'low') { $filewosuffix = "\L$filewosuffix\E"; }
376 $filewosuffixlow = "\L$filewosuffix\E"; 376 $filewosuffixlow = "\L$filewosuffix\E";
377 } 377 }
378 else { $contentsname{$dirname} = $filewosuffix; } 378 else { $contentsname{$dirname} = $filewosuffix; }
379 379
380 # internal handle name is always lower case 380 # internal handle name is always lower case
1142 local($refstr1, $refstr2, $reffound); 1142 local($refstr1, $refstr2, $reffound);
1143 1143
1144 # Look for something matching in the line 1144 # Look for something matching in the line
1145 if ( /(\W+)($funname)(\W+)/i ) { 1145 if ( /(\W+)($funname)(\W+)/i ) {
1146 $reffound = $2; 1146 $reffound = $2;
1147 $refstr1 = "<a class=\"mfun\" href=\"$hfileindexpath{$name}$hfilerelpath{$funname}$funname$var{'exthtml'}\">"; 1147 $refstr1 = "<a class=\"mfun\" href=\"$hfileindexpath{$name}$hfilerelpath{$funname}$mfilename{$funname}$var{'exthtml'}\">";
1148 $refstr2 = "<\/a>"; 1148 $refstr2 = "<\/a>";
1149 # Do links only for exact case match 1149 # Do links only for exact case match
1150 if ( ($var{'links2filescase'} eq 'exact') || ($var{'links2filescase'} eq 'exactvery') ) { 1150 if ( ($var{'links2filescase'} eq 'exact') || ($var{'links2filescase'} eq 'exactvery') ) {
1151 if ( /(\W+)($funname)(\W+)/g ) { 1151 if ( /(\W+)($funname)(\W+)/g ) {
1152 s/(\W+)($funname)(\W+)/$1$refstr1$funname$refstr2$3/g; 1152 s/(\W+)($funname)(\W+)/$1$refstr1$funname$refstr2$3/g;