mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	Use the location of the initialization file to augment the style-specific
.perl file search path, rather than making assumptions about the current directory.
This commit is contained in:
		
							parent
							
								
									eff1f7622a
								
							
						
					
					
						commit
						db34a1e2d8
					
				
					 1 changed files with 23 additions and 5 deletions
				
			
		| 
						 | 
					@ -16,12 +16,30 @@ $ICONSERVER = '../icons';
 | 
				
			||||||
$CHILDLINE = "\n<p><hr>\n";
 | 
					$CHILDLINE = "\n<p><hr>\n";
 | 
				
			||||||
$VERBOSITY = 0;
 | 
					$VERBOSITY = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# a little painful, but lets us clean up the top level directory just a little
 | 
					# Locate a file that's been "require"d.  Assumes that the file name of interest
 | 
				
			||||||
$mywd = `pwd`;
 | 
					# is unique within the set of loaded files, after directory names have been
 | 
				
			||||||
chop $mywd;
 | 
					# stripped.  Only the directory is returned.
 | 
				
			||||||
$LATEX2HTMLSTYLES = "$mywd${dd}perl$envkey$LATEX2HTMLSTYLES";
 | 
					#
 | 
				
			||||||
 | 
					sub find_my_file{
 | 
				
			||||||
 | 
					    local($myfile,$key,$tmp,$mydir) = (@_[0], '', '', '');
 | 
				
			||||||
 | 
					    foreach $key (keys %INC) {
 | 
				
			||||||
 | 
						$tmp = "$key";
 | 
				
			||||||
 | 
						$tmp =~ s|^.*/||o;
 | 
				
			||||||
 | 
						if ($tmp eq $myfile) {
 | 
				
			||||||
 | 
						    #print "\nfound $tmp: $key --> ", $INC{$key}, "\n";
 | 
				
			||||||
 | 
						    $mydir = $INC{$key};
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    $mydir =~ s|/[^/]*$||;
 | 
				
			||||||
 | 
					    $mydir;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#print "\n\$LATEX2HTMLSTYLES = $LATEX2HTMLSTYLES\n\n";
 | 
					# A little painful, but lets us clean up the top level directory a little,
 | 
				
			||||||
 | 
					# and not be tied to the current directory (as far as I can tell).
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					$mydir = &find_my_file("l2hinit.perl");
 | 
				
			||||||
 | 
					#print "\nmy dir = $mydir\n";
 | 
				
			||||||
 | 
					$LATEX2HTMLSTYLES = "$mydir$envkey$LATEX2HTMLSTYLES";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sub top_navigation_panel {
 | 
					sub top_navigation_panel {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue