diff options
author | ache <ache@FreeBSD.org> | 2012-04-07 14:11:06 +0800 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2012-04-07 14:11:06 +0800 |
commit | 60ba255c7f5a9fcaf451d0c0b9be4f03b818eae8 (patch) | |
tree | b316d1f5f71450945e02e25f16d5a921ff74b268 /www | |
parent | 82f2d0b540af83f363e79b3aa86eff40e0bdab0d (diff) | |
download | freebsd-ports-gnome-60ba255c7f5a9fcaf451d0c0b9be4f03b818eae8.tar.gz freebsd-ports-gnome-60ba255c7f5a9fcaf451d0c0b9be4f03b818eae8.tar.zst freebsd-ports-gnome-60ba255c7f5a9fcaf451d0c0b9be4f03b818eae8.zip |
1) Remove patches reflecting the project CVS and update to equivalent
just released 2.03pre4 beta.
2) Use autotools.
3) Add LICENSE.
Feature safe: yes
Diffstat (limited to 'www')
-rw-r--r-- | www/WebMagick/Makefile | 12 | ||||
-rw-r--r-- | www/WebMagick/distinfo | 4 | ||||
-rw-r--r-- | www/WebMagick/files/patch-Makefile.am | 11 | ||||
-rw-r--r-- | www/WebMagick/files/patch-Makefile.in | 11 | ||||
-rw-r--r-- | www/WebMagick/files/patch-aa | 2306 | ||||
-rw-r--r-- | www/WebMagick/files/patch-ab | 94 | ||||
-rw-r--r-- | www/WebMagick/files/patch-ac | 32 | ||||
-rw-r--r-- | www/WebMagick/files/patch-ad | 135 | ||||
-rw-r--r-- | www/WebMagick/files/patch-configure.in | 11 |
9 files changed, 31 insertions, 2585 deletions
diff --git a/www/WebMagick/Makefile b/www/WebMagick/Makefile index 10036b7cd54c..c65dcab1d0e1 100644 --- a/www/WebMagick/Makefile +++ b/www/WebMagick/Makefile @@ -6,20 +6,22 @@ # PORTNAME= WebMagick -PORTVERSION= 2.03p3 -PORTREVISION= 53 +PORTVERSION= 2.03p4 PORTEPOCH= 1 CATEGORIES= www graphics -MASTER_SITES= SF/${PORTNAME:L}/${PORTNAME:L}-beta/2.03pre3 -DISTNAME= ${PORTNAME}-2.03pre3 +MASTER_SITES= SF/${PORTNAME:L}/${PORTNAME:L}-beta/2.03pre4 +DISTNAME= ${PORTNAME}-2.03pre4 MAINTAINER= ports@FreeBSD.org COMMENT= Image Web Generator - recursively build HTMLs, imagemaps, thumbnails +LICENSE= GPLv2 + LIB_DEPENDS= MagickWand.5:${PORTSDIR}/graphics/ImageMagick USE_PERL5= yes -GNU_CONFIGURE= yes +USE_AUTOTOOLS= autoconf aclocal automake +AUTOMAKE_ARGS+= --add-missing INFO= webmagick CONFIGURE_ENV= webmagick_cv_rootpath=${PREFIX}/www/data \ webmagick_cv_iconpath=webmagick \ diff --git a/www/WebMagick/distinfo b/www/WebMagick/distinfo index 22061a29d02a..b178b2a43274 100644 --- a/www/WebMagick/distinfo +++ b/www/WebMagick/distinfo @@ -1,2 +1,2 @@ -SHA256 (WebMagick-2.03pre3.tar.gz) = 707b397be1f167a07ff538be7bd10125986a9be848058131326cf8819d3dc474 -SIZE (WebMagick-2.03pre3.tar.gz) = 508672 +SHA256 (WebMagick-2.03pre4.tar.gz) = a3ec0273ceb78a4fa9369442ef726e390d75e7ff1ad91270e0eff9bf79b85435 +SIZE (WebMagick-2.03pre4.tar.gz) = 556394 diff --git a/www/WebMagick/files/patch-Makefile.am b/www/WebMagick/files/patch-Makefile.am new file mode 100644 index 000000000000..e1425300e082 --- /dev/null +++ b/www/WebMagick/files/patch-Makefile.am @@ -0,0 +1,11 @@ +--- Makefile.am.bak 2002-10-23 03:54:54.000000000 +0400 ++++ Makefile.am 2012-04-07 10:05:09.000000000 +0400 +@@ -24,7 +24,7 @@ + $(INSTALL_SCRIPT) $$file $(ICON_INSTALL_DIR) ; \ + done + $(mkinstalldirs) $(ETC_INSTALL_DIR) +- $(INSTALL_DATA) webmagickrc $(ETC_INSTALL_DIR)/webmagickrc ++# $(INSTALL_DATA) webmagickrc $(ETC_INSTALL_DIR)/webmagickrc + + # Additional files to distribute + EXTRA_DIST = INSTALL.generic MANIFEST TODO webmagick.in \ diff --git a/www/WebMagick/files/patch-Makefile.in b/www/WebMagick/files/patch-Makefile.in deleted file mode 100644 index 5e2754944df1..000000000000 --- a/www/WebMagick/files/patch-Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.in.bak 2002-10-23 20:20:54.000000000 +0400 -+++ Makefile.in 2012-04-05 11:53:19.000000000 +0400 -@@ -375,7 +375,7 @@ - $(INSTALL_SCRIPT) $$file $(ICON_INSTALL_DIR) ; \ - done - $(mkinstalldirs) $(ETC_INSTALL_DIR) -- $(INSTALL_DATA) webmagickrc $(ETC_INSTALL_DIR)/webmagickrc -+# $(INSTALL_DATA) webmagickrc $(ETC_INSTALL_DIR)/webmagickrc - - # Generate webmagick.lsm from webmagick.lsm.in at dist time. - webmagick.lsm : webmagick.lsm.in configure.in diff --git a/www/WebMagick/files/patch-aa b/www/WebMagick/files/patch-aa deleted file mode 100644 index 8d81204ad166..000000000000 --- a/www/WebMagick/files/patch-aa +++ /dev/null @@ -1,2306 +0,0 @@ -Index: webmagick.in -=================================================================== -RCS file: /cvsroot/webmagick/WebMagick/webmagick.in,v -retrieving revision 1.117 -retrieving revision 1.186 -diff -u -r1.117 -r1.186 ---- webmagick.in 23 Oct 2002 16:14:47 -0000 1.117 -+++ webmagick.in 5 Apr 2012 10:13:53 -0000 1.186 -@@ -1,6 +1,6 @@ - #! @PERL@ - # --# $Id: webmagick.in,v 1.117 2002/10/23 16:14:47 clindell Exp $ -+# $Id: webmagick.in,v 1.186 2012/04/05 10:13:53 ache Exp $ - # - # You are looking at the main PERL script for WebMagick, a package to - # intelligently create HTML and JavaScript index files and imagemaps -@@ -78,6 +78,7 @@ - @allFiles, # List of files in current directory - @allImageFiles, # List of all source file names in directory - @cacheFiles, # List of files in the image cache -+ $cacheParams, # String form of cache parameters - @lowresFiles, # List of files in the image lowres cache - $currentDirectory, # Current directory (absolute) - $doMontage, # Set to true if montage must be generated -@@ -90,6 +91,7 @@ - $haveImages, # Set to true if there are images in directory - $haveReadme, # Set to true if there is a README file in directory - %htmlOpts, # Options that effect HTML output -+ %cacheOpts, # Options that effect cache - $htmlParams, # String form of HTML parameters - %iconImageSizes, # Size of icons - %iconImageUrls, # URLs for icons -@@ -99,7 +101,8 @@ - @imageThumbCoords, # Thumbnail imagemap coordinates - $imageFrameLink, # URL to use as source for image frame - %imageLabels, # Labels to use for images (if specified) -- %tableImageLabels, # labels to use in tables -+ %imageCaptions, # Captions for perimage HTML -+ %tableImageLabels, # labels to use in tables - %imageOrder, # Order that images occur in imgindex file - $inChild, # Set to true if this process is a child - $currentDate, -@@ -112,16 +115,13 @@ - $opt_address, - $opt_allowconfig, - $opt_anonymous, -+ $opt_bodytagins, - $opt_cache, - $opt_cachedir, - $opt_cacheformat, - $opt_cachegeom, - $opt_cachemin, -- $opt_lowres, -- $opt_lowresdir, -- $opt_lowresformat, -- $opt_lowresgeom, -- $opt_lowresmin, -+ $opt_centerfooter, - $opt_coloralink, - $opt_colorback, - $opt_colorfore, -@@ -138,18 +138,24 @@ - $opt_dirfmt, - $opt_dirhtmlext, - $opt_dirindexname, -+ $opt_divs, -+ $opt_edgelinksindex, -+ $opt_fancytables, -+ $opt_fancytableheight, -+ $opt_footer, - $opt_forcecache, - $opt_forcelowres, - $opt_forcegif, - $opt_forcejpeg, - $opt_forcehtml, - $opt_forcemontage, -+ $opt_forcenouplink, -+ $opt_forceuplink, - $opt_frame_name_dirview, - $opt_frame_name_imageview, - $opt_frame_name_thumbview, - $opt_frame_name_top, - $opt_frameborder, -- $opt_framebordersize, - $opt_frameddirfmt, - %opt_framefmt, - %opt_framefmt_frames, -@@ -159,7 +165,7 @@ - $opt_framestyle, - $opt_htmlext, - $opt_header, -- $opt_footer, -+ $opt_headins, - $opt_help, - $opt_htimage, - $opt_iconbase, -@@ -167,11 +173,18 @@ - %opt_icons, - $opt_ignore, - $opt_ignorefp, -+ $opt_indexinfo, - $opt_imgindexname, -+ $opt_imgprefixpath, - $opt_indexname, - $opt_javascript, - $opt_jpegquality, - $opt_lockfile, -+ $opt_lowres, -+ $opt_lowresdir, -+ $opt_lowresformat, -+ $opt_lowresgeom, -+ $opt_lowresmin, - $opt_mapnetscape, - $opt_maptype, - $opt_maxgif, -@@ -199,6 +212,7 @@ - $opt_msg_up, - $opt_pageindexname, - $opt_prefixpath, -+ $opt_prepend, - $opt_prune, - $opt_readfailhook, - $opt_readme, -@@ -212,6 +226,10 @@ - $opt_srcdir, - $opt_stylesheet, # URL to a CSS to use - $opt_tables, -+ $opt_tablebackcolor, -+ $opt_tables_bottom, -+ $opt_tables_params, -+ $opt_tables_top, - $opt_thumbbackground, - $opt_thumbbordercolor, - $opt_thumbborderwidth, -@@ -232,15 +250,22 @@ - $opt_thumbtexture, - $opt_thumbtransparent, - $opt_title, -+ $opt_unsharp, - $opt_verbose, - $opt_version, - $opt_webmagickrc, # Per-directory WebMagick rc file name - $opt_zoomfilter, - $opt_pichtml, -+ $opt_pichtmlaltdrop, -+ $opt_pichtmlaltend, -+ $opt_pichtmlaltstart, - $opt_pichtmlbottom, - $opt_pichtmlext, -+ $opt_pichtmllink, - $opt_pichtmlnav, -+ $opt_pichtmlupfirst, - $opt_pichtmlputtitle, -+ $opt_pichtmltitletop, - $opt_pichtmltarget, - $opt_pichtmltitleend, - $opt_pichtmltitlestart, -@@ -286,6 +311,7 @@ - # Relative path under rootpath / prefixpath - $opt_iconbase = ''; - # Global icons base URL, if not empty -+$opt_imgprefixpath = ''; # Add to any image URL - $prefix = '@prefix@'; # installation directory - - # -@@ -368,6 +394,7 @@ - $opt_ignore = 0; # Do not webmagick this directory - # but still recurse into sub-directories - $opt_ignorefp = 1; # ignore _* special FrontPage directories (on) -+$opt_indexinfo = 1; # Put "Index of files" - $opt_srcdir = '.'; # Source directory path (current directory) - $opt_verbose = 0; # Verbose flag (default off) - $opt_forcecache = 0; # Force update of cached thumbnails -@@ -376,25 +403,47 @@ - $opt_forcemontage = 0; # Force montage (default off) - $opt_forcegif = 0; # Force GIF imagemaps (default off) - $opt_forcejpeg = 0; # Force JPEG imagemaps (default off) -+$opt_forcenouplink = 0; # Force there to be no uplink in directory index list -+$opt_forceuplink = 0; # Force there to be an uplink in directory index list -+ # (i.e. even if we didn't generate ../index.html) - $opt_jpegquality = 70; # Quality for JPEG imagemaps -+$opt_unsharp = '0.64x0.64'; # Unsharp for all images - $opt_help = 0; # Display usage message - $opt_version = 0; # Display version info - $opt_htmlext = '.html'; # Use .shtml for SSI -+$opt_bodytagins = ''; # Insert something into <BODY> tag - $opt_header = '<CENTER>'; # Imagemap extra page header (HTML) - $opt_footer = '</CENTER>'; # Imagemap extra page footer (HTML) -+$opt_prepend = ''; # Prepend this to the very top of each HTML -+$opt_headins = ''; # Insert something into <HEAD> section - $opt_javascript = 0; # Enable JavaScript output - $opt_readmevisible = 0; # Make README.html be first page. - $opt_title = ''; # Page title (blank provides default title) -+$opt_divs = 0; # disable divs - $opt_tables = 0; # disable tables -+$opt_tablebackcolor = '#000000'; # table background color -+$opt_fancytables = 0; # use a fancier table for index pages -+$opt_fancytableheight = 28; # the height of the fancy table border -+$opt_tables_bottom = ''; # HTML after table contents -+$opt_tables_params = 'WIDTH="90%"'; # table HTML parameters -+$opt_tables_top = ''; # HTML before table contents - $opt_address = ''; # Additonal address info for bottom of - # imagemap page -+$opt_centerfooter = 0; # Center the footer text - $opt_date = 1; # Output updates date - - $opt_pichtml = 0; # Write separate HTML for each picture -+$opt_pichtmlaltdrop = ''; # Regexp to drop from ALT -+$opt_pichtmlaltend = ''; # Some words to append to ALT -+$opt_pichtmlaltstart = ''; # Some words to prepend to ALT - $opt_pichtmlbottom = '</CENTER>'; - $opt_pichtmlext = '.html'; # Use .shtml for SSI -+$opt_pichtmllink = ''; # Where to link pic - $opt_pichtmlnav = 0; # Write navigation into pic's HTML --$opt_pichtmlputtitle = 1; # Write picture title above it -+$opt_pichtmlupfirst = 1; # Put up button before next/prev -+$opt_edgelinksindex = 0; # End links link back to index -+$opt_pichtmlputtitle = 1; # Write picture title -+$opt_pichtmltitletop = 1; # Put picture title at top - $opt_pichtmltarget = ''; - $opt_pichtmltitleend = '</P>'; # End tags for picture title - $opt_pichtmltitlestart = '<P>'; # Start tags for picture title -@@ -491,8 +540,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 --$opt_framebordersize = 3 ; # Pixels allocated to frame border --$opt_frameborder = 'YES'; # Enable (YES) or disable (NO) decorative frame borders -+$opt_frameborder = 1; # Enable (1) or disable (0) decorative frame borders - $opt_framestyle = 1; # Frame style to use (out of those available) - - # -@@ -539,6 +587,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 -+# $opt_icons{'ft_top'} = 'ft_top.gif'; # Fancy table top - # $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 +645,11 @@ - # | | | - # ------------- - $opt_framefmt{1}= --'<FRAMESET COLS=\"132,*\" FRAMEBORDER=${opt_frameborder} BORDER=${opt_framebordersize}> -- <FRAME SRC=\"${dirframelink}\" NAME=\"${opt_frame_name_dirview}\" -+'<FRAMESET COLS=\"132,*\"> -+ <FRAME SRC=\"${dirframelink}\" NAME=\"${opt_frame_name_dirview}\" FRAMEBORDER=${opt_frameborder} - MARGINWIDTH=${opt_framemarginwidth} MARGINHEIGHT=${opt_framemarginheight}> -- <FRAME SRC=\"${pageframelink}\" NAME=\"${opt_frame_name_imageview}\" -- MARGINWIDTH=${opt_framemarginwidth} MARGINHEIGHT=${opt_framemarginheight}> --</FRAMESET>'; -+ <FRAME SRC=\"${pageframelink}\" NAME=\"${opt_frame_name_imageview}\" FRAMEBORDER=${opt_frameborder} -+ MARGINWIDTH=${opt_framemarginwidth} MARGINHEIGHT=${opt_framemarginheight}>'; - $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 +664,15 @@ - # | | | - # ------------- - $opt_framefmt{2}= --'<FRAMESET COLS=\"145,*\" FRAMEBORDER=${opt_frameborder} BORDER=${opt_framebordersize}> -- <FRAMESET ROWS=\"20%,*\" FRAMEBORDER=${opt_frameborder} BORDER=${opt_framebordersize}> -- <FRAME SRC=\"${dirframelink}\" NAME=\"${opt_frame_name_dirview}\" -+'<FRAMESET COLS=\"145,*\"> -+ <FRAMESET ROWS=\"20%,*\"> -+ <FRAME SRC=\"${dirframelink}\" NAME=\"${opt_frame_name_dirview}\" FRAMEBORDER=${opt_frameborder} - MARGINWIDTH=${opt_framemarginwidth} MARGINHEIGHT=${opt_framemarginheight}> -- <FRAME SRC=\"${pageframelink}\" NAME=\"${opt_frame_name_thumbview}\" -+ <FRAME SRC=\"${pageframelink}\" NAME=\"${opt_frame_name_thumbview}\" FRAMEBORDER=${opt_frameborder} - MARGINWIDTH=${opt_framemarginwidth} MARGINHEIGHT=${opt_framemarginheight}> - </FRAMESET> -- <FRAME SRC=\"${imageFrameLink}\" NAME=\"${opt_frame_name_imageview}\" -- MARGINWIDTH=${opt_framemarginwidth} MARGINHEIGHT=${opt_framemarginheight}> --</FRAMESET>'; -+ <FRAME SRC=\"${imageFrameLink}\" NAME=\"${opt_frame_name_imageview}\" FRAMEBORDER=${opt_frameborder} -+ MARGINWIDTH=${opt_framemarginwidth} MARGINHEIGHT=${opt_framemarginheight}>'; - $opt_framefmt_frames{2}=3; # Number of frames expressed by this frame format - - # Three frame screen with directories listed in left frame, -@@ -640,16 +687,15 @@ - # | | | - # ------------- - $opt_framefmt{3}= --'<FRAMESET COLS=\"132,*\" FRAMEBORDER=${opt_frameborder} BORDER=${opt_framebordersize}> -- <FRAME SRC=\"${dirframelink}\" NAME=\"${opt_frame_name_dirview}\" -+'<FRAMESET COLS=\"132,*\"> -+ <FRAME SRC=\"${dirframelink}\" NAME=\"${opt_frame_name_dirview}\" FRAMEBORDER=${opt_frameborder} - MARGINWIDTH=${opt_framemarginwidth} MARGINHEIGHT=${opt_framemarginheight}> -- <FRAMESET ROWS=\"150,*\" FRAMEBORDER=${opt_frameborder} BORDER=${opt_framebordersize}> -- <FRAME SRC=\"${pageframelink}\" NAME=\"${opt_frame_name_thumbview}\" -+ <FRAMESET ROWS=\"150,*\"> -+ <FRAME SRC=\"${pageframelink}\" NAME=\"${opt_frame_name_thumbview}\" FRAMEBORDER=${opt_frameborder} - MARGINWIDTH=${opt_framemarginwidth} MARGINHEIGHT=${opt_framemarginheight}> -- <FRAME SRC=\"${imageFrameLink}\" NAME=\"${opt_frame_name_imageview}\" -+ <FRAME SRC=\"${imageFrameLink}\" NAME=\"${opt_frame_name_imageview}\" FRAMEBORDER=${opt_frameborder} - MARGINWIDTH=${opt_framemarginwidth} MARGINHEIGHT=${opt_framemarginheight}> -- </FRAMESET> --</FRAMESET>'; -+ </FRAMESET>'; - $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 +710,15 @@ - # | | | - # ------------- - $opt_framefmt{4}= --'<FRAMESET ROWS=\"172,*\" FRAMEBORDER=${opt_frameborder} BORDER=${opt_framebordersize}> -- <FRAME SRC=\"${pageframelink}\" NAME=\"${opt_frame_name_thumbview}\" -+'<FRAMESET ROWS=\"172,*\"> -+ <FRAME SRC=\"${pageframelink}\" NAME=\"${opt_frame_name_thumbview}\" FRAMEBORDER=${opt_frameborder} - MARGINWIDTH=${opt_framemarginwidth} MARGINHEIGHT=${opt_framemarginheight}> -- <FRAMESET COLS=\"132,*\" FRAMEBORDER=${opt_frameborder} BORDER=${opt_framebordersize}> -- <FRAME SRC=\"${dirframelink}\" NAME=\"${opt_frame_name_dirview}\" -+ <FRAMESET COLS=\"132,*\"> -+ <FRAME SRC=\"${dirframelink}\" NAME=\"${opt_frame_name_dirview}\" FRAMEBORDER=${opt_frameborder} - MARGINWIDTH=${opt_framemarginwidth} MARGINHEIGHT=${opt_framemarginheight}> -- <FRAME SRC=\"${imageFrameLink}\" NAME=\"${opt_frame_name_imageview}\" -+ <FRAME SRC=\"${imageFrameLink}\" NAME=\"${opt_frame_name_imageview}\" FRAMEBORDER=${opt_frameborder} - MARGINWIDTH=${opt_framemarginwidth} MARGINHEIGHT=${opt_framemarginheight}> -- </FRAMESET> --</FRAMESET>'; -+ </FRAMESET>'; - $opt_framefmt_frames{4}=3; # Number of frames expressed by this frame format - - # -@@ -756,23 +801,20 @@ - use Getopt::Long; - if ( ! GetOptions( - 'address=s' => \$opt_address, -+ 'allowconfig!' => \$opt_allowconfig, - 'anonymous!' => \$opt_anonymous, -+ 'bodytagins=s' => \$opt_bodytagins, - 'cache!' => \$opt_cache, - 'cachedir=s' => \$opt_cachedir, - 'cacheformat=s' => \$opt_cacheformat, - 'cachegeom=s' => \$opt_cachegeom, - 'cachemin=i' => \$opt_cachemin, -- 'lowres!' => \$opt_lowres, -- 'lowresdir=s' => \$opt_lowresdir, -- 'lowresformat=s' => \$opt_lowresformat, -- 'lowresgeom=s' => \$opt_lowresgeom, -- 'lowresmin=i' => \$opt_lowresmin, -+ 'centerfooter!' => \$opt_centerfooter, - 'coloralink=s' => \$opt_coloralink, - 'colorback=s' => \$opt_colorback, - 'colorfore=s' => \$opt_colorfore, - 'colorlink=s' => \$opt_colorlink, - 'colorvlink=s' => \$opt_colorvlink, -- 'allowconfig!' => \$opt_allowconfig, - 'columns=i' => \$opt_columns, - 'date!' => \$opt_date, - 'debug!' => \$opt_debug, -@@ -783,6 +825,10 @@ - 'dircolorvlink=s' => \$opt_dircolorvlink, - 'dirhtmlext=s' => \$opt_dirhtmlext, - 'dirindexname=s' => \$opt_dirindexname, -+ 'divs!' => \$opt_divs, -+ 'edgelinksindex!' => \$opt_edgelinksindex, -+ 'fancytables!' => \$opt_fancytables, -+ 'fancytableheight=i' => \$opt_fancytableheight, - 'footer=s' => \$opt_footer, - 'forcecache!' => \$opt_forcecache, - 'forcelowres!' => \$opt_forcelowres, -@@ -790,23 +836,32 @@ - 'forcehtml!' => \$opt_forcehtml, - 'forcejpeg!' => \$opt_forcejpeg, - 'forcemontage!' => \$opt_forcemontage, -+ 'forceuplink!' => \$opt_forceuplink, -+ 'forcenouplink!' => \$opt_forcenouplink, - 'framemarginwidth=i' => \$opt_framemarginwidth, - 'framemarginheight=i' => \$opt_framemarginheight, -- 'framebordersize=i' => \$opt_framebordersize, -- 'frameborder=s' => \$opt_frameborder, -+ 'frameborder=i' => \$opt_frameborder, - 'frames!' => \$opt_frames, - 'framestyle=i' => \$opt_framestyle, - 'header=s' => \$opt_header, -+ 'headins=s' => \$opt_headins, - 'help!' => \$opt_help, - 'htimage=s' => \$opt_htimage, - 'htmlext=s' => \$opt_htmlext, - 'iconbase=s' => \$opt_iconbase, - 'iconpath=s' => \$opt_iconpath, - 'ignorefp!' => \$opt_ignorefp, -+ 'indexinfo!' => \$opt_indexinfo, - 'imgindexname=s' => \$opt_imgindexname, -+ 'imgprefixpath=s' => \$opt_imgprefixpath, - 'indexname=s' => \$opt_indexname, - 'javascript!' => \$opt_javascript, - 'jpegquality=i' => \$opt_jpegquality, -+ 'lowres!' => \$opt_lowres, -+ 'lowresdir=s' => \$opt_lowresdir, -+ 'lowresformat=s' => \$opt_lowresformat, -+ 'lowresgeom=s' => \$opt_lowresgeom, -+ 'lowresmin=i' => \$opt_lowresmin, - 'mapnetscape!' => \$opt_mapnetscape, - 'maptype=s' => \$opt_maptype, - 'maxgif=i' => \$opt_maxgif, -@@ -828,15 +883,22 @@ - 'msg_up=s' => \$opt_msg_up, - 'pageindexname=s' => \$opt_pageindexname, - 'pichtml!' => \$opt_pichtml, -+ 'pichtmlaltdrop=s' => \$opt_pichtmlaltdrop, -+ 'pichtmlaltend=s' => \$opt_pichtmlaltend, -+ 'pichtmlaltstart=s' => \$opt_pichtmlaltstart, - 'pichtmlbottom=s' => \$opt_pichtmlbottom, - 'pichtmlext=s' => \$opt_pichtmlext, -+ 'pichtmllink=s' => \$opt_pichtmllink, - 'pichtmlnav!' => \$opt_pichtmlnav, -+ 'pichtmlupfirst!' => \$opt_pichtmlupfirst, - 'pichtmlputtitle!' => \$opt_pichtmlputtitle, -+ 'pichtmltitletop!' => \$opt_pichtmltitletop, - 'pichtmltarget=s' => \$opt_pichtmltarget, - 'pichtmltitleend=s' => \$opt_pichtmltitleend, - 'pichtmltitlestart=s' => \$opt_pichtmltitlestart, - 'pichtmltop=s' => \$opt_pichtmltop, - 'prefixpath=s' => \$opt_prefixpath, -+ 'prepend=s' => \$opt_prepend, - 'readme=s' => \$opt_readme, - 'readmevisible!' => \$opt_readmevisible, - 'recurse!' => \$opt_recurse, -@@ -846,6 +908,10 @@ - 'srcdir=s' => \$opt_srcdir, - 'stylesheet=s' => \$opt_stylesheet, - 'tables!' => \$opt_tables, -+ 'tablebackcolor=s' => \$opt_tablebackcolor, -+ 'tables_bottom=s' => \$opt_tables_bottom, -+ 'tables_params=s' => \$opt_tables_params, -+ 'tables_top=s' => \$opt_tables_top, - 'thumbtexture=s' => \$opt_thumbtexture, - 'thumbbackground=s' => \$opt_thumbbackground, - 'thumbborderwidth=i' => \$opt_thumbborderwidth, -@@ -861,6 +927,7 @@ - 'thumbshadow=s' => \$opt_thumbshadow, - 'thumbtransparent=s' => \$opt_thumbtransparent, - 'title=s' => \$opt_title, -+ 'unsharp=s' => \$opt_unsharp, - 'verbose!' => \$opt_verbose, - 'version!' => \$opt_version, - 'zoomfilter=s' => \$opt_zoomfilter -@@ -1085,6 +1152,30 @@ - } - } - -+sub FileChoose { -+ my $oldname = shift; -+ my $newname = shift; -+ my ($oldfile, $newfile, $oldcont, $newcont); -+ -+ open FILECON, "<${oldname}"; -+ $oldcont = do { local $/; <FILECON> }; -+ close FILECON; -+ -+ open FILECON, "<${newname}"; -+ $newcont = do { local $/; <FILECON> }; -+ close FILECON; -+ -+ if ($oldcont ne $newcont) { -+ print(STDERR "Rename $newname to $oldname since changed from last run.\n") -+ if $opt_debug; -+ unlink($oldname); -+ rename($newname, $oldname); -+ } else { -+ print(STDERR "Keep old $oldname since unchanged from last run.\n") -+ if $opt_debug; -+ unlink($newname); -+ } -+} - - # Execute dodir with the protection of a fork. This ensures that - # current directory and global webmagick configuration values are -@@ -1153,12 +1244,12 @@ - '|(\.eps2$)|(\.epsf$)|(\.epsi$)|(\.ept$)|(\.fax$)|(\.fig$)' . - '|(\.fits$)|(\.fpx$)|(\.g3$)|(\.gif$)|(\.gplt$)|(\.hdf$)' . - '|(\.hpgl$)|(\.ico$)|(\.im1$)|(\.im24$)|(\.im8$)|(\.jbg$)' . -- '|(\.jbig$)|(\.jpeg$)|(\.jpg$)|(\.m2v$)|(\.man$)|(\.mif$)' . -- '|(\.miff$)|(\.mng$)|(\.mpeg$)|(\.mpg$)|(\.mtv$)|(\.p7$)' . -+ '|(\.jbig$)|(\.jpeg?$)|(\.jpg$)|(\.m2v$)|(\.man$)|(\.mif$)' . -+ '|(\.miff$)|(\.mng$)|(\.mpe?g$)|(\.mtv$)|(\.p7$)' . - '|(\.pbm$)|(\.pcd$)|(\.pcds$)|(\.pcx$)|(\.pdf$)|(\.pgm$)' . - '|(\.pic$)|(\.pict$)|(\.pix$)|(\.png$)|(\.pnm$)|(\.pov$)' . - '|(\.ppm$)|(\.ps$)|(\.psd$)|(\.rad$)|(\.rla$)|(\.rle$)' . -- '|(\.sgi$)|(\.sun$)|(\.tga$)|(\.tif$)|(\.tiff$)|(\.tim$)' . -+ '|(\.sgi$)|(\.sun$)|(\.tga$)|(\.tiff?$)|(\.tim$)' . - '|(\.ttf$)|(\.vicar$)|(\.viff$)|(\.wmf$)|(\.xbm$)|(\.xpm$)' . - '|(\.xwd$)'; - -@@ -1187,7 +1278,6 @@ - - evaluateRcFiles(); - -- - # Decide if we want to process this directory or not based on the - # value of $opt_ignore. If not, then just return. - -@@ -1329,7 +1419,6 @@ - $pageStatusTime=fmtime($fileNames{'pageStatus'}); - } - -- - # Handle a directory name to title index file. Store alternative - # names in %dirTitles. - { -@@ -1346,34 +1435,50 @@ - $tmp_dirTitles{$dirname} = escapehtml($dirtitle); - $dirOrder{$dirname} = $pos; - $pos++; -+ } elsif( defined($dirname) ) { -+ $dirOrder{$dirname} = $pos; -+ $pos++; - } - } - close( DIRINDEX ); - } - -- if( !defined(%dirTitles) || ( compareHash(\%dirTitles,\%tmp_dirTitles) ) ) { -+ if( compareHash(\%dirTitles,\%tmp_dirTitles) ) { - %dirTitles = %tmp_dirTitles; -- print( STDERR "Directory titles have changed, must re-do HTML indexes\n" ) -+ if ($opt_frames) { -+ print( STDERR "Directory titles have changed, must re-do HTML indexes\n" ) -+ if $opt_debug; -+ ++$doIndexHtml; -+ } -+ } else { -+ print( STDERR "Directory titles not needed or unchanged from last run.\n") - if $opt_debug; -- ++$doIndexHtml; -- } -+ } - } - - # -- # Handle a image name to thumbnail label index file -+ # Handle an image name to thumbnail label index file - # Store alternative names in %imageLabels - # - { - my $pos = 0; - my %tmp_imageLabels; -+ undef( %tmp_imageLabels ); -+ my %tmp_imageCaptions; -+ undef( %tmp_imageCaptions ); - if ( -f $opt_imgindexname ) { - open( IMGINDEX, "<$opt_imgindexname" ); - while( <IMGINDEX> ) { - chop; -- my ( $imgname, $imgtitle); -- ( $imgname, $imgtitle) = split( /[ \t]+/, $_, 2); -+ my ( $imgname, $imgtitle, $imgcaption, $tmpstr); -+ ( $imgname, $tmpstr) = split( /[ \t]+/, $_, 2); -+ ( $imgtitle, $imgcaption ) = split( /,+/, $tmpstr, 2); - if(defined($imgname) && defined($imgtitle)) { - $tmp_imageLabels{$imgname} = $imgtitle; -+ $tmp_imageCaptions{$imgname} = $imgcaption; -+ $imageOrder{$imgname} = $pos; -+ $pos++; -+ } elsif( defined($imgname) ) { - $imageOrder{$imgname} = $pos; - $pos++; - } -@@ -1383,11 +1488,25 @@ - # - # This code is totally BOGUS since decision should be made on a per-page basis!! - # -- if( !defined(%imageLabels) || ( compareHash(\%imageLabels,\%tmp_imageLabels) ) ) { -+ if( compareHash(\%imageLabels,\%tmp_imageLabels) ) { - %imageLabels = %tmp_imageLabels; - print( STDERR "Image labels have changed, must re-do montages\n" ) - if $opt_debug; - $opt_forcemontage=1; -+ } else { -+ print( STDERR "Image labels not needed or unchanged from last run.\n") if $opt_debug; -+ } -+ -+ #BRAD: Added to record per image captions for perimage html page -+ if( $opt_pichtml && -+ compareHash(\%imageCaptions,\%tmp_imageCaptions) ) { -+ %imageCaptions = %tmp_imageCaptions; -+ print( STDERR "Image captions have changed, must re-do perpage html\n" ) -+ if $opt_debug; -+ $opt_forcehtml=1; -+ } else { -+ print( STDERR "Image captions not needed or unchanged from last run.\n") -+ if $opt_debug; - } - } - -@@ -1396,6 +1515,7 @@ - # - { - my %tmp_iconImageUrls; -+ undef (%tmp_iconImageUrls); - print( "Icon URLs:\n" ) if $opt_debug; - my $icon; - for $icon ( keys %opt_icons ) { -@@ -1405,11 +1525,14 @@ - if $opt_debug; - } - } -- if( !defined(%iconImageUrls) || ( compareHash(\%iconImageUrls,\%tmp_iconImageUrls) ) ) { -+ if( compareHash(\%iconImageUrls,\%tmp_iconImageUrls) ) { - %iconImageUrls = %tmp_iconImageUrls; - print( STDERR "Icon URLs have changed, must re-do all HTML\n" ) - if $opt_debug; - $opt_forcehtml = 1;; -+ } else { -+ print( STDERR "Icon URLs not needed or unchanged from last run.\n") -+ if $opt_debug; - } - } - -@@ -1431,6 +1554,7 @@ - # Build list of image files - # - @allImageFiles = sort( sortImages grep( /$includeRegex/io, @allFiles)); -+ print( STDERR " numfiles=", scalar(@allImageFiles), "\n") if $opt_debug; - - # Find subdirectory names (if any) ignoring hidden directories and - # directories without index files. Directories should have index -@@ -1446,10 +1570,9 @@ - if ($opt_frames) { - grep($tarray{$_}++, @allImageFiles); - foreach $_ ( grep(! $tarray{$_},@allFiles) ) { -- #if( -f "${_}/${opt_indexname}" ) { # If directory & index file -- # exists then add to list - if( -d "${_}" ) { # If directory exists -- unless ($opt_ignorefp && /^_[a-z]/) { # and we shouldn't ignore it -+ unless (get_rc_var(${_}, 'opt_ignore', 0) eq 1) { # and dir not ignored -+ unless ($opt_ignorefp && /^_[a-z]/) { # and we shouldn't ignore it - push(@dirfiles, $_); # then add it to the list - if ($opt_javascript) { - # Check which index file to use for JavaScript -@@ -1461,6 +1584,7 @@ - $dirJsLink{"$_"} = ''; - } - } -+ } - } - } - } -@@ -1510,9 +1634,7 @@ - if( $numimages > 0 ) { - $haveImages = 1; - } -- -- -- -+ - # - # Determine page title - # -@@ -1520,50 +1642,56 @@ - $pageTitle = $opt_title; - } else { - my $dirname=basename($sourceDirectory); -- $pageTitle = "${opt_msg_index_of_directory} \"$dirname\""; -+ #BRAD: if cwd or pageTitle in imageLabels, use that for directory name -+ if( $imageLabels{$dirname} ne '') { -+ $pageTitle = $imageLabels{$dirname}; -+ $imageLabels{'pageTitle'} = $imageLabels{$dirname}; -+ $imageCaptions{'pageTitle'} = $imageLabels{$dirname}; -+ } elsif ( $imageLabels{'pageTitle'} ne '') { -+ $pageTitle = $imageLabels{'pageTitle'}; -+ } else { -+ $pageTitle = "${opt_msg_index_of_directory} \"$dirname\""; -+ } - } - -- - # - # Put the PerlMagick Montage options together - # - $montageArguments = ''; #"\n "; - - $montageArguments .= "background=>\'$opt_thumbbackground\',\n " -- if $opt_thumbbackground ne 'false'; -+ if $opt_thumbbackground !~ /^(|false)$/; - - $montageArguments .= "borderwidth=>\'$opt_thumbborderwidth\',\n "; - - $montageArguments .= "compose=>\'$opt_thumbcompose\',\n " -- if $opt_thumbcompose ne 'false'; -+ if $opt_thumbcompose !~ /^(|false)$/; - - $montageArguments .= "font=>\'$opt_thumbfont\',\n " -- if $opt_thumbfont ne 'false'; -+ if $opt_thumbfont !~ /^(|false)$/; - -- $montageArguments .= "fill=>\'$opt_thumbforeground\',\n " -- if $opt_thumbforeground ne 'false'; -+ $montageArguments .= "fill=>\'$opt_thumbforeground\',\n " -+ if $opt_thumbforeground !~ /^(|false)$/; - - $montageArguments .= "frame=>\'$opt_thumbframe\',\n " -- if $opt_thumbframe ne 'false'; -+ if $opt_thumbframe !~ /^(|false)$/; - - $montageArguments .= "geometry=>\'${opt_thumbgeometry}\',\n " -- if $opt_thumbgeometry ne 'false'; -+ if $opt_thumbgeometry !~ /^(|false)$/; - - $montageArguments .= "gravity=>\'$opt_thumbgravity\',\n " -- if $opt_thumbgravity ne 'false'; -+ if $opt_thumbgravity !~ /^(|false)$/; - - $montageArguments .= "shadow=>\'$opt_thumbshadow\',\n " -- if $opt_thumbshadow ne 'false'; -+ if $opt_thumbshadow !~ /^(|false)$/; - - $montageArguments .= "texture=>\'$opt_thumbtexture\',\n " -- if $opt_thumbtexture ne 'false'; -+ if $opt_thumbtexture !~ /^(|false)$/; - - $montageArguments .= "tile=>\'${opt_columns}x${opt_rows}\',\n "; - - $montageArguments .= "transparent=>\'$opt_thumbtransparent\'\n " -- if $opt_thumbtransparent ne 'false'; -- -- -+ if $opt_thumbtransparent !~ /^(|false)$/; - - # Compute a conglomeration of all parameters that effect the - # montage image to use for comparison with the parameters used in -@@ -1571,12 +1699,12 @@ - { - my $tmp_montageParameters = "$montageArguments"; - $tmp_montageParameters .= "bordercolor=>\'$opt_thumbframebgcolor\',\n " -- if $opt_thumbframebgcolor ne 'false'; -+ if $opt_thumbframebgcolor !~ /^(|false)$/; - $tmp_montageParameters .= "mapnetscape=>\'$opt_mapnetscape\',\n "; - $tmp_montageParameters .= "mattecolor=>\'$opt_thumbframecolor\',\n " -- if $opt_thumbframecolor ne 'false'; -+ if $opt_thumbframecolor !~ /^(|false)$/; - $tmp_montageParameters .= "label=>\'$opt_thumblabel\',\n " -- if $opt_thumblabel ne 'false'; -+ if $opt_thumblabel !~ /^(|false)$/; - $tmp_montageParameters .= "labelwidth=>\'$opt_thumblabelwidth\',\n "; - $tmp_montageParameters .= "\Lzoomfilter=>\'$opt_zoomfilter\'"; - if( !defined($montageParameters) || ($tmp_montageParameters ne $montageParameters)) { -@@ -1595,8 +1723,10 @@ - 'address' => $opt_address, - 'anonymous' => $opt_anonymous, - 'backgroundimg' => $opt_icons{'background'}, -- 'cachedir' => !$opt_tables ? "" : $opt_cachedir, -- 'cacheformat' => !$opt_tables ? "" : $opt_cacheformat, -+ 'bodytagins' => $opt_bodytagins, -+ 'cachedir' => (!$opt_tables && !$opt_divs) ? "" : $opt_cachedir, -+ 'cacheformat' => (!$opt_tables && !$opt_divs) ? "" : $opt_cacheformat, -+ 'centerfooter' => $opt_centerfooter, - 'coloralink' => $opt_coloralink, - 'colorback' => $opt_colorback, - 'colorfore' => $opt_colorfore, -@@ -1614,19 +1744,27 @@ - 'dirfmt' => !$opt_frames ? "" : $opt_dirfmt, - 'dirhtmlext' => !$opt_frames ? "" : $opt_dirhtmlext, - 'dirindexname' => !$opt_frames ? "" : $opt_dirindexname, -+ 'divs' => $opt_divs, -+ 'edgelinksindex' => $opt_edgelinksindex, -+ 'fancytables' => !$opt_tables ? 0 : $opt_fancytables, -+ 'fancytableheight' => !$opt_tables ? 0 : $opt_fancytableheight, - 'footer' => $opt_footer, -+ 'forceuplink' => $opt_forceuplink, -+ 'forcenouplink' => $opt_forcenouplink, - 'frameddirfmt' => !$opt_frames ? "" : $opt_frameddirfmt, - 'framemarginwidth' => !$opt_frames ? 0 : $opt_framemarginwidth, - 'framemarginheight' => !$opt_frames ? 0 : $opt_framemarginheight, -- 'framebordersize' => !$opt_frames ? 0 : $opt_framebordersize, -- 'frameborder' => !$opt_frames ? "" : $opt_frameborder, -+ 'frameborder' => !$opt_frames ? 0 : $opt_frameborder, - 'frames' => $opt_frames, - 'framestyle' => !$opt_frames ? 1 : $opt_framestyle, - 'header' => $opt_header, -+ 'headins' => $opt_headins, - 'htimage' => !$opt_serversidemap ? "" : $opt_htimage, - 'htmlext' => !$opt_frames ? "" : $opt_htmlext, - 'iconbase' => $opt_iconbase, - 'imgindexname' => $opt_imgindexname, -+ 'imgprefixpath' => $opt_imgprefixpath, -+ 'indexinfo' => $opt_indexinfo, - 'indexname' => $opt_indexname, - 'javascript' => $opt_javascript, - 'jsdirindex' => !$opt_javascript ? "" : $fileNames{'jsDirIndex'}, -@@ -1647,8 +1785,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, -- 'msg_index_of_files' => $opt_msg_index_of_files, -- 'msg_index_through' => $opt_msg_index_through, -+ 'msg_index_of_files' => !$opt_indexinfo ? "" : $opt_msg_index_of_files, -+ 'msg_index_through' => !$opt_indexinfo ? "" : $opt_msg_index_through, - 'msg_next' => $opt_msg_next, - 'msg_pause' => $opt_msg_pause, - 'msg_page_navigator' => !$opt_frames ? "" : $opt_msg_page_navigator, -@@ -1659,15 +1797,22 @@ - 'numpages' => $numPages, - 'pageindexname' => $opt_pageindexname, - 'pichtml' => $opt_pichtml, -+ 'pichtmlaltdrop' => !$opt_pichtml ? "" : $opt_pichtmlaltdrop, -+ 'pichtmlaltend' => !$opt_pichtml ? "" : $opt_pichtmlaltend, -+ 'pichtmlaltstart' => !$opt_pichtml ? "" : $opt_pichtmlaltstart, - 'pichtmlbottom' => !$opt_pichtml ? "" : $opt_pichtmlbottom, - 'pichtmlext' => !$opt_pichtml ? "" : $opt_pichtmlext, -+ 'pichtmllink' => !$opt_pichtml ? '' : $opt_pichtmllink, - 'pichtmlnav' => !$opt_pichtml ? 0 : $opt_pichtmlnav, -+ 'pichtmlupfirst' => $opt_pichtmlupfirst, - 'pichtmlputtitle' => !$opt_pichtml ? 0 : $opt_pichtmlputtitle, -+ 'pichtmltitletop' => (!$opt_pichtml || !$opt_pichtmlputtitle) ? 0 : $opt_pichtmltitletop, - 'pichtmltarget' => (!$opt_pichtml || !$opt_frames) ? "" : $opt_pichtmltarget, - 'pichtmltitleend' => !$opt_pichtml ? "" : $opt_pichtmltitleend, - 'pichtmltitlestart' => !$opt_pichtml ? "" : $opt_pichtmltitlestart, - 'pichtmltop' => !$opt_pichtml ? "" : $opt_pichtmltop, - 'prefixpath' => $opt_prefixpath, -+ 'prepend' => $opt_prepend, - 'readme' => !$haveReadme ? "" : $opt_readme, - 'readmepresent' => $haveReadme, - 'readmevisible' => !$haveReadme ? 0 : $opt_readmevisible, -@@ -1676,8 +1821,13 @@ - 'stylesheet' => $opt_stylesheet, - 'subdirectories' => !$opt_frames ? "" : join(' ',@dirNames), - 'tables' => $opt_tables, -+ 'tablebackcolor' => !$opt_tables ? "" : $opt_tablebackcolor, -+ 'tables_bottom' => !$opt_tables ? "" : $opt_tables_bottom, -+ 'tables_params' => !$opt_tables ? "" : $opt_tables_params, -+ 'tables_top' => !$opt_tables ? "" : $opt_tables_top, -+ 'thumblabelwidth' => ($opt_divs || $opt_tables) ? $opt_thumblabelwidth : 0, - 'title' => $pageTitle, -- 'version' => $opt_anonymous ? "" : $webmagickInfo{'version'}, -+ 'version' => $opt_anonymous ? "" : $webmagickInfo{'version'} - ); - - # Compute a conglomeration of all parameters that effect the HTML -@@ -1704,7 +1854,42 @@ - } - } - -+ # -+ # Store cache options in associative array to make them easier to deal with -+ # -+ %cacheOpts = -+ ( -+ 'cacheformat' => $opt_cacheformat, -+ 'cachegeom' => $opt_cachegeom, -+ 'cachemin' => $opt_cachemin, -+ 'quality' => ($opt_cacheformat =~ /^JPE?G$/) ? $opt_jpegquality : 0, -+ 'unsharp' => $opt_unsharp -+ ); - -+ # Compute a conglomeration of all parameters that effect the cache -+ # to use for comparison with the parameters used in the last run. -+ { -+ my $firstparam = 1; -+ my $tmp_cacheParams = ''; -+ my $key; -+ foreach $key (sort(keys(%cacheOpts))) { -+ if(defined($cacheOpts{$key})) { -+ if( $firstparam ) { -+ $firstparam = 0; -+ } else { -+ $tmp_cacheParams .= ",\n "; -+ } -+ $tmp_cacheParams .= $key . '=>\'' . $cacheOpts{$key} . '\''; -+ } -+ } -+ if( !defined($cacheParams) || ($tmp_cacheParams ne $cacheParams)) { -+ $cacheParams = $tmp_cacheParams; -+ print( STDERR "cache parameters have changed, must re-do cache amd montage\n" ) -+ if $opt_debug; -+ $opt_forcecache = 1; -+ $opt_forcemontage = 1; -+ } -+ } - # - # Print statistics message - # -@@ -1749,7 +1934,7 @@ - if ( $perlVarsVersion < $requiredPerlVarsVersion) { - print ( STDERR "Need to do montage, HTML and cache because", - " version has changed\n") if $opt_debug; -- $opt_forcehtml = 1; -+ $opt_forcehtml = 1; - $opt_forcemontage = 1; - $opt_forcecache = 1; - $opt_forcelowres = 1; -@@ -1760,10 +1945,10 @@ - # Check for missing output files - # Check for new input files - if( $numfiles > 0 ) { -- if( ! $opt_tables && (! -f $fileNames{'pageStatus'} || -+ if( !$opt_divs && !$opt_tables && (! -f $fileNames{'pageStatus'} || - ( ! -f $fileNames{'montageGIF'} && ! -f $fileNames{'montageJPEG'} ))) { - # If key file is missing then do montage -- print(STDERR "\nMust do montage because a required output", -+ print(STDERR "Must do montage because a required output", - " file is missing\n") - if $opt_debug; - ++$doMontage; -@@ -1801,6 +1986,9 @@ - } - - # Overrides -+ if( $opt_forcecache ) { -+ ++$doIndexHtml if ($opt_frames); -+ } - if( $opt_forcehtml ) { - ++$doPageHtml; - ++$doIndexHtml if ($opt_frames); -@@ -1905,7 +2093,7 @@ - # - # Clean up cached thumbnails - # -- if( ($opt_cache || $opt_tables) && -d $opt_cachedir ) { -+ if( ($opt_cache || $opt_tables || $opt_divs) && -d $opt_cachedir ) { - my @extra; - my %tarray; - -@@ -1975,9 +2163,10 @@ - # get indexname of parent directory - my $upindexname = - get_rc_var('..', 'opt_indexname', "$opt_indexname"); -- unless ( "$upindexname" eq 'NOLINK' ) { -+ -+ unless ( "$upindexname" eq 'NOLINK' || "$opt_forcenouplink" || ( cwd() eq "$opt_rootpath" && ! "$opt_forceuplink" ) ) { - $uphtml = "<A HREF=\"../${upindexname}\"><IMG\n" . -- "SRC=\"$iconImageUrls{'up'}\" $iconImageSizes{'up'} ALT=\"^\" BORDER=0></A>" . -+ "SRC=\"$iconImageUrls{'up'}\" $iconImageSizes{'up'} TITLE=\"^\" ALT=\"^\" BORDER=0></A>" . - " <A HREF=\"../${upindexname}\">${opt_msg_up}</A><BR>\n"; - } - -@@ -1987,7 +2176,7 @@ - my $helphtml = ''; - if( $haveReadme ) { - $helphtml .= "<A HREF=\"" . escapeurl(${opt_readme}) . "\" TARGET=\"$frameTargets{'readmeview'}\"><IMG\n" . -- "SRC=\"$iconImageUrls{'help'}\" $iconImageSizes{'help'} ALT=\"?\" BORDER=0></A>" . -+ "SRC=\"$iconImageUrls{'help'}\" $iconImageSizes{'help'} TITLE=\"?\" ALT=\"?\" BORDER=0></A>" . - " <A HREF=\"" . escapeurl(${opt_readme}) . "\" TARGET=\"$frameTargets{'readmeview'}\">${opt_msg_readme}</A><BR>\n"; - } - -@@ -1997,7 +2186,7 @@ - my $nexthtml = ''; - if( $haveReadme && $haveImages && $opt_framefmt_frames{$opt_framestyle}<=2 ) { - $nexthtml .= "<A HREF=\"${opt_pageindexname}1$opt_htmlext\" TARGET=\"$frameTargets{'thumbview'}\"><IMG\n" . -- "SRC=\"$iconImageUrls{'next'}\" $iconImageSizes{'next'} ALT=\"*\" BORDER=0></A>" . -+ "SRC=\"$iconImageUrls{'next'}\" $iconImageSizes{'next'} TITLE=\"*\" ALT=\"*\" BORDER=0></A>" . - " <A HREF=\"${opt_pageindexname}1$opt_htmlext\" TARGET=\"$frameTargets{'thumbview'}\">${opt_msg_images}</A><BR>"; - } - -@@ -2023,20 +2212,19 @@ - } else { - $dirtitle=$subdir; - } -- -+ - # get indexname for sub-directory (default as this directory) - my $subindexname = - get_rc_var($subdir, 'opt_indexname', "$opt_indexname"); - - unless ( "$subindexname" eq 'NOLINK' ) { - my $url = escapeurl("$subdir/${subindexname}"); -- $dirhtml .= '<NOBR>'; - # If a bullet icon is defined, then use it - # otherwise use plain text only - if( defined( $iconImageUrls{'ball'} ) ) { -- $dirhtml .= "<A HREF=\"${url}\"><IMG SRC=\"$iconImageUrls{'ball'}\" $iconImageSizes{'ball'} ALT=\"*\" BORDER=0></A>"; -+ $dirhtml .= "<A HREF=\"${url}\"><IMG SRC=\"$iconImageUrls{'ball'}\" $iconImageSizes{'ball'} TITLE=\"*\" ALT=\"*\" BORDER=0></A>"; - } -- $dirhtml .= "<A HREF=\"${url}\">$dirtitle</A></NOBR><BR>\n"; -+ $dirhtml .= "<A HREF=\"${url}\">$dirtitle</A><BR>\n"; - } - } - } -@@ -2126,27 +2314,32 @@ - - # ----- Output Top Index File (usually "index.html") ------- - # -- open( INDEX, ">${opt_indexname}") -- || die("$0: Failed to open file ${opt_indexname} for output\n$@\n"); -- print( INDEX "<HTML>\n<HEAD>\n" ); -+ my $indexnametmp = $opt_indexname . ".tmp"; -+ open( INDEX, ">${indexnametmp}") -+ || die("$0: Failed to open file ${indexnametmp} for output\n$@\n"); -+ if( "$opt_prepend" ne '' ) { -+ print( INDEX "${opt_prepend}" ); -+ } -+ print( INDEX "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\" \"http://www.w3.org/TR/html4/frameset.dtd\">\n<HTML>\n<HEAD>\n" ); - # Charset is better before title - print( INDEX " <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=${opt_metacharset}\">\n" ) - if( "$opt_metacharset" ne '' ); - print( INDEX " <TITLE>${pageTitle}</TITLE>\n" ); - - # Meta tags -- print( INDEX " <META NAME=\"GENERATOR\" CONTENT=\"WebMagick/$webmagickInfo{version} [WebMagick]\">\n" ); -- print( INDEX " <META NAME=\"Author\" CONTENT=\"${opt_metaauthor}\">\n" ) -+ print( INDEX " <META NAME=\"generator\" CONTENT=\"WebMagick/$webmagickInfo{version} [WebMagick]\">\n" ) -+ if (!$opt_anonymous); -+ print( INDEX " <META NAME=\"author\" CONTENT=\"${opt_metaauthor}\">\n" ) - if( "$opt_metaauthor" ne '' ); -- print( INDEX " <META NAME=\"Description\" CONTENT=\"${opt_metadescription}\">\n" ) -+ print( INDEX " <META NAME=\"description\" CONTENT=\"${opt_metadescription}\">\n" ) - if( "$opt_metadescription" ne '' ); -- print( INDEX " <META NAME=\"Keywords\" CONTENT=\"${opt_metakeywords}\">\n" ) -+ print( INDEX " <META NAME=\"keywords\" CONTENT=\"${opt_metakeywords}\">\n" ) - if( "$opt_metakeywords" ne '' ); -- print( INDEX " <META NAME=\"Classification\" CONTENT=\"${opt_metaclassification}\">\n" ) -+ print( INDEX " <META NAME=\"classification\" CONTENT=\"${opt_metaclassification}\">\n" ) - if( "$opt_metaclassification" ne '' ); - # The value of $opt_metaexpires should be similar to: - # "Tue, 20 Aug 1996 14:25:27 GMT" -- print( INDEX " <META HTTP-EQUIV=\"Expires\" CONTENT=\"${opt_metaexpires}\">\n" ) -+ print( INDEX " <META HTTP-EQUIV=\"expires\" CONTENT=\"${opt_metaexpires}\">\n" ) - if( "$opt_metaexpires" ne '' ); - print( INDEX " <LINK REL=\"stylesheet\" type=\"text/css\" HREF=\"${opt_stylesheet}\">\n") - if ("$opt_stylesheet" ne ''); -@@ -2154,7 +2347,7 @@ - # If in JavaScript mode, output code to switch to JavaScript pages - # Currently knows about certain browsers. - if( $opt_javascript ) { -- print( INDEX '<SCRIPT LANGUAGE="JavaScript1.1">' . "\n" ); -+ print( INDEX '<SCRIPT TYPE="text/javascript">' ); - print( INDEX '<!--' . "\n" ); - print( INDEX ' var browserName = navigator.appName;', "\n" ); - print( INDEX ' var browserVersion = parseInt(navigator.appVersion);', "\n" ); -@@ -2164,7 +2357,7 @@ - print( INDEX ' } else if ( browserName == "Microsoft Internet Explorer" && browserVersion >= 3) {', "\n" ); - print( INDEX ' location = filename;', "\n" ); - print( INDEX ' }', "\n" ); -- print( INDEX "// -->\n" ); -+ print( INDEX "// -->" ); - print( INDEX "</SCRIPT>\n" ); - } - -@@ -2173,48 +2366,55 @@ - print( INDEX $framespechtml ); - print( INDEX "<NOFRAMES>\n" ); - print( INDEX "<BODY\n" ); -- unless ("$opt_stylesheet" ne '') -- { -- print( INDEX " TEXT=\"${opt_colorfore}\"\n" ); -- print( INDEX " BGCOLOR=\"${opt_colorback}\"\n" ) -- if $opt_colorback ne 'false'; -- print( INDEX " BACKGROUND=\"$iconImageUrls{background}\"\n" ) -- if defined $iconImageUrls{background}; -- print( INDEX " LINK=\"${opt_colorlink}\"\n" ); -- print( INDEX " VLINK=\"${opt_colorvlink}\"\n" ); -- print( INDEX " ALINK=\"${opt_coloralink}\""); -- } -+ print( INDEX " TEXT=\"${opt_colorfore}\"\n" ); -+ print( INDEX " BGCOLOR=\"${opt_colorback}\"\n" ) -+ if $opt_colorback ne 'false'; -+ print( INDEX " BACKGROUND=\"$iconImageUrls{background}\"\n" ) -+ if defined $iconImageUrls{background}; -+ print( INDEX " LINK=\"${opt_colorlink}\"\n" ); -+ print( INDEX " VLINK=\"${opt_colorvlink}\"\n" ); -+ print( INDEX " ALINK=\"${opt_coloralink}\""); - print( INDEX ">\n" ); - print( INDEX $indexhtml ); -- print( INDEX "</BODY>\n</NOFRAMES>\n</HTML>" ); -+ print( INDEX "</BODY>\n</NOFRAMES>\n</FRAMESET>\n</HTML>" ); - close( INDEX ); -- -+ FileChoose($opt_indexname, $indexnametmp); - - # ----- Output Top JavaScript Index File (usually "indexjs.html") ------- - # - if( $opt_javascript ) { -- open( INDEX, ">$fileNames{'jsDirIndex'}") -- || die("$0: Failed to open file $fileNames{'jsDirIndex'} for output\n$@\n"); -- print( INDEX "<HTML>\n" ); -- print( INDEX "<HEAD>\n" ); -+ my $jsdirindex = $fileNames{'jsDirIndex'}; -+ my $jsdirindextmp = $jsdirindex . ".tmp"; -+ open( INDEX, ">${jsdirindextmp}") -+ || die("$0: Failed to open file ${jsdirindextmp} for output\n$@\n"); -+ if( "$opt_prepend" ne '' ) { -+ print( INDEX "${opt_prepend}" ); -+ } -+ print( INDEX "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<HTML>\n<HEAD>\n" ); - print( INDEX "</HEAD>\n" ); -- print( INDEX q/<SCRIPT LANGUAGE="JavaScript" SRC="/ . $fileNames{'jsVariables'} . q!"></SCRIPT>! . "\n" ); -- print( INDEX q/<SCRIPT LANGUAGE="JavaScript" SRC="/ . $fileNames{'jsFunctions'} . q!"></SCRIPT>! . "\n" ); -- print( INDEX "<SCRIPT LANGUAGE=\"JavaScript\">\n" ); -+ print( INDEX q/<SCRIPT TYPE="text\/javascript" SRC="/ . $fileNames{'jsVariables'} . q!"></SCRIPT>! . "\n" ); -+ print( INDEX q/<SCRIPT TYPE="text\/javascript" SRC="/ . $fileNames{'jsFunctions'} . q!"></SCRIPT>! . "\n" ); -+ print( INDEX "<SCRIPT TYPE=\"text/javascript\">\n"); - print( INDEX q/document.write(returnFrameHTML());/ . "\n" ); - print( INDEX q/document.close();/ . "\n" ); - print( INDEX "</SCRIPT>\n" ); - print( INDEX "</HTML>\n" ); - close( INDEX ); -+ FileChoose($jsdirindex, $jsdirindextmp); - } - - - # ----- Output Frame Directory File (usally ".indexdir.html") ------ - # -- open( INDEX, ">${opt_pageindexname}dir${opt_dirhtmlext}") -- || die("$0: Failed to open file \"${opt_pageindexname}dir${opt_dirhtmlext}\"", -+ my $indexdir = "${opt_pageindexname}dir${opt_dirhtmlext}"; -+ my $indexdirtmp = $indexdir . ".tmp"; -+ open( INDEX, ">${indexdirtmp}") -+ || die("$0: Failed to open file ${indexdirtmp}", - " for output\n$@\n"); -- print( INDEX "<HTML>\n<HEAD>\n" ); -+ if( "$opt_prepend" ne '' ) { -+ print( INDEX "${opt_prepend}" ); -+ } -+ print( INDEX "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<HTML>\n<HEAD>\n" ); - # Charset is better before title - print( INDEX " <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=${opt_metacharset}\">\n" ) - if( "$opt_metacharset" ne '' ); -@@ -2224,44 +2424,154 @@ - print( INDEX " <BASE TARGET=\"$opt_frame_name_top\">\n" ); - - # Meta tags -- print( INDEX " <META NAME=\"GENERATOR\" CONTENT=\"WebMagick/$webmagickInfo{version} [WebMagick]\">\n" ); -- print( INDEX " <META NAME=\"Author\" CONTENT=\"${opt_metaauthor}\">\n" ) -+ print( INDEX " <META NAME=\"generator\" CONTENT=\"WebMagick/$webmagickInfo{version} [WebMagick]\">\n" ) -+ if (!$opt_anonymous); -+ print( INDEX " <META NAME=\"author\" CONTENT=\"${opt_metaauthor}\">\n" ) - if( "$opt_metaauthor" ne '' ); -- print( INDEX " <META NAME=\"Description\" CONTENT=\"${opt_metadescription}\">\n" ) -+ print( INDEX " <META NAME=\"description\" CONTENT=\"${opt_metadescription}\">\n" ) - if( "$opt_metadescription" ne '' ); -- print( INDEX " <META NAME=\"Keywords\" CONTENT=\"${opt_metakeywords}\">\n" ) -+ print( INDEX " <META NAME=\"keywords\" CONTENT=\"${opt_metakeywords}\">\n" ) - if( "$opt_metakeywords" ne '' ); -- print( INDEX " <META NAME=\"Classification\" CONTENT=\"${opt_metaclassification}\">\n" ) -+ print( INDEX " <META NAME=\"classification\" CONTENT=\"${opt_metaclassification}\">\n" ) - if( "$opt_metaclassification" ne '' ); - # The value of $opt_metaexpires should be similar to: - # "Tue, 20 Aug 1996 14:25:27 GMT" -- print( INDEX " <META HTTP-EQUIV=\"Expires\" CONTENT=\"${opt_metaexpires}\">\n" ) -+ print( INDEX " <META HTTP-EQUIV=\"expires\" CONTENT=\"${opt_metaexpires}\">\n" ) - if( "$opt_metaexpires" ne '' ); - print( INDEX " <LINK REL=\"stylesheet\" type=\"text/css\" HREF=\"${opt_stylesheet}\">\n") - if ("$opt_stylesheet" ne ''); -- -+ print( INDEX " $opt_headins\n") -+ if ("$opt_headins" ne ''); -+ - print( INDEX "</HEAD>\n" ); - print( INDEX "<BODY\n" ); -- unless ("$opt_stylesheet" ne '') -- { -- print( INDEX " TEXT=\"${opt_dircolorfore}\"\n" ); -- print( INDEX " BGCOLOR=\"${opt_dircolorback}\"\n" ) -- if $opt_dircolorback ne 'false'; -- print( INDEX " BACKGROUND=\"$iconImageUrls{dirbackground}\"\n" ) -- if defined $iconImageUrls{dirbackground}; -- print( INDEX " LINK=\"${opt_dircolorlink}\"\n" ); -- print( INDEX " VLINK=\"${opt_dircolorvlink}\"\n" ); -- print( INDEX " ALINK=\"${opt_dircoloralink}\"" ); -- } -+ print( INDEX " $opt_bodytagins\n" ) -+ if ("$opt_bodytagins" ne ''); -+ print( INDEX " TEXT=\"${opt_dircolorfore}\"\n" ); -+ print( INDEX " BGCOLOR=\"${opt_dircolorback}\"\n" ) -+ if $opt_dircolorback ne 'false'; -+ print( INDEX " BACKGROUND=\"$iconImageUrls{dirbackground}\"\n" ) -+ if defined $iconImageUrls{dirbackground}; -+ print( INDEX " LINK=\"${opt_dircolorlink}\"\n" ); -+ print( INDEX " VLINK=\"${opt_dircolorvlink}\"\n" ); -+ print( INDEX " ALINK=\"${opt_dircoloralink}\"" ); - print( INDEX ">\n"); - print( INDEX $pagedirhtml ); - print( INDEX "</BODY></HTML>\n" ); - close( INDEX ); -- -+ FileChoose($indexdir, $indexdirtmp); - - return ( 0 ); - } - -+# -+# Navigation buttons -+# -+sub writePicNav { -+ local *PICHTML = shift; -+ my $pNumber = shift; -+ my $imageNum = shift; -+ my $target = shift; -+ my $url; -+ -+ print(PICHTML "<DIV class='wm_picnav'>"); -+ -+ # Must be visible at each page, if no frames -+ if (!$opt_frames) { -+ -+ # --- readme link --- -+ if ( $haveReadme ) { -+ print (PICHTML "<A HREF=\"${opt_readme}\"><IMG\n", -+ "SRC=\"$iconImageUrls{'help'}\" $iconImageSizes{'help'} TITLE=\"${opt_msg_readme}\" ALT=\"${opt_msg_readme}\" BORDER=0></A>\n"); -+ } -+ } -+ -+ # up -+ if ( (!$opt_frames || $opt_framestyle == 1) && $opt_pichtmlupfirst ) { -+ if ($opt_frames) { -+ print ( PICHTML "<A HREF=\"${opt_pageindexname}${pageNumber}${opt_htmlext}\""); -+ print ( PICHTML " TARGET=\"$frameTargets{'thumbview'}\"") -+ } else { -+ print ( PICHTML "<A HREF=\"${pNumber}${opt_indexname}\""); -+ } -+ print ( PICHTML "><IMG SRC=\"$iconImageUrls{'up'}\"", -+ " $iconImageSizes{'up'} TITLE=\"${opt_msg_up}\" ALT=\"${opt_msg_up}\" BORDER=0></A>\n"); -+ } -+ -+ # prev -+ if (($imageNum == 0) && ($pageNumber == 1)) { -+ #BRAD: Added edgelinks link back to index -+ if ( $opt_edgelinksindex ) { -+ if ($opt_frames) { -+ print ( PICHTML "<A HREF=\"${opt_pageindexname}${pageNumber}${opt_htmlext}\""); -+ print ( PICHTML " TARGET=\"$frameTargets{'thumbview'}\">"); -+ } else { -+ print ( PICHTML "<A HREF=\"${pNumber}${opt_indexname}\">"); -+ } -+ } -+ print ( PICHTML "<IMG SRC=\"$iconImageUrls{'prev_gray'}\"", -+ " $iconImageSizes{'prev_gray'} ALT=\"\" BORDER=0>\n"); -+ if ( $opt_edgelinksindex ) { -+ print ( PICHTML "</A>"); -+ } -+ } else { -+ print ( PICHTML "<A${target} HREF=\""); -+ if ($imageNum == 0 && $pageNumber != 1) { -+ $url = $imageNames[$pageNumber - 2][$#{$imageNames[$pageNumber - 2]}]; -+ } else { -+ $url = $imageNames[$pageNumber - 1][${imageNum} - 1]; -+ } -+ $url =~ s/(.*)\.\w+$/$1/; -+ print ( PICHTML "" . escapeurl($url . $opt_pichtmlext)); -+ print ( PICHTML "\"><IMG SRC=\"$iconImageUrls{'prev'}\"", -+ " $iconImageSizes{'prev'} TITLE=\"${opt_msg_prev}\" ALT=\"${opt_msg_prev}\" BORDER=0></A>\n"); -+ } -+ -+ # up if in middle (added by BRAD) -+ if ( (!$opt_frames || $opt_framestyle == 1) && !$opt_pichtmlupfirst ) { -+ if ($opt_frames) { -+ print ( PICHTML "<A HREF=\"${opt_pageindexname}${pageNumber}${opt_htmlext}\""); -+ print ( PICHTML " TARGET=\"$frameTargets{'thumbview'}\"") -+ } else { -+ print ( PICHTML "<A HREF=\"${pNumber}${opt_indexname}\""); -+ } -+ print ( PICHTML "><IMG SRC=\"$iconImageUrls{'up'}\"", -+ " $iconImageSizes{'up'} TITLE=\"${opt_msg_up}\" ALT=\"${opt_msg_up}\" BORDER=0></A>\n"); -+ } -+ -+ #next -+ if (($pageNumber == $numPages) && ($imageNum == $#{$imageNames[$pageNumber - 1]})) { -+ #BRAD: Added edge links back to index -+ if ( $opt_edgelinksindex ) { -+ if ($opt_frames) { -+ print ( PICHTML "<A HREF=\"${opt_pageindexname}${pageNumber}${opt_htmlext}\""); -+ print ( PICHTML " TARGET=\"$frameTargets{'thumbview'}\">"); -+ } else { -+ print ( PICHTML "<A HREF=\"${pNumber}${opt_indexname}\">"); -+ } -+ } -+ print ( PICHTML "<IMG SRC=\"$iconImageUrls{'next_gray'}\"", -+ " $iconImageSizes{'next_gray'} ALT=\"\" BORDER=0>\n"); -+ if ( $opt_edgelinksindex ) { -+ print ( PICHTML "</A>"); -+ } -+ } else { -+ print ( PICHTML "<A${target} HREF=\""); -+ if (($imageNum == $#{$imageNames[$pageNumber - 1]}) && $pageNumber != $numPages) { -+ $url = $imageNames[$pageNumber][0]; -+ } else { -+ $url = $imageNames[$pageNumber - 1][${imageNum} + 1]; -+ } -+ $url =~ s/(.*)\.\w+$/$1/; -+ print ( PICHTML "" . escapeurl($url . $opt_pichtmlext)); -+ print ( PICHTML "\"><IMG SRC=\"$iconImageUrls{'next'}\"", -+ " $iconImageSizes{'next'} TITLE=\"${opt_msg_next}\" ALT=\"${opt_msg_next}\" BORDER=0></A>\n"); -+ } -+ -+ print(PICHTML "</DIV>"); -+ -+ return; -+} - - # - # Write out page index files -@@ -2279,7 +2589,7 @@ - # Calculate page index bar - # No link for current page - # Nothing at all when there is only one page. -- $indexbar = "<NOBR>"; -+ $indexbar = ""; - - # Must be visible at each page, if no frames - if (!$opt_frames) { -@@ -2287,7 +2597,7 @@ - # --- readme link --- - if ( $haveReadme ) { - $indexbar .= "<A HREF=\"${opt_readme}\"><IMG\n" . -- "SRC=\"$iconImageUrls{'help'}\" $iconImageSizes{'help'} ALT=\"${opt_msg_readme}\" BORDER=0></A>\n"; -+ "SRC=\"$iconImageUrls{'help'}\" $iconImageSizes{'help'} TITLE=\"${opt_msg_readme}\" ALT=\"${opt_msg_readme}\" BORDER=0></A>\n"; - } - - # --- up link --- -@@ -2295,7 +2605,7 @@ - - if ( "$upindexname" ne 'NOLINK' ) { - $indexbar .= "<A HREF=\"../${upindexname}\"><IMG\n" . -- "SRC=\"$iconImageUrls{'up'}\" $iconImageSizes{'up'} ALT=\"${opt_msg_up}\" BORDER=0></A>\n"; -+ "SRC=\"$iconImageUrls{'up'}\" $iconImageSizes{'up'} TITLE=\"${opt_msg_up}\" ALT=\"${opt_msg_up}\" BORDER=0></A>\n"; - } - - } -@@ -2312,7 +2622,7 @@ - $indexbar .= " TARGET=\"$frameTargets{'thumbview'}\"" - if ($opt_frames); - $indexbar .= "><IMG\n" . -- "SRC=\"$iconImageUrls{'prev'}\" $iconImageSizes{'prev'} ALT=\"${opt_msg_prev}\" BORDER=0></A>\n"; -+ "SRC=\"$iconImageUrls{'prev'}\" $iconImageSizes{'prev'} TITLE=\"${opt_msg_prev}\" ALT=\"${opt_msg_prev}\" BORDER=0></A>\n"; - } - - # --- next link --- -@@ -2322,15 +2632,13 @@ - $indexbar .= " TARGET=\"$frameTargets{'thumbview'}\"" - if ($opt_frames); - $indexbar .= "><IMG\n" . -- "SRC=\"$iconImageUrls{'next'}\" $iconImageSizes{'next'} ALT=\"${opt_msg_next}\" BORDER=0></A>\n"; -+ "SRC=\"$iconImageUrls{'next'}\" $iconImageSizes{'next'} TITLE=\"${opt_msg_next}\" ALT=\"${opt_msg_next}\" BORDER=0></A>\n"; - } else { - # Print a grayed out arrow to maintain alignment - $indexbar .= "<IMG SRC=\"$iconImageUrls{'next_gray'}\" $iconImageSizes{'next_gray'} ALT=\"\" BORDER=0>\n"; - } - } - -- $indexbar .= "</NOBR>"; -- - # --- page links --- - if( $numPages > 1 ) { - my $page; -@@ -2350,9 +2658,14 @@ - } - } - -- open( INDEX, ">$fileNames{'htmlCurrentIndex'}") -- || die("$0: Failed to open file $fileNames{'htmlCurrentIndex'} for output\n$@\n"); -- print( INDEX "<HTML>\n<HEAD>\n" ); -+ my $pageindex = $fileNames{'htmlCurrentIndex'}; -+ my $pageindextmp = $pageindex . ".tmp"; -+ open( INDEX, ">${pageindextmp}") -+ || die("$0: Failed to open file ${pageindextmp} for output\n$@\n"); -+ if( "$opt_prepend" ne '' ) { -+ print( INDEX "${opt_prepend}" ); -+ } -+ print( INDEX "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<HTML>\n<HEAD>\n" ); - # Charset is better before title - print( INDEX " <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=${opt_metacharset}\">\n" ) - if( "$opt_metacharset" ne '' ); -@@ -2361,50 +2674,88 @@ - if ($opt_frames); - - # Meta tags -- print( INDEX " <META NAME=\"GENERATOR\" CONTENT=\"WebMagick/$webmagickInfo{version} [WebMagick]\">\n" ); -- print( INDEX " <META NAME=\"Author\" CONTENT=\"${opt_metaauthor}\">\n" ) -+ print( INDEX " <META NAME=\"generator\" CONTENT=\"WebMagick/$webmagickInfo{version} [WebMagick]\">\n" ) -+ if (!$opt_anonymous); -+ print( INDEX " <META NAME=\"author\" CONTENT=\"${opt_metaauthor}\">\n" ) - if( "$opt_metaauthor" ne '' ); -- print( INDEX " <META NAME=\"Description\" CONTENT=\"${opt_metadescription}\">\n" ) -+ print( INDEX " <META NAME=\"description\" CONTENT=\"${opt_metadescription}\">\n" ) - if( "$opt_metadescription" ne '' ); -- print( INDEX " <META NAME=\"Keywords\" CONTENT=\"${opt_metakeywords}\">\n" ) -+ print( INDEX " <META NAME=\"keywords\" CONTENT=\"${opt_metakeywords}\">\n" ) - if( "$opt_metakeywords" ne '' ); -- print( INDEX " <META NAME=\"Classification\" CONTENT=\"${opt_metaclassification}\">\n" ) -+ print( INDEX " <META NAME=\"classification\" CONTENT=\"${opt_metaclassification}\">\n" ) - if( "$opt_metaclassification" ne '' ); - # The value of $opt_metaexpires should be similar to: - # "Tue, 20 Aug 1996 14:25:27 GMT" -- print( INDEX " <META HTTP-EQUIV=\"Expires\" CONTENT=\"${opt_metaexpires}\">\n" ) -+ print( INDEX " <META HTTP-EQUIV=\"expires\" CONTENT=\"${opt_metaexpires}\">\n" ) - if( "$opt_metaexpires" ne '' ); - print( INDEX " <LINK REL=\"stylesheet\" type=\"text/css\" HREF=\"${opt_stylesheet}\">\n") - if ("$opt_stylesheet" ne ''); -+ print( INDEX " $opt_headins\n") -+ if ("$opt_headins" ne ''); - - print( INDEX "</HEAD>\n" ); - print( INDEX "<BODY\n" ); -- unless ("$opt_stylesheet" ne '') -- { -- print( INDEX " TEXT=\"${opt_colorfore}\"\n" ); -- print( INDEX " BGCOLOR=\"${opt_colorback}\"\n" ); -- print( INDEX " BACKGROUND=\"$iconImageUrls{background}\"\n" ) -- if defined $iconImageUrls{background}; -- print( INDEX " LINK=\"${opt_colorlink}\"\n" ); -- print( INDEX " VLINK=\"${opt_colorvlink}\"\n" ); -- print( INDEX " ALINK=\"${opt_coloralink}\"" ); -- } -+ print( INDEX " $opt_bodytagins\n" ) -+ if ("$opt_bodytagins" ne ''); -+ print( INDEX " TEXT=\"${opt_colorfore}\"\n" ); -+ print( INDEX " BGCOLOR=\"${opt_colorback}\"\n" ); -+ print( INDEX " BACKGROUND=\"$iconImageUrls{background}\"\n" ) -+ if defined $iconImageUrls{background}; -+ print( INDEX " LINK=\"${opt_colorlink}\"\n" ); -+ print( INDEX " VLINK=\"${opt_colorvlink}\"\n" ); -+ print( INDEX " ALINK=\"${opt_coloralink}\"" ); - print( INDEX ">\n"); - - print( INDEX "${opt_header}\n" ) if ("$opt_header" ne ''); - - # Leave page blank unless there is something to show - if( $numimages > 0 ) { -- # Total HACK!!! -- if( !$opt_frames || $opt_framestyle == 1 ) { -- print( INDEX "<p><FONT SIZE=\"-1\">${opt_msg_index_of_files}\"$imageNames[$pageNumber - 1][0]\" ${opt_msg_index_through}", -- " \"$imageNames[$pageNumber - 1][$numimages-1]\"</FONT></p>\n" ); -+ #BRAD: Added directory description -+ if( $imageCaptions{'pageTitle'} ne '') { -+ print( INDEX "<p><FONT SIZE=\"+3\">$imageCaptions{'pageTitle'}</FONT></p>\n"); -+ print( STDERR "Using custom PageDescription\n") if $opt_debug; - } -- print( INDEX "$indexbar<BR>\n" ); - -- if ($opt_tables) -+ if( $imageCaptions{'pageTitle'} eq '' && -+ $opt_indexinfo && (!$opt_frames || $opt_framestyle == 1) ) { -+ my $desc1 = ''; -+ my $desc2 = ''; -+ if (defined($imageCaptions{$imageNames[$pageNumber -1][0]})) { -+ $desc1=escapehtml($imageCaptions{$imageNames[$pageNumber -1][0]}); -+ } elsif (defined($imageLabels{$imageNames[$pageNumber -1][0]})) { -+ $desc1=escapehtml($imageLabels{$imageNames[$pageNumber -1][0]}); -+ } else { -+ $desc1=escapehtml($imageNames[$pageNumber - 1][0]); -+ } -+ if (defined($imageCaptions{$imageNames[$pageNumber -1][$numimages-1]})) { -+ $desc2=escapehtml($imageCaptions{$imageNames[$pageNumber -1][$numimages-1]}); -+ } elsif (defined($imageLabels{$imageNames[$pageNumber -1][$numimages-1]})) { -+ $desc2=escapehtml($imageLabels{$imageNames[$pageNumber -1][$numimages-1]}); -+ } else { -+ $desc2=escapehtml($imageNames[$pageNumber - 1][$numimages-1]); -+ } -+ print( INDEX "<DIV class='wm_msgindex'>${opt_msg_index_of_files}\"", -+ $desc1, "\" ${opt_msg_index_through}", " \"", $desc2, -+ "\"</DIV>\n" ); -+ } -+ print( INDEX "<DIV class='wm_indexbar'>$indexbar</DIV>\n" ); -+ -+ if ($opt_tables || $opt_divs) - { -- print INDEX "<TABLE WIDTH=\"90%\">"; -+ if (!$opt_divs) { -+ if ( !$opt_fancytables ) { -+ print INDEX "<TABLE ${opt_tables_params}>"; -+ print INDEX "${opt_tables_top}" -+ if ($opt_tables_top ne ''); -+ } else { -+ #BRAD added fancy tables based entirely on the Igal program -+ #This section prints the top of the table -+ my $cols = $opt_columns; -+ if ( $numimages < $cols) { $cols=$numimages; } -+ print INDEX "<TABLE border=0 cellspacing=0 cellpadding=3 ${opt_tables_params}>\n"; -+ print INDEX "<tr><td height=$opt_fancytableheight background=\"$iconImageUrls{ft_top}\" colspan=$cols> </td></tr>"; -+ } -+ } - } - else - { -@@ -2422,144 +2773,110 @@ - } - } - print( INDEX -- "<IMG SRC=\"$montageImages[$pageNumber - 1]\" $montageImageSizes[$pageNumber - 1]", -- " USEMAP=\"#${mapname}\" BORDER=0 ISMAP>" ); -+ "<IMG SRC=\"$opt_imgprefixpath$montageImages[$pageNumber - 1]\" $montageImageSizes[$pageNumber - 1]", -+ " USEMAP=\"#${mapname}\" BORDER=0 ISMAP ALT=\"${mapname}\">" ); - print( INDEX "</A>" ) if ($opt_serversidemap); - print( INDEX "\n<MAP NAME=\"${mapname}\">\n" ); -- } # unless ( $opt_tables ) -+ } # unless ( $opt_tables || $opt_divs ) - - my $imageNum; -- for( $imageNum = 0; $imageNum <= $#{$imageNames[$pageNumber - 1]}; ++$imageNum ) { -- -+ my $maxNum = $#{$imageNames[$pageNumber-1]}; -+ -+ for( $imageNum = 0; $imageNum <= ${maxNum}; ++$imageNum ) { -+ - my $pic = $imageNames[$pageNumber - 1][$imageNum]; - my $pichtml; -+ my $altlabel; -+ my $altfinallabel; - my $target = ''; -+ - if ($opt_pichtml && $opt_frames && "$opt_pichtmltarget" ne '') { - $target = " TARGET=\"${opt_pichtmltarget}\""; - } -+ if (defined($imageLabels{$pic})) { -+ $altlabel = $imageLabels{$pic}; -+ } else { -+ ($altlabel = $pic) =~ s/(.*)\.\w+$/$1/; -+ $altlabel =~ s/$opt_pichtmlaltdrop//; -+ $altlabel =~ y/_/ /; # Usual space replacement in file name -+ } -+ $altfinallabel = $opt_pichtmlaltstart . escapehtml($altlabel) . $opt_pichtmlaltend; - - if ( $opt_pichtml ) { -- -- $pichtml = $pic . $opt_pichtmlext; -- -- open( PICHTML, ">$pichtml") -- || die("$0: Failed to open file $pichtml for output\n$@\n"); -- print( PICHTML "<HTML>\n<HEAD>\n" ); -+ my $pichtmltmp; -+ ($pichtml = $pic) =~ s/(.*)\.\w+$/$1/; -+ $pichtml .= $opt_pichtmlext; -+ $pichtmltmp = $pichtml . ".tmp"; -+ open( PICHTML, ">$pichtmltmp") -+ || die("$0: Failed to open file ${pichtmltmp} for output\n$@\n"); -+ if( "$opt_prepend" ne '' ) { -+ print( PICHTML "${opt_prepend}" ); -+ } -+ print( PICHTML "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<HTML>\n<HEAD>\n" ); - # Charset is better before title - print( PICHTML " <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=${opt_metacharset}\">\n" ) - if( "$opt_metacharset" ne '' ); -- print( PICHTML " <TITLE>$pic</TITLE>\n" ); -+ print( PICHTML " <TITLE>${altfinallabel}</TITLE>\n" ); - - # Meta tags -- print( PICHTML " <META NAME=\"GENERATOR\" CONTENT=\"WebMagick/$webmagickInfo{version} [WebMagick]\">\n" ); -- print( PICHTML " <META NAME=\"Author\" CONTENT=\"${opt_metaauthor}\">\n" ) -+ print( PICHTML " <META NAME=\"generator\" CONTENT=\"WebMagick/$webmagickInfo{version} [WebMagick]\">\n" ) -+ if (!$opt_anonymous); -+ print( PICHTML " <META NAME=\"author\" CONTENT=\"${opt_metaauthor}\">\n" ) - if( "$opt_metaauthor" ne '' ); -- print( PICHTML " <META NAME=\"Description\" CONTENT=\"${opt_metadescription}\">\n" ) -+ print( PICHTML " <META NAME=\"description\" CONTENT=\"${opt_metadescription}\">\n" ) - if( "$opt_metadescription" ne '' ); -- print( PICHTML " <META NAME=\"Keywords\" CONTENT=\"${opt_metakeywords}\">\n" ) -+ print( PICHTML " <META NAME=\"keywords\" CONTENT=\"${opt_metakeywords}\">\n" ) - if( "$opt_metakeywords" ne '' ); -- print( PICHTML " <META NAME=\"Classification\" CONTENT=\"${opt_metaclassification}\">\n" ) -+ print( PICHTML " <META NAME=\"classification\" CONTENT=\"${opt_metaclassification}\">\n" ) - if( "$opt_metaclassification" ne '' ); - # The value of $opt_metaexpires should be similar to: - # "Tue, 20 Aug 1996 14:25:27 GMT" -- print( PICHTML " <META HTTP-EQUIV=\"Expires\" CONTENT=\"${opt_metaexpires}\">\n" ) -+ print( PICHTML " <META HTTP-EQUIV=\"expires\" CONTENT=\"${opt_metaexpires}\">\n" ) - if( "$opt_metaexpires" ne '' ); - print( PICHTML " <LINK REL=\"stylesheet\" type=\"text/css\" HREF=\"${opt_stylesheet}\">\n") - if ("$opt_stylesheet" ne ''); -+ print( PICHTML " $opt_headins\n") -+ if ("$opt_headins" ne ''); - - print( PICHTML "</HEAD>\n" ); - print( PICHTML "<BODY\n" ); -- unless ("$opt_stylesheet" ne '') -- { -- print( PICHTML " TEXT=\"${opt_colorfore}\"\n" ); -- print( PICHTML " BGCOLOR=\"${opt_colorback}\"\n" ); -- print( PICHTML " BACKGROUND=\"$iconImageUrls{background}\"\n" ) -- if defined $iconImageUrls{background}; -- print( PICHTML " LINK=\"${opt_colorlink}\"\n" ); -- print( PICHTML " VLINK=\"${opt_colorvlink}\"\n" ); -- print( PICHTML " ALINK=\"${opt_coloralink}\""); -- } -+ print( PICHTML " $opt_bodytagins\n" ) -+ if ("$opt_bodytagins" ne ''); -+ print( PICHTML " TEXT=\"${opt_colorfore}\"\n" ); -+ print( PICHTML " BGCOLOR=\"${opt_colorback}\"\n" ); -+ print( PICHTML " BACKGROUND=\"$iconImageUrls{background}\"\n" ) -+ if defined $iconImageUrls{background}; -+ print( PICHTML " LINK=\"${opt_colorlink}\"\n" ); -+ print( PICHTML " VLINK=\"${opt_colorvlink}\"\n" ); -+ print( PICHTML " ALINK=\"${opt_coloralink}\""); - print( PICHTML ">\n" ); - - print( PICHTML "$opt_pichtmltop") if ("$opt_pichtmltop" ne ''); - -- if ($opt_pichtmlputtitle) { -- print ( PICHTML "${opt_pichtmltitlestart}"); -- if (defined( $imageLabels{$pic})) { -- print( PICHTML "$imageLabels{$pic}"); -- } else { -- print( PICHTML "$pic"); -- } -- print ( PICHTML "${opt_pichtmltitleend}"); -- } -- - if ($opt_pichtmlnav) { -- print ( PICHTML "<P><NOBR>"); -- -- # Must be visible at each page, if no frames -- if (!$opt_frames) { -- -- # --- readme link --- -- if ( $haveReadme ) { -- print (PICHTML "<A HREF=\"${opt_readme}\"><IMG\n", -- "SRC=\"$iconImageUrls{'help'}\" $iconImageSizes{'help'} ALT=\"${opt_msg_readme}\" BORDER=0></A>\n"); -- } -- } -+ writePicNav(*PICHTML, $pNumber, $imageNum, $target); -+ } - -- # up -- if (!$opt_frames || $opt_framestyle == 1) { -- if ($opt_frames) { -- print ( PICHTML "<A HREF=\"${opt_pageindexname}${pageNumber}${opt_htmlext}\""); -- print ( PICHTML " TARGET=\"$frameTargets{'thumbview'}\"") -- } else { -- print ( PICHTML "<A HREF=\"${pNumber}${opt_indexname}\""); -- } -- print ( PICHTML "><IMG SRC=\"$iconImageUrls{'up'}\"", -- " $iconImageSizes{'up'} ALT=\"${opt_msg_up}\" BORDER=0></A>\n"); -- -- } -- -- # prev -- if (($imageNum == 0) && ($pageNumber == 1)) { -- print ( PICHTML "<IMG SRC=\"$iconImageUrls{'prev_gray'}\"", -- " $iconImageSizes{'prev_gray'} BORDER=0>\n"); -- } else { -- print ( PICHTML "<A${target} HREF=\""); -- if ($imageNum == 0 && $pageNumber != 1) { -- print ( PICHTML $imageNames[$pageNumber - 2][$#{$imageNames[$pageNumber - 2]}]); -- } else { -- print ( PICHTML $imageNames[$pageNumber - 1][${imageNum} - 1]); -- } -- print ( PICHTML $opt_pichtmlext); -- print ( PICHTML "\"><IMG SRC=\"$iconImageUrls{'prev'}\"", -- " $iconImageSizes{'prev'} ALT=\"${opt_msg_prev}\" BORDER=0></A>\n"); -- -- } -- -- #next -- if (($pageNumber == $numPages) && ($imageNum == $#{$imageNames[$pageNumber - 1]})) { -- print ( PICHTML "<IMG SRC=\"$iconImageUrls{'next_gray'}\"", -- " $iconImageSizes{'next_gray'} BORDER=0>\n"); -- } else { -- print ( PICHTML "<A${target} HREF=\""); -- if (($imageNum == $#{$imageNames[$pageNumber - 1]}) && $pageNumber != $numPages) { -- print ( PICHTML $imageNames[$pageNumber][0]); -- } else { -- print ( PICHTML $imageNames[$pageNumber - 1][${imageNum} + 1]); -- } -- print ( PICHTML $opt_pichtmlext); -- print ( PICHTML "\"><IMG SRC=\"$iconImageUrls{'next'}\"", -- " $iconImageSizes{'next'} ALT=\"${opt_msg_next}\" BORDER=0></A>\n"); -- -- } -- -- print ( PICHTML "</NOBR><BR>"); -+ if ($opt_pichtmlputtitle && $opt_pichtmltitletop) { -+ print ( PICHTML "${opt_pichtmltitlestart}${altlabel}${opt_pichtmltitleend}"); - } - -- if ( $pic =~ /\.(jpg|jpeg?|gif|xbm|png)$/i ) { -- print( PICHTML "<IMG SRC=\"$pic\" ALT=\"\">" ); -+ if ($pic =~ /\.(jpg|jpeg?|gif|xbm|png|bmp|ico)$/i) { -+ print( PICHTML "<A HREF=\"$opt_pichtmllink\">") -+ if ($opt_pichtmllink ne ''); -+ print( PICHTML "<IMG class='wm_pic' SRC=\"$opt_imgprefixpath", escapeurl($pic), "\" BORDER=0 ALT=\"${altfinallabel}\" TITLE=\"${altfinallabel}\">" ); -+ print( PICHTML "</A>") -+ if ($opt_pichtmllink ne ''); - } else { -- print( PICHTML "<A HREF=\"", escapeurl($pic), "\"><BIG><B>$pic</B></A> ", fsize($pic), "</BIG>" ); -+ print( PICHTML "<A HREF=\"", escapeurl($pic), "\"><BIG><B>", escapehtml($pic), "</B></A> ", fsize($pic), "</BIG>" ); -+ } -+ -+ if ($opt_pichtmlputtitle && !$opt_pichtmltitletop) { -+ print ( PICHTML "${opt_pichtmltitlestart}${altlabel}${opt_pichtmltitleend}"); -+ } -+ -+ if ($opt_pichtmlnav) { -+ writePicNav(*PICHTML, $pNumber, $imageNum, $target); - } - - print( PICHTML "$opt_pichtmlbottom\n") if ("$opt_pichtmlbottom" ne ''); -@@ -2567,31 +2884,36 @@ - print( PICHTML "</BODY>\n" ); - print( PICHTML "</HTML>\n" ); - close ( PICHTML ); -+ FileChoose($pichtml, $pichtmltmp); - -- unless ($opt_tables) -+ unless ($opt_tables || $opt_divs) - { -- print( INDEX " <AREA${target} HREF=\"", -- escapeurl($pichtml), "\" SHAPE=RECT COORDS=", $imageThumbCoords[$pageNumber - 1][$imageNum],">\n" ); -+ print( INDEX " <AREA${target} ALT=\"${altlabel}\" TITLE=\"${altlabel}\" HREF=\"", -+ escapeurl($pichtml), "\" SHAPE=RECT COORDS=\"", $imageThumbCoords[$pageNumber - 1][$imageNum],"\">\n" ); - } -- } else -- { -- unless ($opt_tables) -+ } else -+ { -+ unless ($opt_tables || $opt_divs) - { -- print( INDEX " <AREA HREF=\"", escapeurl($pic), -- "\" SHAPE=RECT COORDS=", $imageThumbCoords[$pageNumber - 1][$imageNum],">\n" ); -+ print( INDEX " <AREA ALT=\"${altlabel}\" TITLE=\"${altlabel}\" HREF=\"", escapeurl($pic), -+ "\" SHAPE=RECT COORDS=\"", $imageThumbCoords[$pageNumber - 1][$imageNum],"\">\n" ); - } - } - - -- if ($opt_tables) -+ if ($opt_tables || $opt_divs) - { -- if ($imageNum%$opt_columns == 0) -- { -- print INDEX "<TR ALIGN=CENTER VALIGN=TOP>"; -+ if ($opt_tables) { -+ if ($imageNum%$opt_columns == 0) -+ { -+ print INDEX "<TR ALIGN=CENTER VALIGN=TOP>"; -+ } -+ -+ print INDEX "<TD BGCOLOR=${opt_tablebackcolor}>"; -+ } else { -+ print INDEX "<DIV class='wm_thumb'><DIV class='wm_thpic'>"; - } -- -- print INDEX "<TD>"; -- -+ - if ($opt_pichtml) { - print (INDEX "<A${target} HREF=\"", escapeurl($pichtml), "\">"); - } else { -@@ -2601,28 +2923,68 @@ - # TODO: make sure the thumbnails are created, and get some image sizes - # TODO: save the labels in a new array, maybe same with sizes - if ( $thumbImageSizes{$pic}) { -- print (INDEX "<IMG SRC=\"", $opt_cachedir, "/", escapeurl($pic), ".\L${opt_cacheformat}", "\" $thumbImageSizes{$pic} BORDER=0>"); -+ print (INDEX "<IMG SRC=\"$opt_imgprefixpath", $opt_cachedir, "/", escapeurl($pic), ".\L${opt_cacheformat}", -+ "\" $thumbImageSizes{$pic} ALT=\"${altfinallabel}\" TITLE=\"${altfinallabel}\" BORDER=0>"); - } else { -- print (INDEX "<IMG SRC=\"", escapeurl($pic), "\" BORDER=0>"); -+ print (INDEX "<IMG SRC=\"$opt_imgprefixpath", escapeurl($pic), -+ "\" ALT=\"${altfinallabel}\" TITLE=\"${altfinallabel}\" BORDER=0>"); - } - -- print (INDEX "</A><BR><FONT SIZE=\"-1\">" . $tableImageLabels{$imageNames[$pageNumber - 1][$imageNum]} . "</FONT></TD>\n"); -- -- if ($imageNum%$opt_columns == ($opt_columns - 1)) -- { -- print INDEX "</TR>"; -+ print (INDEX "</A>"); -+ if ($opt_divs) { -+ print INDEX "</DIV>"; - } -- } # if ($opt_tables) -+ if ($opt_thumblabel && $opt_thumblabel ne 'false') { -+ if ($opt_pichtml) { -+ print (INDEX "<A${target} CLASS='wm_label' HREF=\"", escapeurl($pichtml), "\">"); -+ } else { -+ print (INDEX "<A CLASS='wm_label' HREF=\"", escapeurl($pic), "\">"); -+ } -+ print (INDEX -+ $tableImageLabels{$imageNames[$pageNumber - 1][$imageNum]}, -+ "</A>"); -+ } -+ -+ if ($opt_tables) { -+ print (INDEX "</TD>\n"); -+ -+ if ($imageNum%$opt_columns == ($opt_columns - 1)) -+ { -+ print INDEX "</TR>"; -+ #BRAD: Middle lines in a fancy tables -+ if ( $opt_fancytables && $imageNum != $maxNum) { -+ my $cols = $opt_columns; -+ if ( $maxNum - $imageNum < $opt_columns ) { -+ $cols = $maxNum%$opt_columns+1; -+ } -+ print INDEX "<tr><td height=${opt_fancytableheight} background=\"$iconImageUrls{'ft_top'}\" colspan=${opt_columns}> </td></tr>", -+ "<tr><td colspan=${opt_columns}=${opt_columns}> </td></tr>", -+ "<tr><td height=${opt_fancytableheight} background=\"$iconImageUrls{'ft_top'}\" colspan=${cols}> </td></tr>" ; -+ } -+ } -+ } else { -+ print INDEX "</DIV>"; -+ } -+ } # if ($opt_tables || $opt_divs) - - } # for each picture - -- if ($opt_tables) -+ if ($opt_tables || $opt_divs) - { -- unless ($imageNum%$opt_columns == ($opt_columns - 1)) -- { -- print INDEX "</TR>"; -+ if ($opt_tables) { -+ unless ($imageNum%$opt_columns == ($opt_columns - 1)) -+ { -+ print INDEX "</TR>"; -+ } -+ #BRAD:The bottom of a fancy table -+ if ( $opt_fancytables ) { -+ my $cols = $maxNum%$opt_columns+1; -+ print INDEX "<tr><td height=${opt_fancytableheight} background=\"$iconImageUrls{'ft_top'}\" colspan=${cols}> </td></tr>"; -+ } -+ print INDEX "${opt_tables_bottom}" -+ if ($opt_tables_bottom ne ''); -+ print (INDEX "</TABLE>\n") - } -- print (INDEX "</TABLE>\n") - } else {print( INDEX "</MAP>\n" );} - } - -@@ -2630,6 +2992,9 @@ - - # Print Copyright info on non-blank pages. - if( $numimages > 0 ) { -+ if( $opt_centerfooter ) { -+ print( INDEX "<CENTER>\n" ); -+ } - if( "${opt_address}" ne '' ) { - print( INDEX "<BR><ADDRESS>${opt_address}</ADDRESS>\n" ); - } -@@ -2642,13 +3007,17 @@ - # If anonymous, don't show copyright and address info - if( ! $opt_anonymous ) { - print( INDEX "<HR>\n${opt_msg_produced_by} " ); -- print( INDEX "<NOBR><A HREF=\"http://webmagick.sourceforge.net/\"", -+ print( INDEX "<A HREF=\"http://webmagick.sourceforge.net/\"", - " TARGET=\"_top\">WebMagick</A>" ); -- print( INDEX " $webmagickInfo{version}</NOBR>, <NOBR>${opt_msg_copyright}©</NOBR> <NOBR>Bob Friesenhahn</NOBR>\n" ); -+ print( INDEX " $webmagickInfo{version}, ${opt_msg_copyright}© Bob Friesenhahn\n" ); - } - if( "$htmlOpts{'dateText'}" ne '' || !$opt_anonymous) { - print( INDEX "</FONT>\n" ); - } -+ if( $opt_centerfooter ) { -+ print( INDEX "</CENTER>\n"); -+ } -+ - } - - print( INDEX "</BODY>\n" ); -@@ -2656,6 +3025,7 @@ - - # Close current HTML index file - close( INDEX ); -+ FileChoose($pageindex, $pageindextmp); - - return ( $errorstat ); - } -@@ -2671,28 +3041,34 @@ - # Write JavaScript "index" page. - # This page loads JavaScript source files and ensures that windows are drawn - # -- open( JSINDEX, ">$fileNames{'jsPageIndex'}") -- || die("$0: Failed to open file $fileNames{'jsPageIndex'} for output\n$@\n"); -- -- print( JSINDEX "<HTML>\n"); -- print( JSINDEX "<HEAD>\n"); -- print( JSINDEX "<SCRIPT LANGUAGE=\"JavaScript\" SRC=\"$fileNames{'jsVariables'}\"></SCRIPT>\n"); -- print( JSINDEX "<SCRIPT LANGUAGE=\"JavaScript\" SRC=\"$fileNames{'jsFunctions'}\"></SCRIPT>\n"); -+ my $jspageindex = $fileNames{'jsPageIndex'}; -+ my $jspageindextmp = $jspageindex . ".tmp"; -+ open( JSINDEX, ">${$jspageindextmp}") -+ || die("$0: Failed to open file ${$jspageindextmp} for output\n$@\n"); -+ -+ if( "$opt_prepend" ne '' ) { -+ print( JSINDEX "${opt_prepend}" ); -+ } -+ print( JSINDEX "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<HTML>\n<HEAD>\n" ); -+ print( JSINDEX "<SCRIPT TYPE=\"text/javascript\" SRC=\"$fileNames{'jsVariables'}\"></SCRIPT>\n"); -+ print( JSINDEX "<SCRIPT TYPE=\"text/javascript\" SRC=\"$fileNames{'jsFunctions'}\"></SCRIPT>\n"); - print( JSINDEX "</HEAD>\n"); - print( JSINDEX "<BODY>\n"); -- print( JSINDEX "<SCRIPT LANGUAGE=\"JavaScript\">\n"); -+ print( JSINDEX "<SCRIPT TYPE=\"text/javascript\">\n"); - print( JSINDEX " top.drawWindows();\n"); - print( JSINDEX "</SCRIPT>\n"); - print( JSINDEX "</BODY>\n"); - print( JSINDEX "</HTML>\n"); - close( JSINDEX ); -- -+ FileChoose($jspageindex, $jspageindextmp); - - # - # JavaScript Variable definitions - # -- open( JSVARS, ">$fileNames{'jsVariables'}") -- || die("$0: Failed to open file $fileNames{'jsVariables'} for output\n$@\n"); -+ my $jsvariables = $fileNames{'jsVariables'}; -+ my $jsvariablestmp = $jsvariables . ".tmp"; -+ open( JSVARS, ">${jsvariablestmp}") -+ || die("$0: Failed to open file ${$jsvariablestmp} for output\n$@\n"); - - print( JSVARS "//\n// WebMagick Run Status File -- JavaScript Format\n//\n" ); - -@@ -2714,6 +3090,8 @@ - - # Image labels - print( JSVARS "\n// image titles\n", jsHash( 'imageLabels', \%imageLabels ) ); -+ # Image captions -+ print( JSVARS "\n// image captions\n", jsHash( 'imageCaptions', \%imageCaptions ) ); - - # Image labels - #print( JSVARS "\n// table image titles\n", jsHash( 'tableImageLabels', \%tableImageLabels ) ); -@@ -2775,6 +3153,8 @@ - print( JSVARS "\nvar jsVarsLoaded = 1;\n" ); - - close( JSVARS ); -+ FileChoose($jsvariables, $jsvariablestmp); -+ - print("Done writing JavaScript\n") if $opt_debug; - } - -@@ -2803,6 +3183,8 @@ - - # Image labels - print( PERLVARS "\n# image titles\n", plHash( 'imageLabels', \%imageLabels ) ); -+ # Image captions -+ print( PERLVARS "\n# image captions\n", plHash( 'imageCaptions', \%imageCaptions ) ); - - # Table image labels - print( PERLVARS "\n# table image titles\n", plHash( 'tableImageLabels', \%tableImageLabels ) ); -@@ -2816,6 +3198,10 @@ - print( PERLVARS "\n# HTML options\n", - plVariable( 'htmlParams', \$htmlParams ) ); - -+ # HTML options ($cacheParams) -+ print( PERLVARS "\n# cache options\n", -+ plVariable( 'cacheParams', \$cacheParams ) ); -+ - # Icon URLs - print( PERLVARS "\n# icon URLs\n", - plHash( 'iconImageUrls', \%iconImageUrls ) ); -@@ -2893,7 +3279,7 @@ - # - # If caching thumbnails then ensure that directory exists - # -- mkdir( $opt_cachedir, 0755 ) if ($opt_cache || $opt_tables) && ! -d $opt_cachedir; -+ mkdir( $opt_cachedir, 0755 ) if ($opt_cache || $opt_tables || $opt_divs) && ! -d $opt_cachedir; - - # - # If caching low resolution images then ensure that directory exists -@@ -2948,7 +3334,7 @@ - - #then do the thumbnail - ($rc, $filesize, $width, $height, $magick) = -- &createLowResolutionImage ($image, $opt_cachedir, $imagename, $opt_cache, 0, $opt_tables, -+ &createLowResolutionImage ($image, $opt_cachedir, $imagename, $opt_cache, 0, ($opt_tables || $opt_divs), - $opt_forcecache, $opt_thumbgeometry, - $opt_cacheformat, $opt_cachemin, - $opt_thumbprehook, $opt_thumbposthook); -@@ -2995,7 +3381,7 @@ - } - } - -- unless ($opt_tables) -+ unless ($opt_tables || $opt_divs) - { - # - # Do the montage -@@ -3012,8 +3398,14 @@ - - last MONTAGE unless ref($montage); - -- -- -+ if ($opt_unsharp !~ /^(|false)$/) { -+ print( STDERR "Applying montage unsharp: ${opt_unsharp}\n") if $opt_debug; -+ $status = $montage->UnsharpMask($opt_unsharp); -+ if ("$status") { -+ handleMagickError( __FILE__, __LINE__, "", $status); -+ last MONTAGE; -+ } -+ } - - # - # Obtain imagemap info (thanks to Cristy for the relevant code) -@@ -3062,7 +3454,7 @@ - # Copy image so we can play with it without effecting original - print( STDERR "Copying montage to scratch ...\n" ) - if $opt_debug; -- $image = $montage->Copy(); -+ $image = $montage->Clone(); - handleMagickError( __FILE__, __LINE__, "", $image) unless ref($image); - last MONTAGE unless ref($image); - -@@ -3074,15 +3466,15 @@ - } - - if( ! $opt_forcejpeg ) { -- print( STDERR "Writing $fileNames{'montageGIF'} ...\n" ) if $opt_debug; -- $status = $image->Write( -- dither=>'True', -- filename=>"GIF:$fileNames{'montageGIF'}", -- interlace=>'Line' -- ); -- handleMagickError( __FILE__, __LINE__, $fileNames{'montageGIF'}, $status) if "$status"; -- last MONTAGE if "$status"; -- undef @$image; -+ print( STDERR "Writing $fileNames{'montageGIF'} ...\n" ) if $opt_debug; -+ $status = $image->Write( -+ filename=>"GIF:$fileNames{'montageGIF'}", -+ interlace=>'Line', -+ dither=>'True' -+ ); -+ handleMagickError( __FILE__, __LINE__, $fileNames{'montageGIF'}, $status) if "$status"; -+ last MONTAGE if "$status"; -+ undef @$image; - } - - # If not doing GIF only, do JPEG -@@ -3122,7 +3514,7 @@ - unlink($fileNames{'montageJPEG'}); # Use GIF - } - } -- } # unless ($opt_tables) -+ } # unless ($opt_tables || $opt_divs) - $errorstat = 0; # If it made it this far, then no error - } - -@@ -3173,8 +3565,10 @@ - # or support relative URLs from the referrer (Apache & - # latest NCSA do). - print( STDERR "Writing file $fileNames{'montageServerMap'} ...\n" ) if $opt_debug; -- open( IMAGEMAP, ">$fileNames{'montageServerMap'}" ) -- || die("$0: Failed to open file $fileNames{'montageServerMap'} for output\n$@\n"); -+ my $imagemap = $fileNames{'montageServerMap'}; -+ my $imagemaptmp = $imagemap . ".tmp"; -+ open( IMAGEMAP, ">${$imagemaptmp}" ) -+ || die("$0: Failed to open file ${$imagemaptmp} for output\n$@\n"); - # default URL - if (!$opt_frames) { - $pNumber = ($pageNumber == 1) ? "" : "$pageNumber"; -@@ -3191,12 +3585,16 @@ - } - my $imageNum; - for( $imageNum = 0; $imageNum <= $#{$imageNames[$pageNumber - 1]}; ++$imageNum ) { -- my $url = escapeurl($imageNames[$pageNumber - 1][$imageNum]); -+ my $url; - my($x1,$y1,$x2,$y2); -+ - ($x1,$y1,$x2,$y2) = split(',', $imageThumbCoords[$pageNumber - 1][$imageNum]); -+ $url = $imageNames[$pageNumber - 1][$imageNum]; - if( $opt_pichtml ) { -+ $url =~ s/(.*)\.\w+$/$1/; - $url .= $opt_pichtmlext; - } -+ $url = escapeurl($url); - if( $opt_maptype eq 'ncsa' ) { - if ( "${opt_htimage}" ne '' ) { - print( IMAGEMAP "rect " -@@ -3219,6 +3617,8 @@ - } - } - close( IMAGEMAP ); -+ FileChoose($imagemap, $imagemaptmp); -+ - $errorstat=0; - return( $errorstat ); - } -@@ -3465,6 +3865,10 @@ - sub sortDir { - if(defined($dirOrder{$a}) && defined($dirOrder{$b})) { - $dirOrder{$a} <=> $dirOrder{$b} -+ } elsif(defined($dirOrder{$a})) { -+ return -1; -+ } elsif(defined($dirOrder{$b})) { -+ return 1; - } else { - lc($a) cmp lc($b); - } -@@ -3476,7 +3880,11 @@ - sub sortImages { - if(defined($imageOrder{$a}) && defined($imageOrder{$b})) { - $imageOrder{$a} <=> $imageOrder{$b} -- } else { -+ } elsif(defined($imageOrder{$a})) { -+ return -1; -+ } elsif(defined($imageOrder{$b})) { -+ return 1; -+ } else { - lc($a) cmp lc($b); - } - } -@@ -3533,6 +3941,9 @@ - sub compareHash { - my( $hash1, $hash2) = @_; - -+ if (!%$hash1 != !%$hash2) { -+ return( 1 ); -+ } - if(scalar(keys(%$hash1)) != scalar(keys(%$hash2))) { - return( 1 ); # different length - } -@@ -3633,7 +4044,7 @@ - } - } - -- if( !defined(%iconImageSizes) || ( compareHash(\%iconImageSizes,\%tmp_iconImageSizes) ) ) { -+ if( !%iconImageSizes || ( compareHash(\%iconImageSizes,\%tmp_iconImageSizes) ) ) { - %iconImageSizes = %tmp_iconImageSizes; - print( STDERR "Icon sizes have changed, must re-do all HTML\n" ) - if $opt_debug; -@@ -3836,6 +4247,14 @@ - handleMagickError( __FILE__, __LINE__, $cachename, $status); - return -1; - } -+ if ($opt_unsharp !~ /^(|false)$/) { -+ print( STDERR "Applying image unsharp: ${opt_unsharp}\n") if $opt_debug; -+ $status = $image->UnsharpMask($opt_unsharp); -+ if ("$status") { -+ handleMagickError( __FILE__, __LINE__, $cachename, $status); -+ return -1; -+ } -+ } - - print( STDERR "Writing ${cachename} ...\n" ) - if $opt_debug; -@@ -3845,12 +4264,14 @@ - if ( $a_cacheformat eq 'JPEG' || $a_cacheformat eq 'JPG' ) { - $status = $image->Write( - filename=>"${a_cacheformat}:${cachename}", -- interlace=>'None', -- quality=>85 -+ interlace=>'Plane', -+ quality=>$opt_jpegquality - ); - } else { - $status = $image->Write( -- filename=>"${a_cacheformat}:${cachename}" -+ filename=>"${a_cacheformat}:${cachename}", -+ interlace=>'Line', -+ dither=>'True' - ); - } - if ("$status") { -@@ -3868,7 +4289,7 @@ - # Set image label - # - my $label = ''; -- if( $opt_thumblabel ne 'false' ) { -+ if( $opt_thumblabel && $opt_thumblabel ne 'false' ) { - if( defined( $imageLabels{$imagename} ) ) { - # Set image specific label - $label = $imageLabels{$imagename}; -@@ -3922,7 +4343,7 @@ - - # put our label into the table image hash - -- $tableImageLabels{$imagename} = $label; -+ $tableImageLabels{$imagename} = escapehtml($label); - $tableImageLabels{$imagename} =~ s/\n/<BR>/g; - - print( STDERR "Applying image label: \"${label}\"\n" ) -@@ -4073,6 +4494,7 @@ - --[no]forcehtml Force HTML files to be generated (default off) - --[no]forcemontage Force montage (default off) - --[no]ignorefp Ignore directories with names like _vti (FrontPage directories) (default on) -+ --[no]indexinfo Put "Index of files" (default on) - --[no]help Display usage message (default off) - --[no]recurse Recurse directory tree (default off) - --srcdir Image directory to process -@@ -4082,6 +4504,7 @@ - Paths: - --iconpath Relative path under rootdir to webmagick icons - --iconbase Global base URL for webmagick icons -+ --imgprefixpath Add to any image URL - --prefixpath Path to prepend to generated URLs (e.g. /~username) - --rootpath Absolute path to server root (NCSA DocumentRoot) - -@@ -4093,6 +4516,8 @@ - Filenames: - --dirindexname Directory-name to title cross-reference file name - --imgindexname Image-name to thumbnail label cross-reference file name -+ Line Format: <Image Name> <Short Description>[, <Full Description> ] -+ or: pageTitle <html page tile>[, <Montage Title> ] - --indexname Name of master index files (default server index) - --pageindexname Base name of page-related index files - --readme Name of directory info file -@@ -4134,11 +4559,14 @@ - --thumbshadow Enable decorative shadow under thumbnail - --thumbtexture Texture to tile onto the image background - --thumbtransparent Transparent color -+ --unsharp Unsharping parameters (for all images) - --zoomfilter Zoom filter algorithm (Box/Triangle/Mitchell) - - HTML Colors & Appearance: - --address Optional user address info -+ --[no]centerfooter Center the footer text (default no) - --[no]anonymous Don't show WebMagick address and copyright info on pages (default off) -+ --bodytagins Insert argument into <BODY> tag - --coloralink Link (active) color - --colorback Background color (also applied to JPEG montage background) - --colorfore Foreground text color -@@ -4150,31 +4578,48 @@ - --dircolorlink Link (unvisited) color (directory frame) - --dircolorvlink Link (visited) color (directory frame) - --dirhtmlext Extension for directory frame -+ --forceuplink Force there to be a link to "../index.html" in directory list even if we didn't generate the file -+ --forcenouplink Force there to be no linke to "../index.hml" in directory list even if we did generate the file - --stylesheet URL to stylesheet (overrides other color options) - - --[no]date Output updates date (default on) - --footer Page footer (imagemap frame) (default to </CENTER>) - --header Page header (imagemap frame) (default to <CENTER>) -+ --headins Insert argument into <HEAD> section -+ --prepend Prepend to the very top of each HTML - --[no]javascript Enable JavaScript output (default off) -+ --[no]readmevisible Show README.html on first page rather than just linking (default off) -+ --[no]divs Use HTML divs instead of imagemaps for thumbnails (default off) -+ --[no]tables Use HTML tables instead of imagemaps for thumbnails (default off) -+ --tables_params Table HTML parameters -+ --tables_top HTML before table contents -+ --tables_bottom HTML after table contents -+ --title Page title -+ -+Per-image HTML options: - --[no]pichtml Per-image HTML file generation (default off) -- --pichtmlext Per-image HTML file extension (default .html) -+ --pichtmlaltdrop Regexp to drop from ALT= (default "") -+ --pichtmlaltend Some words to append to ALT= (default "") -+ --pichtmlaltstart Some words to prepend to ALT= (default "") - --pichtmlbottom Per-image HTML, extra HTML to display below image (default to </CENTER>) -+ --pichtmlext Per-image HTML file extension (default .html) - --[no]pichtmlnav Per-image HTML, show navigation buttons (default off) -+ --[no]pichtmlupfirst Put Up icon before prev, next icons (default on) - --[no]pichtmlputtitle Put per-image HTML picture title (default on) -+ --[no]pichtmltitletop Put per-image picture title above image (default on) -+ --[no]edgelinksindex Edge-links on per-image HTML link back to index (default off) - --pichtmltarget Per-image HTML default frame target - --pichtmltitleend End tags for per-image HTML picture title (default </P>) - --pichtmltitlestart Start tags for per-image HTML picture title (default <P>) - --pichtmltop Per-image HTML, extra HTML to display above image (default to <CENTER>) -- --[no]readmevisible Show README.html on first page rather than just linking (default off) -- --[no]tables Use HTML tables instead of imagemaps for thumbnails (default off) -- --title Page title -+ --[no]fancytables Use a fancier HTML table (default off). Caution, the default -+ colors do not look good with this option. - - Frame Options: - --[no]frames Use frames, if no - single directory collection assumed (default on) -- --framemarginwidth Pixels allocated to frame margin in horizontal direction -- --framemarginheight Pixels allocated to frame margin in vertical direction -- --framebordersize Pixels allocated to frame border -- --frameborder Enable (YES) or disable (NO) decorative frame borders -+ --framemarginwidth Pixels allocated to frame margin in horizontal direction (default 1) -+ --framemarginheight Pixels allocated to frame margin in vertical direction (default 1) -+ --frameborder Enable (1, default) or disable (0) decorative frame borders - --framestyle Frame style to use (out of those available) - --[no]allowconfig Allow user to configure framestyle, columns and rows (requires javascript and tables) (default off) - -@@ -4296,6 +4741,7 @@ - s/&/&/g; - s/>/>/g; - s/</</g; -+ s/\"/"/g; # because we use "xxx" form sometimes - return( $_ ); - } - -@@ -4324,23 +4770,11 @@ - # Escape unsafe characters in URLs - # - sub escapeurl { -+ no locale; - local($_) = @_; -- s/\%/%25/g; # % (must substitute first!) -- s/\"/%22/g; # " -- s/\#/%23/g; # # -- s/\</%3C/g; # < -- s/\>/%3E/g; # > -- s/\[/%5B/g; # [ -- #s/\\/%5C/g; # \ -- s/\]/%5D/g; # ] -- s/\^/%5E/g; # ^ -- s/\`/%60/g; # ` -- s/\{/%7B/g; # { -- s/\|/%7C/g; # | -- s/\}/%7D/g; # } -- s/\~/%7E/g; # ~ -- s/ /%20/g; # " " -- s:\\:/:g; # replace \ with / for better URLs -+ # RFC 2396 -+ # unreserved + some reserved (no query, allow path chars): "$+,/;=@" -+ s/([^0-9a-zA-Z_.!~*'()\$+,\/;=\@-])/sprintf("%%%02x", ord($1))/eg; - return( $_ ); - } - -@@ -4387,7 +4821,6 @@ - my $rc; - foreach $rc (@_) { - next if ( ! -r $rc || ! -f $rc ); -- print( "Sourcing ${rc}\n" ) if $opt_debug; - eval ( get_rc($rc) ); - if( $@ ) { - print( STDERR "Bad Eval for file \"${rc}\"...\n$@\n" ); -@@ -4468,7 +4901,7 @@ - my $path=$top; - $direlem=''; - do { -- # Certain values must only be vaild in the last -+ # Certain values must only be valid in the last - # current directory webmagickrc file. - $opt_ignore=0; # Ignore -- do not process this directory - diff --git a/www/WebMagick/files/patch-ab b/www/WebMagick/files/patch-ab deleted file mode 100644 index baf176bea876..000000000000 --- a/www/WebMagick/files/patch-ab +++ /dev/null @@ -1,94 +0,0 @@ -Index: webmagickrc.in -=================================================================== -RCS file: /cvsroot/webmagick/WebMagick/webmagickrc.in,v -retrieving revision 1.16 -retrieving revision 1.27 -diff -u -r1.16 -r1.27 ---- webmagickrc.in 4 Dec 2001 19:36:57 -0000 1.16 -+++ webmagickrc.in 5 Apr 2012 09:12:18 -0000 1.27 -@@ -15,6 +15,7 @@ - # Relative path under rootpath / prefixpath - # $opt_iconbase = ''; - # Global icons base URL, if not empty -+# $opt_imgprefixpath = ''; # Add to any image URL - - # - # Server-side imagemap settings -@@ -83,6 +84,7 @@ - # $opt_ignore = 0; # Do not webmagick this directory - # but still recurse into sub-directories - # $opt_ignorefp = 1; # Ignore /_[a-z] directories (FrontPage) -+# $opt_indexinfo = 1; # Put "Index of files" - # $opt_srcdir = '.'; # Source directory path (current directory) - # $opt_verbose = 0; # Verbose flag (default off) - # $opt_forcecache = 0; # Force update of cached thumbnails -@@ -90,30 +92,51 @@ - # $opt_forcemontage = 0; # Force montage (default off) - # $opt_forcegif = 0; # Force GIF imagemaps (default off) - # $opt_forcejpeg = 0; # Force JPEG imagemaps (default off) -+# $opt_forcenouplink = 0; # Force there to be no uplink in directory index list -+# $opt_forceuplink = 0; # Force there to be an uplink in directory index list -+ # (i.e. even if we didn't generate ../index.html) - # $opt_jpegquality = 70; # Quality of JPEG imagemaps -+# $opt_unsharp = '0.64x0.64'; # Unsharp for all images - # $opt_help = 0; # Display usage message - # $opt_version = 0; # Display version info - # $opt_htmlext = '.html'; # Use .shtml for SSI -+# $opt_bodytagins = ''; # Insert something into <BODY> tag - # $opt_header = '<CENTER>'; # Imagemap extra page header (HTML) - # $opt_footer = '</CENTER>'; # Imagemap extra page footer (HTML) -+# $opt_prepend = ''; # Prepend to the very top of each HTML -+# $opt_headins = ''; # Insert something into <HEAD> section - # $opt_javascript = 1; # Enable JavaScript output - # $opt_readmevisible = 0; # Make README.html be first page. - # $opt_title = ''; # Page title (blank provides default title) - # $opt_address = ''; # Additonal address info for bottom of - # imagemap page -+# $opt_centerfooter = 0; # Center the footer text - # $opt_date = 1; # Output updates date - - # $opt_pichtml = 0; # Write separate HTML for each picture -+# $opt_pichtmlaltend = ''; # Some words to append to ALT -+# $opt_pichtmlaltstart = ''; # Some words to prepend to ALT - # $opt_pichtmlbottom = '</CENTER>'; - # $opt_pichtmlext = '.html'; # Use .shtml for SSI -+# $opt_pichtmllink = ''; # Where to link pic - # $opt_pichtmlnav = 0; # Write navigation into pic's HTML -+# $opt_pichtmlupfirst = 1; # Put up button before next/prev -+# $opt_edgelinksindex = 0; # End links link back to index - # $opt_pichtmlputtitle = 1; # Write picture title above it -+# $opt_pichtmltitletop = 1; # Put picture title at top - # $opt_pichtmltarget = ''; - # $opt_pichtmltitleend = '</P>'; # End tags for picture title - # $opt_pichtmltitlestart = '<P>'; # Start tags for picture title - # $opt_pichtmltop = '<CENTER>'; - -+# $opt_divs = 0; # use HTML divs instead of image maps - # $opt_tables = 0; # use HTML tables instead of image maps -+# $opt_tablebackcolor = '#000000'; # table background color -+# $opt_fancytables = 0; # use a fancier table for index pages -+# $opt_fancytableheight = 28; # the height of the fancy table border -+# $opt_tables_bottom = ''; # HTML after table contents -+# $opt_tables_params = 'WIDTH="90%"'; # table HTML parameters -+# $opt_tables_top = ''; # HTML before table contents - # $opt_allowconfig = 0; # allow user to configure table and framestyle - - # -@@ -199,8 +222,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 --# $opt_framebordersize = 3 ; # Pixels allocated to frame border --# $opt_frameborder = 'YES'; # Enable (YES) or disable (NO) decorative frame borders -+# $opt_frameborder = 1; # Enable (1) or disable (0) decorative frame borders - # $opt_framestyle = 1; # Frame style to use (out of those available) - - # -@@ -245,6 +267,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 -+# $opt_icons{'ft_top'} = 'ft_top.gif'; # Fancy table top - # $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 diff --git a/www/WebMagick/files/patch-ac b/www/WebMagick/files/patch-ac deleted file mode 100644 index cb6d320710ff..000000000000 --- a/www/WebMagick/files/patch-ac +++ /dev/null @@ -1,32 +0,0 @@ ---- configure.bak Wed Oct 23 20:18:18 2002 -+++ configure Tue May 30 07:15:29 2006 -@@ -1027,9 +1027,9 @@ - font2='' - font3='' - font4='' -- font5='fixed' -+ font5='' - tmpfile="/tmp/configure$$" -- $XLSFONTS > $tmpfile -+ $XLSFONTS > $tmpfile 2> /dev/null - exec < $tmpfile - while read font - do -@@ -1053,7 +1053,7 @@ - esac - done - -- exec < /dev/tty -+# exec < /dev/tty - rm $tmpfile - fi - -@@ -1073,7 +1073,7 @@ - then - webmagick_cv_defaultfont=$font5 - else -- webmagick_cv_defaultfont='fixed' -+ webmagick_cv_defaultfont='courier' - fi - - diff --git a/www/WebMagick/files/patch-ad b/www/WebMagick/files/patch-ad deleted file mode 100644 index f3528f0c2002..000000000000 --- a/www/WebMagick/files/patch-ad +++ /dev/null @@ -1,135 +0,0 @@ -Index: webmagick.js -=================================================================== -RCS file: /cvsroot/webmagick/WebMagick/webmagick.js,v -retrieving revision 1.46 -retrieving revision 1.49 -diff -u -r1.46 -r1.49 ---- webmagick.js 25 Sep 2002 01:00:21 -0000 1.46 -+++ webmagick.js 26 May 2004 23:28:44 -0000 1.49 -@@ -1,5 +1,5 @@ - // --// $Id: webmagick.js,v 1.46 2002/09/25 01:00:21 clindell Exp $ -+// $Id: webmagick.js,v 1.49 2004/05/26 23:28:44 ache Exp $ - // - // JavaScript routines to display a set of images - // Part of the WebMagick package -@@ -227,12 +227,9 @@ - var showReadme = 0; - } - -- // frame border definition -- var frameBorderSize = -- ' FRAMEBORDER=' + htmlOpts["frameborder"] + ' BORDER=' + htmlOpts["framebordersize"]; - // margin width definition - var marginBorderSize = -- ' MARGINWIDTH=' + htmlOpts["framemarginwidth"] + ' MARGINHEIGHT=' + htmlOpts["framemarginheight"]; -+ ' MARGINWIDTH=' + htmlOpts["framemarginwidth"] + ' MARGINHEIGHT=' + htmlOpts["framemarginheight"] + ' FRAMEBORDER=' + htmlOpts["frameborder"]; - - // Javascript URLs to generate frame source - var srcDirectory = ' SRC="javascript:parent.emptyHTML();"'; -@@ -271,17 +268,17 @@ - // | | - // ------------- - result += -- '<FRAMESET COLS="132,*"' + frameBorderSize + '>\n' + -+ '<FRAMESET COLS="132,*"' + '>\n' + - ' <FRAME' + srcDirectory + nameDirView + marginBorderSize + '>\n' + -- ' <FRAMESET ROWS="50,*,0"' + frameBorderSize + '>\n' + -- ' <FRAME' + srcNavView + nameNavView + ' MARGINHEIGHT="0" ' + 'SCROLLING="no" NORESIZE ' + '>\n'; -+ ' <FRAMESET ROWS="50,*,0"' + '>\n' + -+ ' <FRAME' + srcNavView + nameNavView + marginBorderSize + ' SCROLLING="no" NORESIZE ' + '>\n'; - if( showReadme == 1 ) { - result += ' <FRAME' + srcReadMe + nameImageView + marginBorderSize + '>\n'; - } else { - result += ' <FRAME' + srcThumbnails + nameImageView + marginBorderSize + '>\n'; - } - result += -- ' <FRAME' + srcHidden + nameHidden + ' SCROLLING="no" NORESIZE >\n' + -+ ' <FRAME' + srcHidden + nameHidden + marginBorderSize + ' SCROLLING="no" NORESIZE >\n' + - ' </FRAMESET>\n' + - '</FRAMESET>\n'; - -@@ -299,12 +296,12 @@ - // | | | - // ------------- - result += -- '<FRAMESET COLS="145,*,0"' + frameBorderSize + '>\n' + -- ' <FRAMESET ROWS="20%,*"' + frameBorderSize + '>\n' + -+ '<FRAMESET COLS="145,*,0"' + '>\n' + -+ ' <FRAMESET ROWS="20%,*"' + '>\n' + - ' <FRAME ' + srcDirectory + nameDirView + marginBorderSize + '>\n' + - ' <FRAME ' + srcThumbnails + nameThumbView + marginBorderSize + '>\n' + - ' </FRAMESET>\n' + -- ' <FRAMESET ROWS="50,*"' + frameBorderSize + '>\n' + -+ ' <FRAMESET ROWS="50,*"' + '>\n' + - ' <FRAME' + srcNavView + nameNavView + marginBorderSize + ' SCROLLING="no" NORESIZE ' + '>\n'; - if( showReadme == 1 ) { - result += ' <FRAME' + srcReadMe + nameImageView + marginBorderSize + '>\n'; -@@ -313,7 +310,7 @@ - } - result += - ' </FRAMESET>\n' + -- ' <FRAME' + srcHidden + nameHidden + ' SCROLLING="no" NORESIZE >\n' + -+ ' <FRAME' + srcHidden + nameHidden + marginBorderSize + ' SCROLLING="no" NORESIZE >\n' + - '</FRAMESET>\n'; - } else if ( style == 3 ) { - // Four frame screen with directories listed in left frame, -@@ -328,11 +325,11 @@ - // | | - // ------------- - result += -- '<FRAMESET ROWS="190,50,*"' + frameBorderSize + '>\n' + -- ' <FRAMESET COLS="132,*,0"' + frameBorderSize + '>\n' + -+ '<FRAMESET ROWS="190,50,*"' + '>\n' + -+ ' <FRAMESET COLS="132,*,0"' + '>\n' + - ' <FRAME ' + srcDirectory + nameDirView + marginBorderSize + '>\n' + - ' <FRAME ' + srcThumbnails + nameThumbView + marginBorderSize + '>\n' + -- ' <FRAME ' + srcHidden + nameHidden + ' SCROLLING="no" NORESIZE >\n' + -+ ' <FRAME ' + srcHidden + nameHidden + marginBorderSize + ' SCROLLING="no" NORESIZE >\n' + - ' </FRAMESET>\n' + - ' <FRAME' + srcNavView + nameNavView + marginBorderSize + ' SCROLLING="no" NORESIZE ' + '>\n'; - if( showReadme == 1 ) { -@@ -356,12 +353,12 @@ - // | | - // ------------- - result += -- '<FRAMESET ROWS="172,50,*"' + frameBorderSize + '>\n' + -+ '<FRAMESET ROWS="172,50,*"' + '>\n' + - ' <FRAME ' + srcThumbnails + nameThumbView + marginBorderSize + '>\n' + -- ' <FRAMESET COLS="132,*,0"' + frameBorderSize + '>\n' + -+ ' <FRAMESET COLS="132,*,0"' + '>\n' + - ' <FRAME ' + srcDirectory + nameDirView + marginBorderSize + '>\n' + - ' <FRAME ' + srcNavView + nameNavView + marginBorderSize + ' SCROLLING="no" NORESIZE ' + '>\n' + -- ' <FRAME ' + srcHidden + nameHidden + ' SCROLLING="no" NORESIZE >\n' + -+ ' <FRAME ' + srcHidden + nameHidden + marginBorderSize + ' SCROLLING="no" NORESIZE >\n' + - ' </FRAMESET>\n'; - if( showReadme == 1 ) { - result += ' <FRAME ' + srcReadMe + nameImageView + marginBorderSize + '>\n'; -@@ -1048,9 +1045,9 @@ - result += - '<BR><HR>\n' + - htmlOpts["msg_produced_by"] + ' ' + -- '<NOBR><A HREF="http://webmagick.sourceforge.net/" target="_top">WebMagick</A> ' + -- htmlOpts["version"] + '</NOBR>, <NOBR>' + htmlOpts["msg_copyright"] + '©</NOBR>\n'; -- // htmlOpts["version"] + '</NOBR>, <NOBR>' + htmlOpts["msg_copyright"] + '©</NOBR> <NOBR>Bob Friesenhahn</NOBR>\n'; -+ '<A HREF="http://webmagick.sourceforge.net/" target="_top">WebMagick</A> ' + -+ htmlOpts["version"] + ', ' + htmlOpts["msg_copyright"] + '©\n'; -+ // htmlOpts["version"] + ', ' + htmlOpts["msg_copyright"] + '© Bob Friesenhahn\n'; - } - result += '</FONT>\n</ADDRESS>\n'; - -@@ -1234,12 +1231,12 @@ - dirTitle = dirNames[dirNum]; - } - result += -- '<NOBR><A HREF="javascript:parent.webmagick.changeDirectory(\'' + escapeJs(dirNames[dirNum]) + '\');"\n' + -+ '<A HREF="javascript:parent.webmagick.changeDirectory(\'' + escapeJs(dirNames[dirNum]) + '\');"\n' + - ' onMouseOver="status=\'change to directory: ' + escapeJs(dirTitle) + '\'; return true;"\n' + - ' onMouseOut="status=\'\';"\n'; - result += '>'; - result += dirTitle; -- result += '</A></NOBR><BR>\n'; -+ result += '</A><BR>\n'; - } - } - diff --git a/www/WebMagick/files/patch-configure.in b/www/WebMagick/files/patch-configure.in new file mode 100644 index 000000000000..0eba01fb974d --- /dev/null +++ b/www/WebMagick/files/patch-configure.in @@ -0,0 +1,11 @@ +--- configure.in.bak 2012-04-07 05:01:19.000000000 +0400 ++++ configure.in 2012-04-07 09:54:13.000000000 +0400 +@@ -114,7 +114,7 @@ + esac + done + +- exec < /dev/tty ++# exec < /dev/tty + rm $tmpfile + fi + |