webmagick-2.02.orig/ 0040755 0001750 0001750 00000000000 07417462334 014167 5 ustar arafune arafune webmagick-2.02.orig/Makefile.in 0100644 0001750 0001750 00000027665 07413200206 016231 0 ustar arafune arafune # Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
#
# Top Makefile for WebMagick
#
# Copyright Bob Friesenhahn, 1999
#
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
DEFAULTFONT = @DEFAULTFONT@
HTIMAGE = @HTIMAGE@
ICONPATH = @ICONPATH@
MAKEINFO = @MAKEINFO@
MAPTYPE = @MAPTYPE@
PACKAGE = @PACKAGE@
PERL = @PERL@
PREFIXPATH = @PREFIXPATH@
RGBDB = @RGBDB@
ROOTPATH = @ROOTPATH@
VERSION = @VERSION@
XLSFONTS = @XLSFONTS@
AUTOMAKE_OPTIONS = 1.2
# Subdirectories under Automake control
SUBDIRS = doc icons utils
# Binary scripts
bin_SCRIPTS = webmagick
# Directory in which to install WebMagick icons & html files
ICON_INSTALL_DIR = @ROOTPATH@/@ICONPATH@
ICON_INSTALL_FILES = webmagick.js
ETC_INSTALL_DIR = ${exec_prefix}/etc
# Additional files to distribute
EXTRA_DIST = INSTALL.generic MANIFEST TODO webmagick.in webmagick.js webmagick.lsm webmagick.lsm.in webmagickrc.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES = webmagick webmagickrc
SCRIPTS = $(bin_SCRIPTS)
DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
Makefile.in NEWS TODO aclocal.m4 configure configure.in install-sh \
missing mkinstalldirs webmagick.in webmagickrc.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(ACLOCAL_M4): configure.in
cd $(srcdir) && $(ACLOCAL)
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
webmagick: $(top_builddir)/config.status webmagick.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
webmagickrc: $(top_builddir)/config.status webmagickrc.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_SCRIPTS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
$(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
else if test -f $(srcdir)/$$p; then \
echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
$(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
else :; fi; fi; \
done
uninstall-binSCRIPTS:
@$(NORMAL_UNINSTALL)
list='$(bin_SCRIPTS)'; for p in $$list; do \
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
done
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
@SET_MAKE@
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
test "$$subdir" = "." && dot_seen=yes; \
done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
-rm -rf $(distdir)
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir)
@banner="$(distdir).tar.gz is ready for distribution"; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"
dist: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
-rm -rf $(distdir)
mkdir $(distdir)
-chmod 777 $(distdir)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
for subdir in $(SUBDIRS); do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
info-am:
info: info-recursive
dvi-am:
dvi: dvi-recursive
check-am: all-am
check: check-recursive
installcheck-am:
installcheck: installcheck-recursive
install-exec-am: install-binSCRIPTS
install-exec: install-exec-recursive
install-data-am: install-data-local
install-data: install-data-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-recursive
uninstall-am: uninstall-binSCRIPTS
uninstall: uninstall-recursive
all-am: Makefile $(SCRIPTS)
all-redirect: all-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs: installdirs-recursive
installdirs-am:
$(mkinstalldirs) $(DESTDIR)$(bindir)
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-tags mostlyclean-generic
mostlyclean: mostlyclean-recursive
clean-am: clean-tags clean-generic mostlyclean-am
clean: clean-recursive
distclean-am: distclean-tags distclean-generic clean-am
distclean: distclean-recursive
-rm -f config.status
maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-recursive
-rm -f config.status
.PHONY: uninstall-binSCRIPTS install-binSCRIPTS install-data-recursive \
uninstall-data-recursive install-exec-recursive \
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
all-recursive check-recursive installcheck-recursive info-recursive \
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
install-exec install-data-local install-data-am install-data install-am \
install uninstall-am uninstall all-redirect all-am all installdirs-am \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
install-data-local:
$(mkinstalldirs) $(ICON_INSTALL_DIR)
for file in $(ICON_INSTALL_FILES) ; \
do \
$(INSTALL_SCRIPT) $$file $(ICON_INSTALL_DIR) ; \
done
$(INSTALL_DATA) webmagickrc $(ETC_INSTALL_DIR)/webmagickrc
# Generate webmagick.lsm from webmagick.lsm.in at dist time.
webmagick.lsm : webmagick.lsm.in configure.in
date=`date +"%Y-%m-%d" | tr '[a-z]' '[A-Z]'`; \
sed -e "s/%VERSION%/@VERSION@/g" < webmagick.lsm.in | \
sed -e "s/%DATE%/$$date/g" > webmagick.lsm
dist-hook: webmagick.lsm
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
webmagick-2.02.orig/README 0100644 0001750 0001750 00000003431 07306317441 015040 0 ustar arafune arafune $Id: README,v 1.8 2001/06/03 02:21:21 clindell Exp $
WebMagick provides a means of easily putting image collections on the Web.
It recurses through directory trees, building HTML pages and imagemap
(GIF or JPEG) files to allow the user to navigate through collections of
thumbnail images (somewhat similar to 'xv') and select the images to
view with a mouse click.
WebMagick is highly configurable. Its goal is to provide lots of options
while doing a nice job out of the box. Configuration may be done from
the command line, or via .webmagickrc files which effect the overall
installation, or images in a directory tree.
WebMagick is optimized to use the features of modern Web browsers,
however support is provided for older browsers as well.
Read the INSTALL file to get started with installation of webmagick. Read
the manual page or any form of documentation in the doc directory
for the details on how to use webmagick. A key installation requirement
is that you must first install the ImageMagick image manipulation toolset.
If you are operating a site that my mother wouldn't approve of, please
set the $opt_anonymous option to 1 or use the --anonymous option. This
removes WebMagick copyright info from all generated pages. In particular,
it removes my email address so I don't get email from confused users
regarding stuff I would rather not hear about. :-)
WebMagick is written by Bob Friesenhahn (bfriesen@simple.dallas.tx.us). I
would be happy to hear about your trials and tribulations with webmagick.
The current maintainer of WebMagick is Chris Lindell (clindell@users.sourceforge.net)
and the new WebMagick homepage is http://webmagick.sourceforge.net. Anyone
wishing to help with WebMagick development should also visit the project
page at http://sourceforge.net/projects/webmagick/.
webmagick-2.02.orig/AUTHORS 0100644 0001750 0001750 00000000230 07306015573 015223 0 ustar arafune arafune The maintainer of WebMagick is Chris Lindell
. WebMagick
was written by Bob Friesenhahn
.
webmagick-2.02.orig/COPYING 0100644 0001750 0001750 00000043110 07074150335 015210 0 ustar arafune arafune GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
webmagick-2.02.orig/ChangeLog 0100644 0001750 0001750 00000034715 07413200003 015723 0 ustar arafune arafune 2001-12-28 Chris Lindell
1) Release 2.02
2) Added documentation for all of Andrey's additions
2001-12-05 Andrey A. Chernov
1) evaluateRcFiles() called twice at the start which cause
command line options overwrite, remove second instance
2) Add $currentDate assignment after evaluateRcFiles() in dodir()
too, since $opt_msg_date_format can be changed there
3) print()/exit() are not safe to call from signal handlers
(according to perlipc/perlfaq8), so replace them with syswrite()
and POSIX:_exit(); move signal handlers assignment before
evaluating Rc files in case signal happens while processing
4) For --noframes generate index.html, 2index.htmll .. NNindex.html
as thumbnails pages now
2001-12-04 Chris Lindell
1) Release 2.02pre3
2) Use @sysconfdir@ from configure
3) Fixed possible bug in webmagick.in escapejs - some strings
were not being closed correctly
2001-11-29 Andrey A. Chernov
Style change, make pichtml page look&feel as thumbnails page:
move picture title before navbar, move navbar close to the picture
(it also saves vertical space)
2001-11-27 Andrey A. Chernov
1) Implement $opt_metacharset to specify HTML documents character
set in case HTTPD can't provide it.
2) Add other META tags into pichtml code
3) Implement 'pichtmlputtitle' to control title appearance
above picture (default on), implement
'pichtmltitlestart'/'pichtmltitleend' to control HTML tags
before/after the picture title
2001-11-25 Andrey A. Chernov
1) Turn off Javascript by default (was on). Javscript code still
working, but largely outdated, so better variant is not show it to
first time user
2) Implement 'frames' option, useful in its --noframes form
for single directory images collection. Currently it works
for perl-generated pages only, not for Javascript-generated ones
3) Store more variables in 'pageStatus' to detect more cases
when HTMLs needs to be regenerated
4) Conditionalize some code needed for Javascript only
5) Using server-side maps is not recommended by HTML 4.0 and
IE hides status bar picture URL for them, so
implement it now as an option 'serversidemap' (default off)
6) Better explain boolean options in the help, indicating Getopt::Long
--no* feature; following this style, rename $opt_nodate I
introduce in the past to $opt_date (default on) to avoid things
like --nonodate; format every help option into single line
since help2man not understand multi-line option description
7) Don't put $indexbar pages list inside , it can be really big
8) Remove
from $opt_tables code since not always desired;
proper centering way is via $opt_header and $opt_footer
9) Assing
to default $opt_header/$opt_pichtmltop and
to default $opt_footer/$opt_pichtmlbottom
since it is what needed in most cases
10) Put pichtmlnav code inside , add missing TARGET=thumbview
there
11) Move 'help' (ReadMe) icon from the thumbnails pages to the
directory frame since it is common part of each page and
not needed to be loaded repeatedly.
12) Add TARGET=_top to WebMagick project link; put only address
inside tags; don't print empty when
date disabled and anonymous
13) Test string variables against '', not as integer !$var to
not confuse with '0' value
14) Cosmetique, sort variables alphabetically in some cases;
properly indent source code lines; put HTML parameters into
quotes; don't put large amount of spaces into generated pages
just due to perl source code indent reason.
2001-11-24 Andrey A. Chernov
1) Localize date and sorting
2) Add messages customization options block
3) Skip .shtml/.shtm/.sht too
4) Don't use hardcoded [\000-\177] range while reading rc variables,
it miss upper half of code table, replace it with (.|\n)
5) For pichtml, while printing image name, do it in
...
,
it aligned together with image otherwise. This is temp. solution
until pichtml pic title options will be implemented.
6) Remove some \n from pichtml code to save vertical space
7) Mostly cosmetic, "HREF = " -> "HREF=", "TARGET = " -> "TARGET="
(some HTML analyzers dislike spaces here)
2001-08-20 Chris Lindell
1) Added $opt_pichtmlnav, which adds navigation
links to per-image HTML files
2) Added image label to per-image HTML
3) Added CSS to per-image HTML
2001-08-15 Andrey A. Chernov
1) In some situations (like using $helphtml in .webmagickrc)
escapeurl() not expanded but placed as is like
HREF="escapeurl(README.html)" Fix it to make sure it
always expanded.
2) Allow .png in IMG SRC, it supported by all major browsers nowdays.
2001-08-08 Chris Lindell
1) New PerlMagick (from ImageMagick 5.3.6) rename
Get() attributes:base_rows -> base-rows
base_columns -> base-columns
2) New PerlMagick does strange things for colorspace
'YUV', colors 256 options for writting GIF montages
- whole picture fade in background. Better way is
just remove this options - they are not neccessary
for writing GIFs, all handled automatically.
3) 'Prev' arrow for very first page is not useful if
README is not present since it just reload the
same frameset. I convert it to 'Up' arrow
in that particular case.
4) blue_c.gif now correctly included in distribution
5) compatible with Win32 ActiveState Perl
2001-07-13 Chris Lindell
1) added $opt_allowconfig for user configuration
2) fixed js bug with framestyle 4
2001-06-28 Chris Lindell
1) Can now handle rc and status files over 100k
2) Get real size of symlinks
3) Handle new ImageMagick Ping return value
4) Smaller .index.js files for faster downloads
5) Fixed table bug when image isn't thumbnailed
6) Fixed a problem finding relative paths to icons
when we are outside of the document root.
2001-06-03 Chris Lindell
1) added --tables option for using HTML tables
instead of montages. Much faster processing
and navigation.
2) added version check for status file
so we can redo thumbs and html for new options
3) Solve incompatibilities with NS6
2001-05-28 Chris Lindell
1) disabled new lockfile idea because if fails
to gt removed if the program has an error
2) corrected the installation of webmagickrc
3) Using fig2dev to create the documentation jpgs
because my installation of gs wants to create
them using big pages
4) rpm now requires Magick.so (PerlMagick)
2001-05-09 Chris Lindell
1) More special character handling for directory and
file names (' ', ''', '#", etc).
2) Fix bug with "background=undefined" in JavaScript
if no background image is set
3) Display image name in status bar when mouse is over image map
4) Implement and document stylesheet option
5) Implement lockfile to keep 2 processes from competing
2000-01-17 Andrey A. Chernov
* webmagick.in: Fixes list.
1) Add nodate option to supress "Page updated ..." line in
generated htmls. Can save lot of processing time since with this
option htmls not regenerated just because date changed.
2) Add iconbase option to specify absolute icons path. It helps
when final gallery subdirectories location is different
than original one, so relative path can't be used.
3) Fix bug with " >" (space-separated gt) appearse in generated
htmls.
4) Fix bug with missing closing tags.
1999-11-21 Bob Friesenhahn
* webmagick.in: Incorporated patches from Andrey A. Chernov
1) Add dirhtmlext option to specify directory extension other than
.html
2) Add jpegquality option (jpegquality) to specify it for JPEG
imagemaps. Can greately reduce map size.
3) finddepth->find change. Some directories can be missed
otherwise. It very depends of enabled/disabled directories order
while walking in the tree.
4) Don't even attempt to write to non-writeable directory.
5) Add missing forcejpeg and new options to usage help.
1999-10-17 Bob Friesenhahn
* webmagick.in: Updated primary FTP site and Web site URLs.
1998-12-19 Bob Friesenhahn
* webmagick.in: Incorporated patches from Andrey A. Chernov
to perfom the following:
1) Add possibility to force jpeg thumbnails instead of gif ones
2) Add possibility to add index pages footer (not header only)
3) Move /etc/webmagickrc to @prefix@/etc/webmagickrc
4) Add possibility to specify index pages extention (i.e. .shtml instead
of .html, needed for SSI)
5) Write progressive JPEGs for jpeg thumbnails
6) Add possibility to write per-picture HTML pages instead of linking
images directly; optional top/bottom code, target and non-default
extention tuned too. Per-picture SSI-ed HTMLs used mainly for banner
advertisment and helps a lot to keep site free for users.
7) Don't write *.js files when JavaScript turned off
1998-03-23 Bob Friesenhahn
* webmagick.js: framesLoaded() was sometimes being executed before
it was defined by the frameset onLoad handler. This is a race
condition that should never happend but did on fast machines and
Netscape 4.
* webmagick.in (doMontage): ImageMagick changed the way it sets
the montage text label color. The new syntax is
Set(pen=>$opt_thumbforeground). The old way (foreground) has been
left in place to support older ImageMagick's.
(dodir): Added support for .sgi which seems to be an extension used
for SGI-format OpenGL texture files.
1998-01-11 Bob Friesenhahn
* webmagick.in: Fixed nasty bug which caused opt_skip to not
work. This bug could cause damage to user files.
1997-12-15 Bob Friesenhahn
* webmagick.in (handleMagickError): Now supports three levels of
errors: process fatal, image fatal, warning only. The subroutine
return code may be used to distinguish between the last two.
1997-11-25 Bob Friesenhahn
* webmagick.in (doMontage): Compute imagemap information directly
rather than retrieving it from an external *_map.shtml file. One
less file type to deal with and possibly faster.
Sat Nov 1 10:12:23 1997 Bob Friesenhahn
* webmagick.in (abs_path_to_rel): Eliminated $opt_abolute and
$opt_relative options. WebMagick now tryies to make all URLs
relative. If a URL can not be made relative then it will be
represented as an absolute URL.
(dodir): Now uses the order of directories and images specified by
.dirindex and .imgindex (respectively) to control the sort order
of the displayed directories and images. Directories and files
not occuring in the index are sorted in alphabetic order.
Tue Oct 14 00:17:32 1997 Bob Friesenhahn
* webmagick.in (doMontage): Fixed bug that caused label to always
be supplied if listing occured in the .imgindex file regardless
of whether $opt_thumblabel was set to 'false' or not.
Sun Oct 12 18:16:07 1997 Bob Friesenhahn
* webmagick.in (compareHash): Added programmed handling of
Image::Magick related errors by routing all error status through
handleMagickError() rather than warn().
Sun Oct 5 15:31:13 1997 Bob Friesenhahn
* webmagick.in (dodir): Writes run information to
".index.pl". Also saves same information in ".index.js" in
JavaScript form. A new JavaScript interface has been added which
uses the .index.js file as input. These changes should be
considered substantial since much of the WebMagick core code had
to be re-written.
Tue Sep 9 00:37:24 1997 Bob Friesenhahn
* webmagick.in (html_imgsize): Uses new PerlMagick "Ping" method
to determine image sizes if available. The Ping method is much
faster since it does not read the entire image.
Wed Aug 27 23:48:36 1997 Bob Friesenhahn
* webmagick.in: Now uses a single ".index.stat" file rather than a
file per page to save run information.
Now also passes "use strict 'vars'".
Mon Aug 25 08:30:01 1997 Bob Friesenhahn
* webmagick.in: Removed PERL4 style '&' prefix from subroutine
invokations in favor of "new" C style".
Now uses (and passes) -w flag plus "use strict 'refs'" and
"use strict 'subs'". Removed some bugs in the process.
Sun Aug 3 14:07:11 1997 Bob Friesenhahn
* webmagick.in (dodir): Status represented by $stat_havereadme and
$stat_numpages has now been moved into $stat_htmlparams in the
.index*.stat output.
Fri Jul 25 19:07:09 1997 Bob Friesenhahn
* webmagick.in (writeindexes): If $icon_url{'ball'} is undefined,
then no ball icon is displayed beside directory items. This is
now the default since more space is left available for the
directory name or title and it looks at least as good.
Wed Jul 16 08:02:13 1997 Bob Friesenhahn
* Makefile.in: Removed typo from AWK code ($ prefix on variables)
so that generating webmagickrc.in works on other than the original
AWK.
Thu Jul 3 13:54:39 1997 Bob Friesenhahn
* Added size hint information which is used by the JPEG library
(and possibly some other formats) to return an image close to the
desired size rather than the full size image. This results in a
considerable speed-up when creating thumbnail images for JPEGs.
* Added $opt_readfailhook to support executing code if reading an
image fails. A typical action would be to unlink the image
(presuming the image is corrupted).
* webmagick.in (dodir): Re-named $opt_thumbbordercolor to
$opt_thumbframebgcolor and $opt_thumbmattecolor to
$opt_thumbframecolor to better reflect what these options do.
Added backward compatability code so the old options continue to
work.
* Created ChangeLog file. Let's keep track of edits from now on.
webmagick-2.02.orig/INSTALL 0100644 0001750 0001750 00000015135 07306313122 015205 0 ustar arafune arafune $Id: INSTALL,v 1.22 2001/06/03 01:43:46 clindell Exp $
Note: This package comes with formal documentation. Peruse this
INSTALL file first to do the basic install and then read or print
out the documentation in the 'doc' subdirectory.
WebMagick requires the ImageMagick (at least version 3.8.4) and
PerlMagick (at least version 1.12) packages as well as a recent version
of PERL 5. You will likely find that certain versions of PerlMagick
are required for certain versions of ImageMagick. I don't know of
a useful way to find this out. The easiest solution is to grab both
packages off the distribution site at the same time. As of ImageMagick
4.0.0, PerlMagick is included with ImageMagick so incompatability should
no longer be an issue.
Obtain PERL version 5 from the Perl Language Home Page at
"http://www.perl.com/perl/index.html". Install PERL according to its
installation instructions.
Obtain ImageMagick (which includes PerlMagick) from
"http://www.imagemagick.org/". Install ImageMagick
according to the instructions in its README file. Consider using the
'configure' configuration method with the --enable-lzw flag to enable
LZW compression for GIF files (otherwise GIF files will be huge!).
Before using this flag however, review your relationship with Unisys
(which holds the patent on LZW compression).
PerlMagick may be installed automatically with ImageMagick through use
of the --enable-perl option to ImageMagick's 'configure' or manually
via 'make install' in ImageMagick's PerlMagick subdirectory. I
personally configure ImageMagick/PerlMagick via the command:
"./configure --enable-lzw --enable-perl --disable-static" which
enables LZW compression, enables automatic build/install of PerlMagick
at 'make install' time, and skips building static libraries (to
decrease compile time). Read about PerlMagick at the PerlMagick web
page at "http://www.imagemagick.org/www/perl.html".
Execute WebMagick's configure script specifying a --prefix option for a
GNU-style directory heriarchy you would like to install in (e.g.
"./configure --prefix=/opt/tools"). This will generate a base copy of
WebMagick that has been edited to reflect the location of your PERL
interpreter and the X11 RGB database.
The configure script will ask you questions to provide definitions of
$opt_prefixpath, $opt_rootpath, $opt_iconpath, $opt_htimage, and
$opt_maptype in the 'webmagick' script and the sample webmagickrc file.
Read the manual page to learn the details. A few examples are provided
below. The script also provides examples of what the options should look
like.
Then "make install". This will install WebMagick, sample icons, the
WebMagick JavaScript interface, and TexInfo documentation. The
WebMagick icons must be installed in a directory somewhere under the
same server "root" as the images you want to catalogue. This root
does not neccessarily have to be the actual server root. The "root"
may be established via a server path mapping (rather than symlink)
that offsets onto another filesystem.
In order for JavaScript mode to operate correctly, the file
'webmagick.js' must be installed in the location specified by
$opt_iconpath and the server must be updated to associate MIME type
"application/x-javascript" with the extension ".js". This file
contains the various JavaScript routines that define WebMagick's
JavaScript interface. See the formal documentation for more on
JavaScript.
Protect My Reputation!
======================
If you are operating a site that my mother wouldn't approve of, please
set the $opt_anonymous option to 1 or use the --anonymous option. This
removes WebMagick copyright info from all generated pages. In particular,
it removes my email address so I don't get email from confused users
regarding material I would rather not hear about. :-)
Path Configuration
==================
The following .webmagickrc file path variables will configure WebMagick for a Web
server root of "/html" and WebMagick icon path "/html/Images/WebMagick".
$opt_prefixpath = ''; # Path or URL to prepend to root URL
# Not used if local relative paths used
$opt_rootpath = '/html'; # Directory Path to top of html tree
# Needed to determine relative paths to images
$opt_iconpath = 'Images/WebMagick';
# Relative path under rootpath / prefixpath
Or, if your images and icons are under your personal HTML directory
(e.g. http://www.bogus.com/~bfriesen/) which is physically
"/home/bfriesen/public_html" and the WebMagick icons are in
"/home/bfriesen/public_html/icons/WebMagick", you can use the
configuration:
$opt_prefixpath = '~bfriesen';
$opt_rootpath = '/home/bfriesen/public_html';
$opt_iconpath = 'icons/WebMagick';
Server Side Imagemaps
=====================
If you are using a recent NCSA or Apache server that supports server-side
imagemaps using relative URLs, then you can use values similar to the
following:
# Server-side imagemap settings
$opt_htimage=''; # Base URL to server-side imagemap CGI
# On some systems this is /cgi-bin/imagemap
# Set to '' to use a ".map" URL with
# relative URLs (latest NCSA & Apache)
$opt_maptype='ncsa'; # Maptype must be "cern" or "ncsa". If
# you are using Apache, specify "ncsa".
In order for server-side imagemaps (used by older browsers) to work
properly, some configuration may be required. Options should be set
similar to the following (CERN configuration shown):
# Server-side imagemap settings
$opt_htimage='/cgi-bin/htimage'; # Base URL to server-side imagemap CGI
# On some systems this is /cgi-bin/imagemap
# Set to '' to use a ".map" URL with
# relative URLs (latest NCSA & Apache)
$opt_maptype='cern'; # Maptype must be "cern" or "ncsa". If
# you are using Apache, specify "ncsa".
NOTES AND WARNINGS
==================
Please be careful than when running WebMagick you are in the correct
directory. If you are in the wrong directory (such as in the
server's root), you can do serious damage because WebMagick will
overwrite all your HTML index files.
To ensure that WebMagick never generates HTML index files in a
particular directory you can create a ".webmagickrc" file in that
directory with the line:
$opt_ignore = 1; # ignore this directory (though link it in)
If no sub-directories are to be have WebMagick applied (if run with
the option ``-recurse'') you can also add the line:
$opt_prune = 1; # prune all sub-directories for recursive runs
If you encounter any difficulties, have suggestions, or accolades,
feel free to send WebMagick's author (Bob Friesenhahn,
bfriesen@simple.dallas.tx.us) or current maintainer (Chris Lindell,
clindell@users.sourceforge.net) an email.
webmagick-2.02.orig/Makefile.am 0100644 0001750 0001750 00000002015 07306015745 016213 0 ustar arafune arafune #
# Top Makefile for WebMagick
#
# Copyright Bob Friesenhahn, 1999
#
AUTOMAKE_OPTIONS = 1.2
# Subdirectories under Automake control
SUBDIRS = doc icons utils
# Binary scripts
bin_SCRIPTS = webmagick
# Directory in which to install WebMagick icons & html files
ICON_INSTALL_DIR = @ROOTPATH@/@ICONPATH@
ICON_INSTALL_FILES = webmagick.js
ETC_INSTALL_DIR = ${exec_prefix}/etc
install-data-local:
$(mkinstalldirs) $(ICON_INSTALL_DIR)
for file in $(ICON_INSTALL_FILES) ; \
do \
$(INSTALL_SCRIPT) $$file $(ICON_INSTALL_DIR) ; \
done
$(INSTALL_DATA) webmagickrc $(ETC_INSTALL_DIR)/webmagickrc
# Additional files to distribute
EXTRA_DIST = INSTALL.generic MANIFEST TODO webmagick.in \
webmagick.js webmagick.lsm webmagick.lsm.in webmagickrc.in
# Generate webmagick.lsm from webmagick.lsm.in at dist time.
webmagick.lsm : webmagick.lsm.in configure.in
date=`date +"%Y-%m-%d" | tr '[a-z]' '[A-Z]'`; \
sed -e "s/%VERSION%/@VERSION@/g" < webmagick.lsm.in | \
sed -e "s/%DATE%/$$date/g" > webmagick.lsm
dist-hook: webmagick.lsm
webmagick-2.02.orig/NEWS 0100644 0001750 0001750 00000000350 07306271244 014654 0 ustar arafune arafune This file records noteworthy changes.
(1.57)
* Now maintained by Chris Lindell at http://webmagick.sourceforge.net
(1.46)
* Makefiles are now based on Automake.
* Updated ftp and web addresses to reflect current locations.
webmagick-2.02.orig/TODO 0100644 0001750 0001750 00000005524 07036366725 014666 0 ustar arafune arafune $Id: TODO,v 1.32 2000/01/10 14:33:57 bfriesen Exp $
Tasks on WebMagick's todo list
==============================
NOTE: My inspiration for actively developing WebMagick has decreased
significantly in the past year. My efforts will likely be constrained
to bug-fixes. However, if you would like to develop some of these
enhancements, I am interested in incorporating them in WebMagick. If
you provide code to support a new feature, please provide
documentation updates as well.
Short Term:
o Support using the image's comment to label the image thumbnail and
page.
o Check for a user-specified index file name (and use it)
in the parent directory. Currently uses the hard-coded
name "index.html".
o Add the ability to set the pointsize of the label font.
o Update the .imgindex format so that seperate thumbnail and HTML
text image titles are supported. Long titles work well with HTML
but have difficulties when applied to thumbnails.
o Support gzipped image files (probably only works with Unix browsers).
o Add info about all the cache files to the status file
o Always generate cache files for images greater than the cache size
o Make xv compatability an option that creates another set of thumbnails
in the .xvpics directory so that web-compatable thumbnails are always
available.
o Add support for displaying a table grid of thumbnails rather than a montage
o Provide support under JavaScript for selecting different framing/layouts.
o Don't change directories (framesets) if there are no
subdirectories in the target directory. This can
support more efficient directory navigation for cases
where there are a number of branch-end subdirectories.
o Add a table mode which skips the montage and displays
reduced thumbnails in an HTML table instead.
o Provide for selecting the desired PERL interpreter via
a configure option.
o Support command line options to the configure script
to avoid interactive configuration.
o Support capability to read label text from image
comment (if available). Since most current comments
are garbage, this would be yet another option.
Long Term:
o Use a template to describe the HTML in the imagemap frame.
o Use tables to emulate frames for browsers that support tables
but not frames.
Wish List:
o Provide summary statistics for an entire run, not just
individual directories when in verbose mode. Difficult since
WebMagick forks per directory and final statistics are printed by
the parent.
o Support indexing images which are located in a different
directory tree from where WebMagick places its index files.
This is to support CD-ROMs and other read-only situations.
o Support quasi-image files which contain the URLs of
images to include in the index. This allows images to
be located remotely and accessed via HTTP.
webmagick-2.02.orig/aclocal.m4 0100644 0001750 0001750 00000006723 07413177421 016030 0 ustar arafune arafune dnl aclocal.m4 generated automatically by aclocal 1.4
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
# serial 1
dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN(AM_INIT_AUTOMAKE,
[AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
VERSION=[$2]
AC_SUBST(VERSION)
dnl test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
ifelse([$3],,
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
AC_REQUIRE([AM_SANITY_CHECK])
AC_REQUIRE([AC_ARG_PROGRAM])
dnl FIXME This is truly gross.
missing_dir=`cd $ac_aux_dir && pwd`
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_REQUIRE([AC_PROG_MAKE_SET])])
#
# Check to make sure that the build environment is sane.
#
AC_DEFUN(AM_SANITY_CHECK,
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftestfile
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
if test "[$]*" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftestfile`
fi
if test "[$]*" != "X $srcdir/configure conftestfile" \
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
test "[$]2" = conftestfile
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
rm -f conftest*
AC_MSG_RESULT(yes)])
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
dnl The program must properly implement --version.
AC_DEFUN(AM_MISSING_PROG,
[AC_MSG_CHECKING(for working $2)
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
if ($2 --version) < /dev/null > /dev/null 2>&1; then
$1=$2
AC_MSG_RESULT(found)
else
$1="$3/missing $2"
AC_MSG_RESULT(missing)
fi
AC_SUBST($1)])
webmagick-2.02.orig/configure 0100755 0001750 0001750 00000141501 07413177426 016076 0 ustar arafune arafune #! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
ac_prev=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
ac_prev=
continue
fi
case "$ac_option" in
-*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) ac_optarg= ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
case "$ac_option" in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bindir="$ac_optarg" ;;
-build | --build | --buil | --bui | --bu)
ac_prev=build ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
build="$ac_optarg" ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
cache_file="$ac_optarg" ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
datadir="$ac_optarg" ;;
-disable-* | --disable-*)
ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
fi
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
eval "enable_${ac_feature}=no" ;;
-enable-* | --enable-*)
ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
fi
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
case "$ac_option" in
*=*) ;;
*) ac_optarg=yes ;;
esac
eval "enable_${ac_feature}='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
ac_prev=exec_prefix ;;
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
exec_prefix="$ac_optarg" ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
-help | --help | --hel | --he)
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
--cache-file=FILE cache test results in FILE
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[same as prefix]
--bindir=DIR user executables in DIR [EPREFIX/bin]
--sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data in DIR
[PREFIX/share]
--sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data in DIR
[PREFIX/com]
--localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
--includedir=DIR C header files in DIR [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
--infodir=DIR info documentation in DIR [PREFIX/info]
--mandir=DIR man documentation in DIR [PREFIX/man]
--srcdir=DIR find the sources in DIR [configure dir or ..]
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM
run sed PROGRAM on installed program names
EOF
cat << EOF
Host type:
--build=BUILD configure for building on BUILD [BUILD=HOST]
--host=HOST configure for HOST [guessed]
--target=TARGET configure for TARGET [TARGET=HOST]
Features and packages:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
EOF
if test -n "$ac_help"; then
echo "--enable and --with options recognized:$ac_help"
fi
exit 0 ;;
-host | --host | --hos | --ho)
ac_prev=host ;;
-host=* | --host=* | --hos=* | --ho=*)
host="$ac_optarg" ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
includedir="$ac_optarg" ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
infodir="$ac_optarg" ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
libdir="$ac_optarg" ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
libexecdir="$ac_optarg" ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
| --locals | --local | --loca | --loc | --lo)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
localstatedir="$ac_optarg" ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
mandir="$ac_optarg" ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
no_recursion=yes ;;
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
| --oldin | --oldi | --old | --ol | --o)
ac_prev=oldincludedir ;;
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
oldincludedir="$ac_optarg" ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix="$ac_optarg" ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
program_prefix="$ac_optarg" ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
program_suffix="$ac_optarg" ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
| --program-transform-n | --program-transform- \
| --program-transform | --program-transfor \
| --program-transfo | --program-transf \
| --program-trans | --program-tran \
| --progr-tra | --program-tr | --program-t)
ac_prev=program_transform_name ;;
-program-transform-name=* | --program-transform-name=* \
| --program-transform-nam=* | --program-transform-na=* \
| --program-transform-n=* | --program-transform-=* \
| --program-transform=* | --program-transfor=* \
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name="$ac_optarg" ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
sbindir="$ac_optarg" ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
| --sharedst | --shareds | --shared | --share | --shar \
| --sha | --sh)
ac_prev=sharedstatedir ;;
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
sharedstatedir="$ac_optarg" ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir="$ac_optarg" ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
sysconfdir="$ac_optarg" ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
ac_prev=target ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
target="$ac_optarg" ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
fi
ac_package=`echo $ac_package| sed 's/-/_/g'`
case "$ac_option" in
*=*) ;;
*) ac_optarg=yes ;;
esac
eval "with_${ac_package}='$ac_optarg'" ;;
-without-* | --without-*)
ac_package=`echo $ac_option|sed -e 's/-*without-//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
fi
ac_package=`echo $ac_package| sed 's/-/_/g'`
eval "with_${ac_package}=no" ;;
--x)
# Obsolete; use --with-x.
with_x=yes ;;
-x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
| --x-incl | --x-inc | --x-in | --x-i)
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
x_includes="$ac_optarg" ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries="$ac_optarg" ;;
-*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
;;
*)
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
echo "configure: warning: $ac_option: invalid host type" 1>&2
fi
if test "x$nonopt" != xNONE; then
{ echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
fi
nonopt="$ac_option"
;;
esac
done
if test -n "$ac_prev"; then
{ echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
exec 6>/dev/null
else
exec 6>&1
fi
exec 5>./config.log
echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
do
case "$ac_arg" in
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c) ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
ac_configure_args="$ac_configure_args '$ac_arg'" ;;
*) ac_configure_args="$ac_configure_args $ac_arg" ;;
esac
done
# NLS nuisances.
# Only set these to C if already set. These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=webmagick.in
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
ac_prog=$0
ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
{ echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
else
{ echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
echo "loading site script $ac_site_file"
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
echo "loading cache $cache_file"
. $cache_file
else
echo "creating cache $cache_file"
> $cache_file
fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
ac_n= ac_c='
' ac_t=' '
else
ac_n=-n ac_c= ac_t=
fi
else
ac_n= ac_c='\c' ac_t=
fi
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
elif test -f $ac_dir/install.sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
fi
done
if test -z "$ac_aux_dir"; then
{ echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:556: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
for ac_dir in $PATH; do
# Account for people who put trailing slashes in PATH elements.
case "$ac_dir/" in
/|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
# Don't use installbsd from OSF since it installs stuff as root
# by default.
for ac_prog in ginstall scoinst install; do
if test -f $ac_dir/$ac_prog; then
if test $ac_prog = install &&
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
break 2
fi
fi
done
;;
esac
done
IFS="$ac_save_IFS"
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL="$ac_cv_path_install"
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
INSTALL="$ac_install_sh"
fi
fi
echo "$ac_t""$INSTALL" 1>&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
echo "configure:609: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
if test "$*" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftestfile`
fi
if test "$*" != "X $srcdir/configure conftestfile" \
&& test "$*" != "X conftestfile $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
{ echo "configure: error: ls -t appears to fail. Make sure there is not a broken
alias in your environment" 1>&2; exit 1; }
fi
test "$2" = conftestfile
)
then
# Ok.
:
else
{ echo "configure: error: newly created file is older than distributed files!
Check your system clock" 1>&2; exit 1; }
fi
rm -f conftest*
echo "$ac_t""yes" 1>&6
if test "$program_transform_name" = s,x,x,; then
program_transform_name=
else
# Double any \ or $. echo might interpret backslashes.
cat <<\EOF_SED > conftestsed
s,\\,\\\\,g; s,\$,$$,g
EOF_SED
program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
rm -f conftestsed
fi
test "$program_prefix" != NONE &&
program_transform_name="s,^,${program_prefix},; $program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
# sed with no file args requires a program.
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:666: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftestmake <<\EOF
all:
@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
eval ac_cv_prog_make_${ac_make}_set=yes
else
eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftestmake
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
echo "$ac_t""yes" 1>&6
SET_MAKE=
else
echo "$ac_t""no" 1>&6
SET_MAKE="MAKE=${MAKE-make}"
fi
PACKAGE=WebMagick
VERSION=2.02
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
{ echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
fi
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
echo "configure:705: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
if (aclocal --version) < /dev/null > /dev/null 2>&1; then
ACLOCAL=aclocal
echo "$ac_t""found" 1>&6
else
ACLOCAL="$missing_dir/missing aclocal"
echo "$ac_t""missing" 1>&6
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
echo "configure:718: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
if (autoconf --version) < /dev/null > /dev/null 2>&1; then
AUTOCONF=autoconf
echo "$ac_t""found" 1>&6
else
AUTOCONF="$missing_dir/missing autoconf"
echo "$ac_t""missing" 1>&6
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
echo "configure:731: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
if (automake --version) < /dev/null > /dev/null 2>&1; then
AUTOMAKE=automake
echo "$ac_t""found" 1>&6
else
AUTOMAKE="$missing_dir/missing automake"
echo "$ac_t""missing" 1>&6
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
echo "configure:744: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
if (autoheader --version) < /dev/null > /dev/null 2>&1; then
AUTOHEADER=autoheader
echo "$ac_t""found" 1>&6
else
AUTOHEADER="$missing_dir/missing autoheader"
echo "$ac_t""missing" 1>&6
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
echo "configure:757: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
MAKEINFO=makeinfo
echo "$ac_t""found" 1>&6
else
MAKEINFO="$missing_dir/missing makeinfo"
echo "$ac_t""missing" 1>&6
fi
# Ensure that make can run correctly
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
echo "configure:773: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
if test "$*" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftestfile`
fi
if test "$*" != "X $srcdir/configure conftestfile" \
&& test "$*" != "X conftestfile $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
{ echo "configure: error: ls -t appears to fail. Make sure there is not a broken
alias in your environment" 1>&2; exit 1; }
fi
test "$2" = conftestfile
)
then
# Ok.
:
else
{ echo "configure: error: newly created file is older than distributed files!
Check your system clock" 1>&2; exit 1; }
fi
rm -f conftest*
echo "$ac_t""yes" 1>&6
# Checks for programs.
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:824: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
for ac_dir in $PATH; do
# Account for people who put trailing slashes in PATH elements.
case "$ac_dir/" in
/|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
# Don't use installbsd from OSF since it installs stuff as root
# by default.
for ac_prog in ginstall scoinst install; do
if test -f $ac_dir/$ac_prog; then
if test $ac_prog = install &&
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
break 2
fi
fi
done
;;
esac
done
IFS="$ac_save_IFS"
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL="$ac_cv_path_install"
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
INSTALL="$ac_install_sh"
fi
fi
echo "$ac_t""$INSTALL" 1>&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:879: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$PERL" in
/*)
ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_PERL="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="/usr/local/bin/perl "
;;
esac
fi
PERL="$ac_cv_path_PERL"
if test -n "$PERL"; then
echo "$ac_t""$PERL" 1>&6
else
echo "$ac_t""no" 1>&6
fi
#
# Find the X11 RGB database
#
if test "$with_x" != 'no'
then
echo $ac_n "checking for RGB database""... $ac_c" 1>&6
echo "configure:919: checking for RGB database" >&5
if eval "test \"`echo '$''{'webmagick_cv_x_rgbdb'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Look for the header file in a standard set of common directories.
# Check X11 before X11Rn because it is often a symlink to the current
# release.
for ac_dir in \
/lib/usr/lib/X11 \
/usr/X11/lib \
/usr/X11R4/lib \
/usr/X11R5/lib \
/usr/X11R6/lib \
/usr/X386/lib \
/usr/XFree86/lib/X11 \
/usr/athena/lib \
/usr/lib \
/usr/lib/X11 \
/usr/lib/X11R4 \
/usr/lib/X11R5 \
/usr/lib/X11R6 \
/usr/local/X11/lib \
/usr/local/X11R4/lib \
/usr/local/X11R5/lib \
/usr/local/X11R6/lib \
/usr/local/lib \
/usr/local/lib/X11 \
/usr/local/lib/X11R4 \
/usr/local/lib/X11R5 \
/usr/local/lib/X11R6 \
/usr/local/x11r5/lib \
/usr/lpp/Xamples/lib \
/usr/openwin/lib \
/usr/openwin/share/lib \
/usr/unsupported/lib \
/usr/x386/lib \
; \
do
if test -f "$ac_dir/X11/rgb.txt"
then
webmagick_cv_x_rgbdb="$ac_dir/X11/rgb.txt"
break
elif test -f "$ac_dir/rgb.txt"
then
webmagick_cv_x_rgbdb="$ac_dir/rgb.txt"
break
fi
done
fi
echo "$ac_t""$webmagick_cv_x_rgbdb" 1>&6
else
webmagick_cv_x_rgbdb='/dev/null'
fi
RGBDB=$webmagick_cv_x_rgbdb
#
# Check for available fonts
#
if test "$with_x" != 'no'
then
# Extract the first word of "xlsfonts", so it can be a program name with args.
set dummy xlsfonts; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:986: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XLSFONTS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$XLSFONTS" in
/*)
ac_cv_path_XLSFONTS="$XLSFONTS" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_XLSFONTS="$XLSFONTS" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_XLSFONTS="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_XLSFONTS" && ac_cv_path_XLSFONTS="xlsfonts "
;;
esac
fi
XLSFONTS="$ac_cv_path_XLSFONTS"
if test -n "$XLSFONTS"; then
echo "$ac_t""$XLSFONTS" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test "${XLSFONTS}X" != "X"
then
echo $ac_n "checking for default font""... $ac_c" 1>&6
echo "configure:1022: checking for default font" >&5
if eval "test \"`echo '$''{'webmagick_cv_defaultfont'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
font1=''
font2=''
font3=''
font4=''
font5='fixed'
tmpfile="/tmp/configure$$"
$XLSFONTS > $tmpfile
exec < $tmpfile
while read font
do
case "$font"
in
-*-lucida-medium-r-*-*-12-*-*-*-*-*-*-* )
font1='-*-lucida-medium-r-*-*-12-*-*-*-*-*-*-*'
;;
-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-* )
font2='-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*'
;;
-*-helvetica-medium-r-*-*-11-*-*-*-*-*-*-* )
font3='-*-helvetica-medium-r-*-*-11-*-*-*-*-*-*-*'
;;
-*-courier-medium-r-normal--12-*-*-*-*-*-*-* )
font4='-*-courier-medium-r-normal--12-*-*-*-*-*-*-*'
;;
-*-times-medium-r-normal--12-*-*-*-*-*-*-* )
font5='-*-times-medium-r-normal--12-*-*-*-*-*-*-*'
;;
esac
done
exec < /dev/tty
rm $tmpfile
fi
if test -n "$font1"
then
webmagick_cv_defaultfont=$font1
elif test -n "$font2"
then
webmagick_cv_defaultfont=$font2
elif test -n "$font3"
then
webmagick_cv_defaultfont=$font3
elif test -n "$font4"
then
webmagick_cv_defaultfont=$font4
elif test -n "$font5"
then
webmagick_cv_defaultfont=$font5
else
webmagick_cv_defaultfont='fixed'
fi
fi
echo "$ac_t""$webmagick_cv_defaultfont" 1>&6
else
webmagick_cv_defaultfont='courier';
fi
DEFAULTFONT=$webmagick_cv_defaultfont
#
# Check for server root path
#
echo $ac_n "checking for server root path""... $ac_c" 1>&6
echo "configure:1095: checking for server root path" >&5
if eval "test \"`echo '$''{'webmagick_cv_rootpath'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo '
In order to map paths into URLs, WebMagick must know the path to your
servers HTML files. For example, if your servers address is
"http://yourdomain/" and this URL resolves to "/usr/local/share/htdocs"
on the system, then the appropriate answer is "/usr/local/share/htdocs".
What is the path to your servers root? '
read webmagick_cv_rootpath
fi
if test -d "$webmagick_cv_rootpath"
then
echo "$ac_t""$webmagick_cv_rootpath" 1>&6
else
echo "$ac_t""$webmagick_cv_rootpath" 1>&6
echo "configure: warning: directory $webmagick_cv_rootpath does not exist!" 1>&2
fi
ROOTPATH=$webmagick_cv_rootpath
#
# Check for WebMagick icon path
#
echo $ac_n "checking for WebMagick icon path""... $ac_c" 1>&6
echo "configure:1126: checking for WebMagick icon path" >&5
if eval "test \"`echo '$''{'webmagick_cv_iconpath'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo '
In order to find its navigation icons, WebMagick must know the
remaining path (in addition to the servers root path) to the WebMagick
icons. This should not contain any preceding or trailing "/". For
example, if the server root path is "/usr/local/share/htdocs" and the icons
are located in "/usr/local/share/htdocs/Images/webmagick" the appropriate
answer would be "Images/webmagick".
What is the remaining path to the WebMagick icons? '
read webmagick_cv_iconpath
echo ''
fi
if test -d "$webmagick_cv_rootpath/$webmagick_cv_iconpath"
then
echo "$ac_t""$webmagick_cv_rootpath/$webmagick_cv_iconpath" 1>&6
else
echo "$ac_t""$webmagick_cv_rootpath/$webmagick_cv_iconpath" 1>&6
echo "configure: warning: directory $webmagick_cv_rootpath/$webmagick_cv_iconpath does not exist!" 1>&2
fi
ICONPATH=$webmagick_cv_iconpath
#
# Check for URL prefix
#
echo $ac_n "checking for URL prefix""... $ac_c" 1>&6
echo "configure:1160: checking for URL prefix" >&5
if eval "test \"`echo '$''{'webmagick_cv_prefixpath'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo '
Sometimes the URL to the top of the HTML files is an offset past
the servers root. This is common for personal home directories
which are addressed as "http://yourdomain/~username" in which case
the appropriate answer would be "~username".
What prefix URL is required (if any)? '
read webmagick_cv_prefixpath
fi
if test -z "$webmagick_cv_prefixpath"
then
echo "$ac_t""none" 1>&6
else
echo "$ac_t""$webmagick_cv_prefixpath" 1>&6
fi
PREFIXPATH=$webmagick_cv_prefixpath
#
# Check for imagemap program path
#
echo $ac_n "checking for imagemap program""... $ac_c" 1>&6
echo "configure:1190: checking for imagemap program" >&5
if eval "test \"`echo '$''{'webmagick_cv_htimage'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo '
This question concerns how your server handles server-side
imagemap processing. Recent servers provide built in support for
imagemaps. These include recent versions of NCSA, Apache, phttpd,
and others. Older servers may require an external CGI program to
handle imagemaps. CERN servers often name this program "htimage".
NCSA names this program "imagemap". WebMagick requires the relative
URL to this program if your server requires it. Typical answers
will be "/cgi-bin/htimage" or "/cgi-bin/imagemap". If your server
does not require an external program, just hit RETURN.
What is the URL to the program you use to handle imagemaps (if any)?'
read webmagick_cv_htimage
echo ''
fi
if test -z "$webmagick_cv_htimage"
then
echo "$ac_t""none" 1>&6
else
echo "$ac_t""$webmagick_cv_htimage" 1>&6
fi
HTIMAGE=$webmagick_cv_htimage
#
# Check for server-side imagemap format
#
echo $ac_n "checking for server-side imagemap format""... $ac_c" 1>&6
echo "configure:1226: checking for server-side imagemap format" >&5
if eval "test \"`echo '$''{'webmagick_cv_maptype'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo '
There are two formats for imagemap files in common use, CERN and
NCSA. NCSA & Apache use the NCSA format. CERN uses the CERN format.
Phttpd can handle either format. Appropriate answers to this question
are "cern" or "ncsa".
What format ("cern" or "ncsa") does your server use for imagemaps?'
read webmagick_cv_maptype
webmagick_cv_maptype=`echo $webmagick_cv_maptype | tr 'A-Z' 'a-z'`
fi
echo "$ac_t""$webmagick_cv_maptype" 1>&6
MAPTYPE=$webmagick_cv_maptype
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs. It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already. You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
sed -n \
-e "s/'/'\\\\''/g" \
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
;;
esac >> confcache
if cmp -s $cache_file confcache; then
:
else
if test -w $cache_file; then
echo "updating cache $cache_file"
cat confcache > $cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
fi
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
cat > conftest.defs <<\EOF
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
s%\[%\\&%g
s%\]%\\&%g
s%\$%$$%g
EOF
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
rm -f conftest.defs
# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}
echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS </dev/null | sed 1q`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
case "\$ac_option" in
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
*) echo "\$ac_cs_usage"; exit 1 ;;
esac
done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
trap 'rm -fr `echo "Makefile doc/Makefile doc/fig/Makefile icons/Makefile utils/Makefile \
webmagick webmagickrc " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
s%@ACLOCAL@%$ACLOCAL%g
s%@AUTOCONF@%$AUTOCONF%g
s%@AUTOMAKE@%$AUTOMAKE%g
s%@AUTOHEADER@%$AUTOHEADER%g
s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
s%@PERL@%$PERL%g
s%@RGBDB@%$RGBDB%g
s%@XLSFONTS@%$XLSFONTS%g
s%@DEFAULTFONT@%$DEFAULTFONT%g
s%@ROOTPATH@%$ROOTPATH%g
s%@ICONPATH@%$ICONPATH%g
s%@PREFIXPATH@%$PREFIXPATH%g
s%@HTIMAGE@%$HTIMAGE%g
s%@MAPTYPE@%$MAPTYPE%g
CEOF
EOF
cat >> $CONFIG_STATUS <<\EOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
if test $ac_beg -gt 1; then
sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
else
sed "${ac_end}q" conftest.subs > conftest.s$ac_file
fi
if test ! -s conftest.s$ac_file; then
ac_more_lines=false
rm -f conftest.s$ac_file
else
if test -z "$ac_sed_cmds"; then
ac_sed_cmds="sed -f conftest.s$ac_file"
else
ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
fi
ac_file=`expr $ac_file + 1`
ac_beg=$ac_end
ac_end=`expr $ac_end + $ac_max_sed_cmds`
fi
done
if test -z "$ac_sed_cmds"; then
ac_sed_cmds=cat
fi
EOF
cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case "$ac_file" in
*:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
*) ac_file_in="${ac_file}.in" ;;
esac
# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
# The file is in a subdirectory.
test ! -d "$ac_dir" && mkdir "$ac_dir"
ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
# A "../" for each directory in $ac_dir_suffix.
ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
else
ac_dir_suffix= ac_dots=
fi
case "$ac_given_srcdir" in
.) srcdir=.
if test -z "$ac_dots"; then top_srcdir=.
else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
*) # Relative path.
srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
top_srcdir="$ac_dots$ac_given_srcdir" ;;
esac
case "$ac_given_INSTALL" in
[/$]*) INSTALL="$ac_given_INSTALL" ;;
*) INSTALL="$ac_dots$ac_given_INSTALL" ;;
esac
echo creating "$ac_file"
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
case "$ac_file" in
*Makefile*) ac_comsub="1i\\
# $configure_input" ;;
*) ac_comsub= ;;
esac
ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@INSTALL@%$INSTALL%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*
EOF
cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF
exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
chmod 555 webmagick
webmagick-2.02.orig/configure.in 0100644 0001750 0001750 00000016273 07413177354 016507 0 ustar arafune arafune #!/bin/sh
#
# Configure Script for WebMagick
# Copyright Bob Friesenhahn, 1997,1999
#
# $Id: configure.in,v 1.24 2001/08/21 17:48:56 clindell Exp $
#
dnl Process this file with autoconf to produce a configure script.
AC_INIT(webmagick.in)
AM_INIT_AUTOMAKE(WebMagick,2.02, ' ')
# Ensure that make can run correctly
AM_SANITY_CHECK
# Checks for programs.
AC_PROG_INSTALL
AC_PATH_PROG(PERL, perl, /usr/local/bin/perl )
#
# Find the X11 RGB database
#
if test "$with_x" != 'no'
then
AC_CACHE_CHECK(for RGB database,webmagick_cv_x_rgbdb,
[# Look for the header file in a standard set of common directories.
# Check X11 before X11Rn because it is often a symlink to the current
# release.
for ac_dir in \
/lib/usr/lib/X11 \
/usr/X11/lib \
/usr/X11R4/lib \
/usr/X11R5/lib \
/usr/X11R6/lib \
/usr/X386/lib \
/usr/XFree86/lib/X11 \
/usr/athena/lib \
/usr/lib \
/usr/lib/X11 \
/usr/lib/X11R4 \
/usr/lib/X11R5 \
/usr/lib/X11R6 \
/usr/local/X11/lib \
/usr/local/X11R4/lib \
/usr/local/X11R5/lib \
/usr/local/X11R6/lib \
/usr/local/lib \
/usr/local/lib/X11 \
/usr/local/lib/X11R4 \
/usr/local/lib/X11R5 \
/usr/local/lib/X11R6 \
/usr/local/x11r5/lib \
/usr/lpp/Xamples/lib \
/usr/openwin/lib \
/usr/openwin/share/lib \
/usr/unsupported/lib \
/usr/x386/lib \
; \
do
if test -f "$ac_dir/X11/rgb.txt"
then
webmagick_cv_x_rgbdb="$ac_dir/X11/rgb.txt"
break
elif test -f "$ac_dir/rgb.txt"
then
webmagick_cv_x_rgbdb="$ac_dir/rgb.txt"
break
fi
done])
else
webmagick_cv_x_rgbdb='/dev/null'
fi
RGBDB=$webmagick_cv_x_rgbdb
AC_SUBST(RGBDB)
#
# Check for available fonts
#
if test "$with_x" != 'no'
then
AC_PATH_PROG(XLSFONTS, xlsfonts, xlsfonts )
if test "${XLSFONTS}X" != "X"
then
AC_CACHE_CHECK(for default font, webmagick_cv_defaultfont,
[
font1=''
font2=''
font3=''
font4=''
font5='fixed'
tmpfile="/tmp/configure$$"
$XLSFONTS > $tmpfile
exec < $tmpfile
while read font
do
case "$font"
in
-*-lucida-medium-r-*-*-12-*-*-*-*-*-*-* )
font1='-*-lucida-medium-r-*-*-12-*-*-*-*-*-*-*'
;;
-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-* )
font2='-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*'
;;
-*-helvetica-medium-r-*-*-11-*-*-*-*-*-*-* )
font3='-*-helvetica-medium-r-*-*-11-*-*-*-*-*-*-*'
;;
-*-courier-medium-r-normal--12-*-*-*-*-*-*-* )
font4='-*-courier-medium-r-normal--12-*-*-*-*-*-*-*'
;;
-*-times-medium-r-normal--12-*-*-*-*-*-*-* )
font5='-*-times-medium-r-normal--12-*-*-*-*-*-*-*'
;;
esac
done
exec < /dev/tty
rm $tmpfile
fi
if test -n "$font1"
then
webmagick_cv_defaultfont=$font1
elif test -n "$font2"
then
webmagick_cv_defaultfont=$font2
elif test -n "$font3"
then
webmagick_cv_defaultfont=$font3
elif test -n "$font4"
then
webmagick_cv_defaultfont=$font4
elif test -n "$font5"
then
webmagick_cv_defaultfont=$font5
else
webmagick_cv_defaultfont='fixed'
fi
])
else
webmagick_cv_defaultfont='courier';
fi
DEFAULTFONT=$webmagick_cv_defaultfont
AC_SUBST(DEFAULTFONT)
#
# Check for server root path
#
AC_MSG_CHECKING(for server root path)
AC_CACHE_VAL(webmagick_cv_rootpath,
[
echo '
In order to map paths into URLs, WebMagick must know the path to your
servers HTML files. For example, if your servers address is
"http://yourdomain/" and this URL resolves to "/usr/local/share/htdocs"
on the system, then the appropriate answer is "/usr/local/share/htdocs".
What is the path to your servers root? '
read webmagick_cv_rootpath
])
if test -d "$webmagick_cv_rootpath"
then
AC_MSG_RESULT($webmagick_cv_rootpath)
else
AC_MSG_RESULT($webmagick_cv_rootpath)
AC_MSG_WARN(directory $webmagick_cv_rootpath does not exist!)
fi
ROOTPATH=$webmagick_cv_rootpath
AC_SUBST(ROOTPATH)
#
# Check for WebMagick icon path
#
AC_MSG_CHECKING(for WebMagick icon path)
AC_CACHE_VAL(webmagick_cv_iconpath,
[
echo '
In order to find its navigation icons, WebMagick must know the
remaining path (in addition to the servers root path) to the WebMagick
icons. This should not contain any preceding or trailing "/". For
example, if the server root path is "/usr/local/share/htdocs" and the icons
are located in "/usr/local/share/htdocs/Images/webmagick" the appropriate
answer would be "Images/webmagick".
What is the remaining path to the WebMagick icons? '
read webmagick_cv_iconpath
echo ''
])
if test -d "$webmagick_cv_rootpath/$webmagick_cv_iconpath"
then
AC_MSG_RESULT($webmagick_cv_rootpath/$webmagick_cv_iconpath)
else
AC_MSG_RESULT($webmagick_cv_rootpath/$webmagick_cv_iconpath)
AC_MSG_WARN(directory $webmagick_cv_rootpath/$webmagick_cv_iconpath does not exist!)
fi
ICONPATH=$webmagick_cv_iconpath
AC_SUBST(ICONPATH)
#
# Check for URL prefix
#
AC_MSG_CHECKING(for URL prefix)
AC_CACHE_VAL(webmagick_cv_prefixpath,
[
echo '
Sometimes the URL to the top of the HTML files is an offset past
the servers root. This is common for personal home directories
which are addressed as "http://yourdomain/~username" in which case
the appropriate answer would be "~username".
What prefix URL is required (if any)? '
read webmagick_cv_prefixpath
])
if test -z "$webmagick_cv_prefixpath"
then
AC_MSG_RESULT(none)
else
AC_MSG_RESULT($webmagick_cv_prefixpath)
fi
PREFIXPATH=$webmagick_cv_prefixpath
AC_SUBST(PREFIXPATH)
#
# Check for imagemap program path
#
AC_MSG_CHECKING(for imagemap program)
AC_CACHE_VAL(webmagick_cv_htimage,
[
echo '
This question concerns how your server handles server-side
imagemap processing. Recent servers provide built in support for
imagemaps. These include recent versions of NCSA, Apache, phttpd,
and others. Older servers may require an external CGI program to
handle imagemaps. CERN servers often name this program "htimage".
NCSA names this program "imagemap". WebMagick requires the relative
URL to this program if your server requires it. Typical answers
will be "/cgi-bin/htimage" or "/cgi-bin/imagemap". If your server
does not require an external program, just hit RETURN.
What is the URL to the program you use to handle imagemaps (if any)?'
read webmagick_cv_htimage
echo ''
])
if test -z "$webmagick_cv_htimage"
then
AC_MSG_RESULT(none)
else
AC_MSG_RESULT($webmagick_cv_htimage)
fi
HTIMAGE=$webmagick_cv_htimage
AC_SUBST(HTIMAGE)
#
# Check for server-side imagemap format
#
AC_MSG_CHECKING(for server-side imagemap format)
AC_CACHE_VAL(webmagick_cv_maptype,
[
echo '
There are two formats for imagemap files in common use, CERN and
NCSA. NCSA & Apache use the NCSA format. CERN uses the CERN format.
Phttpd can handle either format. Appropriate answers to this question
are "cern" or "ncsa".
What format ("cern" or "ncsa") does your server use for imagemaps?'
read webmagick_cv_maptype
dnl Lower case string
webmagick_cv_maptype=`echo $webmagick_cv_maptype | tr '[A-Z]' '[a-z]'`
])
AC_MSG_RESULT($webmagick_cv_maptype)
MAPTYPE=$webmagick_cv_maptype
AC_SUBST(MAPTYPE)
AC_OUTPUT(Makefile doc/Makefile doc/fig/Makefile icons/Makefile utils/Makefile \
webmagick webmagickrc )
chmod 555 webmagick
webmagick-2.02.orig/install-sh 0100755 0001750 0001750 00000011244 06260603313 016157 0 ustar arafune arafune #! /bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
#
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
tranformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0
webmagick-2.02.orig/missing 0100755 0001750 0001750 00000014213 07306271260 015555 0 ustar arafune arafune #! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
# Franc,ois Pinard , 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing - GNU libit 0.0"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
aclocal)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`configure.in'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`configure.in'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`configure.in'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
makeinfo)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequirements for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
webmagick-2.02.orig/mkinstalldirs 0100755 0001750 0001750 00000001322 07306271260 016761 0 ustar arafune arafune #! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman
# Created: 1993-05-16
# Public domain
# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
errstatus=0
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here
webmagick-2.02.orig/webmagick.in 0100755 0001750 0001750 00000434276 07413166136 016465 0 ustar arafune arafune #! @PERL@
# -*- Mode: Perl -*-
#
# $Id: webmagick.in,v 1.97 2001/12/05 13:52:39 ache Exp $
#
# You are looking at the main PERL script for WebMagick, a package to
# intelligently create HTML and JavaScript index files and imagemaps
# corresponding to a directory tree of image files.
#
# Copyright Bob Friesenhahn (bfriesen@simple.dallas.tx.us) 1996, 1997,
# 1998, 1999, 2000
#
# This work may be used for any purpose, public or private, provided
# that this work or derivations thereof are attributed to its author.
# Full copyrights to this work are maintained by its author to ensure
# that rights so bestowed are not abridged.
#
# NOTE: This program has a substantial manual. Considerable time has
# been spent writing it so please at least skim through it before
# asking questions.
#
# Requires the ImageMagick, PerlMagick, and PERL 5 packages. May
# possibly execute correctly (but with reduced performance) with
# package versions as old as:
# ImageMagick -- 3.8.4
# PerlMagick -- 1.12
# PERL -- 5.003
#
# But always tested by the author with recent versions. At the last
# update of these notes (December 19, 1998) the latest versions tested
# were:
# ImageMagick -- 4.1.6
# PerlMagick -- 1.55
# PERL -- 5.004_04
#
# While some effort is made to ensure that WebMagick will execute under
# older package versions, the author does not use these versions so
# he will only know to correct incompatabilities if they are brought
# to his attention.
#
# The latest version of WebMagick is always available from the URL
# "ftp://ftp.simplesystems.org/pub/WebMagick". Keep track of
# the latest WebMagick developments by visiting the WebMagick web page
# at "http://webmagick.sourceforge.net/".
#
# Obtain ImageMagick from "ftp://ftp.wizards.dupont.com/pub/ImageMagick"
# or visit the ImageMagick web page at
# "http://www.wizards.dupont.com/cristy/ImageMagick.html".
#
# Obtain PerlMagick from
# "ftp://ftp.wizards.dupont.com/pub/ImageMagick/perl" or visit the
# PerlMagick web page at
# "http://www.wizards.dupont.com/cristy/www/perl.html".
#
# ImageMagick and PerlMagick are written by John Cristy (cristy@dupont.com).
# WebMagick would not be possible without his wonderful software. The
# author greatly appreciates Cristy's assistance with ironing out PerlMagick's
# (or WebMagick's bugs) during the development of WebMagick.
#
# Suggestions, moral support, and patches were provided by Anthony
# Thyssen (anthony@cit.gu.edu.au). His help is very much appreciated.
#
use locale;
use POSIX qw(strftime _exit);
use Cwd;
# If your PERL barfs, you may need to comment one or more of the following
# lines out:
use strict 'refs'; # Be picky about references
use strict 'subs'; # Be picky about subroutines
use strict 'vars'; # Be picky about variable scope (explicit globals)
#
# Global variable declarations
#
my (
%RGBDB, # RGB color database
@allFiles, # List of files in current directory
@allImageFiles, # List of all source file names in directory
@cacheFiles, # List of files in the image cache
$currentDirectory, # Current directory (absolute)
$doMontage, # Set to true if montage must be generated
$doPageHtml, # Set to true if per-page HTML files must be generated
%dirOrder, # Order directories are listed in dirindex file
%dirTitles, # Directory name to title index
%fileNames, # Hash of generated file names
%frameTargets, # Frame targets
@global_option_files, # List of rc files to source before all others
$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
$htmlParams, # String form of HTML parameters
%iconImageSizes, # Size of icons
%iconImageUrls, # URLs for icons
$icon_base_url, # URL to icon directory
$icon_dir_path, # Path to icon directory
%icon_paths, # Paths to icon files
@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
%imageOrder, # Order that images occur in imgindex file
$inChild, # Set to true if this process is a child
$currentDate,
@montageImages, # List of per-page montage image names
@montageImageSizes, # List of per-page montage image sizes
$montageArguments, # PerlMagick Montage() arguments
$montageParameters, # Montage() arguments plus others that effect montage output
$netscapeColormap, # PerlMagick image object representing Netscape color cube
$numPages, # Number of pages to represent current directory
$opt_address,
$opt_allowconfig,
$opt_anonymous,
$opt_cache,
$opt_cachedir,
$opt_cacheformat,
$opt_cachegeom,
$opt_cachemin,
$opt_coloralink,
$opt_colorback,
$opt_colorfore,
$opt_colorlink,
$opt_colorvlink,
$opt_columns,
$opt_date,
$opt_debug,
$opt_dircoloralink,
$opt_dircolorback,
$opt_dircolorfore,
$opt_dircolorlink,
$opt_dircolorvlink,
$opt_dirfmt,
$opt_dirhtmlext,
$opt_dirindexname,
$opt_forcecache,
$opt_forcegif,
$opt_forcejpeg,
$opt_forcehtml,
$opt_forcemontage,
$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,
$opt_framemarginheight,
$opt_framemarginwidth,
$opt_frames,
$opt_framestyle,
$opt_htmlext,
$opt_header,
$opt_footer,
$opt_help,
$opt_htimage,
$opt_iconbase,
$opt_iconpath,
%opt_icons,
$opt_ignore,
$opt_ignorefp,
$opt_imgindexname,
$opt_indexname,
$opt_javascript,
$opt_jpegquality,
$opt_lockfile,
$opt_mapnetscape,
$opt_maptype,
$opt_maxgif,
$opt_metaauthor,
$opt_metacharset,
$opt_metaclassification,
$opt_metadescription,
$opt_metaexpires,
$opt_metakeywords,
$opt_msg_copyright,
$opt_msg_date_format,
$opt_msg_directories,
$opt_msg_directory_navigator,
$opt_msg_images,
$opt_msg_index_of_directory,
$opt_msg_index_of_files,
$opt_msg_index_through,
$opt_msg_next,
$opt_msg_page_navigator,
$opt_msg_page_updated_on,
$opt_msg_prev,
$opt_msg_produced_by,
$opt_msg_readme,
$opt_msg_up,
$opt_pageindexname,
$opt_prefixpath,
$opt_prune,
$opt_readfailhook,
$opt_readme,
$opt_readmevisible,
$opt_recurse,
$opt_rgbdb,
$opt_rootpath,
$opt_rows,
$opt_serversidemap,
$opt_skip,
$opt_srcdir,
$opt_stylesheet, # URL to a CSS to use
$opt_tables,
$opt_thumbbackground,
$opt_thumbbordercolor,
$opt_thumbborderwidth,
$opt_thumbcompose,
$opt_thumbfont,
$opt_thumbforeground,
$opt_thumbframe,
$opt_thumbframebgcolor,
$opt_thumbframecolor,
$opt_thumbgeometry,
$opt_thumbgravity,
$opt_thumblabel,
$opt_thumblabelwidth,
$opt_thumbmattecolor,
$opt_thumbposthook,
$opt_thumbprehook,
$opt_thumbshadow,
$opt_thumbtexture,
$opt_thumbtransparent,
$opt_title,
$opt_verbose,
$opt_version,
$opt_webmagickrc, # Per-directory WebMagick rc file name
$opt_zoomfilter,
$opt_pichtml,
$opt_pichtmlbottom,
$opt_pichtmlext,
$opt_pichtmlnav,
$opt_pichtmlputtitle,
$opt_pichtmltarget,
$opt_pichtmltitleend,
$opt_pichtmltitlestart,
$opt_pichtmltop,
$pageStatusTime, # Time status file last modified
$pageNumber, # Current page number
$pathSep, # OS-specific path separator
$perlVarsLoaded, # Set to one when directory status file sourced
$perlVarsVersion, # version used for last file generation
$prefix, # installation directory
$requiredPerlVarsVersion, # version required. If less than this, regenerate
%relativePathCache, # Relative path cache
$sourceDirectory, # Directory to process
%thumbImageSizes, # thumbnail image sizes
@imageNames, # List of source file names for current page
$startTime, # Clock time when program started
%dirJsLink, # Link name to use when changing directories via JavaScript
@dirNames, # List of directories under this directory
$pageTitle, # Title for current page
%webmagickInfo # WebMagick version information as a hash
);
###########################################################################
# Internal Default Options
###########################################################################
#
#WebMagickRcTop -- Don't remove this line
#
# Copy the webmagickrc file to your home directory under the name
# .webmagickrc. Any default definitions you want to override should be
# uncommented in this file and modified.
#
# Navigation Icon Paths and URLs
# Specify the path and file name for the navigation icons.
# !!!MUST EDIT OR OVERRIDE!!!
#
$opt_rootpath = '@ROOTPATH@'; # Directory Path to top of html tree
# Needed to determine relative paths to images
$opt_prefixpath = '@PREFIXPATH@'; # Path or URL to prepend to root URL
# Not used if local relative paths used
$opt_iconpath = '@ICONPATH@';
# Relative path under rootpath / prefixpath
$opt_iconbase = '';
# Global icons base URL, if not empty
$prefix = '@prefix@'; # installation directory
#
# Server-side imagemap settings
# !!!MAY NEED TO EDIT OR OVERRIDE!!!
#
$opt_htimage='@HTIMAGE@'; # Base URL to server-side imagemap CGI
# On some systems this is /cgi-bin/imagemap
# Set to '' to use a ".map" URL with relative
# URLs (latest NCSA & Apache)
$opt_maptype='@MAPTYPE@'; # Maptype must be 'cern' or 'ncsa'. If you are
# using Apache, specify 'ncsa'.
$opt_serversidemap = 0; # Enable server-side maps writting
$perlVarsVersion = 0; # default this to 0 for it to be overidden by appropriate status files
$requiredPerlVarsVersion = 2.2; # need this version to avoid regeneration of files
#
# RC files
#
#
# Name of per-directory rc file
$opt_webmagickrc = '.webmagickrc';
# global rc files
@global_option_files = ("@sysconfdir@/webmagickrc", "$ENV{'HOME'}/${opt_webmagickrc}");
#
# Lockfile to keep from doing same directory in two processes
#
$opt_lockfile = '.webmagick.lockfile';
# File naming
$opt_indexname = 'index.html'; # Per-directory master index file
$opt_readme = 'README.html';# Name of welcome page README file ('' = none)
$opt_pageindexname = '.index'; # Base name of secondary index files
$opt_dirindexname = '.dirindex'; # Subdirectory Title cross-reference
# dirname Directory Title
$opt_dirhtmlext = '.html'; # Use .shtml for SSI
$opt_imgindexname = '.imgindex'; # Image name to label cross-reference file
if ($^O eq "MSWin32")
{$pathSep = "\\"; }
else
{$pathSep = "/"; }
#
# HTML color and background image related options
#
# X11 RBG color database (rgb.txt) location
# Entries in this file have the form:
# Red Green Blue Color-name
# where color intensities are specified in decimal.
# e.g. 250 240 230 linen
$opt_rgbdb='@RGBDB@';
#
# Page Frame & non-framed pages
$opt_colorback = '#CCCCCC'; # Color -- Background
$opt_colorfore = 'black'; # Color -- Foreground
$opt_coloralink = '#FF0000'; # Color -- Active link
$opt_colorlink = '#0000EE'; # Color -- Link
$opt_colorvlink = '#551A8B'; # Color -- Visited link
#
# Directory frame (Leave options empty ('') to use page frame colors
$opt_dircolorback = '#B2B2B2'; # Color -- Background
$opt_dircolorfore = 'black'; # Color -- Foreground
$opt_dircoloralink = ''; # Color -- Active link
$opt_dircolorlink = ''; # Color -- Link
$opt_dircolorvlink = ''; # Color -- Visited link
$opt_stylesheet = ''; # no default stylesheet
$opt_allowconfig = 0; # default to not allowing configuration
# General options
$opt_anonymous = 0; # Don't show address & copyright info on pages
$opt_debug = 0; # Debug flag (default off)
$opt_recurse = 0; # Recursivally apply webmagick (default off)
$opt_prune = 0; # Do Not recurse into subdirectories (off)
$opt_ignore = 0; # Do not webmagick this directory
# but still recurse into sub-directories
$opt_ignorefp = 1; # ignore _* special FrontPage directories (on)
$opt_srcdir = '.'; # Source directory path (current directory)
$opt_verbose = 0; # Verbose flag (default off)
$opt_forcecache = 0; # Force update of cached thumbnails
$opt_forcehtml = 0; # Force HTML files to be generated (default off)
$opt_forcemontage = 0; # Force montage (default off)
$opt_forcegif = 0; # Force GIF imagemaps (default off)
$opt_forcejpeg = 0; # Force JPEG imagemaps (default off)
$opt_jpegquality = 70; # Quality for JPEG imagemaps
$opt_help = 0; # Display usage message
$opt_version = 0; # Display version info
$opt_htmlext = '.html'; # Use .shtml for SSI
$opt_header = '
'; # Imagemap extra page header (HTML)
$opt_footer = '
'; # Imagemap extra page footer (HTML)
$opt_javascript = 0; # Enable JavaScript output
$opt_readmevisible = 0; # Make README.html be first page.
$opt_title = ''; # Page title (blank provides default title)
$opt_tables = 0; # disable tables
$opt_address = ''; # Additonal address info for bottom of
# imagemap page
$opt_date = 1; # Output updates date
$opt_pichtml = 0; # Write separate HTML for each picture
$opt_pichtmlbottom = '
';
$opt_pichtmlext = '.html'; # Use .shtml for SSI
$opt_pichtmlnav = 0; # Write navigation into pic's HTML
$opt_pichtmlputtitle = 1; # Write picture title above it
$opt_pichtmltarget = '';
$opt_pichtmltitleend = '
'; # End tags for picture title
$opt_pichtmltitlestart = '
'; # Start tags for picture title
$opt_pichtmltop = '
';
#
# ImageMagick Montage settings
#
$opt_maxgif = 30000; # Maximum GIF imagemap size before
# trying JPEG
$opt_columns = 6; # Max number of columns in montage grid
$opt_rows = 4; # Max number of rows in montage grid
$opt_mapnetscape = 0; # Map GIFs to Netscape 216-color cube
$opt_thumbtexture = 'false'; # Texture to tile onto the image background
$opt_thumbbackground = '#CCCCCC'; # Montage background color
$opt_thumbborderwidth = 0; # Thumbnail border width (pixels)
$opt_thumbframebgcolor = 'black'; # Inside of Frame color. Unused if no frame
$opt_thumbframecolor = '#CCCCCC'; # Color -- Frame Color
$opt_thumbtransparent = $opt_thumbbackground; # Color -- Image Transparency
$opt_thumbcompose = 'Replace'; # Thumbnail image composition operation
$opt_thumbfont = '@DEFAULTFONT@'; # Label font
$opt_thumbforeground = 'black'; # Montage foreground color
$opt_thumbframe = 'false'; # Geometry of frame around thumbnail
# (default false)
$opt_thumbgeometry = '106x80+2+2>'; # Size of thumbnail images (width x height)
$opt_thumbgravity = 'Center'; # Direction thumbnail gravitates to
# (default Center)
$opt_thumblabel = '%f\n%wx%h\n%b'; # Default format for thumbnail text label
$opt_thumblabelwidth = 13; # Label width past which truncation occurs
$opt_thumbshadow = 'false'; # Enable decorative shadow under thumbnail
# (default disabled)
$opt_zoomfilter = 'Mitchell'; # Zoom (size reduction) filter
# (Box/Triangle/Mitchell)
#
# Hooks to add code to key places in WebMagick
#
$opt_thumbprehook = ''; # PerlMagick commands to execute on original
# prior reducing to thumbnail size
$opt_thumbposthook = ''; # PerlMagick commands to execute on image
# after reduction to thumbnail size
$opt_readfailhook = ''; # PERL commands to execute if reading image
# fails due to image corruption
#
# Caching related options
#
# Note: See below about sharing cache with 'xv'
# If caching is turned on, the montage grid will continue to be
# controlled by opt_thumbgeometry but the thumbnail size will be
# controlled by opt_cachegeom
$opt_cache = 1; # Cache thumbnails
$opt_cachedir = '.cache'; # Subdirectory to cache thumbnails in
$opt_cacheformat = 'JPEG'; # Format to use for thumbnails
$opt_cachegeom = $opt_thumbgeometry; # Thumbnail geometry
$opt_cachemin = 300*200; # Smallest image to cache in total pixels
# (width * height). Images smaller than
# this size will not be cached.
# Uncomment these options to share cache with John Bradley's 'xv'
# (Visual Schnauzer format) NOTE: The 'xv' thumbnail format only
# supports 128 absolute colors so expect some montage thumbnail
# degradation when using 'xv' thumbnails.
#
#
# $opt_cacheformat = 'P7'; # 'xv's thumbnail format
# $opt_cachegeom = '80x60'; # 'xv's default thumbnail geometry is 80x60
# $opt_cachedir = '.xvpics'; # 'xv's thumbnail cache directory
# $opt_cachemin = 0; # Cache all thumbnails
#
# Uncomment remaining to obtain 'xv's Visual Schnauzer "look and feel"
#
# $opt_thumbgeometry = '92x72+2+2>';
# $opt_thumblabel = '%f';
# $opt_thumblabelwidth = 12;
# $opt_thumbgravity = 'South';
#
# Frame related options
#
$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_framestyle = 1; # Frame style to use (out of those available)
#
# Meta-tag defaults
#
$opt_metaauthor = ''; # Page author
$opt_metacharset = ''; # Page character set
$opt_metaclassification = ''; # Page classification
$opt_metadescription = ''; # Page description
$opt_metaexpires = ''; # Date page expires (e.g "Tue, 20 Aug 1996 14:25:27 GMT")
$opt_metakeywords = 'WebMagick'; # Key words
#
# Messages customization defaults
#
$opt_msg_copyright = 'Copyright ';
$opt_msg_date_format = '%B %e, %Y'; # See strftime(3)
$opt_msg_directories = 'Directories';
$opt_msg_directory_navigator = 'Directory Navigator';
$opt_msg_images = 'Images';
$opt_msg_index_of_directory = 'Index of directory';
$opt_msg_index_of_files = 'Index of files ';
$opt_msg_index_through = 'through';
$opt_msg_next = 'Next';
$opt_msg_page_navigator = 'Page Navigator';
$opt_msg_page_updated_on = 'Page updated on';
$opt_msg_prev = 'Prev';
$opt_msg_produced_by = 'Produced by';
$opt_msg_readme = 'ReadMe';
$opt_msg_up = 'Up';
#
# Hash table of images used -- image size read internally by webmagick
#
# $opt_icons{'background'} = 'thumbs.jpg'; # Thumbnail frame background image
# $opt_icons{'dirbackground'} = 'dir.jpg'; # Directory frame background image
$opt_icons{'config'} = 'blue_c.gif'; # Configuration button
$opt_icons{'prev'} = 'blue_prev.gif'; # Previous
$opt_icons{'prev_gray'} = 'gray_prev.gif'; # Previous (grayed out)
$opt_icons{'next'} = 'blue_next.gif'; # Next
$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{'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
$opt_icons{'frame-style-1'} = 'frame-style-1.jpg';
$opt_icons{'frame-style-2'} = 'frame-style-2.jpg';
$opt_icons{'frame-style-3'} = 'frame-style-3.jpg';
$opt_icons{'frame-style-4'} = 'frame-style-4.jpg';
#
# WebMagickRcBottom -- Don't remove this line
#
# Format Templates
#
# WARNING: This is for expert web and perl programmers only do not
# modify unless you know what you are doing. To learn how frames work,
# read the pages under the URL
# http://home.netscape.com/assist/net_sites/frames.html
#
# Extra Images can be added to the above hash table and then used in
# the following format options. For example the 'dir' icon above can
# be uncommented then the following lines added below. WARNING: this
# is only useful if $opt_indexname is something else.
#
#
#
#
# Dir Listing
#
#
# Template for the Frame definition
# This allows adding frames, changing geometry, etc.
#
# Frame Target Names
$opt_frame_name_top="_top"; # Reload frames entirely
#$opt_frame_name_self="_self"; # Link to this (same) frame
#$opt_frame_name_parent="_parent"; # Link to parent frame
$opt_frame_name_dirview="dirview"; # Directory nav frame
$opt_frame_name_thumbview="thumbview"; # Imagemap (image selection) frame
$opt_frame_name_imageview="imageview"; # Image viewing frame (three frames)
#
# Simple two frame screen with directories listed in the left
# frame and imagemap/README displayed in the right frame.
#
# -------------
# | | |
# | | |
# | | |
# | | |
# | | |
# | | |
# -------------
$opt_framefmt{1}=
'';
$opt_framefmt_frames{1}=2; # Number of frames expressed by this frame format
# Three frame screen with directories listed in top-left frame,
# imagemap displayed in bottom-left frame, and README/Images
# displayed in full-height right-hand frame.
# -------------
# | | |
# | | |
# |--| |
# | | |
# | | |
# | | |
# -------------
$opt_framefmt{2}=
'';
$opt_framefmt_frames{2}=3; # Number of frames expressed by this frame format
# Three frame screen with directories listed in left frame,
# imagemap displayed in top-right frame, and README/Images
# displayed in lower-right frame.
# -------------
# | | |
# | |----------|
# | | |
# | | |
# | | |
# | | |
# -------------
$opt_framefmt{3}=
'';
$opt_framefmt_frames{3}=3; # Number of frames expressed by this frame format
# Three frame screen with directories listed in lower-left frame,
# imagemap displayed in top frame, and README/Images displayed in
# lower-right frame.
# -------------
# | |
# |-- ----------|
# | | |
# | | |
# | | |
# | | |
# -------------
$opt_framefmt{4}=
'';
$opt_framefmt_frames{4}=3; # Number of frames expressed by this frame format
#
# Template for the Directory Index Frame
#
$opt_frameddirfmt='
${uphtml}
${helphtml}
${nexthtml}
${dirhtml}
';
#
# Template for Non-Framed Top Index Page ($opt_indexname)
#
$opt_dirfmt='\n
${opt_msg_directory_navigator} ...
${uphtml}
${helphtml}
${dirhtml}
${pageindexhtml}
';
# Save revision to variable
$webmagickInfo{'version'} = '@VERSION@';
###########################################################################
# End of Internal Default Options
###########################################################################
select(STDERR); $| = 1; # Make stderr unbuffered
select(STDOUT); $| = 1; # Make stdout unbuffered
umask( 022 ); # Sets default file mode 644
$startTime = time; # Save start time
$inChild = 0;
# Set signal handler to gracefully abort (hah!). Handle signal
# induced exits properly. Only the parent prints a status message.
sub sig_handler {
my ($sig) = @_;
if( ! $inChild ) {
syswrite (STDERR, "\nCaught signal SIG", 18);
syswrite (STDERR, "$sig", length("$sig"));
syswrite (STDERR, " -- aborting ...\n", 17);
}
_exit(1);
}
$SIG{'HUP'} = \&sig_handler;
$SIG{'INT'} = \&sig_handler;
$SIG{'QUIT'} = \&sig_handler;
# Allow global options files to override defaults set above (but not
# command line options)
my $goptfile;
foreach $goptfile (@global_option_files) {
sourceRcFile( $goptfile )
|| die("Error sourcing ${goptfile}\n");
}
# Eval per-directory rc files if they exist. Rc files are evaluated
# for each directory starting from $opt_rootdir until the current
# directory is reached. This supports "additive" behavior for a branch
# in the tree.
$currentDirectory=cwd(); # Get current (absolute) directory
evaluateRcFiles();
#
# We don't really like command line options but we'll support them anyway. :-)
#
use Getopt::Long;
if ( ! GetOptions(
'address=s' => \$opt_address,
'anonymous!' => \$opt_anonymous,
'cache!' => \$opt_cache,
'cachedir=s' => \$opt_cachedir,
'cacheformat=s' => \$opt_cacheformat,
'cachegeom=s' => \$opt_cachegeom,
'cachemin=i' => \$opt_cachemin,
'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,
'dircoloralink=s' => \$opt_dircoloralink,
'dircolorback=s' => \$opt_dircolorback,
'dircolorfore=s' => \$opt_dircolorfore,
'dircolorlink=s' => \$opt_dircolorlink,
'dircolorvlink=s' => \$opt_dircolorvlink,
'dirhtmlext=s' => \$opt_dirhtmlext,
'dirindexname=s' => \$opt_dirindexname,
'footer=s' => \$opt_footer,
'forcecache!' => \$opt_forcecache,
'forcegif!' => \$opt_forcegif,
'forcehtml!' => \$opt_forcehtml,
'forcejpeg!' => \$opt_forcejpeg,
'forcemontage!' => \$opt_forcemontage,
'framemarginwidth=i' => \$opt_framemarginwidth,
'framemarginheight=i' => \$opt_framemarginheight,
'framebordersize=i' => \$opt_framebordersize,
'frameborder=s' => \$opt_frameborder,
'frames!' => \$opt_frames,
'framestyle=i' => \$opt_framestyle,
'header=s' => \$opt_header,
'help!' => \$opt_help,
'htimage=s' => \$opt_htimage,
'htmlext=s' => \$opt_htmlext,
'iconbase=s' => \$opt_iconbase,
'iconpath=s' => \$opt_iconpath,
'ignorefp!' => \$opt_ignorefp,
'imgindexname=s' => \$opt_imgindexname,
'indexname=s' => \$opt_indexname,
'javascript!' => \$opt_javascript,
'jpegquality=i' => \$opt_jpegquality,
'mapnetscape!' => \$opt_mapnetscape,
'maptype=s' => \$opt_maptype,
'maxgif=i' => \$opt_maxgif,
'msg_copyright=s' => \$opt_msg_copyright,
'msg_date_format=s' => \$opt_msg_date_format,
'msg_directories=s' => \$opt_msg_directories,
'msg_directory_navigator=s' => \$opt_msg_directory_navigator,
'msg_images=s' => \$opt_msg_images,
'msg_index_of_directory=s' => \$opt_msg_index_of_directory,
'msg_index_of_files=s' => \$opt_msg_index_of_files,
'msg_index_through=s' => \$opt_msg_index_through,
'msg_next=s' => \$opt_msg_next,
'msg_page_navigator=s' => \$opt_msg_page_navigator,
'msg_page_updated_on=s' => \$opt_msg_page_updated_on,
'msg_prev=s' => \$opt_msg_prev,
'msg_produced_by=s' => \$opt_msg_produced_by,
'msg_readme=s' => \$opt_msg_readme,
'msg_up=s' => \$opt_msg_up,
'pageindexname=s' => \$opt_pageindexname,
'pichtml!' => \$opt_pichtml,
'pichtmlbottom=s' => \$opt_pichtmlbottom,
'pichtmlext=s' => \$opt_pichtmlext,
'pichtmlnav!' => \$opt_pichtmlnav,
'pichtmlputtitle!' => \$opt_pichtmlputtitle,
'pichtmltarget=s' => \$opt_pichtmltarget,
'pichtmltitleend=s' => \$opt_pichtmltitleend,
'pichtmltitlestart=s' => \$opt_pichtmltitlestart,
'pichtmltop=s' => \$opt_pichtmltop,
'prefixpath=s' => \$opt_prefixpath,
'readme=s' => \$opt_readme,
'readmevisible!' => \$opt_readmevisible,
'recurse!' => \$opt_recurse,
'rootpath=s' => \$opt_rootpath,
'rows=i' => \$opt_rows,
'serversidemap!' => \$opt_serversidemap,
'srcdir=s' => \$opt_srcdir,
'stylesheet=s' => \$opt_stylesheet,
'tables!' => \$opt_tables,
'thumbtexture=s' => \$opt_thumbtexture,
'thumbbackground=s' => \$opt_thumbbackground,
'thumbborderwidth=i' => \$opt_thumbborderwidth,
'thumbframebgcolor=s' => \$opt_thumbframebgcolor,
'thumbcompose=s' => \$opt_thumbcompose,
'thumbfont=s' => \$opt_thumbfont,
'thumbforeground=s' => \$opt_thumbforeground,
'thumbframe=s' => \$opt_thumbframe,
'thumbgeometry=s' => \$opt_thumbgeometry,
'thumbgravity=s' => \$opt_thumbgravity,
'thumblabel=s' => \$opt_thumblabel,
'thumblabelwidth=s' => \$opt_thumblabelwidth,
'thumbshadow=s' => \$opt_thumbshadow,
'thumbtransparent=s' => \$opt_thumbtransparent,
'title=s' => \$opt_title,
'verbose!' => \$opt_verbose,
'version!' => \$opt_version,
'zoomfilter=s' => \$opt_zoomfilter
)
) {
help();
exit(0);
}
#
# Print help message
#
if( $opt_help ) {
help();
exit(0);
}
#
# Print version message
#
if( $opt_version ) {
version();
exit(0);
}
#
# Check if source directory is valid
#
if ( ! -d "${opt_srcdir}" ) {
print( STDERR "No ${opt_srcdir} directory\n" );
exit(1);
}
#
# Open X11 RGB database
#
if ( -f $opt_rgbdb ) {
open( RGBDB, "<$opt_rgbdb" )
|| die("Unable to open RGB database $opt_rgbdb");
while( ) {
m/^!/ && next;
my ( $red, $green, $blue, $color );
chop;
s/^[ \t]+//; # Remove any preceding spaces
($red, $green, $blue, $color) = split( /[ \t]+/, $_, 4);
$RGBDB{"\L$color"} = sprintf("#%02X%02X%02X", $red, $green, $blue);
}
close( RGBDB );
} else {
print( STDERR "Warning: X11 RGB database \'$opt_rgbdb\' not found\n" );
}
#
# Minimal 16-color named set as defined by HTML 3.2
#
$RGBDB{'black'} = '#000000';
$RGBDB{'green'} = '#008000';
$RGBDB{'silver'} = '#C0C0C0';
$RGBDB{'lime'} = '#00FF00';
$RGBDB{'gray'} = '#808080';
$RGBDB{'olive'} = '#808000';
$RGBDB{'white'} = '#FFFFFF';
$RGBDB{'yellow'} = '#FFFF00';
$RGBDB{'maroon'} = '#800000';
$RGBDB{'navy'} = '#000080';
$RGBDB{'red'} = '#FF0000';
$RGBDB{'blue'} = '#0000FF';
$RGBDB{'purple'} = '#800080';
$RGBDB{'teal'} = '#008080';
$RGBDB{'fuchsia'} = '#FF00FF';
$RGBDB{'aqua'} = '#00FFFF';
$currentDate = strftime ($opt_msg_date_format, localtime);
#
# Translate paths to physical paths (avoid symlink problems)
#
$opt_srcdir = lets_get_physical( $opt_srcdir );
print( "Physical srcdir : $opt_srcdir\n" ) if $opt_debug;
$opt_rootpath = lets_get_physical( $opt_rootpath );
print( "Physical rootpath : $opt_rootpath\n" ) if $opt_debug;
$icon_dir_path = "${opt_rootpath}$pathSep${opt_iconpath}";
print( "Physical icondir : $icon_dir_path\n" ) if $opt_debug;
# html_imgsize. Obtain image size and return HTML text (HEIGHT=foo
# WIDTH=bar) representing size.
sub html_imgsize {
my ($file) = @_;
use Image::Magick;
my (
$image,
$height,
$width,
@ping,
$retval,
$status
);
$retval = '';
if( -f $file ) {
$image = Image::Magick->new;
# Try PerlMagick 1.15 Ping method first
my $newfile = $file;
$newfile =~ s/\\/\\\\/g;
eval qq{\@ping = \$image->Ping("$newfile");};
if ( !$@ ) {
if ( $ping[0] =~ /,/ ) {
@ping = split (',',$ping[0]);
}
$width = $ping[0];
$height = $ping[1];
} else {
# If Ping fails to eval, do things the hard way
$status = $image->Read($file);
if( "$status" ) {
undef $image;
return( $retval );
}
($width, $height) = $image->[0]->Get("columns", "rows");
}
print( STDERR "Image \"$file\" has dimensions ",
"${width}x${height}\n") if $opt_debug;
$retval="HEIGHT=${height} WIDTH=${width}";
undef @$image; # Free up space
undef $image; # Ditto
} else {
print( STDERR "html_imgsize: no such file \"$file\"\n" );
}
return( $retval );
}
if( $opt_recurse && $opt_frames ) {
# Recurse depth-first under current directory, executing &wanted
# for each directory ignoring hidden directories
use File::Find;
print( "Processing directory tree $opt_srcdir ...\n" ) if $opt_debug;
find( \&wanted, $opt_srcdir );
} else {
print( "Processing directory $opt_srcdir ...\n" ) if $opt_debug;
$sourceDirectory = $opt_srcdir;
dodir( $sourceDirectory );
}
#
# Print run times if running in verbose mode
#
if( $opt_verbose ) {
my(
$user, # CPU time in user code for this process
$system, # CPU time in system code on behalf of this process
$cuser, # CPU time in user code of child processes
$csystem, # CPU time in system code on behalf of child processes
$total_user, # Total user time (parent + children)
$total_system, # Total system time (parent + children)
$total_time # Total elapsed time (wall clock)
);
my(
$user_m, # User time in minutes
$system_m, # System time in minutes
$cuser_m, # Child process user time in minutes
$csystem_m, # Child process system time in minutes
$total_user_m, # Total user time in minutes
$total_system_m,# Total system time in minutes
$total_time_m # Total elapsed time (wall clock) in minutes
);
($user, $system, $cuser, $csystem) = times;
$user_m = elapsedminutes( $user );
$system_m = elapsedminutes( $system );
$cuser_m = elapsedminutes( $cuser );
$csystem_m = elapsedminutes( $csystem );
$total_user = $user + $cuser; # Total user time
$total_user_m = elapsedminutes( $total_user );
$total_system = $system + $csystem; # Total system time
$total_system_m = elapsedminutes( $total_system );
$total_time = time - $startTime; # Total run time
$total_time_m = elapsedminutes( $total_time );
print( STDERR "Run time statistics:\n" );
print( STDERR "Detailed times: ${user_m} user, ${system_m} system,",
" ${cuser_m} child_user, ${csystem_m} child_system\n" );
print( STDERR "Summary times : ${total_time_m} total,",
" ${total_user_m} user, ${total_system_m} system\n" );
}
print( STDERR "Doing normal exit with code 0\n" ) if $opt_debug;
exit(0);
#####################
#####################
# Executed for each find operation
# Want:
# is directory
# not hidden directory
#
# Variables:
# $File::Find::dir current directory
# $File::Find::name current directory + file name
# $File::Find::prune set to true to prune tree
sub wanted {
my($dev,$ino,$mode,$nlink,$uid,$gid);
($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_);
if ( -d _ && -w _ && !/^\..+/ ) {
if( $_ ne '.' && get_rc_var('.', 'opt_prune', 0) ) {
$File::Find::prune=1;
# following funny logic is to avoid warnings about $prune
print( STDERR "Pruning $File::Find::name\n" ) if $File::Find::prune==1;
return;
}
#ignore special FrontPage directories (like /_vti_bin)
# lowercase names only, so _90-95 or _Covers is OK
if ( $opt_ignorefp && $File::Find::name =~ /\/_[a-z]/ )
{
return;
}
forking_dodir($File::Find::name);
}
}
# Execute dodir with the protection of a fork. This ensures that
# current directory and global webmagick configuration values are
# preserved between directories.
sub forking_dodir {
my $sourceDirectory = shift(@_); # Directory to process
my $inChild; # Set to one of we are child
my ($waitpid, # PID returned by wait
$childstat, # Status returned from child
$pid, # Child process PID
$waitpid, # PID waited on
$childstat # Child return status
);
FORK:
{
if( $pid = fork ) {
# parent here
# child process pid is available in $pid
$inChild=0;
$waitpid=wait();
$childstat=$?;
# If clean exit, then return 0
return 0 if ( $childstat == 0 );
syserror( $childstat ); # Print status from error
return 1;
} elsif ( defined $pid ) { # $pid is zero here if defined
# child here
# parent process pid is available with getppid
$inChild=1;
dodir( $sourceDirectory );
exit( 0 );
} elsif ( $! =~ /No more process/ ) {
# EAGAIN, supposedly recoverable fork error
sleep 5;
redo FORK;
} else {
# weird fork error
die( "Can't fork: $!\n$@\n" );
}
}
return(0); # Should never get here!
}
#
# Generate index files for directory specified by $sourceDirectory
#
sub dodir {
$sourceDirectory = shift(@_);
my $maxfiles = 0; # Maximum number of index links per page
$numPages = 0; # Number of index pages to be generated
my $numimages = 0; # Number of images in directory
my $numdirectories = 0; # Number of subdirectories in directory
$pageNumber = 1; # Current index page number (1 to N)
$haveReadme = 0; # Is there a readme file in this directory?
my $doIndexHtml=0; # Set to true if HTML index files must be generated
my $tmpstr; # Scratch string
my @tmplst; # Scratch list
#
# Regular expression to match supported file extensions
#
my $includeRegex='(\.avs$)|(\.bie$)|(\.bmp$)|(\.cgm$)|(\.dcm$)|(\.dcx$)' .
'|(\.dib$)|(\.dot$)|(\.dvi$)|(\.epdf$)|(\.epi$)|(\.eps$)' .
'|(\.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$)' .
'|(\.pbm$)|(\.pcd$)|(\.pcds$)|(\.pcx$)|(\.pdf$)|(\.pgm$)' .
'|(\.pic$)|(\.pict$)|(\.pix$)|(\.png$)|(\.pnm$)|(\.pov$)' .
'|(\.ppm$)|(\.ps$)|(\.psd$)|(\.rad$)|(\.rla$)|(\.rle$)' .
'|(\.sgi$)|(\.sun$)|(\.tga$)|(\.tif$)|(\.tiff$)|(\.tim$)' .
'|(\.ttf$)|(\.vicar$)|(\.viff$)|(\.wmf$)|(\.xbm$)|(\.xpm$)' .
'|(\.xwd$)';
#
# Regular expression for file and directory names we ignore
#
my $excludeRegex = '';
$excludeRegex .= "(^$opt_indexname)|"
if ("$opt_indexname" ne '');
$excludeRegex .= "(\\.s?html\$)|(\\.s?htm\$)|(\\.sht\$)|(^\\.)";
#
# Change current directory to $sourceDirectory
#
chdir( $sourceDirectory )
|| die("Can't cd to $sourceDirectory\n$@\n");
# Get current (absolute) directory
$currentDirectory=cwd();
# Eval per-directory rc files if they exist. Rc files are
# evaluated for each directory starting from $opt_rootdir until
# the current directory is reached. This supports "additive"
# behavior for a branch in the tree.
evaluateRcFiles();
# Decide if we want to process this directory or not based on the
# value of $opt_ignore. If not, then just return.
if( $opt_ignore ) {
# Skip this directory
print( STDERR "Skipping $sourceDirectory\n" );
return( 0 );
} else {
print( STDERR "Processing $sourceDirectory\n" );
}
# removed until I can find a way to do this
# that doesn't leave lockfiles on unsuccessful dodir attempts
#if (-e $opt_lockfile)
#{
# # Skip this directory because it's currently being processed
# print( STDERR "Skipping $sourceDirectory\n" );
# return( 0 );
#} else {
# open (LOCKFILE, ">$opt_lockfile");
# close LOCKFILE;
#}
$currentDate = strftime ($opt_msg_date_format, localtime);
# Translate paths to physical paths (avoid symlink problems)
# Note: This duplicates code executed during initialization
$opt_srcdir = lets_get_physical( $opt_srcdir );
$opt_rootpath = lets_get_physical( $opt_rootpath );
$icon_dir_path = "${opt_rootpath}${pathSep}${opt_iconpath}";
#
# Set frame targets & frame naming
#
if( $opt_framefmt_frames{$opt_framestyle} == 2 ) {
# Two frame style & naming
$frameTargets{'default_dirview'}=$opt_frame_name_top; # Dir nav reloads entirely by default
$frameTargets{'default_thumbview'}=$opt_frame_name_top; # Thumbnail nav reloads entirely by default
$frameTargets{'dirview'}=$opt_frame_name_dirview; # Directory list displays in dirview frame
$frameTargets{'readmeview'}=$opt_frame_name_imageview; # Readme displays in imagemap frame
$frameTargets{'imageview'}=$opt_frame_name_imageview; # Images display in imagemap frame
$frameTargets{'thumbview'}=$opt_frame_name_imageview; # Imagemap displays in imagemap frame
} elsif ( $opt_framefmt_frames{$opt_framestyle} == 3 ) {
# Three frame style & naming
$frameTargets{'default_dirview'}=$opt_frame_name_top; # Dir nav reloads entirely by default
$frameTargets{'default_thumbview'}=$opt_frame_name_top; # Thumbnail nav reloads entirely by default
$frameTargets{'dirview'}=$opt_frame_name_dirview; # Directory list displays in dirview frame
$frameTargets{'readmeview'}=$opt_frame_name_imageview; # Readme displays in imageview frame
$frameTargets{'imageview'}=$opt_frame_name_imageview; # Images display in imageview frame
$frameTargets{'thumbview'}=$opt_frame_name_thumbview; # Imagemap displays in imagemap frame
} else {
die("Unsupported number of frames: $opt_framefmt_frames{$opt_framestyle}\n" );
}
#
# Ensure that certain options have correct case
#
$opt_cacheformat = "\U${opt_cacheformat}";
#
# Default directory frame colors to page colors if not set
#
if ($opt_frames) {
$opt_dircolorback = $opt_colorback if ("$opt_dircolorback" eq '');
$opt_dircolorfore = $opt_colorfore if ("$opt_dircolorfore" eq '');
$opt_dircoloralink = $opt_coloralink if ("$opt_dircoloralink" eq '');
$opt_dircolorlink = $opt_colorlink if ("$opt_dircolorlink" eq '');
$opt_dircolorvlink = $opt_colorvlink if ("$opt_dircolorvlink" eq '');
}
#
# Convert all HTML colors to hex format
#
$opt_colorback = lookupRGBColor( $opt_colorback );
$opt_colorfore = lookupRGBColor( $opt_colorfore );
$opt_coloralink = lookupRGBColor( $opt_coloralink );
$opt_colorlink = lookupRGBColor( $opt_colorlink );
$opt_colorvlink = lookupRGBColor( $opt_colorvlink );
if ($opt_frames) {
$opt_dircolorback = lookupRGBColor( $opt_dircolorback );
$opt_dircolorfore = lookupRGBColor( $opt_dircolorfore );
$opt_dircoloralink = lookupRGBColor( $opt_dircoloralink );
$opt_dircolorlink = lookupRGBColor( $opt_dircolorlink );
$opt_dircolorvlink = lookupRGBColor( $opt_dircolorvlink );
}
# Calculate the maximum number of images per index page
$maxfiles=$opt_columns*$opt_rows;
# Convert renamed WebMagick options to new names for backward
# compatability
if( defined( $opt_thumbbordercolor ) ) {
$opt_thumbframebgcolor = $opt_thumbbordercolor;
}
if( defined( $opt_thumbmattecolor ) ) {
$opt_thumbframecolor = $opt_thumbmattecolor;
}
#
# Ensure that maptype is lower case
#
$opt_maptype = "\L${opt_maptype}";
if ($opt_iconbase) {
if ($opt_iconbase =~ !/^\//) {
die("$0: Iconbase must start with '/', use prefixpath to make it non-root related\n");
} else {
$icon_base_url = "${opt_prefixpath}${opt_iconbase}";
}
} else {
#
# Compute URL to top of icon directory
#
# Attempt to convert to relative URL
$icon_base_url = relative( $currentDirectory, $icon_dir_path);
if ( $icon_base_url =~ m\(^/)|(:)\ ) {
# If did not convert to relative URL then convert to absolute URL
$icon_base_url = escapeurl( abs_path_to_url($icon_dir_path));
}
}
#
# Source directory status file from last run
#
setFileNames(); # Set current file names
$pageStatusTime = 0;
if ( -f $fileNames{'pageStatus'} ) {
sourceRcFile($fileNames{'pageStatus'}) ;
# Obtain last modified date for status file
$pageStatusTime=fmtime($fileNames{'pageStatus'});
}
# Handle a directory name to title index file. Store alternative
# names in %dirTitles.
{
my $pos = 0;
my %tmp_dirTitles;
undef( %tmp_dirTitles );
if ( $opt_frames && -f $opt_dirindexname ) {
open( DIRINDEX, "<$opt_dirindexname" );
while( ) {
chop;
my($dirname, $dirtitle);
( $dirname, $dirtitle) = split( /[ \t]+/, $_, 2);
if(defined($dirname) && defined($dirtitle)) {
$tmp_dirTitles{$dirname} = escapehtml($dirtitle);
$dirOrder{$dirname} = $pos;
$pos++;
}
}
close( DIRINDEX );
}
if( !defined(%dirTitles) || ( compareHash(\%dirTitles,\%tmp_dirTitles) ) ) {
%dirTitles = %tmp_dirTitles;
print( STDERR "Directory titles have changed, must re-do HTML indexes\n" )
if $opt_debug;
++$doIndexHtml;
}
}
#
# Handle a image name to thumbnail label index file
# Store alternative names in %imageLabels
#
{
my $pos = 0;
my %tmp_imageLabels;
if ( -f $opt_imgindexname ) {
open( IMGINDEX, "<$opt_imgindexname" );
while( ) {
chop;
my ( $imgname, $imgtitle);
( $imgname, $imgtitle) = split( /[ \t]+/, $_, 2);
if(defined($imgname) && defined($imgtitle)) {
$tmp_imageLabels{$imgname} = $imgtitle;
$imageOrder{$imgname} = $pos;
$pos++;
}
}
close( IMGINDEX );
}
#
# This code is totally BOGUS since decision should be made on a per-page basis!!
#
if( !defined(%imageLabels) || ( compareHash(\%imageLabels,\%tmp_imageLabels) ) ) {
%imageLabels = %tmp_imageLabels;
print( STDERR "Image labels have changed, must re-do montages\n" )
if $opt_debug;
$opt_forcemontage=1;
}
}
#
# Compute individual icon URLs.
#
{
my %tmp_iconImageUrls;
print( "Icon URLs:\n" ) if $opt_debug;
my $icon;
for $icon ( keys %opt_icons ) {
if( $opt_icons{$icon} ) { # if defined
$tmp_iconImageUrls{$icon} = "$icon_base_url" . '/' . $opt_icons{$icon};
printf( " \$tmp_iconImageUrls%-20s = \"%s\"\n", "{'$icon'}", $tmp_iconImageUrls{$icon} )
if $opt_debug;
}
}
if( !defined(%iconImageUrls) || ( 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;;
}
}
#
# Get icon image sizes
#
getIconImageSizes();
# Read source file names (if any). Filter out any names matching
# the exclude list.
opendir( SRCDIR, ".")
|| die("$0: Failed to open directory $sourceDirectory\n$@\n");
@allFiles = grep(!/$excludeRegex/io,readdir( SRCDIR ));
closedir( SRCDIR );
#
# Build list of image files
#
@allImageFiles = sort( sortImages grep( /$includeRegex/io, @allFiles));
# Find subdirectory names (if any) ignoring hidden directories and
# directories without index files. Directories should have index
# files since our find goes from the bottom up and we should have
# already processed the subdirectories.
#
# Only test files that are not in the allImageFiles list
{
my %tarray;
my @dirfiles;
my @tmp_dirNames = ();
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
push(@dirfiles, $_); # then add it to the list
if ($opt_javascript) {
# Check which index file to use for JavaScript
if( -f "$_/$fileNames{'jsDirIndex'}" ) {
$dirJsLink{"$_"} = $fileNames{'jsDirIndex'};
} elsif ( -f "$_/$opt_indexname" ){
$dirJsLink{"$_"} = $opt_indexname;
} else {
$dirJsLink{"$_"} = '';
}
}
}
}
}
@tmp_dirNames = sort( sortDir @dirfiles);
}
if( "@dirNames" ne "@tmp_dirNames" ) {
@dirNames = @tmp_dirNames;
if ($opt_frames) {
print( STDERR "Subdirectories have changed, must re-do HTML indexes\n" )
if $opt_debug;
++$doIndexHtml;
}
}
if ($opt_javascript) {
# Check which parent-directory index file to use for JavaScript
if( -f "../$fileNames{'jsDirIndex'}" ) {
$dirJsLink{".."} = $fileNames{'jsDirIndex'};
} elsif ( -f "../$opt_indexname" ){
$dirJsLink{".."} = $opt_indexname;
} else {
$dirJsLink{".."} = '';
}
}
}
#
# Determine the number of index pages to be generated, etc.
#
$numimages=scalar(@allImageFiles); # Number of images
$numdirectories=scalar(@dirNames); # Number of subdirectories
$numPages=int($numimages/$maxfiles);
if ( $numimages%$maxfiles != 0 ) {
++$numPages;
}
#
# Check for README file and set haveReadme flag if exists
#
if("${opt_readme}" ne '' && -f "${opt_readme}") {
$haveReadme = 1;
}
# Set haveImages flag if there are images in directory. This
# effects the way the directory listing appears.
$haveImages = 0;
if( $numimages > 0 ) {
$haveImages = 1;
}
#
# Determine page title
#
if( "$opt_title" ne '' ) {
$pageTitle = $opt_title;
} else {
my $dirname=basename($sourceDirectory);
$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';
$montageArguments .= "borderwidth=>\'$opt_thumbborderwidth\',\n ";
$montageArguments .= "compose=>\'$opt_thumbcompose\',\n "
if $opt_thumbcompose ne 'false';
$montageArguments .= "font=>\'$opt_thumbfont\',\n "
if $opt_thumbfont ne 'false';
$montageArguments .= "foreground=>\'$opt_thumbforeground\',\n "
if $opt_thumbforeground ne 'false';
$montageArguments .= "frame=>\'$opt_thumbframe\',\n "
if $opt_thumbframe ne 'false';
$montageArguments .= "geometry=>\'${opt_thumbgeometry}\',\n "
if $opt_thumbgeometry ne 'false';
$montageArguments .= "gravity=>\'$opt_thumbgravity\',\n "
if $opt_thumbgravity ne 'false';
$montageArguments .= "shadow=>\'$opt_thumbshadow\',\n "
if $opt_thumbshadow ne 'false';
$montageArguments .= "texture=>\'$opt_thumbtexture\',\n "
if $opt_thumbtexture ne 'false';
$montageArguments .= "tile=>\'${opt_columns}x${opt_rows}\',\n ";
$montageArguments .= "transparent=>\'$opt_thumbtransparent\'\n "
if $opt_thumbtransparent ne 'false';
# Compute a conglomeration of all parameters that effect the
# montage image to use for comparison with the parameters used in
# the last run.
{
my $tmp_montageParameters = "$montageArguments";
$tmp_montageParameters .= "bordercolor=>\'$opt_thumbframebgcolor\',\n "
if $opt_thumbframebgcolor ne 'false';
$tmp_montageParameters .= "mapnetscape=>\'$opt_mapnetscape\',\n ";
$tmp_montageParameters .= "mattecolor=>\'$opt_thumbframecolor\',\n "
if $opt_thumbframecolor ne 'false';
$tmp_montageParameters .= "label=>\'$opt_thumblabel\',\n "
if $opt_thumblabel ne 'false';
$tmp_montageParameters .= "labelwidth=>\'$opt_thumblabelwidth\',\n ";
$tmp_montageParameters .= "\Lzoomfilter=>\'$opt_zoomfilter\'";
if( !defined($montageParameters) || ($tmp_montageParameters ne $montageParameters)) {
$montageParameters = $tmp_montageParameters;
print( STDERR "Montage parameters have changed, must re-do montages\n" )
if $opt_debug;
$opt_forcemontage=1;
}
}
#
# Store HTML options in associative array to make them easier to deal with
#
%htmlOpts =
(
'address' => $opt_address,
'anonymous' => $opt_anonymous,
'backgroundimg' => $opt_icons{'background'},
'cachedir' => $opt_cachedir,
'coloralink' => $opt_coloralink,
'colorback' => $opt_colorback,
'colorfore' => $opt_colorfore,
'colorlink' => $opt_colorlink,
'colorvlink' => $opt_colorvlink,
'columns' => $opt_columns,
'config' => !$opt_javascript ? 0 : $opt_allowconfig,
'dateText' => !$opt_date ? "" : "${opt_msg_page_updated_on} $currentDate",
'dirbackgroundimg' => !$opt_frames ? "" : $opt_icons{'dirbackground'},
'dircoloralink' => !$opt_frames ? "" : $opt_dircoloralink,
'dircolorback' => !$opt_frames ? "" : $opt_dircolorback,
'dircolorfore' => !$opt_frames ? "" : $opt_dircolorfore,
'dircolorlink' => !$opt_frames ? "" : $opt_dircolorlink,
'dircolorvlink' => !$opt_frames ? "" : $opt_dircolorvlink,
'dirfmt' => !$opt_frames ? "" : $opt_dirfmt,
'dirhtmlext' => !$opt_frames ? "" : $opt_dirhtmlext,
'dirindexname' => !$opt_frames ? "" : $opt_dirindexname,
'footer' => $opt_footer,
'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,
'frames' => $opt_frames,
'framestyle' => !$opt_frames ? 1 : $opt_framestyle,
'header' => $opt_header,
'htimage' => !$opt_serversidemap ? "" : $opt_htimage,
'htmlext' => !$opt_frames ? "" : $opt_htmlext,
'iconbase' => $opt_iconbase,
'imgindexname' => $opt_imgindexname,
'indexname' => $opt_indexname,
'javascript' => $opt_javascript,
'jsdirindex' => !$opt_javascript ? "" : $fileNames{'jsDirIndex'},
'jsfunctions' => !$opt_javascript ? "" : $fileNames{'jsFunctions'},
'jspageindex' => !$opt_javascript ? "" : $fileNames{'jsPageIndex'},
'jsvariables' => !$opt_javascript ? "" : $fileNames{'jsVariables'},
'metaauthor' => $opt_metaauthor,
'metacharset' => $opt_metacharset,
'metaclassification' => $opt_metaclassification,
'metadescription' => $opt_metadescription,
'metaexpires' => $opt_metaexpires,
'metakeywords' => $opt_metakeywords,
'msg_copyright' => $opt_anonymous ? "" : $opt_msg_copyright,
'msg_directories' => !$opt_frames ? "" : $opt_msg_directories,
'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_next' => $opt_msg_next,
'msg_page_navigator' => !$opt_frames ? "" : $opt_msg_page_navigator,
'msg_prev' => $opt_msg_prev,
'msg_produced_by' => $opt_anonymous ? "" : $opt_msg_produced_by,
'msg_readme' => !$haveReadme ? "" : $opt_msg_readme,
'msg_up' => $opt_msg_up,
'numpages' => $numPages,
'pageindexname' => $opt_pageindexname,
'pichtml' => $opt_pichtml,
'pichtmlbottom' => !$opt_pichtml ? "" : $opt_pichtmlbottom,
'pichtmlext' => !$opt_pichtml ? "" : $opt_pichtmlext,
'pichtmlnav' => !$opt_pichtml ? 0 : $opt_pichtmlnav,
'pichtmlputtitle' => !$opt_pichtml ? 0 : $opt_pichtmlputtitle,
'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,
'readme' => !$haveReadme ? "" : $opt_readme,
'readmepresent' => $haveReadme,
'readmevisible' => !$haveReadme ? 0 : $opt_readmevisible,
'rows' => $opt_rows,
'serversidemap' => $opt_serversidemap,
'stylesheet' => $opt_stylesheet,
'subdirectories' => !$opt_frames ? "" : join(' ',@dirNames),
'tables' => $opt_tables,
'title' => $pageTitle,
'version' => $webmagickInfo{'version'},
);
# Compute a conglomeration of all parameters that effect the HTML
# to use for comparison with the parameters used in the last run.
{
my $firstparam = 1;
my $tmp_htmlParams = '';
my $key;
foreach $key (sort(keys(%htmlOpts))) {
if(defined($htmlOpts{$key})) {
if( $firstparam ) {
$firstparam = 0;
} else {
$tmp_htmlParams .= ",\n ";
}
$tmp_htmlParams .= $key . '=>\'' . $htmlOpts{$key} . '\'';
}
}
if( !defined($htmlParams) || ($tmp_htmlParams ne $htmlParams)) {
$htmlParams = $tmp_htmlParams;
print( STDERR "HTML parameters have changed, must re-do HTML\n" )
if $opt_debug;
$opt_forcehtml=1;
}
}
#
# Print statistics message
#
print( STDERR " $numimages Images $numdirectories Directories",
" $numPages Pages --- " )
if $opt_verbose;
my @imgfiles = @allImageFiles; # Save full list of files for later
# Loop through file list, placing a maximum of $maxfiles images on
# each page. Do at least one page (there might not be any
# images).
while (scalar(@allImageFiles) > 0 || $pageNumber == 1) {
$doMontage=0; # Set to true if montage must be generated
$doPageHtml=0; # Set to true if per-page HTML files must be generated
print(STDERR " $pageNumber" ) if $opt_verbose;
#
# Get per-page image names
# @imageNames is a list of lists
{
my @tmp_imageNames = splice(@allImageFiles,0,$maxfiles);
if( !defined($imageNames[$pageNumber - 1]) ||
("@tmp_imageNames" ne "@{$imageNames[$pageNumber - 1]}") ) {
$imageNames[$pageNumber - 1] = [ @tmp_imageNames ];
print( STDERR "Need to do both montage and page HTML because",
" file list differs\n") if $opt_debug;
++$doMontage;
++$doPageHtml;
}
}
my $numfiles = $#{$imageNames[$pageNumber - 1]} + 1;
setFileNames(); # Set current file names
#
# Decide if we need to do HTML & montage
#
if ( $perlVarsVersion < $requiredPerlVarsVersion) {
print ( STDERR "Need to do montage, HTML and cache because",
" version has changed\n") if $opt_debug;
$opt_forcehtml = 1;
$opt_forcemontage = 1;
$opt_forcecache = 1;
}
# Montage specific checks
# Check for missing output files
# Check for new input files
if( $numfiles > 0 ) {
if( ! $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",
" file is missing\n")
if $opt_debug;
++$doMontage;
} else {
# If any file in file list is newer than status file,
# then do montage
my $file;
foreach $file (@{$imageNames[$pageNumber - 1]}) {
if( fmtime($file) > $pageStatusTime ) {
print( STDERR "Need to do both montage and HTML",
" because file has been updated\n")
if $opt_debug;
++$doMontage;
++$doPageHtml;
print(STDERR "\nMust do montage and html: file",
" updated\n") if $opt_debug;
}
}
}
}
die("Empty \$opt_indexname set with \$opt_frames\n$@\n")
if ($opt_frames && "$opt_indexname" eq '');
# HTML specific checks
# Check for missing files
if( ! -f $fileNames{'pageStatus'} ||
! -f $fileNames{'htmlCurrentIndex'} ||
($opt_frames && ! -f "$opt_indexname")) {
# If key file is missing then do HTML
print(STDERR "\n Must do page and index HTML: output file",
" missing\n") if $opt_debug;
++$doPageHtml;
++$doIndexHtml if ($opt_frames);
}
# Overrides
if( $opt_forcehtml ) {
++$doPageHtml;
++$doIndexHtml if ($opt_frames);
}
if( $opt_forcemontage ) {
++$doPageHtml; # Montage effects HTML output
++$doMontage;
}
my $errorstat = 1; # Cleared for non-error block exit
PAGES: {
#
# Build montage for current page
#
if( $doMontage && ( $numfiles > 0 ) ) {
doMontage(@{$imageNames[$pageNumber - 1]}) && last PAGES;
# Determine image name & size to use for imagemap
{
my $montageImage;
my $montageImageSize;
if( -f $fileNames{'montageGIF'} ) {
$montageImage = $fileNames{'montageGIF'}; # Use GIF
$montageImageSize = html_imgsize($fileNames{'montageGIF'});
} elsif ( -f $fileNames{'montageJPEG'} ) {
$montageImage = $fileNames{'montageJPEG'}; # Use JPEG
$montageImageSize = html_imgsize($fileNames{'montageJPEG'});
}
if(!defined($montageImages[$pageNumber - 1]) ||
( $montageImages[$pageNumber - 1] ne $montageImage )) {
$montageImages[$pageNumber - 1] = $montageImage;
print( STDERR "Need to re-do page HTML because montage image name ",
"has changed\n") if $opt_debug;
++$doPageHtml;
}
if(!defined($montageImageSizes[$pageNumber - 1]) ||
( $montageImageSizes[$pageNumber - 1] ne $montageImageSize )) {
$montageImageSizes[$pageNumber - 1] = $montageImageSize;
print( STDERR "Need to re-do page HTML because montage image size ",
"has changed\n") if $opt_debug;
++$doPageHtml;
}
}
}
#
# Write out page index files for current page
#
if( $doPageHtml ) {
writeIndexFiles();
}
# Write server-side imagemap file
if( $opt_serversidemap && $doPageHtml && ( $numfiles > 0 ) ) {
writeImageMap();
}
if ( $doPageHtml || $doIndexHtml || $doMontage ) {
#
# Save run status (source files and montage options)
#
writePerlIndexFiles();
if( $opt_javascript ) {
writeJavaScriptIndexFiles();
}
}
# Clear error flag
$errorstat = 0;
}
print( STDERR "Error encountered when creating page\n" )
if $errorstat;
++$pageNumber; # Next page
}
print( STDERR "\n" ) if $opt_verbose;
#
# Clean up old files
#
setFileNames();
while(
-f $fileNames{'htmlCurrentIndex'} ||
-f $fileNames{'montageGIF'} ||
-f $fileNames{'montageJPEG'} ||
-f $fileNames{'montageServerMap'}
) {
unlink(
$fileNames{'htmlCurrentIndex'},
$fileNames{'montageGIF'},
$fileNames{'montageJPEG'},
$fileNames{'montageServerMap'}
);
++$pageNumber; # Next page
setFileNames();
}
#
# Clean up cached thumbnails
#
if( $opt_cache && -d $opt_cachedir ) {
opendir( CACHEDIR, "$opt_cachedir")
|| die("$0: Failed to open directory $opt_cachedir\n$@\n");
@cacheFiles = grep(!/$excludeRegex/io,readdir( CACHEDIR ));
closedir( CACHEDIR );
}
{
my @extra;
my %tarray;
grep( $tarray{$_}++, @imgfiles );
@extra = grep( $_ = "$opt_cachedir/$_", grep( ! $tarray{$_}, @cacheFiles ));
print( STDERR "Removing extra cache files @extra\n") if $opt_debug;
unlink( @extra );
}
#
# Write out index files (Both main index and frames index files)
#
if( $doIndexHtml ) {
writeTopIndexes();
}
# remove lockfile
# unlink $opt_lockfile;
}
#
# Write out both top index and frame index files
#
sub writeTopIndexes {
die("Internal error: writeTopIndexes called when \$opt_frames is not set\n$@\n")
if (!$opt_frames);
die("Empty \$opt_indexname set with \$opt_frames\n$@\n")
if ("$opt_indexname" eq '');
print( STDERR "Writing Index Files ${opt_indexname} & ",
"${opt_pageindexname}dir${opt_dirhtmlext} ...\n" )
if $opt_debug;
#---- Generate the Variables for Format Options ----
#
# Generate HTML for up link
#
my $uphtml = '';
# get indexname of parent directory
my $upindexname =
get_rc_var('..', 'opt_indexname', "$opt_indexname");
unless ( "$upindexname" eq 'NOLINK' ) {
$uphtml = "" .
" ${opt_msg_up} \n";
}
#
# Generate HTML for help link
#
my $helphtml = '';
if( $haveReadme ) {
$helphtml .= "" .
" ${opt_msg_readme} \n";
}
#
# Compute HTML for link to first image page
#
my $nexthtml = '';
if( $haveReadme && $haveImages && $opt_framefmt_frames{$opt_framestyle}<=2 ) {
$nexthtml .= "" .
" ${opt_msg_images} ";
}
#
# Compute HTML for directory list
#
my $dirhtml = '';
if( !$opt_prune && scalar(@dirNames) > 0 ) {
$dirhtml = "
${opt_msg_directories}
\n";
my $subdir;
foreach $subdir (@dirNames) {
# ignore frontpage directories
if ($opt_ignorefp && $subdir =~ /^_[a-z]/)
{
next;
}
# If an alternative name is defined, then use it
my $dirtitle;
if( defined( $dirTitles{$subdir} ) ) {
$dirtitle=$dirTitles{$subdir};
} 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 .= '';
# If a bullet icon is defined, then use it
# otherwise use plain text only
if( defined( $iconImageUrls{'ball'} ) ) {
$dirhtml .= "";
}
$dirhtml .= "$dirtitle \n";
}
}
}
#
# Generate HTML for page index list
#
my $pageindexhtml = '';
if( $haveImages ) {
$pageindexhtml = "
${opt_msg_page_navigator}
\n";
my $i;
for( $i=1; $i <= $numPages; ++$i ) {
$pageindexhtml .=
" ${i} \n";
}
}
# ----- Evaluate the Format Options -----
#
# Evaluate the Top Index File Format Option
#
my $indexhtml;
$indexhtml = eval '"' . $opt_dirfmt . '"';
die( "Bad Eval of directory page template (\$opt_dirfmt)\n$@\n" )
if $@;
# Change header to plain bold text for framed directory file
$dirhtml =~
s|^
\n|${opt_msg_page_navigator} \n|;
#
# Evaluate the Framed Directory File Format Option
#
my ($pagedirhtml, $dirframelink, $pageframelink);
$pagedirhtml = eval '"' . $opt_frameddirfmt . '"';
die( "Bad Eval for directory page template (\$opt_frameddirfmt)\n$@\n" )
if $@;
#
# Pull README into thumbnail frame if it exists, and is
# either marked always visible or there are no images.
#
$dirframelink = "${opt_pageindexname}dir${opt_dirhtmlext}";
if( $opt_framefmt_frames{$opt_framestyle} <= 2 ) {
if( $haveReadme && ( $opt_readmevisible || ! $haveImages ) ) {
# Point to README.html
$pageframelink = $opt_readme;
} else {
# Point to first image page
$pageframelink = "${opt_pageindexname}1$opt_htmlext";
}
} else {
if( $haveReadme && $opt_readmevisible ) {
# Point to README.html
$pageframelink = "${opt_pageindexname}1$opt_htmlext";
$imageFrameLink = $opt_readme;
} else {
# Point to first image page
$pageframelink = "${opt_pageindexname}1$opt_htmlext";
$imageFrameLink = $fileNames{'htmlBlankPage'};
}
}
#
# Evaluate the Frame Format Option
#
my $framespechtml = eval '"' . $opt_framefmt{$opt_framestyle} . '"';
die( "Bad Eval for Frame template (\$opt_framefmt{$opt_framestyle})\n$@\n" )
if $@;
#
# Evaluate the JavaScript version of the Frame Format
#
# Override normal frame targets
if ($opt_javascript) {
$dirframelink = q/javascript:parent.returnDirectoryHTML();/;
$pageframelink = q/javascript:parent.returnThumbNailsHTML();/;
$imageFrameLink = q/javascript:parent.returnImageHTML(0);/;
my $framespecjshtml = eval '"' . $opt_framefmt{$opt_framestyle} . '"';
die( "Bad Eval for Frame template (\$opt_framefmt{$opt_framestyle})\n$@\n" )
if $@;
}
# ----- 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 "\n\n" );
# Charset is better before title
print( INDEX " \n" )
if( "$opt_metacharset" ne '' );
print( INDEX " ${pageTitle}\n" );
# Meta tags
print( INDEX " \n" );
print( INDEX " \n" )
if( "$opt_metaauthor" ne '' );
print( INDEX " \n" )
if( "$opt_metadescription" ne '' );
print( INDEX " \n" )
if( "$opt_metakeywords" ne '' );
print( INDEX " \n" )
if( "$opt_metaclassification" ne '' );
# The value of $opt_metaexpires should be similar to:
# "Tue, 20 Aug 1996 14:25:27 GMT"
print( INDEX " \n" )
if( "$opt_metaexpires" ne '' );
print( INDEX " \n")
if ("$opt_stylesheet" ne '');
# If in JavaScript mode, output code to switch to JavaScript pages
# Currently knows about certain browsers.
if( $opt_javascript ) {
print( INDEX '\n" );
}
print( INDEX "\n" );
print( INDEX $framespechtml );
print( INDEX "\n" );
print( INDEX "\n" );
print( INDEX $indexhtml );
print( INDEX "\n\n" );
close( INDEX );
# ----- 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 "\n" );
print( INDEX "\n" );
print( INDEX "\n" );
print( INDEX q/! . "\n" );
print( INDEX q/! . "\n" );
print( INDEX "\n" );
print( INDEX "\n" );
close( INDEX );
}
# ----- 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}\"",
" for output\n$@\n");
print( INDEX "\n\n" );
# Charset is better before title
print( INDEX " \n" )
if( "$opt_metacharset" ne '' );
print( INDEX " ${pageTitle}\n" );
# Default URL target
print( INDEX " \n" );
# Meta tags
print( INDEX " \n" );
print( INDEX " \n" )
if( "$opt_metaauthor" ne '' );
print( INDEX " \n" )
if( "$opt_metadescription" ne '' );
print( INDEX " \n" )
if( "$opt_metakeywords" ne '' );
print( INDEX " \n" )
if( "$opt_metaclassification" ne '' );
# The value of $opt_metaexpires should be similar to:
# "Tue, 20 Aug 1996 14:25:27 GMT"
print( INDEX " \n" )
if( "$opt_metaexpires" ne '' );
print( INDEX " \n")
if ("$opt_stylesheet" ne '');
print( INDEX "\n" );
print( INDEX "\n");
print( INDEX $pagedirhtml );
print( INDEX "\n" );
close( INDEX );
return ( 0 );
}
#
# Write out page index files
#
sub writeIndexFiles {
my $indexbar; # HTML text representing numeric selection bar
my $errorstat = 0;
print( STDERR "Writing file $fileNames{'htmlCurrentIndex'} ...\n" )
if $opt_debug;
my $numimages = $#{$imageNames[$pageNumber - 1]} + 1;
my $pNumber = ($pageNumber == 1) ? "" : "$pageNumber";
# Calculate page index bar
# No link for current page
# Nothing at all when there is only one page.
$indexbar = "";
# Must be visible at each page, if no frames
if (!$opt_frames) {
# --- readme link ---
if ( $haveReadme ) {
$indexbar .= "\n";
}
# --- up link ---
my $upindexname = get_rc_var('..', 'opt_indexname', "$opt_indexname");
if ( "$upindexname" ne 'NOLINK' ) {
$indexbar .= "\n";
}
}
# --- prev link ---
if( $pageNumber == 1 ) {
if ($numPages > 1) {
# Print a grayed out arrow to maintain alignment
$indexbar .= "\n";
}
} else {
# Go to preceding page
$indexbar .= "\n";
}
# --- next link ---
if( $numPages > 1 ) {
if( $pageNumber < $numPages ) {
$indexbar .= "\n";
} else {
# Print a grayed out arrow to maintain alignment
$indexbar .= "\n";
}
}
$indexbar .= "";
# --- page links ---
if( $numPages > 1 ) {
my $page;
for ( $page = 1; $page <= $numPages; ++$page) {
if ( $page != $pageNumber ) {
if ($opt_frames) {
$indexbar .= "$fileNames{'htmlCurrentIndex'}")
|| die("$0: Failed to open file $fileNames{'htmlCurrentIndex'} for output\n$@\n");
print( INDEX "\n\n" );
# Charset is better before title
print( INDEX " \n" )
if( "$opt_metacharset" ne '' );
print( INDEX " ${pageTitle}\n" );
print( INDEX " \n" )
if ($opt_frames);
# Meta tags
print( INDEX " \n" );
print( INDEX " \n" )
if( "$opt_metaauthor" ne '' );
print( INDEX " \n" )
if( "$opt_metadescription" ne '' );
print( INDEX " \n" )
if( "$opt_metakeywords" ne '' );
print( INDEX " \n" )
if( "$opt_metaclassification" ne '' );
# The value of $opt_metaexpires should be similar to:
# "Tue, 20 Aug 1996 14:25:27 GMT"
print( INDEX " \n" )
if( "$opt_metaexpires" ne '' );
print( INDEX " \n")
if ("$opt_stylesheet" ne '');
print( INDEX "\n" );
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 "
)
--header Page header (imagemap frame) (default to
)
--[no]javascript Enable JavaScript output (default off)
--[no]pichtml Per-image HTML file generation (default off)
--pichtmlext Per-image HTML file extension (default .html)
--pichtmlbottom Per-image HTML, extra HTML to display below image (default to
)
--[no]pichtmlnav Per-image HTML, show navigation buttons (default off)
--[no]pichtmlputtitle Put per-image HTML picture title (default on)
--pichtmltarget Per-image HTML default frame target
--pichtmltitleend End tags for per-image HTML picture title (default )
--pichtmltitlestart Start tags for per-image HTML picture title (default
)
--pichtmltop Per-image HTML, extra HTML to display above image (default to
)
--[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
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
--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)
Messages Replacement:
--msg_copyright "Copyright "
--msg_date_format "\%B \%e, \%Y" (see strftime(3))
--msg_directories "Directories"
--msg_directory_navigator "Directory Navigator"
--msg_images "Images"
--msg_index_of_directory "Index of directory"
--msg_index_of_files "Index of files "
--msg_index_through "through"
--msg_next "Next"
--msg_page_navigator "Page Navigator"
--msg_page_updated_on "Page updated on"
--msg_prev "Prev"
--msg_produced_by "Produced by"
--msg_readme "ReadMe"
--msg_up "Up"
Report bugs to .
Visit the WebMagick web page at http://webmagick.sourceforge.net/
| );
}
#
# Subroutine to calculate per-page file names
# This is so names can be defined in one place
#
sub setFileNames {
my $nextPageNumber=$pageNumber + 1;
my $previousPageNumber=$pageNumber - 1;
my $pNumber;
if ($opt_javascript) {
# HTML file to load JavaScript code into hidden Frame
$fileNames{'jsPageIndex'} = "${opt_pageindexname}js.html";
# Javascript master index "indexjs.html"
$fileNames{'jsDirIndex'} = 'indexjs.html';
# JavaScript variable definitions
$fileNames{'jsVariables'} = "${opt_pageindexname}.js";
# Shared WebMagick JavaScript source file
$fileNames{'jsFunctions'} = "${icon_base_url}${pathSep}webmagick.js";
}
# Run status file
$fileNames{'pageStatus'} = "${opt_pageindexname}.pl";
# Generated GIF file
$fileNames{'montageGIF'} = "${opt_pageindexname}${pageNumber}.gif";
# Generated JPEG file
$fileNames{'montageJPEG'} = "${opt_pageindexname}${pageNumber}.jpg";
# Generated server-side imagemap file
$fileNames{'montageServerMap'} = "${sourceDirectory}${pathSep}${opt_pageindexname}${pageNumber}.map";
# Name for current HTML index page
if (!$opt_frames) {
$pNumber = ($pageNumber == 1) ? "" : "$pageNumber";
$fileNames{'htmlCurrentIndex'} = "${pNumber}${opt_indexname}";
} else {
$fileNames{'htmlCurrentIndex'} = "${opt_pageindexname}${pageNumber}$opt_htmlext";
}
# Name for next HTML index page
if($pageNumber == $numPages) {
$fileNames{'htmlNextIndex'} = '';
} else {
if (!$opt_frames) {
$pNumber = ($nextPageNumber == 1) ? "" : "$nextPageNumber";
$fileNames{'htmlNextIndex'} = "${pNumber}${opt_indexname}";
} else {
$fileNames{'htmlNextIndex'} = "${opt_pageindexname}${nextPageNumber}$opt_htmlext";
}
}
# Name for previous HTML index page
if($pageNumber == 1) {
$fileNames{'htmlPrevIndex'} = '';
} else {
if (!$opt_frames) {
$pNumber = ($previousPageNumber == 1) ? "" : "$previousPageNumber";
$fileNames{'htmlPrevIndex'} = "${pNumber}${opt_indexname}";
} else {
$fileNames{'htmlPrevIndex'} = "${opt_pageindexname}${previousPageNumber}$opt_htmlext";
}
}
if ($opt_javascript) {
# Name for next JavaScript HTML index page
if($pageNumber == $numPages) {
$fileNames{'htmlNextJsIndex'} = '';
} else {
$fileNames{'htmlNextJsIndex'} = "${opt_pageindexname}${nextPageNumber}js.html";
}
# Name for previous Javascript HTML index page
if($pageNumber == 1) {
$fileNames{'htmlPrevJsIndex'} = '';
} else {
$fileNames{'htmlPrevJsIndex'} = "${opt_pageindexname}${previousPageNumber}js.html";
}
}
# Location of blank HTML page for use in Frame target
$fileNames{'htmlBlankPage'} = "${icon_base_url}/blank.html";
}
#
# Escape special characters in HTML text
#
sub escapehtml {
local($_) = @_;
s/&/&/g;
s/>/>/g;
s/</g;
return( $_ );
}
#
# Escape characters in strings so they may be eval'ed later in PERL
#
sub escapeperl {
local($_) = @_;
s/\'/\\'/g;
return( $_ );
}
#
# Escape characters in strings so they may be evaluated by JavaScript
#
sub escapejs {
local($_) = @_;
s/\'/\\'/g;
#$_ = join(' + \'', split(/^/));
#s/\n/\\n\'\n/g;
s/\n/\\n\'\n + \'/g;
return( $_ );
}
#
# Escape unsafe characters in URLs
#
sub escapeurl {
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
return( $_ );
}
#
# Convert time in seconds to minutes:seconds.hundreths
#
sub elapsedminutes {
my($seconds) = @_;
my $min = int($seconds/60);
my $sec = int($seconds%60);
my $hund = ($seconds - int($seconds)) * 100;
return( "${sec}s" ) if $min == 0;
return( "${min}:" . sprintf( "%02d", $sec ) ) if $hund == 0;
return( "${min}:" . sprintf( "%02d.%02d", $sec, $hund ) );
}
#
# PERL-based RC file handlers
#
#
# Search for and return the contents of an rc file
# The file handle will be auto-close for next file.
#
sub get_rc {
my ($rc) = @_;
my $result = '';
my $bytes = 0;
open( RC, "<${rc}" ) || warn("Failed to open file ${rc}\n") && return '';
$bytes = read( RC, $result, fsize($rc) );
#print( STDERR "Read ${bytes} bytes from file ${rc}\n" ) if $opt_debug;
close( RC );
return $result;
}
#
# Eval .webmagickrc files with specified path. If the file does not
# exist or is not readable, then return silently. If an error occurs,
# then print message and return zero to caller (who can die if deemed
# necessary). This allows statements like:
# $sourceRcFile( $rcfile) || die( "Failed to source $rcfile\n" );
#
sub sourceRcFile {
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" );
return( 0 );
}
}
return( 1 );
}
#
# Look in the .webmagickrc file for the given directory and return
# the variable requested, or the default value given. this tries to
# be a bit more intelligent than previous eval.
# -- added by Anthony Thyssen
#
# Use as: get_rc_var( directory, variable name, default value)
sub get_rc_var {
my($dir, $var, $def) = @_;
my($rc) = "$dir/$opt_webmagickrc";
return $def if ( ! -r $rc || ! -f $rc );
my($val) = ';' . get_rc( $rc );
$val =~ s/#.*//g; # remove comments to avoid confusion
if ( $val =~ /\$$var\b/ > 1 ) {
print STDERR "Var \"\$$var\" is not simple in \"$rc\" -- using default.\n";
return $def;
}
# find variable assignment if pressent and remove stuff before it
unless ( $val =~ s/(.|\n)*;\s*\$$var\s*=\s*// ) {
# print("DB: \$$var not found in \"$rc\"\n") if $opt_debug;
return $def; # variable assignment was not found
}
$val =~ s/;(.|\n)*//; # remove stuff after assignment expression
# print("Assignment for \$$var = \"$val\"\n") if $opt_debug;
$val = eval ( $val );
if ( $@ ) {
warn("Bad Eval for variable \"\$$var\" in \"$rc\"...\n$@\n");
$val = $def;
}
# print("DB: \$$var found in \"$rc\" with value of \"$val\"\n")
# if $opt_debug;
return $val;
}
#
# Eval PERL-format rc files in order from $opt_rootpath to
# $currentDirectory directory. Values are added to global variables
#
sub evaluateRcFiles {
my($dir) = $currentDirectory; # current directory
my(@top,@dir);
my $rcpath ;
my $top;
my $direlem;
# Decide how far to look for .webmagickrc files
# Support the case where processing outside of the server
# root directory. In that case, use the sourceDirectory instead.
if( $currentDirectory =~ m|^$opt_rootpath| ) {
$top = $opt_rootpath; # Use server root directory
} else {
$top = $opt_srcdir; # Use specified source directory
}
@top=split('/', $top); # Array form
shift(@top);
@dir=split('/', $dir); # Array form
shift(@dir);
splice(@dir, 0, scalar(@top) ); # Leave only subdirectory part
#
# Build up path starting at top sourcing any .webmagickrc as we go.
#
my $path=$top;
$direlem='';
do {
# Certain values must only be vaild in the last
# current directory webmagickrc file.
$opt_ignore=0; # Ignore -- do not process this directory
if( $direlem ) {
$path = "$path/$direlem";
}
$rcpath = "$path/$opt_webmagickrc";
sourceRcFile( $rcpath );
} while( $direlem = shift(@dir) );
return( 0 );
}
#
# Lookup color in RGB hash table
#
sub lookupRGBColor {
my($color) = @_;
# If already in hex format, don't translate
if( $color =~ /^\#/ ) {
return( "\U$color" ); # just uppercase the color hex value
}
if( defined($RGBDB{"\L$color"}) ) {
return( $RGBDB{"\L$color"} );
} else {
print( STDERR "No such color \"$color\" found\n" );
return("#BEBEBE"); # Return grey as default in case of error
}
}
#
# Print details regarding executing child process
# Takes return from system() command or $? as input
# Borrowed from example provided in the Camel book
# (PERL 5) page 230
#
sub syserror {
my($rc) = @_;
print("Process exited: ");
$rc = 0xffff & $rc;
if($rc == 0) {
print("normal exit\n");
}
elsif ($rc == 0xff00) {
print("command failed: $!\n");
}
elsif ($rc > 0x80) {
$rc >>= 8;
print("ran with non-zero exit status $rc\n");
}
else {
print("ran with ");
if ($rc & 0x80) {
$rc &= ~0x80;
print("coredump from ");
}
print("signal $rc\n");
}
}
webmagick-2.02.orig/webmagickrc.in 0100644 0001750 0001750 00000024600 07402020735 016761 0 ustar arafune arafune #
# Copy the webmagickrc file to your home directory under the name
# .webmagickrc. Any default definitions you want to override should be
# uncommented in this file and modified.
#
# Navigation Icon Paths and URLs
# Specify the path and file name for the navigation icons.
# !!!MUST EDIT OR OVERRIDE!!!
#
# $opt_rootpath = '@ROOTPATH@'; # Directory Path to top of html tree
# Needed to determine relative paths to images
# $opt_prefixpath = '@PREFIXPATH@'; # Path or URL to prepend to root URL
# Not used if local relative paths used
# $opt_iconpath = '@ICONPATH@';
# Relative path under rootpath / prefixpath
# $opt_iconbase = '';
# Global icons base URL, if not empty
#
# Server-side imagemap settings
# !!!MAY NEED TO EDIT OR OVERRIDE!!!
#
# $opt_htimage='@HTIMAGE@'; # Base URL to server-side imagemap CGI
# On some systems this is /cgi-bin/imagemap
# Set to '' to use a ".map" URL with relative
# URLs (latest NCSA & Apache)
# $opt_maptype='@MAPTYPE@'; # Maptype must be 'cern' or 'ncsa'. If you are
# using Apache, specify 'ncsa'.
# $opt_serversidemap = 0; # Enable server-side maps writting
#
# RC files
#
#
# Name of per-directory rc file
# $opt_webmagickrc = '.webmagickrc';
# global rc files
@global_option_files = ("@sysconfdir@/webmagickrc", "$ENV{'HOME'}/${opt_webmagickrc}");
# File naming
# $opt_indexname = 'index.html'; # Per-directory master index file
# $opt_readme = 'README.html';# Name of welcome page README file ('' = none)
# $opt_pageindexname = '.index'; # Base name of secondary index files
# $opt_dirindexname = '.dirindex'; # Subdirectory Title cross-reference
# dirname Directory Title
# $opt_dirhtmlext = '.html'; # Use .shtml for SSI
# $opt_imgindexname = '.imgindex'; # Image name to label cross-reference file
#
# HTML color and background image related options
#
# X11 RBG color database (rgb.txt) location
# Entries in this file have the form:
# Red Green Blue Color-name
# where color intensities are specified in decimal.
# e.g. 250 240 230 linen
# $opt_rgbdb='@RGBDB@';
#
# Page Frame & non-framed pages
# $opt_colorback = '#CCCCCC'; # Color -- Background
# $opt_colorfore = 'black'; # Color -- Foreground
# $opt_coloralink = '#FF0000'; # Color -- Active link
# $opt_colorlink = '#0000EE'; # Color -- Link
# $opt_colorvlink = '#551A8B'; # Color -- Visited link
#
# Directory frame (Leave options empty ('') to use page frame colors
# $opt_dircolorback = '#B2B2B2'; # Color -- Background
# $opt_dircolorfore = 'black'; # Color -- Foreground
# $opt_dircoloralink = ''; # Color -- Active link
# $opt_dircolorlink = ''; # Color -- Link
# $opt_dircolorvlink = ''; # Color -- Visited link
# $opt_stylesheet = '/styles/my_style.css'; # stylesheet to use instead
# of specifying colors
# General options
# $opt_anonymous = 0; # Don't show address & copyright info on pages
# $opt_debug = 0; # Debug flag (default off)
# $opt_recurse = 0; # Recursivally apply webmagick (default off)
# $opt_prune = 0; # Do Not recurse into subdirectories (off)
# $opt_ignore = 0; # Do not webmagick this directory
# but still recurse into sub-directories
# $opt_ignorefp = 1; # Ignore /_[a-z] directories (FrontPage)
# $opt_srcdir = '.'; # Source directory path (current directory)
# $opt_verbose = 0; # Verbose flag (default off)
# $opt_forcecache = 0; # Force update of cached thumbnails
# $opt_forcehtml = 0; # Force HTML files to be generated (default off)
# $opt_forcemontage = 0; # Force montage (default off)
# $opt_forcegif = 0; # Force GIF imagemaps (default off)
# $opt_forcejpeg = 0; # Force JPEG imagemaps (default off)
# $opt_jpegquality = 70; # Quality of JPEG imagemaps
# $opt_help = 0; # Display usage message
# $opt_version = 0; # Display version info
# $opt_htmlext = '.html'; # Use .shtml for SSI
# $opt_header = '
'; # Imagemap extra page footer (HTML)
# $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_date = 1; # Output updates date
# $opt_pichtml = 0; # Write separate HTML for each picture
# $opt_pichtmlbottom = '
';
# $opt_pichtmlext = '.html'; # Use .shtml for SSI
# $opt_pichtmlnav = 0; # Write navigation into pic's HTML
# $opt_pichtmlputtitle = 1; # Write picture title above it
# $opt_pichtmltarget = '';
# $opt_pichtmltitleend = ''; # End tags for picture title
# $opt_pichtmltitlestart = '
'; # Start tags for picture title
# $opt_pichtmltop = '
';
# $opt_tables = 0; # use HTML tables instead of image maps
# $opt_allowconfig = 0; # allow user to configure table and framestyle
#
# ImageMagick Montage settings
#
# $opt_maxgif = 30000; # Maximum GIF imagemap size before
# trying JPEG
# $opt_columns = 6; # Max number of columns in montage grid
# $opt_rows = 4; # Max number of rows in montage grid
# $opt_mapnetscape = 0; # Map GIFs to Netscape 216-color cube
# $opt_thumbtexture = 'false'; # Texture to tile onto the image background
# $opt_thumbbackground = '#CCCCCC'; # Montage background color
# $opt_thumbborderwidth = 0; # Thumbnail border width (pixels)
# $opt_thumbframebgcolor = 'black'; # Inside of Frame color. Unused if no frame
# $opt_thumbframecolor = '#CCCCCC'; # Color -- Frame Color
# $opt_thumbtransparent = $opt_thumbbackground; # Color -- Image Transparency
# $opt_thumbcompose = 'Replace'; # Thumbnail image composition operation
# $opt_thumbfont = '@DEFAULTFONT@'; # Label font
# $opt_thumbforeground = 'black'; # Montage foreground color
# $opt_thumbframe = 'false'; # Geometry of frame around thumbnail
# (default false)
# $opt_thumbgeometry = '106x80+2+2>'; # Size of thumbnail images (width x height)
# $opt_thumbgravity = 'Center'; # Direction thumbnail gravitates to
# (default Center)
# $opt_thumblabel = '%f\n%wx%h\n%b'; # Default format for thumbnail text label
# $opt_thumblabelwidth = 13; # Label width past which truncation occurs
# $opt_thumbshadow = 'false'; # Enable decorative shadow under thumbnail
# (default disabled)
# $opt_zoomfilter = 'Mitchell'; # Zoom (size reduction) filter
# (Box/Triangle/Mitchell)
#
# Hooks to add code to key places in WebMagick
#
# $opt_thumbprehook = ''; # PerlMagick commands to execute on original
# prior reducing to thumbnail size
# $opt_thumbposthook = ''; # PerlMagick commands to execute on image
# after reduction to thumbnail size
# $opt_readfailhook = ''; # PERL commands to execute if reading image
# fails due to image corruption
#
# Caching related options
#
# Note: See below about sharing cache with 'xv'
# If caching is turned on, the montage grid will continue to be
# controlled by opt_thumbgeometry but the thumbnail size will be
# controlled by opt_cachegeom
# $opt_cache = 1; # Cache thumbnails
# $opt_cachedir = '.cache'; # Subdirectory to cache thumbnails in
# $opt_cacheformat = 'JPEG'; # Format to use for thumbnails
# $opt_cachegeom = $opt_thumbgeometry; # Thumbnail geometry
# $opt_cachemin = 300*200; # Smallest image to cache in total pixels
# (width * height). Images smaller than
# this size will not be cached.
# Uncomment these options to share cache with John Bradley's 'xv'
# (Visual Schnauzer format) NOTE: The 'xv' thumbnail format only
# supports 128 absolute colors so expect some montage thumbnail
# degradation when using 'xv' thumbnails.
#
#
# $opt_cacheformat = 'P7'; # 'xv's thumbnail format
# $opt_cachegeom = '80x60'; # 'xv's default thumbnail geometry is 80x60
# $opt_cachedir = '.xvpics'; # 'xv's thumbnail cache directory
# $opt_cachemin = 0; # Cache all thumbnails
#
# Uncomment remaining to obtain 'xv's Visual Schnauzer "look and feel"
#
# $opt_thumbgeometry = '92x72+2+2>';
# $opt_thumblabel = '%f';
# $opt_thumblabelwidth = 12;
# $opt_thumbgravity = 'South';
#
# Frame related options
#
# $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_framestyle = 1; # Frame style to use (out of those available)
#
# Meta-tag defaults
#
# $opt_metaauthor = ''; # Page author
# $opt_metacharset = ''; # Page character set
# $opt_metaclassification = ''; # Page classification
# $opt_metadescription = ''; # Page description
# $opt_metaexpires = ''; # Date page expires (e.g "Tue, 20 Aug 1996 14:25:27 GMT")
# $opt_metakeywords = 'WebMagick'; # Key words
#
# Messages customization defaults
#
# $opt_msg_copyright = 'Copyright ';
# $opt_msg_date_format = '%B %e, %Y'; # See strftime(3)
# $opt_msg_directories = 'Directories';
# $opt_msg_directory_navigator = 'Directory Navigator';
# $opt_msg_images = 'Images';
# $opt_msg_index_of_directory = 'Index of directory';
# $opt_msg_index_of_files = 'Index of files ';
# $opt_msg_index_through = 'through';
# $opt_msg_next = 'Next';
# $opt_msg_page_navigator = 'Page Navigator';
# $opt_msg_page_updated_on = 'Page updated on';
# $opt_msg_prev = 'Prev';
# $opt_msg_produced_by = 'Produced by';
# $opt_msg_readme = 'ReadMe';
# $opt_msg_up = 'Up';
#
# Hash table of images used -- image size read internally by webmagick
#
# $opt_icons{'background'} = 'thumbs.jpg'; # Thumbnail frame background image
# $opt_icons{'dirbackground'} = 'dir.jpg'; # Directory frame background image
# $opt_icons{'prev'} = 'blue_prev.gif'; # Previous
# $opt_icons{'prev_gray'} = 'gray_prev.gif'; # Previous (grayed out)
# $opt_icons{'next'} = 'blue_next.gif'; # Next
# $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{'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
# $opt_icons{'config'} = 'blue_c.gif'; # Configuration button
#
webmagick-2.02.orig/INSTALL.generic 0100644 0001750 0001750 00000016447 06272746017 016645 0 ustar arafune arafune Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes a while. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
webmagick-2.02.orig/MANIFEST 0100644 0001750 0001750 00000001653 06450036644 015317 0 ustar arafune arafune $Id: MANIFEST,v 1.6 1997/12/23 22:39:32 bfriesen Exp $
ChangeLog Cronological changes
INSTALL WebMagick install instructions
INSTALL.generic GNU configure generic instructions
MANIFEST This file
Makefile.in Makefile template
README WebMagick overview
TODO Things left to do
configure Autoconf configure script
configure.in Configure script macros
doc/Makefile.in Documentation Makefile template
doc/webmagick.dvi Webmagick documentation (DVI)
doc/webmagick*.html WebMagick documentation (HTML)
doc/webmagick.info WebMagick documentation (info)
doc/webmagick.ps WebMagick documentation (Postscript)
icons/ WebMagick navigation icons
install-sh BSD compatable install script
release WebMagick release identification
utils/ Useful utilities
webmagick.in WebMagick script in template form
webmagick.lsm Linux Software Map entry
webmagick.lsm.in Linux Software Map entry template
webmagickrc.in webmagickrc file template
webmagick-2.02.orig/webmagick.js 0100644 0001750 0001750 00000121163 07402017732 016447 0 ustar arafune arafune //
// $Id: webmagick.js,v 1.39 2001/11/24 21:29:03 ache Exp $
//
// JavaScript routines to display a set of images
// Part of the WebMagick package
// Copyright 1997, 1998, Bob Friesenhahn
//
// Start with first page (zero based)
var pageNumber = 0;
// Start with first image on page
var pageImageIndex = 0;
//
// Window size hints
var browserWindowWidth = 800;
var browserWindowHeight = 500;
// Netscape 4.X
if( parent.innerWidth && parent.innerHeight) {
browserWindowWidth = parent.innerWidth;
browserWindowHeight = parent.innerHeight;
}
//alert('Width: ' + browserWindowWidth + ' Height: ' + browserWindowHeight);
///////////////////////////////////////////////////
//
// Routines and variables for the master frame definition
//
///////////////////////////////////////////////////
// Define window names based on frame style option
var frameTargets = new Object();
var origFramestyle = htmlOpts["framestyle"];
var origColumns = htmlOpts["columns"];
var origRows = htmlOpts["rows"];
var today = new Date();
var expires_date = new Date(today.getYear() + 1,today.getMonth(),today.getDate(),0,0,0);
// for testing
//Set_Cookie('framestyle', '2', expires_date);
//Set_Cookie('columns', '2', expires_date);
//Set_Cookie('rows', '3', expires_date);
// Should check to see if all of these are needed
if (htmlOpts["config"] && htmlOpts["config"] != 0 && htmlOpts["tables"]) {
if (Get_Cookie('framestyle') != null) {
htmlOpts["framestyle"] = Get_Cookie('framestyle');
if (htmlOpts["framestyle"] != origFramestyle) {
// reset the cookie to increase the expiration
// should do something about the path, but I'm not sure what - one of our current options?
Set_Cookie('frameStyle', htmlOpts["framestyle"], expires_date);
}
}
if (Get_Cookie('rows') != null) {
htmlOpts["rows"] = Get_Cookie('rows');
if (htmlOpts["rows"] != origRows) {
Set_Cookie('rows', htmlOpts["rows"], expires_date);
}
}
if (Get_Cookie('columns') != null) {
htmlOpts["columns"] = Get_Cookie('columns');
if (htmlOpts["columns"] != origColumns) {
Set_Cookie('columns', htmlOpts["columns"], expires_date);
}
}
if ((htmlOpts["rows"] != origRows) || (htmlOpts["columns"] != origColumns)) {
var totalCount = 0;
for (i = 0; i < imageNames.length; i++) {
for (j = 0; j < imageNames[i].length; j++) {
totalCount++;
}
}
var perPage = htmlOpts["rows"] * htmlOpts["columns"];
var remainder = totalCount % perPage;
htmlOpts["numpages"] = Math.floor(totalCount / perPage);
if (remainder != 0) {
htmlOpts["numpages"]++;
}
imLabels = fixDoubleArray(imLabels, remainder);
thumbwidths = fixDoubleArray(thumbwidths, remainder);
thumbheights = fixDoubleArray(thumbheights, remainder);
imageNames = fixDoubleArray(imageNames, remainder);
// why does this run twice????
//alert ('imageNames ' + imageNames[0]);
}
}
// config only works with tables
if (htmlOpts["config"] && !htmlOpts["tables"]) {
htmlOpts["config"] = 0;
}
// Set number of display windows based on framestyle option
var numWindows = 3; // default for framestyle 1
if( htmlOpts["framestyle"] == 2 ||
htmlOpts["framestyle"] == 3 ||
htmlOpts["framestyle"] == 4) {
numWindows = 4;
}
// Set window names based on number of display windows
if( numWindows == 3 ) {
// One window plays triple duty when there are only two frames
frameTargets["dirview"] = 'dirview';
frameTargets["imageview"] = 'imageview';
frameTargets["navview"] = 'navview';
frameTargets["readmeview"] = 'imageview';
frameTargets["thumbview"] = 'imageview';
}
else if( numWindows == 4 ) {
// When there are four frames, only the README shares a window
frameTargets["dirview"] = 'dirview';
frameTargets["imageview"] = 'imageview';
frameTargets["navview"] = 'navview';
frameTargets["readmeview"] = 'imageview';
frameTargets["thumbview"] = 'thumbview';
}
function emptyHTML()
{
return '';
}
function drawWindows()
{
var style = htmlOpts["framestyle"];
// Is README actually displayed?
if( ( htmlOpts["readmepresent"] == 1 && htmlOpts["numpages"] == 0 )
|| htmlOpts["readmevisible"] == 1 ) {
var showReadme = 1;
} else {
var showReadme = 0;
}
if( style == 1 ) {
displayResult(frameTargets["dirview"], returnDirectoryHTML());
displayResult(frameTargets["navview"], returnNavHTML(0));
if (showReadme != 1) {
displayResult(frameTargets["imageview"], returnThumbNailsHTML());
}
} else if (style == 2) {
displayResult(frameTargets["dirview"], returnDirectoryHTML());
displayResult(frameTargets["thumbview"], returnThumbNailsHTML());
displayResult(frameTargets["navview"], returnNavHTML(0));
if (showReadme != 1) {
displayResult(frameTargets["imageview"], returnImageHTML(0));
}
} else if (style == 3) {
displayResult(frameTargets["dirview"], returnDirectoryHTML());
displayResult(frameTargets["thumbview"], returnThumbNailsHTML());
displayResult(frameTargets["navview"], returnNavHTML(0));
if (showReadme != 1) {
displayResult(frameTargets["imageview"], returnImageHTML(0));
}
} else if (style == 4) {
displayResult(frameTargets["thumbview"], returnThumbNailsHTML());
displayResult(frameTargets["navview"], returnNavHTML(0));
displayResult(frameTargets["dirview"], returnDirectoryHTML());
if (showReadme != 1) {
displayResult(frameTargets["imageview"], returnImageHTML(0));
}
}
}
function displayResult(target, result)
{
var theFrame = open("", target);
theFrame.document.writeln(result);
theFrame.document.close();
}
function returnFrameHTML()
{
var style = htmlOpts["framestyle"];
// Is README actually displayed?
if( ( htmlOpts["readmepresent"] == 1 && htmlOpts["numpages"] == 0 )
|| htmlOpts["readmevisible"] == 1 ) {
var showReadme = 1;
} else {
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"];
// Javascript URLs to generate frame source
var srcDirectory = ' SRC="javascript:parent.emptyHTML();"';
var srcHidden = ' SRC="' + htmlOpts["jspageindex"] + '"';
var srcImageView = ' SRC="javascript:parent.emptyHTML();"';
var srcNavView = ' SRC="javascript:parent.emptyHTML();"';
var srcReadMe = ' SRC="' + htmlOpts["readme"] + '"';
var srcThumbnails = ' SRC="javascript:parent.emptyHTML();"';
// frame names
var nameDirView = ' NAME="' + frameTargets["dirview"] + '"';
var nameHidden = ' NAME="webmagick"';
var nameImageView = ' NAME="' + frameTargets["imageview"] + '"';
var nameNavView = ' NAME="' + frameTargets["navview"] + '"';
var nameThumbView = ' NAME="' + frameTargets["thumbview"] + '"';
var result =
'\n' +
'\n' +
'' + htmlOpts["title"] + '\n';
if (htmlOpts["stylesheet"])
result += '\n';
result += '\n';
if( style == 1 ) {
// Three frame screen with directories listed in the
// top-left frame, navigation icons displayed in top right frame,
// and imagemap or README (dual-use) displayed in the bottom frame.
//
// -------------
// | | |
// |-------------|
// | |
// | |
// | |
// | |
// -------------
result +=
'\n' +
' \n' +
' \n' +
' \n';
if( showReadme == 1 ) {
result += ' \n';
} else {
result += ' \n';
}
result +=
' \n' +
' \n' +
'\n';
} else if ( style == 2 ) {
// Four frame screen with directories listed in top-left frame,
// image navigation icons in top right frame, imagemap displayed
// in bottom-left frame, and README/Images displayed in
// full-height right-hand frame.
// -------------
// | |----------|
// | | |
// |--| |
// | | |
// | | |
// | | |
// -------------
result +=
'\n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n';
if( showReadme == 1 ) {
result += ' \n';
} else {
result += ' \n';
}
result +=
' \n' +
' \n' +
'\n';
} else if ( style == 3 ) {
// Four frame screen with directories listed in left frame,
// imagemap displayed in top-right frame, and README/Images
// displayed in lower-right frame.
// -------------
// | | |
// |--+----------|
// |--+----------|
// | |
// | |
// | |
// -------------
result +=
'\n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n';
if( showReadme == 1 ) {
result += ' \n';
} else {
result += ' \n';
}
result +=
'\n';
} else if ( style == 4 ) {
// Four frame screen with imagemap displayed in top frame,
// directories in left-center frame, image navigation icons in
// right-center frame, and README/Images displayed in bottom
// frame.
// -------------
// | |
// |-------------|
// | | |
// |-------------|
// | |
// | |
// -------------
result +=
'\n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n';
if( showReadme == 1 ) {
result += ' \n';
} else {
result += ' \n';
}
result +=
'\n';
}
result += '\n';
//alert(result);
return result;
}
///////////////////////////////////////////////////
//
// Routines and variables for the 'navview' frame
//
///////////////////////////////////////////////////
var navViewWindow;
function returnNavImageHTML()
{
var result = '
\n';
// up arrow -- only displayed if three-frame style
if( htmlOpts["framestyle"] == 1 ) {
result +=
'\n';
}
// if we have more than one image then display image nav buttons
if(imageNames[pageNumber].length > 1 || imageNames.length > 1) {
// preceding image arrow
// if not first page or first page and not first image in page
if( (pageNumber > 0) || (pageNumber == 0 && pageImageIndex > 0) ) {
result +=
'\n';
} else {
result +=
'\n';
}
// next image arrow
// if not last page or last page and not last image in page
if( (pageNumber < imageNames.length - 1) ||
(pageNumber == imageNames.length - 1 &&
pageImageIndex < imageNames[pageNumber].length - 1 ) ) {
result +=
'\n';
}else {
result +=
'\n';
}
} // end of if we have one more image
result += '
\n';
return result;
}
function returnNavThumbHTML()
{
var result = '';
// if no images then return empty page
if( imageNames[pageNumber].length == 0 ) {
return result;
}
if( htmlOpts["numpages"] > 1 ) {
// start of table
result += '
\n
\n';
// start navigation row
result += '
\n' ;
result += '
\n';
// preceding page
if( pageNumber == 0 ) {
// first page + no preceding
result +=
'\n';
} else {
// have preceding
result += '\n';
}
result += '
\n';
// select specific page
result += '
\n';
result += '\n';
result += '
\n';
// next page
result += '
\n';
if( pageNumber == htmlOpts["numpages"] - 1 ) {
// already on last page
result +=
'\n';
} else {
// more to go
result +=
'\n';
}
result +=
'
\n'+
'
\n' +
'
\n' +
'
\n \n';
} // End of code for multiple thumbnail pages
return result;
}
function returnNavHTML()
{
// page header
var result =
'\n' +
'\n' ;
if (htmlOpts["stylesheet"])
{
result += '\n';
result += '\n\n';
}
else
{
result += '\n' +
'\n';
}
//alert('returnNavHTML(): thumbNailMode=' + thumbNailMode);
if( htmlOpts["framestyle"] == 1 && thumbNailMode == true) {
result += returnNavThumbHTML();
} else {
result += returnNavImageHTML();
}
result +=
'\n' +
'\n' ;
return result;
}
///////////////////////////////////////////////////
//
// Routines and variables for the 'imageview' frame
//
///////////////////////////////////////////////////
// Image descriptions for image extensions
var imageExtensions = new Object();
imageExtensions['avs'] = 'AVS X image file';
imageExtensions['bie'] = 'Joint Bi-level Image experts Group file interchange format';
imageExtensions['bmp'] = 'Microsoft Windows bitmap image file';
imageExtensions['cgm'] = 'Computer Graphics Metafile';
imageExtensions['dcm'] = 'DICOM Medical image file';
imageExtensions['dcx'] = 'ZSoft IBM PC multi-page Paintbrush file';
imageExtensions['dib'] = 'Microsoft Windows bitmap image file';
imageExtensions['dot'] = 'Graphviz (DOT) file';
imageExtensions['dvi'] = 'TeX DVI file';
imageExtensions['epdf'] = 'Encapsulated Portable Document Format';
imageExtensions['epi'] = 'Adobe Encapsulated PostScript Interchange format';
imageExtensions['eps'] = 'Adobe Encapsulated PostScript file';
imageExtensions['eps2'] = 'Adobe Level II Encapsulated PostScript file';
imageExtensions['epsf'] = 'Adobe Encapsulated PostScript file';
imageExtensions['epsi'] = 'Adobe Encapsulated PostScript Interchange format';
imageExtensions['ept'] = 'Adobe Encapsulated PostScript with TIFF preview';
imageExtensions['fax'] = 'Group 3 FAX';
imageExtensions['fig'] = 'Xfig file';
imageExtensions['fits'] = 'Flexible Image Transport System';
imageExtensions['fpx'] = 'FlashPix Format';
imageExtensions['g3'] = 'Group 3 FAX';
imageExtensions['gif'] = 'CompuServe graphics interchange format';
imageExtensions['gplt'] = 'GNUPLOT plot file';
imageExtensions['hdf'] = 'Hierarchical Data Format';
imageExtensions['hpgl'] = 'HP-GL plotter file';
imageExtensions['ico'] = 'Microsoft icon';
imageExtensions['im1'] = 'SUN Rasterfile (1 bit)';
imageExtensions['im24'] = 'SUN Rasterfile (24 bit)';
imageExtensions['im8'] = 'SUN Rasterfile (8 bit)';
imageExtensions['jbg'] = 'Joint Bi-level Image experts Group file interchange format';
imageExtensions['jbig'] = 'Joint Bi-level Image experts Group file interchange format';
imageExtensions['jpeg'] = 'Joint Photographic Experts Group JFIF format';
imageExtensions['jpg'] = 'Joint Photographic Experts Group JFIF format';
imageExtensions['m2v'] = 'Motion Picture Experts Group file interchange format';
imageExtensions['man'] = 'Manual page';
imageExtensions['miff'] = 'Magick image file format';
imageExtensions['mng'] = 'Multiple-image Network Graphics';
imageExtensions['mpeg'] = 'Motion Picture Experts Group file interchange format';
imageExtensions['mpg'] = 'Motion Picture Experts Group file interchange format';
imageExtensions['mtv'] = 'MTV Raytracing image format';
imageExtensions['p7'] = 'Xv thumbnail format';
imageExtensions['pbm'] = 'Portable bitmap format (black and white)';
imageExtensions['pcd'] = 'Photo CD';
imageExtensions['pcds'] = 'Photo CD';
imageExtensions['pcx'] = 'ZSoft IBM PC Paintbrush file';
imageExtensions['pdf'] = 'Portable Document Format';
imageExtensions['pgm'] = 'Portable graymap format (gray scale)';
imageExtensions['pic'] = 'Apple Macintosh QuickDraw/PICT file';
imageExtensions['pict'] = 'Apple Macintosh QuickDraw/PICT file';
imageExtensions['pix'] = 'Alias/Wavefront RLE image format';
imageExtensions['png'] = 'Portable Network Graphics';
imageExtensions['pnm'] = 'Portable anymap';
imageExtensions['pov'] = 'Persistance Of Vision file';
imageExtensions['ppm'] = 'Portable pixmap format (color)';
imageExtensions['ps'] = 'Adobe PostScript file';
imageExtensions['psd'] = 'Adobe Photoshop bitmap file';
imageExtensions['rad'] = 'Radiance image format';
imageExtensions['rla'] = 'Alias/Wavefront image file';
imageExtensions['rle'] = 'Utah Run length encoded image file';
imageExtensions['sgi'] = 'Irix RGB image file';
imageExtensions['sun'] = 'SUN Rasterfile';
imageExtensions['tga'] = 'Truevision Targa image file';
imageExtensions['tif'] = 'Tagged Image File Format';
imageExtensions['tiff'] = 'Tagged Image File Format';
imageExtensions['tim'] = 'PSX TIM file';
imageExtensions['ttf'] = 'TrueType font file';
imageExtensions['vicar'] = 'VICAR rasterfile format';
imageExtensions['viff'] = 'Khoros Visualization image file';
imageExtensions['xbm'] = 'X Windows system bitmap (black and white)';
imageExtensions['xpm'] = 'X Windows system pixmap file (color)';
imageExtensions['xwd'] = 'X Windows system window dump file (color)';
// return HTML to display image with corresponding index
function returnImageHTML(imageIndex)
{
pageImageIndex = imageIndex;
var result =
'\n' +
'\n' ;
if (htmlOpts["stylesheet"])
{
result += '\n';
result += '\n\n';
}
else
{
result += '\n' +
'\n';
}
// only do work if image exists
if (imageNames[pageNumber][imageIndex] != null) {
result += '
';
// if image title defined, then use it, otherwise, image name
if( imageLabels[imageNames[pageNumber][imageIndex]] != null ) {
result += imageLabels[imageNames[pageNumber][imageIndex]];
} else {
result += imageNames[pageNumber][imageIndex];
}
result +=
'
\n';
}
else {
// Browser requires an external helper program
result +=
'
Your browser may not have the capability to view files of format "' + imageExtensions[extension]
+ '" as an in-line image. View image via a link instead.
\n';
}
// mod to get embedded mod files based on previews
var imageNoExtension = image.substr(0, image.length - (image.length - delim));
if (imageNoExtension.substr(imageNoExtension.length - 4, 4) == '.mov') {
// it's a Quicktime movie
result += '
\n';
}
}
result +=
'\n' +
'\n';
return result;
}
// Display current image in named window
// Display image
// Display thumbnails in navview window if framestyle != 1
var imageViewWindow;
function displayImage()
{
//var targeturl = 'javascript:parent.webmagick.returnImageHTML(' + pageImageIndex + ');';
//imageViewWindow = window.open( targeturl, frameTargets["imageview"]);
displayResult(frameTargets["imageview"], returnImageHTML(pageImageIndex));
if( htmlOpts["framestyle"] == 1) {
thumbNailMode = false;
}
// alert('displayImage(): thumbNailMode=' + thumbNailMode);
//var targeturl = 'javascript:parent.webmagick.returnNavHTML();';
//navViewWindow = window.open( targeturl, frameTargets["navview"]);
displayResult(frameTargets["navview"], returnNavHTML());
}
// Display an image by index number (setting current image)
function displayImageByIndex(imageIndex)
{
pageImageIndex = imageIndex;
displayImage();
}
// Display the next image in a series
function displayNextImage()
{
// if not last image in current page, then increment index
if(pageImageIndex < imageNames[pageNumber].length - 1 ) {
++pageImageIndex;
displayImage(); // display new image
}
else {
// if not last page then increment page and set index to zero
if(pageNumber < imageNames.length - 1) {
++pageNumber;
pageImageIndex = 0;
if(htmlOpts["framestyle"] == 1) {
displayImage(); // display new image
} else {
displayThumbNails(); // display new thumbnails & image
}
}
}
}
// Display the preceding image in a series
function displayPrecedingImage()
{
// if not first image in current page, then decrement index
if( pageImageIndex > 0 ) {
--pageImageIndex;
displayImage(); // display new image
}
else {
// if not first page, then decrement page and set index to max index for page
if(pageNumber > 0) {
--pageNumber;
pageImageIndex = imageNames[pageNumber].length - 1;
if(htmlOpts["framestyle"] == 1) {
displayImage(); // display new image
} else {
displayThumbNails(); // display new thumbnails & image
}
}
}
}
///////////////////////////////////////////////////
//
// Routines and variables for the 'thumbview' frame
//
///////////////////////////////////////////////////
// Write out thumbnail index HTML into thumbview window
// and write navigation info to navview window.
// Display thumbnails
// Display thumbnail navigator in thumbview window if framestyle=1
// Display image if framestyle!=1
var thumbViewWindow;
var thumbNailMode=true;
function displayThumbNails()
{
//var targeturl = 'javascript:parent.webmagick.returnThumbNailsHTML();';
//thumbViewWindow = window.open( targeturl, frameTargets["thumbview"]);
displayResult(frameTargets["thumbview"], returnThumbNailsHTML());
if ( htmlOpts["framestyle"] == 1 ) {
thumbNailMode = true
//var targeturl = 'javascript:parent.webmagick.returnNavHTML();';
//navViewWindow = window.open( targeturl, frameTargets["navview"]);
displayResult(frameTargets["navview"], returnNavHTML());
} else {
thumbNailMode = true
displayImage();
}
}
// return HTML to display thumbnail selection
function returnThumbNailsHTML()
{
// page header
var result =
'\n' +
'\n' ;
if (htmlOpts["stylesheet"])
{
result += '\n';
result += '\n\n';
}
else
{
result += '\n' +
'\n';
}
// if no images then return empty page
if( imageNames[pageNumber].length == 0 ) {
result +=
'\n' +
'\n' ;
return result;
}
// If not in framestyle 1, display thumbnail navigator
if ( htmlOpts["framestyle"] != 1 ) {
result += returnNavThumbHTML();
}
result +=
'