From df454911a26f7838690ea149b3b434993062a731 Mon Sep 17 00:00:00 2001
From: "Andrey A. Chernov"
'; # Start tags for picture title
-@@ -491,8 +530,7 @@
+@@ -491,8 +532,7 @@
$opt_frames = 1; # Use frames
$opt_framemarginwidth = 1; # Pixels allocated to frame margin in horizontal direction
$opt_framemarginheight = 1; # Pixels allocated to frame margin in vertical direction
@@ -168,7 +177,7 @@ diff -u -r1.117 -r1.172
$opt_framestyle = 1; # Frame style to use (out of those available)
#
-@@ -539,6 +577,7 @@
+@@ -539,6 +579,7 @@
$opt_icons{'next_gray'} = 'gray_next.gif'; # Next (grayed out)
$opt_icons{'up'} = 'blue_up.gif'; # Up
$opt_icons{'help'} = 'blue_readme.gif'; # Help Readme File
@@ -176,7 +185,7 @@ diff -u -r1.117 -r1.172
# $opt_icons{'help'} = 'blue_help.gif'; # Help Alternative (Question)
# $opt_icons{'dir'} = 'blue_dir.gif'; # Directory List Icon (See below)
# $opt_icons{'ball'} = 'blue_ball.gif'; # A ball matching other icons
-@@ -596,12 +635,11 @@
+@@ -596,12 +637,11 @@
# | | |
# -------------
$opt_framefmt{1}=
@@ -193,7 +202,7 @@ diff -u -r1.117 -r1.172
$opt_framefmt_frames{1}=2; # Number of frames expressed by this frame format
# Three frame screen with directories listed in top-left frame,
-@@ -616,16 +654,15 @@
+@@ -616,16 +656,15 @@
# | | |
# -------------
$opt_framefmt{2}=
@@ -216,7 +225,7 @@ diff -u -r1.117 -r1.172
$opt_framefmt_frames{2}=3; # Number of frames expressed by this frame format
# Three frame screen with directories listed in left frame,
-@@ -640,16 +677,15 @@
+@@ -640,16 +679,15 @@
# | | |
# -------------
$opt_framefmt{3}=
@@ -239,7 +248,7 @@ diff -u -r1.117 -r1.172
$opt_framefmt_frames{3}=3; # Number of frames expressed by this frame format
# Three frame screen with directories listed in lower-left frame,
-@@ -664,16 +700,15 @@
+@@ -664,16 +702,15 @@
# | | |
# -------------
$opt_framefmt{4}=
@@ -262,7 +271,7 @@ diff -u -r1.117 -r1.172
$opt_framefmt_frames{4}=3; # Number of frames expressed by this frame format
#
-@@ -756,7 +791,9 @@
+@@ -756,7 +793,9 @@
use Getopt::Long;
if ( ! GetOptions(
'address=s' => \$opt_address,
@@ -272,7 +281,7 @@ diff -u -r1.117 -r1.172
'cache!' => \$opt_cache,
'cachedir=s' => \$opt_cachedir,
'cacheformat=s' => \$opt_cacheformat,
-@@ -790,19 +827,22 @@
+@@ -790,19 +829,22 @@
'forcehtml!' => \$opt_forcehtml,
'forcejpeg!' => \$opt_forcejpeg,
'forcemontage!' => \$opt_forcemontage,
@@ -297,7 +306,7 @@ diff -u -r1.117 -r1.172
'imgindexname=s' => \$opt_imgindexname,
'indexname=s' => \$opt_indexname,
'javascript!' => \$opt_javascript,
-@@ -828,14 +868,21 @@
+@@ -828,15 +870,23 @@
'msg_up=s' => \$opt_msg_up,
'pageindexname=s' => \$opt_pageindexname,
'pichtml!' => \$opt_pichtml,
@@ -317,9 +326,11 @@ diff -u -r1.117 -r1.172
'pichtmltop=s' => \$opt_pichtmltop,
+ 'edgelinksindex!' => \$opt_edgelinksindex,
'prefixpath=s' => \$opt_prefixpath,
++ 'prepend=s' => \$opt_prepend,
'readme=s' => \$opt_readme,
'readmevisible!' => \$opt_readmevisible,
-@@ -846,6 +893,12 @@
+ 'recurse!' => \$opt_recurse,
+@@ -846,6 +896,12 @@
'srcdir=s' => \$opt_srcdir,
'stylesheet=s' => \$opt_stylesheet,
'tables!' => \$opt_tables,
@@ -332,7 +343,7 @@ diff -u -r1.117 -r1.172
'thumbtexture=s' => \$opt_thumbtexture,
'thumbbackground=s' => \$opt_thumbbackground,
'thumbborderwidth=i' => \$opt_thumbborderwidth,
-@@ -1153,12 +1206,12 @@
+@@ -1153,12 +1209,12 @@
'|(\.eps2$)|(\.epsf$)|(\.epsi$)|(\.ept$)|(\.fax$)|(\.fig$)' .
'|(\.fits$)|(\.fpx$)|(\.g3$)|(\.gif$)|(\.gplt$)|(\.hdf$)' .
'|(\.hpgl$)|(\.ico$)|(\.im1$)|(\.im24$)|(\.im8$)|(\.jbg$)' .
@@ -348,7 +359,7 @@ diff -u -r1.117 -r1.172
'|(\.ttf$)|(\.vicar$)|(\.viff$)|(\.wmf$)|(\.xbm$)|(\.xpm$)' .
'|(\.xwd$)';
-@@ -1187,7 +1240,6 @@
+@@ -1187,7 +1243,6 @@
evaluateRcFiles();
@@ -356,7 +367,7 @@ diff -u -r1.117 -r1.172
# Decide if we want to process this directory or not based on the
# value of $opt_ignore. If not, then just return.
-@@ -1329,7 +1381,6 @@
+@@ -1329,7 +1384,6 @@
$pageStatusTime=fmtime($fileNames{'pageStatus'});
}
@@ -364,7 +375,7 @@ diff -u -r1.117 -r1.172
# Handle a directory name to title index file. Store alternative
# names in %dirTitles.
{
-@@ -1346,34 +1397,50 @@
+@@ -1346,34 +1400,50 @@
$tmp_dirTitles{$dirname} = escapehtml($dirtitle);
$dirOrder{$dirname} = $pos;
$pos++;
@@ -422,7 +433,7 @@ diff -u -r1.117 -r1.172
$imageOrder{$imgname} = $pos;
$pos++;
}
-@@ -1383,11 +1450,25 @@
+@@ -1383,11 +1453,25 @@
#
# This code is totally BOGUS since decision should be made on a per-page basis!!
#
@@ -449,7 +460,7 @@ diff -u -r1.117 -r1.172
}
}
-@@ -1396,6 +1477,7 @@
+@@ -1396,6 +1480,7 @@
#
{
my %tmp_iconImageUrls;
@@ -457,7 +468,7 @@ diff -u -r1.117 -r1.172
print( "Icon URLs:\n" ) if $opt_debug;
my $icon;
for $icon ( keys %opt_icons ) {
-@@ -1405,11 +1487,14 @@
+@@ -1405,11 +1490,14 @@
if $opt_debug;
}
}
@@ -473,7 +484,7 @@ diff -u -r1.117 -r1.172
}
}
-@@ -1431,6 +1516,7 @@
+@@ -1431,6 +1519,7 @@
# Build list of image files
#
@allImageFiles = sort( sortImages grep( /$includeRegex/io, @allFiles));
@@ -481,7 +492,7 @@ diff -u -r1.117 -r1.172
# Find subdirectory names (if any) ignoring hidden directories and
# directories without index files. Directories should have index
-@@ -1446,10 +1532,9 @@
+@@ -1446,10 +1535,9 @@
if ($opt_frames) {
grep($tarray{$_}++, @allImageFiles);
foreach $_ ( grep(! $tarray{$_},@allFiles) ) {
@@ -494,7 +505,7 @@ diff -u -r1.117 -r1.172
push(@dirfiles, $_); # then add it to the list
if ($opt_javascript) {
# Check which index file to use for JavaScript
-@@ -1461,6 +1546,7 @@
+@@ -1461,6 +1549,7 @@
$dirJsLink{"$_"} = '';
}
}
@@ -502,7 +513,7 @@ diff -u -r1.117 -r1.172
}
}
}
-@@ -1510,9 +1596,7 @@
+@@ -1510,9 +1599,7 @@
if( $numimages > 0 ) {
$haveImages = 1;
}
@@ -513,7 +524,7 @@ diff -u -r1.117 -r1.172
#
# Determine page title
#
-@@ -1520,10 +1604,18 @@
+@@ -1520,10 +1607,18 @@
$pageTitle = $opt_title;
} else {
my $dirname=basename($sourceDirectory);
@@ -534,7 +545,7 @@ diff -u -r1.117 -r1.172
#
# Put the PerlMagick Montage options together
#
-@@ -1576,7 +1668,7 @@
+@@ -1576,7 +1671,7 @@
$tmp_montageParameters .= "mattecolor=>\'$opt_thumbframecolor\',\n "
if $opt_thumbframecolor ne 'false';
$tmp_montageParameters .= "label=>\'$opt_thumblabel\',\n "
@@ -543,7 +554,7 @@ diff -u -r1.117 -r1.172
$tmp_montageParameters .= "labelwidth=>\'$opt_thumblabelwidth\',\n ";
$tmp_montageParameters .= "\Lzoomfilter=>\'$opt_zoomfilter\'";
if( !defined($montageParameters) || ($tmp_montageParameters ne $montageParameters)) {
-@@ -1595,8 +1687,10 @@
+@@ -1595,8 +1690,10 @@
'address' => $opt_address,
'anonymous' => $opt_anonymous,
'backgroundimg' => $opt_icons{'background'},
@@ -554,7 +565,7 @@ diff -u -r1.117 -r1.172
'coloralink' => $opt_coloralink,
'colorback' => $opt_colorback,
'colorfore' => $opt_colorfore,
-@@ -1615,18 +1709,21 @@
+@@ -1615,18 +1712,21 @@
'dirhtmlext' => !$opt_frames ? "" : $opt_dirhtmlext,
'dirindexname' => !$opt_frames ? "" : $opt_dirindexname,
'footer' => $opt_footer,
@@ -578,7 +589,7 @@ diff -u -r1.117 -r1.172
'indexname' => $opt_indexname,
'javascript' => $opt_javascript,
'jsdirindex' => !$opt_javascript ? "" : $fileNames{'jsDirIndex'},
-@@ -1647,8 +1744,8 @@
+@@ -1647,8 +1747,8 @@
'msg_directory_navigator' => !$opt_frames ? "" : $opt_msg_directory_navigator,
'msg_images' => !$opt_frames ? "" : $opt_msg_images,
'msg_index_of_directory' => $opt_msg_index_of_directory,
@@ -589,7 +600,7 @@ diff -u -r1.117 -r1.172
'msg_next' => $opt_msg_next,
'msg_pause' => $opt_msg_pause,
'msg_page_navigator' => !$opt_frames ? "" : $opt_msg_page_navigator,
-@@ -1659,14 +1756,21 @@
+@@ -1659,15 +1759,23 @@
'numpages' => $numPages,
'pageindexname' => $opt_pageindexname,
'pichtml' => $opt_pichtml,
@@ -609,9 +620,11 @@ diff -u -r1.117 -r1.172
'pichtmltop' => !$opt_pichtml ? "" : $opt_pichtmltop,
+ 'edgelinksindex' => $opt_edgelinksindex,
'prefixpath' => $opt_prefixpath,
++ 'prepend' => $opt_prepend,
'readme' => !$haveReadme ? "" : $opt_readme,
'readmepresent' => $haveReadme,
-@@ -1676,6 +1780,12 @@
+ 'readmevisible' => !$haveReadme ? 0 : $opt_readmevisible,
+@@ -1676,6 +1784,12 @@
'stylesheet' => $opt_stylesheet,
'subdirectories' => !$opt_frames ? "" : join(' ',@dirNames),
'tables' => $opt_tables,
@@ -624,7 +637,7 @@ diff -u -r1.117 -r1.172
'title' => $pageTitle,
'version' => $opt_anonymous ? "" : $webmagickInfo{'version'},
);
-@@ -1749,7 +1859,7 @@
+@@ -1749,7 +1863,7 @@
if ( $perlVarsVersion < $requiredPerlVarsVersion) {
print ( STDERR "Need to do montage, HTML and cache because",
" version has changed\n") if $opt_debug;
@@ -633,7 +646,7 @@ diff -u -r1.117 -r1.172
$opt_forcemontage = 1;
$opt_forcecache = 1;
$opt_forcelowres = 1;
-@@ -1763,7 +1873,7 @@
+@@ -1763,7 +1877,7 @@
if( ! $opt_tables && (! -f $fileNames{'pageStatus'} ||
( ! -f $fileNames{'montageGIF'} && ! -f $fileNames{'montageJPEG'} ))) {
# If key file is missing then do montage
@@ -642,7 +655,7 @@ diff -u -r1.117 -r1.172
" file is missing\n")
if $opt_debug;
++$doMontage;
-@@ -1975,9 +2085,10 @@
+@@ -1975,9 +2089,10 @@
# get indexname of parent directory
my $upindexname =
get_rc_var('..', 'opt_indexname', "$opt_indexname");
@@ -655,7 +668,7 @@ diff -u -r1.117 -r1.172
" ${opt_msg_up}
\n";
}
-@@ -1987,7 +2098,7 @@
+@@ -1987,7 +2102,7 @@
my $helphtml = '';
if( $haveReadme ) {
$helphtml .= "${opt_msg_readme}
\n";
}
-@@ -1997,7 +2108,7 @@
+@@ -1997,7 +2112,7 @@
my $nexthtml = '';
if( $haveReadme && $haveImages && $opt_framefmt_frames{$opt_framestyle}<=2 ) {
$nexthtml .= "${opt_msg_images}
";
}
-@@ -2023,20 +2134,19 @@
+@@ -2023,20 +2138,19 @@
} else {
$dirtitle=$subdir;
}
@@ -697,11 +710,14 @@ diff -u -r1.117 -r1.172
}
}
}
-@@ -2128,25 +2238,26 @@
+@@ -2128,25 +2242,29 @@
#
open( INDEX, ">${opt_indexname}")
|| die("$0: Failed to open file ${opt_indexname} for output\n$@\n");
- print( INDEX "\n