forwarded message from
+ below the corresponding parent to article to below
+ and move the aria-labelled-by attribute from that to
+ .
+
+ * src/{hypermail.h, string.c}
+ Increase the max size for a scanned url string to 4096 to reflect
+ modern trends.
+
+ * src/parse.c
+ parse_old_html() was not unconverting all the protected
+ HTML entities (such as –) from the comments in a
+ hypermail archive directory.
+
+ * src/{printfile.c, lang.h}
+ Associate title="Normal view" to the default stylesheet to take
+ into account someone adding alternate css files by means
+ of hypermail's configuration directives.
+
+ * src/{parse.c, setup.c, setup.h}
+ New configuration option ignore_content_disposition to be able to
+ ignore the Content-Disposition header for some Mime-Types. This is
+ particularly useful for old Apple Mail messages that associated
+ Content-Disposition: attachment with multipart/appledouble.
+
+ * src/parse.c
+ When parse_old_html() was called with cmp_msgid to check if the first
+ message in the archive corresponds to the first one that is added,
+ the comparition failed if the msgid had characters that had to be
+ escaped inside xml comments.
+
+ * src/{parse.c, struct.c, struct.h}
+ In complex messages where a multipart/mixed had a message/rfc822 part,
+ with the later having multipart/mixed parts, parsing the message could
+ fail if there were one or more missing boundary end separators.
+
+ * src/parse.c
+ If a multipart/mixed attachment had a Content-Disposition header
+ that didn't give a filename, the parser wasn't checking if the
+ Content-Type header had a name attribute it could use for the
+ attachment file.
+
+ * src/print.c
+ Although description strings for attachments are stored in UTF-8,
+ they were not being converted to the prefered charset for message
+ files, which lead to invalid chars appearing in messages
+
+ * src/print.c
+ Special chars in subjects in forwarded messages were not being
+ escaped
+
+ * config.guess, config.sub
+ Updated from https://git.savannah.gnu.org/gitweb/?p=config.git
+
+ * configure.ac, configure
+ Rewrote the rules for supporting user-defined paths / system paths for
+ the gdbm library
+
+ * removed acconfig.h from FILES and from the repository.
+ Not needed anymore by autoconf.
+
+ * src{print.c, printfile.c, struct.c}
+ Removed warnings, errors when compiling without iconv
+
+ * src{*.c, *.h}
+ Added missing copyright, GPL licence where needed
+ Added protection against multiple includes of .h files
+
+ * src/{hypermail.c, setup.c}, docs/{hypermail.html, hypermail.1,
+ hmrc.html, hmrc.4}
+ Removed the -T option from the doc, the hypermail -h page and other
+ places where the option was mentioned. This option
+ was deprecated and removed in 2.2.25 but it was still documented.
+ Removed the -t option from the hypermail -h page. This option
+ was deprecated in 3.0.0 and is now ignored.
+
+ * src/parse.c
+ fixnextheader(), fixreplyheader(), and fixthreadheader were
+ not freeing memory allocated via i18n_utf2numref to
+ numsubject and numname
+
+ * src/string.c
+ translateurl() was not URL-encoding UTF-8 chars correctly
+ makeinreplytocommand() was not calling translateurl for the subject
+
+ * src/parse.c
+ Hypermail leaked memory if a message had more than one of
+ the following headers: Subject:, Date:, From:, Message-Id:.
+ Hypermail now only takes into account the first header
+ it finds, and ignores the duplicates. Note that multiple
+ Message-Ids will be rendered, but only the first one will
+ be taken into account internally (e.g., for threads).
+
+ * src/{hypermail.h, struct.c}
+ When a message/rfc body part contained only a stored
+ attachment (e.g., text/html), even if the attachment
+ was being added to the attachments dir, both the message/rfc822
+ headers and the link to the stored attachment were not being
+ added to the resulting markup and generated a memory leak.
+
+ * src/parse.c
+ Some old mail clients were could associate a message/rfc822
+ Content-Type with a BASE64 Content-Transfer-Encoding, which
+ violates RFC2046. If we find this case, we now force
+ ENCODE_NORMAL (the one used for both 7bit and 8bit).
+
+ * src/{setup.c, setup.h}
+ new conf. option warn_deprecated_options to control whether we
+ want hypermail to display warnings when a configuration file
+ has options that have been deprecated or that we plan to deprecate
+ in the next release.
+
+ * src/{defaults.h.in, setup.c, hypermail.c}
+ set a default breadcrumb for messages if neither
+ mhtmlnavbar2upfile ihtmlnavbar2upfile config options are set
+
+ * src/{parse.c, struct.c, hypermail.h}
+ spamify() was being systematically applied to boundary-ids which broke
+ boundary detection in multipart/ messages whenever a boundary-id had a
+ '@' character.
+ closes #94
+
+ * src/{string.c, proto.h, struct.c, parse.c}
+ When parsing message headers having DOS-style line
+ endings ('\r\n'), the '\r' was not being dropped in most
+ of the headers. Expanded the solution proposed in PR#98
+ closes #95
+
+ * src/{setup.c, setup.h, parse.c}, doc/{hmrc.html, hmrc.4}
+ New conf. option max_attachments_per_msg. Used for limiting
+ the number of attachments we want to parse for messages.
+ See hmrc.html, hmrc.4 or hypermail -v for more info.
+
+ * src/{parse.c, string.c, proto.h}
+ Some malformed messages could insert a \r followed by some
+ text between the Content-Type or Content-Type parameters,
+ their values and the end of the line or the ';'. Hypermail
+ now detects these values and filters them out.
+
+ * src/mail.c libcgi configure.ac Makefile.in src/Makefile.in
+ Purged the years old deprecated mail script and its associated
+ libraries. Althought the script itself had been disabled
+ by code changes, its code base was still being built and
+ distributed with hypermail, even if it did nothing anymore.
+
+ * src/{hypermail.c, print.c, setup.c, setup.h}
+ When reading a multi-message mbox that is made only of messages that
+ are annotated as 'spam' or 'deleted', hypermail will now print
+ an "empty archive" notice in all the generated indices. You can
+ customize the markup and text of that notice with the
+ 'empty_archive_notice' configuration option.
+ Note that this behavior is disabled when calling hypermail with the -u
+ option (upgrade existing archive).
+
+ * src/getdate.y
+ Fixed bison warning "POSIX yacc reserves %type to nonterminals [-Wyacc]"
+ by adapting the solution proposed for kerberos5:
+ https://github.com/krb5/krb5/commit/0108d7d7fbb1111c062ac580e69e97103662fc2b
+
+ * many files
+ To prune out potential errors and portability issues, compiled
+ hypermail with the gcc flags here belowed and removed most of the
+ compiler warnings. The few ones that remain are mostly implicit
+ declaration of functions fileno(), symlink(), and lstat() whose
+ prototypes have switched between glib and posix and 'const' qualifier
+ being discarded in utf8.h, a 3rd party lib. Need more tests on
+ different platforms to improve hypermail's configure.ac. This has no
+ impact when compiling hypermail on debian with gcc either without these
+ warnings or with -Wall and with -O2.
+
+ -Wall -ansi -pedantic -Wno-overlength-strings -Wshadow -Wpointer-arith
+ -Wcast-qual -Wcast-align -Waggregate-return -Wstrict-prototypes
+ -Wmissing-prototypes -Wnested-externs -Winline
+
+ * src/getname.c
+ When a From: header had two email addresses, hypermail was
+ always extracting the first one, regardless if it was in
+ a comment, while the 2nd one was the valid one. In some
+ cases that address could also include enclosing parenthesis
+ Closes #85
+
+ * src/setup.c
+ Marked config options finelinks, linkquotes as "deprecated, with
+ intention to remove" due to corresponding code not being maintained
+ anymore.
+
+ New conf. option show_headers_msg_rfc822. Useful if you want to
+ fine-tune which headers you want to be displayed in message/rfc822
+ attachments. If not declared, hypermail will use
+ show_headers_msg for message/rfc822 attachments.
+
+ * src/lock.c
+ unlock_archive() wasn't removing the lockfile
+
+ * src/string.c
+ fixed a memory leak after calling obfuscated_email_address()
+
+ * many files
+ Reworked the parser so that it now produces a tree that represents
+ a message to have better parsing of multipart/mixed and message/rfc822
+ messages, choosing a charset for the whole message, and, most
+ importantly, separate the identification of the logic structures
+ of a message from the generation of markup. Once a message is parsed
+ and processed, the tree will then be flattened to the structure the
+ print modules are used to, but including now markers for the beginning
+ and end of sections, etc.
+
+2023-05-16 Andy Valencia (@vandys)
+ * src/{parse.c, base64.h, base64.c}
+ The BASE64 decoder didn't take into account lines that were not
+ multiples of four and this resulted in a corrupted decode. Changed the
+ decoder so that state can be preserved between subsequent calls.
+ Closes #96
+
+2023-05-12 @shlomif
+ * README
+ Fixed spelling errors
+ PR#87
+
+2022-10-26 Jose Kahan
+ * src/getname.c
+ Remove a potential writing out of bonds issue
+
+2022-04-07 Jose Kahan
+ * src/parse.c
+ When parsing a mailbox, the code for skipping MIME epilogues wasn't
+ detecting the start of the next message. Thanks to James Riordon and
+ Christof Meerwald for reporting and pointing out where the issue was
+ (closes #82).
+
+2022-04-04 Jose Kahan
+ * src/string.c
+ We're now using iconv's transliteration flag when converting a string
+ from UTF-8 to another charset, From the man page: "this means that when
+ a character cannot be represented in the target character set, it can
+ be approximated through one or several similarly looking characters."
+
+2022-04-01 Jose Kahan
+ * src/string.c src/utf8.h
+ Integrated utf8.h to provide validation of UTF-8 strings
+
+ When i18n_convstring is called to convert from UTF-8 to UTF-8, we
+ skip the convertion, but we now replace invalid UTF-8 characters
+ with a '?' character.
+
+2022-03-30 Jose Kahan
+ * src/parse.c
+ The demimed flag was not being updated when decoding RFC2047 lines
+
+ * src/hypermail.h
+ Increase NAMESTRLEN from 80 to 320 to take into account that a single
+ UTF-8 character may be encoded in up to four bytes.
+
+ * src/string.c src/parse.c src/proto.h
+ If a header value is not using RFC2047, make sure its value consists
+ of only US-ASCII printable character plus newline.
+
+2022-01-15 Christof Meerwald
+ * src/print.c
+ Fixed a format string issue leading to a segfault or worse (fixes #81)
2021-11-17 David Hughes
* docs/hmrc.html src/parse.c
- Added support for strftime (3) formatting in the append_filename configuration
- option to allow for archived messages to be split over multiple directories
- (monthly or yearly for example)
+ Added support for strftime (3) formatting in the append_filename
+ configuration option to allow for archived messages to be split over
+ multiple directories (monthly or yearly for example)
+
+2021-11-09 Jose Kahan
+ * src/parse.c
+ MIME RFC1341 epilogues were not being ignored when they were made of
+ more than newlines
+
+2021-11-08 Jose Kahan
+ * src/print.c
+ Restoring in-reply-to and next-in-thread links to deleted messages.
+ Removing them caused confusing in the archives. One small change
+ w3t to 2.4.3: links now only display "deleted message" and not
+ "(deleted message) subject" as previously.
+
+2021-11-03 Jose Kahan
+ * src/print.c src/print.h src/hypermail.h src/parse.c src/struct.c
+ Improved the handling and displaying of message/rfc822
+ attachments (closes #72).
+
+ Rewrote parts of printbody() to improve how attachments are written
+ when using showhtml and inlinehtml options.
+
+ Encapsulating attachments within sections.
+
+2021-10-15 Jose Kahan
+ * Added the css class showhtml-body to help customize displayed
+ messages when using the showhtml option.
+
+2021-10-13 @AverageGuy
+ * Hypermail wasn't compiling under ubuntu due to the order of
+ where -lm appeared when linking libraries. (closes # 84)
+
+2021-10-11 Jose Kahan
+ * src/string.c src/proto.h src/parse.c
+ Hypermail uses C-lib functions, such as isspace() and sscanf(), that
+ don't understand unicode spaces. As a workaround, we're converting
+ those spaces to ascii ones so that the parts of hypermail that depend
+ on those functions, such as link scanning will continue to work.
+
+2021-10-01 Jose Kahan
+ * src/threadprint.c src/print.c src/lang.h
+ Improve the thread index and next in thread links. If a thread's node
+ is deleted, don't display it unless it has non-deleted children. In
+ this case, display it using MSG_DEL_SHORT for its name. Make the next
+ in thread links skip deleted nodes.
+
+2021-09-16 Jose Kahan
+ * src/print.c
+ The default MESSAGE_DELETE text was being displayed twice in deleted
+ messages, once in the header, and again in the body. This message will
+ now only be displayed in the body and is now associated with the CSS
+ class "message-deleted".
+
+2021-09-14 Jose Kahan
+ * various files
+ Replaced the few remaining calls to snprintf with trio_snprintf, a more
+ portable snprintf. Those snprint functions were supposed to be
+ trio_snprintf ones since the beginning. This was also indirectly
+ causing problems when compiling under MacOs (issue #66).
+
+2021-09-14 Jose Kahan
+ * src/struct.c src/quotes.c configure.ac src/Makefile.in pcre2/
+ Support for PCRE2. Updating shipped PCRE2 lib to upstream v10.37.
+
+2021-09-10 Jose Kahan
+ * src/Makefile.in
+ Add convert-css rule to use contrib/csstoc.pl to convert
+ ../docs/hypermail.css into printcss.c This rule must be run by hand as
+ we didn't want to tie for the moment hypermail's compilation to a
+ working install of perl
+
+ * docs/hypermail.css
+ Added the default stylesheet used by hypermail
+
+2021-09-08 Jose Kahan
+ * src/print.c src/print.h
+ If set_show_headers is configured, output headers respecting the same
+ order as they are declared in this configuration variable.
+
+ * src/setup.c
+ When using hypermail -v to print out the config options, Makeconfig()
+ was dereferencing the values using a pointer to a long, instead of
+ a pointer to an int. Even if this function could display wrong values,
+ it didn't have any incidence on how hypermail works.
+
+2021-09-07 Jose Kahan
+ * src/string.c
+ Make unrre() returN NOSUBJECT when a subject is made only of
+ one or more Re: (or equivalent) strings.
+
+ * src/parse.c
+ findre() was being too greedy and detecting all Re: strings
+ even if they were not at the beginning of a subject.
+
+ * src/setup.c src/setup.h src/print.c src/hypermail.c
+ Move all CSS statements to an external CSS file called by default
+ hypermail.css. Hypermail will generate that file if it's missing
+ and if either the index or message CSS URLs are not declared.
+ This name can be configured thru the set_hypermail_css variable.
+
+ * src/string.c
+ Very long mail subjects were not being handled correctly and could
+ result in invalid markup.
+
+ * src/hypermail.h
+ changed the link pointing to the hypermail project to the github
+ repository
+
+ * src/print.c src/printfile,c src/threadprint.c
+ updated markup to HTML5. Reviewed and enhanced the WAI related markup
+
+ * src/hypermail.c src/setup.[ch] src/print.c
+ new configuration option mhtmlnavbar2upfile to specify a specific
+ navbar for messages. By default uses the value of ihtmlnavbar2upfile
2021-06-04 Baptiste Daroussin
* src/uudecode.c src/parse.c
Fixes for memory issues detected by libasan
+2020-08-27 Jose Kahan
+ * src/string.c
+ extended parseurl() in a naive approach for supporting U+00A0
+ nonbreakable space inside sscanf. This function should eventually be
+ rewritten to use libpcre
+
2020-06-19 Jose Kahan
* src/domains.c
valid_root_domains() was validating a domain name against the
@@ -56,7 +519,8 @@ HYPERMAIL VERSION 2.4.0:
* src/parse.c
parsemail(): a Content-Transfer-Encoding header with a missing value
would result in an unitialized variable being used to output an unknown
- encoding warning message. Hypermail now skips this header if it's empty.
+ encoding warning message. Hypermail now skips this header if it's
+ empty.
2019-11-22 Jose Kahan
* src/print.c
@@ -104,51 +568,49 @@ HYPERMAIL VERSION 2.4.0:
main(): if the en_US locale is not available, try en_US.UTF-8
2018-10-11 Jose Kahan
-
* string.c
parseemail(): for some reason if a ',' char was concatenaned to an
email address, it was being parsed as part of the email username.
2018-10-10 Jose Kahan
-
* string.c
parseurl(): remove deprecated URLs. Improve support for URLs that don't
have slashes following the 'protocol:' schema. Improve support for tel:
URLs.
2018-10-09 Bill Shannon
-
* string.c
- parseurl(): non-URL text can be misinterpreted as a URL, causing segfault
- Fixes issue #39
+ parseurl(): non-URL text can be misinterpreted as a URL, causing
+ segfault Fixes issue #39
2018-10-08 Jose Kahan
-
* print.c, string.c, proto.h
- The inreplyto_command could generate invalid links if the parser interpolated the
- in-reply-to from the subject. If a message's in-reply-to is interpolated,
- hypermail won't honor it anymore for that message.
+ The inreplyto_command could generate invalid links if the parser
+ interpolated the in-reply-to from the subject. If a message's
+ in-reply-to is interpolated, hypermail won't honor it anymore for that
+ message.
2018-10-07 Jose Kahan
-
- * print.c printauthors(), printthreads(), printsubjects, printdates()
- Even if set_i18n was enabled, Indexes were written with mixed charsets
- instead of using utf-8 throughout.
+ * print.c
+ printauthors(), printthreads(), printsubjects, printdates() Even if
+ set_i18n was enabled, Indexes were written with mixed charsets instead
+ of using utf-8 throughout.
* configure.ac, Makefile.in, src/Makefile.in
If the system has a recent libpcre, compile against it instead of using
- the bundled one. This check is done by default when launching configure.
+ the bundled one. This check is done by default when launching
+ configure.
New configure options to allow to link against an external pcre library
(--with-external-pcre) or to force the build and link against the
bundled one (--enable-bundled-pcre).
New configure option to allow to compile against a system libtrio
- (--enable-system-libtrio). Contrary to libpcre, it's not possible to find the
- version of libtrio so we cannot compile automatically against it.
+ (--enable-system-libtrio). Contrary to libpcre, it's not possible to
+ find the version of libtrio so we cannot compile automatically against
+ it.
2018-10-04 Jose Kahan
-
* src/pcre
Upgraded to upstream version 8.42
@@ -156,35 +618,32 @@ HYPERMAIL VERSION 2.4.0:
Upgraded to upstream version 1.16
* parse.c
- Only use the headers charset for text/plain if its absent. If no charset
- is available in the other parts, do not add it.
+ Only use the headers charset for text/plain if its absent. If no
+ charset is available in the other parts, do not add it.
2018-10-04 Jose Kahan
-
* Updated Changelog format for entries newer than version 2.3.0
* hypermail.h, parse.c, struct.c, struct.h
Charset handling for multipart messages was being handled wrong, giving
- priority to the headers charset (if found) over that of the displayed body.
- Sometimes the last found charset was the one being used throughout in the
- generated body.
+ priority to the headers charset (if found) over that of the displayed
+ body. Sometimes the last found charset was the one being used
+ throughout in the generated body.
- The metafile for attachments was sometimes inheriting the charset of the whole
- body, even when not necessary or wrong. Now the meta doesn't include a charset
- if the attachment doesn't explicitly give one.
+ The metafile for attachments was sometimes inheriting the charset of
+ the whole body, even when not necessary or wrong. Now the meta doesn't
+ include a charset if the attachment doesn't explicitly give one.
* parse.c
- References header was processed multiple times as it was not being marked as parsed
- after being processed.
- The epilogue of MIME parts was not being ignored.
+ References header was processed multiple times as it was not being
+ marked as parsed after being processed. The epilogue of MIME parts was
+ not being ignored.
2018-06-19 Jose Kahan
-
* Changed mispelled configuration option warn_surpressions to the
correct spelling warn_suppressions.
2018-06-14 Jose Kahan
-
* Hypermail would segfault or have an incorrect thread view if it was
handling an archive with a message (msg1) that was a reply to a message
not in the archive, if msg1 had a reply to it in the archive (msg2),
@@ -192,7 +651,6 @@ HYPERMAIL VERSION 2.4.0:
subject (regardless of Re: prefixes).
2018-06-07 Bill Shannon
-
* Add charset alias for Thai and Chinese
* The markup for access key "j" to jump to the start of a message was
@@ -211,22 +669,18 @@ HYPERMAIL VERSION 2.4.0:
segfault because of a null pointer
2015-04-03 Ivan Kuraj
-
* Correct includes for new glibc
2013-06-10 Jose Kahan
-
* Even if a message was annotated as spam/deleted, its Attachments were
still being created
2013-04-18 Jose Kahan
-
* Removed commented out code in printfile.c.
* Added missing ';' in generated css rules in the same file
2013-04-11 Jose Kahan
-
* Extended the configure options so that a user can decide if hypermail
should be compiled and statically linked against the bundled pcre lib
or if it should be dynamically linked with an external (or system) pcre
@@ -241,44 +695,37 @@ HYPERMAIL VERSION 2.4.0:
* The make clean in libfnv wasn't removing the libfnv.a file
2013-03-29 Jose Kahan
-
* Updated configure to latest autoconf syntax conventions.
* Renamed configure.in to configure.ac and cleaned it up partially.
2013-03-20 Jose Kahan
-
* Updated pcre to pcre-8.32 from pcre-4.3. This may have broken the
Windows lcc compilation but I don't have the means to verify it.
2013-03-15 Jose Kahan
-
* Updated trio code to trio version 1.14. Moved all the trio code to
src/trio. Now compiling trio as a static library and linking against
it, which makes binary a bit smaller. See src/trio/README.hypermail for
details.
2013-03-12 Jose Kahan
-
* New experimental support for RFC 3676 format=flowed. There are two
new related configuration options: format_flowed to enable it and
format_flowed_disable_quotes to disable it in specific cases. See the
documentation and the RFC for further info.
2013-03-08 Jose Kahan
-
* Error: string.c:parseurl() assumes that all URL motifs it can match
end with a :// string. However, the URL match table it uses included
some URL motifs that didn't have that string. These have been commented
as they may cause parseulr to SIGSEVs in some cases.
2013-02-26 Jose Kahan
-
* New configuration option, noindex_onindexes, for associating a
"noindex" robot metadata value with hypermail generated indexes.
2013-02-26 Jose Kahan
-
* New configuration option, userobotmeta, for Associatating robot
annotations with attachments, using the experimental X-Robots-Tag HTTP
header
@@ -291,7 +738,6 @@ HYPERMAIL VERSION 2.4.0:
option says we're not to preserve the original message body.
2013-01-30 Jose Kahan
-
* Migrated source code repository from cvs.hypermail.org to
http://sourceforge.net/projects/hypermail/
diff --git a/FILES b/FILES
index c89be6cd..16a81174 100644
--- a/FILES
+++ b/FILES
@@ -1,12 +1,14 @@
#
# FILES: Automatically generated by mkFILES:
-# - Wed Mar 20 19:50:32 CET 2013
+# - Fri Oct 15 18:19:15 CET 2021
#
##################
# Top-level files
#
Changelog
COPYING
+LICENSE.txt
+RELATED_LICENSES.txt
KNOWN_BUGS
FILES
INSTALL
@@ -14,7 +16,8 @@ Makefile.in
README
TODO
UPGRADE
-acconfig.h
+RELEASE_NOTES
+ROADMAP
aclocal.m4
config.guess
config.h.in
@@ -25,7 +28,11 @@ install-sh
ltmain.sh
maketgz
patchlevel.h
-#
+#
+# - m4 macros
+#
+m4/apr.m4
+#
# - Archive directory files
#
archive/.indent.pro
@@ -47,7 +54,7 @@ configs/hypermail-msg.hyp
configs/hypermail.rc
#
# - Contributed utilities
-#
+#
contrib/hoaf-28/haof-0.1.dtd
contrib/hoaf-28/README
contrib/hoaf-28/collect_snipplets.py
@@ -57,6 +64,7 @@ contrib/hoaf-28/hypermail-2b28-2b28+.patch
contrib/hoaf-28/top_html.hdr
contrib/canonicalize.pl
contrib/cron_hypermail
+contrib/css_to_c.pl
contrib/fixhtime.pl
contrib/hyperfeed.pl
contrib/hypetombox.pl
@@ -76,13 +84,14 @@ docs/attachments.txt
docs/customizing.html
docs/hmrc.4
docs/hmrc.html
-docs/hr.yellow.png
-docs/hypermail-faq.html
+docs/faq.html
docs/hypermail.1
+docs/hypermail.css
docs/hypermail.html
docs/hypermail.png
+docs/hypermail-doc.css
docs/index_hypermail.txt
-docs/stars.png
+docs/thanks.html
#
# - LCC-Win32 Build Support
#
@@ -97,24 +106,7 @@ lcc/getdate.c
lcc/hypermail_files.txt
lcc/lcc_extras.c
lcc/lcc_extras.h
-lcc/pcre.h
-#
-# libcgi - mail suport lib
-#
-libcgi/.indent.pro
-libcgi/Makefile.in
-libcgi/cgi.h
-libcgi/form_ent.c
-libcgi/form_tags.c
-libcgi/get_cgi_info.c
-libcgi/html.c
-libcgi/libcgi.html
-libcgi/main.c
-libcgi/mcode.c
-libcgi/strops.c
-libcgi/syn_mime.c
-libcgi/syn_url.c
-libcgi/template.c
+lcc/pcre2.h
#
# - Hypermail source
#
@@ -142,12 +134,12 @@ src/hypermail.h
src/lang.c
src/lang.h
src/lock.c
-src/mail.c
src/mem.c
src/parse.c
src/parse.h
src/print.c
src/print.h
+src/printcss.c
src/printfile.c
src/printfile.h
src/proto.h
@@ -164,386 +156,424 @@ src/threadprint.h
src/txt2html.c
src/txt2html.h
src/uconvert.h
+src/utf8.h
src/uudecode.c
src/uudecode.h
#
-# - Source to pcre supporting library
-#
-src/pcre
-src/pcre/pcre_dfa_exec.c
-src/pcre/PrepareRelease
-src/pcre/pcre32_jit_compile.c
-src/pcre/pcre_ord2utf8.c
-src/pcre/pcre_maketables.c
-src/pcre/makevp.bat
-src/pcre/config.h.in
-src/pcre/pcre32_byte_order.c
-src/pcre/pcre_newline.c
-src/pcre/compile
-src/pcre/pcre32_printint.c
-src/pcre/pcre.h.generic
-src/pcre/pcre32_ord2utf32.c
-src/pcre/pcre32_fullinfo.c
-src/pcre/pcre16_valid_utf16.c
-src/pcre/pcre_study.c
-src/pcre/sljit
-src/pcre/sljit/sljitNativeTILEGX-encoder.c
-src/pcre/sljit/sljitNativeMIPS_32.c
-src/pcre/sljit/sljitNativeARM_T2_32.c
-src/pcre/sljit/sljitUtils.c
-src/pcre/sljit/sljitNativeMIPS_common.c
-src/pcre/sljit/sljitNativePPC_64.c
-src/pcre/sljit/sljitLir.c
-src/pcre/sljit/sljitNativeX86_32.c
-src/pcre/sljit/sljitLir.h
-src/pcre/sljit/sljitNativeTILEGX_64.c
-src/pcre/sljit/sljitNativeX86_64.c
-src/pcre/sljit/sljitNativeSPARC_common.c
-src/pcre/sljit/sljitNativePPC_32.c
-src/pcre/sljit/sljitConfigInternal.h
-src/pcre/sljit/sljitExecAllocator.c
-src/pcre/sljit/sljitConfig.h
-src/pcre/sljit/sljitNativePPC_common.c
-src/pcre/sljit/sljitNativeARM_32.c
-src/pcre/sljit/sljitNativeSPARC_32.c
-src/pcre/sljit/sljitNativeX86_common.c
-src/pcre/sljit/sljitNativeMIPS_64.c
-src/pcre/sljit/sljitNativeARM_64.c
-src/pcre/pcre16_tables.c
-src/pcre/pcre_tables.c
-src/pcre/pcre32_string_utils.c
-src/pcre/pcre_stringpiece.h.in
-src/pcre/libpcre16.pc.in
-src/pcre/pcreposix.c
-src/pcre/pcre32_config.c
-src/pcre/pcre_printint.c
-src/pcre/pcre_jit_test.c
-src/pcre/pcre16_newline.c
-src/pcre/CMakeLists.txt
-src/pcre/CheckMan
-src/pcre/pcreposix.h
-src/pcre/pcre16_refcount.c
-src/pcre/Makefile.in
-src/pcre/config.sub
-src/pcre/pcre32_ucd.c
-src/pcre/pcre16_version.c
-src/pcre/makevp_l.txt
-src/pcre/pcre32_valid_utf32.c
-src/pcre/pcre16_study.c
-src/pcre/pcre16_exec.c
-src/pcre/COPYING
-src/pcre/pcre16_ord2utf16.c
-src/pcre/pcre_valid_utf8.c
-src/pcre/pcre32_version.c
-src/pcre/AUTHORS
-src/pcre/pcre16_jit_compile.c
-src/pcre/depcomp
-src/pcre/pcre_stringpiece.cc
-src/pcre/pcre16_dfa_exec.c
-src/pcre/HACKING
-src/pcre/pcre32_get.c
-src/pcre/pcre32_newline.c
-src/pcre/pcre16_config.c
-src/pcre/pcre16_string_utils.c
-src/pcre/pcre32_exec.c
-src/pcre/pcre_xclass.c
-src/pcre/pcre_exec.c
-src/pcre/makevp_c.txt
-src/pcre/m4
-src/pcre/m4/pcre_visibility.m4
-src/pcre/m4/ltversion.m4
-src/pcre/m4/ltsugar.m4
-src/pcre/m4/ax_pthread.m4
-src/pcre/m4/lt~obsolete.m4
-src/pcre/m4/ltoptions.m4
-src/pcre/m4/libtool.m4
-src/pcre/pcregexp.pas
-src/pcre/cmake
-src/pcre/cmake/COPYING-CMAKE-SCRIPTS
-src/pcre/cmake/FindPackageHandleStandardArgs.cmake
-src/pcre/cmake/FindEditline.cmake
-src/pcre/cmake/FindReadline.cmake
-src/pcre/pcre_ucd.c
-src/pcre/missing
-src/pcre/pcre32_dfa_exec.c
-src/pcre/pcre_scanner_unittest.cc
-src/pcre/LICENCE
-src/pcre/configure
-src/pcre/pcre_compile.c
-src/pcre/ucp.h
-src/pcre/pcretest.c
-src/pcre/INSTALL
-src/pcre/pcre32_globals.c
-src/pcre/pcre16_printint.c
-src/pcre/config.guess
-src/pcre/pcre16_globals.c
-src/pcre/libpcre32.pc.in
-src/pcre/CleanTxt
-src/pcre/testdata
-src/pcre/testdata/testinput5
-src/pcre/testdata/testoutput5
-src/pcre/testdata/saved8
-src/pcre/testdata/grepfilelist
-src/pcre/testdata/testoutput20
-src/pcre/testdata/testoutput3A
-src/pcre/testdata/testoutput26
-src/pcre/testdata/testoutput16
-src/pcre/testdata/testinput10
-src/pcre/testdata/saved16
-src/pcre/testdata/greplist
-src/pcre/testdata/testoutput4
-src/pcre/testdata/testinput21
-src/pcre/testdata/testinput25
-src/pcre/testdata/testoutput21-16
-src/pcre/testdata/testoutput12
-src/pcre/testdata/saved32BE-1
-src/pcre/testdata/grepoutput
-src/pcre/testdata/saved32
-src/pcre/testdata/testinput23
-src/pcre/testdata/testoutput15
-src/pcre/testdata/testinput24
-src/pcre/testdata/testoutput11-8
-src/pcre/testdata/grepinput
-src/pcre/testdata/saved16BE-1
-src/pcre/testdata/testinput3
-src/pcre/testdata/saved32BE-2
-src/pcre/testdata/testinput20
-src/pcre/testdata/testinput15
-src/pcre/testdata/testinputEBC
-src/pcre/testdata/testinput17
-src/pcre/testdata/testoutput22-16
-src/pcre/testdata/testoutput25
-src/pcre/testdata/wintestoutput3
-src/pcre/testdata/testinput7
-src/pcre/testdata/testoutput11-32
-src/pcre/testdata/grepinput8
-src/pcre/testdata/saved32LE-1
-src/pcre/testdata/testoutput23
-src/pcre/testdata/testoutput18-16
-src/pcre/testdata/wintestinput3
-src/pcre/testdata/testinput11
-src/pcre/testdata/testoutputEBC
-src/pcre/testdata/saved16LE-2
-src/pcre/testdata/testinput1
-src/pcre/testdata/saved16LE-1
-src/pcre/testdata/grepinputx
-src/pcre/testdata/grepoutput8
-src/pcre/testdata/testoutput24
-src/pcre/testdata/testoutput19
-src/pcre/testdata/testoutput6
-src/pcre/testdata/testinput9
-src/pcre/testdata/testoutput3B
-src/pcre/testdata/grepbinary
-src/pcre/testdata/grepinputv
-src/pcre/testdata/testoutput14
-src/pcre/testdata/testinput8
-src/pcre/testdata/testinput6
-src/pcre/testdata/testoutput21-32
-src/pcre/testdata/testinput13
-src/pcre/testdata/testoutput17
-src/pcre/testdata/testinput2
-src/pcre/testdata/testoutput18-32
-src/pcre/testdata/testinput16
-src/pcre/testdata/testoutput8
-src/pcre/testdata/valgrind-jit.supp
-src/pcre/testdata/grepoutputN
-src/pcre/testdata/testoutput7
-src/pcre/testdata/testoutput3
-src/pcre/testdata/testoutput1
-src/pcre/testdata/testoutput2
-src/pcre/testdata/testoutput22-32
-src/pcre/testdata/greppatN4
-src/pcre/testdata/testinput14
-src/pcre/testdata/testinput18
-src/pcre/testdata/testoutput10
-src/pcre/testdata/testoutput11-16
-src/pcre/testdata/saved16BE-2
-src/pcre/testdata/saved32LE-2
-src/pcre/testdata/testinput22
-src/pcre/testdata/testinput19
-src/pcre/testdata/grepinput3
-src/pcre/testdata/testinput4
-src/pcre/testdata/testoutput9
-src/pcre/testdata/testoutput13
-src/pcre/testdata/testinput12
-src/pcre/testdata/testinput26
-src/pcre/pcre32_study.c
-src/pcre/aclocal.m4
-src/pcre/pcre32_refcount.c
-src/pcre/pcre_stringpiece_unittest.cc
-src/pcre/pcre_jit_compile.c
-src/pcre/test-driver
-src/pcre/pcre32_compile.c
-src/pcre/ChangeLog
-src/pcre/pcre_globals.c
-src/pcre/Detrail
-src/pcre/pcre_string_utils.c
-src/pcre/pcre32_maketables.c
-src/pcre/pcre_chartables.c.dist
-src/pcre/libpcrecpp.pc.in
-src/pcre/pcre32_xclass.c
-src/pcre/dftables.c
-src/pcre/pcredemo.c
-src/pcre/config-cmake.h.in
-src/pcre/pcrecpparg.h.in
-src/pcre/config.h.generic
-src/pcre/RunGrepTest
-src/pcre/pcre32_utf32_utils.c
-src/pcre/pcre_internal.h
-src/pcre/ar-lib
-src/pcre/ltmain.sh
-src/pcre/pcre16_xclass.c
-src/pcre/pcre16_maketables.c
-src/pcre/pcre_fullinfo.c
-src/pcre/configure.ac
-src/pcre/132html
-src/pcre/pcre_get.c
-src/pcre/pcre16_fullinfo.c
-src/pcre/NEWS
-src/pcre/pcre16_ucd.c
-src/pcre/pcre_scanner.h
-src/pcre/pcregrep.c
-src/pcre/libpcreposix.pc.in
-src/pcre/pcre32_chartables.c
-src/pcre/pcre32_tables.c
-src/pcre/pcre_version.c
-src/pcre/pcre-config.in
-src/pcre/pcre16_chartables.c
-src/pcre/perltest.pl
-src/pcre/pcrecpp_internal.h
-src/pcre/libpcre.pc.in
-src/pcre/pcrecpp.h
-src/pcre/pcrecpp_unittest.cc
-src/pcre/pcre16_get.c
-src/pcre/pcre16_utf16_utils.c
-src/pcre/Makefile.am
-src/pcre/pcrecpp.cc
-src/pcre/pcre16_byte_order.c
-src/pcre/README
-src/pcre/pcre_scanner.cc
-src/pcre/NON-AUTOTOOLS-BUILD
-src/pcre/pcre_config.c
-src/pcre/pcre_byte_order.c
-src/pcre/RunTest.bat
-src/pcre/pcre.h.in
-src/pcre/NON-UNIX-USE
-src/pcre/doc
-src/pcre/doc/pcrebuild.3
-src/pcre/doc/pcre_get_substring_list.3
-src/pcre/doc/pcre_free_study.3
-src/pcre/doc/pcrelimits.3
-src/pcre/doc/pcre_get_stringnumber.3
-src/pcre/doc/pcre_jit_exec.3
-src/pcre/doc/pcre16.3
-src/pcre/doc/pcre-config.txt
-src/pcre/doc/perltest.txt
-src/pcre/doc/pcretest.1
-src/pcre/doc/pcrematching.3
-src/pcre/doc/pcre_jit_stack_alloc.3
-src/pcre/doc/pcreprecompile.3
-src/pcre/doc/pcre_dfa_exec.3
-src/pcre/doc/pcre_pattern_to_host_byte_order.3
-src/pcre/doc/pcre_compile.3
-src/pcre/doc/pcredemo.3
-src/pcre/doc/pcre_utf16_to_host_byte_order.3
-src/pcre/doc/pcre_study.3
-src/pcre/doc/pcrecallout.3
-src/pcre/doc/pcre_version.3
-src/pcre/doc/pcre_utf32_to_host_byte_order.3
-src/pcre/doc/pcre_jit_stack_free.3
-src/pcre/doc/pcrecpp.3
-src/pcre/doc/pcregrep.1
-src/pcre/doc/pcre_assign_jit_stack.3
-src/pcre/doc/pcre_exec.3
-src/pcre/doc/pcre-config.1
-src/pcre/doc/pcrepattern.3
-src/pcre/doc/pcre_get_stringtable_entries.3
-src/pcre/doc/pcre_free_substring.3
-src/pcre/doc/pcre_get_substring.3
-src/pcre/doc/pcrepartial.3
-src/pcre/doc/pcre.3
-src/pcre/doc/pcreunicode.3
-src/pcre/doc/pcretest.txt
-src/pcre/doc/pcre_copy_named_substring.3
-src/pcre/doc/pcre_maketables.3
-src/pcre/doc/pcreapi.3
-src/pcre/doc/pcre.txt
-src/pcre/doc/pcre_copy_substring.3
-src/pcre/doc/pcre_config.3
-src/pcre/doc/pcre32.3
-src/pcre/doc/pcrestack.3
-src/pcre/doc/pcre_compile2.3
-src/pcre/doc/pcrecompat.3
-src/pcre/doc/pcreposix.3
-src/pcre/doc/pcre_refcount.3
-src/pcre/doc/pcre_fullinfo.3
-src/pcre/doc/pcregrep.txt
-src/pcre/doc/pcresample.3
-src/pcre/doc/pcresyntax.3
-src/pcre/doc/pcre_get_named_substring.3
-src/pcre/doc/index.html.src
-src/pcre/doc/pcrejit.3
-src/pcre/doc/html
-src/pcre/doc/html/pcre_free_substring_list.html
-src/pcre/doc/html/pcre_assign_jit_stack.html
-src/pcre/doc/html/pcre_config.html
-src/pcre/doc/html/pcre16.html
-src/pcre/doc/html/pcrelimits.html
-src/pcre/doc/html/pcrejit.html
-src/pcre/doc/html/pcre-config.html
-src/pcre/doc/html/pcre_jit_exec.html
-src/pcre/doc/html/pcre_refcount.html
-src/pcre/doc/html/pcrepartial.html
-src/pcre/doc/html/pcreunicode.html
-src/pcre/doc/html/index.html
-src/pcre/doc/html/pcre_exec.html
-src/pcre/doc/html/pcre_fullinfo.html
-src/pcre/doc/html/pcrecompat.html
-src/pcre/doc/html/pcreapi.html
-src/pcre/doc/html/pcre_get_stringnumber.html
-src/pcre/doc/html/pcre_get_substring.html
-src/pcre/doc/html/pcrecpp.html
-src/pcre/doc/html/pcrecallout.html
-src/pcre/doc/html/pcre_free_study.html
-src/pcre/doc/html/pcre_pattern_to_host_byte_order.html
-src/pcre/doc/html/pcreprecompile.html
-src/pcre/doc/html/NON-AUTOTOOLS-BUILD.txt
-src/pcre/doc/html/pcrematching.html
-src/pcre/doc/html/pcre_get_stringtable_entries.html
-src/pcre/doc/html/pcre_jit_stack_alloc.html
-src/pcre/doc/html/pcre_free_substring.html
-src/pcre/doc/html/pcre_version.html
-src/pcre/doc/html/pcresyntax.html
-src/pcre/doc/html/pcre_jit_stack_free.html
-src/pcre/doc/html/pcretest.html
-src/pcre/doc/html/pcre_utf16_to_host_byte_order.html
-src/pcre/doc/html/pcre_maketables.html
-src/pcre/doc/html/pcrestack.html
-src/pcre/doc/html/pcre_copy_substring.html
-src/pcre/doc/html/pcreposix.html
-src/pcre/doc/html/README.txt
-src/pcre/doc/html/pcrepattern.html
-src/pcre/doc/html/pcre_get_named_substring.html
-src/pcre/doc/html/pcrebuild.html
-src/pcre/doc/html/pcresample.html
-src/pcre/doc/html/pcre.html
-src/pcre/doc/html/pcre_study.html
-src/pcre/doc/html/pcre_copy_named_substring.html
-src/pcre/doc/html/pcre_compile.html
-src/pcre/doc/html/pcre_compile2.html
-src/pcre/doc/html/pcregrep.html
-src/pcre/doc/html/pcre32.html
-src/pcre/doc/html/pcre_utf32_to_host_byte_order.html
-src/pcre/doc/html/pcredemo.html
-src/pcre/doc/html/pcre_get_substring_list.html
-src/pcre/doc/html/pcre_dfa_exec.html
-src/pcre/doc/html/pcreperform.html
-src/pcre/doc/pcreperform.3
-src/pcre/doc/pcre_free_substring_list.3
-src/pcre/pcre_refcount.c
-src/pcre/pcre16_compile.c
-src/pcre/install-sh
-src/pcre/RunTest
+# - Source to pcre2 supporting library
+#
+src/pcre2
+src/pcre2/PrepareRelease
+src/pcre2/libpcre2-posix.pc.in
+src/pcre2/compile
+src/pcre2/pcre2-config.in
+src/pcre2/CMakeLists.txt
+src/pcre2/CheckMan
+src/pcre2/Makefile.in
+src/pcre2/config.sub
+src/pcre2/COPYING
+src/pcre2/RunGrepTest.bat
+src/pcre2/AUTHORS
+src/pcre2/depcomp
+src/pcre2/HACKING
+src/pcre2/perltest.sh
+src/pcre2/libpcre2-16.pc.in
+src/pcre2/m4
+src/pcre2/m4/ltversion.m4
+src/pcre2/m4/ltsugar.m4
+src/pcre2/m4/pcre2_visibility.m4
+src/pcre2/m4/ax_pthread.m4
+src/pcre2/m4/lt~obsolete.m4
+src/pcre2/m4/ltoptions.m4
+src/pcre2/m4/libtool.m4
+src/pcre2/cmake
+src/pcre2/cmake/COPYING-CMAKE-SCRIPTS
+src/pcre2/cmake/FindPackageHandleStandardArgs.cmake
+src/pcre2/cmake/FindEditline.cmake
+src/pcre2/cmake/FindReadline.cmake
+src/pcre2/missing
+src/pcre2/LICENCE
+src/pcre2/configure
+src/pcre2/INSTALL
+src/pcre2/config.guess
+src/pcre2/CleanTxt
+src/pcre2/testdata
+src/pcre2/testdata/testinput5
+src/pcre2/testdata/testoutput5
+src/pcre2/testdata/grepfilelist
+src/pcre2/testdata/testoutput20
+src/pcre2/testdata/testoutput3A
+src/pcre2/testdata/testoutput22-8
+src/pcre2/testdata/testoutput16
+src/pcre2/testdata/testinput10
+src/pcre2/testdata/testoutput8-16-3
+src/pcre2/testdata/greplist
+src/pcre2/testdata/testoutput4
+src/pcre2/testdata/testinput21
+src/pcre2/testdata/testinput25
+src/pcre2/testdata/testoutput8-8-3
+src/pcre2/testdata/testbtables
+src/pcre2/testdata/grepoutput
+src/pcre2/testdata/testinput23
+src/pcre2/testdata/testoutput14-32
+src/pcre2/testdata/testoutput15
+src/pcre2/testdata/testoutput12-32
+src/pcre2/testdata/testinput24
+src/pcre2/testdata/grepinputM
+src/pcre2/testdata/testoutput12-16
+src/pcre2/testdata/grepinput
+src/pcre2/testdata/testinput3
+src/pcre2/testdata/testoutput8-8-2
+src/pcre2/testdata/testoutput18
+src/pcre2/testdata/grepoutputCN
+src/pcre2/testdata/testinput20
+src/pcre2/testdata/testoutput21
+src/pcre2/testdata/testinput15
+src/pcre2/testdata/testinputEBC
+src/pcre2/testdata/testinput17
+src/pcre2/testdata/testoutput22-16
+src/pcre2/testdata/testoutput25
+src/pcre2/testdata/wintestoutput3
+src/pcre2/testdata/testinput7
+src/pcre2/testdata/testoutput8-16-2
+src/pcre2/testdata/testoutput11-32
+src/pcre2/testdata/testoutput8-32-3
+src/pcre2/testdata/grepinput8
+src/pcre2/testdata/testoutput23
+src/pcre2/testdata/wintestinput3
+src/pcre2/testdata/testinput11
+src/pcre2/testdata/testoutputEBC
+src/pcre2/testdata/testinput1
+src/pcre2/testdata/grepinputx
+src/pcre2/testdata/grepoutput8
+src/pcre2/testdata/testoutput14-8
+src/pcre2/testdata/testoutput24
+src/pcre2/testdata/testoutput19
+src/pcre2/testdata/testoutput6
+src/pcre2/testdata/testinput9
+src/pcre2/testdata/testoutput3B
+src/pcre2/testdata/testoutput8-32-2
+src/pcre2/testdata/grepbinary
+src/pcre2/testdata/grepinputv
+src/pcre2/testdata/testoutput14-16
+src/pcre2/testdata/testinput8
+src/pcre2/testdata/testinput6
+src/pcre2/testdata/testoutput8-16-4
+src/pcre2/testdata/testinput13
+src/pcre2/testdata/testoutput17
+src/pcre2/testdata/testinput2
+src/pcre2/testdata/testinput16
+src/pcre2/testdata/testoutput8-8-4
+src/pcre2/testdata/valgrind-jit.supp
+src/pcre2/testdata/testoutput8-32-4
+src/pcre2/testdata/grepoutputN
+src/pcre2/testdata/testoutput7
+src/pcre2/testdata/testoutput3
+src/pcre2/testdata/testoutput1
+src/pcre2/testdata/testoutput2
+src/pcre2/testdata/testoutput22-32
+src/pcre2/testdata/greppatN4
+src/pcre2/testdata/testinput14
+src/pcre2/testdata/testinput18
+src/pcre2/testdata/testoutput10
+src/pcre2/testdata/grepoutputC
+src/pcre2/testdata/testoutput11-16
+src/pcre2/testdata/testinput22
+src/pcre2/testdata/testinput19
+src/pcre2/testdata/grepinput3
+src/pcre2/testdata/testinput4
+src/pcre2/testdata/testoutput9
+src/pcre2/testdata/testoutput13
+src/pcre2/testdata/testinput12
+src/pcre2/aclocal.m4
+src/pcre2/test-driver
+src/pcre2/ChangeLog
+src/pcre2/Detrail
+src/pcre2/config-cmake.h.in
+src/pcre2/RunGrepTest
+src/pcre2/ar-lib
+src/pcre2/ltmain.sh
+src/pcre2/configure.ac
+src/pcre2/132html
+src/pcre2/libpcre2-8.pc.in
+src/pcre2/NEWS
+src/pcre2/Makefile.am
+src/pcre2/libpcre2-32.pc.in
+src/pcre2/README
+src/pcre2/NON-AUTOTOOLS-BUILD
+src/pcre2/RunTest.bat
+src/pcre2/doc
+src/pcre2/doc/pcre2_code_free.3
+src/pcre2/doc/pcre2_substring_length_byname.3
+src/pcre2/doc/pcre2convert.3
+src/pcre2/doc/pcre2jit.3
+src/pcre2/doc/pcre2_get_match_data_size.3
+src/pcre2/doc/pcre2_set_parens_nest_limit.3
+src/pcre2/doc/pcre2_get_error_message.3
+src/pcre2/doc/pcre2_match_context_copy.3
+src/pcre2/doc/pcre2_converted_pattern_free.3
+src/pcre2/doc/pcre2_substring_get_byname.3
+src/pcre2/doc/pcre2_dfa_match.3
+src/pcre2/doc/pcre2_substitute.3
+src/pcre2/doc/pcre2posix.3
+src/pcre2/doc/pcre2_set_bsr.3
+src/pcre2/doc/pcre2_jit_stack_free.3
+src/pcre2/doc/pcre2_convert_context_create.3
+src/pcre2/doc/pcre2_get_ovector_pointer.3
+src/pcre2/doc/pcre2pattern.3
+src/pcre2/doc/pcre2_substring_list_get.3
+src/pcre2/doc/pcre2_substring_nametable_scan.3
+src/pcre2/doc/pcre2syntax.3
+src/pcre2/doc/pcre2_match.3
+src/pcre2/doc/pcre2_config.3
+src/pcre2/doc/pcre2test.1
+src/pcre2/doc/pcre2.3
+src/pcre2/doc/pcre2_match_data_free.3
+src/pcre2/doc/pcre2-config.txt
+src/pcre2/doc/pcre2_general_context_free.3
+src/pcre2/doc/pcre2_compile_context_free.3
+src/pcre2/doc/pcre2build.3
+src/pcre2/doc/pcre2_substring_number_from_name.3
+src/pcre2/doc/pcre2_set_newline.3
+src/pcre2/doc/pcre2_substring_free.3
+src/pcre2/doc/pcre2_serialize_free.3
+src/pcre2/doc/pcre2matching.3
+src/pcre2/doc/pcre2_match_context_create.3
+src/pcre2/doc/pcre2_set_compile_extra_options.3
+src/pcre2/doc/pcre2_set_callout.3
+src/pcre2/doc/pcre2_get_ovector_count.3
+src/pcre2/doc/pcre2_jit_match.3
+src/pcre2/doc/pcre2serialize.3
+src/pcre2/doc/pcre2_pattern_info.3
+src/pcre2/doc/pcre2_set_depth_limit.3
+src/pcre2/doc/pcre2_substring_list_free.3
+src/pcre2/doc/pcre2test.txt
+src/pcre2/doc/pcre2demo.3
+src/pcre2/doc/pcre2_set_recursion_limit.3
+src/pcre2/doc/pcre2_get_startchar.3
+src/pcre2/doc/pcre2-config.1
+src/pcre2/doc/pcre2_convert_context_free.3
+src/pcre2/doc/pcre2_set_glob_escape.3
+src/pcre2/doc/pcre2_substring_length_bynumber.3
+src/pcre2/doc/pcre2_set_match_limit.3
+src/pcre2/doc/pcre2_serialize_decode.3
+src/pcre2/doc/pcre2_compile_context_copy.3
+src/pcre2/doc/pcre2unicode.3
+src/pcre2/doc/pcre2_set_recursion_memory_management.3
+src/pcre2/doc/pcre2_set_offset_limit.3
+src/pcre2/doc/pcre2_jit_compile.3
+src/pcre2/doc/pcre2grep.txt
+src/pcre2/doc/pcre2compat.3
+src/pcre2/doc/pcre2_general_context_copy.3
+src/pcre2/doc/pcre2_match_context_free.3
+src/pcre2/doc/pcre2_jit_free_unused_memory.3
+src/pcre2/doc/pcre2_maketables_free.3
+src/pcre2/doc/pcre2_set_compile_recursion_guard.3
+src/pcre2/doc/pcre2.txt
+src/pcre2/doc/pcre2_callout_enumerate.3
+src/pcre2/doc/pcre2_get_mark.3
+src/pcre2/doc/pcre2_set_heap_limit.3
+src/pcre2/doc/pcre2_serialize_get_number_of_codes.3
+src/pcre2/doc/pcre2_convert_context_copy.3
+src/pcre2/doc/pcre2_match_data_create_from_pattern.3
+src/pcre2/doc/pcre2limits.3
+src/pcre2/doc/pcre2_compile.3
+src/pcre2/doc/pcre2_jit_stack_assign.3
+src/pcre2/doc/pcre2_general_context_create.3
+src/pcre2/doc/pcre2_pattern_convert.3
+src/pcre2/doc/pcre2_match_data_create.3
+src/pcre2/doc/pcre2_set_max_pattern_length.3
+src/pcre2/doc/pcre2_serialize_encode.3
+src/pcre2/doc/pcre2perform.3
+src/pcre2/doc/pcre2_code_copy.3
+src/pcre2/doc/pcre2_set_glob_separator.3
+src/pcre2/doc/pcre2_jit_stack_create.3
+src/pcre2/doc/pcre2_code_copy_with_tables.3
+src/pcre2/doc/pcre2partial.3
+src/pcre2/doc/pcre2_maketables.3
+src/pcre2/doc/pcre2_set_character_tables.3
+src/pcre2/doc/pcre2_substring_get_bynumber.3
+src/pcre2/doc/pcre2_compile_context_create.3
+src/pcre2/doc/pcre2_set_substitute_callout.3
+src/pcre2/doc/pcre2sample.3
+src/pcre2/doc/pcre2_substring_copy_bynumber.3
+src/pcre2/doc/index.html.src
+src/pcre2/doc/pcre2api.3
+src/pcre2/doc/pcre2callout.3
+src/pcre2/doc/html
+src/pcre2/doc/html/pcre2_jit_stack_assign.html
+src/pcre2/doc/html/pcre2_code_copy.html
+src/pcre2/doc/html/pcre2_set_bsr.html
+src/pcre2/doc/html/pcre2build.html
+src/pcre2/doc/html/pcre2_serialize_encode.html
+src/pcre2/doc/html/pcre2_maketables_free.html
+src/pcre2/doc/html/pcre2_set_newline.html
+src/pcre2/doc/html/pcre2compat.html
+src/pcre2/doc/html/pcre2_convert_context_free.html
+src/pcre2/doc/html/pcre2_match_context_free.html
+src/pcre2/doc/html/pcre2_callout_enumerate.html
+src/pcre2/doc/html/pcre2_substring_get_bynumber.html
+src/pcre2/doc/html/pcre2_compile_context_copy.html
+src/pcre2/doc/html/pcre2_substring_number_from_name.html
+src/pcre2/doc/html/pcre2partial.html
+src/pcre2/doc/html/pcre2convert.html
+src/pcre2/doc/html/pcre2_set_recursion_memory_management.html
+src/pcre2/doc/html/pcre2_get_mark.html
+src/pcre2/doc/html/pcre2_compile.html
+src/pcre2/doc/html/pcre2_general_context_create.html
+src/pcre2/doc/html/pcre2_substring_list_free.html
+src/pcre2/doc/html/pcre2_maketables.html
+src/pcre2/doc/html/pcre2_match_data_create_from_pattern.html
+src/pcre2/doc/html/index.html
+src/pcre2/doc/html/pcre2_set_substitute_callout.html
+src/pcre2/doc/html/pcre2_substring_nametable_scan.html
+src/pcre2/doc/html/pcre2api.html
+src/pcre2/doc/html/pcre2_pattern_convert.html
+src/pcre2/doc/html/pcre2_substring_free.html
+src/pcre2/doc/html/pcre2limits.html
+src/pcre2/doc/html/pcre2_compile_context_create.html
+src/pcre2/doc/html/pcre2_set_parens_nest_limit.html
+src/pcre2/doc/html/pcre2pattern.html
+src/pcre2/doc/html/pcre2_set_recursion_limit.html
+src/pcre2/doc/html/pcre2_code_copy_with_tables.html
+src/pcre2/doc/html/pcre2callout.html
+src/pcre2/doc/html/pcre2_substring_copy_bynumber.html
+src/pcre2/doc/html/pcre2_set_depth_limit.html
+src/pcre2/doc/html/pcre2perform.html
+src/pcre2/doc/html/NON-AUTOTOOLS-BUILD.txt
+src/pcre2/doc/html/pcre2_set_max_pattern_length.html
+src/pcre2/doc/html/pcre2_substring_length_bynumber.html
+src/pcre2/doc/html/pcre2_get_match_data_size.html
+src/pcre2/doc/html/pcre2_jit_stack_free.html
+src/pcre2/doc/html/pcre2_match_data_free.html
+src/pcre2/doc/html/pcre2_set_glob_separator.html
+src/pcre2/doc/html/pcre2_set_callout.html
+src/pcre2/doc/html/pcre2_set_glob_escape.html
+src/pcre2/doc/html/pcre2matching.html
+src/pcre2/doc/html/pcre2_compile_context_free.html
+src/pcre2/doc/html/pcre2_serialize_free.html
+src/pcre2/doc/html/pcre2_convert_context_create.html
+src/pcre2/doc/html/pcre2_match_context_copy.html
+src/pcre2/doc/html/pcre2_set_character_tables.html
+src/pcre2/doc/html/pcre2_get_ovector_pointer.html
+src/pcre2/doc/html/pcre2demo.html
+src/pcre2/doc/html/pcre2_jit_match.html
+src/pcre2/doc/html/pcre2_set_match_limit.html
+src/pcre2/doc/html/pcre2unicode.html
+src/pcre2/doc/html/pcre2_converted_pattern_free.html
+src/pcre2/doc/html/pcre2_serialize_get_number_of_codes.html
+src/pcre2/doc/html/pcre2_general_context_free.html
+src/pcre2/doc/html/pcre2_substring_get_byname.html
+src/pcre2/doc/html/README.txt
+src/pcre2/doc/html/pcre2_get_startchar.html
+src/pcre2/doc/html/pcre2jit.html
+src/pcre2/doc/html/pcre2_set_compile_extra_options.html
+src/pcre2/doc/html/pcre2_set_heap_limit.html
+src/pcre2/doc/html/pcre2_jit_compile.html
+src/pcre2/doc/html/pcre2_jit_free_unused_memory.html
+src/pcre2/doc/html/pcre2-config.html
+src/pcre2/doc/html/pcre2.html
+src/pcre2/doc/html/pcre2_dfa_match.html
+src/pcre2/doc/html/pcre2_general_context_copy.html
+src/pcre2/doc/html/pcre2posix.html
+src/pcre2/doc/html/pcre2_get_ovector_count.html
+src/pcre2/doc/html/pcre2_get_error_message.html
+src/pcre2/doc/html/pcre2_pattern_info.html
+src/pcre2/doc/html/pcre2_jit_stack_create.html
+src/pcre2/doc/html/pcre2_match_context_create.html
+src/pcre2/doc/html/pcre2_config.html
+src/pcre2/doc/html/pcre2_serialize_decode.html
+src/pcre2/doc/html/pcre2grep.html
+src/pcre2/doc/html/pcre2_substring_copy_byname.html
+src/pcre2/doc/html/pcre2_set_offset_limit.html
+src/pcre2/doc/html/pcre2_substring_length_byname.html
+src/pcre2/doc/html/pcre2serialize.html
+src/pcre2/doc/html/pcre2_substitute.html
+src/pcre2/doc/html/pcre2_match.html
+src/pcre2/doc/html/pcre2sample.html
+src/pcre2/doc/html/pcre2_set_compile_recursion_guard.html
+src/pcre2/doc/html/pcre2_substring_list_get.html
+src/pcre2/doc/html/pcre2syntax.html
+src/pcre2/doc/html/pcre2_code_free.html
+src/pcre2/doc/html/pcre2test.html
+src/pcre2/doc/html/pcre2_match_data_create.html
+src/pcre2/doc/html/pcre2_convert_context_copy.html
+src/pcre2/doc/pcre2_substring_copy_byname.3
+src/pcre2/doc/pcre2grep.1
+src/pcre2/src
+src/pcre2/src/pcre2_match.c
+src/pcre2/src/pcre2_substitute.c
+src/pcre2/src/pcre2.h.generic
+src/pcre2/src/pcre2_newline.c
+src/pcre2/src/config.h.in
+src/pcre2/src/pcre2posix.h
+src/pcre2/src/pcre2_ord2utf.c
+src/pcre2/src/pcre2_maketables.c
+src/pcre2/src/pcre2_dftables.c
+src/pcre2/src/pcre2_extuni.c
+src/pcre2/src/pcre2_config.c
+src/pcre2/src/pcre2_find_bracket.c
+src/pcre2/src/pcre2_jit_match.c
+src/pcre2/src/pcre2_fuzzsupport.c
+src/pcre2/src/pcre2_chartables.c.dist
+src/pcre2/src/sljit
+src/pcre2/src/sljit/sljitNativeMIPS_32.c
+src/pcre2/src/sljit/sljitNativeARM_T2_32.c
+src/pcre2/src/sljit/sljitUtils.c
+src/pcre2/src/sljit/sljitNativeS390X.c
+src/pcre2/src/sljit/sljitNativeMIPS_common.c
+src/pcre2/src/sljit/sljitNativePPC_64.c
+src/pcre2/src/sljit/sljitWXExecAllocator.c
+src/pcre2/src/sljit/sljitProtExecAllocator.c
+src/pcre2/src/sljit/sljitLir.c
+src/pcre2/src/sljit/sljitNativeX86_32.c
+src/pcre2/src/sljit/sljitLir.h
+src/pcre2/src/sljit/sljitNativeX86_64.c
+src/pcre2/src/sljit/sljitNativeSPARC_common.c
+src/pcre2/src/sljit/sljitNativePPC_32.c
+src/pcre2/src/sljit/sljitConfigInternal.h
+src/pcre2/src/sljit/sljitExecAllocator.c
+src/pcre2/src/sljit/sljitConfig.h
+src/pcre2/src/sljit/sljitNativePPC_common.c
+src/pcre2/src/sljit/sljitNativeARM_32.c
+src/pcre2/src/sljit/sljitNativeSPARC_32.c
+src/pcre2/src/sljit/sljitNativeX86_common.c
+src/pcre2/src/sljit/sljitNativeMIPS_64.c
+src/pcre2/src/sljit/sljitNativeARM_64.c
+src/pcre2/src/pcre2.h.in
+src/pcre2/src/pcre2_error.c
+src/pcre2/src/pcre2_convert.c
+src/pcre2/src/pcre2_serialize.c
+src/pcre2/src/pcre2_jit_simd_inc.h
+src/pcre2/src/pcre2_match_data.c
+src/pcre2/src/pcre2_compile.c
+src/pcre2/src/pcre2_string_utils.c
+src/pcre2/src/pcre2demo.c
+src/pcre2/src/pcre2_jit_neon_inc.h
+src/pcre2/src/pcre2_printint.c
+src/pcre2/src/pcre2_jit_test.c
+src/pcre2/src/pcre2_intmodedep.h
+src/pcre2/src/config.h.generic
+src/pcre2/src/pcre2_internal.h
+src/pcre2/src/pcre2_auto_possess.c
+src/pcre2/src/pcre2_xclass.c
+src/pcre2/src/pcre2_tables.c
+src/pcre2/src/pcre2_valid_utf.c
+src/pcre2/src/pcre2_substring.c
+src/pcre2/src/pcre2posix.c
+src/pcre2/src/pcre2_study.c
+src/pcre2/src/pcre2_pattern_info.c
+src/pcre2/src/pcre2_jit_misc.c
+src/pcre2/src/pcre2_jit_compile.c
+src/pcre2/src/pcre2_context.c
+src/pcre2/src/pcre2grep.c
+src/pcre2/src/pcre2_dfa_match.c
+src/pcre2/src/pcre2_ucd.c
+src/pcre2/src/pcre2_script_run.c
+src/pcre2/src/pcre2_ucp.h
+src/pcre2/src/pcre2test.c
+src/pcre2/install-sh
+src/pcre2/RunTest
#
# - Source to ctrio supporting library
#
diff --git a/INSTALL b/INSTALL
index 8c5df4ab..081c8f01 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,72 +1,167 @@
+=======================================
+||BUILDING AND INSTALLING HYPERMAIL ||
+=======================================
+
+PLEASE READ THE RELEASE NOTES FIRST.
+
Quick summary:
+=============
+cd hypermail_checkout_directory
+./autogen.sh
./configure
make
make install
-See the Upgrading section at the end for changes that might affect users
-of older versions.
-==========================
+Read the separate UPGRADE file for changes that might affect
+users of older versions.
+
+External dependencies:
+======================
+
+Note: configure will warn you if a mandatory dependence is missing and
+if it's going to skip or handle in a different way the optional ones.
+
+For compiling hypermail:
+
+* bison >=3.7 or yacc (mandatory)
+ bison is prefered as it's what we use in our dev. environment.
+
+* libiconv (mandatory)
+ libiconv is included in the libc6 package as a GNU standard C
+ library. In order to compile hypermail, you'll need to install its
+ headers
+
+ On Debian:
+
+ apt-get install libc6-dev
+
+* pkgconf (mandatory)
+ pkgconf is a system for configuring build dependency information
+ and is used for compiling against some of the libraries hypermail uses.
+
+ On Debian:
+
+ apt-get install pkgconf
+
+* libpcre2-dev >= 10.32 (optional)
+ if you don't have it, hypermail will compile and link with
+ it's own shipped-in version (src/pcre2)
- SECURITY WARNING: Do not put hypermail's output anyplace where a web
- server might have server side includes (SSI) enabled, unless you are sure
- you know what you are doing. If in doubt, check your web server
+* libgdbm-dev (optional)
+ only needed if you plan to use the usegdbm hypermail configuration
+ option (unmaintained, see docs/hmrc.html)
+
+* libchardet-dev (optional)
+ only needed if you want to benefit from automatic character set
+ detection in messages that don't provide any charset information.
+ Mostly useful when you're dealing with archives having messages
+ dating from 1990-2002, when many mail clients were a bit broken.
+
+ On Debian:
+
+ apt-get install libchardet-dev libchardet
+
+ If not available in your system, you can download the source code,
+ compile and install it:
+
+ https://github.com/Joungkyun/libchardet
+
+For running hypermail:
+
+* libpcre2 >= 10.42
+ only needed if you linked hypermail against the system libpcre
+ library
+
+* libchardet (optional)
+ only needed if you linked hypermail against the system libchardet
+ library
+
+* libgdm (optional)
+ only needed if you plan to use the usegdbm hypermail configuration option
+ (unmaintained, see docs/hmrc.html)
+
+SECURITY WARNING:
+================
+
+ Do not put hypermail's output anyplace where a web server might
+ have server side includes (SSI) enabled, unless you are sure you
+ know what you are doing. If in doubt, check your web server
configuration. If you are using Apache, look for an Options line
that mentions Includes or IncludesNOEXEC. The author of an email
normally has substantial control over what files hypermail creates,
particularly via attachments. Hypermail is designed to insure that
- filenames don't end in .shtml and don't contain characters like / or \,
- which prevent some security problems, but there are few restrictions
- on what can go in a file (e.g. possibly malicious html tags - try the
- "text_types = *" option or "ignore_types = $NONPLAIN" option if you want
- to restrict this). You might also want to look at the attachmentlink
- and unsafe_chars options to restrict attachment filenames.
- Also, it is probably a bad idea to enable cgi execution on a directory
- that hypermail puts files in.
- Do not use the crappy cgi program called "mail".
+ filenames don't end in .shtml and don't contain characters like /
+ or \, which prevent some security problems, but there are few
+ restrictions on what can go in a file (e.g. possibly malicious html
+ tags - try the "text_types = *" option or "ignore_types =
+ $NONPLAIN" option if you want to restrict this). You might also
+ want to look at the attachmentlink and unsafe_chars options to
+ restrict attachment filenames.
+
+ Also, it is probably a bad idea to enable cgi execution on a
+ directory that hypermail puts files in.
Before Building Hypermail:
==========================
Hypermail now uses "configure" to generate the Makefiles. In the
- top level directory, type "configure" to create the Makefiles.
- If it does not work on your system, please let me know.
+ top level directory, type "configure" to create the Makefiles. If
+ it does not work on your system, please let us know.
Building Hypermail:
===================
Hypermail has been normally compiled and run on Unix-based systems
- in the past. Today it can be configured and built using Cygwin
- software. I have either compiled and tested this code successfully
- on the following platforms or others have told me of their success.
+ in the past. It compiles with both gcc and clang in the following
+ platforms:
- Solaris, SunOS 4.1.3, FreeBSD 2.2.5 and later,
- BSDI/3.x, Linux kernel 2.0.18 and 2.0.30, Redhat 5.x and later,
- NT using CygWin-b19 ,
- Irix6.2, HP-UX 10.20 and later, SCO OS 5.0.5, and TRU64/OSF1
- on a DEC Alpha
+ Debian 12, Ubuntu 22.04.2 LTS
- Hypermail compiles on MacOSX, tested with X.2.6. Beware that
- you may need to configure it to use --disable-shared and manually
- execute make in src/pcre before.
+ Previously, it used to compile against a wide variety of Unix
+ platforms, MacOS, and Cygwin but we've not done it recently
+ against those platforms nor we have access to them anymore. We'll
+ update this page when there is more feedback.
- For more information on Cygwin and build hypermail on a Windows-based
- system, see the file docs/Install-win32.txt.
+ For some (old) information on Cygwin and build hypermail on a
+ Windows-based system, see the file docs/Install-win32.txt.
Generic Build:
+ 0) If you're checking out and building hypermail for the first time,
+ type "./autogen" to update the configure files to your
+ local system setup.
+
+ You only need to do this once, when you do the clone of the
+ repository.
+
1) Type "./configure". This creates the makefiles and the
- config.h file needed to build the software.
- If you want to install Hypermail somewhere other than in /usr/local,
- run something like this instead: ./configure --prefix=$HOME
+ config.h file needed to build the software.
+
+ If you want to install Hypermail somewhere other than in
+ /usr/local, run something like this instead:
+ ./configure --prefix=$HOME
+
+ There are some options you can enable or disable but all the
+ useful ones are enabled by default. You can also use the
+ options to give paths to local checkout of the dependent libraries
+ if you didn't install them on your system.
+ ./configure --help
+
+ Check out the configure output to see if you're missing system
+ libraries. If yes, install them and launch ./configure again.
+
2) Type "make". This will build the software.
- If it has trouble finding gdbm (e.g. if it fails with a message such as
- "cannot open -lgdbm", you may need to disable gdbm with:
+
+ If it has trouble finding gdbm (e.g. if it fails with a message
+ such as "cannot open -lgdbm", you may need to disable gdbm
+ with:
./configure --without-gdbm
- and type "make clean" and then "make" again. (Note that without gdbm,
- you can't do incremental updates using the folder_by_date option).
+ and type "make clean" and then "make" again. (Note that without
+ gdbm, you can't do incremental updates using the folder_by_date
+ option).
On some systems you may need to add "-R/usr/local/lib -L/usr/local/lib"
to the CFLAGS variable in the Makefiles, or alter your LD_LIBRARY_PATH
@@ -94,7 +189,8 @@ Building Hypermail:
proto.h:99: conflicting types for `strcasestr'
/usr/include/string.h:86: previous declaration of `strcasestr'
- then you should try removing the line in proto.h that refers to strcasestr.
+ then you should try removing the line in proto.h that refers to
+ strcasestr.
Testing Hypermail:
==================
@@ -133,40 +229,13 @@ Installing Hypermail:
make install
- in the main Hypermail directory (the one where you did ./configure).
- If it fails with something like:
+ in the main Hypermail directory (the one where you did
+ ./configure). If it fails with something like:
+
mkdir: "/usr/local/apache/htdocs/hypermail": Permission denied
+
then you may need to rerun ./configure giving it the directory in
- which you want to install html documentation files using this option:
+ which you want to install html documentation files using this
+ option:
+
--with-htmldir=/var/www/htdocs
-
-Upgrading:
-==============
- The body option has been disabled as of version 2.1.4 for strict
- HTML 4.01 compatibility. You should replace any body command you
- have in your .hmrc with a style sheet (such as a file called
- hypermail.css in the archive directory), and set icss_url and
- mcss_url to the url of that style sheet. If you want the appearance
- that was the default before 2.1.4, your style sheet should contain this:
-
-body {color: black; background: #ffffff}
-h1.center {text-align: center}
-div.center {text-align: center}
-
- Also, if you have been using the icss_url and/or mcss_url options and
- are upgrading to 2.1.4 or higher, you might want to add those statements
- to your style sheet, as their style is no longer being provided by
- tags, etc. (For users not specifying an icss_url and mcss_url,
- default style sheets have been put in all files to maintain that style.)
-
- The overwrite option defaulted to On for many versions. Starting with
- version 2.1.4, it defaults to off again. You may want to turn it on
- again occasionally to insure that all of your archive uses the same style
- (assuming you have a copy of the archive in mbox format).
-
-::: SPECIAL NOTE:::
- The cgi program called "mail" has been disabled. If you've been
- using it, you should either stop using it or look carefully enough
- at what it does to understand whether it is safe for you to enable
- its functionality. This could be a security concern for your site.
-
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 00000000..f288702d
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. 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
+them 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 prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. 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.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey 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;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If 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 convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU 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 that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ 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.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+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.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ 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
+state 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 3 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, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program 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, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+ .
+
+ The GNU 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 Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/Makefile.in b/Makefile.in
index c679d37d..09e48a9d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -20,13 +20,10 @@ srcdir=@srcdir@
# This is where the HTML documentation goes
htmldir=@htmldir@
-# This is where your CGI programs live
-cgidir=@cgidir@
-
INSTALL_PROG=@INSTALL@
#WNOERROR=-Werror
-#WARNINGS=$(WNOERROR) -ansi -pedantic -Wall -Wtraditional -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Dlint
+#WARNINGS=$(WNOERROR) -ansi -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Dlint
# Compiler to use
CC=@CC@
@@ -41,7 +38,7 @@ hypermail:
@cd src; $(MAKE) all CC="$(CC)" \
CFLAGS="$(CFLAGS)" \
CPPFLAGS="$(CPPFLAGS)" \
- cgidir="$(cgidir)" bindir="$(bindir)" LIBS="$(LIBS)"
+ bindir="$(bindir)" LIBS="$(LIBS)"
support:
@cd archive; $(MAKE) all CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)"
@@ -49,7 +46,7 @@ support:
install:
@cd src; $(MAKE) install CC="$(CC)" CFLAGS="$(CFLAGS)" \
CPPFLAGS="$(CPPFLAGS)" \
- cgidir="$(cgidir)" bindir="$(bindir)" LIBS="$(LIBS)"
+ bindir="$(bindir)" LIBS="$(LIBS)"
@cd docs; $(MAKE) install CC="$(CC)" CFLAGS="$(CFLAGS)" \
CPPFLAGS="$(CPPFLAGS)" \
$(MAKEFLAGS) mandir="$(mandir)" htmldir="$(htmldir)"
@@ -58,7 +55,7 @@ install:
bindir="$(bindir)"
uninstall:
- @cd src; $(MAKE) uninstall cgidir="$(cgidir)" bindir="$(bindir)"
+ @cd src; $(MAKE) uninstall bindir="$(bindir)"
@cd docs; $(MAKE) uninstall mandir="$(mandir)" htmldir="$(htmldir)"
@cd archive; $(MAKE) uninstall bindir="$(bindir)"
@@ -79,7 +76,6 @@ clobber: clean
rm -f config.status
rm -f archive/Makefile
rm -f docs/Makefile
- rm -f libcgi/Makefile
rm -f src/Makefile
rm -f src/defaults.h
rm -f tests/testhm
@@ -90,9 +86,23 @@ clobber: clean
distclean: clobber
rm -f tests/testmail
+# creates a distribution tar file.
+# taking care to replace the git checkout dirname by
+# by hypermail-version[-extraversion]/
+# from the values found in patchlevel.h
tgz:
- @(dir=`pwd`;name=`basename $$dir`;echo Creates $$name.tar.gz; cd .. ; \
- tar -cf $$name.tar \
- `cat $$name/FILES | grep -v "^#" | sed "s:^:$$name/:g"` ; \
- gzip $$name.tar ; chmod a+r $$name.tar.gz ; mv $$name.tar.gz $$name/)
+ @(dir=`pwd`; source_dir=`basename $$dir`; \
+ version=`sed -nr '1s/.*VERSION\s+\"(.*)\"/\1/p' patchlevel.h`; \
+ extraversion=`sed -nr '2s/.*EXTRAVERSION\s+\"(.*)\"/-\1/p' patchlevel.h`; \
+ version=$$version$$extraversion; \
+ target_dir="hypermail-$$version"; \
+ echo creates $$target_dir.tgz from $$source_dir; \
+ cd .. ; \
+ transform_exp=s,^$$source_dir/,$$target_dir/,; \
+ tar -cf $$target_dir.tar \
+ --transform=$$transform_exp \
+ `cat $$source_dir/FILES | grep -v "^#" | sed "s:^:$$source_dir/:g"`; \
+ gzip $$target_dir.tar ; chmod a+r $$target_dir.tar.gz ; \
+ mv $$target_dir.tar.gz $$source_dir/ ; \
+ )
diff --git a/README b/README
index d5aaa9a0..22d1b55e 100644
--- a/README
+++ b/README
@@ -1,9 +1,9 @@
Hypermail
- Version: 2.4.x
+ Version: 3.0.x
-This is a release of the 2.4.x version of hypermail.
+This is a release of the 3.0.x version of hypermail.
Hypermail is a program that takes a file of mail messages in UNIX mailbox
format and generates a set of cross-referenced HTML documents.
@@ -13,25 +13,17 @@ SECURITY WARNING:
server side includes (SSI) enabled unless you are sure you know what
you are doing.
-WARNING:
- There once existed a program call "mail" that came with hypermail.
- 'mail' utility has not installed by default for the last two years.
- This program has been disabled because it was probably easy for spammers
- to use as an open relay. It also had problems with enabling malicious
- use of JavaScript and CRLF Injection. The 'mail' utility is a historic
- reclic and will not be supplied in future versions. Its functionality
- has been replaced with a warning that anyone using it should remove it
- immediately.
-
See the INSTALL file to get started. For a description of how to use it,
see the hypermail.html, hmrc.html, and hypermail-faq.html files that come
in the docs/ directory.
-Please refer to Changelog for the list of recent changes.
-Hypermail is distributed under the GNU GPL license (see the file COPYING for
-details). Some programs that are distributed with it in the archive and
-contrib directories have different licenses - check the individual files for
-details.
+Please refer to Release Notes and the Changelog for the list of recent
+changes.
+
+Hypermail is distributed under the GNU GPL license (see the file
+LICENSE.txt for details). Some programs that are distributed with it
+in the archive and contrib directories have different licenses - check
+the individual files for details.
Hypermail Background:
=====================
@@ -59,7 +51,7 @@ EIT's net.disappearance:
A very old and established government contractor company called
Electronic Instrumentation and Technology Inc. made legal moves to
obtain the eit.com domain. Since VeriFone/HP had no interest in keeping
-EIT, dissolved it completely. As this company had a trademark on EIT,
+EIT, it dissolved it completely. As this company had a trademark on EIT,
the domain name was given to them. Elizabeth Batson of EIT/VeriFone/HP
informed Kevin he could maintain all his old software himself wherever
he wished to put it.
@@ -109,7 +101,6 @@ accordingly.
* contrib - contributed hypermail relate utilities
* configs - sample hypermail configuration files,
* docs - documentation and documentation support files,
- * libcgi - support library for the mail utility,
* src - here's the beef,
* tests - directory for supporting local testing,
@@ -154,7 +145,7 @@ Getting Help:
Additionally:
=============
- You'll find the image "hypermail.gif" included with the source;
+ You'll find the image "hypermail.png" included with the source;
this icon is for your use in your Hypermail-related pages and links
to them. If you are talented with graphics and would like to donate
new icons and images to the hypermail effort, please feel free.
diff --git a/README.CVS b/README.CVS
deleted file mode 100644
index 8361a175..00000000
--- a/README.CVS
+++ /dev/null
@@ -1,91 +0,0 @@
-[ DEPRECATED We're now using github : https://github.com/hypermail-project/hypermail ]
-
- Hypermail CVS Server Access
-
- ----
- Hypermail Development has a CVS server, where we (try to) keep the
- latest changes (usually hot out of the oven) and anyone is welcome to
- use it. Thanks to Elliot Lee for helping with
- setting it up, Daniel Stenberg with his
- contributions. And many thanks to Ashley M. Kirchner
- for hosting and managing the hypermail CVS server.
-
-------------------------------------
-Setting up the CVS software locally:
-
- If you system does not have cvs installed on it already then you
- need to do the following to install the client locally.
-
- - Obtain the cvs source at ftp://ftp.cvshome.org/pub/
- For more information on CVS stop by http://www.cvshome.org/
-
- - Compile and install the client (you can disable the server with
- the --disable-server during the 'configure' command. Read the
- INSTALL file once you're uncompressed the archive)
-
-------------------------------------
-General information on accessing the Hypermail CVS repository:
-
- Hypermail CVS Archive Address:
-
- :pserver:cvs@cvs.hypermail.org:/CVS
-
- The 'cvs' user doesn't have a password, so just hit return when it
- asks you for one. The cvs user is setup for read access only.
-
-------------------------------------
-Step by Step information on accessing the Hypermail CVS repository:
-
- Aftering installing the CVS software:
- - Set your CVSROOT enviroment:
- For sh, bash and ksh users, execute the following commands:
-
- CVSROOT=:pserver:cvs@cvs.hypermail.org:/CVS
- export CVSROOT
-
- (or you can stick them in your .profile and/or .bash_profile file)
- For C shell users (csh, tcsh), you can do the following:
-
- setenv CVSROOT :pserver:cvs@cvs.hypermail.org:/CVS
-
- (or stick it in your .cshrc and/or .login file)
-
- - From here you can login to the server with:
-
- $ cvs login
- (Logging in to cvs@cvs.hypermail.org)
- CVS password: <-- hit RETURN (cvs user password is blank)
-
- - Now you're ready to grab the source
-
- $ cvs checkout hypermail
-
- This will create a mirror of the sources in your account/on your
- machine called 'hypermail' that you can then compile and play
- with.
-
- - Once done, don't forget to log out:
-
- $ cvs logout
-
- All of the above commands can be performed without having to set a
- CVSROOT enviroment if you want, it's just a lot more to type in since
- you'll have to specify the directory every time with:
-
- -d :pserver:cvs@cvs.hypermail.org:/CVS
-
- For example, you would need to use the following to execute the login
- command
-
- cvs -d :pserver:cvs@cvs.hypermail.org:/CVS login
- cvs -d :pserver:cvs@cvs.hypermail.org:/CVS checkout hypermail
- cvs -d :pserver:cvs@cvs.hypermail.org:/CVS logout
-
-------------------------------------
-Browsing the Hypermail CVS Archive:
-
- You can also browse the repository at:
-
- http://cvsweb.hypermail.org/
-
- ----
diff --git a/RELATED_LICENSES.txt b/RELATED_LICENSES.txt
new file mode 100644
index 00000000..0adfadbb
--- /dev/null
+++ b/RELATED_LICENSES.txt
@@ -0,0 +1,316 @@
+This file contains the copying permission notices for various files
+and functions in hypermail that have copyright owners other than
+the hypermail developers.
+
+These notices all require that a copy of the notice be included in the
+accompanying documentation and be distributed with binary
+distributions of the code, so be sure to include this file along with
+any binary distributions derived from hypermail.
+
+
+Regular expression support is provided by the PCRE library package,
+which is open source software, written by Philip Hazel, and copyright
+by the University of Cambridge, England. See http://www.pcre.org/.
+
+PCRE2 LICENCE
+-------------
+
+PCRE2 is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+Releases 10.00 and above of PCRE2 are distributed under the terms of the "BSD"
+licence, as specified below, with one exemption for certain binary
+redistributions. The documentation for PCRE2, supplied in the "doc" directory,
+is distributed under the same terms as the software itself. The data in the
+testdata directory is not copyrighted and is in the public domain.
+
+The basic library functions are written in C and are freestanding. Also
+included in the distribution is a just-in-time compiler that can be used to
+optimize pattern matching. This is an optional feature that can be omitted when
+the library is built.
+
+
+THE BASIC LIBRARY FUNCTIONS
+---------------------------
+
+Written by: Philip Hazel
+Email local part: Philip.Hazel
+Email domain: gmail.com
+
+Retired from University of Cambridge Computing Service,
+Cambridge, England.
+
+Copyright (c) 1997-2021 University of Cambridge
+All rights reserved.
+
+
+PCRE2 JUST-IN-TIME COMPILATION SUPPORT
+--------------------------------------
+
+Written by: Zoltan Herczeg
+Email local part: hzmester
+Email domain: freemail.hu
+
+Copyright(c) 2010-2021 Zoltan Herczeg
+All rights reserved.
+
+
+STACK-LESS JUST-IN-TIME COMPILER
+--------------------------------
+
+Written by: Zoltan Herczeg
+Email local part: hzmester
+Email domain: freemail.hu
+
+Copyright(c) 2009-2021 Zoltan Herczeg
+All rights reserved.
+
+
+THE "BSD" LICENCE
+-----------------
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notices,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notices, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of any
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+
+EXEMPTION FOR BINARY LIBRARY-LIKE PACKAGES
+------------------------------------------
+
+The second condition in the BSD licence (covering binary redistributions) does
+not apply all the way down a chain of software. If binary package A includes
+PCRE2, it must respect the condition, but if package B is software that
+includes package A, the condition is not imposed on package B unless it uses
+PCRE2 independently.
+
+End
+
+
+The code for strcasecmp() was borrowed from OpenBSD. OpenBSD code can be freely
+used, copied, modified, and distributed by anyone and for any purpose. They
+are both covered by The Berkeley Copyright license, which has been included
+here above. See https://www.openbsd.org/policy.html
+
+Parts of the code in the uudecode.c module were borrowed from the BSD uudecode
+command, which is also covered the Berkeley Copyright license, included here
+above.
+
+The code for strcasestr() was borrowed from glib.c 2.1
+This code is covered by the GNU Lesser General Public License.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser 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
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
+
+The utf8.h library comes from https://github.com/sheredom/utf8.h
+and is covered by the unlicense.
+
+/* This is free and unencumbered software released into the public domain.
+ *
+ * Anyone is free to copy, modify, publish, use, compile, sell, or
+ * distribute this software, either in source code form or as a compiled
+ * binary, for any purpose, commercial or non-commercial, and by any
+ * means.
+ *
+ * In jurisdictions that recognize copyright laws, the author or authors
+ * of this software dedicate any and all copyright interest in the
+ * software to the public domain. We make this dedication for the benefit
+ * of the public at large and to the detriment of our heirs and
+ * successors. We intend this dedication to be an overt act of
+ * relinquishment in perpetuity of all present and future rights to this
+ * software under copyright law.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For more information, please refer to */
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
new file mode 100644
index 00000000..d17ed554
--- /dev/null
+++ b/RELEASE_NOTES
@@ -0,0 +1,205 @@
+Hypermail 3.0.0
+
+If you are migrating to 3.0.0 from 2.4.0, please consult the UPGRADE
+file.
+
+*** NEW FEATURES
+
+- HTML5
+
+Both the markup generated by hypermail and its documentation have
+been updated to HTML5.
+
+- WAI enhancements / deprecation of text-only browser support
+
+The generated markup was reviewed and improved for better screen
+reader user experience as well as for the overall accessiblity of
+hypermail. Due to the need to use HTML5 and CSS to achieve this goal,
+we unfortunately had to stop generating markup that could be readable
+and look good in text-only browsers, such as lynx and w3m.
+
+- CSS and hypermail
+
+The CSS rules that used to be inside messages generated by hypermail
+have been moved to external files.
+
+You now have the possibility to associate the indexes and messages
+with a CSS file to customize their presentation.
+
+You have three configuration options that let you define your own
+CSS files:
+
+- "icss_url" : URL of a css file you would like to use only with indexes
+- "mcss_url" : URL of a css file you would like to use only with messages
+- "default_css_url" : URL of a default CSS file that will be used if
+ either gicss_url or mcss_url are not declared.
+
+If "default_css_url" is not defined and is needed, hypermail will use
+the name hypermail.css and will generate this file by itself with some
+pre-defined rules, unless this file already exists in the archive
+directory.
+
+Hypermail's default css file is also available under
+docs/hypermail.css and will be installed with the other documentation
+files.
+
+- Navigation bar for messages
+
+Previoulsy hypermail used the same navigation bar for both indexes and
+messages. The new configuration option "mhtmlnavbar2upfile" let's you
+include in hypermail generated messages more specific HTML formatting
+statement giving links to the hierarchy of your archive. By default,
+this option uses the value of "ihtmlnavbar2upfile".
+
+- Deleted messages
+
+If a message has been marked as deleted by means of an annotation, the
+thread view will display a "deleted" message, but not remove the
+deleted node to avoid having a misinterpreation of threads. A related
+change. the in-reply-to and next in thread messages will display
+"deleted message" but won't display the subject of the deleted message
+anymore.
+
+- Switch to PCRE2
+
+Up to now hypermail had been using PCRE behind the scenes of its
+message filtering options (docs/hmrc.html#filters). PCRE being now
+at end of life, and is no longer being actively maintained, we have now
+updated hypermail to support its successor, PCRE2. If you were using any
+of Hypermail's filtering options, we advise you to check out PCRE2's
+doc to see if there have been any changes there that may impact you:
+
+ https://www.pcre.org/current/doc/html/pcre2pattern.html
+
+As before, we're shipping the latest source of PCRE2 with hypermail.
+However if your system has PCRE2 installed, hypermail will use that
+one when being compiled. At this point of time we're not sure if
+shipping this library source is a practice that will be continued in
+the future.
+
+- Other configuration option changes
+
+Two new configuration options, "archive_date" and "hypermail_colophon",
+allow you choose whether you want to display a line that says when the
+archive was generated (only in the indexes) as well as a a line that
+states that the archive was generated with hypermail and the
+generation date (both in messages and indexes). Both these options may
+be considered mutually exclusive as they both display the archive
+generation date. You can disable both of them.
+
+"empty_archive_notice" will let you customize the markup and text that
+is displayed in indices when you're converting a mbox that consists
+exclusively of messages that have been annotated as 'spam' or 'deleted'.
+
+"show_headers_msg_rfc822" will let you customize the list of headers
+that you want to be shown in message/rfc822 attachments. If not
+defined, hypermail will use the value of "show_headers".
+
+"archived_date" lets you control whether you want to add a line
+in the indices giving the date the archive was generated.
+
+Please refer to refer to hmrc.html hmrc.4 or use hypermail -v for a
+more detailed description of the configuration options.
+
+- Parser partially revisited
+
+The parser (a very old source code comment rightfully states this is
+the heart of hypermail has been revised and partially rewritten. We
+went from a linear parser output, to an intermediary tree
+representation of a message that, after the parsing is completed, is
+flattened to the the structure that hypermail print functions are used
+to.
+
+This new parser has allowed us to better handle message/rfc822 and
+multipart/alternative attachments, simplify hypermail's parsing code,
+and use better heuristics for determining the charset that will be
+associated with a processed message. The new parser also greatly
+simplifies adding new markup changes as it allowed to separate the
+parsing from the markup generation.
+
+- Compiler warnings and memory leaks
+
+All compiler warnings generated by gcc -Wall -O2 have been solved.
+
+Although all major runtime cumulative memory leaks that gcc's
+-fsanitize and -libasan found were solved, there may be parts of the
+code that were not tested as they depend on the use and combination of
+different hypermail configuration options.
+
+- Other code improvements
+
+Read the Changelog for more details.
+
+*** DEPRECATED FEATURES
+
+The configuration variable "indextable", which let hypermail
+generate message indexes using tables has been deprecated in favor of
+using HTML and CSS. This option has been disabled. The pertaining
+code will be removed from the code base in a future release.
+
+The "quotes" and "finequotes" options are now in the to be deprecated
+list. The code that handles these options hasn't been updated or
+reviewed since a long time and will be deleted in a future release
+unless someone gives them more love.
+
+Removed the code that was used for the stand-alone script 'mail'.
+This script had security issues and had been disabled in 2003 to stop
+working. However, the code and associated libraries were still in
+the dist.
+
+*** HYPERMAIL FEATURES THAT NEED MORE LOVE in 3.0.0
+
+This is a list of features that have only been partially updated in
+this version. We are unsure if people are using them and if they
+should be preserved or deprecated. If you're using any of these
+features, please check that this new version of hypermail is still
+working on your archive as expected. If that's not the case, please
+stick to the 2.4 version for the moment. Feedback to know if people
+are using these features and/or code patches (better) are welcome.
+
+All of these features now have a corresponding issue on hypermail's
+github repository, labelled with "support requested", for tracking
+their status. If we don't get code patches or feedback, we will
+consider deprecating them in the next version of hypermail. Please use
+those issue trackers to send your feedback.
+
+- showhtml option: only bare minimum of markup update done. CSS and
+ generated markup could be improved. Issue #74 on github.
+
+- linkquotes: this piece of code seems to have stopped working at
+ least since 2.4.0. This feature has been downgrated to experimental
+ and risks being deprecated in the next version of
+ hypermail unless someone updates it. Issue #75 on github.
+
+- inline html: no specific updates done. The way inline HTML is added
+ is very simple (just cut and paste of the attachment's body), and often
+ breaks the valid markup that hypermail added. Issue #76 on github.
+
+- yearly and monthly summaries. This features seem to not have been
+ updated since long time ago and missing some links letting navigate
+ back from a message to the summariess to make them more useful.
+ Note that you could add those links with the navbar options. Issue
+ #77 on github.
+
+- translation of messages: some languagess are behind since years and
+ need update. Unmaintained languages risk being dropped out in a
+ future version of hypermail. Issue #78 on github.
+
+- compilation: windows LCC support (not updated, seems very
+ old). Issue #79 on github.
+
+*** ACKNOWLEDGMENTS
+
+Many thanks to W3C for their contributions to this version of
+hypermail. In particular Josh O'Connor, Daniel Montalvo, and Shadi
+Abou-Zahra from the WAI Team for their evaluation and feedback on how
+to improve hypermail's accessibility; thanks to Vivien Lacourba and
+Gerald Oskoboiny from the Systems Team for their testing and feedback
+of the pre-release version of hypermail.
+
+Many thanks too to Judy Brewer of the W3C WAI Team as well as Vivien
+Lacourba of the W3C Systems Team for their involvement and
+facilitating discussions and work on this version of hypermail.
+
+Thanks to Baptiste Daroussin, Jim (@AverageGuy), @cacsar, @schlomif,
+and Andy Valencia (@vandys) for their bug reports and code contributions.
diff --git a/ROADMAP b/ROADMAP
new file mode 100644
index 00000000..22e2e097
--- /dev/null
+++ b/ROADMAP
@@ -0,0 +1,50 @@
+Here are the priorities I see for the next versions of hypermail:
+
+- Clean the code.
+
+Hypermail has many features, but not all of them have been maintained
+and updated through the years. Some really need to be revised, like
+the txt2html() and finequotes() modules. If people are not using those
+features, I'd like to deprecate them.
+
+In many parts of the code we have commented code with #ifdef 0. Those
+are very old parts which made sense to keep when new code was being
+introduced to replace old one, but could safely be removed now.
+
+We have started tracking some potential features to be removed using
+github issues labelled with "support request".
+
+- Support for UTF-8
+
+We have some partial support. However, there are many C lib functions
+that don't understand UTF-8, such as isspace() and scanf(). These
+functions are used in important parts of hypermail, such as parsing
+messages and scanning lines for URLs. In order to increase the use of
+UTF-8 inside hypermail, we need to:
+
+ - Complete the support for RFC2246 format=flowed. This RFC allows to
+ break long lines in the body of a message into multi-lines for
+ transmission. Due to UTF-8 having the potential to be multi-char,
+ we need to reconstitute the original unbroken line before
+ processing it for UTF-8.
+
+ - Add support for RFC2231 data format. This is similar to RFC2246
+ but applies to multi-line header parameter values.
+
+-- Convert the message body into UTF-8. We are already using iconv()
+ for converting headers. What is missing is converting the parts of
+ the message that will be further processed (like when scanning for
+ links, removing extra space from subjects, ...) into UCS-4 so that
+ we can use unicode-aware library functions. glib seems to be a
+ good candidate for providing the last part of these functions. I'm
+ not sure at this point if we should convert all message body into
+ UCS-4 and just output UTF-8 when writing the converted message.
+
+- Support for a json output
+
+The idea here is to add an option to be able to output a headless
+archive, formatted into json and let other applications transform this
+data into markup. This would help separate the parsing and updating of
+messages from their presentation and probably help ease the
+customization of markup into something more modern or reactive as
+needed.
diff --git a/UPGRADE b/UPGRADE
index fe80ac9e..12f15d93 100644
--- a/UPGRADE
+++ b/UPGRADE
@@ -1,6 +1,80 @@
Upgrade Notes
==============
+From Hypermail 2.4.0 to Hypermail 3.0.0
+-----------------------------------------
+
+Due to the markup changes to support HTML5 and enhance the WAI
+support, it is strongly recommended that you delete all existing HTML
+files and directories in the archive directory and that you rebuild
+your archive completely using version 3.0.0 Failure to do so may
+produce invalid markup in some of your messages or have duplicate
+links that point to replies and other messages (the 2.4.0 + the 3.0.0
+ones) in your current messages.
+
+Except for some few exceptions related to specific options (see here
+below), all generated markup was reviewed with the help of experts of
+the WAI community to make sure it is accessible. We may have missed
+some files that are only generated when using specific configuration
+options; if that's the case, please open an issue and we'll look at
+it.
+
+Hypermail is now using PCRE2. If you were using any of the filtering
+options, you should check if your regular expressions need updating.
+For more info see for example:
+
+ https://wiki.php.net/rfc/pcre2-migration:
+
+All style that used to be embeeded in hypermail's generated archive
+files was moved to an external stylesheet. This stylesheet,
+hypermail.css, will be generated by default in your archive directory
+unless you use options to give a link to an external one. Together
+with this move, more markup was added to allow a better use of CSS and
+better accessibility and use of screen readers.
+
+You can find hypermail's current stylesheet under docs/hypermail.css.
+If you were already relying on an external stylesheet file, we advise
+you to check hypermail's default shipped one to see if there are
+changes you'd be interested in supporting in your own stylesheet file.
+
+The following configuration options are now considered deprecated and
+will be ignored. They will be removed from the code base in the next
+hypermail release:
+
+- showhr, usetable, iquotes. All of these options have been made
+ obsolete by markup changes in hypermail. You can emulate their
+ behavior by using CSS.
+
+The following options are being considered as future candidates for
+deprecation:
+
+- showhtml. We are not sure if people are using this option with
+ values 1 and 2. The markup that's produced isn't so special and we
+ think that it'd be better to merge whatever features people deem
+ useful there to the normal markup and use CSS to control
+ presentation. Minimal work has been done with this option other than
+ to make sure the produced markup is valid. The markup that's
+ produced with this option was not given a WAI review.
+
+The following options are now considered unstable since version 2.4
+and are considered future candidates for deprecation unless people
+state they are being used and someone proposes to adopt their code and
+gives it more love and maintenance:
+
+- linkquotes, searchbackmsgnum, link_to_replies, quote_hide_threshold,
+ quote_link_string. Note that all these options are related to
+ linkquotes. No work was done in 3.0.0 regarding these options.
+
+By default, hypermail will warn you if your configuration file includes
+deprecated or planned to be deprecated options. You can switch off this
+warning by using the new "warn_deprecated_options" configuration option.
+
+The yearly and monthly summaries seem to have been broken since some
+long time ago. Some few updates were done but they require more
+love to make them more useful. In particular, messages are missing
+links pointing back to the summaries. Note that you could do this
+by using the different navbar options.
+
From Hypermail 2.3.0 to Hypermail 2.4.0
-----------------------------------------
diff --git a/acconfig.h b/acconfig.h
deleted file mode 100644
index eb7720ab..00000000
--- a/acconfig.h
+++ /dev/null
@@ -1,2 +0,0 @@
-
-#undef HAVE_GDBM_H
diff --git a/aclocal.m4 b/aclocal.m4
index ebc6a54d..460e78ff 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,140 +1,15 @@
-dnl Some macros borrowed from Apache's httpd config file. Thanks!
+# generated automatically by aclocal 1.16.3 -*- Autoconf -*-
-dnl
-dnl APR_SUBDIR_CONFIG(dir [, sub-package-cmdline-args, args-to-drop])
-dnl
-dnl dir: directory to find configure in
-dnl sub-package-cmdline-args: arguments to add to the invocation (optional)
-dnl args-to-drop: arguments to drop from the invocation (optional)
-dnl
-dnl Note: This macro relies on ac_configure_args being set properly.
-dnl
-dnl The args-to-drop argument is shoved into a case statement, so
-dnl multiple arguments can be separated with a |.
-dnl
-dnl Note: Older versions of autoconf do not single-quote args, while 2.54+
-dnl places quotes around every argument. So, if you want to drop the
-dnl argument called --enable-layout, you must pass the third argument as:
-dnl [--enable-layout=*|\'--enable-layout=*]
-dnl
-dnl Trying to optimize this is left as an exercise to the reader who wants
-dnl to put up with more autoconf craziness. I give up.
-dnl
-AC_DEFUN([APR_SUBDIR_CONFIG], [
- # save our work to this point; this allows the sub-package to use it
- AC_CACHE_SAVE
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
- echo "configuring package in $1 now"
- ac_popdir=`pwd`
- apr_config_subdirs="$1"
- test -d $1 || $mkdir_p $1
- ac_abs_srcdir=`(cd $srcdir/$1 && pwd)`
- cd $1
+# This file 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.
-changequote(, )dnl
- # A "../" for each directory in /$config_subdirs.
- ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-changequote([, ])dnl
+# 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.
- # Make the cache file pathname absolute for the subdirs
- # required to correctly handle subdirs that might actually
- # be symlinks
- case "$cache_file" in
- /*) # already absolute
- ac_sub_cache_file=$cache_file ;;
- *) # Was relative path.
- ac_sub_cache_file="$ac_popdir/$cache_file" ;;
- esac
-
- ifelse($3, [], [apr_configure_args=$ac_configure_args],[
- apr_configure_args=
- apr_sep=
- for apr_configure_arg in $ac_configure_args
- do
- case "$apr_configure_arg" in
- $3)
- continue ;;
- esac
- apr_configure_args="$apr_configure_args$apr_sep'$apr_configure_arg'"
- apr_sep=" "
- done
- ])
-
- dnl autoconf doesn't add --silent to ac_configure_args; explicitly pass it
- test "x$silent" = "xyes" && apr_configure_args="$apr_configure_args --silent"
-
- dnl AC_CONFIG_SUBDIRS silences option warnings, emulate this for 2.62
- apr_configure_args="--disable-option-checking $apr_configure_args"
-
- dnl The eval makes quoting arguments work - specifically the second argument
- dnl where the quoting mechanisms used is "" rather than [].
- dnl
- dnl We need to execute another shell because some autoconf/shell combinations
- dnl will choke after doing repeated APR_SUBDIR_CONFIG()s. (Namely Solaris
- dnl and autoconf-2.54+)
- if eval $SHELL $ac_abs_srcdir/configure $apr_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir $2
- then :
- echo "$1 configured properly"
- else
- echo "configure failed for $1"
- exit 1
- fi
-
- cd $ac_popdir
-
- # grab any updates from the sub-package
- AC_CACHE_LOAD
-])dnl
-
-dnl
-dnl APR_ADDTO(variable, value)
-dnl
-dnl Add value to variable
-dnl
-AC_DEFUN([APR_ADDTO], [
- if test "x$$1" = "x"; then
- test "x$silent" != "xyes" && echo " setting $1 to \"$2\""
- $1="$2"
- else
- apr_addto_bugger="$2"
- for i in $apr_addto_bugger; do
- apr_addto_duplicate="0"
- for j in $$1; do
- if test "x$i" = "x$j"; then
- apr_addto_duplicate="1"
- break
- fi
- done
- if test $apr_addto_duplicate = "0"; then
- test "x$silent" != "xyes" && echo " adding \"$i\" to $1"
- $1="$$1 $i"
- fi
- done
- fi
-])dnl
-
-dnl
-dnl APR_REMOVEFROM(variable, value)
-dnl
-dnl Remove a value from a variable
-dnl
-AC_DEFUN([APR_REMOVEFROM], [
- if test "x$$1" = "x$2"; then
- test "x$silent" != "xyes" && echo " nulling $1"
- $1=""
- else
- apr_new_bugger=""
- apr_removed=0
- for i in $$1; do
- if test "x$i" != "x$2"; then
- apr_new_bugger="$apr_new_bugger $i"
- else
- apr_removed=1
- fi
- done
- if test $apr_removed = "1"; then
- test "x$silent" != "xyes" && echo " removed \"$2\" from $1"
- $1=$apr_new_bugger
- fi
- fi
-]) dnl
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_include([m4/apr.m4])
diff --git a/config.guess b/config.guess
index ed2e03b7..69188da7 100755
--- a/config.guess
+++ b/config.guess
@@ -1,13 +1,14 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright 1992-2023 Free Software Foundation, Inc.
-timestamp='2002-03-20'
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2023-01-01'
# This file 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
+# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -16,24 +17,30 @@ timestamp='2002-03-20'
# 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.
+# along with this program; if not, see .
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Per Bothner .
-# Please send patches to . Submit a context
-# diff and a properly formatted ChangeLog entry.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+#
+# Please send patches to .
+
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX. However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -42,7 +49,7 @@ Usage: $0 [OPTION]
Output the configuration name of the system \`$me' is run on.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -53,8 +60,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
+Copyright 1992-2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -66,11 +72,11 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
- echo "$timestamp" ; exit 0 ;;
+ echo "$timestamp" ; exit ;;
--version | -v )
- echo "$version" ; exit 0 ;;
+ echo "$version" ; exit ;;
--help | --h* | -h )
- echo "$usage"; exit 0 ;;
+ echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@@ -88,48 +94,106 @@ if test $# != 0; then
exit 1
fi
+# Just in case it came from the environment.
+GUESS=
-dummy=dummy-$$
-trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
-# CC_FOR_BUILD -- compiler used by this script.
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
-set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int dummy(){}" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
- if test $? = 0 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- rm -f $dummy.c $dummy.o $dummy.rel ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac'
+# Portable tmp directory creation inspired by the Autoconf team.
+
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+ # prevent multiple calls if $tmp is already set
+ test "$tmp" && return 0
+ : "${TMPDIR=/tmp}"
+ # shellcheck disable=SC2039,SC3028
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+ dummy=$tmp/dummy
+ case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+ ,,) echo "int x;" > "$dummy.c"
+ for driver in cc gcc c89 c99 ; do
+ if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+ CC_FOR_BUILD=$driver
+ break
+ fi
+ done
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+ esac
+}
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+if test -f /.attbin/uname ; then
PATH=$PATH:/.attbin ; export PATH
fi
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+case $UNAME_SYSTEM in
+Linux|GNU|GNU/*)
+ LIBC=unknown
+
+ set_cc_for_build
+ cat <<-EOF > "$dummy.c"
+ #include
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #elif defined(__GLIBC__)
+ LIBC=gnu
+ #else
+ #include
+ /* First heuristic to detect musl libc. */
+ #ifdef __DEFINED_va_list
+ LIBC=musl
+ #endif
+ #endif
+ EOF
+ cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ eval "$cc_set_libc"
+
+ # Second heuristic to detect musl libc.
+ if [ "$LIBC" = unknown ] &&
+ command -v ldd >/dev/null &&
+ ldd --version 2>&1 | grep -q ^musl; then
+ LIBC=musl
+ fi
+
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ if [ "$LIBC" = unknown ]; then
+ LIBC=gnu
+ fi
+ ;;
+esac
+
# Note: order is significant - the case branches are not exclusive.
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@@ -138,22 +202,34 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
#
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
- sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+ echo unknown)`
+ case $UNAME_MACHINE_ARCH in
+ aarch64eb) machine=aarch64_be-unknown ;;
+ armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ earmv*)
+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine=${arch}${endian}-unknown
+ ;;
+ *) machine=$UNAME_MACHINE_ARCH-unknown ;;
esac
# The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
+ # to ELF recently (or will in the future) and ABI.
+ case $UNAME_MACHINE_ARCH in
+ earm*)
+ os=netbsdelf
+ ;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
+ set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep __ELF__ >/dev/null
+ | grep -q __ELF__
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
@@ -163,198 +239,248 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
fi
;;
*)
- os=netbsd
+ os=netbsd
+ ;;
+ esac
+ # Determine ABI tags.
+ case $UNAME_MACHINE_ARCH in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
;;
esac
# The OS release
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case $UNAME_VERSION in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
+ ;;
+ esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit 0 ;;
- amiga:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- arc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- hp300:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mac68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- macppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme88k:OpenBSD:*:*)
- echo m88k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvmeppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- pmax:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sgi:OpenBSD:*:*)
- echo mipseb-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sun3:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- wgrisc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=$machine-${os}${release}${abi-}
+ ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
+ ;;
*:OpenBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
+ ;;
+ *:SecBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
+ ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
+ ;;
+ *:MidnightBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
+ ;;
+ *:ekkoBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
+ ;;
+ *:SolidBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
+ ;;
+ *:OS108:*:*)
+ GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
+ ;;
+ macppc:MirBSD:*:*)
+ GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
+ ;;
+ *:MirBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
+ ;;
+ *:Sortix:*:*)
+ GUESS=$UNAME_MACHINE-unknown-sortix
+ ;;
+ *:Twizzler:*:*)
+ GUESS=$UNAME_MACHINE-unknown-twizzler
+ ;;
+ *:Redox:*:*)
+ GUESS=$UNAME_MACHINE-unknown-redox
+ ;;
+ mips:OSF1:*.*)
+ GUESS=mips-dec-osf1
+ ;;
alpha:OSF1:*:*)
- if test $UNAME_RELEASE = "V4.0"; then
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ trap '' 0
+ case $UNAME_RELEASE in
+ *4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- fi
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case $ALPHA_CPU_TYPE in
+ "EV4 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE=alpha ;;
+ "EV5 (21164)")
+ UNAME_MACHINE=alphaev5 ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE=alphaev56 ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE=alphapca56 ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE=alphapca57 ;;
+ "EV6 (21264)")
+ UNAME_MACHINE=alphaev6 ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE=alphaev67 ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE=alphaev69 ;;
+ "EV7 (21364)")
+ UNAME_MACHINE=alphaev7 ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE=alphaev79 ;;
+ esac
+ # A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- cat <$dummy.s
- .data
-\$Lformat:
- .byte 37,100,45,37,120,10,0 # "%d-%x\n"
-
- .text
- .globl main
- .align 4
- .ent main
-main:
- .frame \$30,16,\$26,0
- ldgp \$29,0(\$27)
- .prologue 1
- .long 0x47e03d80 # implver \$0
- lda \$2,-1
- .long 0x47e20c21 # amask \$2,\$1
- lda \$16,\$Lformat
- mov \$0,\$17
- not \$1,\$18
- jsr \$26,printf
- ldgp \$29,0(\$26)
- mov 0,\$16
- jsr \$26,exit
- .end main
-EOF
- eval $set_cc_for_build
- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
- if test "$?" = 0 ; then
- case `./$dummy` in
- 0-0)
- UNAME_MACHINE="alpha"
- ;;
- 1-0)
- UNAME_MACHINE="alphaev5"
- ;;
- 1-1)
- UNAME_MACHINE="alphaev56"
- ;;
- 1-101)
- UNAME_MACHINE="alphapca56"
- ;;
- 2-303)
- UNAME_MACHINE="alphaev6"
- ;;
- 2-307)
- UNAME_MACHINE="alphaev67"
- ;;
- 2-1307)
- UNAME_MACHINE="alphaev68"
- ;;
- esac
- fi
- rm -f $dummy.s $dummy
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit 0 ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit 0 ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit 0 ;;
+ OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
+ ;;
Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
- exit 0;;
+ GUESS=m68k-unknown-sysv4
+ ;;
*:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit 0 ;;
+ GUESS=$UNAME_MACHINE-unknown-amigaos
+ ;;
*:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
- exit 0 ;;
+ GUESS=$UNAME_MACHINE-unknown-morphos
+ ;;
*:OS/390:*:*)
- echo i370-ibm-openedition
- exit 0 ;;
+ GUESS=i370-ibm-openedition
+ ;;
+ *:z/VM:*:*)
+ GUESS=s390-ibm-zvmoe
+ ;;
+ *:OS400:*:*)
+ GUESS=powerpc-ibm-os400
+ ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit 0;;
+ GUESS=arm-acorn-riscix$UNAME_RELEASE
+ ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ GUESS=arm-unknown-riscos
+ ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- echo hppa1.1-hitachi-hiuxmpp
- exit 0;;
+ GUESS=hppa1.1-hitachi-hiuxmpp
+ ;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
- echo pyramid-pyramid-sysv3
- else
- echo pyramid-pyramid-bsd
- fi
- exit 0 ;;
+ case `(/bin/universe) 2>/dev/null` in
+ att) GUESS=pyramid-pyramid-sysv3 ;;
+ *) GUESS=pyramid-pyramid-bsd ;;
+ esac
+ ;;
NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
- exit 0 ;;
+ GUESS=pyramid-pyramid-svr4
+ ;;
+ DRS?6000:unix:4.0:6*)
+ GUESS=sparc-icl-nx6
+ ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) GUESS=sparc-icl-nx7 ;;
+ esac
+ ;;
+ s390x:SunOS:*:*)
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
+ ;;
sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=sparc-hal-solaris2$SUN_REL
+ ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
- i86pc:SunOS:5.*:*)
- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=sparc-sun-solaris2$SUN_REL
+ ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ GUESS=i386-pc-auroraux$UNAME_RELEASE
+ ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ set_cc_for_build
+ SUN_ARCH=i386
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH=x86_64
+ fi
+ fi
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
+ ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=sparc-sun-solaris3$SUN_REL
+ ;;
sun4*:SunOS:*:*)
- case "`/usr/bin/arch -k`" in
+ case `/usr/bin/arch -k` in
Series*|S4*)
UNAME_RELEASE=`uname -v`
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit 0 ;;
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
+ GUESS=sparc-sun-sunos$SUN_REL
+ ;;
sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=m68k-sun-sunos$UNAME_RELEASE
+ ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
- case "`/bin/arch`" in
+ test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
+ case `/bin/arch` in
sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
+ GUESS=m68k-sun-sunos$UNAME_RELEASE
;;
sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
+ GUESS=sparc-sun-sunos$UNAME_RELEASE
;;
esac
- exit 0 ;;
+ ;;
aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=sparc-auspex-sunos$UNAME_RELEASE
+ ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
@@ -364,41 +490,44 @@ EOF
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=m68k-atari-mint$UNAME_RELEASE
+ ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=m68k-atari-mint$UNAME_RELEASE
+ ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=m68k-atari-mint$UNAME_RELEASE
+ ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=m68k-milan-mint$UNAME_RELEASE
+ ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=m68k-hades-mint$UNAME_RELEASE
+ ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=m68k-unknown-mint$UNAME_RELEASE
+ ;;
+ m68k:machten:*:*)
+ GUESS=m68k-apple-machten$UNAME_RELEASE
+ ;;
powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=powerpc-apple-machten$UNAME_RELEASE
+ ;;
RISC*:Mach:*:*)
- echo mips-dec-mach_bsd4.3
- exit 0 ;;
+ GUESS=mips-dec-mach_bsd4.3
+ ;;
RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=mips-dec-ultrix$UNAME_RELEASE
+ ;;
VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=vax-dec-ultrix$UNAME_RELEASE
+ ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=clipper-intergraph-clix$UNAME_RELEASE
+ ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
#ifdef __cplusplus
#include /* for printf() prototype */
int main (int argc, char *argv[]) {
@@ -407,89 +536,96 @@ EOF
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy \
- && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && rm -f $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- echo mips-mips-riscos${UNAME_RELEASE}
- exit 0 ;;
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ GUESS=mips-mips-riscos$UNAME_RELEASE
+ ;;
Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit 0 ;;
+ GUESS=powerpc-motorola-powermax
+ ;;
+ Motorola:*:4.3:PL8-*)
+ GUESS=powerpc-harris-powermax
+ ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ GUESS=powerpc-harris-powermax
+ ;;
Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
- exit 0 ;;
+ GUESS=powerpc-harris-powerunix
+ ;;
m88k:CX/UX:7*:*)
- echo m88k-harris-cxux7
- exit 0 ;;
+ GUESS=m88k-harris-cxux7
+ ;;
m88k:*:4*:R4*)
- echo m88k-motorola-sysv4
- exit 0 ;;
+ GUESS=m88k-motorola-sysv4
+ ;;
m88k:*:3*:R3*)
- echo m88k-motorola-sysv3
- exit 0 ;;
+ GUESS=m88k-motorola-sysv3
+ ;;
AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
+ if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
+ test "$TARGET_BINARY_INTERFACE"x = x
then
- echo m88k-dg-dgux${UNAME_RELEASE}
+ GUESS=m88k-dg-dgux$UNAME_RELEASE
else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
fi
else
- echo i586-dg-dgux${UNAME_RELEASE}
+ GUESS=i586-dg-dgux$UNAME_RELEASE
fi
- exit 0 ;;
+ ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
- exit 0 ;;
+ GUESS=m88k-dolphin-sysv3
+ ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
- echo m88k-motorola-sysv3
- exit 0 ;;
+ GUESS=m88k-motorola-sysv3
+ ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- echo m88k-tektronix-sysv3
- exit 0 ;;
+ GUESS=m88k-tektronix-sysv3
+ ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- echo m68k-tektronix-bsd
- exit 0 ;;
+ GUESS=m68k-tektronix-bsd
+ ;;
*:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit 0 ;;
+ IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
+ GUESS=mips-sgi-irix$IRIX_REL
+ ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i*86:AIX:*:*)
- echo i386-ibm-aix
- exit 0 ;;
+ GUESS=i386-ibm-aix
+ ;;
ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
+ if test -x /usr/bin/oslevel ; then
IBM_REV=`/usr/bin/oslevel`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit 0 ;;
+ GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
+ ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
#include
main()
@@ -500,119 +636,143 @@ EOF
exit(0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- echo rs6000-ibm-aix3.2.5
+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
+ then
+ GUESS=$SYSTEM_NAME
+ else
+ GUESS=rs6000-ibm-aix3.2.5
+ fi
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
+ GUESS=rs6000-ibm-aix3.2.4
else
- echo rs6000-ibm-aix3.2
+ GUESS=rs6000-ibm-aix3.2
fi
- exit 0 ;;
- *:AIX:*:[45])
+ ;;
+ *:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
+ if test -x /usr/bin/lslpp ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit 0 ;;
+ GUESS=$IBM_ARCH-ibm-aix$IBM_REV
+ ;;
*:AIX:*:*)
- echo rs6000-ibm-aix
- exit 0 ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
- echo romp-ibm-bsd4.4
- exit 0 ;;
+ GUESS=rs6000-ibm-aix
+ ;;
+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
+ GUESS=romp-ibm-bsd4.4
+ ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit 0 ;; # report: romp-ibm BSD 4.3
+ GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to
+ ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
- echo rs6000-bull-bosx
- exit 0 ;;
+ GUESS=rs6000-bull-bosx
+ ;;
DPX/2?00:B.O.S.:*:*)
- echo m68k-bull-sysv3
- exit 0 ;;
+ GUESS=m68k-bull-sysv3
+ ;;
9000/[34]??:4.3bsd:1.*:*)
- echo m68k-hp-bsd
- exit 0 ;;
+ GUESS=m68k-hp-bsd
+ ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
- exit 0 ;;
+ GUESS=m68k-hp-bsd4.4
+ ;;
9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+ case $UNAME_MACHINE in
+ 9000/31?) HP_ARCH=m68000 ;;
+ 9000/[34]??) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
+ if test -x /usr/bin/getconf; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case $sc_cpu_version in
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case $sc_kernel_bits in
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
+ esac ;;
+ esac
fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-
- #define _HPUX_SOURCE
- #include
- #include
-
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
+ if test "$HP_ARCH" = ""; then
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+
+ #define _HPUX_SOURCE
+ #include
+ #include
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
EOF
- (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
- if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
- rm -f $dummy.c $dummy
+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit 0 ;;
+ if test "$HP_ARCH" = hppa2.0w
+ then
+ set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH=hppa2.0w
+ else
+ HP_ARCH=hppa64
+ fi
+ fi
+ GUESS=$HP_ARCH-hp-hpux$HPUX_REV
+ ;;
ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
- exit 0 ;;
+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+ GUESS=ia64-hp-hpux$HPUX_REV
+ ;;
3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
#include
int
main ()
@@ -637,500 +797,791 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- echo unknown-hitachi-hiuxwe2
- exit 0 ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
- echo hppa1.1-hp-bsd
- exit 0 ;;
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ GUESS=unknown-hitachi-hiuxwe2
+ ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
+ GUESS=hppa1.1-hp-bsd
+ ;;
9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
- exit 0 ;;
+ GUESS=hppa1.0-hp-bsd
+ ;;
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
- exit 0 ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
- echo hppa1.1-hp-osf
- exit 0 ;;
+ GUESS=hppa1.0-hp-mpeix
+ ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
+ GUESS=hppa1.1-hp-osf
+ ;;
hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
- exit 0 ;;
+ GUESS=hppa1.0-hp-osf
+ ;;
i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
+ if test -x /usr/sbin/sysversion ; then
+ GUESS=$UNAME_MACHINE-unknown-osf1mk
else
- echo ${UNAME_MACHINE}-unknown-osf1
+ GUESS=$UNAME_MACHINE-unknown-osf1
fi
- exit 0 ;;
+ ;;
parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
- exit 0 ;;
+ GUESS=hppa1.1-hp-lites
+ ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
- exit 0 ;;
+ GUESS=c1-convex-bsd
+ ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit 0 ;;
+ exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- echo c34-convex-bsd
- exit 0 ;;
+ GUESS=c34-convex-bsd
+ ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- echo c38-convex-bsd
- exit 0 ;;
+ GUESS=c38-convex-bsd
+ ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- echo c4-convex-bsd
- exit 0 ;;
+ GUESS=c4-convex-bsd
+ ;;
CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=ymp-cray-unicos$CRAY_REL
+ ;;
CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- CRAY*T3D:*:*:*)
- echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=t90-cray-unicos$CRAY_REL
+ ;;
CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=alphaev5-cray-unicosmk$CRAY_REL
+ ;;
CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=sv1-cray-unicos$CRAY_REL
+ ;;
+ *:UNICOS/mp:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=craynv-cray-unicosmp$CRAY_REL
+ ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit 0 ;;
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
+ GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+ ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+ GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+ ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
+ ;;
sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=sparc-unknown-bsdi$UNAME_RELEASE
+ ;;
*:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
+ ;;
+ arm:FreeBSD:*:*)
+ UNAME_PROCESSOR=`uname -p`
+ set_cc_for_build
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
+ else
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
+ fi
+ ;;
*:FreeBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit 0 ;;
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case $UNAME_PROCESSOR in
+ amd64)
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
+ esac
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
+ ;;
i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit 0 ;;
- i*:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit 0 ;;
+ GUESS=$UNAME_MACHINE-pc-cygwin
+ ;;
+ *:MINGW64*:*)
+ GUESS=$UNAME_MACHINE-pc-mingw64
+ ;;
+ *:MINGW*:*)
+ GUESS=$UNAME_MACHINE-pc-mingw32
+ ;;
+ *:MSYS*:*)
+ GUESS=$UNAME_MACHINE-pc-msys
+ ;;
i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit 0 ;;
- x86:Interix*:3*)
- echo i386-pc-interix3
- exit 0 ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i386-pc-interix
- exit 0 ;;
+ GUESS=$UNAME_MACHINE-pc-pw32
+ ;;
+ *:SerenityOS:*:*)
+ GUESS=$UNAME_MACHINE-pc-serenity
+ ;;
+ *:Interix*:*)
+ case $UNAME_MACHINE in
+ x86)
+ GUESS=i586-pc-interix$UNAME_RELEASE
+ ;;
+ authenticamd | genuineintel | EM64T)
+ GUESS=x86_64-unknown-interix$UNAME_RELEASE
+ ;;
+ IA64)
+ GUESS=ia64-unknown-interix$UNAME_RELEASE
+ ;;
+ esac ;;
i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
- exit 0 ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit 0 ;;
+ GUESS=$UNAME_MACHINE-pc-uwin
+ ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ GUESS=x86_64-pc-cygwin
+ ;;
prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=powerpcle-unknown-solaris2$SUN_REL
+ ;;
*:GNU:*:*)
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit 0 ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit 0 ;;
+ # the GNU system
+ GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
+ GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
+ ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
+ ;;
+ x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
+ GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
+ ;;
+ *:[Mm]anagarm:*:*)
+ GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
+ ;;
+ *:Minix:*:*)
+ GUESS=$UNAME_MACHINE-unknown-minix
+ ;;
+ aarch64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
+ else
+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ ;;
+ avr32*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ cris:Linux:*:*)
+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+ ;;
+ crisv32:Linux:*:*)
+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+ ;;
+ e2k:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ frv:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ hexagon:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ i*86:Linux:*:*)
+ GUESS=$UNAME_MACHINE-pc-linux-$LIBC
+ ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ k1om:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ loongarch32:Linux:*:* | loongarch64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ m32r*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
- mips:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ set_cc_for_build
+ IS_GLIBC=0
+ test x"${LIBC}" = xgnu && IS_GLIBC=1
+ sed 's/^ //' << EOF > "$dummy.c"
#undef CPU
#undef mips
#undef mipsel
+ #undef mips64
+ #undef mips64el
+ #if ${IS_GLIBC} && defined(_ABI64)
+ LIBCABI=gnuabi64
+ #else
+ #if ${IS_GLIBC} && defined(_ABIN32)
+ LIBCABI=gnuabin32
+ #else
+ LIBCABI=${LIBC}
+ #endif
+ #endif
+
+ #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa64r6
+ #else
+ #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa32r6
+ #else
+ #if defined(__mips64)
+ CPU=mips64
+ #else
+ CPU=mips
+ #endif
+ #endif
+ #endif
+
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mipsel
+ MIPS_ENDIAN=el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips
+ MIPS_ENDIAN=
#else
- CPU=
+ MIPS_ENDIAN=
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- rm -f $dummy.c
- test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
+ cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
+ eval "$cc_set_vars"
+ test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
+ ;;
+ mips64el:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ openrisc*:Linux:*:*)
+ GUESS=or1k-unknown-linux-$LIBC
+ ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ padre:Linux:*:*)
+ GUESS=sparc-unknown-linux-$LIBC
+ ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ GUESS=hppa64-unknown-linux-$LIBC
;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit 0 ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit 0 ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit 0 ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
+ PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
+ *) GUESS=hppa-unknown-linux-$LIBC ;;
esac
- exit 0 ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit 0 ;;
+ ;;
+ ppc64:Linux:*:*)
+ GUESS=powerpc64-unknown-linux-$LIBC
+ ;;
+ ppc:Linux:*:*)
+ GUESS=powerpc-unknown-linux-$LIBC
+ ;;
+ ppc64le:Linux:*:*)
+ GUESS=powerpc64le-unknown-linux-$LIBC
+ ;;
+ ppcle:Linux:*:*)
+ GUESS=powerpcle-unknown-linux-$LIBC
+ ;;
+ riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit 0 ;;
+ GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
+ ;;
+ sh64*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ tile*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ vax:Linux:*:*)
+ GUESS=$UNAME_MACHINE-dec-linux-$LIBC
+ ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit 0 ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit 0 ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit 0 ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit 0 ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #ifdef __INTEL_COMPILER
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
+ set_cc_for_build
+ CPU=$UNAME_MACHINE
+ LIBCABI=$LIBC
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ ABI=64
+ sed 's/^ //' << EOF > "$dummy.c"
+ #ifdef __i386__
+ ABI=x86
+ #else
+ #ifdef __ILP32__
+ ABI=x32
+ #endif
+ #endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- rm -f $dummy.c
- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+ cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
+ eval "$cc_set_abi"
+ case $ABI in
+ x86) CPU=i686 ;;
+ x32) LIBCABI=${LIBC}x32 ;;
+ esac
+ fi
+ GUESS=$CPU-pc-linux-$LIBCABI
+ ;;
+ xtensa*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
# sysname and nodename.
- echo i386-sequent-sysv4
- exit 0 ;;
+ GUESS=i386-sequent-sysv4
+ ;;
i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit 0 ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ # Use sysv4.2uw... so that sysv4* matches it.
+ GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
+ ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ GUESS=$UNAME_MACHINE-pc-os2-emx
+ ;;
+ i*86:XTS-300:*:STOP)
+ GUESS=$UNAME_MACHINE-unknown-stop
+ ;;
+ i*86:atheos:*:*)
+ GUESS=$UNAME_MACHINE-unknown-atheos
+ ;;
+ i*86:syllable:*:*)
+ GUESS=$UNAME_MACHINE-pc-syllable
+ ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ GUESS=i386-unknown-lynxos$UNAME_RELEASE
+ ;;
+ i*86:*DOS:*:*)
+ GUESS=$UNAME_MACHINE-pc-msdosdjgpp
+ ;;
+ i*86:*:4.*:*)
+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
fi
- exit 0 ;;
- i*86:*:5:[78]*)
+ ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit 0 ;;
+ GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
- (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
- (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
&& UNAME_MACHINE=i686
- (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
else
- echo ${UNAME_MACHINE}-pc-sysv32
+ GUESS=$UNAME_MACHINE-pc-sysv32
fi
- exit 0 ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit 0 ;;
+ ;;
pc:*:*:*)
# Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i386.
- echo i386-pc-msdosdjgpp
- exit 0 ;;
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configure will decide that
+ # this is a cross-build.
+ GUESS=i586-pc-msdosdjgpp
+ ;;
Intel:Mach:3*:*)
- echo i386-pc-mach3
- exit 0 ;;
+ GUESS=i386-pc-mach3
+ ;;
paragon:*:*:*)
- echo i860-intel-osf1
- exit 0 ;;
+ GUESS=i860-intel-osf1
+ ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4
fi
- exit 0 ;;
+ ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
- echo m68010-convergent-sysv
- exit 0 ;;
- M68*:*:R3V[567]*:*)
- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
+ GUESS=m68010-convergent-sysv
+ ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ GUESS=m68k-convergent-sysv
+ ;;
+ M680?0:D-NIX:5.3:*)
+ GUESS=m68k-diab-dnix
+ ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && echo i486-ncr-sysv4 && exit 0 ;;
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=m68k-unknown-lynxos$UNAME_RELEASE
+ ;;
mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit 0 ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=m68k-atari-sysv4
+ ;;
TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=sparc-unknown-lynxos$UNAME_RELEASE
+ ;;
rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
+ ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
+ ;;
SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=mips-dde-sysv$UNAME_RELEASE
+ ;;
RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
- exit 0 ;;
+ GUESS=mips-sni-sysv4
+ ;;
RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
- exit 0 ;;
+ GUESS=mips-sni-sysv4
+ ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
+ GUESS=$UNAME_MACHINE-sni-sysv4
else
- echo ns32k-sni-sysv
+ GUESS=ns32k-sni-sysv
fi
- exit 0 ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says
- echo i586-unisys-sysv4
- exit 0 ;;
+ ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says
+ GUESS=i586-unisys-sysv4
+ ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes .
# How about differentiating between stratus architectures? -djm
- echo hppa1.1-stratus-sysv4
- exit 0 ;;
+ GUESS=hppa1.1-stratus-sysv4
+ ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
- echo i860-stratus-sysv4
- exit 0 ;;
+ GUESS=i860-stratus-sysv4
+ ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ GUESS=$UNAME_MACHINE-stratus-vos
+ ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
- echo hppa1.1-stratus-vos
- exit 0 ;;
+ GUESS=hppa1.1-stratus-vos
+ ;;
mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=m68k-apple-aux$UNAME_RELEASE
+ ;;
news*:NEWS-OS:6*:*)
- echo mips-sony-newsos6
- exit 0 ;;
+ GUESS=mips-sony-newsos6
+ ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
+ if test -d /usr/nec; then
+ GUESS=mips-nec-sysv$UNAME_RELEASE
else
- echo mips-unknown-sysv${UNAME_RELEASE}
+ GUESS=mips-unknown-sysv$UNAME_RELEASE
fi
- exit 0 ;;
+ ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
- exit 0 ;;
+ GUESS=powerpc-be-beos
+ ;;
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
- exit 0 ;;
+ GUESS=powerpc-apple-beos
+ ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
- exit 0 ;;
+ GUESS=i586-pc-beos
+ ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ GUESS=i586-pc-haiku
+ ;;
+ ppc:Haiku:*:*) # Haiku running on Apple PowerPC
+ GUESS=powerpc-apple-haiku
+ ;;
+ *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat)
+ GUESS=$UNAME_MACHINE-unknown-haiku
+ ;;
SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=sx4-nec-superux$UNAME_RELEASE
+ ;;
SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=sx5-nec-superux$UNAME_RELEASE
+ ;;
+ SX-6:SUPER-UX:*:*)
+ GUESS=sx6-nec-superux$UNAME_RELEASE
+ ;;
+ SX-7:SUPER-UX:*:*)
+ GUESS=sx7-nec-superux$UNAME_RELEASE
+ ;;
+ SX-8:SUPER-UX:*:*)
+ GUESS=sx8-nec-superux$UNAME_RELEASE
+ ;;
+ SX-8R:SUPER-UX:*:*)
+ GUESS=sx8r-nec-superux$UNAME_RELEASE
+ ;;
+ SX-ACE:SUPER-UX:*:*)
+ GUESS=sxace-nec-superux$UNAME_RELEASE
+ ;;
Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
+ ;;
*:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
+ ;;
+ arm64:Darwin:*:*)
+ GUESS=aarch64-apple-darwin$UNAME_RELEASE
+ ;;
*:Darwin:*:*)
- echo `uname -p`-apple-darwin${UNAME_RELEASE}
- exit 0 ;;
+ UNAME_PROCESSOR=`uname -p`
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ if command -v xcode-select > /dev/null 2> /dev/null && \
+ ! xcode-select --print-path > /dev/null 2> /dev/null ; then
+ # Avoid executing cc if there is no toolchain installed as
+ # cc will be a stub that puts up a graphical alert
+ # prompting the user to install developer tools.
+ CC_FOR_BUILD=no_compiler_found
+ else
+ set_cc_for_build
+ fi
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # uname -m returns i386 or x86_64
+ UNAME_PROCESSOR=$UNAME_MACHINE
+ fi
+ GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
+ ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
+ if test "$UNAME_PROCESSOR" = x86; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
+ ;;
*:QNX:*:4*)
- echo i386-pc-qnx
- exit 0 ;;
- NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=i386-pc-qnx
+ ;;
+ NEO-*:NONSTOP_KERNEL:*:*)
+ GUESS=neo-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ GUESS=nse-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSR-*:NONSTOP_KERNEL:*:*)
+ GUESS=nsr-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSV-*:NONSTOP_KERNEL:*:*)
+ GUESS=nsv-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSX-*:NONSTOP_KERNEL:*:*)
+ GUESS=nsx-tandem-nsk$UNAME_RELEASE
+ ;;
*:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit 0 ;;
+ GUESS=mips-compaq-nonstopux
+ ;;
BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit 0 ;;
+ GUESS=bs2000-siemens-sysv
+ ;;
DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit 0 ;;
+ GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
+ ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
- if test "$cputype" = "386"; then
+ if test "${cputype-}" = 386; then
UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
+ elif test "x${cputype-}" != x; then
+ UNAME_MACHINE=$cputype
fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit 0 ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit 0 ;;
+ GUESS=$UNAME_MACHINE-unknown-plan9
+ ;;
*:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit 0 ;;
+ GUESS=pdp10-unknown-tops10
+ ;;
*:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit 0 ;;
+ GUESS=pdp10-unknown-tenex
+ ;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit 0 ;;
+ GUESS=pdp10-dec-tops20
+ ;;
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit 0 ;;
+ GUESS=pdp10-xkl-tops20
+ ;;
*:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit 0 ;;
+ GUESS=pdp10-unknown-tops20
+ ;;
*:ITS:*:*)
- echo pdp10-unknown-its
- exit 0 ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit 0 ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit 0 ;;
+ GUESS=pdp10-unknown-its
+ ;;
+ SEI:*:*:SEIUX)
+ GUESS=mips-sei-seiux$UNAME_RELEASE
+ ;;
+ *:DragonFly:*:*)
+ DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
+ ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case $UNAME_MACHINE in
+ A*) GUESS=alpha-dec-vms ;;
+ I*) GUESS=ia64-dec-vms ;;
+ V*) GUESS=vax-dec-vms ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ GUESS=i386-pc-xenix
+ ;;
+ i*86:skyos:*:*)
+ SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
+ GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
+ ;;
+ i*86:rdos:*:*)
+ GUESS=$UNAME_MACHINE-pc-rdos
+ ;;
+ i*86:Fiwix:*:*)
+ GUESS=$UNAME_MACHINE-pc-fiwix
+ ;;
+ *:AROS:*:*)
+ GUESS=$UNAME_MACHINE-unknown-aros
+ ;;
+ x86_64:VMkernel:*:*)
+ GUESS=$UNAME_MACHINE-unknown-esx
+ ;;
+ amd64:Isilon\ OneFS:*:*)
+ GUESS=x86_64-unknown-onefs
+ ;;
+ *:Unleashed:*:*)
+ GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
+ ;;
esac
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+# Do we have a guess based on uname results?
+if test "x$GUESS" != x; then
+ echo "$GUESS"
+ exit
+fi
-eval $set_cc_for_build
-cat >$dummy.c < "$dummy.c" <
-# include
+#include
+#include
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include
+#if defined(_SIZE_T_) || defined(SIGLOST)
+#include
+#endif
+#endif
#endif
main ()
{
@@ -1143,22 +1594,14 @@ main ()
#include
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
- "4"
+ "4"
#else
- ""
+ ""
#endif
- ); exit (0);
+ ); exit (0);
#endif
#endif
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
#if defined (NeXT)
#if !defined (__ARCHITECTURE__)
#define __ARCHITECTURE__ "m68k"
@@ -1198,39 +1641,54 @@ main ()
#endif
#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
+ struct utsname un;
+ uname(&un);
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
#endif
#if defined (vax)
-# if !defined (ultrix)
-# include
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
+#if !defined (ultrix)
+#include
+#if defined (BSD)
+#if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+#if defined(_SIZE_T_) || defined(SIGLOST)
+ struct utsname un;
+ uname (&un);
+ printf ("vax-dec-ultrix%s\n", un.release); exit (0);
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#if defined(_SIZE_T_) || defined(SIGLOST)
+ struct utsname *un;
+ uname (&un);
+ printf ("mips-dec-ultrix%s\n", un.release); exit (0);
+#else
+ printf ("mips-dec-ultrix\n"); exit (0);
+#endif
+#endif
#endif
#if defined (alliant) && defined (i860)
@@ -1241,52 +1699,46 @@ main ()
}
EOF
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
-rm -f $dummy.c $dummy
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
+ { echo "$SYSTEM_NAME"; exit; }
# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+echo "$0: unable to guess system type" >&2
-# Convex versions that predate uname can use getsysinfo(1)
+case $UNAME_MACHINE:$UNAME_SYSTEM in
+ mips:Linux | mips64:Linux)
+ # If we got here on MIPS GNU/Linux, output extra information.
+ cat >&2 <&2 <&2 < in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
config.guess timestamp = $timestamp
@@ -1305,16 +1757,17 @@ hostinfo = `(hostinfo) 2>/dev/null`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
EOF
+fi
exit 1
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/config.h.in b/config.h.in
index 28805a72..dec6ec2f 100644
--- a/config.h.in
+++ b/config.h.in
@@ -3,6 +3,9 @@
/* Define if you have the strftime function. */
#undef HAVE_STRFTIME
+/* Define to a `signed integer` if stdint.h or inttypes.h don't define */
+#undef intptr_t
+
/* Define to `unsigned' if doesn't define. */
#undef size_t
@@ -18,11 +21,23 @@
/* Define if your declares struct tm. */
#undef TM_IN_SYS_TIME
+/* Define if has a prototype for isblank. */
+#undef HAVE_DECL_ISBLANK
+
+/* Define if has a prototype for strcasecmp. */
+#undef HAVE_DECL_STRCASECMP
+
+/* Define if has a prototype for strcasestr. */
+#undef HAVE_DECL_STRCASESTR
+
#undef HAVE_GDBM_H
#undef HAVE_ICONV
#undef HAVE_ICONV_H
+/* Define if you're using the chardet library */
+#undef HAVE_CHARDET
+
/* Define if you're using the FNV hash library */
#undef HAVE_LIBFNV
@@ -44,12 +59,6 @@
/* Define if you have the mkdir function. */
#undef HAVE_MKDIR
-/* Define if you have the strcasecmp function. */
-#undef HAVE_STRCASECMP
-
-/* Define if you have the strcasestr function. */
-#undef HAVE_STRCASESTR
-
/* Define if you have the strdup function. */
#undef HAVE_STRDUP
@@ -80,6 +89,9 @@
/* Define if you have the header file. */
#undef HAVE_FCNTL_H
+/* Define if you have the header file. */
+#undef HAVE_INTTYPES_H
+
/* Define if you have the header file. */
#undef HAVE_LOCALE_H
@@ -101,12 +113,24 @@
/* Define if you have the header file. */
#undef HAVE_STDARG_H
+/* Define if you have the header file. */
+#undef HAVE_STDINT_H
+
/* Define if you have the header file. */
#undef HAVE_STDIO_H
/* Define if you have the header file. */
#undef HAVE_STDLIB_H
+/* Define if you have the isblank function. */
+#undef HAVE_ISBLANK
+
+/* Define if you have the strcasecmp function. */
+#undef HAVE_STRCASECMP
+
+/* Define if you have the strcasestr function. */
+#undef HAVE_STRCASESTR
+
/* Define if you have the header file. */
#undef HAVE_STRING_H
diff --git a/config.sub b/config.sub
index f3657978..de4259e4 100755
--- a/config.sub
+++ b/config.sub
@@ -1,42 +1,42 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright 1992-2023 Free Software Foundation, Inc.
-timestamp='2002-03-07'
+# shellcheck disable=SC2006,SC2268 # see below for rationale
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine. It does not imply ALL GNU software can.
-#
-# This file 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
+timestamp='2023-01-21'
+
+# This file 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 3 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.
+# 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.
-
+# along with this program; if not, see .
+#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
-# Please send patches to . Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Please send patches to .
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
@@ -52,15 +52,21 @@ timestamp='2002-03-07'
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX. However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -70,8 +76,7 @@ Report bugs and patches to ."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
+Copyright 1992-2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -83,23 +88,23 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
- echo "$timestamp" ; exit 0 ;;
+ echo "$timestamp" ; exit ;;
--version | -v )
- echo "$version" ; exit 0 ;;
+ echo "$version" ; exit ;;
--help | --h* | -h )
- echo "$usage"; exit 0 ;;
+ echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
- echo "$me: invalid option $1$help"
+ echo "$me: invalid option $1$help" >&2
exit 1 ;;
*local*)
# First pass through any local machine types.
- echo $1
- exit 0;;
+ echo "$1"
+ exit ;;
* )
break ;;
@@ -114,932 +119,1186 @@ case $# in
exit 1;;
esac
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
- *)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
+# Split fields of configuration type
+# shellcheck disable=SC2162
+saved_IFS=$IFS
+IFS="-" read field1 field2 field3 field4 <&2
+ exit 1
;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ *-*-*-*)
+ basic_machine=$field1-$field2
+ basic_os=$field3-$field4
;;
- -udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ *-*-*)
+ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+ # parts
+ maybe_os=$field2-$field3
+ case $maybe_os in
+ nto-qnx* | linux-* | uclinux-uclibc* \
+ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+ | storm-chaos* | os2-emx* | rtmk-nova* | managarm-*)
+ basic_machine=$field1
+ basic_os=$maybe_os
+ ;;
+ android-linux)
+ basic_machine=$field1-unknown
+ basic_os=linux-android
+ ;;
+ *)
+ basic_machine=$field1-$field2
+ basic_os=$field3
+ ;;
+ esac
;;
- -isc)
- os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ *-*)
+ # A lone config we happen to match not fitting any pattern
+ case $field1-$field2 in
+ decstation-3100)
+ basic_machine=mips-dec
+ basic_os=
+ ;;
+ *-*)
+ # Second component is usually, but not always the OS
+ case $field2 in
+ # Prevent following clause from handling this valid os
+ sun*os*)
+ basic_machine=$field1
+ basic_os=$field2
+ ;;
+ zephyr*)
+ basic_machine=$field1-unknown
+ basic_os=$field2
+ ;;
+ # Manufacturers
+ dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+ | unicom* | ibm* | next | hp | isi* | apollo | altos* \
+ | convergent* | ncr* | news | 32* | 3600* | 3100* \
+ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+ | ultra | tti* | harris | dolphin | highlevel | gould \
+ | cbm | ns | masscomp | apple | axis | knuth | cray \
+ | microblaze* | sim | cisco \
+ | oki | wec | wrs | winbond)
+ basic_machine=$field1-$field2
+ basic_os=
+ ;;
+ *)
+ basic_machine=$field1
+ basic_os=$field2
+ ;;
+ esac
+ ;;
+ esac
;;
- -clix*)
- basic_machine=clipper-intergraph
+ *)
+ # Convert single-component short-hands not valid as part of
+ # multi-component configurations.
+ case $field1 in
+ 386bsd)
+ basic_machine=i386-pc
+ basic_os=bsd
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ basic_os=udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ basic_os=scout
+ ;;
+ alliant)
+ basic_machine=fx80-alliant
+ basic_os=
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ basic_os=
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ basic_os=bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ basic_os=sysv
+ ;;
+ amiga)
+ basic_machine=m68k-unknown
+ basic_os=
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ basic_os=amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ basic_os=sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ basic_os=sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ basic_os=bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ basic_os=aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ basic_os=aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ basic_os=dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ basic_os=linux
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ basic_os=cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ basic_os=bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ basic_os=bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ basic_os=bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ basic_os=bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ basic_os=bsd
+ ;;
+ cray)
+ basic_machine=j90-cray
+ basic_os=unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ basic_os=
+ ;;
+ da30)
+ basic_machine=m68k-da30
+ basic_os=
+ ;;
+ decstation | pmax | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ basic_os=
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ basic_os=sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ basic_os=dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ basic_os=msdosdjgpp
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ basic_os=ebmon
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ basic_os=ose
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ basic_os=sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ basic_os=go32
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ basic_os=hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ basic_os=xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ basic_os=hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ basic_os=sysv3
+ ;;
+ hp300 | hp300hpux)
+ basic_machine=m68k-hp
+ basic_os=hpux
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ basic_os=bsd
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ basic_os=osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ basic_os=proelf
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ basic_os=mach
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ basic_os=sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ basic_os=linux
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ basic_os=sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ basic_os=sysv
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ basic_os=mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ basic_os=mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ basic_os=mingw32ce
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ basic_os=coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ basic_os=morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ basic_os=moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ basic_os=msdos
+ ;;
+ msys)
+ basic_machine=i686-pc
+ basic_os=msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ basic_os=mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ basic_os=nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ basic_os=sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-pc
+ basic_os=netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ basic_os=linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ basic_os=newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ basic_os=newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ basic_os=sysv
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ basic_os=cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ basic_os=cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ basic_os=nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ basic_os=mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ basic_os=nonstopux
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ basic_os=os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ basic_os=ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ basic_os=os68k
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ basic_os=osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ basic_os=linux
+ ;;
+ psp)
+ basic_machine=mipsallegrexel-sony
+ basic_os=psp
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ basic_os=pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ basic_os=rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ basic_os=rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ basic_os=coff
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ basic_os=udi
+ ;;
+ sei)
+ basic_machine=mips-sei
+ basic_os=seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ basic_os=
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ basic_os=sysv2
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ basic_os=
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ basic_os=sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ basic_os=
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ basic_os=sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ basic_os=sunos4
+ ;;
+ sun3)
+ basic_machine=m68k-sun
+ basic_os=
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ basic_os=sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ basic_os=sunos4
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ basic_os=
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ basic_os=sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ basic_os=sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ basic_os=solaris2
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ basic_os=
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ basic_os=unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ basic_os=dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ basic_os=unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ basic_os=unicos
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ basic_os=tops20
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ basic_os=tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ basic_os=udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ basic_os=sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ basic_os=none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ basic_os=sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ basic_os=vms
+ ;;
+ vsta)
+ basic_machine=i386-pc
+ basic_os=vsta
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ basic_os=vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ basic_os=vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ basic_os=vxworks
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ basic_os=mingw32
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ basic_os=unicos
+ ;;
+ *)
+ basic_machine=$1
+ basic_os=
+ ;;
+ esac
;;
- -isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+esac
+
+# Decode 1-component or ad-hoc basic machines
+case $basic_machine in
+ # Here we handle the default manufacturer of certain CPU types. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ cpu=hppa1.1
+ vendor=winbond
;;
- -lynx*)
- os=-lynxos
+ op50n)
+ cpu=hppa1.1
+ vendor=oki
;;
- -ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ op60c)
+ cpu=hppa1.1
+ vendor=oki
;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ibm*)
+ cpu=i370
+ vendor=ibm
;;
- -psos*)
- os=-psos
+ orion105)
+ cpu=clipper
+ vendor=highlevel
;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
+ mac | mpw | mac-mpw)
+ cpu=m68k
+ vendor=apple
;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
- # Recognize the basic CPU types without company name.
- # Some are omitted here because they have special meanings below.
- 1750a | 580 \
- | a29k \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
- | c4x | clipper \
- | d10v | d30v | dsp16xx \
- | fr30 \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | i370 | i860 | i960 | ia64 \
- | m32r | m68000 | m68k | m88k | mcore \
- | mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
- | mips64vr4100 | mips64vr4100el | mips64vr4300 \
- | mips64vr4300el | mips64vr5000 | mips64vr5000el \
- | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
- | mipsisa32 | mipsisa64 \
- | mn10200 | mn10300 \
- | ns16k | ns32k \
- | openrisc | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- | pyramid \
- | sh | sh[34] | sh[34]eb | shbe | shle | sh64 \
- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
- | strongarm \
- | tahoe | thumb | tic80 | tron \
- | v850 | v850e \
- | we32k \
- | x86 | xscale | xstormy16 | xtensa \
- | z8k)
- basic_machine=$basic_machine-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12)
- # Motorola 68HC11/12.
- basic_machine=$basic_machine-unknown
- os=-none
- ;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ pmac | pmac-mpw)
+ cpu=powerpc
+ vendor=apple
;;
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
- # Recognize the basic CPU types with company name.
- 580-* \
- | a29k-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armv*-* \
- | avr-* \
- | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c54x-* \
- | clipper-* | cydra-* \
- | d10v-* | d30v-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fr30-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | i*86-* | i860-* | i960-* | ia64-* \
- | m32r-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | mcore-* \
- | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
- | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
- | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
- | pyramid-* \
- | romp-* | rs6000-* \
- | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \
- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
- | v850-* | v850e-* | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
- | xtensa-* \
- | ymp-* \
- | z8k-*)
- ;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-unknown
- os=-bsd
- ;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- basic_machine=m68000-att
+ cpu=m68000
+ vendor=att
;;
3b*)
- basic_machine=we32k-att
- ;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
- alliant | fx80)
- basic_machine=fx80-alliant
- ;;
- altos | altos3068)
- basic_machine=m68k-altos
- ;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
- ;;
- amiga | amiga-*)
- basic_machine=m68k-unknown
- ;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
+ cpu=we32k
+ vendor=att
;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- convex-c1)
- basic_machine=c1-convex
- os=-bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- os=-bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- os=-bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- os=-bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
- basic_machine=mips-dec
+ bluegene*)
+ cpu=powerpc
+ vendor=ibm
+ basic_os=cnk
;;
decsystem10* | dec10*)
- basic_machine=pdp10-dec
- os=-tops10
+ cpu=pdp10
+ vendor=dec
+ basic_os=tops10
;;
decsystem20* | dec20*)
- basic_machine=pdp10-dec
- os=-tops20
+ cpu=pdp10
+ vendor=dec
+ basic_os=tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
- basic_machine=m68k-motorola
- ;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
- dpx20 | dpx20-*)
- basic_machine=rs6000-bull
- os=-bosx
+ cpu=m68k
+ vendor=motorola
;;
- dpx2* | dpx2*-bull)
- basic_machine=m68k-bull
- os=-sysv3
- ;;
- ebmon29k)
- basic_machine=a29k-amd
- os=-ebmon
- ;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
+ dpx2*)
+ cpu=m68k
+ vendor=bull
+ basic_os=sysv3
;;
encore | umax | mmax)
- basic_machine=ns32k-encore
+ cpu=ns32k
+ vendor=encore
;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
+ elxsi)
+ cpu=elxsi
+ vendor=elxsi
+ basic_os=${basic_os:-bsd}
;;
fx2800)
- basic_machine=i860-alliant
+ cpu=i860
+ vendor=alliant
;;
genix)
- basic_machine=ns32k-ns
- ;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
+ cpu=ns32k
+ vendor=ns
;;
h3050r* | hiux*)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
- ;;
- hp300-*)
- basic_machine=m68k-hp
- ;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
+ cpu=hppa1.1
+ vendor=hitachi
+ basic_os=hiuxwe2
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
- basic_machine=hppa1.0-hp
+ cpu=hppa1.0
+ vendor=hp
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
- basic_machine=m68000-hp
+ cpu=m68000
+ vendor=hp
;;
hp9k3[2-9][0-9])
- basic_machine=m68k-hp
+ cpu=m68k
+ vendor=hp
;;
hp9k6[0-9][0-9] | hp6[0-9][0-9])
- basic_machine=hppa1.0-hp
+ cpu=hppa1.0
+ vendor=hp
;;
hp9k7[0-79][0-9] | hp7[0-79][0-9])
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k78[0-9] | hp78[0-9])
# FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
# FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k8[0-9][13679] | hp8[0-9][13679])
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hppa-next)
- os=-nextstep3
+ cpu=hppa1.0
+ vendor=hp
;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
- i370-ibm* | ibm*)
- basic_machine=i370-ibm
- ;;
-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=sysv32
;;
i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=sysv4
;;
i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=sysv
;;
i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-solaris2
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=solaris2
;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
- ;;
- i386-vsta | vsta)
- basic_machine=i386-unknown
- os=-vsta
+ j90 | j90-cray)
+ cpu=j90
+ vendor=cray
+ basic_os=${basic_os:-unicos}
;;
iris | iris4d)
- basic_machine=mips-sgi
- case $os in
- -irix*)
+ cpu=mips
+ vendor=sgi
+ case $basic_os in
+ irix*)
;;
*)
- os=-irix4
+ basic_os=irix4
;;
esac
;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=-sysv
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
miniframe)
- basic_machine=m68000-convergent
- ;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
- mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
- ;;
- mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
- mmix*)
- basic_machine=mmix-knuth
- os=-mmixware
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
+ cpu=m68000
+ vendor=convergent
;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
+ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ cpu=m68k
+ vendor=atari
+ basic_os=mint
;;
news-3600 | risc-news)
- basic_machine=mips-sony
- os=-newsos
- ;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
- ;;
- next | m*-next )
- basic_machine=m68k-next
- case $os in
- -nextstep* )
+ cpu=mips
+ vendor=sony
+ basic_os=newsos
+ ;;
+ next | m*-next)
+ cpu=m68k
+ vendor=next
+ case $basic_os in
+ openstep*)
+ ;;
+ nextstep*)
;;
- -ns2*)
- os=-nextstep2
+ ns2*)
+ basic_os=nextstep2
;;
*)
- os=-nextstep3
+ basic_os=nextstep3
;;
esac
;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
np1)
- basic_machine=np1-gould
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
+ cpu=np1
+ vendor=gould
;;
op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- or32 | or32-*)
- basic_machine=or32-unknown
- os=-coff
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
+ cpu=hppa1.1
+ vendor=oki
+ basic_os=proelf
;;
pa-hitachi)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
+ cpu=hppa1.1
+ vendor=hitachi
+ basic_os=hiuxwe2
;;
pbd)
- basic_machine=sparc-tti
+ cpu=sparc
+ vendor=tti
;;
pbb)
- basic_machine=m68k-tti
- ;;
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
- ;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2)
- basic_machine=i686-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ cpu=m68k
+ vendor=tti
;;
- pentiumii-* | pentium2-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ pc532)
+ cpu=ns32k
+ vendor=pc532
;;
pn)
- basic_machine=pn-gould
+ cpu=pn
+ vendor=gould
;;
- power) basic_machine=power-ibm
+ power)
+ cpu=power
+ vendor=ibm
;;
- ppc) basic_machine=powerpc-unknown
- ;;
- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ps2)
+ cpu=i386
+ vendor=ibm
;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
- basic_machine=powerpcle-unknown
- ;;
- ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ rm[46]00)
+ cpu=mips
+ vendor=siemens
;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ rtpc | rtpc-*)
+ cpu=romp
+ vendor=ibm
;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
- basic_machine=powerpc64le-unknown
- ;;
- ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ sde)
+ cpu=mipsisa32
+ vendor=sde
+ basic_os=${basic_os:-elf}
;;
- ps2)
- basic_machine=i386-ibm
+ simso-wrs)
+ cpu=sparclite
+ vendor=wrs
+ basic_os=vxworks
;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
+ tower | tower-32)
+ cpu=m68k
+ vendor=ncr
;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
+ vpp*|vx|vx-*)
+ cpu=f301
+ vendor=fujitsu
;;
- rm[46]00)
- basic_machine=mips-siemens
+ w65)
+ cpu=w65
+ vendor=wdc
;;
- rtpc | rtpc-*)
- basic_machine=romp-ibm
+ w89k-*)
+ cpu=hppa1.1
+ vendor=winbond
+ basic_os=proelf
;;
- s390 | s390-*)
- basic_machine=s390-ibm
+ none)
+ cpu=none
+ vendor=none
;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
+ leon|leon[3-9])
+ cpu=sparc
+ vendor=$basic_machine
;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
+ leon-*|leon[3-9]-*)
+ cpu=sparc
+ vendor=`echo "$basic_machine" | sed 's/-.*//'`
;;
- sequent)
- basic_machine=i386-sequent
+
+ *-*)
+ # shellcheck disable=SC2162
+ saved_IFS=$IFS
+ IFS="-" read cpu vendor <&2
- exit 1
+ # Recognize the canonical CPU types that are allowed with any
+ # company name.
+ case $cpu in
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | abacus \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+ | alphapca5[67] | alpha64pca5[67] \
+ | am33_2.0 \
+ | amdgcn \
+ | arc | arceb | arc32 | arc64 \
+ | arm | arm[lb]e | arme[lb] | armv* \
+ | avr | avr32 \
+ | asmjs \
+ | ba \
+ | be32 | be64 \
+ | bfin | bpf | bs2000 \
+ | c[123]* | c30 | [cjt]90 | c4x \
+ | c8051 | clipper | craynv | csky | cydra \
+ | d10v | d30v | dlx | dsp16xx \
+ | e2k | elxsi | epiphany \
+ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+ | h8300 | h8500 \
+ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i*86 | i860 | i960 | ia16 | ia64 \
+ | ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
+ | lm32 \
+ | loongarch32 | loongarch64 \
+ | m32c | m32r | m32rle \
+ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
+ | m88110 | m88k | maxq | mb | mcore | mep | metag \
+ | microblaze | microblazeel \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64eb | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r3 | mipsisa32r3el \
+ | mipsisa32r5 | mipsisa32r5el \
+ | mipsisa32r6 | mipsisa32r6el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r3 | mipsisa64r3el \
+ | mipsisa64r5 | mipsisa64r5el \
+ | mipsisa64r6 | mipsisa64r6el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mmix \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nfp \
+ | nios | nios2 | nios2eb | nios2el \
+ | none | np1 | ns16k | ns32k | nvptx \
+ | open8 \
+ | or1k* \
+ | or32 \
+ | orion \
+ | picochip \
+ | pdp10 | pdp11 | pj | pjl | pn | power \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+ | pru \
+ | pyramid \
+ | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
+ | rl78 | romp | rs6000 | rx \
+ | s390 | s390x \
+ | score \
+ | sh | shl \
+ | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+ | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+ | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+ | spu \
+ | tahoe \
+ | thumbv7* \
+ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+ | tron \
+ | ubicom32 \
+ | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+ | vax \
+ | visium \
+ | w65 \
+ | wasm32 | wasm64 \
+ | we32k \
+ | x86 | x86_64 | xc16x | xgate | xps100 \
+ | xstormy16 | xtensa* \
+ | ymp \
+ | z8k | z80)
+ ;;
+
+ *)
+ echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+ exit 1
+ ;;
+ esac
;;
esac
# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
- *-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+case $vendor in
+ digital*)
+ vendor=dec
;;
- *-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ commodore*)
+ vendor=cbm
;;
*)
;;
@@ -1047,165 +1306,219 @@ esac
# Decode manufacturer-specific aliases for certain operating systems.
-if [ x"$os" != x"" ]
+if test x$basic_os != x
then
+
+# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
+# set os.
+case $basic_os in
+ gnu/linux*)
+ kernel=linux
+ os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
+ ;;
+ os2-emx)
+ kernel=os2
+ os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
+ ;;
+ nto-qnx*)
+ kernel=nto
+ os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
+ ;;
+ *-*)
+ # shellcheck disable=SC2162
+ saved_IFS=$IFS
+ IFS="-" read kernel os <&2
- exit 1
+ # No normalization, but not necessarily accepted, that comes below.
;;
esac
+
else
# Here we handle the default operating systems that come with various machines.
@@ -1218,225 +1531,376 @@ else
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
-case $basic_machine in
+kernel=
+case $cpu-$vendor in
+ score-*)
+ os=elf
+ ;;
+ spu-*)
+ os=elf
+ ;;
*-acorn)
- os=-riscix1.2
+ os=riscix1.2
;;
arm*-rebel)
- os=-linux
+ kernel=linux
+ os=gnu
;;
arm*-semi)
- os=-aout
+ os=aout
+ ;;
+ c4x-* | tic4x-*)
+ os=coff
+ ;;
+ c8051-*)
+ os=elf
+ ;;
+ clipper-intergraph)
+ os=clix
+ ;;
+ hexagon-*)
+ os=elf
+ ;;
+ tic54x-*)
+ os=coff
+ ;;
+ tic55x-*)
+ os=coff
+ ;;
+ tic6x-*)
+ os=coff
;;
# This must come before the *-dec entry.
pdp10-*)
- os=-tops20
+ os=tops20
;;
- pdp11-*)
- os=-none
+ pdp11-*)
+ os=none
;;
*-dec | vax-*)
- os=-ultrix4.2
+ os=ultrix4.2
;;
m68*-apollo)
- os=-domain
+ os=domain
;;
i386-sun)
- os=-sunos4.0.2
+ os=sunos4.0.2
;;
m68000-sun)
- os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
+ os=sunos3
;;
m68*-cisco)
- os=-aout
+ os=aout
+ ;;
+ mep-*)
+ os=elf
;;
mips*-cisco)
- os=-elf
+ os=elf
;;
mips*-*)
- os=-elf
+ os=elf
;;
or32-*)
- os=-coff
+ os=coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
+ os=sysv3
;;
sparc-* | *-sun)
- os=-sunos4.1.1
+ os=sunos4.1.1
+ ;;
+ pru-*)
+ os=elf
;;
*-be)
- os=-beos
+ os=beos
;;
*-ibm)
- os=-aix
+ os=aix
+ ;;
+ *-knuth)
+ os=mmixware
;;
*-wec)
- os=-proelf
+ os=proelf
;;
*-winbond)
- os=-proelf
+ os=proelf
;;
*-oki)
- os=-proelf
+ os=proelf
;;
*-hp)
- os=-hpux
+ os=hpux
;;
*-hitachi)
- os=-hiux
+ os=hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
+ os=sysv
;;
*-cbm)
- os=-amigaos
+ os=amigaos
;;
*-dg)
- os=-dgux
+ os=dgux
;;
*-dolphin)
- os=-sysv3
+ os=sysv3
;;
m68k-ccur)
- os=-rtu
+ os=rtu
;;
m88k-omron*)
- os=-luna
+ os=luna
;;
- *-next )
- os=-nextstep
+ *-next)
+ os=nextstep
;;
*-sequent)
- os=-ptx
+ os=ptx
;;
*-crds)
- os=-unos
+ os=unos
;;
*-ns)
- os=-genix
+ os=genix
;;
i370-*)
- os=-mvs
- ;;
- *-next)
- os=-nextstep3
+ os=mvs
;;
- *-gould)
- os=-sysv
+ *-gould)
+ os=sysv
;;
- *-highlevel)
- os=-bsd
+ *-highlevel)
+ os=bsd
;;
*-encore)
- os=-bsd
+ os=bsd
;;
- *-sgi)
- os=-irix
+ *-sgi)
+ os=irix
;;
- *-siemens)
- os=-sysv4
+ *-siemens)
+ os=sysv4
;;
*-masscomp)
- os=-rtu
+ os=rtu
;;
f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
+ os=uxpv
;;
*-rom68k)
- os=-coff
+ os=coff
;;
*-*bug)
- os=-coff
+ os=coff
;;
*-apple)
- os=-macos
+ os=macos
;;
*-atari*)
- os=-mint
+ os=mint
+ ;;
+ *-wrs)
+ os=vxworks
;;
*)
- os=-none
+ os=none
;;
esac
+
fi
+# Now, validate our (potentially fixed-up) OS.
+case $os in
+ # Sometimes we do "kernel-libc", so those need to count as OSes.
+ musl* | newlib* | relibc* | uclibc*)
+ ;;
+ # Likewise for "kernel-abi"
+ eabi* | gnueabi*)
+ ;;
+ # VxWorks passes extra cpu info in the 4th filed.
+ simlinux | simwindows | spe)
+ ;;
+ # Now accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST end in a * to match a version number.
+ gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
+ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
+ | hiux* | abug | nacl* | netware* | windows* \
+ | os9* | macos* | osx* | ios* \
+ | mpw* | magic* | mmixware* | mon960* | lnews* \
+ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+ | aos* | aros* | cloudabi* | sortix* | twizzler* \
+ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+ | mirbsd* | netbsd* | dicos* | openedition* | ose* \
+ | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
+ | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
+ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+ | udi* | lites* | ieee* | go32* | aux* | hcos* \
+ | chorusrdb* | cegcc* | glidix* | serenity* \
+ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+ | midipix* | mingw32* | mingw64* | mint* \
+ | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+ | interix* | uwin* | mks* | rhapsody* | darwin* \
+ | openstep* | oskit* | conix* | pw32* | nonstopux* \
+ | storm-chaos* | tops10* | tenex* | tops20* | its* \
+ | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
+ | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
+ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
+ | fiwix* | mlibc* )
+ ;;
+ # This one is extra strict with allowed versions
+ sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ ;;
+ none)
+ ;;
+ kernel* )
+ # Restricted further below
+ ;;
+ *)
+ echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# As a final step for OS-related things, validate the OS-kernel combination
+# (given a valid OS), if there is a kernel.
+case $kernel-$os in
+ linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
+ | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* )
+ ;;
+ uclinux-uclibc* )
+ ;;
+ managarm-mlibc* | managarm-kernel* )
+ ;;
+ -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* )
+ # These are just libc implementations, not actual OSes, and thus
+ # require a kernel.
+ echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
+ exit 1
+ ;;
+ -kernel* )
+ echo "Invalid configuration \`$1': \`$os' needs explicit kernel." 1>&2
+ exit 1
+ ;;
+ *-kernel* )
+ echo "Invalid configuration \`$1': \`$kernel' does not support \`$os'." 1>&2
+ exit 1
+ ;;
+ kfreebsd*-gnu* | kopensolaris*-gnu*)
+ ;;
+ vxworks-simlinux | vxworks-simwindows | vxworks-spe)
+ ;;
+ nto-qnx*)
+ ;;
+ os2-emx)
+ ;;
+ *-eabi* | *-gnueabi*)
+ ;;
+ -*)
+ # Blank kernel with real OS is always fine.
+ ;;
+ *-*)
+ echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+ exit 1
+ ;;
+esac
+
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
- *-unknown)
- case $os in
- -riscix*)
+case $vendor in
+ unknown)
+ case $cpu-$os in
+ *-riscix*)
vendor=acorn
;;
- -sunos*)
+ *-sunos*)
vendor=sun
;;
- -aix*)
+ *-cnk* | *-aix*)
vendor=ibm
;;
- -beos*)
+ *-beos*)
vendor=be
;;
- -hpux*)
+ *-hpux*)
vendor=hp
;;
- -mpeix*)
+ *-mpeix*)
vendor=hp
;;
- -hiux*)
+ *-hiux*)
vendor=hitachi
;;
- -unos*)
+ *-unos*)
vendor=crds
;;
- -dgux*)
+ *-dgux*)
vendor=dg
;;
- -luna*)
+ *-luna*)
vendor=omron
;;
- -genix*)
+ *-genix*)
vendor=ns
;;
- -mvs* | -opened*)
+ *-clix*)
+ vendor=intergraph
+ ;;
+ *-mvs* | *-opened*)
vendor=ibm
;;
- -ptx*)
+ *-os400*)
+ vendor=ibm
+ ;;
+ s390-* | s390x-*)
+ vendor=ibm
+ ;;
+ *-ptx*)
vendor=sequent
;;
- -vxsim* | -vxworks*)
+ *-tpf*)
+ vendor=ibm
+ ;;
+ *-vxsim* | *-vxworks* | *-windiss*)
vendor=wrs
;;
- -aux*)
+ *-aux*)
vendor=apple
;;
- -hms*)
+ *-hms*)
vendor=hitachi
;;
- -mpw* | -macos*)
+ *-mpw* | *-macos*)
vendor=apple
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
vendor=atari
;;
- -vos*)
+ *-vos*)
vendor=stratus
;;
esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
esac
-echo $basic_machine$os
-exit 0
+echo "$cpu-$vendor-${kernel:+$kernel-}$os"
+exit
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/configure b/configure
index 7858d04e..c8aceae3 100755
--- a/configure
+++ b/configure
@@ -1,10 +1,11 @@
#! /bin/sh
# From configure.ac Revision: 1.2 .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69.
+# Generated by GNU Autoconf 2.71.
#
#
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -15,14 +16,16 @@
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else
+else $as_nop
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
@@ -32,46 +35,46 @@ esac
fi
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -80,13 +83,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
@@ -95,8 +91,12 @@ case $0 in #((
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
done
IFS=$as_save_IFS
@@ -108,30 +108,10 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# Use a proper internal environment variable to ensure we don't fall
# into an infinite loop, continuously re-executing ourselves.
@@ -153,20 +133,22 @@ esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
# We don't want this to propagate to other subprocesses.
{ _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ as_bourne_compatible="as_nop=:
+if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
# is contrary to our usage. Disable this feature.
alias -g '\${1+\"\$@\"}'='\"\$@\"'
setopt NO_GLOB_SUBST
-else
+else \$as_nop
case \`(set -o) 2>/dev/null\` in #(
*posix*) :
set -o posix ;; #(
@@ -186,42 +168,53 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+if ( set x; as_fn_ret_success y && test x = \"\$1\" )
+then :
-else
+else \$as_nop
exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1
+blah=\$(echo \$(echo blah))
+test x\"\$blah\" = xblah || exit 1
test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
test \$(( 1 + 1 )) = 2 || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
+ if (eval "$as_required") 2>/dev/null
+then :
as_have_required=yes
-else
+else $as_nop
as_have_required=no
fi
- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
+then :
-else
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
as_found=:
case $as_dir in #(
/*)
for as_base in sh bash ksh sh5; do
# Try only shells that exist, to save several forks.
- as_shell=$as_dir/$as_base
+ as_shell=$as_dir$as_base
if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
CONFIG_SHELL=$as_shell as_have_required=yes
- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
+then :
break 2
fi
fi
@@ -229,14 +222,21 @@ fi
esac
as_found=false
done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
- CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi
+fi
- if test "x$CONFIG_SHELL" != x; then :
+ if test "x$CONFIG_SHELL" != x
+then :
export CONFIG_SHELL
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
@@ -254,18 +254,19 @@ esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi
- if test x$as_have_required = xno; then :
- $as_echo "$0: This script requires a shell more modern than all"
- $as_echo "$0: the shells that I found on your system."
- if test x${ZSH_VERSION+set} = xset ; then
- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
- $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ if test x$as_have_required = xno
+then :
+ printf "%s\n" "$0: This script requires a shell more modern than all"
+ printf "%s\n" "$0: the shells that I found on your system."
+ if test ${ZSH_VERSION+y} ; then
+ printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+ printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system,
$0: including any error possibly output before this
$0: message. Then install a modern shell, or manually run
$0: the script under such a shell if you do have one."
@@ -292,6 +293,7 @@ as_fn_unset ()
}
as_unset=as_fn_unset
+
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -309,6 +311,14 @@ as_fn_exit ()
as_fn_set_status $1
exit $1
} # as_fn_exit
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
# as_fn_mkdir_p
# -------------
@@ -323,7 +333,7 @@ as_fn_mkdir_p ()
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -332,7 +342,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -371,12 +381,13 @@ as_fn_executable_p ()
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
-else
+else $as_nop
as_fn_append ()
{
eval $1=\$$1\$2
@@ -388,18 +399,27 @@ fi # as_fn_append
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
-else
+else $as_nop
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
}
fi # as_fn_arith
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
@@ -411,9 +431,9 @@ as_fn_error ()
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $2" >&2
+ printf "%s\n" "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -440,7 +460,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -484,7 +504,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
# already done that, so ensure we don't try to do so again and fall
@@ -498,6 +518,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
exit
}
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
@@ -511,6 +535,13 @@ case `echo -n x` in #(((((
ECHO_N='-n';;
esac
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -636,52 +667,48 @@ MFLAGS=
MAKEFLAGS=
# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-PACKAGE_URL=
+PACKAGE_NAME=''
+PACKAGE_TARNAME=''
+PACKAGE_VERSION=''
+PACKAGE_STRING=''
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
ac_unique_file="src/hypermail.c"
ac_default_prefix=/usr/local
enable_option_checking=no
# Factoring default headers for most tests.
ac_includes_default="\
-#include
-#ifdef HAVE_SYS_TYPES_H
-# include
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include
+#include
+#ifdef HAVE_STDIO_H
+# include
#endif
-#ifdef STDC_HEADERS
+#ifdef HAVE_STDLIB_H
# include
-# include
-#else
-# ifdef HAVE_STDLIB_H
-# include
-# endif
#endif
#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-# include
-# endif
# include
#endif
-#ifdef HAVE_STRINGS_H
-# include
-#endif
#ifdef HAVE_INTTYPES_H
# include
#endif
#ifdef HAVE_STDINT_H
# include
#endif
+#ifdef HAVE_STRINGS_H
+# include
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include
+#endif
#ifdef HAVE_UNISTD_H
# include
#endif"
+ac_header_c_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
INCLUDES
@@ -689,8 +716,8 @@ EXTRA_LIBS
HAVE_STRERROR
HAVE_MEMMOVE
FNV_DEP
-PCRE_DEP
-PCRE_CONFIG
+PCRE2_DEP
+PCRE2_CONFIG
TRIO_DEP
EGREP
GREP
@@ -698,10 +725,10 @@ domainaddr
defaultindex
htmlsuffix
language
-cgidir
httpddir
suffix
INSTALL
+PKGCONF
RANLIB
AR
SET_MAKE
@@ -776,17 +803,16 @@ ac_user_opts='
enable_option_checking
enable_warnings
with_httpddir
-with_cgidir
with_htmldir
with_language
with_htmlsuffix
enable_defaultindex
with_domainaddr
with_gdbm
-enable_i18n
enable_system_libtrio
enable_bundled_pcre
-with_external_pcre
+with_external_pcre2
+with_libchardet
enable_libfnv
'
ac_precious_vars='build_alias
@@ -868,8 +894,6 @@ do
*) ac_optarg=yes ;;
esac
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
case $ac_dashdash$ac_option in
--)
ac_dashdash=yes ;;
@@ -910,9 +934,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
@@ -936,9 +960,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
@@ -1149,9 +1173,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
@@ -1165,9 +1189,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
@@ -1211,9 +1235,9 @@ Try \`$0 --help' for more information"
*)
# FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
: "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
@@ -1229,7 +1253,7 @@ if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1293,7 +1317,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_myself" : 'X\(//\)[^/]' \| \
X"$as_myself" : 'X\(//\)$' \| \
X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
+printf "%s\n" X"$as_myself" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -1425,28 +1449,29 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-warnings Enable -Wall if using gcc.
--enable-defaultindex=type Default index page type thread
- --disable-i18n Disable I18N support
--enable-system-libtrio Use the system libtrio instead of compiling the
bundled one
- --enable-bundled-pcre Force the use of the bundled PCRE library instead of
- the system one
- --enable-libfnv use the fnv hash library for generating
- non-sequential filenames [no]
+ --enable-bundled-pcre2 Force the use of the bundled PCRE2 library instead
+ of the system one
+ --enable-libfnv (EXPERIMENTAL, UNMAINTAINED) use the fnv hash
+ library for generating non-sequential filenames [no]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-httpddir=DIR webserver's root directory /usr/local/apache
- --with-cgidir=DIR where to install CGI scripts
--with-htmldir=DIR where to install Hypermail HTML pages
--with-language=xx two character language indicator en
--with-htmlsuffix=xx two character language indicator html
--with-domainaddr=YOURDOMAIN domain address of local domain
- --with-gdbm=DIR Include GDBM support
- --with-external-pcre=PATH_TO_PCRE_DIR|PATH_TO_PCRE_CONFIG_SCRIPT
- Use an external PCRE library instead of the system
+ --with-gdbm=DIR (UNMAINTAINED) Include GDBM support
+ --with-external-pcre2=PATH_TO_PCRE2_DIR|PATH_TO_PCRE2_CONFIG_SCRIPT
+ Use an external PCRE2 library instead of the system
or the bundled one
+ --with-libchardet=DIR Use libchardet for character set detection, optional
+ DIR points to path to local installed libchardet;
+ leave empty for using system libchardet
Some influential environment variables:
CC C compiler command
@@ -1483,9 +1508,9 @@ if test "$ac_init_help" = "recursive"; then
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1513,7 +1538,8 @@ esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
+ # Check for configure.gnu first; this name is used for a wrapper for
+ # Metaconfig's "Configure" on case-insensitive file systems.
if test -f "$ac_srcdir/configure.gnu"; then
echo &&
$SHELL "$ac_srcdir/configure.gnu" --help=recursive
@@ -1521,7 +1547,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
echo &&
$SHELL "$ac_srcdir/configure" --help=recursive
else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi || ac_status=$?
cd "$ac_pwd" || { ac_status=$?; break; }
done
@@ -1531,9 +1557,9 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
configure
-generated by GNU Autoconf 2.69
+generated by GNU Autoconf 2.71
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1550,14 +1576,14 @@ fi
ac_fn_c_try_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
+ rm -f conftest.$ac_objext conftest.beam
if { { ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -1565,14 +1591,15 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
+ } && test -s conftest.$ac_objext
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -1594,7 +1621,7 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -1602,14 +1629,15 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } > conftest.i && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
- }; then :
+ }
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -1621,8 +1649,8 @@ fi
# ac_fn_c_try_run LINENO
# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
+# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
+# executables *can* be run.
ac_fn_c_try_run ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
@@ -1632,25 +1660,26 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
{ { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then :
ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: program exited with status $ac_status" >&5
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=$ac_status
@@ -1661,93 +1690,6 @@ fi
} # ac_fn_c_try_run
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval \${$3+:} false; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_header_compiler=yes
-else
- ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
- yes:no: )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_mongrel
-
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
@@ -1755,26 +1697,28 @@ fi
ac_fn_c_check_header_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$3=yes"
-else
+else $as_nop
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_compile
@@ -1785,14 +1729,14 @@ $as_echo "$ac_res" >&6; }
ac_fn_c_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
+ rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -1800,17 +1744,18 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
test -x conftest$ac_exeext
- }; then :
+ }
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -1825,17 +1770,70 @@ fi
} # ac_fn_c_try_link
+# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
+# ------------------------------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
+ac_fn_check_decl ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+printf %s "checking whether $as_decl_name is declared... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ eval ac_save_FLAGS=\$$6
+ as_fn_append $6 " $5"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+ (void) $as_decl_use;
+#else
+ (void) $as_decl_name;
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$3=yes"
+else $as_nop
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ eval $6=\$ac_save_FLAGS
+
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_check_decl
+
# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
ac_fn_c_check_func ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Define $2 to an innocuous variant, in case declares $2.
@@ -1843,16 +1841,9 @@ else
#define $2 innocuous_$2
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); below.
- Prefer to if __STDC__ is defined, since
- exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include
-#else
-# include
-#endif
+ which can conflict with char $2 (); below. */
+#include
#undef $2
/* Override any GCC internal prototype to avoid an error.
@@ -1870,24 +1861,25 @@ choke me
#endif
int
-main ()
+main (void)
{
return $2 ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
eval "$3=yes"
-else
+else $as_nop
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_func
@@ -1899,17 +1891,18 @@ $as_echo "$ac_res" >&6; }
ac_fn_c_check_type ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
eval "$3=no"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
if (sizeof ($2))
return 0;
@@ -1917,12 +1910,13 @@ if (sizeof ($2))
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
if (sizeof (($2)))
return 0;
@@ -1930,29 +1924,50 @@ if (sizeof (($2)))
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-else
+else $as_nop
eval "$3=yes"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_type
+ac_configure_args_raw=
+for ac_arg
+do
+ case $ac_arg in
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_configure_args_raw " '$ac_arg'"
+done
+
+case $ac_configure_args_raw in
+ *$as_nl*)
+ ac_safe_unquote= ;;
+ *)
+ ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
+ ac_unsafe_a="$ac_unsafe_z#~"
+ ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
+ ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
+esac
+
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+generated by GNU Autoconf 2.71. Invocation command line was
- $ $0 $@
+ $ $0$ac_configure_args_raw
_ACEOF
exec 5>>config.log
@@ -1985,8 +2000,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ printf "%s\n" "PATH: $as_dir"
done
IFS=$as_save_IFS
@@ -2021,7 +2040,7 @@ do
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
@@ -2056,11 +2075,13 @@ done
# WARNING: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
+ # Sanitize IFS.
+ IFS=" "" $as_nl"
# Save into config.log some information that might help in debugging.
{
echo
- $as_echo "## ---------------- ##
+ printf "%s\n" "## ---------------- ##
## Cache variables. ##
## ---------------- ##"
echo
@@ -2071,8 +2092,8 @@ trap 'exit_status=$?
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -2096,7 +2117,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
)
echo
- $as_echo "## ----------------- ##
+ printf "%s\n" "## ----------------- ##
## Output variables. ##
## ----------------- ##"
echo
@@ -2104,14 +2125,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
- $as_echo "## ------------------- ##
+ printf "%s\n" "## ------------------- ##
## File substitutions. ##
## ------------------- ##"
echo
@@ -2119,15 +2140,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
if test -s confdefs.h; then
- $as_echo "## ----------- ##
+ printf "%s\n" "## ----------- ##
## confdefs.h. ##
## ----------- ##"
echo
@@ -2135,8 +2156,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
echo
fi
test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
+ printf "%s\n" "$as_me: caught signal $ac_signal"
+ printf "%s\n" "$as_me: exit $exit_status"
} >&5
rm -f core *.core core.conftest.* &&
rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
@@ -2150,63 +2171,48 @@ ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h
-$as_echo "/* confdefs.h */" > confdefs.h
+printf "%s\n" "/* confdefs.h */" > confdefs.h
# Predefined preprocessor variables.
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
+printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
+printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
+printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
+printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
# Let the site file select an alternate cache file if it wants to.
# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- # We do not want a PATH search for config.site.
- case $CONFIG_SITE in #((
- -*) ac_site_file1=./$CONFIG_SITE;;
- */*) ac_site_file1=$CONFIG_SITE;;
- *) ac_site_file1=./$CONFIG_SITE;;
- esac
+ ac_site_files="$CONFIG_SITE"
elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
+ ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
+ ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+
+for ac_site_file in $ac_site_files
do
- test "x$ac_site_file" = xNONE && continue
- if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ case $ac_site_file in #(
+ */*) :
+ ;; #(
+ *) :
+ ac_site_file=./$ac_site_file ;;
+esac
+ if test -f "$ac_site_file" && test -r "$ac_site_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file" \
- || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -2216,153 +2222,546 @@ if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special files
# actually), so we avoid doing that. DJGPP emulates it as a regular file.
if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val=\$ac_cv_env_${ac_var}_value
- eval ac_new_val=\$ac_env_${ac_var}_value
- case $ac_old_set,$ac_new_set in
- set,)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- # differences in whitespace do not lead to failure.
- ac_old_val_w=`echo x $ac_old_val`
- ac_new_val_w=`echo x $ac_new_val`
- if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- ac_cache_corrupted=:
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
- eval $ac_var=\$ac_old_val
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) as_fn_append ac_configure_args " '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
-fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
+# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+ Do not test the value of __STDC__, because some compilers set it to 0
+ while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+#include
+#include
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
+struct buf { int x; };
+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not \xHH hex character constants.
+ These do not provoke an error unfortunately, instead are silently treated
+ as an "x". The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously \x00 != x always comes out true, for an
+ array size at least. It is necessary to write \x00 == 0 to get something
+ that is true only with -std. */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
-ac_config_headers="$ac_config_headers config.h"
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+ int, int);'
+# Test code for whether the C compiler supports C89 (body of main).
+ac_c_conftest_c89_main='
+ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
+'
-LDFLAGS=""
-LIBS=""
-EXTRA_LIBS=""
-INCLUDES=""
-CPPFLAGS=""
-GDBM_INCLUDE=""
-GDBM_LIB=""
-FNV_DEP=""
-TRIO_DEP=""
-PCRE_DEP=""
-PCRE_MIN_VERSION="8.39"
+# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
+#include
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
-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
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+ #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str = "";
+ int number = 0;
+ float fnumber = 0;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case '\''s'\'': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case '\''d'\'': // int
+ number = va_arg (args_copy, int);
+ break;
+ case '\''f'\'': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+
+ return *str && number && fnumber;
+}
+'
+
+# Test code for whether the C compiler supports C99 (body of main).
+ac_c_conftest_c99_main='
+ // Check bool.
+ _Bool success = false;
+ success |= (argc != 0);
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[0] = argv[0][0];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
+ || dynamic_array[ni.number - 1] != 543);
+'
+
+# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
+
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+ int_alignment = _Alignof (int),
+ int_array_alignment = _Alignof (int[100]),
+ char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+int _Noreturn does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+ int x;
+ _Static_assert (sizeof (int) <= sizeof (long int),
+ "_Static_assert does not work in struct");
+ long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+ union {
+ struct { int i; int j; };
+ struct { int k; long int l; } w;
+ };
+ int m;
+} v1;
+'
+
+# Test code for whether the C compiler supports C11 (body of main).
+ac_c_conftest_c11_main='
+ _Static_assert ((offsetof (struct anonymous, i)
+ == offsetof (struct anonymous, w.k)),
+ "Anonymous union alignment botch");
+ v1.i = 2;
+ v1.w.k = 5;
+ ok |= v1.i != 5;
+'
+
+# Test code for whether the C compiler supports C11 (complete).
+ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+${ac_c_conftest_c11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ ${ac_c_conftest_c11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C99 (complete).
+ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C89 (complete).
+ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ return ok;
+}
+"
+
+as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
+as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
+as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
+as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
+as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
+as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
+as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
+as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
+as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
+as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
+
+# Auxiliary files required by this configure script.
+ac_aux_files="install-sh config.guess config.sub"
+
+# Locations in which to look for auxiliary files.
+ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
+
+# Search for a directory containing all of the required auxiliary files,
+# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
+# If we don't find one directory that contains all the files we need,
+# we report the set of missing files from the *first* directory in
+# $ac_aux_dir_candidates and give up.
+ac_missing_aux_files=""
+ac_first_candidate=:
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in $ac_aux_dir_candidates
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
+ ac_aux_dir_found=yes
+ ac_install_sh=
+ for ac_aux in $ac_aux_files
+ do
+ # As a special case, if "install-sh" is required, that requirement
+ # can be satisfied by any of "install-sh", "install.sh", or "shtool",
+ # and $ac_install_sh is set appropriately for whichever one is found.
+ if test x"$ac_aux" = x"install-sh"
+ then
+ if test -f "${as_dir}install-sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
+ ac_install_sh="${as_dir}install-sh -c"
+ elif test -f "${as_dir}install.sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
+ ac_install_sh="${as_dir}install.sh -c"
+ elif test -f "${as_dir}shtool"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
+ ac_install_sh="${as_dir}shtool install -c"
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} install-sh"
+ else
+ break
+ fi
+ fi
+ else
+ if test -f "${as_dir}${ac_aux}"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
+ else
+ break
+ fi
+ fi
+ fi
+ done
+ if test "$ac_aux_dir_found" = yes; then
+ ac_aux_dir="$as_dir"
+ break
+ fi
+ ac_first_candidate=false
+
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
fi
+
# These three variables are undocumented and unsupported,
# and are intended to be withdrawn in a future Autoconf release.
# They can cause serious problems if a builder's source tree is in a directory
# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+if test -f "${ac_aux_dir}config.guess"; then
+ ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
+fi
+if test -f "${ac_aux_dir}config.sub"; then
+ ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
+fi
+if test -f "$ac_aux_dir/configure"; then
+ ac_configure="$SHELL ${ac_aux_dir}configure"
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+ and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if ${ac_cv_build+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ac_config_headers="$ac_config_headers config.h"
+
+
+
+LDFLAGS=""
+LIBS=""
+EXTRA_LIBS=""
+INCLUDES=""
+CPPFLAGS=""
+GDBM_INCLUDE=""
+GDBM_LIB=""
+FNV_DEP=""
+TRIO_DEP=""
+PCRE2_DEP=""
+PCRE2_MIN_VERSION="10.32"
+
+
+
+
+
+ # Make sure we can run config.sub.
+$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+printf %s "checking build system type... " >&6; }
+if test ${ac_cv_build+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+ ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
test "x$ac_build_alias" = x &&
as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+printf "%s\n" "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
@@ -2381,21 +2780,22 @@ IFS=$ac_save_IFS
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if ${ac_cv_host+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+printf %s "checking host system type... " >&6; }
+if test ${ac_cv_host+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test "x$host_alias" = x; then
ac_cv_host=$ac_cv_build
else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+ ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+printf "%s\n" "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
@@ -2414,21 +2814,22 @@ IFS=$ac_save_IFS
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
-$as_echo_n "checking target system type... " >&6; }
-if ${ac_cv_target+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+printf %s "checking target system type... " >&6; }
+if test ${ac_cv_target+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test "x$target_alias" = x; then
ac_cv_target=$ac_cv_host
else
- ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+ ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
-$as_echo "$ac_cv_target" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+printf "%s\n" "$ac_cv_target" >&6; }
case $ac_cv_target in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
@@ -2455,27 +2856,37 @@ test -n "$target_alias" &&
program_prefix=${target_alias}-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking cached information" >&5
-$as_echo_n "checking cached information... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking cached information" >&5
+printf %s "checking cached information... " >&6; }
hostcheck="$host"
-if ${ac_cv_hostcheck+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if test ${ac_cv_hostcheck+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_hostcheck="$hostcheck"
fi
if test "$ac_cv_hostcheck" != "$hostcheck"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: changed" >&5
-$as_echo "changed" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: config.cache exists!" >&5
-$as_echo "$as_me: WARNING: config.cache exists!" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: changed" >&5
+printf "%s\n" "changed" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: config.cache exists!" >&5
+printf "%s\n" "$as_me: WARNING: config.cache exists!" >&2;}
as_fn_error $? "you must do 'make clobber' first to compile for different host or different parameters." "$LINENO" 5
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+printf "%s\n" "ok" >&6; }
fi
+
+
+
+
+
+
+
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2484,11 +2895,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -2496,11 +2908,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2511,11 +2927,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -2524,11 +2940,12 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
@@ -2536,11 +2953,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2551,11 +2972,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_CC" = x; then
@@ -2563,8 +2984,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -2577,11 +2998,12 @@ if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -2589,11 +3011,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2604,11 +3030,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -2617,11 +3043,12 @@ fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -2630,15 +3057,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2654,18 +3085,18 @@ if test $ac_prog_rejected = yes; then
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -2676,11 +3107,12 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -2688,11 +3120,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2703,11 +3139,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -2720,11 +3156,12 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
@@ -2732,11 +3169,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2747,11 +3188,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -2763,34 +3204,138 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
fi
+else
+ CC="$ac_cv_prog_CC"
fi
fi
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
+for ac_option in --version -v -V -qversion -version; do
{ { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -2800,7 +3345,7 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
fi
rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
@@ -2808,7 +3353,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -2820,9 +3365,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+printf %s "checking whether the C compiler works... " >&6; }
+ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
@@ -2843,11 +3388,12 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link_default") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
# Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile. We should not override ac_cv_exeext if it was cached,
@@ -2864,7 +3410,7 @@ do
# certainly right.
break;;
*.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
then :; else
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
fi
@@ -2880,44 +3426,46 @@ do
done
test "$ac_cv_exeext" = no && ac_cv_exeext=
-else
+else $as_nop
ac_file=''
fi
-if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
+if test -z "$ac_file"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
See \`config.log' for more details" "$LINENO" 5; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+printf %s "checking for C compiler default output file name... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+printf "%s\n" "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+printf %s "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -2931,15 +3479,15 @@ for ac_file in conftest.exe conftest conftest.*; do
* ) break;;
esac
done
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+printf "%s\n" "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
@@ -2948,7 +3496,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
int
-main ()
+main (void)
{
FILE *f = fopen ("conftest.out", "w");
return ferror (f) || fclose (f) != 0;
@@ -2960,8 +3508,8 @@ _ACEOF
ac_clean_files="$ac_clean_files conftest.out"
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+printf %s "checking whether we are cross compiling... " >&6; }
if test "$cross_compiling" != yes; then
{ { ac_try="$ac_link"
case "(($ac_try" in
@@ -2969,10 +3517,10 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if { ac_try='./conftest$ac_cv_exeext'
{ { case "(($ac_try" in
@@ -2980,39 +3528,40 @@ $as_echo "$ac_try_echo"; } >&5
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details" "$LINENO" 5; }
fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+printf "%s\n" "$cross_compiling" >&6; }
rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+printf %s "checking for suffix of object files... " >&6; }
+if test ${ac_cv_objext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -3026,11 +3575,12 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
for ac_file in conftest.o conftest.obj conftest.*; do
test -f "$ac_file" || continue;
case $ac_file in
@@ -3039,31 +3589,32 @@ $as_echo "$ac_try_echo"; } >&5
break;;
esac
done
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+printf "%s\n" "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __GNUC__
choke me
@@ -3073,29 +3624,33 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_compiler_gnu=yes
-else
+else $as_nop
ac_compiler_gnu=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
if test $ac_compiler_gnu = yes; then
GCC=yes
else
GCC=
fi
-ac_test_CFLAGS=${CFLAGS+set}
+ac_test_CFLAGS=${CFLAGS+y}
ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
@@ -3104,57 +3659,60 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
-else
+else $as_nop
CFLAGS=""
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-else
+else $as_nop
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
@@ -3169,94 +3727,144 @@ else
CFLAGS=
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c11=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include
-#include
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+ CC="$CC $ac_cv_prog_cc_c11"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+ ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c99" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+ CC="$CC $ac_cv_prog_cc_c99"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+ ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c89_program
_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_c89=$ac_arg
fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
-
fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c89" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+ CC="$CC $ac_cv_prog_cc_c89"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+ ac_prog_cc_stdc=c89
+fi
fi
ac_ext=c
@@ -3270,40 +3878,36 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+printf %s "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ if test ${ac_cv_prog_CPP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # Double quotes because $CC needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
do
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
- # Prefer to if __STDC__ is defined, since
- # exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __STDC__
-# include
-#else
-# include
-#endif
+#include
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
-else
+else $as_nop
# Broken: fails on valid input.
continue
fi
@@ -3315,10 +3919,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext
/* end confdefs.h. */
#include
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
# Broken: success on invalid input.
continue
-else
+else $as_nop
# Passes both tests.
ac_preproc_ok=:
break
@@ -3328,7 +3933,8 @@ rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok
+then :
break
fi
@@ -3340,29 +3946,24 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+printf "%s\n" "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
- # Prefer to if __STDC__ is defined, since
- # exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __STDC__
-# include
-#else
-# include
-#endif
+#include
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
-else
+else $as_nop
# Broken: fails on valid input.
continue
fi
@@ -3374,10 +3975,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext
/* end confdefs.h. */
#include
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
# Broken: success on invalid input.
continue
-else
+else $as_nop
# Passes both tests.
ac_preproc_ok=:
break
@@ -3387,11 +3989,12 @@ rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok
+then :
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -3406,11 +4009,12 @@ for ac_prog in 'bison -y' byacc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_YACC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_YACC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$YACC"; then
ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
@@ -3418,11 +4022,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_YACC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3433,11 +4041,11 @@ fi
fi
YACC=$ac_cv_prog_YACC
if test -n "$YACC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
-$as_echo "$YACC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
+printf "%s\n" "$YACC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3447,11 +4055,12 @@ test -n "$YACC" || YACC="yacc"
# Extract the first word of "$YACC", so it can be a program name with args.
set dummy $YACC; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_YACC_CHECK+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_YACC_CHECK+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$YACC_CHECK"; then
ac_cv_prog_YACC_CHECK="$YACC_CHECK" # Let the user override the test.
else
@@ -3459,11 +4068,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_YACC_CHECK="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3474,18 +4087,20 @@ fi
fi
YACC_CHECK=$ac_cv_prog_YACC_CHECK
if test -n "$YACC_CHECK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC_CHECK" >&5
-$as_echo "$YACC_CHECK" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC_CHECK" >&5
+printf "%s\n" "$YACC_CHECK" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-if test x"$YACC_CHECK" != x"yes"; then :
+if test x"$YACC_CHECK" != x"yes"
+then :
as_fn_error $? "Please install either bison or yacc and run configure again" "$LINENO" 5
fi
-# Find a good install program. We prefer a C program (faster),
+
+ # 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
@@ -3499,20 +4114,25 @@ fi
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+printf %s "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
-if ${ac_cv_path_install+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if test ${ac_cv_path_install+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
- ./ | .// | /[cC]/* | \
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ # Account for fact that we put trailing slashes in our PATH walk.
+case $as_dir in #((
+ ./ | /[cC]/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
/usr/ucb/* ) ;;
@@ -3522,13 +4142,13 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# program-specific install script used by HP pwplus--don't use.
:
else
@@ -3536,12 +4156,12 @@ case $as_dir/ in #((
echo one > conftest.one
echo two > conftest.two
mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
test -s conftest.one && test -s conftest.two &&
test -s conftest.dir/conftest.one &&
test -s conftest.dir/conftest.two
then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
break 3
fi
fi
@@ -3557,7 +4177,7 @@ IFS=$as_save_IFS
rm -rf conftest.one conftest.two conftest.dir
fi
- if test "${ac_cv_path_install+set}" = set; then
+ if test ${ac_cv_path_install+y}; then
INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. Don't cache a
@@ -3567,8 +4187,8 @@ fi
INSTALL=$ac_install_sh
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+printf "%s\n" "$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
@@ -3578,24 +4198,25 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+printf %s "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+printf "%s\n" "no, using $LN_S" >&6; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval test \${ac_cv_prog_make_${ac_make}_set+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
all:
@@ -3611,22 +4232,23 @@ esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
SET_MAKE=
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
SET_MAKE="MAKE=${MAKE-make}"
fi
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
@@ -3634,11 +4256,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="ar"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3650,11 +4276,11 @@ fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+printf "%s\n" "$AR" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3662,11 +4288,12 @@ if test -z "$no_ranlib"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_RANLIB+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
@@ -3674,11 +4301,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3689,11 +4320,11 @@ fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+printf "%s\n" "$RANLIB" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3702,11 +4333,12 @@ if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_RANLIB"; then
ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
@@ -3714,11 +4346,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3729,11 +4365,11 @@ fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+printf "%s\n" "$ac_ct_RANLIB" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_RANLIB" = x; then
@@ -3741,8 +4377,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
RANLIB=$ac_ct_RANLIB
@@ -3754,6 +4390,108 @@ fi
else
RANLIB=":"
fi
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkgconf", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkgconf; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_PKGCONF+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$PKGCONF"; then
+ ac_cv_prog_PKGCONF="$PKGCONF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKGCONF="${ac_tool_prefix}pkgconf"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PKGCONF=$ac_cv_prog_PKGCONF
+if test -n "$PKGCONF"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONF" >&5
+printf "%s\n" "$PKGCONF" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_PKGCONF"; then
+ ac_ct_PKGCONF=$PKGCONF
+ # Extract the first word of "pkgconf", so it can be a program name with args.
+set dummy pkgconf; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_PKGCONF+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_PKGCONF"; then
+ ac_cv_prog_ac_ct_PKGCONF="$ac_ct_PKGCONF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKGCONF="pkgconf"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_PKGCONF=$ac_cv_prog_ac_ct_PKGCONF
+if test -n "$ac_ct_PKGCONF"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKGCONF" >&5
+printf "%s\n" "$ac_ct_PKGCONF" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKGCONF" = x; then
+ PKGCONF=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKGCONF=$ac_ct_PKGCONF
+ fi
+else
+ PKGCONF="$ac_cv_prog_PKGCONF"
+fi
+
INSTALL="install-sh"
@@ -3761,7 +4499,7 @@ INSTALL="install-sh"
case "$host" in
*-*-solaris*)
# Solaris flags
- $as_echo "#define NO_MACRO 1" >>confdefs.h
+ printf "%s\n" "#define NO_MACRO 1" >>confdefs.h
;;
@@ -3782,22 +4520,24 @@ export CFLAGS CC
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the compiler works" >&5
-$as_echo_n "checking that the compiler works... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that the compiler works" >&5
+printf %s "checking that the compiler works... " >&6; }
-if test "$cross_compiling" = yes; then :
+if test "$cross_compiling" = yes
+then :
as_fn_error $? "Could not compile and run even a trivial ANSI C program - check CC." "$LINENO" 5
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
main(int ac, char **av) { return 0; }
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+if ac_fn_c_try_run "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
as_fn_error $? "Could not compile and run even a trivial ANSI C program - check CC." "$LINENO" 5
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -3814,46 +4554,39 @@ case "$build" in
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable -Wall" >&5
-$as_echo_n "checking whether to enable -Wall... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable -Wall" >&5
+printf %s "checking whether to enable -Wall... " >&6; }
# Check whether --enable-warnings was given.
-if test "${enable_warnings+set}" = set; then :
+if test ${enable_warnings+y}
+then :
enableval=$enable_warnings; if test -n "$GCC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding -Wall to CFLAGS." >&5
-$as_echo "adding -Wall to CFLAGS." >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: adding -Wall to CFLAGS." >&5
+printf "%s\n" "adding -Wall to CFLAGS." >&6; }
CFLAGS="$CFLAGS -Wall"
fi
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
# Check whether --with-httpddir was given.
-if test "${with_httpddir+set}" = set; then :
+if test ${with_httpddir+y}
+then :
withval=$with_httpddir; httpddir=$with_httpddir
-else
+else $as_nop
httpddir=/usr/local/apache
fi
-# Check whether --with-cgidir was given.
-if test "${with_cgidir+set}" = set; then :
- withval=$with_cgidir; cgidir=$with_cgidir
-else
- cgidir=$httpddir/cgi-bin
-fi
-
-
-
-
# Check whether --with-htmldir was given.
-if test "${with_htmldir+set}" = set; then :
+if test ${with_htmldir+y}
+then :
withval=$with_htmldir; htmldir=$with_htmldir
-else
+else $as_nop
htmldir=$httpddir/htdocs/hypermail
fi
@@ -3861,9 +4594,10 @@ fi
# Check whether --with-language was given.
-if test "${with_language+set}" = set; then :
+if test ${with_language+y}
+then :
withval=$with_language; language=$with_language
-else
+else $as_nop
language=en
fi
@@ -3871,18 +4605,20 @@ fi
# Check whether --with-htmlsuffix was given.
-if test "${with_htmlsuffix+set}" = set; then :
+if test ${with_htmlsuffix+y}
+then :
withval=$with_htmlsuffix; htmlsuffix=$with_htmlsuffix
-else
+else $as_nop
htmlsuffix=html
fi
# Check whether --enable-defaultindex was given.
-if test "${enable_defaultindex+set}" = set; then :
+if test ${enable_defaultindex+y}
+then :
enableval=$enable_defaultindex; defaultindex=$enableval
-else
+else $as_nop
defaultindex="thread"
fi
@@ -3890,9 +4626,10 @@ fi
# Check whether --with-domainaddr was given.
-if test "${with_domainaddr+set}" = set; then :
+if test ${with_domainaddr+y}
+then :
withval=$with_domainaddr; domainaddr=$with_domainaddr
-else
+else $as_nop
domainaddr=NONE
fi
@@ -3902,12 +4639,43 @@ fi
+# Autoupdate added the next two lines to ensure that your configure
+# script's behavior did not change. They are probably safe to remove.
+ac_header= ac_cache=
+for ac_item in $ac_header_c_list
+do
+ if test $ac_cache; then
+ ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
+ if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
+ printf "%s\n" "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_header= ac_cache=
+ elif test $ac_header; then
+ ac_cache=$ac_item
+ else
+ ac_header=$ac_item
+ fi
+done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+
+
+
+
+
+
+
+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
+then :
+
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+printf %s "checking for grep that handles long lines and -e... " >&6; }
+if test ${ac_cv_path_GREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -z "$GREP"; then
ac_path_GREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
@@ -3915,10 +4683,15 @@ else
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in grep ggrep
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
@@ -3927,13 +4700,13 @@ case `"$ac_path_GREP" --version 2>&1` in
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
+ printf "%s\n" 'GREP' >> "conftest.nl"
"$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -3961,16 +4734,17 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+printf "%s\n" "$ac_cv_path_GREP" >&6; }
GREP="$ac_cv_path_GREP"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
then ac_cv_path_EGREP="$GREP -E"
else
@@ -3981,10 +4755,15 @@ else
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in egrep
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
@@ -3993,13 +4772,13 @@ case `"$ac_path_EGREP" --version 2>&1` in
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
+ printf "%s\n" 'EGREP' >> "conftest.nl"
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -4028,163 +4807,171 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-#include
-#include
-#include
-int
-main ()
-{
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
+ac_fn_c_check_header_compile "$LINENO" "alloca.h" "ac_cv_header_alloca_h" "$ac_includes_default"
+if test "x$ac_cv_header_alloca_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
+
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
+if test "x$ac_cv_header_arpa_inet_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
+fi
+ac_fn_c_check_header_compile "$LINENO" "ctype.h" "ac_cv_header_ctype_h" "$ac_includes_default"
+if test "x$ac_cv_header_ctype_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_CTYPE_H 1" >>confdefs.h
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
+fi
+ac_fn_c_check_header_compile "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default"
+if test "x$ac_cv_header_dirent_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_DIRENT_H 1" >>confdefs.h
-else
- ac_cv_header_stdc=no
fi
-rm -f conftest*
+ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
+if test "x$ac_cv_header_errno_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
+if test "x$ac_cv_header_fcntl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
+fi
+ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_inttypes_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
+fi
+ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
+if test "x$ac_cv_header_locale_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
-else
- ac_cv_header_stdc=no
fi
-rm -f conftest*
+ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default"
+if test "x$ac_cv_header_malloc_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default"
+if test "x$ac_cv_header_netdb_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-#include
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
+fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
+if test "x$ac_cv_header_netinet_in_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+fi
+ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default"
+if test "x$ac_cv_header_pwd_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
-else
- ac_cv_header_stdc=no
fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdarg_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h
+
fi
+ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdio_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDIO_H 1" >>confdefs.h
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
+ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+fi
+ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
+if test "x$ac_cv_header_string_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/dir.h" "ac_cv_header_sys_dir_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_dir_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_DIR_H 1" >>confdefs.h
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_socket_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_stat_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_time_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_types_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
-for ac_header in alloca.h arpa/inet.h ctype.h dirent.h errno.h \
- fcntl.h locale.h malloc.h netdb.h netinet/in.h pwd.h stdarg.h \
- stdio.h stdlib.h string.h sys/dir.h sys/param.h sys/socket.h \
- sys/stat.h sys/time.h sys/types.h time.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_time_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
-done
+fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
-$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
-if ${ac_cv_header_stat_broken+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
+printf %s "checking whether stat file-mode macros are broken... " >&6; }
+if test ${ac_cv_header_stat_broken+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
@@ -4207,36 +4994,38 @@ extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_header_stat_broken=no
-else
+else $as_nop
ac_cv_header_stat_broken=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
-$as_echo "$ac_cv_header_stat_broken" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
+printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
if test $ac_cv_header_stat_broken = yes; then
-$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
+printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
fi
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
- as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if eval \${$as_ac_Header+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
+printf %s "checking for $ac_hdr that defines DIR... " >&6; }
+if eval test \${$as_ac_Header+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include <$ac_hdr>
int
-main ()
+main (void)
{
if ((DIR *) 0)
return 0;
@@ -4244,19 +5033,21 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$as_ac_Header=yes"
-else
+else $as_nop
eval "$as_ac_Header=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$as_ac_Header
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
_ACEOF
ac_header_dirent=$ac_hdr; break
@@ -4265,11 +5056,12 @@ fi
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if ${ac_cv_search_opendir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+printf %s "checking for library containing opendir... " >&6; }
+if test ${ac_cv_search_opendir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4277,56 +5069,59 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char opendir ();
int
-main ()
+main (void)
{
return opendir ();
;
return 0;
}
_ACEOF
-for ac_lib in '' dir; do
+for ac_lib in '' dir
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_opendir=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_opendir+:} false; then :
+ if test ${ac_cv_search_opendir+y}
+then :
break
fi
done
-if ${ac_cv_search_opendir+:} false; then :
+if test ${ac_cv_search_opendir+y}
+then :
-else
+else $as_nop
ac_cv_search_opendir=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+printf "%s\n" "$ac_cv_search_opendir" >&6; }
ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if ${ac_cv_search_opendir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+printf %s "checking for library containing opendir... " >&6; }
+if test ${ac_cv_search_opendir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4334,101 +5129,185 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char opendir ();
int
-main ()
+main (void)
{
return opendir ();
;
return 0;
}
_ACEOF
-for ac_lib in '' x; do
+for ac_lib in '' x
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_opendir=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_opendir+:} false; then :
+ if test ${ac_cv_search_opendir+y}
+then :
break
fi
done
-if ${ac_cv_search_opendir+:} false; then :
+if test ${ac_cv_search_opendir+y}
+then :
-else
+else $as_nop
ac_cv_search_opendir=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+printf "%s\n" "$ac_cv_search_opendir" >&6; }
ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if ${ac_cv_header_time+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+# Obsolete code to be removed.
+if test $ac_cv_header_sys_time_h = yes; then
+
+printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
+
+fi
+# End of obsolete code.
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
+printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
+if test ${ac_cv_c_undeclared_builtin_options+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_CFLAGS=$CFLAGS
+ ac_cv_c_undeclared_builtin_options='cannot detect'
+ for ac_arg in '' -fno-builtin; do
+ CFLAGS="$ac_save_CFLAGS $ac_arg"
+ # This test program should *not* compile successfully.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include
-#include
-#include
int
-main ()
+main (void)
{
-if ((struct tm *) 0)
-return 0;
+(void) strchr;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_time=yes
-else
- ac_cv_header_time=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ # This test program should compile successfully.
+ # No library function is consistently available on
+ # freestanding implementations, so test against a dummy
+ # declaration. Include always-available headers on the
+ # off chance that they somehow elicit warnings.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+#include
+#include
+#include
+extern void ac_decl (int, char *);
-$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
+int
+main (void)
+{
+(void) ac_decl (0, (char *) 0);
+ (void) ac_decl;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ if test x"$ac_arg" = x
+then :
+ ac_cv_c_undeclared_builtin_options='none needed'
+else $as_nop
+ ac_cv_c_undeclared_builtin_options=$ac_arg
fi
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+ CFLAGS=$ac_save_CFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
+printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
+ case $ac_cv_c_undeclared_builtin_options in #(
+ 'cannot detect') :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot make $CC report undeclared builtins
+See \`config.log' for more details" "$LINENO" 5; } ;; #(
+ 'none needed') :
+ ac_c_undeclared_builtin_options='' ;; #(
+ *) :
+ ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
+esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
-$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
-if ${ac_cv_struct_tm+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ac_fn_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_isblank" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "strcasecmp" "ac_cv_have_decl_strcasecmp" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_strcasecmp" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_STRCASECMP $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "strcasestr" "ac_cv_have_decl_strcasestr" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_strcasestr" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_STRCASESTR $ac_have_decl" >>confdefs.h
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
+printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+if test ${ac_cv_struct_tm+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include
int
-main ()
+main (void)
{
struct tm tm;
int *p = &tm.tm_sec;
@@ -4437,37 +5316,39 @@ struct tm tm;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_struct_tm=time.h
-else
+else $as_nop
ac_cv_struct_tm=sys/time.h
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
-$as_echo "$ac_cv_struct_tm" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
+printf "%s\n" "$ac_cv_struct_tm" >&6; }
if test $ac_cv_struct_tm = sys/time.h; then
-$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
+printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
fi
-for ac_func in strftime
+
+ for ac_func in strftime
do :
ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
-if test "x$ac_cv_func_strftime" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STRFTIME 1
-_ACEOF
+if test "x$ac_cv_func_strftime" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
-else
+else $as_nop
# strftime is in -lintl on SCO UNIX.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
-$as_echo_n "checking for strftime in -lintl... " >&6; }
-if ${ac_cv_lib_intl_strftime+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
+printf %s "checking for strftime in -lintl... " >&6; }
+if test ${ac_cv_lib_intl_strftime+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4476,66 +5357,178 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char strftime ();
int
-main ()
+main (void)
{
return strftime ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_intl_strftime=yes
-else
+else $as_nop
ac_cv_lib_intl_strftime=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
-$as_echo "$ac_cv_lib_intl_strftime" >&6; }
-if test "x$ac_cv_lib_intl_strftime" = xyes; then :
- $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
+printf "%s\n" "$ac_cv_lib_intl_strftime" >&6; }
+if test "x$ac_cv_lib_intl_strftime" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
LIBS="-lintl $LIBS"
fi
fi
+
done
+ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
+if test "x$ac_cv_func_getopt" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETOPT 1" >>confdefs.h
-for ac_func in mkdir strdup strstr strtol memcpy memset lstat strcasecmp \
- strcasestr getpwuid getopt snprintf memmove strerror
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+fi
+ac_fn_c_check_func "$LINENO" "getpwuid" "ac_cv_func_getpwuid"
+if test "x$ac_cv_func_getpwuid" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
+if test "x$ac_cv_func_isblank" = xyes
+then :
+ printf "%s\n" "#define HAVE_ISBLANK 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
+if test "x$ac_cv_func_lstat" = xyes
+then :
+ printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "memcpy" "ac_cv_func_memcpy"
+if test "x$ac_cv_func_memcpy" = xyes
+then :
+ printf "%s\n" "#define HAVE_MEMCPY 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
+if test "x$ac_cv_func_memmove" = xyes
+then :
+ printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
+if test "x$ac_cv_func_memset" = xyes
+then :
+ printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "mkdir" "ac_cv_func_mkdir"
+if test "x$ac_cv_func_mkdir" = xyes
+then :
+ printf "%s\n" "#define HAVE_MKDIR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+if test "x$ac_cv_func_snprintf" = xyes
+then :
+ printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
+if test "x$ac_cv_func_strcasecmp" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
+if test "x$ac_cv_func_strcasestr" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRCASESTR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
+if test "x$ac_cv_func_strdup" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
+if test "x$ac_cv_func_strerror" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
+if test "x$ac_cv_func_strstr" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRSTR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
+if test "x$ac_cv_func_strtol" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h
+
+fi
+
+
+
+ ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_intptr_t" = xyes
+then :
+
+printf "%s\n" "#define HAVE_INTPTR_T 1" >>confdefs.h
+
+else $as_nop
+ for ac_type in 'int' 'long int' 'long long int'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main (void)
+{
+static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+printf "%s\n" "#define intptr_t $ac_type" >>confdefs.h
+ ac_type=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ test -z "$ac_type" && break
+ done
fi
-done
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+if test "x$ac_cv_type_size_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
+printf "%s\n" "#define size_t unsigned int" >>confdefs.h
fi
if test $ac_cv_func_snprintf != no; then
- $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
+ printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
fi
@@ -4554,30 +5547,49 @@ fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pkg-config" >&5
+printf "%s\n" "$as_me: checking for pkg-config" >&6;}
+if test x"$PKGCONF" == x ; then
+ as_fn_error $? "'pkgconf' is missing; please install it." "$LINENO" 5
+fi
+
+
+
# Check whether --with-gdbm was given.
-if test "${with_gdbm+set}" = set; then :
+if test ${with_gdbm+y}
+then :
withval=$with_gdbm; given_gdbm=$withval
fi
-if test "$given_gdbm" != "no"; then
- for i in /usr/local /usr $withval; do
- if test -f "$i/include/gdbm.h"; then
- GDBM_INCLUDE="$i/include"
- THIS_PREFIX="$i"
- fi
- done
+if test "${given_gdbm}" = "no"; then
+ given_gdbm=""
+fi
+
+if test -n "${given_gdbm}" -a "${given_gdbm}" != "yes" -a "${given_gdbm}" != "/usr"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for \"${given_gdbm}/include/gdbm.h\"" >&5
+printf %s "checking for \"${given_gdbm}/include/gdbm.h\"... " >&6; }
+ if test -f "${given_gdbm}/include/gdbm.h"; then
+ GDBM_INCLUDE="${given_gdbm}/include"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ fi
- unset ac_cv_lib_gdbm_gdbm_open
+ if test -n "${GDBM_INCLUDE}"; then
+ unset ac_cv_lib_gdbm_gdbm_open
old_LDFLAGS="$LDFLAGS"
- LDFLAGS="-L$THIS_PREFIX/lib $LDFLAGS"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdbm_open in -lgdbm" >&5
-$as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
-if ${ac_cv_lib_gdbm_gdbm_open+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ LDFLAGS="-L${given_gdbm}/lib $LDFLAGS"
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gdbm_open in -lgdbm" >&5
+printf %s "checking for gdbm_open in -lgdbm... " >&6; }
+if test ${ac_cv_lib_gdbm_gdbm_open+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgdbm $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4586,51 +5598,124 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char gdbm_open ();
int
-main ()
+main (void)
{
return gdbm_open ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_gdbm_gdbm_open=yes
-else
+else $as_nop
ac_cv_lib_gdbm_gdbm_open=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5
-$as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
-if test "x$ac_cv_lib_gdbm_gdbm_open" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5
+printf "%s\n" "$ac_cv_lib_gdbm_gdbm_open" >&6; }
+if test "x$ac_cv_lib_gdbm_gdbm_open" = xyes
+then :
GDBM_LIB="-lgdbm"
+else $as_nop
+ GDBM_INCLUDE=""
fi
LDFLAGS="$old_LDFLAGS"
- if test "$THIS_PREFIX" != "" && test "$THIS_PREFIX" != "/usr"; then
- THIS_LFLAGS="$THIS_PREFIX/lib"
- fi
+ if test -n "${GDBM_LIB}"; then
+
+ if test "x$LDFLAGS" = "x"; then
+ test "x$silent" != "xyes" && echo " setting LDFLAGS to \""-L${given_gdbm}/lib"\""
+ LDFLAGS=""-L${given_gdbm}/lib""
+ else
+ apr_addto_bugger=""-L${given_gdbm}/lib""
+ for i in $apr_addto_bugger; do
+ apr_addto_duplicate="0"
+ for j in $LDFLAGS; do
+ if test "x$i" = "x$j"; then
+ apr_addto_duplicate="1"
+ break
+ fi
+ done
+ if test $apr_addto_duplicate = "0"; then
+ test "x$silent" != "xyes" && echo " adding \"$i\" to LDFLAGS"
+ LDFLAGS="$LDFLAGS $i"
+ fi
+ done
+ fi
+
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: gdbm includes and/or libs not found under \"${given_gdbm}\"" >&5
+printf "%s\n" "$as_me: WARNING: gdbm includes and/or libs not found under \"${given_gdbm}\"" >&2;}
+ fi
+ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDBM support" >&5
-$as_echo_n "checking for GDBM support... " >&6; }
+if test -n "${given_gdbm}" -a -z "${GDBM_INCLUDE}"; then
+ gdbm_headers_found=1
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Trying /usr/include/gdbm.h" >&5
+printf "%s\n" "$as_me: Trying /usr/include/gdbm.h" >&6;}
+ ac_fn_c_check_header_compile "$LINENO" "gdbm.h" "ac_cv_header_gdbm_h" "$ac_includes_default"
+if test "x$ac_cv_header_gdbm_h" = xyes
+then :
+ GDBM_INCLUDE=""
+else $as_nop
-if test "$GDBM_LIB" = "" && test "$given_gdbm" != "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdbm_open in -lgdbm" >&5
-$as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
-if ${ac_cv_lib_gdbm_gdbm_open+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Trying /usr/local/include/gdbm.h" >&5
+printf "%s\n" "$as_me: Trying /usr/local/include/gdbm.h" >&6;}
+ ac_fn_c_check_header_compile "$LINENO" "/usr/local/include/gdbm.h" "ac_cv_header__usr_local_include_gdbm_h" "$ac_includes_default"
+if test "x$ac_cv_header__usr_local_include_gdbm_h" = xyes
+then :
+ GDBM_INCLUDE="-I/usr/local/include"
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Trying /opt/local/include/gdbm.h" >&5
+printf "%s\n" "$as_me: Trying /opt/local/include/gdbm.h" >&6;}
+ ac_fn_c_check_header_compile "$LINENO" "/opt/local/include/gdbm.h" "ac_cv_header__opt_local_include_gdbm_h" "$ac_includes_default"
+if test "x$ac_cv_header__opt_local_include_gdbm_h" = xyes
+then :
+ GDBM_INCLUDE="-I/opt/local/include"
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Trying /usr/pkg/include/gdbm.h" >&5
+printf "%s\n" "$as_me: Trying /usr/pkg/include/gdbm.h" >&6;}
+ ac_fn_c_check_header_compile "$LINENO" "/usr/pkg/include/gdbm.h" "ac_cv_header__usr_pkg_include_gdbm_h" "$ac_includes_default"
+if test "x$ac_cv_header__usr_pkg_include_gdbm_h" = xyes
+then :
+ GDBM_INCLUDE=""
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gdbm.h not found" >&5
+printf "%s\n" "gdbm.h not found" >&6; }
+ gdbm_headers_found=0
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+ if test ${gdbm_headers_found} -eq 1; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gdbm_open in -lgdbm" >&5
+printf %s "checking for gdbm_open in -lgdbm... " >&6; }
+if test ${ac_cv_lib_gdbm_gdbm_open+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgdbm $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4639,103 +5724,46 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char gdbm_open ();
int
-main ()
+main (void)
{
return gdbm_open ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_gdbm_gdbm_open=yes
-else
+else $as_nop
ac_cv_lib_gdbm_gdbm_open=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5
-$as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
-if test "x$ac_cv_lib_gdbm_gdbm_open" = xyes; then :
-
-$as_echo "#define GDBM 1" >>confdefs.h
- DBM_TYPE=gdbm; GDBM_LIB=-lgdbm
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5
+printf "%s\n" "$ac_cv_lib_gdbm_gdbm_open" >&6; }
+if test "x$ac_cv_lib_gdbm_gdbm_open" = xyes
+then :
+ DBM_TYPE=gdbm; GDBM_LIB=-lgdbm
+else $as_nop
DBM_TYPE=""
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking gdbm library" >&5
-$as_echo_n "checking gdbm library... " >&6; }
- if test "a$DBM_TYPE" = a; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none found" >&5
-$as_echo "none found" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No gdbm library found - will limit a few features" >&5
-$as_echo "$as_me: WARNING: No gdbm library found - will limit a few features" >&2;}
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBM_TYPE found" >&5
-$as_echo "$DBM_TYPE found" >&6; }
fi
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-if test "$GDBM_LIB" = "-lgdbm" && test "$GDBM_INCLUDE" = ""; then
- ac_fn_c_check_header_mongrel "$LINENO" "gdbm.h" "ac_cv_header_gdbm_h" "$ac_includes_default"
-if test "x$ac_cv_header_gdbm_h" = xyes; then :
- GDBM_INCLUDE=""
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: Try /usr/local/include/gdbm.h" >&5
-$as_echo "Try /usr/local/include/gdbm.h" >&6; }
- ac_fn_c_check_header_mongrel "$LINENO" "/usr/local/include/gdbm.h" "ac_cv_header__usr_local_include_gdbm_h" "$ac_includes_default"
-if test "x$ac_cv_header__usr_local_include_gdbm_h" = xyes; then :
- GDBM_INCLUDE="-I/usr/local/include"
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: Try /opt/local/include/gdbm.h" >&5
-$as_echo "Try /opt/local/include/gdbm.h" >&6; }
- ac_fn_c_check_header_mongrel "$LINENO" "/opt/local/include/gdbm.h" "ac_cv_header__opt_local_include_gdbm_h" "$ac_includes_default"
-if test "x$ac_cv_header__opt_local_include_gdbm_h" = xyes; then :
- GDBM_INCLUDE="-I/opt/local/include"
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: Try /usr/pkg/include/gdbm.h" >&5
-$as_echo "Try /usr/pkg/include/gdbm.h" >&6; }
- ac_fn_c_check_header_mongrel "$LINENO" "/usr/pkg/include/gdbm.h" "ac_cv_header__usr_pkg_include_gdbm_h" "$ac_includes_default"
-if test "x$ac_cv_header__usr_pkg_include_gdbm_h" = xyes; then :
- GDBM_INCLUDE=""
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: Giving up - You need to install gdbm.h somewhere" >&5
-$as_echo "Giving up - You need to install gdbm.h somewhere" >&6; }
- exit
-
-fi
-
-
+ unset gdbm_headers_found
fi
+if test -n "${GDBM_LIB}"; then
+ printf "%s\n" "#define HAVE_GDBM_H 1" >>confdefs.h
-fi
-
+printf "%s\n" "#define GDBM 1" >>confdefs.h
-fi
-
-
-fi
-
-if test -n "$GDBM_LIB"; then
-
if test "$GDBM_INCLUDE" != "/usr/include"; then
if test -z "$GDBM_INCLUDE" || echo "$GDBM_INCLUDE" | grep '^/' >/dev/null ; then
@@ -4762,61 +5790,56 @@ if test -n "$GDBM_LIB"; then
fi
- $as_echo "#define HAVE_GDBM_H 1" >>confdefs.h
-
- EXTRA_LIBS="$EXTRA_LIBS $GDBM_LIB"
+ EXTRA_LIBS="$EXTRA_LIBS $GDBM_LIB"
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: hypermail's usegdbm config option won't be available unless you install libgdbm-dev" >&5
+printf "%s\n" "$as_me: WARNING: hypermail's usegdbm config option won't be available unless you install libgdbm-dev" >&2;}
fi
+ for ac_header in iconv.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
+if test "x$ac_cv_header_iconv_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ICONV_H 1" >>confdefs.h
-# Check whether --enable-i18n was given.
-if test "${enable_i18n+set}" = set; then :
- enableval=$enable_i18n; given_iconv=$enableval
-fi
-
-if test "$given_iconv" = "no"; then
- echo "disabled I18N support."
-else
- for ac_func in iconv
-do :
- ac_fn_c_check_func "$LINENO" "iconv" "ac_cv_func_iconv"
-if test "x$ac_cv_func_iconv" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_ICONV 1
-_ACEOF
-
+else $as_nop
+ as_fn_error $? "unable to find iconv.h headers (libc6-dev may be missing)" "$LINENO" 5
fi
+
done
- for ac_header in iconv.h
+ for ac_func in iconv
do :
- ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
-if test "x$ac_cv_header_iconv_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_ICONV_H 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "iconv" "ac_cv_func_iconv"
+if test "x$ac_cv_func_iconv" = xyes
+then :
+ printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
+else $as_nop
+ as_fn_error $? "unable to find iconv() function" "$LINENO" 5
fi
done
-fi
-
# Check whether --enable-system_libtrio was given.
-if test "${enable_system_libtrio+set}" = set; then :
+if test ${enable_system_libtrio+y}
+then :
enableval=$enable_system_libtrio;
fi
if test "${enable_system_libtrio}" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for system libtrio" >&5
-$as_echo "$as_me: checking for system libtrio" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing trio_printf" >&5
-$as_echo_n "checking for library containing trio_printf... " >&6; }
-if ${ac_cv_search_trio_printf+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for system libtrio" >&5
+printf "%s\n" "$as_me: checking for system libtrio" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing trio_printf" >&5
+printf %s "checking for library containing trio_printf... " >&6; }
+if test ${ac_cv_search_trio_printf+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4824,65 +5847,67 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char trio_printf ();
int
-main ()
+main (void)
{
return trio_printf ();
;
return 0;
}
_ACEOF
-for ac_lib in '' trio; do
+for ac_lib in '' trio
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_trio_printf=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_trio_printf+:} false; then :
+ if test ${ac_cv_search_trio_printf+y}
+then :
break
fi
done
-if ${ac_cv_search_trio_printf+:} false; then :
+if test ${ac_cv_search_trio_printf+y}
+then :
-else
+else $as_nop
ac_cv_search_trio_printf=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_trio_printf" >&5
-$as_echo "$ac_cv_search_trio_printf" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_trio_printf" >&5
+printf "%s\n" "$ac_cv_search_trio_printf" >&6; }
ac_res=$ac_cv_search_trio_printf
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-else
+else $as_nop
as_fn_error $? "unable to find trio_copy() function" "$LINENO" 5
fi
- ac_fn_c_check_header_mongrel "$LINENO" "trio.h" "ac_cv_header_trio_h" "$ac_includes_default"
-if test "x$ac_cv_header_trio_h" = xyes; then :
+ ac_fn_c_check_header_compile "$LINENO" "trio.h" "ac_cv_header_trio_h" "$ac_includes_default"
+if test "x$ac_cv_header_trio_h" = xyes
+then :
-else
+else $as_nop
as_fn_error $? "unable to find trio.h header file (dev version not installed?)" "$LINENO" 5
fi
-
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: using bundled libtrio" >&5
-$as_echo "$as_me: using bundled libtrio" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using bundled libtrio" >&5
+printf "%s\n" "$as_me: using bundled libtrio" >&6;}
if test "x$INCLUDES" = "x"; then
test "x$silent" != "xyes" && echo " setting INCLUDES to \""-Itrio"\""
@@ -4976,8 +6001,8 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -5007,15 +6032,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
/^ac_cv_env_/b end
t clear
:clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
t end
s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
if test "x$cache_file" != "x/dev/null"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
if test ! -f "$cache_file" || test -h "$cache_file"; then
cat confcache >"$cache_file"
else
@@ -5029,8 +6054,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;}
fi
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -5061,7 +6086,7 @@ rm -f confcache
for apr_configure_arg in $ac_configure_args
do
case "$apr_configure_arg" in
- --with-pcre=*|\'--with-pcre=*)
+ --with-pcre2=*|\'--with-pcre2=*)
continue ;;
esac
apr_configure_args="$apr_configure_args$apr_sep'$apr_configure_arg'"
@@ -5088,16 +6113,16 @@ rm -f confcache
# Some versions of bash will fail to source /dev/null (special files
# actually), so we avoid doing that. DJGPP emulates it as a regular file.
if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
@@ -5107,52 +6132,54 @@ fi
# Check whether --enable-bundled_pcre was given.
-if test "${enable_bundled_pcre+set}" = set; then :
+if test ${enable_bundled_pcre+y}
+then :
enableval=$enable_bundled_pcre;
fi
-# Check whether --with-external_pcre was given.
-if test "${with_external_pcre+set}" = set; then :
- withval=$with_external_pcre;
+# Check whether --with-external_pcre2 was given.
+if test ${with_external_pcre2+y}
+then :
+ withval=$with_external_pcre2;
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PCRE regular expressions library" >&5
-$as_echo "$as_me: checking for PCRE regular expressions library" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PCRE2 regular expressions library" >&5
+printf "%s\n" "$as_me: checking for PCRE2 regular expressions library" >&6;}
-if test ! -z ${enable_bundled_pcre}; then
- with_external_pcre=""
+if test ! -z ${enable_bundled_pcre2}; then
+ with_external_pcre2=""
fi
-case $with_external_pcre in
- /*) { $as_echo "$as_me:${as_lineno-$LINENO}: --with-external-pcre => checking for an external libpcre" >&5
-$as_echo "$as_me: --with-external-pcre => checking for an external libpcre" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre-config" >&5
-$as_echo_n "checking for pcre-config... " >&6; }
- if test -d "$with_external_pcre" && test -x "$with_external_pcre/pcre-config"; then
- PCRE_CONFIG=$with_external_pcre/pcre-config
- elif test -x "$with_external_pcre"; then
- PCRE_CONFIG=$with_external_pcre
+case $with_external_pcre2 in
+ /*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: --with-external-pcre2 => checking for an external libpcre2" >&5
+printf "%s\n" "$as_me: --with-external-pcre2 => checking for an external libpcre2" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre2-config" >&5
+printf %s "checking for pcre2-config... " >&6; }
+ if test -d "$with_external_pcre" && test -x "$with_external_pcre2/pcre2-config"; then
+ PCRE2_CONFIG=$with_external_pcre2/pcre2-config
+ elif test -x "$with_external_pcre2"; then
+ PCRE2_CONFIG=$with_external_pcre2
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "${PCRE_CONFIG} does not point to a directory or pcre-config" "$LINENO" 5
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ as_fn_error $? "${PCRE2_CONFIG} does not point to a directory or pcre2-config" "$LINENO" 5
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PCRE_CONFIG}" >&5
-$as_echo "${PCRE_CONFIG}" >&6; }
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre version equal or greater than ${PCRE_MIN_VERSION}" >&5
-$as_echo_n "checking for pcre version equal or greater than ${PCRE_MIN_VERSION}... " >&6; }
- if test -f "${PCRE_CONFIG}" && test -x "${PCRE_CONFIG}"; then
- PCRE_VERSION=$(${PCRE_CONFIG} --version)
- as_arg_v1="${PCRE_VERSION}"
-as_arg_v2="${PCRE_MIN_VERSION}"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${PCRE2_CONFIG}" >&5
+printf "%s\n" "${PCRE2_CONFIG}" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre2 version equal or greater than ${PCRE2_MIN_VERSION}" >&5
+printf %s "checking for pcre2 version equal or greater than ${PCRE2_MIN_VERSION}... " >&6; }
+ if test -f "${PCRE2_CONFIG}" && test -x "${PCRE2_CONFIG}"; then
+ PCRE2_VERSION=$(${PCRE2_CONFIG} --version)
+ as_arg_v1="${PCRE2_VERSION}"
+as_arg_v2="${PCRE2_MIN_VERSION}"
awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
case $? in #(
1) :
- PCRE_CONFIG=false ;; #(
+ PCRE2_CONFIG=false ;; #(
0) :
;; #(
2) :
@@ -5160,49 +6187,54 @@ case $? in #(
*) :
;;
esac
- if test "${PCRE_CONFIG}" != false; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ if test "${PCRE2_CONFIG}" != false; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "the PCRE library version must be equal or greater than ${PCRE_MIN_VERSION}" "$LINENO" 5
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ as_fn_error $? "the PCRE2 library version must be equal or greater than ${PCRE2_MIN_VERSION}" "$LINENO" 5
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "${PCRE_CONFIG} does not point to a script" "$LINENO" 5
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ as_fn_error $? "${PCRE2_CONFIG} does not point to a script" "$LINENO" 5
fi
;;
- *) PCRE_CONFIG=false
+ *) PCRE2_CONFIG=false
;;
esac
-if test -z "${enable_bundled_pcre}" && test -z "${PCRE_CONFIG}" -o "${PCRE_CONFIG}" = "false"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a system libpcre" >&5
-$as_echo "$as_me: checking for a system libpcre" >&6;}
- # Extract the first word of "pcre-config", so it can be a program name with args.
-set dummy pcre-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PCRE_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $PCRE_CONFIG in
+if test -z "${enable_bundled_pcre2}" && test -z "${PCRE2_CONFIG}" -o "${PCRE2_CONFIG}" = "false"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a system libpcre2" >&5
+printf "%s\n" "$as_me: checking for a system libpcre2" >&6;}
+ # Extract the first word of "pcre2-config", so it can be a program name with args.
+set dummy pcre2-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PCRE2_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $PCRE2_CONFIG in
[\\/]* | ?:[\\/]*)
- ac_cv_path_PCRE_CONFIG="$PCRE_CONFIG" # Let the user override the test with a path.
+ ac_cv_path_PCRE2_CONFIG="$PCRE2_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PCRE_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PCRE2_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5212,26 +6244,26 @@ IFS=$as_save_IFS
;;
esac
fi
-PCRE_CONFIG=$ac_cv_path_PCRE_CONFIG
-if test -n "$PCRE_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCRE_CONFIG" >&5
-$as_echo "$PCRE_CONFIG" >&6; }
+PCRE2_CONFIG=$ac_cv_path_PCRE2_CONFIG
+if test -n "$PCRE2_CONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PCRE2_CONFIG" >&5
+printf "%s\n" "$PCRE2_CONFIG" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
- if test ! -z "${PCRE_CONFIG}"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking pcre version equal or greater than ${PCRE_MIN_VERSION}" >&5
-$as_echo_n "checking checking pcre version equal or greater than ${PCRE_MIN_VERSION}... " >&6; }
- PCRE_VERSION=$(${PCRE_CONFIG} --version)
- as_arg_v1="${PCRE_VERSION}"
-as_arg_v2="${PCRE_MIN_VERSION}"
+ if test ! -z "${PCRE2_CONFIG}"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking checking pcre2 version equal or greater than ${PCRE2_MIN_VERSION}" >&5
+printf %s "checking checking pcre2 version equal or greater than ${PCRE2_MIN_VERSION}... " >&6; }
+ PCRE2_VERSION=$(${PCRE2_CONFIG} --version)
+ as_arg_v1="${PCRE2_VERSION}"
+as_arg_v2="${PCRE2_MIN_VERSION}"
awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
case $? in #(
1) :
- PCRE_CONFIG=false ;; #(
+ PCRE2_CONFIG=false ;; #(
0) :
;; #(
2) :
@@ -5239,40 +6271,41 @@ case $? in #(
*) :
;;
esac
- if test "${PCRE_CONFIG}" != false; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ if test "${PCRE2_CONFIG}" != false; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
else
- PCRE_CONFIG=false
+ PCRE2_CONFIG=false
fi
fi
-if test "${PCRE_CONFIG}" != false; then
- PCRE_PATH=$(${PCRE_CONFIG} --prefix)
- as_ac_Header=`$as_echo "ac_cv_header_"$PCRE_PATH/include/pcre.h"" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" ""$PCRE_PATH/include/pcre.h"" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+if test "${PCRE2_CONFIG}" != false; then
+ PCRE2_PATH=$(${PCRE2_CONFIG} --prefix)
+ as_ac_Header=`printf "%s\n" "ac_cv_header_"$PCRE2_PATH/include/pcre2.h"" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" ""$PCRE2_PATH/include/pcre2.h"" "$as_ac_Header" "#define PCRE2_CODE_UNIT_WIDTH 8
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
-else
- PCRE_CONFIG=false
+else $as_nop
+ PCRE2_CONFIG=false
fi
-
fi
-if test "$PCRE_CONFIG" != "false"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: using system PCRE regular expressions library" >&5
-$as_echo "$as_me: using system PCRE regular expressions library" >&6;}
+if test "$PCRE2_CONFIG" != "false"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using system PCRE2 regular expressions library" >&5
+printf "%s\n" "$as_me: using system PCRE2 regular expressions library" >&6;}
if test "x$CFLAGS" = "x"; then
- test "x$silent" != "xyes" && echo " setting CFLAGS to \"`$PCRE_CONFIG --cflags`\""
- CFLAGS="`$PCRE_CONFIG --cflags`"
+ test "x$silent" != "xyes" && echo " setting CFLAGS to \"`$PCRE2_CONFIG --cflags`\""
+ CFLAGS="`$PCRE2_CONFIG --cflags`"
else
- apr_addto_bugger="`$PCRE_CONFIG --cflags`"
+ apr_addto_bugger="`$PCRE2_CONFIG --cflags`"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $CFLAGS; do
@@ -5290,10 +6323,10 @@ $as_echo "$as_me: using system PCRE regular expressions library" >&6;}
if test "x$LIBS" = "x"; then
- test "x$silent" != "xyes" && echo " setting LIBS to \"`$PCRE_CONFIG --libs`\""
- LIBS="`$PCRE_CONFIG --libs`"
+ test "x$silent" != "xyes" && echo " setting LIBS to \"`$PCRE2_CONFIG --libs8`\""
+ LIBS="`$PCRE2_CONFIG --libs8`"
else
- apr_addto_bugger="`$PCRE_CONFIG --libs`"
+ apr_addto_bugger="`$PCRE2_CONFIG --libs8`"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $LIBS; do
@@ -5310,14 +6343,14 @@ $as_echo "$as_me: using system PCRE regular expressions library" >&6;}
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: using bundled PCRE regular expressions library" >&5
-$as_echo "$as_me: using bundled PCRE regular expressions library" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using bundled PCRE2 regular expressions library" >&5
+printf "%s\n" "$as_me: using bundled PCRE2 regular expressions library" >&6;}
if test "x$INCLUDES" = "x"; then
- test "x$silent" != "xyes" && echo " setting INCLUDES to \"-Ipcre\""
- INCLUDES="-Ipcre"
+ test "x$silent" != "xyes" && echo " setting INCLUDES to \"-Ipcre2/src\""
+ INCLUDES="-Ipcre2/src"
else
- apr_addto_bugger="-Ipcre"
+ apr_addto_bugger="-Ipcre2/src"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $INCLUDES; do
@@ -5335,10 +6368,10 @@ $as_echo "$as_me: using bundled PCRE regular expressions library" >&6;}
if test "x$LDFLAGS" = "x"; then
- test "x$silent" != "xyes" && echo " setting LDFLAGS to \""-Lpcre/.libs"\""
- LDFLAGS=""-Lpcre/.libs""
+ test "x$silent" != "xyes" && echo " setting LDFLAGS to \""-Lpcre2/.libs"\""
+ LDFLAGS=""-Lpcre2/.libs""
else
- apr_addto_bugger=""-Lpcre/.libs""
+ apr_addto_bugger=""-Lpcre2/.libs""
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $LDFLAGS; do
@@ -5354,7 +6387,7 @@ $as_echo "$as_me: using bundled PCRE regular expressions library" >&6;}
done
fi
- PCRE_DEP="pcre/.libs/libpcre.a"
+ PCRE2_DEP="pcre2/.libs/libpcre2-8.a"
# save our work to this point; this allows the sub-package to use it
cat >confcache <<\_ACEOF
@@ -5384,8 +6417,8 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -5415,15 +6448,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
/^ac_cv_env_/b end
t clear
:clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
t end
s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
if test "x$cache_file" != "x/dev/null"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
if test ! -f "$cache_file" || test -h "$cache_file"; then
cat confcache >"$cache_file"
else
@@ -5437,18 +6470,18 @@ $as_echo "$as_me: updating cache $cache_file" >&6;}
fi
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
- echo "configuring package in src/pcre now"
+ echo "configuring package in src/pcre2 now"
ac_popdir=`pwd`
- apr_config_subdirs="src/pcre"
- test -d src/pcre || $mkdir_p src/pcre
- ac_abs_srcdir=`(cd $srcdir/src/pcre && pwd)`
- cd src/pcre
+ apr_config_subdirs="src/pcre2"
+ test -d src/pcre2 || $mkdir_p src/pcre2
+ ac_abs_srcdir=`(cd $srcdir/src/pcre2 && pwd)`
+ cd src/pcre2
# A "../" for each directory in /$config_subdirs.
ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
@@ -5469,7 +6502,7 @@ rm -f confcache
for apr_configure_arg in $ac_configure_args
do
case "$apr_configure_arg" in
- --with-pcre=*|\'--with-pcre=*)
+ --with-pcre2=*|\'--with-pcre2=*)
continue ;;
esac
apr_configure_args="$apr_configure_args$apr_sep'$apr_configure_arg'"
@@ -5483,9 +6516,9 @@ rm -f confcache
if eval $SHELL $ac_abs_srcdir/configure $apr_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir
then :
- echo "src/pcre configured properly"
+ echo "src/pcre2 configured properly"
else
- echo "configure failed for src/pcre"
+ echo "configure failed for src/pcre2"
exit 1
fi
@@ -5496,16 +6529,16 @@ rm -f confcache
# Some versions of bash will fail to source /dev/null (special files
# actually), so we avoid doing that. DJGPP emulates it as a regular file.
if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
@@ -5514,21 +6547,141 @@ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use fnv hash library for non-sequential filenames" >&5
-$as_echo_n "checking whether to use fnv hash library for non-sequential filenames... " >&6; }
+
+# Check whether --with-libchardet was given.
+if test ${with_libchardet+y}
+then :
+ withval=$with_libchardet; given_libchardet=$withval
+else $as_nop
+ given_libchardet='yes'
+fi
+
+
+found_libchardet=""
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use libchardet for automatic character set detection" >&5
+printf %s "checking whether to use libchardet for automatic character set detection... " >&6; }
+if test -n "${given_libchardet}" -a "${given_libchardet}" != "no"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+ user_pkg_config_path=""
+ pkg_config_print_libs=""
+
+ if test "${given_libchardet}" != "yes" -a "${given_libchardet}" != "/usr"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libchardet in \"${given_libchardet}\"" >&5
+printf %s "checking for libchardet in \"${given_libchardet}\"... " >&6; }
+ if test -d "${given_libchardet}/lib/pkgconfig"; then
+ user_pkg_config_path="${given_libchardet}/lib/pkgconfig"
+ pkg_config_print_libs="--libs"
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \"${given_libchardet}\"/lib/pkgconfig doesn't exist" >&5
+printf "%s\n" "$as_me: \"${given_libchardet}\"/lib/pkgconfig doesn't exist" >&6;}
+ fi
+ fi
+
+ if test -z "${user_pkg_config_path}"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for system libchardet" >&5
+printf %s "checking for system libchardet... " >&6; }
+ pkg_config_print_libs="--libs-only-l"
+ fi
+
+ cflags=`PKGCONFIG_PATH="${user_pkg_config_path}:${PKG_CONFIG_PATH}" $PKGCONF chardet --cflags-only-I 2>/dev/null`
+
+ if test $? -eq 0; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+ if test "x$INCLUDES" = "x"; then
+ test "x$silent" != "xyes" && echo " setting INCLUDES to \"$cflags\""
+ INCLUDES="$cflags"
+ else
+ apr_addto_bugger="$cflags"
+ for i in $apr_addto_bugger; do
+ apr_addto_duplicate="0"
+ for j in $INCLUDES; do
+ if test "x$i" = "x$j"; then
+ apr_addto_duplicate="1"
+ break
+ fi
+ done
+ if test $apr_addto_duplicate = "0"; then
+ test "x$silent" != "xyes" && echo " adding \"$i\" to INCLUDES"
+ INCLUDES="$INCLUDES $i"
+ fi
+ done
+ fi
+
+ ldflags=`PKG_CONFIG_PATH="${user_pkg_config_path}:${PKG_CONFIG_PATH}" $PKGCONF chardet ${pkg_config_print_libs} 2>/dev/null`
+
+ if test "x$EXTRA_LIBS" = "x"; then
+ test "x$silent" != "xyes" && echo " setting EXTRA_LIBS to \"$ldflags\""
+ EXTRA_LIBS="$ldflags"
+ else
+ apr_addto_bugger="$ldflags"
+ for i in $apr_addto_bugger; do
+ apr_addto_duplicate="0"
+ for j in $EXTRA_LIBS; do
+ if test "x$i" = "x$j"; then
+ apr_addto_duplicate="1"
+ break
+ fi
+ done
+ if test $apr_addto_duplicate = "0"; then
+ test "x$silent" != "xyes" && echo " adding \"$i\" to EXTRA_LIBS"
+ EXTRA_LIBS="$EXTRA_LIBS $i"
+ fi
+ done
+ fi
+
+ unset ldflags
+ found_libchardet=yes
+
+printf "%s\n" "#define HAVE_CHARDET 1" >>confdefs.h
+
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ fi
+
+ unset cflags
+ unset user_pkg_config_path
+ unset pkg_config_print_libs
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+if test "${found_libchardet}" != "yes"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: hypermail's automatic charset detection won't" >&5
+printf "%s\n" "$as_me: WARNING: hypermail's automatic charset detection won't" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: be available unless you install libchardet." >&5
+printf "%s\n" "$as_me: WARNING: be available unless you install libchardet." >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: See hypermail's release notes" >&5
+printf "%s\n" "$as_me: WARNING: See hypermail's release notes" >&2;}
+ fi
+
+unset found_libchardet
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use fnv hash library for non-sequential filenames" >&5
+printf %s "checking whether to use fnv hash library for non-sequential filenames... " >&6; }
# Check whether --enable-libfnv was given.
-if test "${enable_libfnv+set}" = set; then :
- enableval=$enable_libfnv; given_libfnv=$enableval
+if test ${enable_libfnv+y}
+then :
+ enableval=$enable_libfnv; given_libfnv=$enableval
fi
if test "$given_libfnv" != "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- $as_echo "#define HAVE_LIBFNV 1" >>confdefs.h
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ printf "%s\n" "#define HAVE_LIBFNV 1" >>confdefs.h
if test "x$INCLUDES" = "x"; then
@@ -5614,8 +6767,8 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -5645,15 +6798,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
/^ac_cv_env_/b end
t clear
:clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
t end
s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
if test "x$cache_file" != "x/dev/null"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
if test ! -f "$cache_file" || test -h "$cache_file"; then
cat confcache >"$cache_file"
else
@@ -5667,8 +6820,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;}
fi
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -5714,16 +6867,16 @@ rm -f confcache
# Some versions of bash will fail to source /dev/null (special files
# actually), so we avoid doing that. DJGPP emulates it as a regular file.
if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
@@ -5733,249 +6886,13 @@ fi
-USENSL=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr in -lsocket" >&5
-$as_echo_n "checking for gethostbyaddr in -lsocket... " >&6; }
-if ${ac_cv_lib_socket_gethostbyaddr+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyaddr ();
-int
-main ()
-{
-return gethostbyaddr ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_socket_gethostbyaddr=yes
-else
- ac_cv_lib_socket_gethostbyaddr=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyaddr" >&5
-$as_echo "$ac_cv_lib_socket_gethostbyaddr" >&6; }
-if test "x$ac_cv_lib_socket_gethostbyaddr" = xyes; then :
- result=yes
-else
- result=no
-fi
-
-if test $result = yes; then
- LIBS="$LIBS -lsocket"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr in -lsocket" >&5
-$as_echo_n "checking for gethostbyaddr in -lsocket... " >&6; }
-if ${ac_cv_lib_socket_gethostbyaddr+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket -lnsl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyaddr ();
-int
-main ()
-{
-return gethostbyaddr ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_socket_gethostbyaddr=yes
-else
- ac_cv_lib_socket_gethostbyaddr=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyaddr" >&5
-$as_echo "$ac_cv_lib_socket_gethostbyaddr" >&6; }
-if test "x$ac_cv_lib_socket_gethostbyaddr" = xyes; then :
- result=yes
-else
- result=no
-fi
-
- if test $result = yes; then
- LIBS = "$LIBS -lsocket -lnsl"
- USENSL=yes
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_addr in -lsocket" >&5
-$as_echo_n "checking for inet_addr in -lsocket... " >&6; }
-if ${ac_cv_lib_socket_inet_addr+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char inet_addr ();
-int
-main ()
-{
-return inet_addr ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_socket_inet_addr=yes
-else
- ac_cv_lib_socket_inet_addr=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_inet_addr" >&5
-$as_echo "$ac_cv_lib_socket_inet_addr" >&6; }
-if test "x$ac_cv_lib_socket_inet_addr" = xyes; then :
- result=yes
-else
- result=no
-fi
-
- if test $result = yes; then
- LIBS="$LIBS -lsocket"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_addr in -lsocket" >&5
-$as_echo_n "checking for inet_addr in -lsocket... " >&6; }
-if ${ac_cv_lib_socket_inet_addr+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket -lnsl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char inet_addr ();
-int
-main ()
-{
-return inet_addr ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_socket_inet_addr=yes
-else
- ac_cv_lib_socket_inet_addr=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_inet_addr" >&5
-$as_echo "$ac_cv_lib_socket_inet_addr" >&6; }
-if test "x$ac_cv_lib_socket_inet_addr" = xyes; then :
- result=yes
-else
- result=no
-fi
-
- if test $result = yes; then
- LIBS="$LIBS -lsocket -lnsl"
- USENSL=yes
- fi
- fi
- fi
-fi
-if test $USENSL != yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_addr in -lnsl" >&5
-$as_echo_n "checking for inet_addr in -lnsl... " >&6; }
-if ${ac_cv_lib_nsl_inet_addr+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnsl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char inet_addr ();
-int
-main ()
-{
-return inet_addr ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_nsl_inet_addr=yes
-else
- ac_cv_lib_nsl_inet_addr=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_inet_addr" >&5
-$as_echo "$ac_cv_lib_nsl_inet_addr" >&6; }
-if test "x$ac_cv_lib_nsl_inet_addr" = xyes; then :
- result=yes
-else
- result=no
-fi
-
- if test $result = yes; then
- LIBS="$LIBS -lnsl"
- fi
-fi
-
-
-
-ac_config_files="$ac_config_files Makefile archive/Makefile docs/Makefile libcgi/Makefile src/Makefile tests/testhm src/defaults.h"
+ac_config_files="$ac_config_files Makefile archive/Makefile docs/Makefile src/Makefile tests/testhm src/defaults.h"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -6004,8 +6921,8 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -6035,15 +6952,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
/^ac_cv_env_/b end
t clear
:clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
t end
s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
if test "x$cache_file" != "x/dev/null"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
if test ! -f "$cache_file" || test -h "$cache_file"; then
cat confcache >"$cache_file"
else
@@ -6057,8 +6974,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;}
fi
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -6075,7 +6992,7 @@ U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built.
as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
@@ -6091,8 +7008,8 @@ LTLIBOBJS=$ac_ltlibobjs
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
@@ -6115,14 +7032,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else
+else $as_nop
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
@@ -6132,46 +7051,46 @@ esac
fi
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -6180,13 +7099,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
@@ -6195,8 +7107,12 @@ case $0 in #((
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
done
IFS=$as_save_IFS
@@ -6208,30 +7124,10 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# as_fn_error STATUS ERROR [LINENO LOG_FD]
@@ -6244,13 +7140,14 @@ as_fn_error ()
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $2" >&2
+ printf "%s\n" "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
+
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -6277,18 +7174,20 @@ as_fn_unset ()
{ eval $1=; unset $1;}
}
as_unset=as_fn_unset
+
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
-else
+else $as_nop
as_fn_append ()
{
eval $1=\$$1\$2
@@ -6300,12 +7199,13 @@ fi # as_fn_append
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
-else
+else $as_nop
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
@@ -6336,7 +7236,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -6358,6 +7258,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
@@ -6371,6 +7275,12 @@ case `echo -n x` in #(((((
ECHO_N='-n';;
esac
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -6412,7 +7322,7 @@ as_fn_mkdir_p ()
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -6421,7 +7331,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -6484,7 +7394,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# values after options handling.
ac_log="
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -6542,14 +7452,16 @@ $config_headers
Report bugs to the package provider."
_ACEOF
+ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
+ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.69,
+configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -6587,15 +7499,15 @@ do
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
+ printf "%s\n" "$ac_cs_version"; exit ;;
--config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
+ printf "%s\n" "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
'') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
@@ -6603,7 +7515,7 @@ do
--header | --heade | --head | --hea )
$ac_shift
case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
as_fn_append CONFIG_HEADERS " '$ac_optarg'"
ac_need_defaults=false;;
@@ -6612,7 +7524,7 @@ do
as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
+ printf "%s\n" "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
@@ -6640,7 +7552,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
export CONFIG_SHELL
exec "\$@"
@@ -6654,7 +7566,7 @@ exec 5>>config.log
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
- $as_echo "$ac_log"
+ printf "%s\n" "$ac_log"
} >&5
_ACEOF
@@ -6671,7 +7583,6 @@ do
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"archive/Makefile") CONFIG_FILES="$CONFIG_FILES archive/Makefile" ;;
"docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
- "libcgi/Makefile") CONFIG_FILES="$CONFIG_FILES libcgi/Makefile" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"tests/testhm") CONFIG_FILES="$CONFIG_FILES tests/testhm" ;;
"src/defaults.h") CONFIG_FILES="$CONFIG_FILES src/defaults.h" ;;
@@ -6686,8 +7597,8 @@ done
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
+ test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
fi
# Have a temporary directory for convenience. Make it in the build tree
@@ -7023,7 +7934,7 @@ do
esac ||
as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
done
@@ -7031,17 +7942,17 @@ do
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
`' by configure.'
if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+printf "%s\n" "$as_me: creating $ac_file" >&6;}
fi
# Neutralize special characters interpreted by sed in replacement strings.
case $configure_input in #(
*\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
+ ac_sed_conf_input=`printf "%s\n" "$configure_input" |
sed 's/[\\\\&|]/\\\\&/g'`;; #(
*) ac_sed_conf_input=$configure_input;;
esac
@@ -7058,7 +7969,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
+printf "%s\n" X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -7082,9 +7993,9 @@ $as_echo X"$ac_file" |
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -7141,8 +8052,8 @@ ac_sed_dataroot='
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_datarootdir_hack='
@@ -7185,9 +8096,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
"$ac_tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&2;}
rm -f "$ac_tmp/stdin"
@@ -7203,20 +8114,20 @@ which seems to be undefined. Please make sure it is defined" >&2;}
#
if test x"$ac_file" != x-; then
{
- $as_echo "/* $configure_input */" \
+ printf "%s\n" "/* $configure_input */" >&1 \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
} >"$ac_tmp/config.h" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$ac_tmp/config.h" "$ac_file" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
- $as_echo "/* $configure_input */" \
+ printf "%s\n" "/* $configure_input */" >&1 \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
|| as_fn_error $? "could not create -" "$LINENO" 5
fi
@@ -7257,8 +8168,9 @@ if test "$no_create" != yes; then
$ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
+
diff --git a/configure.ac b/configure.ac
index 79714bfd..de6deb53 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,10 +1,11 @@
dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ([2.69])
+AC_PREREQ([2.71])
AC_REVISION($Revision: 1.2 $)dnl
AC_INIT
AC_CONFIG_SRCDIR([src/hypermail.c])
-AC_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIRS([m4])
AC_PREFIX_DEFAULT(/usr/local)
LDFLAGS=""
LIBS=""
@@ -15,8 +16,8 @@ GDBM_INCLUDE=""
GDBM_LIB=""
FNV_DEP=""
TRIO_DEP=""
-PCRE_DEP=""
-PCRE_MIN_VERSION="8.39"
+PCRE2_DEP=""
+PCRE2_MIN_VERSION="10.32"
dnl ===========================================================================
dnl Get host, target and build variables filled with appropriate info.
@@ -57,6 +58,7 @@ if test -z "$no_ranlib"; then
else
RANLIB=":"
fi
+AC_CHECK_TOOL([PKGCONF], [pkgconf])
dnl ===========================================================================
dnl Determine the host type and set compliation flags as needed
@@ -120,11 +122,6 @@ AC_ARG_WITH(httpddir,
httpddir=$with_httpddir, httpddir=/usr/local/apache)
AC_SUBST(httpddir)
-AC_ARG_WITH(cgidir,
- [ --with-cgidir=DIR where to install CGI scripts ],
- cgidir=$with_cgidir, cgidir=$httpddir/cgi-bin)
-AC_SUBST(cgidir)
-
AC_ARG_WITH(htmldir,
[ --with-htmldir=DIR where to install Hypermail HTML pages ],
htmldir=$with_htmldir, htmldir=$httpddir/htdocs/hypermail)
@@ -163,16 +160,39 @@ dnl ===========================================================================
dnl Checks headers
dnl ===========================================================================
-AC_HEADER_STDC
+m4_warn([obsolete],
+[The preprocessor macro `STDC_HEADERS' is obsolete.
+ Except in unusual embedded environments, you can safely include all
+ ISO C90 headers unconditionally.])dnl
+# Autoupdate added the next two lines to ensure that your configure
+# script's behavior did not change. They are probably safe to remove.
+AC_CHECK_INCLUDES_DEFAULT
+AC_PROG_EGREP
+
AC_CHECK_HEADERS(alloca.h arpa/inet.h ctype.h dirent.h errno.h \
- fcntl.h locale.h malloc.h netdb.h netinet/in.h pwd.h stdarg.h \
- stdio.h stdlib.h string.h sys/dir.h sys/param.h sys/socket.h \
+ fcntl.h inttypes.h locale.h malloc.h netdb.h netinet/in.h pwd.h stdarg.h \
+ stdint.h stdio.h stdlib.h string.h sys/dir.h sys/param.h sys/socket.h \
sys/stat.h sys/time.h sys/types.h time.h unistd.h)
AC_HEADER_STAT
AC_HEADER_DIRENT
-AC_HEADER_TIME
+m4_warn([obsolete],
+[Update your code to rely only on HAVE_SYS_TIME_H,
+then remove this warning and the obsolete code below it.
+All current systems provide time.h; it need not be checked for.
+Not all systems provide sys/time.h, but those that do, all allow
+you to include it and time.h simultaneously.])dnl
+AC_CHECK_HEADERS_ONCE([sys/time.h])
+# Obsolete code to be removed.
+if test $ac_cv_header_sys_time_h = yes; then
+ AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both
+ and . This macro is obsolete.])
+fi
+# End of obsolete code.
+
+
+AC_CHECK_DECLS([isblank, strcasecmp, strcasestr])
dnl ===========================================================================
dnl Checks for library functions.
@@ -182,9 +202,10 @@ dnl ===========================================================================
AC_STRUCT_TM
AC_FUNC_STRFTIME
-AC_CHECK_FUNCS(mkdir strdup strstr strtol memcpy memset lstat strcasecmp \
- strcasestr getpwuid getopt snprintf memmove strerror)
+AC_CHECK_FUNCS(getopt getpwuid isblank lstat memcpy memmove memset mkdir snprintf \
+ strcasecmp strcasestr strdup strerror strstr strtol)
+AC_TYPE_INTPTR_T
AC_TYPE_SIZE_T
if test $ac_cv_func_snprintf != no; then
@@ -274,80 +295,100 @@ ifelse($3,,[
])
])
+dnl
+dnl check for pkg-config
+dnl
+
+AC_MSG_NOTICE(checking for pkg-config)
+if test x"$PKGCONF" == x ; then
+ AC_MSG_ERROR('pkgconf' is missing; please install it.)
+fi
+
+dnl
+dnl gdbm check
+dnl
+
AC_ARG_WITH(gdbm,
AS_HELP_STRING([--with-gdbm=[DIR]],
- [Include GDBM support]),
+ [(UNMAINTAINED) Include GDBM support]),
[ given_gdbm=$withval])
-if test "$given_gdbm" != "no"; then
- for i in /usr/local /usr $withval; do
- if test -f "$i/include/gdbm.h"; then
- GDBM_INCLUDE="$i/include"
- THIS_PREFIX="$i"
- fi
- done
-
- unset ac_cv_lib_gdbm_gdbm_open
- AC_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[
- AC_CHECK_LIB(gdbm, gdbm_open, [GDBM_LIB="-lgdbm"])
- ])
-
- if test "$THIS_PREFIX" != "" && test "$THIS_PREFIX" != "/usr"; then
- THIS_LFLAGS="$THIS_PREFIX/lib"
- fi
+if test "${given_gdbm}" = "no"; then
+ given_gdbm=""
fi
-AC_MSG_CHECKING(for GDBM support)
-
-if test "$GDBM_LIB" = "" && test "$given_gdbm" != "no"; then
- AC_CHECK_LIB(gdbm, gdbm_open,[AC_DEFINE(GDBM,1, [Whether you have GDBM]) DBM_TYPE=gdbm; GDBM_LIB=-lgdbm],
- [DBM_TYPE=""])
- AC_MSG_CHECKING([gdbm library])
- if test "a$DBM_TYPE" = a; then
- AC_MSG_RESULT(none found)
- AC_MSG_WARN(No gdbm library found - will limit a few features)
- else
- AC_MSG_RESULT($DBM_TYPE found)
- fi
-else
- AC_MSG_RESULT(no)
+dnl user-defined GDBM local install
+if test -n "${given_gdbm}" -a "${given_gdbm}" != "yes" -a "${given_gdbm}" != "/usr"; then
+ AC_MSG_CHECKING(for "${given_gdbm}/include/gdbm.h")
+ if test -f "${given_gdbm}/include/gdbm.h"; then
+ GDBM_INCLUDE="${given_gdbm}/include"
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
+
+ if test -n "${GDBM_INCLUDE}"; then
+ unset ac_cv_lib_gdbm_gdbm_open
+ AC_TEMP_LDFLAGS(-L${given_gdbm}/lib,[
+ AC_CHECK_LIB(gdbm, gdbm_open,[GDBM_LIB="-lgdbm"],[GDBM_INCLUDE=""])
+ ])
+
+ if test -n "${GDBM_LIB}"; then
+ APR_ADDTO(LDFLAGS, "-L${given_gdbm}/lib")
+ else
+ AC_MSG_WARN(gdbm includes and/or libs not found under "${given_gdbm}")
+ fi
+ fi
fi
-if test "$GDBM_LIB" = "-lgdbm" && test "$GDBM_INCLUDE" = ""; then
+dnl if the user chose the system gdbm or alternative if autoconf found
+dnl issues with the path the user gave to a local gdbm
+if test -n "${given_gdbm}" -a -z "${GDBM_INCLUDE}"; then
+ gdbm_headers_found=1
+ AC_MSG_NOTICE(Trying /usr/include/gdbm.h)
AC_CHECK_HEADER(gdbm.h, [ GDBM_INCLUDE="" ], [
- AC_MSG_RESULT(Try /usr/local/include/gdbm.h)
+ AC_MSG_NOTICE(Trying /usr/local/include/gdbm.h)
AC_CHECK_HEADER(/usr/local/include/gdbm.h, [ GDBM_INCLUDE="-I/usr/local/include" ],[
- AC_MSG_RESULT(Try /opt/local/include/gdbm.h)
+ AC_MSG_NOTICE(Trying /opt/local/include/gdbm.h)
AC_CHECK_HEADER(/opt/local/include/gdbm.h, [ GDBM_INCLUDE="-I/opt/local/include" ],[
dnl if in /usr/pkg/include, do not add anything. See above.
- AC_MSG_RESULT(Try /usr/pkg/include/gdbm.h)
+ AC_MSG_NOTICE(Trying /usr/pkg/include/gdbm.h)
AC_CHECK_HEADER(/usr/pkg/include/gdbm.h, [ GDBM_INCLUDE="" ],[
- AC_MSG_RESULT([Giving up - You need to install gdbm.h somewhere])
- exit
+ AC_MSG_RESULT([gdbm.h not found])
+ gdbm_headers_found=0
])
])
])
- ])
-fi
+ ])
-if test -n "$GDBM_LIB"; then
- AC_ADD_INCLUDE($GDBM_INCLUDE)
- AC_DEFINE(HAVE_GDBM_H)
- EXTRA_LIBS="$EXTRA_LIBS $GDBM_LIB"
+ if test ${gdbm_headers_found} -eq 1; then
+ AC_CHECK_LIB(gdbm, gdbm_open,[DBM_TYPE=gdbm; GDBM_LIB=-lgdbm],
+ [DBM_TYPE=""])
+ fi
+
+ unset gdbm_headers_found
fi
+if test -n "${GDBM_LIB}"; then
+ AC_DEFINE(HAVE_GDBM_H)
+ AC_DEFINE(GDBM,1, [Whether you have GDBM])
+ AC_ADD_INCLUDE($GDBM_INCLUDE)
+ EXTRA_LIBS="$EXTRA_LIBS $GDBM_LIB"
+else
+ AC_MSG_WARN(hypermail's usegdbm config option won't be available unless you install libgdbm-dev)
+fi
dnl
dnl iconv check
dnl
-AC_ARG_ENABLE(i18n, [ --disable-i18n Disable I18N support], [given_iconv=$enableval])
-if test "$given_iconv" = "no"; then
- echo "disabled I18N support."
-else
- AC_CHECK_FUNCS(iconv)
- AC_CHECK_HEADERS(iconv.h)
-fi
+dnl iconv is part of libc6
+AC_CHECK_HEADERS(iconv.h,
+ [],
+ [AC_MSG_ERROR([unable to find iconv.h headers (libc6-dev may be missing)])])
+AC_CHECK_FUNCS(iconv,
+ [],
+ [AC_MSG_ERROR([unable to find iconv() function])])
dnl
dnl libtrio: select whether to use the system or the bundled libtrio
@@ -374,117 +415,184 @@ else
TRIO_DEP="trio/libtrio.a"
APR_SUBDIR_CONFIG([src/trio],
[CFLAGS=[-DTRIO_MINIMAL]],
- [--with-pcre=*|\'--with-pcre=*])
+ [--with-pcre2=*|\'--with-pcre2=*])
AC_SUBST([TRIO_DEP])
fi
dnl
-dnl PCRE: select whether to use an external, the system, or the bundled PCRE lib
+dnl PCRE2: select whether to use an external, the system, or the bundled PCRE2 lib
dnl partially borrowed from Apache's configure.in
dnl
dnl bundled pcre lib
AC_ARG_ENABLE(bundled_pcre,
- AS_HELP_STRING([--enable-bundled-pcre],
- [Force the use of the bundled PCRE library instead of the system one]))
+ AS_HELP_STRING([--enable-bundled-pcre2],
+ [Force the use of the bundled PCRE2 library instead of the system one]))
-dnl external PCRE lib
-AC_ARG_WITH(external_pcre,
- AS_HELP_STRING([--with-external-pcre=PATH_TO_PCRE_DIR|PATH_TO_PCRE_CONFIG_SCRIPT],
- [Use an external PCRE library instead of the system or the bundled one]))
+dnl external PCRE2 lib
+AC_ARG_WITH(external_pcre2,
+ AS_HELP_STRING([--with-external-pcre2=PATH_TO_PCRE2_DIR|PATH_TO_PCRE2_CONFIG_SCRIPT],
+ [Use an external PCRE2 library instead of the system or the bundled one]))
-AC_MSG_NOTICE(checking for PCRE regular expressions library)
+AC_MSG_NOTICE(checking for PCRE2 regular expressions library)
dnl if user selected the bundled one, give it priority over the bundled one
-if test ! -z ${enable_bundled_pcre}; then
- with_external_pcre=""
+if test ! -z ${enable_bundled_pcre2}; then
+ with_external_pcre2=""
fi
-case $with_external_pcre in
- /*) AC_MSG_NOTICE(--with-external-pcre => checking for an external libpcre)
- AC_MSG_CHECKING(for pcre-config)
- if test -d "$with_external_pcre" && test -x "$with_external_pcre/pcre-config"; then
- PCRE_CONFIG=$with_external_pcre/pcre-config
- elif test -x "$with_external_pcre"; then
- PCRE_CONFIG=$with_external_pcre
+case $with_external_pcre2 in
+ /*) AC_MSG_NOTICE(--with-external-pcre2 => checking for an external libpcre2)
+ AC_MSG_CHECKING(for pcre2-config)
+ if test -d "$with_external_pcre" && test -x "$with_external_pcre2/pcre2-config"; then
+ PCRE2_CONFIG=$with_external_pcre2/pcre2-config
+ elif test -x "$with_external_pcre2"; then
+ PCRE2_CONFIG=$with_external_pcre2
else
AC_MSG_RESULT(no)
- AC_MSG_ERROR(${PCRE_CONFIG} does not point to a directory or pcre-config)
+ AC_MSG_ERROR(${PCRE2_CONFIG} does not point to a directory or pcre2-config)
fi
- AC_MSG_RESULT(${PCRE_CONFIG})
+ AC_MSG_RESULT(${PCRE2_CONFIG})
- AC_MSG_CHECKING(for pcre version equal or greater than ${PCRE_MIN_VERSION})
- if test -f "${PCRE_CONFIG}" && test -x "${PCRE_CONFIG}"; then
- PCRE_VERSION=$(${PCRE_CONFIG} --version)
- AS_VERSION_COMPARE("${PCRE_VERSION}", "${PCRE_MIN_VERSION}",
- [PCRE_CONFIG=false], [], [])
- if test "${PCRE_CONFIG}" != false; then
+ AC_MSG_CHECKING(for pcre2 version equal or greater than ${PCRE2_MIN_VERSION})
+ if test -f "${PCRE2_CONFIG}" && test -x "${PCRE2_CONFIG}"; then
+ PCRE2_VERSION=$(${PCRE2_CONFIG} --version)
+ AS_VERSION_COMPARE("${PCRE2_VERSION}", "${PCRE2_MIN_VERSION}",
+ [PCRE2_CONFIG=false], [], [])
+ if test "${PCRE2_CONFIG}" != false; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
- AC_MSG_ERROR(the PCRE library version must be equal or greater than ${PCRE_MIN_VERSION})
+ AC_MSG_ERROR(the PCRE2 library version must be equal or greater than ${PCRE2_MIN_VERSION})
fi
else
AC_MSG_RESULT(no)
- AC_MSG_ERROR(${PCRE_CONFIG} does not point to a script)
+ AC_MSG_ERROR(${PCRE2_CONFIG} does not point to a script)
fi
;;
- *) PCRE_CONFIG=false
+ *) PCRE2_CONFIG=false
;;
esac
dnl nope; do we have a system PCRE lib?
-if test -z "${enable_bundled_pcre}" && test -z "${PCRE_CONFIG}" -o "${PCRE_CONFIG}" = "false"; then
- AC_MSG_NOTICE(checking for a system libpcre)
- AC_PATH_PROG([PCRE_CONFIG], [pcre-config], [])
- if test ! -z "${PCRE_CONFIG}"; then
- AC_MSG_CHECKING(checking pcre version equal or greater than ${PCRE_MIN_VERSION})
- PCRE_VERSION=$(${PCRE_CONFIG} --version)
- AS_VERSION_COMPARE("${PCRE_VERSION}", "${PCRE_MIN_VERSION}",
- [PCRE_CONFIG=false], [], [])
- if test "${PCRE_CONFIG}" != false; then
+if test -z "${enable_bundled_pcre2}" && test -z "${PCRE2_CONFIG}" -o "${PCRE2_CONFIG}" = "false"; then
+ AC_MSG_NOTICE(checking for a system libpcre2)
+ AC_PATH_PROG([PCRE2_CONFIG], [pcre2-config], [])
+ if test ! -z "${PCRE2_CONFIG}"; then
+ AC_MSG_CHECKING(checking pcre2 version equal or greater than ${PCRE2_MIN_VERSION})
+ PCRE2_VERSION=$(${PCRE2_CONFIG} --version)
+ AS_VERSION_COMPARE("${PCRE2_VERSION}", "${PCRE2_MIN_VERSION}",
+ [PCRE2_CONFIG=false], [], [])
+ if test "${PCRE2_CONFIG}" != false; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
else
- PCRE_CONFIG=false
+ PCRE2_CONFIG=false
fi
fi
dnl found a library, do we have compilation headers?
-if test "${PCRE_CONFIG}" != false; then
- PCRE_PATH=$(${PCRE_CONFIG} --prefix)
- AC_CHECK_HEADER(["$PCRE_PATH/include/pcre.h"], [ ],[PCRE_CONFIG=false])
+if test "${PCRE2_CONFIG}" != false; then
+ PCRE2_PATH=$(${PCRE2_CONFIG} --prefix)
+ AC_CHECK_HEADER(["$PCRE2_PATH/include/pcre2.h"], [ ],[PCRE2_CONFIG=false],
+ [#define PCRE2_CODE_UNIT_WIDTH 8])
fi
dnl PCRE conclusion
-if test "$PCRE_CONFIG" != "false"; then
- AC_MSG_NOTICE([using system PCRE regular expressions library])
- APR_ADDTO(CFLAGS, [`$PCRE_CONFIG --cflags`])
- APR_ADDTO(LIBS, [`$PCRE_CONFIG --libs`])
+if test "$PCRE2_CONFIG" != "false"; then
+ AC_MSG_NOTICE([using system PCRE2 regular expressions library])
+ APR_ADDTO(CFLAGS, [`$PCRE2_CONFIG --cflags`])
+ APR_ADDTO(LIBS, [`$PCRE2_CONFIG --libs8`])
else
- AC_MSG_NOTICE([using bundled PCRE regular expressions library])
- APR_ADDTO(INCLUDES, [-Ipcre])
- APR_ADDTO(LDFLAGS, "[-Lpcre/.libs]")
- PCRE_DEP="pcre/.libs/libpcre.a"
- APR_SUBDIR_CONFIG([src/pcre],
+ AC_MSG_NOTICE([using bundled PCRE2 regular expressions library])
+ APR_ADDTO(INCLUDES, [-Ipcre2/src])
+ APR_ADDTO(LDFLAGS, "[-Lpcre2/.libs]")
+ PCRE2_DEP="pcre2/.libs/libpcre2-8.a"
+ APR_SUBDIR_CONFIG([src/pcre2],
[],
- [--with-pcre=*|\'--with-pcre=*])
- AC_SUBST([PCRE_DEP])
+ [--with-pcre2=*|\'--with-pcre2=*])
+ AC_SUBST([PCRE2_DEP])
+fi
+
+dnl
+dnl check for libchardet
+dnl
+
+AC_ARG_WITH(libchardet,
+ AS_HELP_STRING([--with-libchardet=[DIR]],
+ [Use libchardet for character set detection, optional DIR points to path to local installed libchardet; leave empty for using system libchardet]),
+ [ given_libchardet=$withval ],
+ [ given_libchardet='yes' ])
+
+found_libchardet=""
+
+AC_MSG_CHECKING(whether to use libchardet for automatic character set detection)
+if test -n "${given_libchardet}" -a "${given_libchardet}" != "no"; then
+ AC_MSG_RESULT(yes)
+
+ user_pkg_config_path=""
+ pkg_config_print_libs=""
+
+ dnl check for libchardet in user-defined dir or system one (default)
+ if test "${given_libchardet}" != "yes" -a "${given_libchardet}" != "/usr"; then
+ AC_MSG_CHECKING(for libchardet in "${given_libchardet}")
+ if test -d "${given_libchardet}/lib/pkgconfig"; then
+ user_pkg_config_path="${given_libchardet}/lib/pkgconfig"
+ pkg_config_print_libs="--libs"
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_NOTICE("${given_libchardet}"/lib/pkgconfig doesn't exist)
+ fi
+ fi
+
+ if test -z "${user_pkg_config_path}"; then
+ AC_MSG_CHECKING(for system libchardet)
+ pkg_config_print_libs="--libs-only-l"
+ fi
+
+ cflags=`PKGCONFIG_PATH="${user_pkg_config_path}:${PKG_CONFIG_PATH}" $PKGCONF chardet --cflags-only-I 2>/dev/null`
+
+ if test $? -eq 0; then
+ AC_MSG_RESULT(yes)
+ APR_ADDTO(INCLUDES, [$cflags])
+ ldflags=`PKG_CONFIG_PATH="${user_pkg_config_path}:${PKG_CONFIG_PATH}" $PKGCONF chardet ${pkg_config_print_libs} 2>/dev/null`
+ APR_ADDTO(EXTRA_LIBS, [$ldflags])
+ unset ldflags
+ found_libchardet=yes
+ AC_DEFINE_UNQUOTED(HAVE_CHARDET,[1],[Use libchardet for character set detection])
+ else
+ AC_MSG_RESULT(no)
+ fi
+
+ unset cflags
+ unset user_pkg_config_path
+ unset pkg_config_print_libs
+else
+ AC_MSG_RESULT(no)
+fi
+
+if test "${found_libchardet}" != "yes"; then
+ AC_MSG_WARN(hypermail's automatic charset detection won't)
+ AC_MSG_WARN(be available unless you install libchardet.)
+ AC_MSG_WARN(See hypermail's release notes)
+ dnl AC_MSG_WARN(https://github.com/Joungkyun/libchardet)
fi
+unset found_libchardet
+
dnl
dnl The FNV hash library used for the nonsequential filenames
dnl
AC_MSG_CHECKING([whether to use fnv hash library for non-sequential filenames])
AC_ARG_ENABLE(libfnv,
- [ AS_HELP_STRING([--enable-libfnv],
- [use the fnv hash library for generating non-sequential filenames [no]])
+ [AS_HELP_STRING([--enable-libfnv],
+ [(EXPERIMENTAL, UNMAINTAINED) use the fnv hash library for generating non-sequential filenames [no]])
],
- [ given_libfnv=$enableval ])
+ [given_libfnv=$enableval])
if test "$given_libfnv" != "yes"; then
AC_MSG_RESULT([no])
@@ -499,41 +607,6 @@ else
fi
AC_SUBST(FNV_DEP)
-
-dnl ===========================================================================
-dnl Checks for libraries.
-dnl nsl socket lib?
-dnl ===========================================================================
-
-USENSL=no
-AC_CHECK_LIB(socket,gethostbyaddr,result=yes,result=no)
-if test $result = yes; then
- LIBS="$LIBS -lsocket"
-else
- AC_CHECK_LIB(socket,gethostbyaddr,result=yes,result=no,-lnsl)
- if test $result = yes; then
- LIBS = "$LIBS -lsocket -lnsl"
- USENSL=yes
- else
- AC_CHECK_LIB(socket,inet_addr,result=yes,result=no)
- if test $result = yes; then
- LIBS="$LIBS -lsocket"
- else
- AC_CHECK_LIB(socket,inet_addr,result=yes,result=no,-lnsl)
- if test $result = yes; then
- LIBS="$LIBS -lsocket -lnsl"
- USENSL=yes
- fi
- fi
- fi
-fi
-if test $USENSL != yes; then
- AC_CHECK_LIB(nsl,inet_addr,result=yes,result=no)
- if test $result = yes; then
- LIBS="$LIBS -lnsl"
- fi
-fi
-
dnl ===========================================================================
dnl Makefile variable substitution
dnl ===========================================================================
@@ -545,6 +618,6 @@ AC_SUBST(LIBS)
AC_SUBST(EXTRA_LIBS)
AC_SUBST(INCLUDES)
-AC_CONFIG_FILES([Makefile archive/Makefile docs/Makefile libcgi/Makefile src/Makefile tests/testhm src/defaults.h])
+AC_CONFIG_FILES([Makefile archive/Makefile docs/Makefile src/Makefile tests/testhm src/defaults.h])
AC_OUTPUT
diff --git a/contrib/css_to_c.pl b/contrib/css_to_c.pl
new file mode 100644
index 00000000..9556495d
--- /dev/null
+++ b/contrib/css_to_c.pl
@@ -0,0 +1,95 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+# This script reads a CSS file in stdin and outputs in stdout the C
+# code for the src/printcss.c file. Replace that file with the
+# output from this script.
+#
+# print_default_css_file() will generate the default CSS file for
+# an hypermail mailing list archive
+
+# Usage: css_to_c.pl <../docs/hypermail.css >../src/printcss.c
+#
+# Author: J. Kahan Sep 2021
+#
+
+sub beginning {
+
+ print << "__HERE__";
+/*
+** Copyright (C) 2021 Hypermail Project
+**
+** This program and library is free software; you can redistribute it and/or
+** modify it under the terms of the GNU (Library) General Public License
+** as published by the Free Software Foundation; either version 3
+** of the License, or 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 (Library) General Public License for more details.
+**
+** You should have received a copy of the GNU (Library) 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
+*/
+
+/* THIS FILE IS GENERATED BY RUNNING contrib/css_to_c.pl ON A CSS FILE
+** DO NOT EDIT THIS FILE BY HAND; RATHER EDIT docs/hypermail.css TO
+** REGENERATE IT. IF YO WANT TO CHANGE THE C CODE ITSELF, PLEASE EDIT
+** THE css_to_c.pl SCRIPT
+*/
+
+#include "hypermail.h"
+#include "setup.h"
+
+#include "proto.h"
+
+void print_default_css_file(char *filename)
+{
+ FILE *fp;
+
+ if ((fp = fopen(filename, "w")) == NULL) {
+ trio_snprintf(errmsg, sizeof(errmsg), "%s \\"%s\\".", lang[MSG_COULD_NOT_WRITE], filename);
+ progerr(errmsg);
+ }
+
+__HERE__
+}
+
+sub end {
+ print << "__HERE__";
+
+ fclose(fp);
+
+ if (chmod(filename, set_filemode) == -1) {
+ trio_snprintf(errmsg, sizeof(errmsg), "%s \\"%s\\": %o.", lang[MSG_CANNOT_CHMOD], filename, set_filemode);
+ progerr(errmsg);
+ }
+
+} /* end print_default_css_file */
+
+__HERE__
+}
+
+sub convert_css {
+ while (<>) {
+ chomp;
+ # escape the few chars that may interfere with fprintf
+ # % == %%
+ # " == \"
+ # \ == \\
+ s#%#%%#g;
+ s#(["\\])#\\$1#g;
+ print " fprintf(fp, \"" . $_ . "\\n\");\n";
+ }
+}
+
+# main
+{
+ beginning();
+ convert_css();
+ end();
+}
diff --git a/docs/Makefile.in b/docs/Makefile.in
index a8a087bf..f271348c 100644
--- a/docs/Makefile.in
+++ b/docs/Makefile.in
@@ -17,23 +17,24 @@ htmldir=@htmldir@
INSTALL_PROG=@INSTALL@
all: install
-
+
uninstall:
rm -f $(mandir)/man1/hypermail.1
rm -f $(mandir)/man4/hmrc.4
(if [ -d $(htmldir) ]; then \
- rm -f $(htmldir)/hr.yellow.png; \
- rm -f $(htmldir)/hypermail.png; \
- rm -f $(htmldir)/stars.png; \
rm -f $(htmldir)/archive_search.html; \
- rm -f $(htmldir)/hypermail.html; \
- rm -f $(htmldir)/hypermail-faq.html; \
rm -f $(htmldir)/customizing.html; \
+ rm -f $(htmldir)/faq.html; \
rm -f $(htmldir)/hmrc.html; \
+ rm -f $(htmldir)/hypermail.css; \
+ rm -f $(htmldir)/hypermail.html; \
+ rm -f $(htmldir)/hypermail.png; \
+ rm -f $(htmldir)/hypermail-doc.css; \
+ rm -f $(htmldir)/thanks.html; \
rmdir $(htmldir); \
fi)
-install: install.man install.html
+install: install.man install.html install.css
install.man:
@(if [ ! -d $(mandir) ]; then mkdir -p $(mandir); fi)
@@ -44,14 +45,18 @@ install.man:
install.html:
@(if [ ! -d $(htmldir) ]; then mkdir -p $(htmldir); fi)
- $(INSTALL_PROG) -c -m 0644 hr.yellow.png $(htmldir)
- $(INSTALL_PROG) -c -m 0644 hypermail.png $(htmldir)
- $(INSTALL_PROG) -c -m 0644 stars.png $(htmldir)
$(INSTALL_PROG) -c -m 0644 archive_search.html $(htmldir)
- $(INSTALL_PROG) -c -m 0644 hypermail.html $(htmldir)
- $(INSTALL_PROG) -c -m 0644 hypermail-faq.html $(htmldir)
$(INSTALL_PROG) -c -m 0644 customizing.html $(htmldir)
+ $(INSTALL_PROG) -c -m 0644 faq.html $(htmldir)
$(INSTALL_PROG) -c -m 0644 hmrc.html $(htmldir)
+ $(INSTALL_PROG) -c -m 0644 hypermail.html $(htmldir)
+ $(INSTALL_PROG) -c -m 0644 hypermail.png $(htmldir)
+ $(INSTALL_PROG) -c -m 0644 hypermail-doc.css $(htmldir)
+ $(INSTALL_PROG) -c -m 0644 thanks.html $(htmldir)
+
+install.css:
+ @(if [ ! -d $(htmldir) ]; then mkdir -p $(htmldir); fi)
+ $(INSTALL_PROG) -c -m 0644 hypermail.css $(htmldir)
clean:
clobber:
diff --git a/docs/archive_search.html b/docs/archive_search.html
index 0ee645b0..faad40db 100644
--- a/docs/archive_search.html
+++ b/docs/archive_search.html
@@ -1,74 +1,85 @@
-
-
-
- Adding a search engine to your Hypermail archives
-
-
-
-
-
+
+
+
+
+
+ Adding a search engine to your Hypermail archives
+
+
+
+
+
+
-Adding a search engine
to your Hypermail archives
-
-One of the feature requests we hear most often is to incorporate
-a search engine in Hypermail. But because everyone has his or her
-own favorite search engine, and since it's hard to imagine a search engine
-that may not turn out to be unusable
-for some archives, we haven't built a search engine into hypermail, and
-we probably won't.
-
-But hypermail's page
-customizations make it easy to integrate your own search engine into your
-hypermail archives.
-
-For our example, we're going to put a form box on the top and bottom of
-every index page, and we'll use the swish-e
-search engine. We'll show a typical PHP
-script and a typical Perl script that can
-function as a glue layer between the web and the search engine.
-There ought to be enough information here to get you
-started regardless of what search engine and scripting language you choose
-for your site.
-
-Let's begin by modifying the header and footer hypermail puts on each
-index file.
-
-(1) Create a file called indexheader.hyp containing the following:
-indexheader.hyp
-
+ THIS DOC IS VERY OLD, WRITTEN FOR THE DEFUNCT SWISH SEARCH ENGINE AND HASN'T BEEN REVIEWED IN AGES.
+ IT'S INCLUDED HERE FOR INFORMATIONAL PURPOSES.
+
+ Adding a search engine
+ to your Hypermail archives
+ One of the feature requests we hear most often is to
+ incorporate a search engine in Hypermail. But because everyone
+ has his or her own favorite search engine, and since it's hard to
+ imagine a search engine that may not turn out to be unusable for
+ some archives, we haven't built a search engine into hypermail,
+ and we probably won't.
+ But hypermail's page customizations make it easy to integrate
+ your own search engine into your hypermail archives.
+ For our example, we're going to put a form box on the top and
+ bottom of every index page, and we'll use the swish-e search engine. We'll show a
+ typical PHP script and a
+ typical Perl script that can
+ function as a glue layer between the web and the search engine.
+ There ought to be enough information here to get you started
+ regardless of what search engine and scripting language you
+ choose for your site.
+ Let's begin by modifying the header and footer hypermail puts
+ on each index file.
+ (1) Create a file called indexheader.hyp containing the
+ following:
+ indexheader.hyp
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@@ -110,26 +121,25 @@ indexheader.hyp
</div>
-
-Notice the HTML comment about 2/3 of the way down. Everything
-above that line is standard, and ought to be very similar to the default
-header. The custom code (below the comment) adds the features you
-want to add. In this case, it's a form for a search.
-
-You will, of course, substitute your own URL for search.php for the form's ACTION
-and the name of your own search index for "name.of.index". See the bottom of this page for
-an example of creating a search index file.
-
-If you like the general appearance of the web pages Hypermail creates and
-don't want to spend a lot of time playing with the HTML, you might want to
-look at the source of "index.html" in the directory for which you're installing
-a search engine and just copy the appropriate lines (e.g., the lines
-above the first <hr />) to indexheader.hyp.
-
-(2) Create a file called indexfooter.hyp containing the following:
-
-indexfooter.hyp
-
+ Notice the HTML comment about 2/3 of the way down. Everything
+ above that line is standard, and ought to be very similar to the
+ default header. The custom code (below the comment) adds the
+ features you want to add. In this case, it's a form for a
+ search.
+ You will, of course, substitute your own URL for search.php
+ for the form's ACTION and the name of your own search index for
+ "name.of.index". See the bottom of this page for an example of
+ creating a search index file.
+ If you like the general appearance of the web pages Hypermail
+ creates and don't want to spend a lot of time playing with the
+ HTML, you might want to look at the source of "index.html" in the
+ directory for which you're installing a search engine and just
+ copy the appropriate lines (e.g., the lines above the
+ first <hr />) to indexheader.hyp.
+ (2) Create a file called indexfooter.hyp containing the
+ following:
+ indexfooter.hyp
+
<div class="center">
<form action="/url/of/search.php" method="post"
enctype="application/x-www-form-urlencoded">
@@ -153,18 +163,16 @@ indexfooter.hyp
</html>
-Since this is a footer file, the common code will be at the end, and
-you'll put your custom code above the comment.
-
-You may have noted what seem to be superfluous <div> elements in
-the HTML in the header and footer file.
-The W3C validator likes them, and
-they do no harm.
-
-(3) Modify the .hmrc file to point to your custom header and footer:
-
-.hmrc (excerpt)
-
+ Since this is a footer file, the common code will be at the
+ end, and you'll put your custom code above the comment.
+ You may have noted what seem to be superfluous <div>
+ elements in the HTML in the header and footer file. The W3C validator likes them, and they
+ do no harm.
+ (3) Modify the .hmrc file to point to your custom header and
+ footer:
+ .hmrc (excerpt)
+
# ihtmlheaderfile = [ path to index header template file | NONE ]
#
# Set this to the path to the Index header template file containing
@@ -182,18 +190,16 @@ .hmrc (excerpt)
ihtmlfooterfile = /path/to/indexfooter.hyp
-You'll call hypermail using this .hmrc file to create your archive
-or add a message:
-
-
+ You'll call hypermail using this .hmrc file to create your
+ archive or add a message:
+
hypermail -c /path/to/.hmrc [...]
-Here's a sample PHP script that performs the minimum functionality
-required for "search.php":
-
-search.php
-
+ Here's a sample PHP script that performs the minimum
+ functionality required for "search.php":
+ search.php
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@@ -272,29 +278,25 @@ search.php
</html>
-
-If you prefer Perl, or if your web server doesn't offer PHP, then you could
-modify these lines in indexheader.hyp and indexfooter.hyp:
-
-
+ If you prefer Perl, or if your web server doesn't offer PHP,
+ then you could modify these lines in indexheader.hyp and
+ indexfooter.hyp:
+
<form action="/url/of/search.php" method="post"
enctype="application/x-www-form-urlencoded">
-
-to
-
-
+ to
+
<form action="/url/of/search.pl" method="post"
enctype="application/x-www-form-urlencoded">
-
-Here's a sample script contributed by Perl maven Greg Bacon that
-performs the minimum functionality required for "search.pl":
-
-search.pl
-
+ Here's a sample script contributed by Perl maven Greg Bacon
+ that performs the minimum functionality required for
+ "search.pl":
+ search.pl
+
#! /usr/local/bin/perl -T
@@ -502,14 +504,13 @@ search.pl
EOFooter
-
-Swish-e, like many other search engines, requires you to generate
-a search index before you perform any searches. Here's a .conf file for
-swish-e that might generate a reasonable
-search index for a hypermail archive of messages about model railroading:
-
-model-rr.conf
-
+ Swish-e, like many other search engines, requires you to
+ generate a search index before you perform any searches. Here's a
+ .conf file for swish-e that might generate a reasonable search
+ index for a hypermail archive of messages about model
+ railroading:
+ model-rr.conf
+
IndexDir /path/to/model-rr-archive
IndexFile /path/to/model-rr.index
IndexReport 3
@@ -523,30 +524,32 @@ model-rr.conf
FileRules filename is thread.html
-
-This tells swish-e to collect data from all the HTML files in your
-model railroading archive except the index pages that hypermail
-generates. That way, all the search results will point directly to the
-messages themselves.
-
-When you want to build your search index, you'll call swish-e something like this:
-
-
+ This tells swish-e to collect data from all the HTML files in
+ your model railroading archive except the index pages
+ that hypermail generates. That way, all the search results will
+ point directly to the messages themselves.
+ When you want to build your search index, you'll call swish-e
+ something like this:
+
swish-e -v 3 -c /path/to/model-rr.conf > /path/to/model-rr.report 2>&1
-Many people do this either in a cron job during off-peak hours or
-through a CGI script that they call whenever they update their archive.
-
-You might want to add search logging, page control (so you only
-print, say, 20 results at a time), some nice CSS, and all sorts of other
-things to your script. And if you'd prefer to write your script in
-Python, sh, or Ada, you can do that too. From here on, it's up to you.
-
-
---
-Bob Crispen
-Thursday, June 26, 2003
-
+ Many people do this either in a cron job during off-peak hours
+ or through a CGI script that they call whenever they update their
+ archive.
+ You might want to add search logging, page control (so you
+ only print, say, 20 results at a time), some nice CSS, and all
+ sorts of other things to your script. And if you'd prefer to
+ write your script in Python, sh, or Ada, you can do that too.
+ From here on, it's up to you.
+
+ --
+
+ Bob Crispen
+
+
+ Thursday, June 26, 2003
+
+
diff --git a/docs/customizing.html b/docs/customizing.html
index 653bd241..9a085e0c 100644
--- a/docs/customizing.html
+++ b/docs/customizing.html
@@ -1,478 +1,514 @@
-
-
-
-Hypermail Documentation
-
-
-
-
Customizing Hypermail Pages
-
-
-
-
-Contents:
-
- - Hypermail Pages
-
-
- Definitions
-
-
- Choosing the Default Look of Your Pages
-
- - Standard Page HTML
-
-
- Table Menu Display
-
-
-
- Using Template Files to Customize Your Pages
-
-
-
- Including Reference Links
-
- In-lining Images
-
- Changing The HTML File Suffix
-
-
-
-
-
Hypermail Pages
-
-You can customize hypermail generated pages to suit your local web site
-needs as well as the needs of the list.
-Hypermail generates three types of files:
-
-- HTML index pages,
-
- HTML message pages,
-
- MIME enclosure attactment files.
-
-
-The attachment files are a copy of the attachment the user included and
-are not altered.
-
-This version of hypermail allows you to
-customize both index and message pages separately as described below.
-
-
-
-
Definitions
-
-In the examples below, the following terms are used.
-
-label - the label passed in via the
-command line or specified in the list configuration file.
-
-indextype - depends on the type of index being
-presented. It could be By Author, By Date, By Subject, or By
-Thread.
-
-mailto-address - the MAILTO
-value compiled into hypermail, specified in the environment with the
-HM_MAILTO variable, or specified in the
-hm_mailto variable in the list specific
-configuration file.
-
-subject-of-message - the contents of the message's
-RFC 2822 Subject:
-header.
-
-HMURL - Used to contain a link to the Hypermail
-Development Center. Defined in hypermail.h.
-
-PROGNAME - contains the name of the executable.
-Defined in hypermail.h.
-
-VERSION - contains the version of the software that
-generated the page this appears on. Defined in src/hypermail.h.
-
-
-
-
Choosing the Default Look of Your Pages
-
-There is no need to customize hypermail pages unless you have a specific
-need. There are two different default page layouts provided with hypermail,
-the Table Menu Display and the Standard Display.
-
-
-
Standard Page HTML
-
-
-If you are not using the HTML template files described
-below then Hypermail generates headers and footers that look similar
-to the following. Note that you can substitute a <BODY> statement by
-either defining BODY in options.h or by using the
-hm_body variable in a list specific configuration file.
-
-
-
Index Page Headers
-
-
-The default Index page headers used in hypermail look like:
-
-
-
-
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-
<HTML>
-
<HEAD>
-
<TITLE>label: indextype</TITLE>
-
<LINK REV="made" HREF="mailto:mailto-address">
-
<HEAD>
-
<BODY BGCOLOR="#ffffff" TEXT="#000000">
-
<H1 ALIGN=CENTER>label<BR>By indextype</H1>
-
<HR WIDTH=400>
-
-
-
-
-
-
Message Pages
-
-
-The default Message page headers used in hypermail look like:
-
-
-
-
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-
<HTML>
-
<HEAD>
-
<TITLE>label: subject-of-message</TITLE>
-
<LINK REV="made" HREF="mailto:mailto-address">
-
<HEAD>
-
<BODY BGCOLOR="#ffffff" TEXT="#000000">
-<H1 ALIGN=CENTER>subject</H1>
-
<HR>
-
-
-
-
-
-
Page Footer
-
-
-The default page footer shown below is used in hypermail on both the
-index and the message pages look like:
-
-
-
-
-<HR>
-
<P>
-
<SMALL>
-
<EM>
-
This archive was generated by <A HREF="HMURL">PROGNAME VERSION</A> on DATE and TIME
-
</EM>
-
</SMALL>
-
</BODY>
-
</HTML>
-
-
-
-
-
-
Table Menu Display
-
-
-The table menu display generates pages that have a menu bar at the top
-and the bottom of the page that looks something like the following. If
-you have enabled the "About" and "Other Archives" links are displayed if
-you have enabled them in options.h, the environment variables or in the
-list configuration file. A example page:
-
-
TITLE HERE
-
-
-
-
-New Message
-Reply
-About this list
-Date view
-Thread view
-Subject view
-Author view
-
-
-
-
-Kent Landfield (kent@landfield.com)
-Wed, 17 Jun 1998 22:28:29 -0500 (CDT)
-
-
-- Next message: Kent Landfield: "Re: Getting started"
-
- Previous message: Crispen, Bob: "RE: Ideas"
-
- Next in thread: Andrew Kuchling: "Re: Getting started"
-
-
-BODY OF MESSAGE HERE
-
-
-
-- Next message: Kent Landfield: "Ideas"
-
- Next in thread: Guido van Rossum: "Re: Getting started"
-
-
-
-
-New Message
-Reply
-About this list
-Date view
-Thread view
-Subject view
-Author view
-
-
-
-
-
-
-
-This archive was generated by hypermail 2.0x
-on Thu Jun 04 1998 - 10:05:34 CDT
-
-
-
-If you do not want to use the table display then make sure that
-USETABLE is not defined in options.h and the
-hm_usetable is not enabled in the list configuration file.
-When you do so you will get the standard look and feel of the hypermail
-you have grown acustomed to.
-
-
-
-Also note that New Message allows you to provide a means
-for someone to post a message to the list. This feature is currently only
-availabe on the Table Menu Display. It can be enabled or disabled by defining
-HMAIL in options.h or by setting the hm_hmail
-variable in the list specific configuration file.
-
-
-
-
Using Template Files to Customize Your Pages
-
-You can customize your page headers and footers by specifying HTML template
-files. Hypermail reads template files and uses those in generating the header
-and footer sections of the index and message pages. Template files contain
-the actual HTML that you want used when generating the pages. Template files
-may also contain "Substitution Cookies".
-
-
-
Substitution Cookies
-
-You can insert "substitution cookies" in the header and footer template
-files so the appropriate information is filled in at runtime.
-
-Substitution cookies supported:
-
-
-
-%% - '%' character
-%~ - Storage directory
-%a - Other Archives URL
-%b - About Archive URL
-%e - Email address of message Author - Not valid on index pages
-%g - Date and time archive generated
-%h - HMURL
-%i - Message-id - Not valid on index pages
-%l - Archive label
-%m - Mailto address
-%p - PROGNAME
-%s - Subject of message or Index Title
-%v - VERSION
-%u - Expanded version link (HMURL,PROGNAME,VERSION)
-\n - newline character
-\t - tab character
-
-
-
-Additional cookies generate the complete HTML lines:
-
-
-%A - Author META HTML - Not valid on index pages
-%B - BODY HTML statement
-%S - Subject META HTML
-
-
-
-
-
Specifying template file locations
-
-You can specify the location of the template files either via environment
-variables or via entries in the list specific configuration file.
-
-
Using Environment Variables
-
-If you wish to use environment variables, make sure they are exported and
-correctly available for hypermail to use. How to do this is dependent on
-the type of shell in use. See the appropriate man pages if you need more
-information.
-
-- HM_IHTMLHEADERFILE - the location of the INDEX header template.
-
- HM_IHTMLFOOTERFILE - the location of the INDEX footer template.
-
- HM_MHTMLHEADERFILE - the location of the MESSAGE header template.
-
- HM_MHTMLFOOTERFILE - the location of the MESSAGE footer template.
-
-
-
Using Configuration File Entries
-
-An easy way is to tell hypermail where the template files are is via a
-list specific configuration file. The following entries can be used.
-
-
-- hm_ihtmlheaderfile - the location of the INDEX header template.
-
- hm_ihtmlfooterfile - the location of the INDEX footer template.
-
- hm_mhtmlheaderfile - the location of the MESSAGE header template.
-
- hm_mhtmlfooterfile - the location of the MESSAGE footer template.
-
-
-
-
Examples
-
-
-It is acceptable to have a single configuration file listed in more than
-one entry. Suppose you want to have a common footer for all pages and
-separate headers. The following example shows that.
-
-
-hm_ihtmlheaderfile = /lists/wu-ftpd/wu-ftpd-index.hyp
-hm_mhtmlheaderfile = /lists/wu-ftpd/wu-ftpd-msg.hyp
-hm_ihtmlfooterfile = /lists/wu-ftpd/wu-ftpd-msgfooter.hyp
-hm_mhtmlfooterfile = /lists/wu-ftpd/wu-ftpd-msgfooter.hyp
-
-
-
-If an entry is left blank and a location is not specified via an environment
-variable then the hypermail default headers are used.
-
-
-hm_ihtmlheaderfile = /lists/wu-ftpd/wu-ftpd-index.hyp
-hm_ihtmlfooterfile =
-hm_mhtmlheaderfile = /lists/wu-ftpd/wu-ftpd-msg.hyp
-hm_mhtmlfooterfile = /lists/wu-ftpd/wu-ftpd-msgfooter.hyp
-
-
-The above example informs hypermail to use the template files listed for
-the Index header and the Message header and footer. The hypermail default
-page footer would be used on the index pages.
-
-
-NOTE: While it is not necessary to provide absolute paths,
-it is a good idea to.
-
-
-
Message Pages
-
-
-Each HTML file that is generated for a message contains (where applicable):
-
-
-- the subject of the article,
-
- the name and email address of the sender,
-
- the date the article was sent,
-
- links to the next and previous messages in the archive,
-
- a link to the message the article is in reply to, and
-
- a link to the message next in the current thread.
-
-
-
-
-
Including Reference Links
-
-
-Reference links such as the following
-
-
-- Next message: Kent Landfield: "Re: Getting started"
-
- Previous message: Crispen, Bob: "RE: Ideas"
-
- Next in thread: Andrew Kuchling: "Re: Getting started"
-
-
-are normally included on each of the message pages. If this
-is not what you want you can disable them by using the
-SHOW_MESSAGE_LINKS
-define in options.h or the hm_show_msg_links
-in the list's configuration file.
-
-
-
-Additionally, if you want to list all replies to a message
-such as the following,
-
-
-- In reply to: Kent Landfield: "Getting started"
-
- Reply: Guido van Rossum: "Re: Getting started"
-
- Reply: Andrew Kuchling: "Re: Getting started"
-
- Reply: Kent Landfield: "Re: Getting started"
-
-
-you can do so by setting the SHOWREPLIES
-define in options.h or the hm_showreplies
-in the list's configuration file.
-
-
-
-
In-lining Images
-
-It is possible to have images that are sent in email automatically
-displayed when the message is presented. To do this you need to set
-the hm_inline_types in the list configuration file.
-
-
-For example, if you listed
-
-hm_inline_types = image/gif image/jpeg
-
-then both GIF files and JPEG files would be displayed as part of the
-message. Types that are not "in-lined" are linked as a simple attachment
-requiring the user to click on it to have it displayed.
-
-
-
-
Changing The HTML File Suffix
-
-You may wish to have the pages generated use a different HTML file
-suffix other than the default ".html". To do this you need
-to either set the default define HTMLSUFFIX in options.h,
-set the environment variable HM_HTMLSUFFIX or set it in
-the list's configuration file by using the hm_htmlsuffix
-variable.
-
-Note:
-Do not include a "." in the suffix; If you do
-you will end up with filenames that look like. "..html"
-
-
-
See Also
-
-hypermail.(1),
-
-hmrc.(4),
-
-Hypermail
-
-and
-
-Hypermail List Configuration File.
-and Adding a Search Engines to your Hypermail Archive
-
-
-
-
-Last updated April 10, 2003
-
-
-
-
+
+
+
+
+
+ Hypermail Documentation - Customizing Hypermail Pages
+
+
+
+
+
Customizing Hypermail Pages
+
+ Contents:
+
+ - Hypermail Pages
+ - Definitions
+ -
+ Choosing the Default Look of Your Pages
+
+ -
+ Standard Page HTML
+
+
+ - Table Menu Display
+
+
+ -
+ Using Template Files to Customize Your Pages
+
+
+ - Including Reference Links
+ - In-lining Images
+ - Changing The HTML File Suffix
+
+
+ Hypermail Pages
You can
+ customize hypermail generated pages to suit your local web site
+ needs as well as the needs of the list. Hypermail generates three
+ types of files:
+
+ - HTML index pages,
+ - HTML message pages,
+ - MIME enclosure attactment files.
+
+ The attachment files are a copy of the attachment the user
+ included and are not altered.
+ This version of hypermail allows you to customize both index
+ and message pages separately as described below.
+
+ Definitions
+ In the examples below, the following terms are used.
+ label - the label passed in via the
+ command line or specified in the list configuration file.
+ indextype - depends on the type of
+ index being presented. It could be By Author, By
+ Date, By Subject, or By Thread.
+ mailto-address - the
+ MAILTO value compiled into hypermail, specified
+ in the environment with the HM_MAILTO variable,
+ or specified in the hm_mailto variable in the
+ list specific configuration file.
+ subject-of-message - the contents of
+ the message's RFC
+ 2822 Subject: header.
+ HMURL - Used to contain a link to
+ the Hypermail Development Center. Defined in hypermail.h.
+ PROGNAME - contains the name of the
+ executable. Defined in hypermail.h.
+ VERSION - contains the version of
+ the software that generated the page this appears on. Defined in
+ src/hypermail.h.
+
+ Choosing the Default Look of Your
+ Pages
+ There is no need to customize hypermail pages unless you have
+ a specific need. There are two different default page layouts
+ provided with hypermail, the Table Menu Display and the Standard
+ Display.
+ Standard Page HTML
+ If you are not using the HTML template files
+ described below then Hypermail generates headers and footers that
+ look similar to the following. Note that you can substitute a
+ <BODY> statement by either defining BODY
+ in options.h or by using the hm_body variable in
+ a list specific configuration file.
+ Index Page
+ Headers
+ The default Index page headers used in hypermail look
+ like:
+
+ <!DOCTYPE HTML PUBLIC "-//IETF//DTD
+ HTML//EN">
+ <HTML>
+ <HEAD>
+ <TITLE>label: indextype</TITLE>
+
+ <LINK REV="made"
+ HREF="mailto:mailto-address">
+ <HEAD>
+ <BODY BGCOLOR="#ffffff" TEXT="#000000">
+ <H1
+ ALIGN=CENTER>label<BR>By indextype</H1>
+
+ <HR WIDTH=400>
+
+ Message Pages
+ The default Message page headers used in hypermail look
+ like:
+
+ <!DOCTYPE HTML PUBLIC "-//IETF//DTD
+ HTML//EN">
+ <HTML>
+ <HEAD>
+ <TITLE>label: subject-of-message</TITLE>
+
+ <LINK REV="made"
+ HREF="mailto:mailto-address">
+ <HEAD>
+ <BODY BGCOLOR="#ffffff" TEXT="#000000"> <H1
+ ALIGN=CENTER>subject</H1>
+ <HR>
+
+ Page Footer
+ The default page footer shown below is used in hypermail on
+ both the index and the message pages look like:
+
+ <HR>
+ <P>
+ <SMALL>
+ <EM>
+ This archive was generated by <A
+ HREF="HMURL">PROGNAME VERSION</A> on DATE and
+ TIME
+ </EM>
+ </SMALL>
+ </BODY>
+ </HTML>
+
+ Table Menu Display
+ The table menu display generates pages that have a menu bar at
+ the top and the bottom of the page that looks something like the
+ following. If you have enabled the "About" and "Other Archives"
+ links are displayed if you have enabled them in options.h, the
+ environment variables or in the list configuration file. A
+ example page:
+ TITLE HERE
+
+
+
+ New
+ Message
+
+ Reply
+ About this
+ list
+ Date view
+ Thread view
+ Subject view
+ Author view
+
+
+
+ Kent Landfield (kent@landfield.com)
+
+ Wed, 17 Jun 1998 22:28:29 -0500 (CDT)
+
+ - Next message: Kent Landfield: "Re: Getting
+ started"
+ - Previous message: Crispen, Bob: "RE: Ideas"
+ - Next in thread: Andrew Kuchling: "Re: Getting
+ started"
+
+
+ BODY OF MESSAGE
+ HERE
+
+
+ - Next message: Kent Landfield: "Ideas"
+ - Next in thread: Guido van Rossum: "Re: Getting
+ started"
+
+
+
+
+ New
+ Message
+
+ Reply
+ About this
+ list
+ Date view
+ Thread view
+ Subject view
+ Author view
+
+
+
+ This archive was generated by hypermail 2.0x on Thu Jun 04
+ 1998 - 10:05:34 CDT
+ If you do not want to use the table display then make sure
+ that USETABLE is not defined in options.h and
+ the hm_usetable is not enabled in the list
+ configuration file. When you do so you will get the standard look
+ and feel of the hypermail you have grown acustomed to.
+ Also note that New Message allows you to
+ provide a means for someone to post a message to the list. This
+ feature is currently only availabe on the Table Menu Display. It
+ can be enabled or disabled by defining HMAIL in
+ options.h or by setting the hm_hmail variable in
+ the list specific configuration file.
+
+ Using Template Files to Customize
+ Your Pages
+ You can customize your page headers and footers by specifying
+ HTML template files. Hypermail reads template files and uses
+ those in generating the header and footer sections of the index
+ and message pages. Template files contain the actual HTML that
+ you want used when generating the pages. Template files may also
+ contain "Substitution Cookies".
+ Substitution Cookies
+ You can insert "substitution cookies" in the header and footer
+ template files so the appropriate information is filled in at
+ runtime.
+ Substitution cookies supported:
+
+
+
+ %%
+ - '%' character
+
+
+ %~
+ - Storage directory
+
+
+ %a
+ - Other Archives URL
+
+
+ %b
+ - About Archive URL
+
+
+ %e
+ - Email address of message Author - Not valid on index
+ pages
+
+
+ %g
+ - Date and time archive generated
+
+
+ %h
+ - HMURL
+
+
+ %i
+ - Message-id - Not valid on index pages
+
+
+ %l
+ - Archive label
+
+
+ %m
+ - Mailto address
+
+
+ %p
+ - PROGNAME
+
+
+ %s
+ - Subject of message or Index Title
+
+
+ %v
+ - VERSION
+
+
+ %u
+ - Expanded version link (HMURL,PROGNAME,VERSION)
+
+
+ \n
+ - newline character
+
+
+ \t
+ - tab character
+
+
+
+ Additional cookies generate the complete HTML
+ lines:
+
+
+
+ %A
+ - Author META HTML - Not valid on index pages
+
+
+ %B
+ - BODY HTML statement
+
+
+ %S
+ - Subject META HTML
+
+
+
+ Specifying template file
+ locations
+ You can specify the location of the template files either via
+ environment variables or via entries in the list specific
+ configuration file.
+ Using Environment
+ Variables
+ If you wish to use environment variables, make sure they are
+ exported and correctly available for hypermail to use. How to do
+ this is dependent on the type of shell in use. See the
+ appropriate man pages if you need more information.
+
+ - HM_IHTMLHEADERFILE - the location of the
+ INDEX header template.
+ - HM_IHTMLFOOTERFILE - the location of the
+ INDEX footer template.
+ - HM_MHTMLHEADERFILE - the location of the
+ MESSAGE header template.
+ - HM_MHTMLFOOTERFILE - the location of the
+ MESSAGE footer template.
+
+ Using Configuration File
+ Entries
+ An easy way is to tell hypermail where the template files are
+ is via a list specific configuration file. The following entries
+ can be used.
+
+ - hm_ihtmlheaderfile - the location of the
+ INDEX header template.
+ - hm_ihtmlfooterfile - the location of the
+ INDEX footer template.
+ - hm_mhtmlheaderfile - the location of the
+ MESSAGE header template.
+ - hm_mhtmlfooterfile - the location of the
+ MESSAGE footer template.
+
+ Examples
+ It is acceptable to have a single configuration file listed in
+ more than one entry. Suppose you want to have a common footer for
+ all pages and separate headers. The following example shows
+ that.
+
+ hm_ihtmlheaderfile = /lists/wu-ftpd/wu-ftpd-index.hyp
+ hm_mhtmlheaderfile = /lists/wu-ftpd/wu-ftpd-msg.hyp
+ hm_ihtmlfooterfile = /lists/wu-ftpd/wu-ftpd-msgfooter.hyp
+ hm_mhtmlfooterfile = /lists/wu-ftpd/wu-ftpd-msgfooter.hyp
+
+ If an entry is left blank and a location is not specified via
+ an environment variable then the hypermail default headers are
+ used.
+
+ hm_ihtmlheaderfile = /lists/wu-ftpd/wu-ftpd-index.hyp
+ hm_ihtmlfooterfile =
+ hm_mhtmlheaderfile = /lists/wu-ftpd/wu-ftpd-msg.hyp
+ hm_mhtmlfooterfile = /lists/wu-ftpd/wu-ftpd-msgfooter.hyp
+
The above example informs hypermail to use the
+ template files listed for the Index header and the Message header
+ and footer. The hypermail default page footer would be used on
+ the index pages.
+ NOTE: While it is not necessary to provide
+ absolute paths, it is a good idea to.
+ Message Pages
+ Each HTML file that is generated for a message contains (where
+ applicable):
+
+ - the subject of the article,
+ - the name and email address of the sender,
+ - the date the article was sent,
+ - links to the next and previous messages in the
+ archive,
+ - a link to the message the article is in reply to, and
+ - a link to the message next in the current thread.
+
+
+ Including Reference
+ Links
+ Reference links such as the following
+
+ - Next message: Kent Landfield: "Re: Getting
+ started"
+ - Previous message: Crispen, Bob: "RE: Ideas"
+ - Next in thread: Andrew Kuchling: "Re: Getting
+ started"
+
are normally included on each of the message pages. If this
+ is not what you want you can disable them by using the
+ SHOW_MESSAGE_LINKS define in options.h or the
+ hm_show_msg_links in the list's configuration
+ file.
+ Additionally, if you want to list all replies
+ to a message such as the following,
+
+ - In reply to: Kent Landfield: "Getting started"
+ - Reply: Guido
+ van Rossum: "Re: Getting started"
+ - Reply: Andrew
+ Kuchling: "Re: Getting started"
+ - Reply: Kent
+ Landfield: "Re: Getting started"
+
you can do so by setting the SHOWREPLIES
+ define in options.h or the hm_showreplies in the
+ list's configuration file.
+
+ In-lining Images
+ It is possible to have images that are sent in email
+ automatically displayed when the message is presented. To do this
+ you need to set the hm_inline_types in the list
+ configuration file.
+ For example, if you listed
+
+ hm_inline_types = image/gif image/jpeg
+
then both GIF files and JPEG files would be
+ displayed as part of the message. Types that are not "in-lined"
+ are linked as a simple attachment requiring the user to click on
+ it to have it displayed.
+
+ Changing The HTML File
+ Suffix
+ You may wish to have the pages generated use a different HTML
+ file suffix other than the default ".html". To do this you need
+ to either set the default define HTMLSUFFIX in
+ options.h, set the environment variable
+ HM_HTMLSUFFIX or set it in the list's
+ configuration file by using the hm_htmlsuffix
+ variable.
+ Note: Do not include a "." in the suffix; If
+ you do you will end up with filenames that look like.
+ "..html"
+
+ See Also
+
+ hypermail.(1),
+ hmrc.(4), Hypermail and
+ Hypermail List Configuration
+ File. and Adding a Search Engines to your Hypermail
+ Archive
+
+
+ Last updated April 10,
+ 2003
+
+
diff --git a/docs/faq.html b/docs/faq.html
new file mode 100644
index 00000000..644cc595
--- /dev/null
+++ b/docs/faq.html
@@ -0,0 +1,499 @@
+
+
+
+
+
+ Hypermail Frequently Asked Questions
+
+
+
+
+
+
+
+ Hypermail Frequently Asked Questions
+
+ This is the beginning of the Hypermail FAQ.
+ Don't dispair that there is little here. That will change
+ shortly.
+ Table of Contents
+
+ - Why is the License Different ?
+ - Will hypermail run on my system ?
+ - What Happened to EIT ?
+ - Where in the World is Kevin Hughes ?
+ - What is the latest version of Hypermail
+ ?
+ - Where can I get the latest version of
+ Hypermail ?
+ - How can I split the archives into months
+ ?
+ - How do I change the font on the pages
+ ?
+ - What is HM_MAILTO used for ?
+ - Can I send a message to the list from the web
+ archive ?
+ - Can I build and run this on Windows
+ 98/2000/NT ?
+ - How can I remove a listserver subject prefix
+ ?
+ - Which configuration file should I use
+ ?
+ - Why is the downloaded file name different
+ when I download hypermail.tar.gz ?
+ - Can I throttle hypermail's CPU usage
+ ?
+ - How can I make my archive searchable
+ ?
+ - How does hypermail decide whether messages
+ are in the same thread?
+ - How can I have multiple mailboxes produce one
+ archive?
+ - I have received an email with attachment that
+ needs octet-stream. What should I do?
+ - Why is Hypermail ignoring some
+ messages?
+ - Bogus dates are causing some emails to be put
+ in a strange folder. Is there an easy way around this?
+
+
+ 1. Why is the License Different
+ ?
+ Hewlett-Packard (who is now the legal owner of Hypermail,
+ since EIT was bought by VeriFone, which was bought by
+ Hewlett-Packard) has put it under the GNU license, a widely used
+ "free software" license. This means that you can use and modify
+ the source code as long as you make your changes publically
+ available and do not charge for their use (although, under GNU,
+ you can charge for their distribution). More details are
+ available at http://www.fsf.org/ and http://www.fsf.org/copyleft/gpl.html.
+
+
+ 2. Will hypermail run on my
+ system ?
+ Hypermail can compile and run as-is on most of the more
+ popular UNIX systems today. If you're not sure if hypermail will
+ run on your UNIX system, try compiling it and see!
+ Hypermail has been reported to work on MacOSX (X.2.6), with
+ the advice to use --disable-shared and manually execute make in
+ src/pcre.
+ People have indeed ported hypermail to DOS, Windows 95, and
+ Windows NT (but not Java ...yet). Installation advice for some
+ Windows systems is available at win32.html.
+
+
+ 3. What Happened to EIT
+ ?
+ A very old and established government contractor company
+ called Electronic Instrumentation and Technology Inc. made legal
+ moves to obtain the eit.com domain. Since VeriFone/HP had no
+ interest in keeping EIT, they dissolved it completely some months
+ ago. This company had a trademark on EIT so the domain name was
+ given to them. (Thank you InterNic...)
+
+
+ 4. Where in the World is Kevin
+ Hughes ?
+ Kevin has not dropped off the face of the earth but is
+ extremely busy these days as a Hypermedia Engineer at Veo
+ Systems.
+
+ Kevin Hughes
+ kev@kevcom.com
+ kevinh@veosys.com
+ (650) 858-7710 (office number)
+ (650) 858-4925 (fax)
+ www.veosystems.com
+
+
+
+ 5. What is the latest version of
+ Hypermail ?
+ The latest stable version of Hypermail is Version 2.1.9. It is
+ available from http://www.hypermail-project.org
+
+
+ 6. Where can I get the latest
+ version of Hypermail ?
+ The latest version of Hypermail is available from the
+ Hypermail Development Center at SourceForge
+ and/or at
+ http://www.hypermail-project.org/
It
+ and past versions are also available via FTP from
+ ftp://ftp.hypermail.org/hypermail/
+ The cvs server at :pserver:cvs@cvs.hypermail.org:/CVS
+ usually has a more recent but less tested version.
+
+ 7. How can I split the archives
+ into months ?
+ I have a fat archive that I'd like to split up by month,
+ like I see so many others doing. Is there a description somewhere
+ of a procedure to follow, or will I just have to think it
+ through?
+ If you are using version 2.1.0 or later and either have gdbm
+ or don't do incremental updates, see the folder_by_date option. The simple
+ way to use this is to add these to your .hmrc:
+
+ folder_by_date="%y%m"
+ usegdbm = 1
+
and regenerate your archive from its mbox file.
+ An older alternative is a set of scripts in a directory named
+ archive/ that has tools to do just
+ what you want to do.
+ If you want index files split by month but don't need to split
+ the archive into multiple directories, try adding
+ "monthly_index=1" in your config file (usually ~/.hmrc)
+ (available in version 2.1). A summary.html file will provide
+ links to all the monthly indices. This is probably appropriate
+ for archives with a few thousand messages, but for larger
+ archives I recommend splitting into multiple directories.
+ There's a script at http://users.netrus.net/troc/perl.html
+ called mms (monthly mail splitter) which has also been reported
+ useful.
+
+
+ 8. How do I change the font on
+ the pages ?
+ What I'd like to do is change the font of the archives
+ pages. I tried doing this by adding a <FONT FACE=...> tag
+ in the header.hyp file and a <FONT> tag in the footer file,
+ but it didn't work. Is there something in the program itself
+ that's preventing me from making this change?
+ Yes and no. Let me guess... You have hm_usetable =
+ 1. The code for tables is not inheriting the FONT values
+ and that they need to be set in the <TH..> tags. If tables
+ are not used it works as expected.
+ To test it put a
+
+ <FONT SIZE="1"
+ FACE="GENEVA,ARIAL,HELVETICA">
+
in the test-index.hyp and test-msg.hyp. In
+ test-footer.hyp put
+
+ </FONT>
+
+ With hm_usetable = 1 in the test.rc file,
+ then ran "hypermail -c test.rc -m testmail" and
+ everything between the "menus" was the right FONT but the menus
+ were not.
+ Then edit the test.rc file and set hm_usetable =
+ 0. Next remove the existing testdir and rerun hypermail
+ again. This time the FONT works as expected.
+ Is this what is happening to you ? If so the code will need to
+ be modified.
+
+
+ 9. What is HM_MAILTO used for
+ ?
+ I've enabled this option in .hyprc (the configuration file
+ to which the pipe script for my archive points). Unlike the other
+ options, this one does not create a link to
+ mailto:admin@domain.com as I would expect. Any ideas?
+ HM_MAILTO has a couple different uses. One is to trigger the
+ insertion of the <LINK REV=made HREF=mailto:...> header in
+ the HTML sources. This is most useable with ascii browsers such
+ as lynx.
+
+ hm_mailto = [ email-address | NONE ]
+ #
+ # The address of the contact point that is put in the HTML
+ header line
+ # <LINK REV=made HREF=mailto:hm_mailto>
+ #
+ # The <LINK...> header can be disabled by default by
+ setting
+ # mailto to NONE.
+
+ It can also be used in a hypermail page template file since it
+ resolves to %m.
+ For example, your footer file might look like...
+ <P ALIGN=CENTER><IMG
+ SRC="/images/bar.png" WIDTH="400" HEIGHT="4"
+ ALT="---------"></P>
+ <ADDRESS>
+ <EM>
+ <SMALL>
+ This archive was generated by %u on %g
+ <P ALIGN=CENTER>
+ Send administrative comments to<A
+ HREF="mailto:%m">%m</A>
+ </P>
+ </SMALL>
+ </EM>
+ </ADDRESS>
+ </BODY>
+ </HTML>
+ In this case the %m is expanded to admin@domain.com.
+
+
+ 10. Can I send a message to the
+ list from the web archive ?
+ I would like to add a link to the menu that says "Send a
+ Message to the List." I read through the documentation on your
+ website, and I think I know what I have to do. However, I cannot
+ find an example of what a .hyp template file should look
+ like.
+ That's what "Respond" on the menubar does. It allows a person
+ to reply to the existing message, with the reply sent to the list
+ address. And "mail a new topic" on the menubar allows a user to
+ send a new message to the list.
+ To enable this feature set
+
+ hm_hmail = listaddr@your-site.domain
+
+
+ Can I build and run this on
+ Windows 98/2000/NT ?
+ I would like to use Hypermail on my Windows box. Can I ?
+ If so how do I build the latest version ?
+ There is a complete description on how to build hypermail on a
+ Windows system at win32.html. This was
+ written by Bob Crispen <bob.crispen@boeing.com>. (Thanks
+ Bob!)
+
+
+ How can I remove a listserver
+ subject prefix ?
+ The Subject index page does not seem to do the right
+ sorting. My list has a "subject prefix" so people can filter
+ their inbound mail better. Is that confusing the sorting
+ ?
+ Yes. Hypermail functions that deal with replies look for the
+ Re: and return a pointer to the subject line after the "Re: ".
+ The listserver software is prefixing the subject line contents
+ with [subject-prefix]. For example:
+ Initial message:
+
+ Subject: [subject-prefix] the subject of the
+ message
+
+ Replies:
+
+ Subject: [subject-prefix] Re: the subject of the
+ message
+
+ The best solution is to use the directive
+
+ stripsubject = [subject-prefix]
+
in the config file for that list. Then
+ [subject-prefix] is stripped before the Reply processing occurs
+ and the proper things happen. This is the proper fix since
+ hypermail would need to know to strip the [subject-prefix] from
+ the initial messages to get it right.
+
+
+ Which configuration file should
+ I use ?
+ Which configuration file should I use ?. Is it the
+ hypermail.rc file in the Configs directory? I'm trying to edit
+ the appearance of pages created by hypermail, but I think I'm
+ trying to edit the wrong config file.
+ With one of the later versions you can use the -v option to
+ generate a config file that you can use. There is not just one
+ config file. What are included are examples.
+
+ $ hypermail -v >
+ some-file.rc
+
Edit the some-file.rc and set the values to what you
+ want.
+ Then run hypermail using the config file by:
+
+ $ hypermail -c some-file.rc.
+
+
+
+ Why is the downloaded file name
+ different when I download hypermail.tar.gz ?
+ The source is available from
+
+ www.hypermail.org/hypermail.tar.gz
+
However: When downloading though IE v4 browser
+ on an NT PC, you get a file called hypermail_tar.tar.
+ Depending on your browser MIME type setup and support
+ applications, the filename downloaded might be hypermail.tar,
+ hypermail.tar.gz, etc. In any case, you will be informed as to
+ the filename when you actually download it onto a Windows/NT PC.
+ Use that name from that point forward.
+
+
+ Can I throttle hypermail's CPU
+ usage ?
+ I'm looking for a good way to throttle hypermail. When it
+ runs it is taking over both CPU's on my system. Is there a way to
+ have it limit itself?
+ There is currently no "nice" call in hypermail to limit
+ itself. Maybe we can consider it in the future. You might run it
+ as a subcommand to nice. For example in an aliases file:
+
+ "|nice someval 'hypermail command
+ line'"
+
I've NEVER tried this so... ;)
+ You might also be looking at a very large archive with lots of
+ messages being the cause. If so then try breaking it up into
+ smaller archives such as monthly archives. Tools are available
+ for that in the latest release.
+ And if the list is a high traffic list, consider not running
+ it from a sendmail alias and instead, run it from cron. (To
+ assure it does not run unnecessarily, consider using 'make' to
+ check dependencies on the inbound mailbox and the archive itself.
+ If the mailbox is newer, then run the hypermail command. If not,
+ then no new message have been received so don't bother running
+ it.
+ If the you are using the linkquotes option and incremental
+ update (-u option), add a searchbackmsgnum line to your config
+ file. It controls the tradeoff between speed and the reliability
+ of finding the right source for quoted text. Try to set it to the
+ largest number of messages between a message and the final direct
+ reply to that message.
+
+
+ How can I make my archive
+ searchable ?
+ Where can I find a program that provides an easy way of
+ adding a "search this archive" feature to my hypermail
+ archive?
+ These seem to be the most popular choices:
+
+ - Htdig
+ - Swish-E
+ - Glimpse
+ - Namazu
+ - mnoGoSearch
+
Swish-E comes with a script (index_hypermail.pl) that is
+ customized for indexing Hypermail archives. index_hypermail.txt has a description
+ of how to use it.
+ You can also use search engines by putting text such as this
+ on your web page (although this search produces results from an
+ entire site, not just the email archive):
+ <form action=http://www.google.com/search>
+ <input type=text name=as_q>
+ <input type=hidden name=as_sitesearch
+ value=hypermail-project.org>
+ <input type=submit value="Search Hypermail">
+ </form>
+ You can probably get more complete (but apparently not recent)
+ info at: Search
+ Engine Software For Your Web Site.
+
+
+ How does hypermail decide
+ whether messages are in the same thread?
+ It uses the In-Reply-To: header if that is available. If not,
+ it uses the References: header if that is available. If these are
+ not available, it looks for previous messages with the same
+ subject header. Matches based on the subject are listed as
+ "maybe" replies.
+ If the linkquotes option is used, it will also search the
+ message bodies of the previous searchbackmsgnum (default = 500)
+ messages for text that looks like it is being quoted in the
+ current message. If it finds one or more prior messages with such
+ text matches, it will treat the one with the longest match as the
+ message being replied to. The exact algorithms for deciding what
+ is quoted text are a bit complex. These matches override the
+ In-Reply-To: and References: info (this rule may deserve further
+ thought).
+
+
+ How can I have multiple
+ mailboxes produce one archive?
+ One simple way is to combine them into one mailbox, and send
+ that to hypermail. Something like
+
+ "cat file1 file2 file3 > combined"
+
should do that.
+ Another way is to invoke hypermail several times, using the -u
+ flag for any mailboxes that you want added after the html archive
+ has been started:
+
+ hypermail -m file1
+ hypermail -u -m file2
+ hypermail -u -m file3
+
+Do not try to send hypermail more than one mailbox at a time,
+ or send it a second mailbox without using the -u flag or the
+ increment=1 or increment=-1 option.
+
+
+I have received an email with
+ attachment that needs octet-stream. What should I do?
+ No attachment "needs" octet-stream. octet-stream is a label
+ that describes the attachment as being "a stream of octets". What
+ is that you say? Well, the application didn't know any more
+ specifics and thus it identified it as good as possible. It knows
+ it is a stream of octets, nothing else.
+ So, an attachment coming as "octet-stream" can be pretty much
+ ANYTHING. You have no idea, and neither does anyone else. The
+ only way to figure out is to download the file and see for
+ yourself, ask the person who mailed it or to hope that the mail
+ it came with describes what the attachment was about.
+ "octet-stream" could just as well be named "I haven't got the
+ slightest idea what this is, but I know it is built up with a
+ series of bytes".
+
+
+ Why is Hypermail ignoring some
+ messages?
+ One possibility is that those messages have a header
+ saying
+
+ X-No-Archive: yes
+
which seems to indicate that the author doesn't want
+ them included in any archive. This is controlled by a configure
+ option which defaults to:
+
+ deleted = "X-Hypermail-Deleted X-No-Archive"
+
To get Hypermail to treat these as normal messages,
+ add this to your config file (which is ~/.hmrc by default) or
+ alter the "deleted" line in your existing config file to:
+
+ deleted = "X-Hypermail-Deleted"
+
+
+
+ Bogus dates are causing some
+ emails to be put in a strange folder. Is there an easy way around
+ this?
+ If the bad dates were caused by a computer with the date set
+ absurdly, try running mailbox_date_trimmer.py,
+ available in the Hypermail's contrib directory.
+ If the bad dates are in a format that Hypermail doesn't
+ understand, then you will probably need to edit them
+ manually.
+
+
+
+
+
+ Do you have a Hypermail related question you'd like
+ to see listed here ? If so send mail to the Hypermail mailing
+ list hypermail@hypermail-project.org
+ (preferably with the answers). In order to
+ minimize spam on the list, you must subscribe to the list (at
+ least temporarily) in order to send mail to it. You may
+ subscribe to the list by sending a message with the word
+ "subscribe" in the Subject: field to
+ hypermail-request@hypermail-project.org.
+
+
+
+
+
diff --git a/docs/hmrc.4 b/docs/hmrc.4
index 8a79e180..736192a1 100644
--- a/docs/hmrc.4
+++ b/docs/hmrc.4
@@ -184,6 +184,15 @@ for the valid conversion specifications.
A string to be stripped from all subject lines. Helps unclutter
mailing lists which add tags to subject lines.
.TP
+.B archive_date = boolean_number
+Adds a specific line in the indexes giving the date the archive
+was generated. Disabled by default.
+.TP
+.B hypermail_colophon = boolean_number
+Adds a footer line to messages and indexes stating that the archive
+was generated by hypermail, the version, and the generation date.
+Enabled by default.
+.TP
.B archives = "URL"
This will create a link in the archived index pages labeled
.I "Other mail archives"
@@ -236,15 +245,6 @@ experimental
.B X-Robots-Tag
HTTP header. For more information, browse https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag
.TP
-.B indextable = boolean_number
-Setting this variable to
-.B 1
-will tell Hypermail to generate an message index
-Subject/Author/Date listings using a table format.
-Set to
-.B 0
-if you want the standard Hypermail index page look and feel.
-.TP
.B reverse = boolean_number
Setting this variable to
.B 1
@@ -286,6 +286,11 @@ will word wrap. This only takes effect if
is enabled.
.TP
.B iquotes = boolean_number
+.B NOTE:
+This option has been deprecated as markup allows you to replicate this
+behavior using the CSS
+.B .quote
+rule.
Set this to
.B 1
to italicize quoted lines.
@@ -477,6 +482,11 @@ for further discussion on the
.B noindex
metadata value.
.TP
+.B empty_archive_notice = "string"
+Message that hypermail should display in the indices if the archive
+is empty (e.g, no messages, or all messages marked as deleted or spam),
+If not set, hypermail will use a default localized message.
+.TP
.B base_url = "url"
The url of the archive's main directory. This is needed when
the latest_folder option is used and the folder_by_date makes
@@ -543,7 +553,7 @@ directives.
.B Robot annotations
instruct a visiting web robot if the contents of a message should be indexed
and/or if the outgoing links from the message should be followed, doing so thru
-a specific HTML meta tag. (browse http://www.robotstxt.org/ for further
+a specific HTML meta tag. (browse https://www.robotstxt.org/ for further
details).
.B Robot annotations
@@ -690,7 +700,7 @@ a file for each thread that contains all the messages in that thread.
.TP
.B href_detection = boolean_number
Set this to On to assume that any string on the body of the message
-that says is a URL, together with its markup
and treat it as such.
.TP
.B mbox_shortened = boolean_number
@@ -763,6 +773,16 @@ With a setting of 2, attachment creation information is listed individually
with the number of the message the attachments relate to.
This is written to stdout.
.TP
+.B warn_deprecated_options = [ 0 | 1 ]
+Set this to
+.B 1
+if you want hypermail to display warning messages if you
+are using deprecated or planned to deprecate configuration options.
+Set it to
+.B 0
+to hide those warnings. This option is enabled by default
+This warning is written to stdout.
+.TP
.B thrdlevels = number
This specifies the number of thread levels to outline in the thread index. For instance, if
.B thrdlevels
@@ -821,6 +841,21 @@ and
.B
statement.
.TP
+.B mhtmlnavbar2upfile = path
+Define path as the path to a template file containing valid HTML formatting
+statements you wish to be included as information on each archived message,
+giving links to the hierarchy of your archive. By default uses the
+value of
+.B ihtmlnavbar2upfile
+If
+.B mhtmlnavbar2upfile
+and
+.B ihtmlnavbar2upfile
+are undefined, hypermail will generate a generic breadcrumb
+that uses the archive's
+.B label
+and links back to the archive's default index file.
+.TP
.B hmail = Mailing_List_Submission_Address
Set this to the list's submission address. When enabled, this can be
used to submit a new message to the list served by the hypermail archive.
@@ -857,25 +892,36 @@ header. The variable
is used to specify where the
.B Message-Identifier value
will appear in the link. A possible command one could use is
-.B http://example.org/mid-resolver/$ID.
+.B https://example.org/mid-resolver/$ID.
This option is
.B disabled
by default.
.TP
+.B default_css_url = "URL"
+This option points to an external stylesheet that will be used
+for indexes and messages if either
+.B icss_url
+or
+.B mcss_url
+are not configured.
+
+By default this option is the relative URL
+.B hypermail.css
+.TP
.B icss_url = "URL"
This will link an external stylesheet found at the given URL to
the index files. This will happen thru a
-.B LINK
+.B link
element in the index document's
-.B HEAD.
+.B head.
By default this option is disabled.
.TP
.B mcss_url = "URL"
This will link an external stylesheet found at the given URL to
the message files. This will happen thru a
-.B LINK
+.B link
element in the message document's
-.B HEAD.
+.B head.
By default this option is disabled.
.TP
.B show_headers = list_of_RFC_Headers_to_display
@@ -939,6 +985,14 @@ do anything with. They are quietly ignored. They can be listed
individually on multiple lines or comma or space separated on a
single line.
.TP
+.B ignore_content_disposition = types_of_MIME_attachments
+This is the list of MIME attachment types for which you wish to ignore any
+associated
+.B Content-Disposition
+header. They are quietly ignored. They can be
+listed individually on multiple lines or comma or space separated on a single
+line.
+.TP
.B applemail_mimehack = [ 0 | 1]
In a multipart/alternative message, Apple Mail (as of June/2018)
is only adding attachments to the text/html related part. Set this
@@ -957,6 +1011,20 @@ option.
.B Disabled
by default.
.TP
+.B max_attachments_per_msg = positive integer
+This specifies the maximum number of attachments that will be
+processed for a message. Any attachments beyond this limit
+will be ignored.
+Set to
+.B 0
+to remove this limit.
+Note that if you remove this limit or set it too high,
+memory usage may increase when parsing a message
+made up of hundreds of attachments.
+Set to
+.B 200
+by default.
+.TP
.B searchbackmsgnum = postive integer
If the linkquotes option is on and an incremental update is being
done (-u option), this controls the tradeoff between speed and
@@ -1002,8 +1070,6 @@ recommended for archives with over a few hundred messages.
Setting this greater than 1 will produce multiple levels of files
for each thread whose replies are nested by more than 1 level,
but that is rarely useful. This option is currently disabled
-if the indextable option is turned on, and probably needs to
-be less than thrdlevels.
.LP
.SH HTML TEMPLATE FILE SUBSTITUTION COOKIES
.LP
diff --git a/docs/hmrc.html b/docs/hmrc.html
index 4953123b..211f9fa7 100644
--- a/docs/hmrc.html
+++ b/docs/hmrc.html
@@ -1,28 +1,30 @@
-
-
-
-
-
-Hypermail - hmrc list configuration
-
-
-
-
Hypermail List
+
+
+
+
+
+
+ Hypermail - hmrc list configuration
+
+
+
+
+
+
Hypermail List
Configuration File
-
+
The hypermail list configuration file is used to specify
list specific or user specific information to
hypermail. Comments are denoted by the '#' character at the
begining of the line. The file to use can be specified via the -c
command line argument. The default file is .hmrc in the user's home
directory.
-Examples listed on this page are shown in this style. The
-default value is shown unless otherwise indicated. Off is
-equivalent to 0, and On is equivalent to 1 for options which
-are either on or off.
+Examples listed on this page are shown in this style. The
+default value is shown unless otherwise indicated. Off is
+equivalent to 0, and On is equivalent to 1 for options which
+ are either on or off.
+
simple
+ obfuscation of email addresses
+default_css_url URL of the defaul CSS file used by hypermail
@@ -84,9 +90,9 @@
msgsperfolder split into subdirs
of n messages
monthly_index create monthly index
-files
+files (CODE NEES MORE LOVE)
yearly_index create yearly index
-files
+files (CODE NEEDS MORE LOVE
defaultindex what goes in
index.html
default_top_index what goes in
@@ -96,17 +102,16 @@
avoid_top_indices don't
generate these files
attachmentsindex create these
-files
+ files
latest_folder symlink to recent
-subdir
+ subdir
noindex_onindexes instruct
-robots to not index hypermail generated indexes
+ robots to not index hypermail generated indexes
+empty_archive_notice message that should be displayed when an archive is empty (NEW IN 3.0)
Body style
-- indextable style of message
-lists
- reverse sort order, date/thread
files
- reverse_folders sort order, list
@@ -114,7 +119,7 @@
thrdlevels max indentation
- thread_file_depth threads get
their own files
-- icss_url stylesheet
+- icss_url URL of CSS stylesheet for indexes
- describe_folder labels for
subdirs
@@ -136,16 +141,16 @@
Body style
- showhtml how much conversion to
-html?
+html? (may be deprecated)
href_detection how to handle
URLs
showbr line wrapping for body
-iquotes italicize quotes
+iquotes italicize quotes (DEPRECATED)
i18n_body translate message body into
UTF-8
-mcss_url stylesheet
+mcss_url URL of CSS stylesheet for messages
quote_hide_threshold cut
-excessive quoting
+excessive quoting (UNMAINTAINED)
files_by_thread add file with
all messages in 1 thread
@@ -153,13 +158,13 @@
Links
- linkquotes fine-grained link to
-source of quoted text
+source of quoted text (UNMAINTAINED)
- searchbackmsgnum linkquotes
-performance
+performance (UNMAINTAINED)
- link_to_replies fine-grained
-link to responses
+link to responses (UNMAINTAINED)
- quote_link_string linkquotes
-labels
+labels (UNMAINTAINED)
- spamprotect obfuscate email
addresses
- antispamdomain how to obfuscate
@@ -174,24 +179,27 @@
show_msg_links next, previous,
next in thread
- show_index_links control links
-to index pages
+ to index pages
- showheaders To:, From:,
-Subject:
+ Subject:
- show_headers others (Message-ID,
-etc)
+ etc)
+- show_headers_msg_rfc822 others (Message-ID,
+ etc) but only for message/rfc822 attachments.
- format_flowed support RFC 3676
-format=flowed
+ format=flowed (EXPERIMENTAL)
- format_flowed_disable_quoted
-disable support for RFC 3676 format=flowed in quoted text
+ disable support for RFC 3676 format=flowed in quoted text (EXPERIMENTAL)
- mhtmlheaderfile template
- mhtmlfooterfile template
+- mhtmlnavbar2upfile template (NEW IN 3.0)
-
Attachments Note that some of
-these may affect security
+ Attachments Note that some of
+these may affect security
- inlinehtml where to put
text/html
@@ -209,7 +217,9 @@
prefered_types choose from
multipart/mixed
ignore_types discard text/x-vcard,
-etc
+etc.
+ignore_content_disposition_types
+list of MIME types for which you want to ignore the associated Content-Disposition header (NEW IN 3.0)
attachmentlink control
filenames
applemail_mimehack process
@@ -222,6 +232,7 @@
filename_base attachment file
name
+max_attachments_per_msg control the max number of attachments that will be parsed from a message (NEW IN 3.0)
System Administration
@@ -266,7 +277,7 @@
Miscellaneous
deleted what headers indicate deletion
-deprecated
+(DEPRECATED)
expires what headers indicate expire
date
delete_older delete messages before
@@ -298,6 +309,7 @@
htmlmessage_deleted_spam custom
markup body for deleted messages (by spam reasons)
progress verbosity
+warn_deprecated_options> warn if you are using deprecated config options (NEW IN 3.0)
warn_suppressions warn about
ignored messages
uselock serialize
@@ -312,198 +324,202 @@
-Options affecting both
+
+
+
+
+Options affecting both
messages and index pages
-Locale
+Locale
-
-- language = [ two-or-more-letter-language-id
-]
+- language = [ two-or-more-letter-language-id
+]
- This is a two-letter string specifying the default language to
use, or a longer string specifying a language and locale. Set this
the value of the language table you wish to use when running and
generating archives. See also iso2022jp
-and eurodate.
-
-Current supported languages, with their default locales:
-
-de (de_DE) - German
-en (en_US) - English
-es (es_ES) - Spanish
-fi (fi_FI) - Finnish
-fr (fr_FR) - French
-el (el) - Greek
-gr (el_GR) - Greek
-is (is_IS) - Icelandic
-no (no_NO) - Norwegian
-pl (pl_PL) - Polish
-pt (pt_BR) - Brazilian Portuguese
-ru (ru_RU) - Russian
-sv (sv_SE) - Swedish
-
+and eurodate.
+
+Current supported languages, with their default locales:
+
+de (de_DE) - German
+en (en_US) - English
+es (es_ES) - Spanish
+fi (fi_FI) - Finnish
+fr (fr_FR) - French
+el (el) - Greek
+gr (el_GR) - Greek
+is (is_IS) - Icelandic
+no (no_NO) - Norwegian
+pl (pl_PL) - Polish
+pt (pt_BR) - Brazilian Portuguese
+ru (ru_RU) - Russian
+sv (sv_SE) - Swedish
+
The directory /usr/share/i18n/locales on many systems has the
-locale codes that are available on that system.
-
-language = en
-
-- iso2022jp = [ 0 | 1 ]
-- Set this to On to support ISO-2022-JP messages.
-
-iso2022jp = 0
-
-- i18n = [ 0 | 1 ]
+locale codes that are available on that system.
+
+language = en
+- iso2022jp = [ 0 | 1 ]
+- Set this to On to support ISO-2022-JP messages.
+
+iso2022jp = 0
+- i18n = [ 0 | 1 ]
- Enable I18N features, hypermail must be linked with libiconv.
-
-i18n = 1 (disabled by default)
-
-- eurodate = [ 0 | 1 ]
+"https://www.gnu.org/software/libiconv/">libiconv
.
+
+i18n = 1 (disabled by default)
+eurodate = [ 0 | 1 ]
Set this to reflect how you want dates displayed in the index
-files.
-Set as 1 to to use European date format "DD MM YYYY".
-Define as 0 to to use American date format "MM DD YYYY".
-
-eurodate = 0
-
-dateformat = strftime-date-format
-Format used in strftime(3) call for displaying dates.
-See strftime(3) for the valid conversion specifications.
-
-dateformat = "%D-%r Z" (disabled by default)
-
-isodate = [ 0 | 1 ]
+files.
+Set as 1 to to use European date format "DD MM YYYY".
+Define as 0 to to use American date format "MM DD YYYY".
+
+eurodate = 0
+dateformat = strftime-date-format
+Format used in strftime(3) call for displaying dates.
+See strftime(3) for the valid conversion specifications.
+
+dateformat = "%D-%r Z" (disabled by default)
+isodate = [ 0 | 1 ]
Set this to On to display article received dates in YYYY-MM-DD
HH:MM:SS format. If used with the gmtime option, a Z will be
-inserted between the DD and HH.
-
-isodate = 0
-
-gmtime = [ 0 | 1 ]
+inserted between the DD and HH.
+
+isodate = 0
+gmtime = [ 0 | 1 ]
Set this to On to display article received dates using
-Greenwich Mean Time (UTC) rather than local time.
-
-gmtime = 0
-
-Header options
-
-label = [ Title | NONE ]
-This is the default title you want to call your archives.
-Set this to NONE to use the name of the input mailbox.
-
-label = Hypermail Development List (default value is
+Greenwich Mean Time (UTC) rather than local time.
+
+gmtime = 0
+
+Header options
+
+- label = [ Title | NONE ]
+- This is the default title you want to call your archives.
+Set this to NONE to use the name of the input mailbox.
+
+label = Hypermail Development List (default value is
filename?????)
-
-- hmail = [ Mailing List Submission Address | NONE
-]
+- hmail = [ Mailing List Submission Address | NONE
+]
- Set this to the list's submission address. When enabled, this
can be used to submit a new message to the list served by the
-hypermail archive. "NONE" means don't use it.
-
-hmail = hypermail@hypermail.org (disabled by default)
-
-- newmsg_command = [ string ]
+hypermail archive. "NONE" means don't use it.
+
+hmail = hypermail@hypermail.org (disabled by default)
+- newmsg_command = [ string ]
- This specifies the mail command to use when converting the
set_hmail address to links in replies. The variables $TO, $SUBJECT,
-and $ID can be used in constructing the command string.
-
-newmsg_command=mailto:$TO
-
-- replymsg_command = [ string ]
+and $ID can be used in constructing the command string.
+
+newmsg_command=mailto:$TO
+- replymsg_command = [ string ]
- This specifies the mail command to use when converting the
set_hmail address to links in replies. The variables $TO, $SUBJECT,
and $ID can be used in constructing the command string. The value
from the mailcommand option will be used
-if this option is not specified.
+if this option is not specified.
There may be browsers that will benefit from adding something like
%26In-Reply-To=<$ID>
to the command, but I've heard no reports of this actually
-working.
-
-replymsg_command=mailto:$TO?Subject=$SUBJECT
-
-- inreplyto_command = [ string ]
+working.
+
+replymsg_command=mailto:$TO?Subject=$SUBJECT
+- inreplyto_command = [ string ]
- This specifies a URI template to a script that hypermail will
link to if it's unable to find in the archive's messages the MID
corresponding to an In-Reply-To header. The variable
$ID is used to specify where the Message-Identifier
-value will appear in the link.
-
-inreplyto_command = http://example.org/mid-resolver/$ID.
+value will appear in the link.
+
+inreplyto_command = https://example.org/mid-resolver/$ID.
(disabled by default)
--
-
Miscellaneous
-
-- stripsubject = [ string | NONE ]
+
+Miscellaneous
+
+ - archive_date = [ 0 | 1 ]
+ - adds a specific line in the indexes giving the date the archive was generated.
+
+ archive_date = On (disabled by default)
+- hypermail_colophon = [ 0 | 1 ]
+- adds a footnote stating the hypermail version that was used and generation date.
+
+ hypermail_colophon = On (enabled by default)
+- stripsubject = [ string | NONE ]
- A string to be stripped from all subject lines. Helps unclutter
-mailing lists which add tags to subject lines.
-
-stripsubject = NONE
-
-- mailcommand = [ direct mailto | cgi-bin script path |
-NONE ]
+mailing lists which add tags to subject lines.
+
+stripsubject = NONE
+- mailcommand = [ direct mailto | cgi-bin script path |
+NONE ]
- This is the mail command that email links go to, for instance
"mailto:$TO" or
-"/cgi-bin/mail?to=$TO&replyto=$ID&subject=$SUBJECT"
-In constructing this command, you can specify variables:
-
-$TO : the email address of the person you're sending mail to.
-$ID : the ID of the message you're replying to.
-$SUBJECT: the subject you're replying to.
-
-NONE disables mailcommand usage.
+"/cgi-bin/mail?to=$TO&replyto=$ID&subject=$SUBJECT"
+In constructing this command, you can specify variables:
+
+$TO : the email address of the person you're sending mail to.
+$ID : the ID of the message you're replying to.
+$SUBJECT: the subject you're replying to.
+
+NONE disables mailcommand usage.
There may be browsers that will benefit from adding something like
%26In-Reply-To=<$ID>
to the command, but I've heard no reports of this actually
-working.
-
-mailcommand = mailto:$TO?Subject=$SUBJECT
-
-- mailto = [ email-address | NONE ]
+working.
+
+mailcommand = mailto:$TO?Subject=$SUBJECT
+- mailto = [ email-address | NONE ]
- The address of the contact point that is put in the HTML header
-line
-<LINK REV=made HREF=mailto:mailto>
-
+line
+<LINK REV=made HREF=mailto:mailto>
+
The <LINK...> header can be disabled by default by setting
-mailto to NONE.
-
-mailto = webmaster@hypermail.org (disabled by default)
-
-- domainaddr = [ domainname | NONE ]
+mailto to NONE.
+
+mailto = webmaster@hypermail.org (disabled by default)
+- domainaddr = [ domainname | NONE ]
- Domain-ize Addresses -- addresses appearing in the RFC2822
field which lack hostname can't be made into proper HREFs. Because
the MTA resides on the same host as the list, it is often not
required to domain-ize these addresses for delivery. In such cases,
-hypermail will add the DOMAINADDR to the email address.
-
-domainaddr = hypermail.org (disabled by default)
-
-- use_sender_date = [ 0 | 1 ]
+hypermail will add the DOMAINADDR to the email address.
+
+domainaddr = hypermail.org (disabled by default)
+- use_sender_date = [ 0 | 1 ]
- Set this to On to have it use the Date: header (created by the
the system that sent the message) rather than the date/time the
message was received, for purposes such as putting in folders or
sorting. Details of which purposes this affects may change in the
-future.
-
-use_sender_date = 0
-
-- fragment_prefix = [ preifx ]
+future.
+
+use_sender_date = 0
+- fragment_prefix = [ preifx ]
- Put this string before the message number in each URI
-fragment.
-
-fragment_prefix = id (default is msg)
-
-- email_address_obfuscation = [ 0 | 1 ]
+fragment.
+
+fragment_prefix = id (default is msg)
+- email_address_obfuscation = [ 0 | 1 ]
- Set to 1 to enable email address obfuscation using numeric
-character references.
-
-mail_address_obfuscationx = 1 (disabled by default)
--
-
Index page options
-Index
+ character references.
+
+ mail_address_obfuscation = 1 (disabled by default)
+- default_css_url = [ URL | NONE ]
+- Gives the URL for the default CSS file used by hypermail if either the icss_url or mcss_url configuration options are not declared. The stylesheet will be linked to thru a
link
element in the in the document's head
.
+
+ The default value is hypermail.css (link relative to the archive).
+
+ default_css_url = https://example.org/StyleSheets/my_hypermail.css
+
+
+
+
+
+Index page options
+Index
availability
-
-folder_by_date = [ strftime-date-format ]
+
+- folder_by_date = [ strftime-date-format ]
- This string causes the messages to be put in subdirectories by
date. The string will be passed to strftime(3) to generate
subdirectory names based on message dates. Suggested values are
@@ -511,131 +527,116 @@
Index
"%G/%V" for weekly. Do not alter this for an existing archive
without removing the old html files. If you use this and update the
archive incrementally (e.g. with -u), you must use the usegdbm option.
-
-folder_by_date = %y%m (disabled by default)
-
-- monthly_index = [ 0 | 1 ]
+"#usegdbm">usegdbm option.
+
+folder_by_date = %y%m (disabled by default)
+- monthly_index = [ 0 | 1 ]
- Set this to On to create additional index files broken up by
month. A summary.html file will provide links to all the monthly
-indices.
-
-monthly_index = 0
-
-- msgsperfolder = integer
+indices.
+
+monthly_index = 0
+- msgsperfolder = integer
- Put messages in subdirectories with this many messages per
directory. Do not use this and folder_by_date on the same archive.
Do not alter this for an existing archive without removing the old
html files. Deleted/expired messages are counted
for the purpose of deciding how many messages to put in a
-subdirectory.
-
-msgsperfolder = 100 (disabled by default)
-
-- yearly_index = [ 0 | 1 ]
+subdirectory.
+
+msgsperfolder = 100 (disabled by default)
+- yearly_index = [ 0 | 1 ]
- Set this to On to create additional index files broken up by
year. A summary.html file will provide links to all the yearly
-indices.
-
-yearly_index = 0
-
-- defaultindex = [ thread | date | subject | author |
-attachment ]
+indices.
+
+yearly_index = 0
+- defaultindex = [ thread | date | subject | author |
+attachment ]
- This indicates the default type of main index hypermail will
generate. Users see this type of index when the archive is first
accessed. When using the folder_by_date or msgsperfolder options, this option applies to
-subdirectories.
-
-defaultindex = thread
-
-- default_top_index = [ folders | thread | date | subject
-| author | attachment ]
+subdirectories.
+
+defaultindex = thread
+- default_top_index = [ folders | thread | date | subject
+| author | attachment ]
- This specifies the default index that users can view when
entering the top level of an archive that uses the folder_by_date or msgsperfolder option.
-
-default_top_index = folders
-
-- avoid_indices = [ string ]
+"#msgsperfolder">msgsperfolder option.
+
+default_top_index = folders
+- avoid_indices = [ string ]
- This is a list of index files to not generate. Valid types are
date, thread, author, and subject. They can be listed individually
on multiple lines or comma or space separated on a single line.
When using the folder_by_date or
msgsperfolder options, this option
-applies to subdirectories.
-
-avoid_indices = subject author (disabled by default)
-
-- avoid_top_indices = [ string ]
+applies to subdirectories.
+
+avoid_indices = subject author (disabled by default)
+- avoid_top_indices = [ string ]
- This is a list of index files to not generate for the top
directory of an archive using the folder_by_date or msgsperfolder
option. Valid types are date, thread, author, subject, folders, and
-attachment.
-
-avoid_top_indices = date thread author subject
-
-- attachmentsindex = [ 0 | 1 ]
+attachment.
+
+avoid_top_indices = date thread author subject
+- attachmentsindex = [ 0 | 1 ]
- Set this to Off to make hypermail not output an index of
-messages with attachments.
-
-attachmentsindex = On
-
-- latest_folder = [ string ]
+messages with attachments.
+
+attachmentsindex = On
+- latest_folder = [ string ]
- If folder_by_date or msgsperfolder are in use, create a symbolic
link by this name to the most recently created subdirectory. Note
that many web servers are configured to not follow symbolic links
for security reasons. The link will be created in the directory
-specified by the "dir" or "-d" option.
-
-latest_folder = current (disabled by default)
-
-- noindex_onindexes = [ 0 | 1 ]
+specified by the "dir" or "-d" option.
+
+latest_folder = current (disabled by default)
+- noindex_onindexes = [ 0 | 1 ]
- Tells hypermail to add a noindex metadata to
its generated message indexes (by author, etc.), to instruct robots
to not index the indexes. See anontated
-for further discussion on noindex.
-
+for further discussion on noindex.
+
noindex_onindexes = 0
--
-
Index body style
-
-- indextable = [ 0 | 1 ]
-- Setting this variable to 1 will tell Hypermail to generate a
-message index Subject/Author/Date listings using a table format.
-Set to 0 if you want the standard Hypermail index page look and
-feel.
-
-indextable = 0
-
-- reverse = [ 0 | 1 ]
+- empty_archive_notice = [ string ]
+- Message that hypermail should display in the indices if the archive
+is empty (e.g, no messages, or all messages marked as deleted or spam),
+If not set, hypermail will use a default localized message.
+
+empty_archive_notice = "(no messages are available in this archive)"
+
+Index body style
+
+- reverse = [ 0 | 1 ]
- Setting this variable to 1 will reverse-sort the article
entries in the date and thread index files by the date they were
received. That is, the most recent messages will appear at the top
of the index rather than the other way around. Set to 0 if you want
-latest message on the bottom for date and thread indexes.
-
-reverse = 0
-
-- reverse_folders = [ 0 | 1 ]
+latest message on the bottom for date and thread indexes.
+
+reverse = 0
+- reverse_folders = [ 0 | 1 ]
- Setting this variable to On will reverse-sort the list of
folders. That is, the most recent folders will appear at the top of
-the index rather than the other way around.
-
-reverse_folders = 0
-
-- thrdlevels = number
+the index rather than the other way around.
+
+reverse_folders = 0
+- thrdlevels = number
- This specifies the number of thread levels to outline in the
thread index. For instance, if thrdlevels is 2, replies to messages
will be indented once in the index, but replies to replies, etc.,
-will only be indented once as well. The normal value is 4.
-
-thrdlevels = 4
-
-- thread_file_depth = [ 0 | 1 ]
+will only be indented once as well. The normal value is 4.
+
+thrdlevels = 4
+- thread_file_depth = [ 0 | 1 ]
- If nonzero, break the threads index file into multiple files,
with the initial message of each thread in the main index file
along with links to files containing the replies. Setting this to 1
@@ -643,336 +644,342 @@
Index body style
recommended for archives with over a few hundred messages. Setting
this greater than 1 will produce multiple levels of files for each
thread whose replies are nested by more than 1 level, but that is
-rarely useful. This option is currently disabled if the indextable
-option is turned on, and probably needs to be less than
-thrdlevels.
-
-thread_file_depth = 0
-
-- icss_url= [ URL | NONE ]
+rarely useful.
+
+thread_file_depth = 0
+- icss_url = [ URL | NONE ]
- This option let's you specify an external stylesheet that you
-would like to link to the index files. The stylesheet will be
-linked to thru a LINK element in the HEAD in the document's
-HEAD.
-By default, this option is deactivated.
-
-icss_url =
-http://www.w3.org/StyleSheets/Mail/public-messagelist.css
-
-- describe_folder = format string
+ would like to link to the index files. The stylesheet will be
+ linked to thru a link
element in the in the document's
+ head
. If this option is not configured, indexes will use the value of the
+ default_css_url
.
+ By default, this option is inactive.
+
+icss_url =
+https://example.org/StyleSheets/index.css
+- describe_folder = format string
- Controls the labels used in folders.html to describe the
directories created by the folder_by_date or msgsperfolder options. For folder_by_date
labels, the describe_folder string will be passed to strftime(3)
-the same as the folder_by_date string.
-For msgsperfolder:
-%d for the directory number (starts with 0)
-%D for the directory number (starts with 1)
-%m for the number of the first message in the directory
+the same as the folder_by_date string.
+For msgsperfolder:
+%d for the directory number (starts with 0)
+%D for the directory number (starts with 1)
+%m for the number of the first message in the directory
%M for the number of the last message that can be put in the
-directory.
+directory.
The default is the value of folder_by_date if that is selected,
-"%d" for msgsperfolder.
-
-describe_folder = "%b %Y"
--
-
Index headers/footers
-
-- archives = [ URL | NONE ]
+"%d" for msgsperfolder.
+
+describe_folder = "%b %Y"
+
+Index headers/footers
+
+- archives = [ URL | NONE ]
- This creates a link in the archived index pages labeled "Other
-mail archives". Set this to NONE to omit such a link.
-
-archives = NONE
-
-- custom_archives = [ HTML text | NONE ]
+mail archives". Set this to NONE to omit such a link.
+
+archives = NONE
+- custom_archives = [ HTML text | NONE ]
- If this variable is defined, a navigation entry will be created
below the sorted_by_x list entry, with the text "Other mail
archives: " followed by the value of this variable. Set it to NONE
-to ommit such an entry.
-
-custom_archives = NONE
-
-- about = [ URL | NONE ]
+to ommit such an entry.
+
+custom_archives = NONE
+- about = [ URL | NONE ]
- This creates a link in the archived index pages labeled "About
-this archive". Set this to NONE to omit such a link.
-
-about = NONE
-
-- ihtmlheaderfile = [ path to index header template file
-| NONE ]
+this archive". Set this to NONE to omit such a link.
+
+about = NONE
+- ihtmlheaderfile = [ path to index header template file
+| NONE ]
- Set this to the path to the Index header template file. The
template file contains HTML directives and substitution cookies for
-runtime expansion.
-
-ihtmlheaderfile = /lists/hypermail-idxheader.hyp (disabled
+runtime expansion.
+
+ihtmlheaderfile = /lists/hypermail-idxheader.hyp (disabled
by default)
-
-- ihtmlfooterfile = [ path to index footer template file
-| NONE ]
+
- Set this to the path to the Index footer template file. The
template file contains HTML directives and substitution cookies for
-runtime expansion.
-
-ihtmlfooterfile = /lists/hypermail-idxfooter.hyp (disabled
+runtime expansion.
+
+ihtmlfooterfile = /lists/hypermail-idxfooter.hyp (disabled
by default)
--
-
Message page options
-Body style
-
-- showhtml = [ 0 | 1 | 2 ]
+
+
+
+Message page options
+Body style
+
+- showhtml = [ 0 | 1 | 2 ]
- Set this to 1 to show the articles in a proportionally-spaced
font rather than a fixed-width (monospace) font. Setting this
option to 1 also tells Hypermail to attempt to italicize quoted
-passages in articles.
+passages in articles.
Set this to 2 for more complex conversion to html similar to that
in txt2html.pl.
-Showhtml = 2 will normally produce nicer looking results than
-showhtml = 1, and showhtml = 0 will look pretty dull, but
-1 and 2 run risks of altering the appearance in undesired ways.
-
-showhtml = 1
-
-- href_detection = [ 0 | 1 ]
+"https://www.cs.wustl.edu/~seth/txt2html/">txt2html.pl.
+Showhtml = 2 will normally produce nicer looking results than
+showhtml = 1, and showhtml = 0 will look pretty dull, but
+1 and 2 run risks of altering the appearance in undesired
+ways.
+
+showhtml = 1
+- href_detection = [ 0 | 1 ]
- Set this to 1 to assume that any string on the body of the
message that says <A HREF=" ... </A> is a URL, together
-with its markup and treat it as such.
-
-href_detection = 0
-
-- showbr = [ 0 | 1 ]
+with its markup and treat it as such.
+
+href_detection = 0
+- showbr = [ 0 | 1 ]
- Set this to 1 if you want article lines to end with the
<br> tag. Else set to 0 to have non-quoted lines word-wrap.
-Only takes effect if showhtml is set to 1.
-
-showbr = 1
-
-- iquotes = [ 0 | 1 ]
-- Set this to 1 if you want quoted lines to be shown in italics.
-Only take effect if showhtml is set to 1.
-
-iquotes = 1
-
-- i18n_body = [ 0 | 1 ]
-- Translate message body into UTF-8. The i18n
-configuration option must be enabled.
-
-i18n_body = 1 (disabled by default)
-
-- mcss_url= [ URL | NONE ]
+Only takes effect if showhtml is set to 1.
+
+showbr = 1
+- iquotes = [ 0 | 1 ] DEPRECATED, use css .quote rule instead
+- Set this to 1 if you want quoted lines to be shown in italics.
+Only take effect if showhtml is set to 1.
+
+iquotes = 1
+- i18n_body = [ 0 | 1 ]
+- Translate message body into UTF-8. The i18n
+configuration option must be enabled.
+
+i18n_body = 1 (disabled by default)
+- mcss_url = [ URL | NONE ]
- This option let's you specify an external stylesheet that you
would like to link to the message files. The stylesheet will be
-linked to thru a LINK element in the HEAD in the document's HEAD.
-By default, this option is inactive.
-
-mcss_url =
-http://www.w3.org/StyleSheets/Mail/public-message.css
-
-- quote_hide_threshold = percent (integer)
-- If the linkquotes option is on,
+ linked to thru a
link
element in the in the document's head
.
+If this option is not configured, messages will use the value of the
+ default_css_url
.
+ By default, this option is inactive.
+
+mcss_url =
+https://example.org/StyleSheets/message.css
+- quote_hide_threshold = percent (integer)
+- If the linkquotes option is on
setting this to an integer less than 100 will cause it to replace
quoted text with one-line links if the percent of lines in the
message body (exluding the signature) consisting of quoted text
-exceeds the number indicated by this option.
-
-quote_hide_threshold = 100
-
-- files_by_thread = [ 0 | 1]
+exceeds the number indicated by this option.
+
+quote_hide_threshold = 100
+- files_by_thread = [ 0 | 1]
- Set this to 1 to generate (in addition to the usual files), a
file for each thread that contains all the messages in that thread.
The first line in each thread of the thread index page links to
-this file instead of to a single message.
-
-files_by_thread = 0
--
-
Message page links
-
-- linkquotes = [ 0 | 1 ]
-- Set this to On to create fine-grained links from quoted text to
+this file instead of to a single message.
+
+files_by_thread = 0
+
+Message page links
+
+- linkquotes = [ 0 | 1 ]
+- NOTE: this option has not been working
+well since 2.4.0 and should now be considered experimental.
+It may be deprecated in the next version of hypermail.
+Set this to On to create fine-grained links from quoted text to
the text where the quote originated. It also improves the threads
index file by more accurately matching messages with replies. Note
that this may be rather cpu intensive (see the searchbackmsgnum option to alter the
-performance).
-
-linkquotes = 0
-
-- searchbackmsgnum = postive integer
+performance).
+
+linkquotes = 0
+- searchbackmsgnum = postive integer
- If the linkquotes option is on and an
incremental update is being done (-u option), this controls the
tradeoff between speed and the reliability of finding the right
source for quoted text. Try to set it to the largest number of
messages between a message and the final direct reply to that
-message.
-
-searchbackmsgnum = 500
-
-- link_to_replies = [ string | NONE]
+message.
+
+searchbackmsgnum = 500
+- link_to_replies = [ string | NONE]
- If the linkquotes option is on,
specifying a string here causes it to generate links from original
quoted text the location(s) in replies which quote them. The string
-is used to display the link.
-
-link_to_replies = NONE
-
-- quote_link_string = [ string | NONE ]
+is used to display the link.
+
+link_to_replies = NONE
+- quote_link_string = [ string | NONE ]
- If the quote_hide_threshold
option is being used, the quote_link_string will be used if
available to display the link that replaces the quoted text. If no
string is specified here, the first line of each section of quoted
-text will used.
-
-quote_link_string = NONE
-
-- spamprotect = [ 0 | 1 ]
+text will used.
+
+quote_link_string = NONE
+- spamprotect = [ 0 | 1 ]
- Set this to On to make hypermail not output real email
addresses in the output HTML but instead it will obfuscate them a
little. You can control the obfuscation with antispamdomain.
-
-spamprotect = On
-
-- antispamdomain = string with invalid
-domain
+"#antispamdomain">antispamdomain.
+
+spamprotect = On
+- antispamdomain = string with invalid
+domain
- By default the spamprotect option only does a small amount of
massaging of email addresses. Use this to completely replace the
domain from which a message originates (everything after the @)
with some string to confuse screen-scraping programs. It is
-probably wise to make this an invalid mail domain.
-
-antispamdomain = "email.domain.hidden" (disabled by
+probably wise to make this an invalid mail domain.
+
+antispamdomain = "email.domain.hidden" (disabled by
default)
-
-- spamprotect_id = [ 0 | 1 ]
+- spamprotect_id = [ 0 | 1 ]
- Set this to On to make hypermail not output real email message
ids in HTML comments (sometimes used internally by hypermail) but
instead it will obfuscate them a little so they don't look like
-email addresses to spammers.
-
-spamprotect_id = On
--
-
Message page
+email addresses to spammers.
+
+spamprotect_id = On
+
+Message page
headers/footers
-
-showreplies = [ 0 | 1 ]
+
+- showreplies = [ 0 | 1 ]
- Set to 1 to show all replies to a message as links in article
-files. If this is set to 0 no reply links are generated.
-
-showreplies = 1
-
-- show_msg_links = [ 0 | 1 | 3 | 4 ]
+files. If this is set to 0 no reply links are generated.
+
+showreplies = 1
+- show_msg_links = [ 0 | 1 | 3 | 4 ]
- Set this to 1 if you want links to Next, Prev, Next thread,
Reply to, etc. displayed on the article pages. Setting this to 0
disables these links from appearing on the generated pages. Set it
to 3 to produce those links only at the top of the message pages,
-or 4 to produce those links only at the bottom of the message.
-
-show_msg_links = 1
-
-- show_index_links = [ 0 | 1 | 3 | 4 ]
+or 4 to produce those links only at the bottom of the
+message.
+
+show_msg_links = 1
+- show_index_links = [ 0 | 1 | 3 | 4 ]
- Set this to 1 to show links to index pages from the top and
bottom of each message file. Set it to 0 to avoid those links. Set
it to 3 to show the links only at the top of the message pages, or
-4 to produce those links only at the bottom of the message.
-
-show_index_links = 1
-
-- showheaders = [ 0 | 1 ]
+4 to produce those links only at the bottom of the message.
+
+show_index_links = 1
+- showheaders = [ 0 | 1 ]
- Set this to 1 to show the RFC 2822 message headers To:, From:,
and Subject: information found in the email messages. Set to 0 if
-you want to hide mail headers in articles.
-
-showheaders = 0
-
-- show_headers = List of RFC 2822 Headers to
-display
+you want to hide mail headers in articles.
+
+showheaders = 0
+- show_headers = List of RFC 2822 Headers to
+display
- This is the list of headers to be displayed if showheaders is
set to 1 (TRUE) They can be listed comman or space separated all on
-a single line such as
+a single line such as
show_headers =
-From,Subject,Date,Message-ID
-
-or they can be listed individually or any combination of.
-
- show_headers = From
- show_headers = Subject
- show_headers = Date
- show_headers = Message-ID
-
+From,Subject,Date,Message-ID
+
+or they can be listed individually or any combination of.
+
+ show_headers = From
+ show_headers = Subject
+ show_headers = Date
+ show_headers = Message-ID
+
If show_headers contains the special character ``*'', then
-hypermail will display all header lines.
+hypermail will display all header lines.
NOTE: Do not put the ':' at the end of the
-headers.
-
-show_headers = From,Subject,Date,Message-ID (disabled by
+headers.
+
+show_headers = From,Subject,Date,Message-ID (disabled by
+default)
+- show_headers_msg_rfc822 = List of RFC 2822 Headers to
+ display in message/rfc822 attachments
+- This option is identical to show_headers but only
+applies to message/rfc822 attachments. If it is not defined, hypermail will use
+ show_headers for message/rfc822 attachments.
+
+show_headers_message_rfc822 = From,Subject,Date,Message-ID,Archived-At (disabled by
default)
-
-- format_flowed [ 0 | 1 ] (EXPERIMENTAL)
+- format_flowed [ 0 | 1 ] (EXPERIMENTAL)
- Enable this option to support RFC 3676 format=flowed. When this
option is enabled and a message says it is supporting
format=flowed, hypermail will recreate a long-line that has been
-split into multiple lines as a single one.
-
+split into multiple lines as a single one.
+
format_flowed = 1 (disabled by default)
-
-- format_flowed_disable_quoted [ 0 | 1 ]
+- format_flowed_disable_quoted [ 0 | 1 ]
- Use this option if you want to disable support for
format=flowed inside quoted text (the lines starting with one or
more '>' characters). This option is always disabled if
-format_flowed is not enabled.
-
+format_flowed is not enabled.
+
format_flowed_disable_quoted = 1 (disabled by
default)
-
-- mhtmlheaderfile = [ path to message header template
-file | NONE ]
+- mhtmlheaderfile = [ path to message header template
+file | NONE ]
- Set this to the path to the Message header template file. The
template file contains HTML directives and substitution cookies for
-runtime expansion.
-
-mhtmlheaderfile = /lists/hypermail-msgheader.hyp (disabled
+runtime expansion.
+
+mhtmlheaderfile = /lists/hypermail-msgheader.hyp (disabled
by default)
-
-- mhtmlfooterfile = [ path to message footer template
-file | NONE ]
+
- Set this to the path to the Message footer template file. The
-template file contains HTML directives and substitution cookies for
-runtime expansion.
-
-mhtmlfooterfile = /lists/hypermail-msgfooter.hyp (disabled
-by default)
--
-
Attachments
-
-- inlinehtml [ 0 | 1 ]
+ template file contains HTML directives and substitution cookies for
+ runtime expansion.
+
+ mhtmlfooterfile = /lists/hypermail-msgfooter.hyp (disabled
+ by default)
+
+
+- Set this to the path to a template file containing
+ valid HTML formatting statements that you wish to be
+ included as information in each archived message,
+ giving links to the hierarchy of your archive.
+ By default uses the value of ihtmlnavbar2upfile
,
+ If mhtmlnavbar2upfile
and ihtmlnavbar2upfile
+ are unspecified, hypermail will use the following breadcrumb
+ that will use the archive's label
and link to the default
+ index of the archive:
+
+ <ul>
+ <li><a href="./index.html" rel="start"><em>label for the archive</em></a></li>
+ </ul>
+
+ mhtmlnavbar2upfile = /lists/hypermail-navbar2upfile.hyp (disabled
+ by default)
+
+
+
+Attachments
+
+- inlinehtml [ 0 | 1 ]
- Define to On to make text/html parts to get inlined with the
mails. If set to Off, HTML-parts will be stored as separate files.
A "Content-Disposition: attachment;" line in the mail will cause an
HTML-part to be stored as a separate file even if this option is
-On.
-
-inlinehtml = 1
-
-- usemeta [ 0 | 1 ]
+On.
+
+inlinehtml = 1
+- usemeta [ 0 | 1 ]
- This option allows you to use metadata to store the content
type of a MIME attachments and, later on, when a user browses the
attachment, send back this information in the HTTP Content-Type
header. When set to 1, the Content-Type header of
-a MIME attachment will be stored in a metadata file.
+a MIME attachment will be stored in a metadata file.
Let us say that the MIME attachments for a message are stored in
directory att-num. The metadata for those
attachments will then be stored in directory
att-num/.meta. If a MIME attachment is stored in
file att-file, its metadata will be stored in file
att-file.meta. This convention is directly
-compatible with the Apache server handling of metadata.
-
-usemeta = 0
-
-- userobotmeta [ 0 | 1 ]
+compatible with the Apache server handling of metadata.
+
+usemeta = 0
+- userobotmeta [ 0 | 1 ]
- If a message has annotations for robots and usemeta is enabled, setting this option to
1 will associate the value of the annotations to
@@ -980,85 +987,95 @@
Attachments
X-Robots-Tag HTTP header. For more information,
browse Google's
-Robots Meta Tag documentation.
-
+Robots Meta Tag documentation.
+
userobotmeta = 0
-
-- text_types = list of types to be the same as
-text/plain
+- text_types = list of types to be the same as
+text/plain
- This is a list of MIME types that you want hypermail to treat
exactly as if they were text/plain. They can be listed individually
-on multiple lines or comma or space separated on a single line.
-
-text_types = text, text/plain, message/rfc2822 (disabled by
+on multiple lines or comma or space separated on a single
+line.
+
+text_types = text, text/plain, message/rfc2822 (disabled by
default)
-
-- inline_types = indicate data types data to be
-inlined
+- inline_types = indicate data types data to be
+inlined
- This is the list of MIME types that you want inlined as opposed
to simply linked into the message. They can be listed individually
-on multiple lines or comma or space separated on a single line.
-
+on multiple lines or comma or space separated on a single
+line.
+
inline_types = image/gif
-image/jpeg
-or
- inline_types = image/gif
- inline_types = image/jpeg
-
-inline_types = image/gif image/jpeg
-
-- inline_addlink = [ 0 | 1 ]
+image/jpeg
+or
+ inline_types = image/gif
+ inline_types = image/jpeg
+
+inline_types = image/gif image/jpeg
+- inline_addlink = [ 0 | 1 ]
- Set to On to add inline links to content that is stored in the\
attachments subdirectory. inline_types must be
-enabled.
-
-inline_addlink = 1 (enabled by default)
-
-- prefered_types = multipart/mixed types to
-present
+enabled.
+
+inline_addlink = 1 (enabled by default)
+- prefered_types = multipart/mixed types to
+present
- When mails using multipart/mixed or multipart/alternative types
are scanned, this list of MIME types defines which part you want
-presented in the result.
-
-prefered_types = text/plain, text/html
-
-- ignore_types = indicate types of attachments to
-ignore
+presented in the result.
+
+prefered_types = text/plain, text/html
+- ignore_types = indicate types of attachments to
+ignore
- This is the list of MIME attachment types that you do not want
to do anything with. They are quietly ignored and are not
processed. They can be listed individually on multiple lines or
comma or space separated on a single line.
-
Two special types may be used here:
+
Two special types may be used here:
$BINARY - ignore all types that would be stored as separate
-files.
+files.
$NONPLAIN - ignore all types not treated as text/plain, and all
-$BINARY types.
+$BINARY types.
Note: the behavior of these may be affected by the inlinehtml option.
-
+
ignore_types = text/x-vcard
-application/x-msdownload
-or
- ignore_types = text/x-vcard
+application/x-msdownload
+or
+ ignore_types =
+text/x-vcard
ignore_types =
-application/x-msdownload
-
-ignore_types = text/x-vcard
-ignore_types = application/x-msdownload
+application/x-msdownload
+
+ignore_types = text/x-vcard
+ignore_types = application/x-msdownload
-
-- attachmentlink = attachment-link-format
-- Format of the attachment links.
-
-%p for the full path to the attachment
-%f for the file name part only
-%d for the directory name only
-%n for the message number
-%c for the content type string
-
-attachmentlink = "%p"
-
-- applemail_mimehack [ 0 | 1 ]
+- ignore_content_disposition = indicate types
+ of attachments for which you want to ignore the Content-Disposition
+header
+- This is the list of MIME attachment types for which you do not want
+to honor an associated Content-Disposition header (thus making them inline by default).
+The header is silenty ignored and is not parsed.
+The MIME types can be listed individually on multiple lines or
+comma or space separated on a single line.
+This option is useful when dealing with broken UA, such as early Apple Mail
+clients that associated Content-Disposition: attachment with
+multipart/appledouble. Later on, Apple fixed this and either used
+Content-Disposition: inline or discarded this header entirely.
+
+ignore_content_disposition = multipart/appledouble (disabled by default)
+- attachmentlink = attachment-link-format
+- Format of the attachment links.
+
+%p for the full path to the attachment
+%f for the file name part only
+%d for the directory name only
+%n for the message number
+%c for the content type string
+
+attachmentlink = "%p"
+- applemail_mimehack [ 0 | 1 ]
- In a multipart/alternative message, Apple Mail (as of
June/2018) is only adding attachments to the text/html related
part. Set this option to On to force the display of all alternate
@@ -1066,10 +1083,9 @@
Attachments
only a text/plain and a text/html alternatives and the preference
is for text/plain, the text/html alternative won't be displayed.
This option won't be taken into account if your prefered type is
-text/html or if you enabled the save_alts option.
-applemail_mimehack = 0 (disabled by default)
-
-- unsafe_chars = list of chars to prohibit
+text/html or if you enabled the save_alts option.
+applemail_mimehack = 0 (disabled by default)
+- unsafe_chars = list of chars to prohibit
- Any characters listed in this string are removed from
user-specified attachment filenames. Those characters will be
replaced by a "_" (which means that specifying "_" here won't have
@@ -1079,64 +1095,72 @@
Attachments
prevented if you specify "." here (e.g. if a web server is
configured to enable server side includes on filenames ending in
something other than .shtml), but that will prevent browsers from
-recognizing many file types.
-
-unsafe_chars = "." (disabled by default)
-
-- save_alts = [ 0 | 1 | 2 ]
+recognizing many file types.
+
+unsafe_chars = "." (disabled by default)
+- save_alts = [ 0 | 1 | 2 ]
- This controls what happens to alternatives (other than the
-prefered alternative) for multipart/alternative messages.
-0 - discard non-prefered alternatives
-1 - show all alternatives inline
-2 - put non-prefered alternatives in a separate file.
-
-save_alts = 0
-
-- alts_text = descriptive text
+prefered alternative) for multipart/alternative messages.
+0 - discard non-prefered alternatives
+1 - show all alternatives inline
+2 - put non-prefered alternatives in a separate file.
+
+save_alts = 0
+- alts_text = descriptive text
- If save_alts is 1, this text is put between the
-alternatives.
+alternatives.
If save_alts is 2, this text is used to describe the link to each
-alternative file.
-
-alts_text = "alternate version of message" (the default if
-save_alts = 2)
-alts_text = "<hr>" (the default if save_alts = 1)
--
-
System administration
-Message input
-
-- increment = [ -1 | 0 | 1 ]
-
+alternative file.
+
+alts_text = "alternate version of message" (the default if
+save_alts = 2)
+alts_text = "<hr>" (the default if save_alts = 1)
+- max_attachments_per_message = positive integer
+- This specifies the maximum number of attachments that will be
+ processed for a message. Any attachments beyond this limit
+ will be ignored.
+ Set to 0
to remove this limit.
+ Note that if you remove this limit or set it too high,
+ memory usage may increase when parsing a message made up
+ of hundreds of attachments.
+
+ max_attachments_per_message = 30 (set to 200
by default)
+
+
+
+
+System administration
+Message input
+
+- increment = [ -1 | 0 | 1 ]
+
Define as 1 to append all input messages to the end of existing
-archives.
+archives.
Define as 0 for it to read a mailbox that corresponds to the entire
archive. (See the mbox_shortened
option for an exception to the requirement that it be the entire
archive). If there are any existing html messages, it will figure
out which ones at the end of the mailbox are new, and add only
-those that haven't been converted yet.
+those that haven't been converted yet.
Define as -1 to have hypermail figure out whether the input is
entirely new messages to be appended or whether it contains
messages that are already in the archive. A value of -1 cannot be
used with the mbox_shortened option or with the -i command line
-option or with mbox = NONE.
-
-increment = 0
-
-- readone = [ 0 | 1 ]
+option or with mbox = NONE.
+
+increment = 0
+- readone = [ 0 | 1 ]
- Set this to 1 to specify there is only one message in the
-input.
-
-readone = 0
-
-- mbox = [ filename | NONE ]
+input.
+
+readone = 0
+- mbox = [ filename | NONE ]
- This is the default mailbox to read messages in from. Set this
with a value of NONE to read from standard input as the
-default.
-
-mbox = NONE
-
-- mbox_shortened = [ 0 | 1 ]
+default.
+
+mbox = NONE
+- mbox_shortened = [ 0 | 1 ]
- Set this to 1 to enable use of mbox that has had some of its
initial messages deleted. Requires usegdbm = 1 and increment = 0.
The first message in the shortened mbox must have a Message-Id
@@ -1145,195 +1169,181 @@
Message input
Message-Id as a message that was deleted. The mbox may not be
altered in any way other than deleting from beginning of the mbox
or appending new messages to the end (unless you rebuild the
-archive from scratch using a complete mbox).
-
-mbox_shortened = 0
-
-- ietf_mbox = [ 0 | 1 ]
+archive from scratch using a complete mbox).
+
+mbox_shortened = 0
+- ietf_mbox = [ 0 | 1 ]
- Setting this variable to 1 will tell hypermail that the mbox is
formatted according to the IETF mbox convention: all lines, except
-for the envelope, are prefixed with a > char.
-
-ietf_mbox = 0
-
-- discard_dup_msgids = [ 0 | 1 ]
+for the envelope, are prefixed with a > char.
+
+ietf_mbox = 0
+- discard_dup_msgids = [ 0 | 1 ]
- Set this to 0 to accept messages with a Message-ID matching
that of a message already in this archive. By default such messages
-are discarded.
-
-discard_dup_msgids = 1
-
-- require_msgids = [ 0 | 1 ]
+are discarded.
+
+discard_dup_msgids = 1
+- require_msgids = [ 0 | 1 ]
- Set this to 0 to accept messages without a Message-ID
-header.
-Set this to 1 to discard messages without a Message-ID header.
-By default such messages are discarded.
-
-require_msgids = 1
--
-
Message Filtering
-Regular expression support is provided by the PCRE library package, which is
+header.
+Set this to 1 to discard messages without a Message-ID
+header.
+By default such messages are discarded.
+
+require_msgids = 1
+
+Message Filtering
+Regular expression support is provided by the PCRE library package, which is
open source software, written by Philip Hazel, and copyright by the
-University of Cambridge, England.
+University of Cambridge, England.
The full body searches can be slow, and do not match multi-line
-strings in message bodies. A string that spans multiple lines of a
-header can be matched.
-
-
-filter_out = expression
+ strings in message bodies. A string that spans multiple lines of a
+ header can be matched.
+
+ - filter_out = expression
- Delete from the html archives any message having a header line
which matches any of these expressions. Uses the same rules for
deletion as the expires option. The expressions use the same syntax
as Perl regular expressions.
The following examples should reject messages Cc'd to more than
3 addresses or from any address at spammers.com. This option is
-disabled by default.
-
-filter_out=Cc:([^,]*,){3}
-filter_out=From:.+@spammers.com
+disabled by default.
+
+filter_out=Cc:([^,]*,){3}
+filter_out=From:.+@spammers.com
-
-- filter_require = expression
+- filter_require = expression
- Delete from the html archives any message not having header
lines which match each of these expressions. Uses the same rules
for deletion as the expires option. The expressions use the same
-syntax as Perl regular expressions.
-
-filter_require =
-
-- filter_out_full_body = expression
+syntax as Perl regular expressions.
+
+filter_require =
+- filter_out_full_body = expression
- Delete from the html archives any message having a line which
matches any of these expressions. Uses the same rules for deletion
as the expires option. The expressions use the same syntax as Perl
-regular expressions.
-
-filter_out_full_body =
-
-- filter_require_full_body = expression
+regular expressions.
+
+filter_out_full_body =
+- filter_require_full_body = expression
- Delete from the html archives any message not having lines
which match each of these expressions. Uses the same rules for
deletion as the expires option. The expressions use the same syntax
-as Perl regular expressions.
-
-filter_require_full_body =
--
-
Filesystem output
-
-- dir = [ directory path | NONE ]
+as Perl regular expressions.
+
+filter_require_full_body =
+
+Filesystem output
+
+- dir = [ directory path | NONE ]
- This is the default directory that Hypermail uses when creating
and updating archives. If set to NONE, the directory will have the
-same name as the input mailbox.
+same name as the input mailbox.
Note that the date that Hypermail was run will be used, not a date
from the message (use the folder_by_date option to have Hypermail use
-dates from messages).
-
-dir = NONE
-
-- overwrite = [ 0 | 1 ]
-- Set to 1 to make Hypermail rewrite all messages.
-Set to 0 to rewrite as few messages as possible.
+dates from messages).
+
+dir = NONE
+- overwrite = [ 0 | 1 ]
+- Set to 1 to make Hypermail rewrite all messages.
+Set to 0 to rewrite as few messages as possible.
Rewriting all messages is slower, but if you change the options
that control the appearance of the messages you may want to rewrite
all the messages to make the appearance consistent throughout the
archive. (This defaulted to 1 for most versions 2.0 through 2.1.3,
presumably to encourage archives that upgraded to have a single
-style. The default was changed back to 0 after 2.1.3).
-
-overwrite = 0
-
-- htmlsuffix = [ html | htm | shtml ... ]
+style. The default was changed back to 0 after 2.1.3).
+
+overwrite = 0
+- htmlsuffix = [ html | htm | shtml ... ]
- Use this to specify the html file suffix to be used when
Hypermail generates the html files. This is dependent on local
needs. Do not put a '.' in the value. It would result in
-"file..html", probably not what you want.
-
-htmlsuffix = shtml
-
-- dirmode = octal number
+"file..html", probably not what you want.
+
+htmlsuffix = shtml
+- dirmode = octal number
- This is an octal number representing the rwx modes that new
directories are set to when they are created. If the archives will
be made publically available, it's a good idea to define this as
-0755. This must be an octal number.
-
-dirmode = 0755
-
-- filemode = octal number
+0755. This must be an octal number.
+
+dirmode = 0755
+- filemode = octal number
- This is an octal number representing the permission modes that
new files are set to when they are created. If the archives will be
made publically available, it's a good idea to define this as 0644.
-This must be an octal number.
-
-filemode = 0644
-
-- filename_base = [ string ]
+This must be an octal number.
+
+filemode = 0644
+- filename_base = [ string ]
- This option overrides the normal rules for creating attachment
file names, and creates file names from the string that this option
is set to plus a file name extension if one can be found in the
name supplied by the message. This option is mainly for languages
-that use different character sets from English.
-
-filename_base = attachment (disabled by default)
--
-
System miscellaneous
-
-- usegdbm = [ 0 | 1 ]
+that use different character sets from English.
+
+filename_base = attachment (disabled by default)
+
+System miscellaneous
+
+- usegdbm = [ 0 | 1 ]
- Set this to 1 to use gdbm to implement a header cache. This
will speed up hypermail, especially if your filesystem is slow. It
will not provide any speedup with the linkquotes option.
-
-usegdbm = 0
-
-- writehaof = [ 0 | 1 ]
+"#linkquotes">linkquotes option.
+Note that this option has not been reviewed since years and should
+now be considered UNMAINTAINED and at risk of being DEPRECATED.
+
+usegdbm = 0
+- writehaof = [ 0 | 1 ]
- Set this to On to let hypermail write an XML archive overview
-file in each directory. The filename is archive_overview.haof.
-
-writehaof = 0
-
-- append = [ 0 | 1 ]
+file in each directory. The filename is
+archive_overview.haof.
+
+writehaof = 0
+- append = [ 0 | 1 ]
- Set this to On to maintain a parallel mbox archive. The file
-name defaults to mbox in the directory specified by -d or dir.
-
-append = 1
-
-- append_filename = [ string ]
+name defaults to mbox in the directory specified by -d or
+dir.
+
+append = 1
+- append_filename = [ string ]
- Specifies the filename to be used by the append option. $DIR may
be used to specify a name relative to the directory specified in the
-d or dir option. The string will be passed to strftime(3) to allow
splitting the mailbox into yearly or monthy files, such as
-"%Y-%m.mbox".
-
-append_filename = $DIR/INBOX
-
-- txtsuffix = [ string ]
+"%Y-%m.mbox".
+
+append_filename = $DIR/INBOX
+- txtsuffix = [ string ]
- If you want the original mail messages archived in individual
files, set this to the extension that you want these messages to
-have (recommended value: txt).
-
-txtsuffix = txt (off by default)
-
-- annotated = list of headers used to indicate
-deletion
+have (recommended value: txt).
+
+txtsuffix = txt (off by default)
+- annotated = list of headers used to indicate
+deletion
- This is the list of headers that indicate that a message
contains an annotation. Options disabled by
-default.
-
+default.
+
In an annotated message, the values of the header specify the type
of annotations. The header may have one or more comma-separated
values. Order and case are not important. Hypermail recognizes two
types of annotations: content and
-robot annotations.
-
+robot annotations.
+
Content annotations give information to the reader
about how an archive maintainer has operated on an original
received message. This operation typically happens as a belated
action, for example, when removing spam from an existing archive.
Content annotations can have one, and only one, of the following
-values:
+values:
- spam
- message deleted because it is spam;
@@ -1342,7 +1352,7 @@ System miscellaneous
- edited
- original received message was manually edited.
-
+
If a message specifies more than one content annotation, only the
first one will be taken into account. You can customize the markup
that\'s shown for content annotations by means of the System miscellaneous
htmlmessage_deleted_spam,
and htmlmessage_edited
directives. See also the delete_level
-option for more info about what happens to a deleted message.
-
+option for more info about what happens to a deleted message.
+
Robot annotations instruct a visiting web robot if
a the contents of a message should be indexed and/or if the
outgoing links from the message should be followed, doing so thru a
specific HTML meta tag (browse About the Robots <META> tag
-for further details).
+"https://www.robotstxt.org/">About the Robots <META> tag
+for further details).
Robot annotations can have either one or both of the following
values:
@@ -1366,91 +1376,85 @@ System miscellaneous
- noindex
- don't index this message.
-
+
You can use one or both robot annotation values and combine them
with the edited content annotation. Note that
spam and deleted annotations have
an implicit robot noindex annotation. In such
case, user supplied robot annotations values will be silently
-ignored.
-
+ignored.
+
Use userobotmeta for associating
-attachments with annotations for robots.
-
+attachments with annotations for robots.
+
Note that the list maintainer must be careful on whether to accept
incoming messages containing the annotated header.
If the policy is not to allow that header on incoming messages, it
must be filtered out before the message is stored or acted upon by
-hypermail.
-
-In an hmrc file:
-annotated = X-Hypermail-Annotated (off by default)
-In a message:
+hypermail.
+
+In an hmrc file:
+annotated = X-Hypermail-Annotated (off by default)
+In a message:
X-Hypermail-Annotated: edited, noindex
-
-- deleted = list of headers used to indicate
-deletion [DEPRECATED]
+- deleted = list of headers used to indicate
+ deletion DEPRECATED, replaced by annotated
- This is the list of headers that indicate the message should
not be displayed if the value of this header is 'yes'. See the
delete_level option for more info about
-what happens to the message.
+what happens to the message.
NOTE: This option has been deprecated if favor of
annotated. However, it will still be
-parsed and honored to take into account legacy archives.
-
-deleted = X-Hypermail-Deleted X-No-Archive
-
-- expires = list of headers used to indicate
-expiration
+parsed and honored to take into account legacy archives.
+
+deleted = X-Hypermail-Deleted X-No-Archive
+- expires = list of headers used to indicate
+expiration
- This is the list of headers that indicate the message should
not be displayed if the value of this header is a date in the past.
See the delete_level option for more
-info about what happens to the message.
-
-expires = Expires
-
-- delete_older = date/time string
+info about what happens to the message.
+
+expires = Expires
+- delete_older = date/time string
- Any message older than this date should not be displayed. See
the delete_level option for more info
about what happens to the message. Any date format that works in
-the Date: header line of an email message should work here.
-
-delete_older = "Wed, 14 Mar 2001 12:59:51 +0200" (off by
+the Date: header line of an email message should work here.
+
+delete_older = "Wed, 14 Mar 2001 12:59:51 +0200" (off by
default)
-
-- delete_newer = date/time string
+- delete_newer = date/time string
- Any message newer than this date should not be displayed. See
the delete_level option for more info
about what happens to the message. Any date format that works in
-the Date: header line of an email message should work here.
-
-delete_newer = "Wed, 28 Mar 2001 12:59:51 +0200" (off by
+the Date: header line of an email message should work here.
+
+delete_newer = "Wed, 28 Mar 2001 12:59:51 +0200" (off by
default)
-
-- delete_msgnum = list of message numbers
+- delete_msgnum = list of message numbers
- This is the list of message numbers that should be deleted from
the html archive. The mbox is not changed. See the delete_level option for more info about what
-happens to the message.
-
-delete_msgnum = 42 666 (off by default)
-- delete_level = [ 0 | 1 | 2 | 3 ]
-
+happens to the message.
+
+delete_msgnum = 42 666 (off by default)
+
+- delete_level = [ 0 | 1 | 2 | 3 ]
+
0 - remove deleted and expired files. Note that with this choice
threading may be screwed up if there are replies to deleted or
-expired options and the archive is updated incrementally
-1 - remove message body
+expired options and the archive is updated incrementally
+1 - remove message body
2 - remove message body for deleted messages, leave expired
-messages
-3 - leave all messages
+messages
+3 - leave all messages
Deleted and expired messages are removed from the index files
-regardless of the delete_level selection.
-
-delete_level = 1
-
-- delete_incremental = [ 0 | 1 ]
-
+regardless of the delete_level selection.
+
+delete_level = 1
+- delete_incremental = [ 0 | 1 ]
+
If this option is enabled, hypermail will perform deletions on old
messages when run in incremental mode (according to the other
delete configuration options). Note that depending on your
@@ -1458,124 +1462,124 @@ System miscellaneous
markup, there may be memory and parsing issues, specifically when
there are non-deleted replies to a deleted message. If this option
is disabled, deleted messages will only be removed when rebuilding
-the whole archive.
-
-delete_incremental = 0 (enabled by default)
-
-- htmlmessage_edited = [HTML markup string]
-
-Custom markup to use in the body of manually edited message
-when delete_level is equal or superior to 2.
-
-htmlmessage_edited = <div class="edited"><img
-src="http://example.org/Mail/edited.png" alt="original message
+the whole archive.
+
+delete_incremental = 0 (enabled by default)
+- htmlmessage_edited = [HTML markup string]
+
+Custom markup to use in the body of manually edited message when
+delete_level is equal or superior to 2.
+
+htmlmessage_edited = <div class="edited"><img
+src="https://example.org/Mail/edited.png" alt="original message
edited" /> <p class="editedmmes">The originally received
message was edited by the archive maintainer.</p><p
class="spamfooter">The editing of this email is consistent with
-<a href="http://example.org/Mail/">example.org's Mailing List
-and Archive Usage Policy.</a></p></div>
+<a href="https://example.org/Mail/">example.org's Mailing List
+and Archive Usage Policy.</a></p></div>
(disabled by default)
-
-- htmlmessage_deleted_other = [HTML markup
-string]
-
-Custom markup to use in the body of deleted messages (by
-reasons other than spam) when delete_level is equal or
-superior to 2.
-
-htmlmessage_deleted_spam = <div class="deleted"><img
-src="http://example.org/Mail/deleted.png" alt="email removed" />
+- htmlmessage_deleted_other = [HTML markup
+string]
+
+Custom markup to use in the body of deleted messages (by reasons
+other than spam) when delete_level is equal or superior to
+2.
+
+htmlmessage_deleted_spam = <div class="deleted"><img
+src="https://example.org/Mail/deleted.png" alt="email removed" />
<p class="deletedmmes">This message was removed from our mail
archives by the archive maintainer.</p><p
class="deletedfooter">The removal of this email is consistent
-with <a href="http://example.org/Mail/">example.org's Mailing
-List and Archive Usage Policy.</a></p></div>
+with <a href="https://example.org/Mail/">example.org's Mailing
+List and Archive Usage Policy.</a></p></div>
(disabled by default)
-
-- htmlmessage_deleted_spam = [HTML markup
-string]
-
+- htmlmessage_deleted_spam = [HTML markup
+string]
+
Custom markup to use in the body of deleted messages (by spam
-reasons) when delete_level is equal or superior to 2.
-
-htmlmessage_deleted_spam = <div class="spam"><img
-src="http://example.org/Mail/noUCE.png" alt="unsolicited bulk email
+reasons) when delete_level is equal or superior to
+2.
+
+htmlmessage_deleted_spam = <div class="spam"><img
+src="https://example.org/Mail/noUCE.png" alt="unsolicited bulk email
removed" /> <p class="spammes">This message was determined
to be unsolicited bulk email and has been removed from our
archives.</p><p class="spamfooter">The removal of this
email is consistent with <a
-href="http://example.org/Mail/">example.org's Mailing List and
-Archive Usage Policy.</a></p></div> (disabled
+href="https://example.org/Mail/">example.org's Mailing List and
+Archive Usage Policy.</a></p></div> (disabled
by default)
-
-- progress = [ 0 | 1 | 2 ]
+- progress = [ 0 | 1 | 2 ]
- Set to 1 or 2 to show progress as Hypermail works. Set to 0 for
silent operation. Output goes to standard output. Set to 1,
progress information relating to attachments creation is
overwritten for each new attachment. Set to 2, attachment creation
information is listed individually with the number of the message
-the attachments relates to.
-
-progress = 0
-
-- warn_suppressions = [ 0 | 1 ]
+the attachments relates to.
+
+progress = 0
+- warn_deprecated_options = [ 0 | 1 ]
+- Set to 1 if you want hypermail to display warning messages if you
+are using deprecated or planned to deprecate configuration options.
+Set it to 0 to hide those warnings. This warning is written to stdout.
+This option is enabled by default.
+
+warn_deprecated_options = 0
+
+- warn_suppressions = [ 0 | 1 ]
- Set this to 1 to get warnings (on stdout) about messages that
are not converted because of they are missing a msgid (if
require_msgids is On) or because one of the following options
suppressed it: deleted expires delete_msgnum filter_out
-filter_require filter_out_full_body filter_require_full_body.
-
-warn_suppressions = 1
-
-- uselock = [ 0 | 1 ]
+filter_require filter_out_full_body filter_require_full_body.
+
+warn_suppressions = 1
+- uselock = [ 0 | 1 ]
- Controls whether to use hypermail's built-in locking mechanism.
By default, this option is set to 1. Set it to
0 if you have an external locking mechanism, like,
-for example, when using procmail or smartlist.
-
-uselock = 0
-
-- locktime = number-of-seconds
+for example, when using procmail or smartlist.
+
+uselock = 0
+- locktime = number-of-seconds
- The number of seconds that a lock should be honored when
-processing inbound messages before it is overridden.
-
-locktime = 3600
-
-- base_url = url-of-main-archive-directory
+processing inbound messages before it is overridden.
+
+locktime = 3600
+- base_url = url-of-main-archive-directory
- The url of the archive's main directory. This is needed when
the latest_folder option is used and the folder_by_date makes
-directories more than one level deep (e.g. with '%y/%m').
-
-base_url = http://www.hypermail-project.org/archive/
-
-- report_new_folder = [ 0 | 1 ]
+directories more than one level deep (e.g. with '%y/%m').
+
+base_url = https://www.hypermail-project.org/archive/
+- report_new_folder = [ 0 | 1 ]
- Set this to On to have it print (on stdout) the names of any
new directories created pursuant to the folder_by_date or
msgsperfolder option, or the initial creation of the archive. It
will print the full path if that is what you use to specify the
archive directory. Does not print anything when attachment or
-metadata directories are created.
-
-report_new_folder = 0
-
-- report_new_file = [ 0 | 1 ]
+metadata directories are created.
+
+report_new_folder = 0
+- report_new_file = [ 0 | 1 ]
- Set this to On to have it print (on stdout) the names of any
-new files created for new messages. It will print the full path if
-that is what you use to specify the archive directory.
-report_new_file = 0
+ new files created for new messages. It will print the full path if
+ that is what you use to specify the archive directory.
+ report_new_file = 0
-
-See Also
+
+
+
diff --git a/docs/hr.yellow.png b/docs/hr.yellow.png
deleted file mode 100644
index af299993..00000000
Binary files a/docs/hr.yellow.png and /dev/null differ
diff --git a/docs/hypermail-doc.css b/docs/hypermail-doc.css
new file mode 100644
index 00000000..cff56a0b
--- /dev/null
+++ b/docs/hypermail-doc.css
@@ -0,0 +1,81 @@
+>/*
+** This program and library is free software; you can redistribute it and/or
+** modify it under the terms of the GNU (Library) General Public License
+** as published by the Free Software Foundation; either version 2
+** of the License, or 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 (Library) General Public License for more details.
+**
+** You should have received a copy of the GNU (Library) 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
+**/
+
+/*
+** stylesheet for hypermail HTML documentation
+**
+** (extracted from what was previoulsy imbricated
+** in the HTML files)
+**
+** Last revised: 22/May/2023
+**/
+
+body {
+ background-color: #FFFFFF;
+ color: #000000;
+ margin: 20px;
+ line-height: 1.2;
+}
+
+h1 {
+ text-align: center;
+}
+
+img {
+ vertical-align: middle;
+}
+
+hr {
+ /* width: 400px; */
+ border: 1px solid black;
+}
+
+hr.centered {
+ width: 55%;
+ text-align: center;
+}
+
+dt {
+ font-weight: bold;
+ padding-bottom: 4px;
+}
+
+dd {
+ padding-bottom: 6px;
+}
+
+main {
+ border-bottom: 2px solid black;
+}
+
+.deprecated {
+ text-decoration: line-through;
+}
+
+/* rules from the faq */
+
+/*
+ body {
+ background-image: url(stars.png);
+ background-color: #000000;
+ color: #FFFFFF;
+ }
+ :link { color: #998800 }
+ :visited { color: #998800 }
+ :active { color: #FFFFFF }
+ h1.c1 {text-align: center}
+ /*]]>*/
+*/
diff --git a/docs/hypermail-faq.html b/docs/hypermail-faq.html
deleted file mode 100644
index a068b588..00000000
--- a/docs/hypermail-faq.html
+++ /dev/null
@@ -1,513 +0,0 @@
-
-
-
-Hypermail Frequently Asked Questions
-
-
-
-
-
-
-Hypermail Frequently Asked Questions
-
-
-This is the beginning of the Hypermail FAQ. Don't dispair that there is
-little here. That will change shortly.
-
-
Table of Contents
-
-- Why is the License Different ?
-
- Will hypermail run on my system ?
-
- What Happened to EIT ?
-
- Where in the World is Kevin Hughes ?
-
- What is the latest version of Hypermail ?
-
- Where can I get the latest version of Hypermail ?
-
- How can I split the archives into months ?
-
- How do I change the font on the pages ?
-
- What is HM_MAILTO used for ?
-
- Can I send a message to the list from the web archive ?
-
- Can I build and run this on Windows 98/2000/NT ?
-
- How can I remove a listserver subject prefix ?
-
- Which configuration file should I use ?
-
- Why is the downloaded file name different when I download hypermail.tar.gz ?
-
- Can I throttle hypermail's CPU usage ?
-
- How can I make my archive searchable ?
-
- How does hypermail decide whether messages are in the same thread?
-
- How can I have multiple mailboxes produce one archive?
-
- I have received an email with attachment that needs octet-stream. What should I do?
-
- Why is Hypermail ignoring some messages?
-
- Bogus dates are causing some emails to be put in a strange folder. Is there an easy way around this?
-
-
-
-1. Why is the License Different ?
-
-Hewlett-Packard (who is now the legal owner of Hypermail, since EIT was
-bought by VeriFone, which was bought by Hewlett-Packard) has put it
-under the GNU license, a widely used "free software" license. This means
-that you can use and modify the source code as long as you make your changes
-publically available and do not charge for their use (although, under GNU,
-you can charge for their distribution). More details are available at
-http://www.fsf.org/ and
-http://www.fsf.org/copyleft/gpl.html.
-
-

-
-2. Will hypermail run on my system ?
-
-Hypermail can compile and run as-is on most of the more popular UNIX systems
-today. If you're not sure if
-hypermail will run on your UNIX system, try compiling it and see!
-
-Hypermail has been reported to work on MacOSX (X.2.6), with the advice
-to use --disable-shared and manually execute make in src/pcre.
-
-People have indeed ported hypermail to DOS, Windows 95, and Windows NT (but
-not Java ...yet). Installation advice for some Windows systems is available at
-win32.html.
-
-

-
-
3. What Happened to EIT ?
-
-A very old and established government contractor company called Electronic
-Instrumentation and Technology Inc. made legal moves to obtain the eit.com
-domain. Since VeriFone/HP had no interest in keeping EIT, they dissolved it
-completely some months ago. This company had a trademark on EIT so the
-domain name was given to them. (Thank you InterNic...)
-
-

-4. Where in the World is Kevin Hughes ?
-
-Kevin has not dropped off the face of the earth but is extremely busy
-these days as a Hypermedia Engineer at Veo Systems.
-
-
- Kevin Hughes
-
kev@kevcom.com
-
kevinh@veosys.com
-
(650) 858-7710 (office number)
-
(650) 858-4925 (fax)
-
www.veosystems.com
-
-
-
-
-
5. What is the latest version of Hypermail ?
-
-The latest stable version of Hypermail is Version 2.1.9. It is available from
-http://www.hypermail-project.org
-
-

-
-
6. Where can I get the latest version of Hypermail ?
-
-The latest version of Hypermail is available from the Hypermail Development
-Center at
-
-SourceForge
-and/or at
-
-http://www.hypermail-project.org/
-
-
-It and past versions are also available via FTP from
-
-ftp://ftp.hypermail.org/hypermail/
-
-The cvs server at :pserver:cvs@cvs.hypermail.org:/CVS
-usually has a more recent but less tested version.
-
-

-
-
7. How can I split the archives into months ?
-
-I have a fat archive that I'd like to split up by month, like I see so many
-others doing. Is there a description somewhere of a procedure to follow,
-or will I just have to think it through?
-
-If you are using version 2.1.0 or later and either have gdbm or don't
-do incremental updates, see the
-
-folder_by_date
-
-option. The simple way to use this is to add these to your .hmrc:
-
-folder_by_date="%y%m"
-
usegdbm = 1
-
-and regenerate your archive from its mbox file.
-
-An older alternative is a set of scripts in a directory
-named archive/ that has tools to do just what
-you want to do.
-
-If you want index files split by month but don't need to split the archive
-into multiple directories, try adding "monthly_index=1" in your
-config file (usually ~/.hmrc) (available in version 2.1). A summary.html
-file will provide links to all the monthly indices.
-This is probably appropriate for archives with a few thousand messages,
-but for larger archives I recommend splitting into multiple directories.
-
- There's a script at
-http://users.netrus.net/troc/perl.html
-called mms (monthly mail splitter) which has also been reported useful.
-
-

-
-
8. How do I change the font on the pages ?
-
-What I'd like to do is change the font of the archives pages. I tried
-doing this by adding a <FONT FACE=...> tag in the header.hyp file and a
-<FONT> tag in the footer file, but it didn't work. Is there something
-in the program itself that's preventing me from making this change?
-
-Yes and no. Let me guess... You have hm_usetable = 1.
-The code for tables is not inheriting the FONT values and that they need
-to be set in the <TH..> tags. If tables are not used it works as
-expected.
-
-To test it put a
-
-
-<FONT SIZE="1" FACE="GENEVA,ARIAL,HELVETICA">
-
-
-in the test-index.hyp and test-msg.hyp. In test-footer.hyp put
-
-
-</FONT>
-
-
-
-With hm_usetable = 1 in the test.rc file, then ran
-"hypermail -c test.rc -m testmail" and everything
-between the "menus" was the right FONT but the menus were not.
-
-Then edit the test.rc file and set hm_usetable = 0.
-Next remove the existing testdir and rerun hypermail again. This time
-the FONT works as expected.
-
-Is this what is happening to you ? If so the code will need to be modified.
-
-

-
-
9. What is HM_MAILTO used for ?
-
-
-I've enabled this option in .hyprc (the configuration file to which
-the pipe script for my archive points). Unlike the other options, this one
-does not create a link to mailto:admin@domain.com as I would expect. Any
-ideas?
-
-HM_MAILTO has a couple different uses. One is to trigger the insertion of
-the <LINK REV=made HREF=mailto:...> header in the HTML sources.
-This is most useable with ascii browsers such as lynx.
-
-
-
- hm_mailto = [ email-address | NONE ]
-
#
-
# The address of the contact point that is put in the HTML header line
-
# <LINK REV=made HREF=mailto:hm_mailto>
-
#
-
# The <LINK...> header can be disabled by default by setting
-
# mailto to NONE.
-
-
-
-It can also be used in a hypermail page template file since it resolves
-to %m.
-
-For example, your footer file might look like...
-
-<P ALIGN=CENTER><IMG SRC="/images/bar.png" WIDTH="400" HEIGHT="4" ALT="---------"></P>
-
<ADDRESS>
-
<EM>
-
<SMALL>
-
This archive was generated by %u on %g
-
<P ALIGN=CENTER>
-
Send administrative comments to<A HREF="mailto:%m">%m</A>
-
</P>
-
</SMALL>
-
</EM>
-
</ADDRESS>
-
</BODY>
-
</HTML>
-
-
-In this case the %m is expanded to admin@domain.com.
-
-

-
-
10. Can I send a message to the list from the web archive ?
-
-I would like to add a link to the menu that says "Send a Message to the
-List." I read through the documentation on your website, and I think I
-know what I have to do. However, I cannot find an example of what a .hyp
-template file should look like.
-
-That's what "Respond" on the menubar does. It allows a person
-to reply to the existing message, with the reply sent to the list address.
-And "mail a new topic" on the menubar allows a user to send
-a new message to the list.
-
-To enable this feature set
-
-
-
hm_hmail = listaddr@your-site.domain
-
-

-Can I build and run this on Windows 98/2000/NT ?
-
-I would like to use Hypermail on my Windows box. Can I ? If so how do
-I build the latest version ?
-
-There is a complete description on how to build hypermail on a Windows
- system at win32.html. This was written by
-Bob Crispen <bob.crispen@boeing.com>. (Thanks Bob!)
-
-
-

-How can I remove a listserver subject prefix ?
-
-The Subject index page does not seem to do the right sorting. My list
-has a "subject prefix" so people can filter their inbound mail better. Is
-that confusing the sorting ?
-
-Yes. Hypermail functions that deal with replies look for the Re: and
-return a pointer to the subject line after the "Re: ".
-The listserver software is prefixing the subject line contents with
-[subject-prefix]. For example:
-
-
-Initial message:
-
- Subject: [subject-prefix] the subject of the message
-
-
-Replies:
-
- Subject: [subject-prefix] Re: the subject of the message
-
-
-
-The best solution is to use the directive
-
- stripsubject = [subject-prefix]
-
-in the config file for that list. Then [subject-prefix] is stripped before
-the Reply processing occurs and the proper things happen. This is the proper
-fix since hypermail would need to know to strip the [subject-prefix] from
-the initial messages to get it right.
-
-
-Which configuration file should I use ?
-
-Which configuration file should I use ?. Is it the hypermail.rc file
-in the Configs directory? I'm trying to edit the appearance of pages created
-by hypermail, but I think I'm trying to edit the wrong config file.
-
-With one of the later versions you can use the -v option to generate
-a config file that you can use. There is not just one config file.
-What are included are examples.
-
-
-
- $ hypermail -v > some-file.rc
-
-
-
-Edit the some-file.rc and set the values to what you want.
-
-Then run hypermail using the config file by:
-
-
-
- $ hypermail -c some-file.rc.
-
-
-
-

-Why is the downloaded file name different when I download hypermail.tar.gz ?
-
-
-The source is available from
-
-www.hypermail.org/hypermail.tar.gz
-
-However: When downloading though IE v4 browser on an NT
-PC, you get a file called hypermail_tar.tar.
-
-
-Depending on your browser MIME type setup and support applications,
-the filename downloaded might be hypermail.tar, hypermail.tar.gz, etc.
-In any case, you will be informed as to the filename when you actually
-download it onto a Windows/NT PC. Use that name from that point forward.
-
-

-Can I throttle hypermail's CPU usage ?
-
-
-I'm looking for a good way to throttle hypermail. When it runs it is
-taking over both CPU's on my system. Is there a way to have it limit
-itself?
-
-
-There is currently no "nice" call in hypermail to limit itself. Maybe
-we can consider it in the future. You might run it as a subcommand to
-nice. For example in an aliases file:
-
-
- "|nice someval 'hypermail command line'"
-
-
-I've NEVER tried this so... ;)
-
-You might also be looking at a very large archive with lots of messages
-being the cause. If so then try breaking it up into smaller archives
-such as monthly archives. Tools are available for that in the latest
-release.
-
-And if the list is a high traffic list, consider not running it from a
-sendmail alias and instead, run it from cron. (To assure it does not
-run unnecessarily, consider using 'make' to check dependencies on the
-inbound mailbox and the archive itself. If the mailbox is newer, then
-run the hypermail command. If not, then no new message have been received
-so don't bother running it.
-
-
-If the you are using the linkquotes option and incremental update
-(-u option), add a searchbackmsgnum line to your config file.
-It controls the tradeoff between speed and
-the reliability of finding the right source for quoted text.
-Try to set it to the largest number of messages between a
-message and the final direct reply to that message.
-
-

-How can I make my archive searchable ?
-
-Where can I find a program that provides an easy way of adding a
-"search this archive" feature to my hypermail archive?
-
-
-These seem to be the most popular choices:
-
-- Htdig
-
- Swish-E
-
- Glimpse
-
- Namazu
-
- mnoGoSearch
-
-Swish-E comes with a script (index_hypermail.pl) that is customized for
-indexing Hypermail archives. index_hypermail.txt
-has a description of how to use it.
-
- You can also use search engines by putting text such as this on
-your web page (although this search produces results from an entire site,
-not just the email archive):
-
<form action=http://www.google.com/search>
-
<input type=text name=as_q>
-
<input type=hidden name=as_sitesearch value=hypermail-project.org>
-
<input type=submit value="Search Hypermail">
-
</form>
-
-You can probably get more complete (but apparently not recent) info at:
-Search Engine Software For Your Web Site.
-
-

-How does hypermail decide whether messages are in the same thread?
-
- It uses the In-Reply-To: header if that is available. If not, it uses
-the References: header if that is available. If these are not available,
-it looks for previous messages with the same subject header. Matches based
-on the subject are listed as "maybe" replies.
-
- If the linkquotes option is used, it will also search the message bodies
-of the previous searchbackmsgnum (default = 500) messages for text that
-looks like it is being quoted in the current message. If it finds one or more
-prior messages with such text matches, it will treat the one with the longest
-match as the message being replied to. The exact algorithms for deciding what
-is quoted text are a bit complex. These matches override the In-Reply-To:
-and References: info (this rule may deserve further thought).
-
-

-How can I have multiple mailboxes produce one archive?
-
- One simple way is to combine them into one mailbox, and send that to
-hypermail. Something like
"cat file1 file2 file3 > combined"
-should do that.
-
- Another way is to invoke hypermail several times, using the -u flag for
-any mailboxes that you want added after the html archive has been started:
-
- hypermail -m file1
- hypermail -u -m file2
- hypermail -u -m file3
-
-
- Do not try to send hypermail more than one mailbox at a time, or send
-it a second mailbox without using the -u flag or the increment=1 or
-increment=-1 option.
-
-

-I have received an email with attachment that needs octet-stream. What should I do?
-
-No attachment "needs" octet-stream. octet-stream is a label that describes
-the attachment as being "a stream of octets". What is that you say? Well, the
-application didn't know any more specifics and thus it identified it as good
-as possible. It knows it is a stream of octets, nothing else.
-
-So, an attachment coming as "octet-stream" can be pretty much ANYTHING. You
-have no idea, and neither does anyone else. The only way to figure out is to
-download the file and see for yourself, ask the person who mailed it or to
-hope that the mail it came with describes what the attachment was about.
-
-"octet-stream" could just as well be named "I haven't got the slightest idea
-what this is, but I know it is built up with a series of bytes".
-
-

-Why is Hypermail ignoring some messages?
-One possibility is that those messages have a header saying
-
-X-No-Archive: yes
-
-which seems to indicate that the author doesn't want them included in any
-archive. This is controlled by a configure option which defaults to:
-
-deleted = "X-Hypermail-Deleted X-No-Archive"
-
-To get Hypermail to treat these as normal messages, add this to your
-config file (which is ~/.hmrc by default) or alter the "deleted" line
-in your existing config file to:
-
-deleted = "X-Hypermail-Deleted"
-
-
-
-Bogus dates are causing some emails to be put in a strange folder. Is there an easy way around this?
-
-If the bad dates were caused by a computer with the date set absurdly, try
-running
-mailbox_date_trimmer.py, available in the Hypermail's contrib directory.
-
-If the bad dates are in a format that Hypermail doesn't understand, then
-you will probably need to edit them manually.
-
-

-
-
-
-
-Do you have a Hypermail related question you'd like to see listed here ?
-If so send mail to the Hypermail mailing list
-hypermail@hypermail-project.org
- (preferably with the answers). In order to minimize spam on the list, you must subscribe to the list (at least temporarily) in order to send mail to it.
-You may subscribe to the list by sending a message with the word
-"subscribe" in the Subject: field to hypermail-request@hypermail-project.org.
-
-
-
-
-
-
diff --git a/docs/hypermail.1 b/docs/hypermail.1
index a1b3ef54..c40959ab 100644
--- a/docs/hypermail.1
+++ b/docs/hypermail.1
@@ -146,14 +146,6 @@ generates the html files. This is dependent on local needs. Do not
put a '.' in the value. It would result in "file..html", probably
not what you want.
.TP
-.B \-t
- This will tell Hypermail to generate an
-index menu at the top and bottom of each page in a table format.
-.TP
-.B \-T
-This will tell Hypermail to generate
-a message index Subject/Author/Date listings using a table format.
-.TP
.B \-u
This option tells Hypermail to add message(s) to the end of the existing HTML file archive and integrate them into it by links and cross-references. All archive index files will be regenerated to include the new message.
Hypermail used to require that you only send it one message at a time when
@@ -554,8 +546,6 @@ recommended for archives with over a few hundred messages.
Setting this greater than 1 will produce multiple levels of files
for each thread whose replies are nested by more than 1 level,
but that is rarely useful. This option is currently disabled
-if the indextable option is turned on, and probably needs to
-be less than thrdlevels.
.SH BUGS
@@ -572,15 +562,15 @@ was originally designed and developed by Tom Gruber
.RI
for Enterprise Integration Technologies (EIT) in Common Lisp. It was later rewritten in C by Kevin Hughes
.RI
-while at EIT. Kevin passed on\-going development and support for Hypermail
+while at EIT. Kevin passed development and support for Hypermail
to Kent Landfield
.RI .
.LP
-The latest documentation can usually be found at
- .B http://www.hypermail.org/
- but you might also want to check the cvs repository which is the first
-place that changes become available:
- .B http://cvs.hypermail.org/cgi-bin/cvsweb.cgi/hypermail/docs/
+As of today, current on-going development and support for Hypermail are done directly on its github repository
+.B https://github.com/hypermail-project/hypermail
+.LP
+The latest documentation can be found at
+.B https://github.com/hypermail-project/hypermail/docs
.LP
.SH CREDITS
.LP
diff --git a/docs/hypermail.css b/docs/hypermail.css
new file mode 100644
index 00000000..ff07db4e
--- /dev/null
+++ b/docs/hypermail.css
@@ -0,0 +1,383 @@
+/*
+** This program and library is free software; you can redistribute it and/or
+** modify it under the terms of the GNU (Library) General Public License
+** as published by the Free Software Foundation; either version 2
+** of the License, or 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 (Library) General Public License for more details.
+**
+** You should have received a copy of the GNU (Library) 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
+**/
+
+/*
+** Default stylesheet for hypermail archives
+**
+** Last revised: 07/July/2023
+**/
+
+/* Use this CSS rule to choose the background color
+ for your archive */
+html {
+ color: black;
+ background: #e2edfe;
+ /** you may also try #FFF6E0, #FFFFF6 or #FFEEC2.
+ ** For other color combinations, make sure you choices pass
+ ** the WAI contrast criteria
+ ** by using https://webaim.org/resources/contrastchecker/ */
+}
+
+/* wai-menu.css */
+
+/* accessible breadcrumbs */
+nav.breadcrumb ul { padding: 0; }
+nav.breadcrumb ul li { display: inline;}
+nav.breadcrumb ul li+li::before { content: " > "; }
+
+
+/* accessible horizontal menus */
+ul.hmenu_container { margin-left: 1em; padding-left: 0; }
+ul.hmenu_container > li { list-style-type: none; }
+ul.hmenu { font-style: normal; padding: 0; display: inline; }
+ul.hmenu li { display: inline; }
+
+ul.hmenu li {
+ border-right: 1.2px solid black;
+ padding-right: 0.4em;
+}
+
+ul.hmenu li:last-child {
+ border-right: none;
+ padding-right: 0;
+}
+
+/* replacement for dfn */
+.heading { font-weight: bold; }
+
+h2.heading, h2.theading {
+ font-size: inherit;
+ font-weight: normal;
+ margin-top: 0.2em;
+ margin-bottom: 0;
+ display: list-item;
+}
+
+h2.theading:before {
+ width:10px;
+ height:10px;
+ border-radius:50%;
+ background: #b83b3b;
+ display:inline-block;
+}
+
+h2.theading + ul {
+ list-style-type: disc;
+}
+
+/* default settings for narrow screens (smaller headings and padding) */
+/* height and min-height: 100% are to make backgrounds fill the window */
+html {
+ height: 100%;
+}
+
+body {
+ font-family: sans-serif;
+ margin: 0;
+ padding: 0.5em 1em;
+ line-height: 1.4;
+ min-height: 100%;
+}
+h1 {
+ font-size: 1.25em;
+}
+h2 {
+ font-size: 1.125em;
+}
+h3 {
+ font-size: 1em;
+}
+.messages-list {
+ padding-top: 1em;
+ margin-left: 1em;
+}
+.messages-list ul {
+ margin: 0;
+ padding-left: 1em;
+ list-style-type: disc;
+}
+
+/* bigger headings and padding on wider screens (desktops, tablets) */
+@media screen and (min-width: 48em) {
+ body {
+ padding: 0.5em 2.5em;
+ }
+ h1 {
+ font-size: 1.5em;
+ }
+ h2 {
+ font-size: 1.25em;
+ }
+ h3 {
+ font-size: 1.125em;
+ }
+ ul.hmenu_container {
+ padding-left: 1.5em;
+ }
+ .messages-list {
+ padding-top: 1.5em;
+ margin-left: 2.5em;
+ }
+ .messages-list ul {
+ padding-left: 2em;
+ }
+}
+
+ul.footer_hmenu { padding: 0; display: inline; }
+ul.footer_hmenu::after { content: ""; clear: both; display: block; }
+ul.footer_hmenu > li { list-style-type: none; }
+ul.footer_hmenu li { display: inline; }
+ul.footer_hmenu li.footer_admin { float: right; }
+
+/* make links visible thru focus or hover */
+a:link {
+ text-decoration-thickness: 1px;
+ text-underline-offset: 2px;
+}
+
+a:visited {
+ color:#529;
+}
+
+a:focus {
+ outline: 2px solid;
+ outline-offset: 1px;
+ text-decoration: underline;
+ text-decoration-thickness: 1px;
+ outline-color:#005A9C;
+ cursor :pointer;
+}
+
+a:hover {
+ color:#930;
+ text-decoration: underline;
+ text-decoration-thickness: 2px;
+}
+
+a:active {
+ /* outline: 0; */
+}
+
+
+/* mainindex-wai.css */
+
+table { margin: 1em; }
+
+/* Table head -- should be w3c blue */
+thead tr { color: #FFFFFF; background-color: rgb(0,90,156); }
+
+tbody tr { font-family: sans-serif; }
+
+.head img {float:left;}
+.head p {clear: left;}
+/* th {font-style:italic;} */
+nav ul { list-style-type: none; }
+
+table { border: 0px; border-spacing: 3px; }
+td { padding: 2px; }
+/* accessible horizontal menus */
+.cell_message { text-align: center; }
+.cell_period { text-align: right; }
+
+a.sub:link { color: green; }
+a.unsub:link {color: #b22222; }
+
+.header .important { padding: 0.5em 1em; }
+
+.visually_hidden {
+ border: 0;
+ clip: rect(0 0 0 0);
+ height: 1px;
+ margin: -1px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ width: 1px;
+}
+
+.restricted:after {
+ content: " (restricted)";
+}
+
+body.mainindex .head {
+ border-bottom: none;
+}
+
+
+/* messagelist-wai.css */
+
+dfn {font-weight: bold;}
+nav ul {list-style:none;}
+.messages-list {
+ border-bottom:thin solid black;
+}
+
+
+/* message.css */
+
+
+/* Leave message itself white but rest of metadata very pale grey.
+** This makes it more legible.
+** it also by analogy points out that the content of the message
+** someone else's, not W3C material necessarily -- we just run the list
+*/
+
+pre {
+ color: black;
+ white-space: pre-wrap;
+ overflow-wrap: break-word;
+}
+
+
+/* want to be able to identify the author and style it
+** but can't
+*/
+
+dfn {font-weight: bold;}
+/* .mail, .head { border-bottom:1px solid black;} */
+map ul {list-style:none;}
+#message-id { font-size: small;}
+address { font-style:inherit ;}
+
+@media print {
+ #upper, #navbarfoot, #navbar {
+ display:none;
+ }
+}
+
+/* for edited messages */
+div.edit {
+ background: #CCFF99;
+ padding: 0.25em 2em 0.25em 1em;
+ margin-top: 0.25em;
+}
+p.editmes{
+ font-style: italic;
+ font-size: small;
+ padding: 0;
+}
+p.editfooter{
+ font-size: small;
+ padding: 0;
+}
+
+/* for deleted messages */
+div.spam {
+ background: #aaffaa;
+ padding: 1em 2em;
+}
+p.spammes{
+ font-size: x-large;
+ font-weight: bold;
+}
+p.spamfooter{
+ font-size: small;
+}
+
+
+/* updates added by Gerald 27 Apr 2023 */
+
+.message-forwarded {
+ padding: 0 1em;
+ border: 2px solid #888;
+ border-radius: 0.5em;
+}
+
+.message-body-part {
+ margin: 1em 0;
+}
+.message-forwarded > h2 {
+ color: #303030;
+ padding: 0.25rem 1rem 0.1em;
+ background: #DEE7CA;
+ margin: 0 -1rem 0.5rem;
+ border-radius: 0.3rem 0.3rem 0 0;
+}
+
+.message-forwarded ul.headers {
+ margin: 0;
+}
+
+.message-forwarded pre {
+ padding: 0;
+ margin-bottom: 0.25em;
+}
+
+section section {
+ text-indent: 0;
+}
+
+ul.headers {
+ list-style: none;
+ padding-left: 0em;
+}
+
+.attachment-links {
+ background: aliceblue;
+ padding: 0.01em 1em;
+}
+
+section.attachment-links ul {
+ padding-left: 1.5em;
+}
+
+.attachment-links img {
+ padding: 0.5em 0;
+}
+
+img {
+ max-width: 100%;
+}
+
+/* experimental: */
+
+.mail {
+ background: white;
+ /*
+ padding-left: 0.75em;
+ padding-top: 0.025em;
+ */
+ padding: 0.025em 0.75em;
+}
+
+/* the following wo rules apply when you're using the
+ yearly_index config option */
+.summary-year {
+ padding-top: 1em;
+ padding-bottom: 1em;
+}
+
+main.summary-year th.cell_period + th,
+main.summary-year td.cell_message + td {
+ padding-left: 0.5em;
+}
+
+/* the following rules are used to set the style of quotes
+ when you're using the 'showhtml' config option with
+ values 1 or 2 */
+
+/* use this option to specify the style for a quote line */
+.quote {
+/* enable this one to change the style to italic to emulate
+ the deprecated iquote config option */
+ font-style: italic;
+}
+
+/* add more entries or separate this rule into
+ multiple ones if you want a specific style for
+ quotes depending on their level */
+.quotelev1, .quotelev2, .quotelev3, .quotelev5, .quotelev6 {
+}
diff --git a/docs/hypermail.html b/docs/hypermail.html
index 3f3022c6..a42cbc19 100644
--- a/docs/hypermail.html
+++ b/docs/hypermail.html
@@ -1,77 +1,91 @@
-
-
-
-Hypermail Documentation
-
-
-
-
Hypermail
-
-
-
-
-Contents:
-
-- What is Hypermail?
-
- Usage
-
- Command-Line Options
-
-
- Configuration Options
-
- Order of Options Processing
-
- Other Things
-
- Running Hypermail Automatically
-
- Getting Help With Hypermail
-
- Getting Hypermail Software
-
- Credits
-
- See Also
-
-
-
-
-
-What is Hypermail?
-
-Hypermail is a program that takes a file of mail messages in UNIX mailbox format and generates a set of cross-referenced HTML documents. Each file that is created represents a separate message in the mail archive and contains links to other articles, so that the entire archive can be browsed in a number of ways by following links. Archives generated by Hypermail can be incrementally updated, and Hypermail is set by default to only update archives when changes are detected.
-
-Each HTML file that is generated for a message contains (where applicable):
-
-
-- the subject of the article,
-
- the name and email address of the sender,
-
- the date the article was sent,
-
- links to the next and previous messages in the archive,
-
- a link to the message the article is in reply to, and
-
- a link to the message next in the current thread.
-
-
-In addition, Hypermail will convert references in each message to email addresses and URLs to hyperlinks so they can be selected. Email addresses can be converted to mailto: URLs or links to a CGI mail program.
-
-To complement each set of HTML messages, four index files are created which sort the articles by date received, thread, subject, and author. Each entry in these index files are links to the individual articles and provide a bird's-eye view of every archived message.
-
-Hypermail was originally developed and designed by Tom Gruber for Enterprise Integration Technologies (EIT) in Common Lisp. It was later rewritten in C by Kevin Hughes while at EIT. Hypermail is now being maintained by Peter McCluskey <pcm@rahul.net>.
-
-
-To see what Hypermail can do, take a look at these Hypermail-produced archives:
-
-
-
-
-
-
-Usage
-
-
-
+
+
+
+
+ Hypermail Documentation
+
+
+
+
+
+
Hypermail
+
+
+
+
+
+
+ What is Hypermail?
+ Hypermail is a program that takes a file of mail
+ messages in UNIX mailbox format and generates a set of
+ cross-referenced HTML documents. Each file that is created
+ represents a separate message in the mail archive and contains
+ links to other articles, so that the entire archive can be browsed
+ in a number of ways by following links. Archives generated by
+ Hypermail can be incrementally updated, and Hypermail is set by
+ default to only update archives when changes are detected.
+ Each HTML file that is generated for a message contains (where
+ applicable):
+
+ - the subject of the article,
+ - the name and email address of the sender,
+ - the date the article was sent,
+ - links to the next and previous messages in the archive,
+ - a link to the message the article is in reply to, and
+ - a link to the message next in the current thread.
+
+ In addition, Hypermail will convert references in each message
+ to email addresses and URLs to hyperlinks so they can be selected.
+ Email addresses can be converted to mailto: URLs
+ or links to a CGI mail program.
+ To complement each set of HTML messages, four index files are
+ created which sort the articles by date received, thread, subject,
+ and author. Each entry in these index files are links to the
+ individual articles and provide a bird's-eye view of every archived
+ message.
+
+ To see what Hypermail can do, take a look at these
+ Hypermail-produced archives:
+
+ - W3C Public Mailing List Archives (3.0)
+ - Hypermail
+ Development Archives (2.3)
+ - FAQ
+ Maintainers Archives (2.2)
+
+
+ Usage
+
Usage: hypermail [options]
Options:
@@ -89,8 +103,6 @@ Usage
-o keyword=val: Set config item
-p : Show progress
-s htmlsuffix : HTML file suffix (.html, .htm, ..)
- -t : Use Tables
- -T : Use index tables
-u : Append all input messages
-v : Show configuration variables only
-V : Show version information and exit
@@ -100,42 +112,46 @@ Usage
-1 : Read only one mail from input
-L lang : Specify language to use (de en es fi fr is pl pt sv no el gr ru it )
-
-
-Using the flags -h, or -? with Hypermail will display this usage summary.
-
-
-
-
-Command-Line Options
-
-Input and Output Options:
-
--i,
-
-m "mailbox",
-
-d "directory",
-
-c "file"
-
-
-
-To tell Hypermail what mailbox to read in, use the -m option. If articles will be sent to Hypermail through standard input, use the -i option. Note that the -m and -i options can't be used together! By default, Hypermail will look for a file called mbox to read its articles in from.
-
-The -d option specifies the directory to put the HTML files and index files that are created into. If the directory doesn't exist, a new one will be created with the name that is specified. If the -d option isn't used, Hypermail will look for a directory with the same name as the mailbox or will create one if needed.
-
-
+
+Using the flags -h, or -? with
+Hypermail will display this usage summary.
+
+Command-Line Options
+Input and Output
+Options:
+-i,
+-m "mailbox",
+-d "directory",
+-c "file"
+To tell Hypermail what mailbox to read in, use the
+-m option. If articles will be sent to Hypermail
+through standard input, use the -i option. Note
+that the -m and -i options can't
+be used together! By default, Hypermail will look for a file called
+mbox to read its articles in from.
+The -d option specifies the directory to put
+the HTML files and index files that are created into. If the
+directory doesn't exist, a new one will be created with the name
+that is specified. If the -d option isn't used,
+Hypermail will look for a directory with the same name as the
+mailbox or will create one if needed.
+
example 1: hypermail -m "wu-ftpd" -d "/wu-ftpd"
example 2: cat "/var/spool/mail/wu-ftpd" | hypermail -i
-
-
-
-- This example reads the articles in wu-ftpd and will save the output in the /wu-ftpd directory.
-
-
- This reads the file /var/spool/mail/wu-ftpd from standard input and will save the output in a directory called archive in the same directory Hypermail was run from.
-
-
-Note that Hypermail can only read messages in the UNIX mailbox format! Such archives are typically RFC 2822 mail messages appended to each other that look similar to this:
-
-
+
+
+- This example reads the articles in wu-ftpd and
+will save the output in the /wu-ftpd
+directory.
+- This reads the file /var/spool/mail/wu-ftpd
+from standard input and will save the output in a directory called
+archive in the same directory Hypermail was run
+from.
+
+Note that Hypermail can only read messages in the UNIX mailbox
+format! Such archives are typically RFC 2822 mail messages appended
+to each other that look similar to this:
+
From john@foo.com Mon Jan 1 00:01:30 1994
Date: Mon, 1 Jan 1994 00:01:15 PDT
From: john@foo.com
@@ -147,482 +163,517 @@ Command-Line Options
From someone.else@foo.com Mon Jan 1 00:02:00 1994
Date: Mon, 1 Jan 1994 00:01:45 PDT
...
-
-
-The messages are typically separated by lines in this format:
-
-
+
+The messages are typically separated by lines in this
+format:
+
From wu-ftpd@wugate.wustl.edu Fri Jul 1 00:18:20 1994
-
-
-The -c option tells Hypermail to read in settings from a configuration file. By default, the program will attempt to read settings from a file called .hmrc in the user's home directory if it exists.
-
-In the configuration file, variables are set in the following manner:
-
-
-
-variable = number
-
variable = "string"
-
-
-
-The complete set of variables that Hypermail recognizes is described in the Configuration Options page.
-
-
-Archive Interface Options:
-
--l "label",
-
-b "About URL",
-
-a "Other Archives URL"
-
-
-The -l option tells Hypermail what to call the archive - the name that is specified will be in the title of the index pages so users know what sort of messages are being archived.
-
-The -a option includes a link labelled "Other mail archives" in the index pages to any specified URL. This way users who are looking at the archive have the opportunity to go to pointers to other mail archives. By default, this will be a pointer to the parent directory in which the archive files reside.
-
-The -b option includes a link labelled "About this archive" in the index pages to any specified URL. This way users who are looking at the archive have the opportunity to go to information about the archive.
-
-
+
+The -c option tells Hypermail to read in
+settings from a configuration file. By
+default, the program will attempt to read settings from a file
+called .hmrc in the user's home directory if it
+exists.
+In the configuration file, variables are set in the following
+manner:
+variable = number
+variable = "string"
+
+The complete set of variables that Hypermail recognizes is
+described in the Configuration Options
+ page.
+
+To get you up to speed, a sample annotated hypermail configuration file is included in the docs dir.
+
+
+-l "label",
+-b "About URL",
+-a "Other Archives
+URL"
+The -l option tells Hypermail what to call the
+archive - the name that is specified will be in the title of the
+index pages so users know what sort of messages are being
+archived.
+The -a option includes a link labelled "Other
+mail archives" in the index pages to any specified URL. This way
+users who are looking at the archive have the opportunity to go to
+pointers to other mail archives. By default, this will be a pointer
+to the parent directory in which the archive files reside.
+The -b option includes a link labelled "About
+this archive" in the index pages to any specified URL. This way
+users who are looking at the archive have the opportunity to go to
+information about the archive.
+
example: hypermail -l "WU-FTPD Development Archives"
-a "http://www.landfield.com/wu-ftpd/"
-b "http://www.landfield.com/wu-ftpd/mail-archive/"
-
-
-In the index files for the archive, the above setting will produce something like this:
-
-
-(top of page)
-
-WU-FTPD Archives
-
-
-(list of indexed articles below)
-
-
-
-Updating Options:
-
--x,
-
-u
-
-
-The -x option tells Hypermail to explicitly overwrite any previous HTML files that may exist. Use this option only when it is desirable to completely rewrite the entire archive.
-
-The -u option tells Hypermail to add message(s) to the end of the existing HTML file archive and integrate them into it by links and cross-references. All archive index files will be regenerated to include the new message.
-
- Hypermail used to require that you only send it one message at a time when
-using the -u option, but it should now work reasonably when
-given mailboxes containing multiple messages.
-
-When using the -u option, don't send any messages that
-Hypermail has already processed. If you want Hypermail to recognize that
-some messages are old messages that shouldn't be added to the archive again,
-send it a mailbox with a complete set of messages and avoid the
--u option.
-
-
+
+In the index files for the archive, the above setting will
+produce something like this:
+(top of page)
+WU-FTPD Archives
+
+(list of indexed articles below)
+
+
+-x,
+-u
+The -x option tells Hypermail to explicitly
+overwrite any previous HTML files that may exist. Use this option
+only when it is desirable to completely rewrite the entire
+archive.
+The -u option tells Hypermail to add message(s)
+to the end of the existing HTML file archive and integrate them
+into it by links and cross-references. All archive index files will
+be regenerated to include the new message.
+Hypermail used to require that you only send it one message at a
+time when using the -u option, but it should now
+work reasonably when given mailboxes containing multiple
+messages.
+When using the -u option, don't send any
+messages that Hypermail has already processed. If you want
+Hypermail to recognize that some messages are old messages that
+shouldn't be added to the archive again, send it a mailbox with a
+complete set of messages and avoid the -u
+option.
+
example 1: cat "one.letter" | hypermail -i -u -d "/wu-ftpd/mail-archives"
example 2: hypermail -u -m "one.letter" -d "/wu-ftpd/mail-archives"
example 3: hypermail -m "mailbox" -d "/wu-ftpd/mail-archives" -x
example 4: hypermail -m "mailbox" -d "/wu-ftpd/mail-archives"
-
-
-
-- This tells Hypermail to take the article it receives from standard input
-and integrate it with the archive under the wu-ftpd/mail-archives
-directory. If no archive exists, a new one will be created with the specified
-letter as the first file of the archive.
-
-
- This does the same thing, except that the letter is read in from a file that contains only that letter.
-
-
- With these options, Hypermail will read in the articles from
-mailbox and write over any existing files in the
-wu-ftpd/mail-archives directory if they exist. If no archive
-exists, a new one will be created.
-
-
- With these options, Hypermail will read in the articles from
-mailbox and only write new articles - it will not overwrite
-any existing archive files.
-
-
-Note that no matter what options are specified, the index files are always
-rewritten. The date when Hypermail was last run is included in index pages,
-so it's easy to tell when the archive was last updated.
-
--p
-
-v
-
-V
-
-
-The -p option shows a progress report as Hypermail reads in and writes out messages - the number of files that Hypermail is reading and writing and the file names of the directory and files created are shown. This information is written to standard output.
-
-The -v option shows the configuration variables and their values that Hypermail would use if it was run with the same configuration file and command line options. This is useful when starting up a new list or modifying a list configuration file. Once the information is displayed, Hypermail terminates and no actual processing occurs.
-
-The -V option prints the Hypermail version information. Once the information is displayed, Hypermail terminates and not actual processing occurs.
-
-The -0 option list message numbers that should be deleted
-from the html archive. The mbox is not changed.
-It is equivalent to the delete_msgnum
-option.
-
-
-
-Configuration Options
-
-Hypermail has many variables that can be set as environment variables or as variables in the specified configuration file. For instance, using the C shell, one could define variables in this manner:
-
-
+
+
+- This tells Hypermail to take the article it receives from
+standard input and integrate it with the archive under the
+wu-ftpd/mail-archives directory. If no archive
+exists, a new one will be created with the specified letter as the
+first file of the archive.
+- This does the same thing, except that the letter is read in
+from a file that contains only that letter.
+- With these options, Hypermail will read in the articles from
+mailbox and write over any existing files in the
+wu-ftpd/mail-archives directory if they exist. If
+no archive exists, a new one will be created.
+- With these options, Hypermail will read in the articles from
+mailbox and only write new articles - it will not
+overwrite any existing archive files.
+
+Note that no matter what options are specified, the index files
+are always rewritten. The date when Hypermail was last run is
+included in index pages, so it's easy to tell when the archive was
+last updated.
+
+-p
+-v
+-V
+The -p option shows a progress report as
+Hypermail reads in and writes out messages - the number of files
+that Hypermail is reading and writing and the file names of the
+directory and files created are shown. This information is written
+to standard output.
+The -v option shows the configuration variables
+and their values that Hypermail would use if it was run with the
+same configuration file and command line
+options. This is useful when starting up a new list or modifying a
+list configuration file. Once the information is displayed,
+Hypermail terminates and no actual processing occurs.
+The -V option prints the Hypermail version
+information. Once the information is displayed, Hypermail
+terminates and not actual processing occurs.
+The -0 option list message numbers that should
+be deleted from the html archive. The mbox is not changed. It is
+equivalent to the delete_msgnum option.
+
+Configuration Options
+Hypermail has many variables that can be set as environment
+variables or as variables in the specified configuration file. For instance, using the C
+shell, one could define variables in this manner:
+
setenv HM_MBOX /home/john/my_mailbox
setenv HM_FILEMODE 0600
-
-
-In the configuration file, variables must be in lowercase and separated by their values with an equals (=) sign. Blank lines and lines beginning with the # character are skipped:
-
+
+In the configuration file, variables must be in lowercase and
+separated by their values with an equals (=) sign.
+Blank lines and lines beginning with the #
+character are skipped:
+
mbox = "/home/john/my_mailbox"
filemode = 0600
-
-While the example uses quotes ("), they is not required when used in the configuration file.
-
-Below is a list of the more important configuration variables.
-For a complete list, see hmrc.html.
-
-
-- HM_LABEL "label name"
-
- Define this as the default label to put in archives.
-
-
- HM_ARCHIVES "URL"
-
- This will create a link in the archived index pages to the specified
- URL. Define as "NONE" to omit such a link.
- See also custom_archives.
-
-
- HM_HMAIL "list submission address"
-
- This is the email address used to send a new message to a hypermail archive. "NONE" means don't use it. Since this is different for each hypermail archive, you should probably leave it set to "NONE" here, and let it be specified at runtime by command-line parameters in the list specific configfile.
-
See also newmsg_command
-and replymsg_command.
-
-
- HM_DIR "directory"
-
- This is the default directory that Hypermail will look for when creating and updating archives. If defined as "NONE", the directory name will be the same name as the mailbox read in.
-
-
- HM_MBOX "filename"
-
- This is the default mailbox to read messages in from. Define this with
- a value of "NONE" to read from standard input as the
- default.
-
-
- HM_STRIPSUBJECT "text"
-
- A string to be stripped from all subject lines. Helps
-unclutter mailing lists which add tags to subject lines.
-
-- HM_FOLDER_BY_DATE = "strftime-date-format"
-
-This string causes the messages to be put in subdirectories
-by date. The string will be passed to strftime(3) to generate
-subdirectory names based on message dates. Suggested values are
-"%y%m" or "%b%y" for monthly subdirectories, "%Y" for
-yearly, "%G/%V" for weekly. Do not alter this for an existing
-archive without removing the old html files. If you use this
-and update the archive incrementally (e.g. with -u), you must
-use the usegdbm option.
-
See also monthly_index.
-
-- HM_ISODATE boolean_number
-
-Set this to On to display article received dates in
-YYYY-MM-DD HH:MM:SS format. If used with the gmtime
-option, a Z will be inserted between the DD and HH.
-
See also eurodate and dateformat.
-
-
-
- HM_LANGUAGE "language-id"
-
- This is a two-letter string specifying the default
- language to use, or a longer string specifying a language
- and locale. Set this the value of the language
- table you wish to use when running and generating
- archives. See also iso2022jp
- and eurodate.
-
-
Current supported languages, with their default locales:
-
-de (de_DE) - German
-
en (en_US) - English
-
es (es_ES) - Spanish
-
fi (fi_FI) - Finnish
-
fr (fr_FR) - French
-
el (el) - Greek
-
gr (el_GR) - Greek
-
is (is_IS) - Icelandic
-
no (no_NO) - Norwegian
-
pl (pl_PL) - Polish
-
pt (pt_BR) - Brazilian Portuguese
-
ru (ru_RU) - Russian
-
sv (sv_SE) - Swedish
-
-The directory /usr/share/i18n/locales on many systems has the locale
-codes that are available on that system.
-
-
- HM_INCREMENT -1, 0, or 1
-
Define as 1 to append all input messages to the end of existing archives.
-
Define as 0 for it to read a mailbox that corresponds to the entire
-archive. If there are any existing html messages, it will figure out which
-ones at the end of the mailbox are new, and add only those that haven't been
-converted yet.
-
Define as -1 to have hypermail figure out whether the input
-is entirely new messages to be appended or whether it contains
-messages that are already in the archive. A value of -1 cannot be
-used with the mbox_shortened option or with the -i command line
-option or with mbox = NONE.
-- HM_APPEND boolean_number
-
-Set this to On to maintain a parallel mbox archive. The file
-name defaults to mbox in the directory specified by -d or dir.
-
See also append_filename
-and txtsuffix.
-
-
-
- HM_SHOWHTML 0, 1, or 2
-
-
-Define as 1 to show the articles in a proportionally-spaced
-font rather than a fixed-width (monospace) font. Setting this
-option to 1 also tells Hypermail to attempt to italicize quoted
-passages in articles.
-
-Define as 2 for more complex conversion to html
-similar to that in txt2html.pl.
-Showhtml = 2 will normally produce nicer looking results than
-showhtml = 1, and showhtml = 0 will look pretty dull, but
-1 and 2 run risks of altering the appearance in undesired ways.
-
-
- HM_LINKQUOTES boolean_number
-
- Set this to On to create fine-grained links from quoted
-text to the text where the quote originated. It also improves
-the threads index file by more accurately matching messages
-with replies. Note that this may be rather cpu intensive (see
-the searchbackmsgnum option to alter the performance).
-
-
- HM_ABOUT "URL"
-
- This will create a link in the archived index pages to the specified URL. Define as "NONE" to omit such a link.
-
-
- HM_MAILTO address
-
- The address of the contact point that is put in the HTML header line
-
-- <LINK REV=made HREF=mailto:MAILTO>
-
- The <LINK...> header can be disabled by default by setting HM_MAILTO to "NONE".
-
-
- HM_INDEXTABLE boolean_number
-
- Setting this variable to 1 will tell Hypermail to generate
- a message index Subject/Author/Date listings using a table
- format. Set to 0 if you want the standard Hypermail index
- page look and feel.
-
-
- HM_FILTER_OUT expression
-Delete messages with headers matching regular expressions
-(PCRE syntax).
-See also filter_require,
-filter_out_full_body, and
-filter_require_full_body.
-
-
-
- HM_DOMAINADDR "domainname"
-
- Set this to the domainname you want added to a mail address appearing
-in the RFC2822 field which lack a hostname. When the list resides on the
-same host as the user sending the message, it is often not required of
-the MTA to domain-ize these addresses for delivery. In such cases,
-Hypermail will add the DOMAINADDR to the email address. If defined as
-NONE, this feature is turned off.
-
-
- HM_USEMETA [ 0 | 1 ]
-
- This option allows you to use metadata to store the content type
- of a MIME attachments and, later on, when a user browses the
- attachment, send back this information in the HTTP Content-Type
- header. When set to 1, the Content-Type header of a
- MIME attachment will be stored in a metadata file. Let us say that
- the MIME attachments for a message are stored in directory
- att-num. The metadata for those attachments will
- then be stored in directory att-num/.meta. If a
- MIME attachment is stored in file att-file, its
- metadata will be stored in file att-file.meta. This
- convention is directly compatible with the Apache server handling of
- metadata.
-
-
- HM_REVERSE boolean_number
-
- Defining this variable as 1 will reverse-sort the article entries in the date and thread index files by the date they were received. That is, the most recent messages will appear at the top of the index rather than the other way around.
-
-
- HM_MHTMLHEADERFILE "path"
-
- Define path as the path to a file containing valid HTML formatting statements that you wish to included at the top of every message page. Hypermail will print this file as the header of the message so make sure it contains <HTML>, <HEAD>, and <BODY> and other statements that suit your local customized needs.
-
-See also ihtmlheaderfile,
-ihtmlfooterfile, and
-mhtmlfooterfile.
-
-
- HM_CONFIGFILE "filename"
-
- This is the default configuration file to read settings in from. This
- can only be specified as an environment variable. If the first character
- is "~", Hypermail will look for the file under the current user's home
- directory.
-
-
-
-
-
-
-Order of Options Processing
-
-Settings are processed in this order:
-
-
-- From the program's hard-wired internal defaults (specified in options.h),
-
- From runtime environment variables,
-
- From the configuration file,
-
- From command-line options.
-
-
-Early versions of Hypermail read the command line before reading the
-configuration file.
-
-
-
-Other Things
-
-Filenames: In the specified directory, articles will be read out in the order that they were read in from a mailbox or standard input. Filenames start at zero and increase in this fashion: 0000.html, 0001.html, 0002.html, etc. In the same directory:
-
-
-- date.html is the index of articles sorted by the date they were received by the system's mail daemon.
-
- thread.html is the index of articles sorted by thread first, then the date they were received.
-
- subject.html is the index of articles sorted by subject. Any "Re:" prefixes in front of subjects will have been stripped out.
-
- author.html is the index of articles sorted by the first word of the author's name. If the author's name can't be determined, their email address will be substituted.
-
- One of the above files will be called index.html and is the default index that users can go to when entering the archive.
-
-
-
-Sorting: In the date and thread index files, note that these lists are sorted by the date the articles were received by the system's mail daemon, not by the date they were written on. The order of articles in the date index may not necessarily match the order in which the article files are written and linked together. Because of this, it is a good idea to make sure the mailbox is sorted by date with the most recent messages towards the bottom.
-
-
-
-Running Hypermail automatically: All that's needed to start archiving email messages is to set up Hypermail to do incremental updates in your /etc/aliases file (assuming that you use sendmail or something that works like it to deliver mail).
- Here's what an entry might look like (the last line is one unbroken line):
-
-
-#
-
# WU-FTPD Mailing List Archives
-
#
-
wulist: "|/usr/local/bin/hypermail -i -u -d /wu-ftpd/mail-archive -l \"WU-FTPD Mailing List Archive\""
-
-
-
-After adding the entry, make sure newaliases is run to update the
-mail aliases. This entry will run Hypermail and update/create the archive whenever
-a new message is received. Hypermail also works well as a cron job.
-Because sendmail may run Hypermail as different users, you will
-want to make sure that archive directories and files are made readable and writeable
-by a trusted sendmail user (or read/writable by everyone if you can't do that)
-when they are created. This will ensure that there will be no problems incrementally
-updating the archive.
-If you use qmail instead of sendmail, you probably want to create a file
-/var/qmail/alias/.qmail-<mylistemailaddress> containing something like this:
-
-|/usr/local/bin/hypermail -i -u -d /wu-ftpd/mail-archive -l \"WU-FTPD Mailing List Archive\"
-
-
- If you are running Linux kernel version 2.4 or higher,
-dnotify
-looks like it provides another way to automate Hypermail.
-
-
-Including HTML in messages: One can include formatted HTML in message bodies by enclosing the HTML with the <HTML> tag (in either uppercase or lowercase). This tag must be on a line by itself:
-
-
- This text will not be parsed...
- <html>
- this text will be parsed as HTML.
- </html>
- This text will not be parsed...
-
-
-There is no limit to how often the <HTML> tag can be used in an article.
-
-
-
-
-Getting Help With Hypermail
-
-If you are are looking for more information on Hypermail and its features and
-developmental status, check out
-SourceForge: Project Info - hypermail
-and hypermail-project.org. Additional
-documentation and the hypermail development list archives are available there.
-
-
-
-
-Getting Hypermail Software
-
-
-Hypermail is available free of charge under GNU Public License. More details
-about the GPL are available at http://www.fsf.org/copyleft/gpl.html.
-
-Currently, SourceForge: Project Info - hypermail
-has the most recent version.
-
-The Hypermail Development Center also has beta development versions of hypermail available from time to time.
-
-
-
-
-Credits
-
-I would like to thank Tom Gruber,
-who originally designed and developed Hypermail in Common Lisp, for the basis
-of a GREAT tool.
-
-I'd also like to thank Kevin Hughes for
-developing the initial C version of Hypermail. Kevin also provided a great
-deal of assistance with restarting the current hypermail development.
-
-There are a great deal of people that also contributed to Hypermail's development.
-The Hypermail Development Center Credits page is an attempt to let you know just who they are.
-
-Hypermail development is currently being fostered by
-<Peter McCluskey>.
-
-
-
-
-See Also
-
-hypermail(1),
-
-hmrc(4),
-
-Hypermail List Configuration File.
-
-and
-
-Customizing Hypermail Pages
-and Adding a Search Engines to your Hypermail Archive
-
-
-
-
-
-
-Please send any feature requests, bug fixes, and comments on Hypermail
-to <hypermail@hypermail-project.org>. In order to minimize spam on the list, you must subscribe to the list (at least temporarily) in order to send mail to it.
-You may subscribe to the list by sending a message with the word
-"subscribe" in the Subject: field to hypermail-request@hypermail-project.org.
-
-
-
-Last updated Sep 2, 2006
-
-
-
-
+
+While the example uses quotes ("), they is not
+required when used in the configuration file.
+Below is a list of the more important configuration variables.
+For a complete list, see hmrc.html.
+
+ - HM_LABEL "label name"
+ - Define this as the default label to put in archives.
+
+ - HM_ARCHIVES "URL"
+ - This will create a link in the archived index pages to the
+ specified URL. Define as "NONE" to omit such a
+ link. See also custom_archives.
+
+
+ - HM_HMAIL "list submission address"
+ - This is the email address used to send a new message to a
+ hypermail archive. "NONE" means don't use it. Since this is
+ different for each hypermail archive, you should probably leave it
+ set to "NONE" here, and let it be specified at runtime by
+ command-line parameters in the list specific configfile.
+ See also newmsg_command and
+ replymsg_command.
+
+
+ - HM_DIR "directory"
+ - This is the default directory that Hypermail will look for when
+ creating and updating archives. If defined as
+ "NONE", the directory name will be the same name
+ as the mailbox read in.
+
+
+ - HM_MBOX "filename"
+ - This is the default mailbox to read messages in from. Define
+ this with a value of "NONE" to read from standard
+ input as the default.
+
+
+ - HM_STRIPSUBJECT "text"
+ - A string to be stripped from all subject lines. Helps unclutter
+ mailing lists which add tags to subject lines.
+
+
+ - HM_FOLDER_BY_DATE ="strftime-date-format"
+ - This string causes the messages to be put in subdirectories by
+ date. The string will be passed to strftime(3) to generate
+ subdirectory names based on message dates. Suggested values are
+ "%y%m" or "%b%y" for monthly subdirectories, "%Y" for yearly,
+ "%G/%V" for weekly. Do not alter this for an existing archive
+ without removing the old html files. If you use this and update the
+ archive incrementally (e.g. with -u), you must use the
+ usegdbm option.
+ See also monthly_index.
+
+
+ - HM_ISODATE boolean_number
+ - Set this to On to display article received dates in YYYY-MM-DD
+ HH:MM:SS format. If used with the
+ gmtime option, a Z will be inserted between
+ the DD and HH.
+ See also eurodate and
+ dateformat.
+
+
+ - HM_LANGUAGE "language-id"
+ - NB non-english language files have not been updated since long time ago
+ and are now lagging in translation.
+ This is a two-letter string specifying the default language to
+ use, or a longer string specifying a language and locale. Set this
+ the value of the language table you wish to use when running and
+ generating archives. See also iso2022jp and eurodate.
+
+ Current supported languages, with their default locales:
+
+ de (de_DE) - German
+ en (en_US) - English
+ es (es_ES) - Spanish
+ fi (fi_FI) - Finnish
+ fr (fr_FR) - French
+ el (el) - Greek
+ gr (el_GR) - Greek
+ is (is_IS) - Icelandic
+ no (no_NO) - Norwegian
+ pl (pl_PL) - Polish
+ pt (pt_BR) - Brazilian Portuguese
+ ru (ru_RU) - Russian
+ sv (sv_SE) - Swedish
+
+ The directory /usr/share/i18n/locales on many systems has the
+ locale codes that are available on that system.
+
+
+ - HM_INCREMENT -1, 0, or 1
+ - Define as 1 to append all input messages to the
+ end of existing archives.
+ Define as 0 for it to read a mailbox that
+ corresponds to the entire archive. If there are any existing html
+ messages, it will figure out which ones at the end of the mailbox
+ are new, and add only those that haven't been converted yet.
+ Define as -1 to have hypermail figure out whether
+ the input is entirely new messages to be appended or whether it
+ contains messages that are already in the archive. A value of -1
+ cannot be used with the mbox_shortened option or with the -i
+ command line option or with mbox = NONE.
+
+
+
+ - HM_APPEND boolean_number
+ - Set this to On to maintain a parallel mbox archive. The file
+ name defaults to mbox in the directory specified by -d or
+ dir.
+ See also append_filename
+ and txtsuffix.
+
+
+ - HM_SHOWHTML 0, 1, or 2
+
+ - Define as 1 to show the articles in a
+ proportionally-spaced font rather than a fixed-width
+ (monospace) font. Setting this option to 1 also tells
+ Hypermail to attempt to italicize quoted passages in articles.
+
Define as 2 for more complex conversion to html
+ similar to that in
+ txt2html.pl. Showhtml
+ = 2 will normally produce nicer looking results than showhtml = 1,
+ and showhtml = 0 will look pretty dull, but 1 and 2 run risks of
+ altering the appearance in undesired ways.
+
+
+ - HM_LINKQUOTES boolean_number
+ - Set this to On to create fine-grained links from quoted text to
+ the text where the quote originated. It also improves the threads
+ index file by more accurately matching messages with replies. Note
+ that this may be rather cpu intensive (see the
+ searchbackmsgnum option to alter
+ the performance).
+
+
+ - HM_ABOUT "URL"
+ - This will create a link in the archived index pages to the
+ specified URL. Define as "NONE" to omit such a link.
+
+
+ - HM_MAILTO address
+ - The address of the contact point that is put in the HTML header
+ line
+
+ <LINK REV=made HREF=mailto:MAILTO>
+
+ The <LINK...>
header can be disabled by default by setting
+ HM_MAILTO
to "NONE
".
+
+
+ - HM_FILTER_OUT expression
+ - Delete messages with
+ headers matching regular expressions
+ (PCRE syntax).
+ See also filter_require,
+ filter_out_full_body,
+ and filter_require_full_body.
+
+
+ - HM_DOMAINADDR "domainname"
+ - Set this to the domainname you want added to a mail address
+ appearing in the RFC2822 field which lack a hostname. When the list
+ resides on the same host as the user sending the message, it is
+ often not required of the MTA to domain-ize these addresses for
+ delivery. In such cases, Hypermail will add the DOMAINADDR to the
+ email address. If defined as NONE, this feature is turned off.
+
+
+ - HM_USEMETA [ 0 | 1 ]
+ - This option allows you to use metadata to store the content
+ type of a MIME attachments and, later on, when a user browses the
+ attachment, send back this information in the HTTP Content-Type
+ header. When set to 1, the Content-Type header of
+ a MIME attachment will be stored in a metadata file. Let us say
+ that the MIME attachments for a message are stored in directory
+ att-num. The metadata for those attachments will
+ then be stored in directory att-num/.meta. If a
+ MIME attachment is stored in file att-file, its
+ metadata will be stored in file att-file.meta.
+ This convention is directly compatible with the Apache server
+ handling of metadata.
+
+
+ - HM_REVERSE boolean_number
+ - Defining this variable as 1 will reverse-sort
+ the article entries in the date and thread index files by the date
+ they were received. That is, the most recent messages will appear
+ at the top of the index rather than the other way around.
+
+
+ - HM_MHTMLHEADERFILE "path"
+ - Define path as the path to a file containing valid HTML
+ formatting statements that you wish to included at the top of every
+ message page. Hypermail will print this file as the header of the
+ message so make sure it contains <HTML>,
+ <HEAD>, and <BODY> and other statements that
+ suit your local customized needs.
+ See also ihtmlheaderfile,
+ ihtmlfooterfile, and
+ mhtmlfooterfile.
+
+
+ - HM_CONFIGFILE "filename"
+ - This is the default configuration file to read settings in
+ from. This can only be specified as an environment variable. If the
+ first character is "~", Hypermail will look for the file under the
+ current user's home directory.
+
+
+
+
+Order of Options Processing
+Settings are processed in this order:
+
+- From the program's hard-wired internal defaults (specified in
+defaults.h and setup.c),
+- From runtime environment variables,
+- From the configuration file,
+- From command-line options.
+
+
+
+Other Things
+
+Filenames
+
+In the specified directory, articles will be read out in the order
+that they were read in from a mailbox or standard input. Filenames
+start at zero and increase in this fashion: 0000.html, 0001.html, 0002.html,
+etc. In the same directory:
+
+
+ - date.html is the index of articles sorted by
+ the date they were received by the system's mail daemon.
+ - thread.html is the index of articles sorted by
+ thread first, then the date they were received.
+ - subject.html is the index of articles sorted
+ by subject. Any "Re:" prefixes in front of subjects will have been
+ stripped out.
+ - author.html is the index of articles sorted by
+ the first word of the author's name. If the author's name can't be
+ determined, their email address will be substituted.
+ - One of the above files will be called
+ index.html and is the default index that users can
+ go to when entering the archive.
+
+
+Sorting
+
+In the date and thread index files, note that these lists are sorted
+by the date the articles were received by the system's mail daemon,
+not by the date they were written on. The order of articles in the
+date index may not necessarily match the order in which the article
+files are written and linked together. Because of this, it is a good
+idea to make sure the mailbox is sorted by date with the most recent
+messages towards the bottom.
+
+Running Hypermail automatically
+
+The following are some tips on how to make hypermail archive incoming
+ messages on-the-fly.
+
+Sendmail and qmail aliases
+
+All that's needed to start archiving email
+messages is to set up Hypermail to do incremental updates in your
+/etc/aliases file (assuming that you use
+sendmail or something that works like it to
+deliver mail). Here's what an entry might look like (the last line
+is one unbroken line):
+
+#
+# WU-FTPD Mailing List Archives
+#
+wulist: "|/usr/local/bin/hypermail -i -u -d /wu-ftpd/mail-archive
+-l \"WU-FTPD Mailing List Archive\""
+
+After adding the entry, make sure newaliases is
+run to update the mail aliases. This entry will run Hypermail and
+ update/create the archive whenever a new message is received.
+
+ Because sendmail may run Hypermail as different users, you
+will want to make sure that archive directories and files are made
+readable and writeable by a trusted sendmail user (or read/writable
+by everyone if you can't do that) when they are created. This will
+ensure that there will be no problems incrementally updating the
+ archive.
+
+If you use qmail instead of sendmail, you probably want to
+create a file /var/qmail/alias/.qmail-<mylistemailaddress>
+containing something like this:
+|/usr/local/bin/hypermail -i -u -d
+ /wu-ftpd/mail-archive -l \"WU-FTPD Mailing List
+ Archive\"
+
+Smartlist / Procmail
+
+If you are using smartlist,
+ you can call hypermail automatically by enabling rc.local.s20 and
+ adding a filter. You may also use this filter in a procmail rule. Note that in both cases, we're relying on smartlist/procmail's locks insted of hypermail's:
+
+ :0 cw
+ | /usr/local/bin/hypermail -o uselock=0 -i -u -d
+ /wu-ftpd/mail-archive -l \"WU-FTPD Mailing List
+ Archive\"
+
+Other ways of automatizing hypermail
+
+On linux, cronjobs and inotify may be two other possibilities for running hypermail.
+
+
+
+Getting Hypermail Software
+
+Please visit The Hypermail Project github repository to
+download the latest stable version of Hypermail as well as follow its
+development.
+
+Hypermail is available free of charge under GNU Public License version 3 (GPLv3). Please read the LICENSES.txt file for licenses that cover libraries and some functions that are used by Hypermail.
+
+
+
+Getting Help With Hypermail
+
+We don't run any mailing lists anymore. We rely on github for reporting issues, feature requests, bug fixes, publishing releases, and tracking development.
+
+If you're interested in the past history of hypermail and design decisions, you can browse the hypermail developer's mailing list archives (mirror), covering the 1998-2010 activity period.
+
+
+
+Credits
+
+Hypermail was originally developed and designed by
+ Tom Gruber for Enterprise
+ Integration Technologies (EIT) in Common Lisp. It was later
+ rewritten in C by Kevin Hughes
+ while at EIT.
+
+ Hypermail is currently fostered by
+ José Kahan.
+
+ Please refer to the credits page for a list of
+ people who have contributed to the hypermail project.
+
+
+
+See Also
+hypermail(1),
+hmrc(4), Hypermail List Configuration File,
+Customizing Hypermail
+Pages, Adding
+a Search Engines to your Hypermail
+Archive
+
+
+Last updated May 24, 2023
+
+
+
diff --git a/docs/stars.png b/docs/stars.png
deleted file mode 100644
index 212902bb..00000000
Binary files a/docs/stars.png and /dev/null differ
diff --git a/docs/thanks.html b/docs/thanks.html
new file mode 100644
index 00000000..0bb05a35
--- /dev/null
+++ b/docs/thanks.html
@@ -0,0 +1,111 @@
+
+
+
+
+
+ Hypermail Credits Page
+
+
+
+
+
+
+
+
+ Thank You!
+
+
+
+ This project has been alive for many years. Countless people have provided
+ feedback that have improved hypermail.
+
+
+ Thanks to
+ Tom Gruber, who originally designed and developed Hypermail
+ in Common Lisp, for the basis of a GREAT
+ tool.
+
+ Thanks to Kevin Hughes for developing the initial C version of
+ Hypermail and assisting in its transition to the hypermail
+ project organization. Thanks Kevin!
+
+ Thanks to Kent Landfield for having started the hypermail
+ project organization, the first hypermail project web site,
+ leading the project 1997 to 2003, and encouraging people to
+ contribute their patches and ideas. The few years you spent on
+ hypermail really made the project evolve.
+
+ Thanks to Darci Chapman for encouraging Kent to incorporate his
+ initial "hacks" into the hypermail source code and for the
+ initial code clean up.
+
+ Many thanks to Daniel Stenberg for all the work he did for
+ adding support for MIME attachments and his trio library.
+
+ Thanks to Peter C. McCluskey for his code contributions, for
+ having curated hypermail from roughly 2003-2008 as well as
+ keeping hypermail project site
+ running for so long.
+
+ Thanks to Ashley M. Kirchner for having maintained the original
+ CVS server for hypermail and giving us access to the
+ repository for transitioning to sourceforge
+
+ The following people should be noted for their work and
+ contributions to Hypermail's development(alphabetic by last name or user handle).
+
+ If you have contributed but are missing here, please let us know!
+
+
+ - Tom von Alten
+ - Bob Crispen
+ - Baptiste Daroussin
+ - Byron C. Darrah
+ - Roy T. Fielding
+ - John Finlay
+ - Paul Haldane
+ - I. Ioannou
+ - José Kahan
+ - Fumihiro Kato
+ - David D. Kilzer
+ - Ashley M. Kirchner
+ - Dave Kopper
+ - Elliot Lee
+ - Daigo Matsubara
+ - Peter C. McCluskey
+ - Christof Meerwald
+ - Jared Reisinger
+ - James Riordon
+ - Scott Rose
+ - Martin Schulze
+ - Bill Shannon
+ - Jay Soffian
+ - Glen Stewart
+ - Craig A Summerhill
+ - Roy Tennant
+ - Andy Valencia
+
+
+ Last, but not least, a BIG THANKS! to the
+ past members of the (now defunct) Hypermail Development list (1998-2010)
+ and to the people who participate in the hypermail project
+ github repository for their encouragement, ideas, bug
+ fixes, and participation,
+
+ Thanks All!
+
+
+
+
+
+
+
diff --git a/lcc/config.h b/lcc/config.h
index 07fe111d..661c26c2 100644
--- a/lcc/config.h
+++ b/lcc/config.h
@@ -142,7 +142,7 @@
#define GDBM 1
/* PCRE (Perl regular expressions) */
-#define HAVE_PCRE 1
+#define HAVE_PCRE2 1
/* Whether you want function version of ctype functions */
#undef NO_MACRO
diff --git a/lcc/defaults.h b/lcc/defaults.h
index 33296ba9..933814a5 100644
--- a/lcc/defaults.h
+++ b/lcc/defaults.h
@@ -11,6 +11,8 @@
#define CONFIGFILE "~/.hmrc"
+#define MSG_FRAGMENT_PREFIX "msg"
+
#define INLINE_TYPES "image/gif image/jpeg image/png"
#define SHOW_HEADERS "From Subject Date Message-ID"
@@ -27,8 +29,28 @@
#define DEFAULTINDEX "@defaultindex@"
+#define DEFAULT_TOP_INDEX "folders"
+
#define DOMAINADDR "@domainaddr@"
#define ANTISPAM_AT "_at_"
+#define APPLE_MAIL_UA_HEADER "X-Mailer"
+
+#define APPLE_MAIL_UA "Apple iPhone iPad"
+
+#define DEFAULT_CHARSET "US-ASCII"
+
+#define HM_ANNOTATION_HEADER "X-Hypermail-Annotated"
+
+#define HM_DELETED_HEADERS "X-Hypermail-Deleted X-No-Archive"
+
+#define EXPIRES_HEADER "Expires"
+
+#define NEW_MSG_COMMAND "mailto:$TO"
+
+#define REPLYMSG_COMMAND "not set"
+
+#define DEFAULT_CSS_URL "hypermail.css"
+
#endif
diff --git a/lcc/pcre.h b/lcc/pcre.h
deleted file mode 100644
index a6aa4e93..00000000
--- a/lcc/pcre.h
+++ /dev/null
@@ -1,653 +0,0 @@
-/*************************************************
-* Perl-Compatible Regular Expressions *
-*************************************************/
-
-/* This is the public header file for the PCRE library, to be #included by
-applications that call the PCRE functions.
-
- Copyright (c) 1997-2012 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- * Neither the name of the University of Cambridge nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-#ifndef _PCRE_H
-#define _PCRE_H
-
-/* The current PCRE version information. */
-
-#define PCRE_MAJOR 8
-#define PCRE_MINOR 32
-#define PCRE_PRERELEASE
-#define PCRE_DATE 2012-11-30
-
-/* When an application links to a PCRE DLL in Windows, the symbols that are
-imported have to be identified as such. When building PCRE, the appropriate
-export setting is defined in pcre_internal.h, which includes this file. So we
-don't change existing definitions of PCRE_EXP_DECL and PCRECPP_EXP_DECL. */
-
-#if defined(_WIN32) && !defined(PCRE_STATIC)
-# ifndef PCRE_EXP_DECL
-# define PCRE_EXP_DECL extern __declspec(dllimport)
-# endif
-# ifdef __cplusplus
-# ifndef PCRECPP_EXP_DECL
-# define PCRECPP_EXP_DECL extern __declspec(dllimport)
-# endif
-# ifndef PCRECPP_EXP_DEFN
-# define PCRECPP_EXP_DEFN __declspec(dllimport)
-# endif
-# endif
-#endif
-
-/* By default, we use the standard "extern" declarations. */
-
-#ifndef PCRE_EXP_DECL
-# ifdef __cplusplus
-# define PCRE_EXP_DECL extern "C"
-# else
-# define PCRE_EXP_DECL extern
-# endif
-#endif
-
-#ifdef __cplusplus
-# ifndef PCRECPP_EXP_DECL
-# define PCRECPP_EXP_DECL extern
-# endif
-# ifndef PCRECPP_EXP_DEFN
-# define PCRECPP_EXP_DEFN
-# endif
-#endif
-
-/* Have to include stdlib.h in order to ensure that size_t is defined;
-it is needed here for malloc. */
-
-#include
-
-/* Allow for C++ users */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Public options. Some are compile-time only, some are run-time only, and some
-are both, so we keep them all distinct. However, almost all the bits in the
-options word are now used. In the long run, we may have to re-use some of the
-compile-time only bits for runtime options, or vice versa. Any of the
-compile-time options may be inspected during studying (and therefore JIT
-compiling).
-
-Some options for pcre_compile() change its behaviour but do not affect the
-behaviour of the execution functions. Other options are passed through to the
-execution functions and affect their behaviour, with or without affecting the
-behaviour of pcre_compile().
-
-Options that can be passed to pcre_compile() are tagged Cx below, with these
-variants:
-
-C1 Affects compile only
-C2 Does not affect compile; affects exec, dfa_exec
-C3 Affects compile, exec, dfa_exec
-C4 Affects compile, exec, dfa_exec, study
-C5 Affects compile, exec, study
-
-Options that can be set for pcre_exec() and/or pcre_dfa_exec() are flagged with
-E and D, respectively. They take precedence over C3, C4, and C5 settings passed
-from pcre_compile(). Those that are compatible with JIT execution are flagged
-with J. */
-
-#define PCRE_CASELESS 0x00000001 /* C1 */
-#define PCRE_MULTILINE 0x00000002 /* C1 */
-#define PCRE_DOTALL 0x00000004 /* C1 */
-#define PCRE_EXTENDED 0x00000008 /* C1 */
-#define PCRE_ANCHORED 0x00000010 /* C4 E D */
-#define PCRE_DOLLAR_ENDONLY 0x00000020 /* C2 */
-#define PCRE_EXTRA 0x00000040 /* C1 */
-#define PCRE_NOTBOL 0x00000080 /* E D J */
-#define PCRE_NOTEOL 0x00000100 /* E D J */
-#define PCRE_UNGREEDY 0x00000200 /* C1 */
-#define PCRE_NOTEMPTY 0x00000400 /* E D J */
-#define PCRE_UTF8 0x00000800 /* C4 ) */
-#define PCRE_UTF16 0x00000800 /* C4 ) Synonyms */
-#define PCRE_UTF32 0x00000800 /* C4 ) */
-#define PCRE_NO_AUTO_CAPTURE 0x00001000 /* C1 */
-#define PCRE_NO_UTF8_CHECK 0x00002000 /* C1 E D J ) */
-#define PCRE_NO_UTF16_CHECK 0x00002000 /* C1 E D J ) Synonyms */
-#define PCRE_NO_UTF32_CHECK 0x00002000 /* C1 E D J ) */
-#define PCRE_AUTO_CALLOUT 0x00004000 /* C1 */
-#define PCRE_PARTIAL_SOFT 0x00008000 /* E D J ) Synonyms */
-#define PCRE_PARTIAL 0x00008000 /* E D J ) */
-#define PCRE_DFA_SHORTEST 0x00010000 /* D */
-#define PCRE_DFA_RESTART 0x00020000 /* D */
-#define PCRE_FIRSTLINE 0x00040000 /* C3 */
-#define PCRE_DUPNAMES 0x00080000 /* C1 */
-#define PCRE_NEWLINE_CR 0x00100000 /* C3 E D */
-#define PCRE_NEWLINE_LF 0x00200000 /* C3 E D */
-#define PCRE_NEWLINE_CRLF 0x00300000 /* C3 E D */
-#define PCRE_NEWLINE_ANY 0x00400000 /* C3 E D */
-#define PCRE_NEWLINE_ANYCRLF 0x00500000 /* C3 E D */
-#define PCRE_BSR_ANYCRLF 0x00800000 /* C3 E D */
-#define PCRE_BSR_UNICODE 0x01000000 /* C3 E D */
-#define PCRE_JAVASCRIPT_COMPAT 0x02000000 /* C5 */
-#define PCRE_NO_START_OPTIMIZE 0x04000000 /* C2 E D ) Synonyms */
-#define PCRE_NO_START_OPTIMISE 0x04000000 /* C2 E D ) */
-#define PCRE_PARTIAL_HARD 0x08000000 /* E D J */
-#define PCRE_NOTEMPTY_ATSTART 0x10000000 /* E D J */
-#define PCRE_UCP 0x20000000 /* C3 */
-
-/* Exec-time and get/set-time error codes */
-
-#define PCRE_ERROR_NOMATCH (-1)
-#define PCRE_ERROR_NULL (-2)
-#define PCRE_ERROR_BADOPTION (-3)
-#define PCRE_ERROR_BADMAGIC (-4)
-#define PCRE_ERROR_UNKNOWN_OPCODE (-5)
-#define PCRE_ERROR_UNKNOWN_NODE (-5) /* For backward compatibility */
-#define PCRE_ERROR_NOMEMORY (-6)
-#define PCRE_ERROR_NOSUBSTRING (-7)
-#define PCRE_ERROR_MATCHLIMIT (-8)
-#define PCRE_ERROR_CALLOUT (-9) /* Never used by PCRE itself */
-#define PCRE_ERROR_BADUTF8 (-10) /* Same for 8/16/32 */
-#define PCRE_ERROR_BADUTF16 (-10) /* Same for 8/16/32 */
-#define PCRE_ERROR_BADUTF32 (-10) /* Same for 8/16/32 */
-#define PCRE_ERROR_BADUTF8_OFFSET (-11) /* Same for 8/16 */
-#define PCRE_ERROR_BADUTF16_OFFSET (-11) /* Same for 8/16 */
-#define PCRE_ERROR_PARTIAL (-12)
-#define PCRE_ERROR_BADPARTIAL (-13)
-#define PCRE_ERROR_INTERNAL (-14)
-#define PCRE_ERROR_BADCOUNT (-15)
-#define PCRE_ERROR_DFA_UITEM (-16)
-#define PCRE_ERROR_DFA_UCOND (-17)
-#define PCRE_ERROR_DFA_UMLIMIT (-18)
-#define PCRE_ERROR_DFA_WSSIZE (-19)
-#define PCRE_ERROR_DFA_RECURSE (-20)
-#define PCRE_ERROR_RECURSIONLIMIT (-21)
-#define PCRE_ERROR_NULLWSLIMIT (-22) /* No longer actually used */
-#define PCRE_ERROR_BADNEWLINE (-23)
-#define PCRE_ERROR_BADOFFSET (-24)
-#define PCRE_ERROR_SHORTUTF8 (-25)
-#define PCRE_ERROR_SHORTUTF16 (-25) /* Same for 8/16 */
-#define PCRE_ERROR_RECURSELOOP (-26)
-#define PCRE_ERROR_JIT_STACKLIMIT (-27)
-#define PCRE_ERROR_BADMODE (-28)
-#define PCRE_ERROR_BADENDIANNESS (-29)
-#define PCRE_ERROR_DFA_BADRESTART (-30)
-#define PCRE_ERROR_JIT_BADOPTION (-31)
-#define PCRE_ERROR_BADLENGTH (-32)
-
-/* Specific error codes for UTF-8 validity checks */
-
-#define PCRE_UTF8_ERR0 0
-#define PCRE_UTF8_ERR1 1
-#define PCRE_UTF8_ERR2 2
-#define PCRE_UTF8_ERR3 3
-#define PCRE_UTF8_ERR4 4
-#define PCRE_UTF8_ERR5 5
-#define PCRE_UTF8_ERR6 6
-#define PCRE_UTF8_ERR7 7
-#define PCRE_UTF8_ERR8 8
-#define PCRE_UTF8_ERR9 9
-#define PCRE_UTF8_ERR10 10
-#define PCRE_UTF8_ERR11 11
-#define PCRE_UTF8_ERR12 12
-#define PCRE_UTF8_ERR13 13
-#define PCRE_UTF8_ERR14 14
-#define PCRE_UTF8_ERR15 15
-#define PCRE_UTF8_ERR16 16
-#define PCRE_UTF8_ERR17 17
-#define PCRE_UTF8_ERR18 18
-#define PCRE_UTF8_ERR19 19
-#define PCRE_UTF8_ERR20 20
-#define PCRE_UTF8_ERR21 21
-#define PCRE_UTF8_ERR22 22
-
-/* Specific error codes for UTF-16 validity checks */
-
-#define PCRE_UTF16_ERR0 0
-#define PCRE_UTF16_ERR1 1
-#define PCRE_UTF16_ERR2 2
-#define PCRE_UTF16_ERR3 3
-#define PCRE_UTF16_ERR4 4
-
-/* Specific error codes for UTF-32 validity checks */
-
-#define PCRE_UTF32_ERR0 0
-#define PCRE_UTF32_ERR1 1
-#define PCRE_UTF32_ERR2 2
-#define PCRE_UTF32_ERR3 3
-
-/* Request types for pcre_fullinfo() */
-
-#define PCRE_INFO_OPTIONS 0
-#define PCRE_INFO_SIZE 1
-#define PCRE_INFO_CAPTURECOUNT 2
-#define PCRE_INFO_BACKREFMAX 3
-#define PCRE_INFO_FIRSTBYTE 4
-#define PCRE_INFO_FIRSTCHAR 4 /* For backwards compatibility */
-#define PCRE_INFO_FIRSTTABLE 5
-#define PCRE_INFO_LASTLITERAL 6
-#define PCRE_INFO_NAMEENTRYSIZE 7
-#define PCRE_INFO_NAMECOUNT 8
-#define PCRE_INFO_NAMETABLE 9
-#define PCRE_INFO_STUDYSIZE 10
-#define PCRE_INFO_DEFAULT_TABLES 11
-#define PCRE_INFO_OKPARTIAL 12
-#define PCRE_INFO_JCHANGED 13
-#define PCRE_INFO_HASCRORLF 14
-#define PCRE_INFO_MINLENGTH 15
-#define PCRE_INFO_JIT 16
-#define PCRE_INFO_JITSIZE 17
-#define PCRE_INFO_MAXLOOKBEHIND 18
-#define PCRE_INFO_FIRSTCHARACTER 19
-#define PCRE_INFO_FIRSTCHARACTERFLAGS 20
-#define PCRE_INFO_REQUIREDCHAR 21
-#define PCRE_INFO_REQUIREDCHARFLAGS 22
-
-/* Request types for pcre_config(). Do not re-arrange, in order to remain
-compatible. */
-
-#define PCRE_CONFIG_UTF8 0
-#define PCRE_CONFIG_NEWLINE 1
-#define PCRE_CONFIG_LINK_SIZE 2
-#define PCRE_CONFIG_POSIX_MALLOC_THRESHOLD 3
-#define PCRE_CONFIG_MATCH_LIMIT 4
-#define PCRE_CONFIG_STACKRECURSE 5
-#define PCRE_CONFIG_UNICODE_PROPERTIES 6
-#define PCRE_CONFIG_MATCH_LIMIT_RECURSION 7
-#define PCRE_CONFIG_BSR 8
-#define PCRE_CONFIG_JIT 9
-#define PCRE_CONFIG_UTF16 10
-#define PCRE_CONFIG_JITTARGET 11
-#define PCRE_CONFIG_UTF32 12
-
-/* Request types for pcre_study(). Do not re-arrange, in order to remain
-compatible. */
-
-#define PCRE_STUDY_JIT_COMPILE 0x0001
-#define PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE 0x0002
-#define PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE 0x0004
-#define PCRE_STUDY_EXTRA_NEEDED 0x0008
-
-/* Bit flags for the pcre[16|32]_extra structure. Do not re-arrange or redefine
-these bits, just add new ones on the end, in order to remain compatible. */
-
-#define PCRE_EXTRA_STUDY_DATA 0x0001
-#define PCRE_EXTRA_MATCH_LIMIT 0x0002
-#define PCRE_EXTRA_CALLOUT_DATA 0x0004
-#define PCRE_EXTRA_TABLES 0x0008
-#define PCRE_EXTRA_MATCH_LIMIT_RECURSION 0x0010
-#define PCRE_EXTRA_MARK 0x0020
-#define PCRE_EXTRA_EXECUTABLE_JIT 0x0040
-
-/* Types */
-
-struct real_pcre; /* declaration; the definition is private */
-typedef struct real_pcre pcre;
-
-struct real_pcre16; /* declaration; the definition is private */
-typedef struct real_pcre16 pcre16;
-
-struct real_pcre32; /* declaration; the definition is private */
-typedef struct real_pcre32 pcre32;
-
-struct real_pcre_jit_stack; /* declaration; the definition is private */
-typedef struct real_pcre_jit_stack pcre_jit_stack;
-
-struct real_pcre16_jit_stack; /* declaration; the definition is private */
-typedef struct real_pcre16_jit_stack pcre16_jit_stack;
-
-struct real_pcre32_jit_stack; /* declaration; the definition is private */
-typedef struct real_pcre32_jit_stack pcre32_jit_stack;
-
-/* If PCRE is compiled with 16 bit character support, PCRE_UCHAR16 must contain
-a 16 bit wide signed data type. Otherwise it can be a dummy data type since
-pcre16 functions are not implemented. There is a check for this in pcre_internal.h. */
-#ifndef PCRE_UCHAR16
-#define PCRE_UCHAR16 unsigned short
-#endif
-
-#ifndef PCRE_SPTR16
-#define PCRE_SPTR16 const PCRE_UCHAR16 *
-#endif
-
-/* If PCRE is compiled with 32 bit character support, PCRE_UCHAR32 must contain
-a 32 bit wide signed data type. Otherwise it can be a dummy data type since
-pcre32 functions are not implemented. There is a check for this in pcre_internal.h. */
-#ifndef PCRE_UCHAR32
-#define PCRE_UCHAR32 unsigned int
-#endif
-
-#ifndef PCRE_SPTR32
-#define PCRE_SPTR32 const PCRE_UCHAR32 *
-#endif
-
-/* When PCRE is compiled as a C++ library, the subject pointer type can be
-replaced with a custom type. For conventional use, the public interface is a
-const char *. */
-
-#ifndef PCRE_SPTR
-#define PCRE_SPTR const char *
-#endif
-
-/* The structure for passing additional data to pcre_exec(). This is defined in
-such as way as to be extensible. Always add new fields at the end, in order to
-remain compatible. */
-
-typedef struct pcre_extra {
- unsigned long int flags; /* Bits for which fields are set */
- void *study_data; /* Opaque data from pcre_study() */
- unsigned long int match_limit; /* Maximum number of calls to match() */
- void *callout_data; /* Data passed back in callouts */
- const unsigned char *tables; /* Pointer to character tables */
- unsigned long int match_limit_recursion; /* Max recursive calls to match() */
- unsigned char **mark; /* For passing back a mark pointer */
- void *executable_jit; /* Contains a pointer to a compiled jit code */
-} pcre_extra;
-
-/* Same structure as above, but with 16 bit char pointers. */
-
-typedef struct pcre16_extra {
- unsigned long int flags; /* Bits for which fields are set */
- void *study_data; /* Opaque data from pcre_study() */
- unsigned long int match_limit; /* Maximum number of calls to match() */
- void *callout_data; /* Data passed back in callouts */
- const unsigned char *tables; /* Pointer to character tables */
- unsigned long int match_limit_recursion; /* Max recursive calls to match() */
- PCRE_UCHAR16 **mark; /* For passing back a mark pointer */
- void *executable_jit; /* Contains a pointer to a compiled jit code */
-} pcre16_extra;
-
-/* Same structure as above, but with 32 bit char pointers. */
-
-typedef struct pcre32_extra {
- unsigned long int flags; /* Bits for which fields are set */
- void *study_data; /* Opaque data from pcre_study() */
- unsigned long int match_limit; /* Maximum number of calls to match() */
- void *callout_data; /* Data passed back in callouts */
- const unsigned char *tables; /* Pointer to character tables */
- unsigned long int match_limit_recursion; /* Max recursive calls to match() */
- PCRE_UCHAR32 **mark; /* For passing back a mark pointer */
- void *executable_jit; /* Contains a pointer to a compiled jit code */
-} pcre32_extra;
-
-/* The structure for passing out data via the pcre_callout_function. We use a
-structure so that new fields can be added on the end in future versions,
-without changing the API of the function, thereby allowing old clients to work
-without modification. */
-
-typedef struct pcre_callout_block {
- int version; /* Identifies version of block */
- /* ------------------------ Version 0 ------------------------------- */
- int callout_number; /* Number compiled into pattern */
- int *offset_vector; /* The offset vector */
- PCRE_SPTR subject; /* The subject being matched */
- int subject_length; /* The length of the subject */
- int start_match; /* Offset to start of this match attempt */
- int current_position; /* Where we currently are in the subject */
- int capture_top; /* Max current capture */
- int capture_last; /* Most recently closed capture */
- void *callout_data; /* Data passed in with the call */
- /* ------------------- Added for Version 1 -------------------------- */
- int pattern_position; /* Offset to next item in the pattern */
- int next_item_length; /* Length of next item in the pattern */
- /* ------------------- Added for Version 2 -------------------------- */
- const unsigned char *mark; /* Pointer to current mark or NULL */
- /* ------------------------------------------------------------------ */
-} pcre_callout_block;
-
-/* Same structure as above, but with 16 bit char pointers. */
-
-typedef struct pcre16_callout_block {
- int version; /* Identifies version of block */
- /* ------------------------ Version 0 ------------------------------- */
- int callout_number; /* Number compiled into pattern */
- int *offset_vector; /* The offset vector */
- PCRE_SPTR16 subject; /* The subject being matched */
- int subject_length; /* The length of the subject */
- int start_match; /* Offset to start of this match attempt */
- int current_position; /* Where we currently are in the subject */
- int capture_top; /* Max current capture */
- int capture_last; /* Most recently closed capture */
- void *callout_data; /* Data passed in with the call */
- /* ------------------- Added for Version 1 -------------------------- */
- int pattern_position; /* Offset to next item in the pattern */
- int next_item_length; /* Length of next item in the pattern */
- /* ------------------- Added for Version 2 -------------------------- */
- const PCRE_UCHAR16 *mark; /* Pointer to current mark or NULL */
- /* ------------------------------------------------------------------ */
-} pcre16_callout_block;
-
-/* Same structure as above, but with 32 bit char pointers. */
-
-typedef struct pcre32_callout_block {
- int version; /* Identifies version of block */
- /* ------------------------ Version 0 ------------------------------- */
- int callout_number; /* Number compiled into pattern */
- int *offset_vector; /* The offset vector */
- PCRE_SPTR32 subject; /* The subject being matched */
- int subject_length; /* The length of the subject */
- int start_match; /* Offset to start of this match attempt */
- int current_position; /* Where we currently are in the subject */
- int capture_top; /* Max current capture */
- int capture_last; /* Most recently closed capture */
- void *callout_data; /* Data passed in with the call */
- /* ------------------- Added for Version 1 -------------------------- */
- int pattern_position; /* Offset to next item in the pattern */
- int next_item_length; /* Length of next item in the pattern */
- /* ------------------- Added for Version 2 -------------------------- */
- const PCRE_UCHAR32 *mark; /* Pointer to current mark or NULL */
- /* ------------------------------------------------------------------ */
-} pcre32_callout_block;
-
-/* Indirection for store get and free functions. These can be set to
-alternative malloc/free functions if required. Special ones are used in the
-non-recursive case for "frames". There is also an optional callout function
-that is triggered by the (?) regex item. For Virtual Pascal, these definitions
-have to take another form. */
-
-#ifndef VPCOMPAT
-PCRE_EXP_DECL void *(*pcre_malloc)(size_t);
-PCRE_EXP_DECL void (*pcre_free)(void *);
-PCRE_EXP_DECL void *(*pcre_stack_malloc)(size_t);
-PCRE_EXP_DECL void (*pcre_stack_free)(void *);
-PCRE_EXP_DECL int (*pcre_callout)(pcre_callout_block *);
-
-PCRE_EXP_DECL void *(*pcre16_malloc)(size_t);
-PCRE_EXP_DECL void (*pcre16_free)(void *);
-PCRE_EXP_DECL void *(*pcre16_stack_malloc)(size_t);
-PCRE_EXP_DECL void (*pcre16_stack_free)(void *);
-PCRE_EXP_DECL int (*pcre16_callout)(pcre16_callout_block *);
-
-PCRE_EXP_DECL void *(*pcre32_malloc)(size_t);
-PCRE_EXP_DECL void (*pcre32_free)(void *);
-PCRE_EXP_DECL void *(*pcre32_stack_malloc)(size_t);
-PCRE_EXP_DECL void (*pcre32_stack_free)(void *);
-PCRE_EXP_DECL int (*pcre32_callout)(pcre32_callout_block *);
-#else /* VPCOMPAT */
-PCRE_EXP_DECL void *pcre_malloc(size_t);
-PCRE_EXP_DECL void pcre_free(void *);
-PCRE_EXP_DECL void *pcre_stack_malloc(size_t);
-PCRE_EXP_DECL void pcre_stack_free(void *);
-PCRE_EXP_DECL int pcre_callout(pcre_callout_block *);
-
-PCRE_EXP_DECL void *pcre16_malloc(size_t);
-PCRE_EXP_DECL void pcre16_free(void *);
-PCRE_EXP_DECL void *pcre16_stack_malloc(size_t);
-PCRE_EXP_DECL void pcre16_stack_free(void *);
-PCRE_EXP_DECL int pcre16_callout(pcre16_callout_block *);
-
-PCRE_EXP_DECL void *pcre32_malloc(size_t);
-PCRE_EXP_DECL void pcre32_free(void *);
-PCRE_EXP_DECL void *pcre32_stack_malloc(size_t);
-PCRE_EXP_DECL void pcre32_stack_free(void *);
-PCRE_EXP_DECL int pcre32_callout(pcre32_callout_block *);
-#endif /* VPCOMPAT */
-
-/* User defined callback which provides a stack just before the match starts. */
-
-typedef pcre_jit_stack *(*pcre_jit_callback)(void *);
-typedef pcre16_jit_stack *(*pcre16_jit_callback)(void *);
-typedef pcre32_jit_stack *(*pcre32_jit_callback)(void *);
-
-/* Exported PCRE functions */
-
-PCRE_EXP_DECL pcre *pcre_compile(const char *, int, const char **, int *,
- const unsigned char *);
-PCRE_EXP_DECL pcre16 *pcre16_compile(PCRE_SPTR16, int, const char **, int *,
- const unsigned char *);
-PCRE_EXP_DECL pcre32 *pcre32_compile(PCRE_SPTR32, int, const char **, int *,
- const unsigned char *);
-PCRE_EXP_DECL pcre *pcre_compile2(const char *, int, int *, const char **,
- int *, const unsigned char *);
-PCRE_EXP_DECL pcre16 *pcre16_compile2(PCRE_SPTR16, int, int *, const char **,
- int *, const unsigned char *);
-PCRE_EXP_DECL pcre32 *pcre32_compile2(PCRE_SPTR32, int, int *, const char **,
- int *, const unsigned char *);
-PCRE_EXP_DECL int pcre_config(int, void *);
-PCRE_EXP_DECL int pcre16_config(int, void *);
-PCRE_EXP_DECL int pcre32_config(int, void *);
-PCRE_EXP_DECL int pcre_copy_named_substring(const pcre *, const char *,
- int *, int, const char *, char *, int);
-PCRE_EXP_DECL int pcre16_copy_named_substring(const pcre16 *, PCRE_SPTR16,
- int *, int, PCRE_SPTR16, PCRE_UCHAR16 *, int);
-PCRE_EXP_DECL int pcre32_copy_named_substring(const pcre32 *, PCRE_SPTR32,
- int *, int, PCRE_SPTR32, PCRE_UCHAR32 *, int);
-PCRE_EXP_DECL int pcre_copy_substring(const char *, int *, int, int,
- char *, int);
-PCRE_EXP_DECL int pcre16_copy_substring(PCRE_SPTR16, int *, int, int,
- PCRE_UCHAR16 *, int);
-PCRE_EXP_DECL int pcre32_copy_substring(PCRE_SPTR32, int *, int, int,
- PCRE_UCHAR32 *, int);
-PCRE_EXP_DECL int pcre_dfa_exec(const pcre *, const pcre_extra *,
- const char *, int, int, int, int *, int , int *, int);
-PCRE_EXP_DECL int pcre16_dfa_exec(const pcre16 *, const pcre16_extra *,
- PCRE_SPTR16, int, int, int, int *, int , int *, int);
-PCRE_EXP_DECL int pcre32_dfa_exec(const pcre32 *, const pcre32_extra *,
- PCRE_SPTR32, int, int, int, int *, int , int *, int);
-PCRE_EXP_DECL int pcre_exec(const pcre *, const pcre_extra *, PCRE_SPTR,
- int, int, int, int *, int);
-PCRE_EXP_DECL int pcre16_exec(const pcre16 *, const pcre16_extra *,
- PCRE_SPTR16, int, int, int, int *, int);
-PCRE_EXP_DECL int pcre32_exec(const pcre32 *, const pcre32_extra *,
- PCRE_SPTR32, int, int, int, int *, int);
-PCRE_EXP_DECL int pcre_jit_exec(const pcre *, const pcre_extra *,
- PCRE_SPTR, int, int, int, int *, int,
- pcre_jit_stack *);
-PCRE_EXP_DECL int pcre16_jit_exec(const pcre16 *, const pcre16_extra *,
- PCRE_SPTR16, int, int, int, int *, int,
- pcre16_jit_stack *);
-PCRE_EXP_DECL int pcre32_jit_exec(const pcre32 *, const pcre32_extra *,
- PCRE_SPTR32, int, int, int, int *, int,
- pcre32_jit_stack *);
-PCRE_EXP_DECL void pcre_free_substring(const char *);
-PCRE_EXP_DECL void pcre16_free_substring(PCRE_SPTR16);
-PCRE_EXP_DECL void pcre32_free_substring(PCRE_SPTR32);
-PCRE_EXP_DECL void pcre_free_substring_list(const char **);
-PCRE_EXP_DECL void pcre16_free_substring_list(PCRE_SPTR16 *);
-PCRE_EXP_DECL void pcre32_free_substring_list(PCRE_SPTR32 *);
-PCRE_EXP_DECL int pcre_fullinfo(const pcre *, const pcre_extra *, int,
- void *);
-PCRE_EXP_DECL int pcre16_fullinfo(const pcre16 *, const pcre16_extra *, int,
- void *);
-PCRE_EXP_DECL int pcre32_fullinfo(const pcre32 *, const pcre32_extra *, int,
- void *);
-PCRE_EXP_DECL int pcre_get_named_substring(const pcre *, const char *,
- int *, int, const char *, const char **);
-PCRE_EXP_DECL int pcre16_get_named_substring(const pcre16 *, PCRE_SPTR16,
- int *, int, PCRE_SPTR16, PCRE_SPTR16 *);
-PCRE_EXP_DECL int pcre32_get_named_substring(const pcre32 *, PCRE_SPTR32,
- int *, int, PCRE_SPTR32, PCRE_SPTR32 *);
-PCRE_EXP_DECL int pcre_get_stringnumber(const pcre *, const char *);
-PCRE_EXP_DECL int pcre16_get_stringnumber(const pcre16 *, PCRE_SPTR16);
-PCRE_EXP_DECL int pcre32_get_stringnumber(const pcre32 *, PCRE_SPTR32);
-PCRE_EXP_DECL int pcre_get_stringtable_entries(const pcre *, const char *,
- char **, char **);
-PCRE_EXP_DECL int pcre16_get_stringtable_entries(const pcre16 *, PCRE_SPTR16,
- PCRE_UCHAR16 **, PCRE_UCHAR16 **);
-PCRE_EXP_DECL int pcre32_get_stringtable_entries(const pcre32 *, PCRE_SPTR32,
- PCRE_UCHAR32 **, PCRE_UCHAR32 **);
-PCRE_EXP_DECL int pcre_get_substring(const char *, int *, int, int,
- const char **);
-PCRE_EXP_DECL int pcre16_get_substring(PCRE_SPTR16, int *, int, int,
- PCRE_SPTR16 *);
-PCRE_EXP_DECL int pcre32_get_substring(PCRE_SPTR32, int *, int, int,
- PCRE_SPTR32 *);
-PCRE_EXP_DECL int pcre_get_substring_list(const char *, int *, int,
- const char ***);
-PCRE_EXP_DECL int pcre16_get_substring_list(PCRE_SPTR16, int *, int,
- PCRE_SPTR16 **);
-PCRE_EXP_DECL int pcre32_get_substring_list(PCRE_SPTR32, int *, int,
- PCRE_SPTR32 **);
-PCRE_EXP_DECL const unsigned char *pcre_maketables(void);
-PCRE_EXP_DECL const unsigned char *pcre16_maketables(void);
-PCRE_EXP_DECL const unsigned char *pcre32_maketables(void);
-PCRE_EXP_DECL int pcre_refcount(pcre *, int);
-PCRE_EXP_DECL int pcre16_refcount(pcre16 *, int);
-PCRE_EXP_DECL int pcre32_refcount(pcre32 *, int);
-PCRE_EXP_DECL pcre_extra *pcre_study(const pcre *, int, const char **);
-PCRE_EXP_DECL pcre16_extra *pcre16_study(const pcre16 *, int, const char **);
-PCRE_EXP_DECL pcre32_extra *pcre32_study(const pcre32 *, int, const char **);
-PCRE_EXP_DECL void pcre_free_study(pcre_extra *);
-PCRE_EXP_DECL void pcre16_free_study(pcre16_extra *);
-PCRE_EXP_DECL void pcre32_free_study(pcre32_extra *);
-PCRE_EXP_DECL const char *pcre_version(void);
-PCRE_EXP_DECL const char *pcre16_version(void);
-PCRE_EXP_DECL const char *pcre32_version(void);
-
-/* Utility functions for byte order swaps. */
-PCRE_EXP_DECL int pcre_pattern_to_host_byte_order(pcre *, pcre_extra *,
- const unsigned char *);
-PCRE_EXP_DECL int pcre16_pattern_to_host_byte_order(pcre16 *, pcre16_extra *,
- const unsigned char *);
-PCRE_EXP_DECL int pcre32_pattern_to_host_byte_order(pcre32 *, pcre32_extra *,
- const unsigned char *);
-PCRE_EXP_DECL int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *,
- PCRE_SPTR16, int, int *, int);
-PCRE_EXP_DECL int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *,
- PCRE_SPTR32, int, int *, int);
-
-/* JIT compiler related functions. */
-
-PCRE_EXP_DECL pcre_jit_stack *pcre_jit_stack_alloc(int, int);
-PCRE_EXP_DECL pcre16_jit_stack *pcre16_jit_stack_alloc(int, int);
-PCRE_EXP_DECL pcre32_jit_stack *pcre32_jit_stack_alloc(int, int);
-PCRE_EXP_DECL void pcre_jit_stack_free(pcre_jit_stack *);
-PCRE_EXP_DECL void pcre16_jit_stack_free(pcre16_jit_stack *);
-PCRE_EXP_DECL void pcre32_jit_stack_free(pcre32_jit_stack *);
-PCRE_EXP_DECL void pcre_assign_jit_stack(pcre_extra *,
- pcre_jit_callback, void *);
-PCRE_EXP_DECL void pcre16_assign_jit_stack(pcre16_extra *,
- pcre16_jit_callback, void *);
-PCRE_EXP_DECL void pcre32_assign_jit_stack(pcre32_extra *,
- pcre32_jit_callback, void *);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* End of pcre.h */
diff --git a/lcc/pcre2.h b/lcc/pcre2.h
new file mode 100644
index 00000000..7ab6b39a
--- /dev/null
+++ b/lcc/pcre2.h
@@ -0,0 +1,991 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* This is the public header file for the PCRE library, second API, to be
+#included by applications that call PCRE2 functions.
+
+ Copyright (c) 2016-2020 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+#ifndef PCRE2_H_IDEMPOTENT_GUARD
+#define PCRE2_H_IDEMPOTENT_GUARD
+
+/* The current PCRE version information. */
+
+#define PCRE2_MAJOR 10
+#define PCRE2_MINOR 37
+#define PCRE2_PRERELEASE
+#define PCRE2_DATE 2021-05-26
+
+/* When an application links to a PCRE DLL in Windows, the symbols that are
+imported have to be identified as such. When building PCRE2, the appropriate
+export setting is defined in pcre2_internal.h, which includes this file. So we
+don't change existing definitions of PCRE2_EXP_DECL. */
+
+#if defined(_WIN32) && !defined(PCRE2_STATIC)
+# ifndef PCRE2_EXP_DECL
+# define PCRE2_EXP_DECL extern __declspec(dllimport)
+# endif
+#endif
+
+/* By default, we use the standard "extern" declarations. */
+
+#ifndef PCRE2_EXP_DECL
+# ifdef __cplusplus
+# define PCRE2_EXP_DECL extern "C"
+# else
+# define PCRE2_EXP_DECL extern
+# endif
+#endif
+
+/* When compiling with the MSVC compiler, it is sometimes necessary to include
+a "calling convention" before exported function names. (This is secondhand
+information; I know nothing about MSVC myself). For example, something like
+
+ void __cdecl function(....)
+
+might be needed. In order so make this easy, all the exported functions have
+PCRE2_CALL_CONVENTION just before their names. It is rarely needed; if not
+set, we ensure here that it has no effect. */
+
+#ifndef PCRE2_CALL_CONVENTION
+#define PCRE2_CALL_CONVENTION
+#endif
+
+/* Have to include limits.h, stdlib.h, and inttypes.h to ensure that size_t and
+uint8_t, UCHAR_MAX, etc are defined. Some systems that do have inttypes.h do
+not have stdint.h, which is why we use inttypes.h, which according to the C
+standard is a superset of stdint.h. If none of these headers are available,
+the relevant values must be provided by some other means. */
+
+#include
+#include
+#include
+
+/* Allow for C++ users compiling this directly. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* The following option bits can be passed to pcre2_compile(), pcre2_match(),
+or pcre2_dfa_match(). PCRE2_NO_UTF_CHECK affects only the function to which it
+is passed. Put these bits at the most significant end of the options word so
+others can be added next to them */
+
+#define PCRE2_ANCHORED 0x80000000u
+#define PCRE2_NO_UTF_CHECK 0x40000000u
+#define PCRE2_ENDANCHORED 0x20000000u
+
+/* The following option bits can be passed only to pcre2_compile(). However,
+they may affect compilation, JIT compilation, and/or interpretive execution.
+The following tags indicate which:
+
+C alters what is compiled by pcre2_compile()
+J alters what is compiled by pcre2_jit_compile()
+M is inspected during pcre2_match() execution
+D is inspected during pcre2_dfa_match() execution
+*/
+
+#define PCRE2_ALLOW_EMPTY_CLASS 0x00000001u /* C */
+#define PCRE2_ALT_BSUX 0x00000002u /* C */
+#define PCRE2_AUTO_CALLOUT 0x00000004u /* C */
+#define PCRE2_CASELESS 0x00000008u /* C */
+#define PCRE2_DOLLAR_ENDONLY 0x00000010u /* J M D */
+#define PCRE2_DOTALL 0x00000020u /* C */
+#define PCRE2_DUPNAMES 0x00000040u /* C */
+#define PCRE2_EXTENDED 0x00000080u /* C */
+#define PCRE2_FIRSTLINE 0x00000100u /* J M D */
+#define PCRE2_MATCH_UNSET_BACKREF 0x00000200u /* C J M */
+#define PCRE2_MULTILINE 0x00000400u /* C */
+#define PCRE2_NEVER_UCP 0x00000800u /* C */
+#define PCRE2_NEVER_UTF 0x00001000u /* C */
+#define PCRE2_NO_AUTO_CAPTURE 0x00002000u /* C */
+#define PCRE2_NO_AUTO_POSSESS 0x00004000u /* C */
+#define PCRE2_NO_DOTSTAR_ANCHOR 0x00008000u /* C */
+#define PCRE2_NO_START_OPTIMIZE 0x00010000u /* J M D */
+#define PCRE2_UCP 0x00020000u /* C J M D */
+#define PCRE2_UNGREEDY 0x00040000u /* C */
+#define PCRE2_UTF 0x00080000u /* C J M D */
+#define PCRE2_NEVER_BACKSLASH_C 0x00100000u /* C */
+#define PCRE2_ALT_CIRCUMFLEX 0x00200000u /* J M D */
+#define PCRE2_ALT_VERBNAMES 0x00400000u /* C */
+#define PCRE2_USE_OFFSET_LIMIT 0x00800000u /* J M D */
+#define PCRE2_EXTENDED_MORE 0x01000000u /* C */
+#define PCRE2_LITERAL 0x02000000u /* C */
+#define PCRE2_MATCH_INVALID_UTF 0x04000000u /* J M D */
+
+/* An additional compile options word is available in the compile context. */
+
+#define PCRE2_EXTRA_ALLOW_SURROGATE_ESCAPES 0x00000001u /* C */
+#define PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL 0x00000002u /* C */
+#define PCRE2_EXTRA_MATCH_WORD 0x00000004u /* C */
+#define PCRE2_EXTRA_MATCH_LINE 0x00000008u /* C */
+#define PCRE2_EXTRA_ESCAPED_CR_IS_LF 0x00000010u /* C */
+#define PCRE2_EXTRA_ALT_BSUX 0x00000020u /* C */
+
+/* These are for pcre2_jit_compile(). */
+
+#define PCRE2_JIT_COMPLETE 0x00000001u /* For full matching */
+#define PCRE2_JIT_PARTIAL_SOFT 0x00000002u
+#define PCRE2_JIT_PARTIAL_HARD 0x00000004u
+#define PCRE2_JIT_INVALID_UTF 0x00000100u
+
+/* These are for pcre2_match(), pcre2_dfa_match(), pcre2_jit_match(), and
+pcre2_substitute(). Some are allowed only for one of the functions, and in
+these cases it is noted below. Note that PCRE2_ANCHORED, PCRE2_ENDANCHORED and
+PCRE2_NO_UTF_CHECK can also be passed to these functions (though
+pcre2_jit_match() ignores the latter since it bypasses all sanity checks). */
+
+#define PCRE2_NOTBOL 0x00000001u
+#define PCRE2_NOTEOL 0x00000002u
+#define PCRE2_NOTEMPTY 0x00000004u /* ) These two must be kept */
+#define PCRE2_NOTEMPTY_ATSTART 0x00000008u /* ) adjacent to each other. */
+#define PCRE2_PARTIAL_SOFT 0x00000010u
+#define PCRE2_PARTIAL_HARD 0x00000020u
+#define PCRE2_DFA_RESTART 0x00000040u /* pcre2_dfa_match() only */
+#define PCRE2_DFA_SHORTEST 0x00000080u /* pcre2_dfa_match() only */
+#define PCRE2_SUBSTITUTE_GLOBAL 0x00000100u /* pcre2_substitute() only */
+#define PCRE2_SUBSTITUTE_EXTENDED 0x00000200u /* pcre2_substitute() only */
+#define PCRE2_SUBSTITUTE_UNSET_EMPTY 0x00000400u /* pcre2_substitute() only */
+#define PCRE2_SUBSTITUTE_UNKNOWN_UNSET 0x00000800u /* pcre2_substitute() only */
+#define PCRE2_SUBSTITUTE_OVERFLOW_LENGTH 0x00001000u /* pcre2_substitute() only */
+#define PCRE2_NO_JIT 0x00002000u /* Not for pcre2_dfa_match() */
+#define PCRE2_COPY_MATCHED_SUBJECT 0x00004000u
+#define PCRE2_SUBSTITUTE_LITERAL 0x00008000u /* pcre2_substitute() only */
+#define PCRE2_SUBSTITUTE_MATCHED 0x00010000u /* pcre2_substitute() only */
+#define PCRE2_SUBSTITUTE_REPLACEMENT_ONLY 0x00020000u /* pcre2_substitute() only */
+
+/* Options for pcre2_pattern_convert(). */
+
+#define PCRE2_CONVERT_UTF 0x00000001u
+#define PCRE2_CONVERT_NO_UTF_CHECK 0x00000002u
+#define PCRE2_CONVERT_POSIX_BASIC 0x00000004u
+#define PCRE2_CONVERT_POSIX_EXTENDED 0x00000008u
+#define PCRE2_CONVERT_GLOB 0x00000010u
+#define PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR 0x00000030u
+#define PCRE2_CONVERT_GLOB_NO_STARSTAR 0x00000050u
+
+/* Newline and \R settings, for use in compile contexts. The newline values
+must be kept in step with values set in config.h and both sets must all be
+greater than zero. */
+
+#define PCRE2_NEWLINE_CR 1
+#define PCRE2_NEWLINE_LF 2
+#define PCRE2_NEWLINE_CRLF 3
+#define PCRE2_NEWLINE_ANY 4
+#define PCRE2_NEWLINE_ANYCRLF 5
+#define PCRE2_NEWLINE_NUL 6
+
+#define PCRE2_BSR_UNICODE 1
+#define PCRE2_BSR_ANYCRLF 2
+
+/* Error codes for pcre2_compile(). Some of these are also used by
+pcre2_pattern_convert(). */
+
+#define PCRE2_ERROR_END_BACKSLASH 101
+#define PCRE2_ERROR_END_BACKSLASH_C 102
+#define PCRE2_ERROR_UNKNOWN_ESCAPE 103
+#define PCRE2_ERROR_QUANTIFIER_OUT_OF_ORDER 104
+#define PCRE2_ERROR_QUANTIFIER_TOO_BIG 105
+#define PCRE2_ERROR_MISSING_SQUARE_BRACKET 106
+#define PCRE2_ERROR_ESCAPE_INVALID_IN_CLASS 107
+#define PCRE2_ERROR_CLASS_RANGE_ORDER 108
+#define PCRE2_ERROR_QUANTIFIER_INVALID 109
+#define PCRE2_ERROR_INTERNAL_UNEXPECTED_REPEAT 110
+#define PCRE2_ERROR_INVALID_AFTER_PARENS_QUERY 111
+#define PCRE2_ERROR_POSIX_CLASS_NOT_IN_CLASS 112
+#define PCRE2_ERROR_POSIX_NO_SUPPORT_COLLATING 113
+#define PCRE2_ERROR_MISSING_CLOSING_PARENTHESIS 114
+#define PCRE2_ERROR_BAD_SUBPATTERN_REFERENCE 115
+#define PCRE2_ERROR_NULL_PATTERN 116
+#define PCRE2_ERROR_BAD_OPTIONS 117
+#define PCRE2_ERROR_MISSING_COMMENT_CLOSING 118
+#define PCRE2_ERROR_PARENTHESES_NEST_TOO_DEEP 119
+#define PCRE2_ERROR_PATTERN_TOO_LARGE 120
+#define PCRE2_ERROR_HEAP_FAILED 121
+#define PCRE2_ERROR_UNMATCHED_CLOSING_PARENTHESIS 122
+#define PCRE2_ERROR_INTERNAL_CODE_OVERFLOW 123
+#define PCRE2_ERROR_MISSING_CONDITION_CLOSING 124
+#define PCRE2_ERROR_LOOKBEHIND_NOT_FIXED_LENGTH 125
+#define PCRE2_ERROR_ZERO_RELATIVE_REFERENCE 126
+#define PCRE2_ERROR_TOO_MANY_CONDITION_BRANCHES 127
+#define PCRE2_ERROR_CONDITION_ASSERTION_EXPECTED 128
+#define PCRE2_ERROR_BAD_RELATIVE_REFERENCE 129
+#define PCRE2_ERROR_UNKNOWN_POSIX_CLASS 130
+#define PCRE2_ERROR_INTERNAL_STUDY_ERROR 131
+#define PCRE2_ERROR_UNICODE_NOT_SUPPORTED 132
+#define PCRE2_ERROR_PARENTHESES_STACK_CHECK 133
+#define PCRE2_ERROR_CODE_POINT_TOO_BIG 134
+#define PCRE2_ERROR_LOOKBEHIND_TOO_COMPLICATED 135
+#define PCRE2_ERROR_LOOKBEHIND_INVALID_BACKSLASH_C 136
+#define PCRE2_ERROR_UNSUPPORTED_ESCAPE_SEQUENCE 137
+#define PCRE2_ERROR_CALLOUT_NUMBER_TOO_BIG 138
+#define PCRE2_ERROR_MISSING_CALLOUT_CLOSING 139
+#define PCRE2_ERROR_ESCAPE_INVALID_IN_VERB 140
+#define PCRE2_ERROR_UNRECOGNIZED_AFTER_QUERY_P 141
+#define PCRE2_ERROR_MISSING_NAME_TERMINATOR 142
+#define PCRE2_ERROR_DUPLICATE_SUBPATTERN_NAME 143
+#define PCRE2_ERROR_INVALID_SUBPATTERN_NAME 144
+#define PCRE2_ERROR_UNICODE_PROPERTIES_UNAVAILABLE 145
+#define PCRE2_ERROR_MALFORMED_UNICODE_PROPERTY 146
+#define PCRE2_ERROR_UNKNOWN_UNICODE_PROPERTY 147
+#define PCRE2_ERROR_SUBPATTERN_NAME_TOO_LONG 148
+#define PCRE2_ERROR_TOO_MANY_NAMED_SUBPATTERNS 149
+#define PCRE2_ERROR_CLASS_INVALID_RANGE 150
+#define PCRE2_ERROR_OCTAL_BYTE_TOO_BIG 151
+#define PCRE2_ERROR_INTERNAL_OVERRAN_WORKSPACE 152
+#define PCRE2_ERROR_INTERNAL_MISSING_SUBPATTERN 153
+#define PCRE2_ERROR_DEFINE_TOO_MANY_BRANCHES 154
+#define PCRE2_ERROR_BACKSLASH_O_MISSING_BRACE 155
+#define PCRE2_ERROR_INTERNAL_UNKNOWN_NEWLINE 156
+#define PCRE2_ERROR_BACKSLASH_G_SYNTAX 157
+#define PCRE2_ERROR_PARENS_QUERY_R_MISSING_CLOSING 158
+/* Error 159 is obsolete and should now never occur */
+#define PCRE2_ERROR_VERB_ARGUMENT_NOT_ALLOWED 159
+#define PCRE2_ERROR_VERB_UNKNOWN 160
+#define PCRE2_ERROR_SUBPATTERN_NUMBER_TOO_BIG 161
+#define PCRE2_ERROR_SUBPATTERN_NAME_EXPECTED 162
+#define PCRE2_ERROR_INTERNAL_PARSED_OVERFLOW 163
+#define PCRE2_ERROR_INVALID_OCTAL 164
+#define PCRE2_ERROR_SUBPATTERN_NAMES_MISMATCH 165
+#define PCRE2_ERROR_MARK_MISSING_ARGUMENT 166
+#define PCRE2_ERROR_INVALID_HEXADECIMAL 167
+#define PCRE2_ERROR_BACKSLASH_C_SYNTAX 168
+#define PCRE2_ERROR_BACKSLASH_K_SYNTAX 169
+#define PCRE2_ERROR_INTERNAL_BAD_CODE_LOOKBEHINDS 170
+#define PCRE2_ERROR_BACKSLASH_N_IN_CLASS 171
+#define PCRE2_ERROR_CALLOUT_STRING_TOO_LONG 172
+#define PCRE2_ERROR_UNICODE_DISALLOWED_CODE_POINT 173
+#define PCRE2_ERROR_UTF_IS_DISABLED 174
+#define PCRE2_ERROR_UCP_IS_DISABLED 175
+#define PCRE2_ERROR_VERB_NAME_TOO_LONG 176
+#define PCRE2_ERROR_BACKSLASH_U_CODE_POINT_TOO_BIG 177
+#define PCRE2_ERROR_MISSING_OCTAL_OR_HEX_DIGITS 178
+#define PCRE2_ERROR_VERSION_CONDITION_SYNTAX 179
+#define PCRE2_ERROR_INTERNAL_BAD_CODE_AUTO_POSSESS 180
+#define PCRE2_ERROR_CALLOUT_NO_STRING_DELIMITER 181
+#define PCRE2_ERROR_CALLOUT_BAD_STRING_DELIMITER 182
+#define PCRE2_ERROR_BACKSLASH_C_CALLER_DISABLED 183
+#define PCRE2_ERROR_QUERY_BARJX_NEST_TOO_DEEP 184
+#define PCRE2_ERROR_BACKSLASH_C_LIBRARY_DISABLED 185
+#define PCRE2_ERROR_PATTERN_TOO_COMPLICATED 186
+#define PCRE2_ERROR_LOOKBEHIND_TOO_LONG 187
+#define PCRE2_ERROR_PATTERN_STRING_TOO_LONG 188
+#define PCRE2_ERROR_INTERNAL_BAD_CODE 189
+#define PCRE2_ERROR_INTERNAL_BAD_CODE_IN_SKIP 190
+#define PCRE2_ERROR_NO_SURROGATES_IN_UTF16 191
+#define PCRE2_ERROR_BAD_LITERAL_OPTIONS 192
+#define PCRE2_ERROR_SUPPORTED_ONLY_IN_UNICODE 193
+#define PCRE2_ERROR_INVALID_HYPHEN_IN_OPTIONS 194
+#define PCRE2_ERROR_ALPHA_ASSERTION_UNKNOWN 195
+#define PCRE2_ERROR_SCRIPT_RUN_NOT_AVAILABLE 196
+#define PCRE2_ERROR_TOO_MANY_CAPTURES 197
+#define PCRE2_ERROR_CONDITION_ATOMIC_ASSERTION_EXPECTED 198
+
+
+/* "Expected" matching error codes: no match and partial match. */
+
+#define PCRE2_ERROR_NOMATCH (-1)
+#define PCRE2_ERROR_PARTIAL (-2)
+
+/* Error codes for UTF-8 validity checks */
+
+#define PCRE2_ERROR_UTF8_ERR1 (-3)
+#define PCRE2_ERROR_UTF8_ERR2 (-4)
+#define PCRE2_ERROR_UTF8_ERR3 (-5)
+#define PCRE2_ERROR_UTF8_ERR4 (-6)
+#define PCRE2_ERROR_UTF8_ERR5 (-7)
+#define PCRE2_ERROR_UTF8_ERR6 (-8)
+#define PCRE2_ERROR_UTF8_ERR7 (-9)
+#define PCRE2_ERROR_UTF8_ERR8 (-10)
+#define PCRE2_ERROR_UTF8_ERR9 (-11)
+#define PCRE2_ERROR_UTF8_ERR10 (-12)
+#define PCRE2_ERROR_UTF8_ERR11 (-13)
+#define PCRE2_ERROR_UTF8_ERR12 (-14)
+#define PCRE2_ERROR_UTF8_ERR13 (-15)
+#define PCRE2_ERROR_UTF8_ERR14 (-16)
+#define PCRE2_ERROR_UTF8_ERR15 (-17)
+#define PCRE2_ERROR_UTF8_ERR16 (-18)
+#define PCRE2_ERROR_UTF8_ERR17 (-19)
+#define PCRE2_ERROR_UTF8_ERR18 (-20)
+#define PCRE2_ERROR_UTF8_ERR19 (-21)
+#define PCRE2_ERROR_UTF8_ERR20 (-22)
+#define PCRE2_ERROR_UTF8_ERR21 (-23)
+
+/* Error codes for UTF-16 validity checks */
+
+#define PCRE2_ERROR_UTF16_ERR1 (-24)
+#define PCRE2_ERROR_UTF16_ERR2 (-25)
+#define PCRE2_ERROR_UTF16_ERR3 (-26)
+
+/* Error codes for UTF-32 validity checks */
+
+#define PCRE2_ERROR_UTF32_ERR1 (-27)
+#define PCRE2_ERROR_UTF32_ERR2 (-28)
+
+/* Miscellaneous error codes for pcre2[_dfa]_match(), substring extraction
+functions, context functions, and serializing functions. They are in numerical
+order. Originally they were in alphabetical order too, but now that PCRE2 is
+released, the numbers must not be changed. */
+
+#define PCRE2_ERROR_BADDATA (-29)
+#define PCRE2_ERROR_MIXEDTABLES (-30) /* Name was changed */
+#define PCRE2_ERROR_BADMAGIC (-31)
+#define PCRE2_ERROR_BADMODE (-32)
+#define PCRE2_ERROR_BADOFFSET (-33)
+#define PCRE2_ERROR_BADOPTION (-34)
+#define PCRE2_ERROR_BADREPLACEMENT (-35)
+#define PCRE2_ERROR_BADUTFOFFSET (-36)
+#define PCRE2_ERROR_CALLOUT (-37) /* Never used by PCRE2 itself */
+#define PCRE2_ERROR_DFA_BADRESTART (-38)
+#define PCRE2_ERROR_DFA_RECURSE (-39)
+#define PCRE2_ERROR_DFA_UCOND (-40)
+#define PCRE2_ERROR_DFA_UFUNC (-41)
+#define PCRE2_ERROR_DFA_UITEM (-42)
+#define PCRE2_ERROR_DFA_WSSIZE (-43)
+#define PCRE2_ERROR_INTERNAL (-44)
+#define PCRE2_ERROR_JIT_BADOPTION (-45)
+#define PCRE2_ERROR_JIT_STACKLIMIT (-46)
+#define PCRE2_ERROR_MATCHLIMIT (-47)
+#define PCRE2_ERROR_NOMEMORY (-48)
+#define PCRE2_ERROR_NOSUBSTRING (-49)
+#define PCRE2_ERROR_NOUNIQUESUBSTRING (-50)
+#define PCRE2_ERROR_NULL (-51)
+#define PCRE2_ERROR_RECURSELOOP (-52)
+#define PCRE2_ERROR_DEPTHLIMIT (-53)
+#define PCRE2_ERROR_RECURSIONLIMIT (-53) /* Obsolete synonym */
+#define PCRE2_ERROR_UNAVAILABLE (-54)
+#define PCRE2_ERROR_UNSET (-55)
+#define PCRE2_ERROR_BADOFFSETLIMIT (-56)
+#define PCRE2_ERROR_BADREPESCAPE (-57)
+#define PCRE2_ERROR_REPMISSINGBRACE (-58)
+#define PCRE2_ERROR_BADSUBSTITUTION (-59)
+#define PCRE2_ERROR_BADSUBSPATTERN (-60)
+#define PCRE2_ERROR_TOOMANYREPLACE (-61)
+#define PCRE2_ERROR_BADSERIALIZEDDATA (-62)
+#define PCRE2_ERROR_HEAPLIMIT (-63)
+#define PCRE2_ERROR_CONVERT_SYNTAX (-64)
+#define PCRE2_ERROR_INTERNAL_DUPMATCH (-65)
+#define PCRE2_ERROR_DFA_UINVALID_UTF (-66)
+
+
+/* Request types for pcre2_pattern_info() */
+
+#define PCRE2_INFO_ALLOPTIONS 0
+#define PCRE2_INFO_ARGOPTIONS 1
+#define PCRE2_INFO_BACKREFMAX 2
+#define PCRE2_INFO_BSR 3
+#define PCRE2_INFO_CAPTURECOUNT 4
+#define PCRE2_INFO_FIRSTCODEUNIT 5
+#define PCRE2_INFO_FIRSTCODETYPE 6
+#define PCRE2_INFO_FIRSTBITMAP 7
+#define PCRE2_INFO_HASCRORLF 8
+#define PCRE2_INFO_JCHANGED 9
+#define PCRE2_INFO_JITSIZE 10
+#define PCRE2_INFO_LASTCODEUNIT 11
+#define PCRE2_INFO_LASTCODETYPE 12
+#define PCRE2_INFO_MATCHEMPTY 13
+#define PCRE2_INFO_MATCHLIMIT 14
+#define PCRE2_INFO_MAXLOOKBEHIND 15
+#define PCRE2_INFO_MINLENGTH 16
+#define PCRE2_INFO_NAMECOUNT 17
+#define PCRE2_INFO_NAMEENTRYSIZE 18
+#define PCRE2_INFO_NAMETABLE 19
+#define PCRE2_INFO_NEWLINE 20
+#define PCRE2_INFO_DEPTHLIMIT 21
+#define PCRE2_INFO_RECURSIONLIMIT 21 /* Obsolete synonym */
+#define PCRE2_INFO_SIZE 22
+#define PCRE2_INFO_HASBACKSLASHC 23
+#define PCRE2_INFO_FRAMESIZE 24
+#define PCRE2_INFO_HEAPLIMIT 25
+#define PCRE2_INFO_EXTRAOPTIONS 26
+
+/* Request types for pcre2_config(). */
+
+#define PCRE2_CONFIG_BSR 0
+#define PCRE2_CONFIG_JIT 1
+#define PCRE2_CONFIG_JITTARGET 2
+#define PCRE2_CONFIG_LINKSIZE 3
+#define PCRE2_CONFIG_MATCHLIMIT 4
+#define PCRE2_CONFIG_NEWLINE 5
+#define PCRE2_CONFIG_PARENSLIMIT 6
+#define PCRE2_CONFIG_DEPTHLIMIT 7
+#define PCRE2_CONFIG_RECURSIONLIMIT 7 /* Obsolete synonym */
+#define PCRE2_CONFIG_STACKRECURSE 8 /* Obsolete */
+#define PCRE2_CONFIG_UNICODE 9
+#define PCRE2_CONFIG_UNICODE_VERSION 10
+#define PCRE2_CONFIG_VERSION 11
+#define PCRE2_CONFIG_HEAPLIMIT 12
+#define PCRE2_CONFIG_NEVER_BACKSLASH_C 13
+#define PCRE2_CONFIG_COMPILED_WIDTHS 14
+#define PCRE2_CONFIG_TABLES_LENGTH 15
+
+
+/* Types for code units in patterns and subject strings. */
+
+typedef uint8_t PCRE2_UCHAR8;
+typedef uint16_t PCRE2_UCHAR16;
+typedef uint32_t PCRE2_UCHAR32;
+
+typedef const PCRE2_UCHAR8 *PCRE2_SPTR8;
+typedef const PCRE2_UCHAR16 *PCRE2_SPTR16;
+typedef const PCRE2_UCHAR32 *PCRE2_SPTR32;
+
+/* The PCRE2_SIZE type is used for all string lengths and offsets in PCRE2,
+including pattern offsets for errors and subject offsets after a match. We
+define special values to indicate zero-terminated strings and unset offsets in
+the offset vector (ovector). */
+
+#define PCRE2_SIZE size_t
+#define PCRE2_SIZE_MAX SIZE_MAX
+#define PCRE2_ZERO_TERMINATED (~(PCRE2_SIZE)0)
+#define PCRE2_UNSET (~(PCRE2_SIZE)0)
+
+/* Generic types for opaque structures and JIT callback functions. These
+declarations are defined in a macro that is expanded for each width later. */
+
+#define PCRE2_TYPES_LIST \
+struct pcre2_real_general_context; \
+typedef struct pcre2_real_general_context pcre2_general_context; \
+\
+struct pcre2_real_compile_context; \
+typedef struct pcre2_real_compile_context pcre2_compile_context; \
+\
+struct pcre2_real_match_context; \
+typedef struct pcre2_real_match_context pcre2_match_context; \
+\
+struct pcre2_real_convert_context; \
+typedef struct pcre2_real_convert_context pcre2_convert_context; \
+\
+struct pcre2_real_code; \
+typedef struct pcre2_real_code pcre2_code; \
+\
+struct pcre2_real_match_data; \
+typedef struct pcre2_real_match_data pcre2_match_data; \
+\
+struct pcre2_real_jit_stack; \
+typedef struct pcre2_real_jit_stack pcre2_jit_stack; \
+\
+typedef pcre2_jit_stack *(*pcre2_jit_callback)(void *);
+
+
+/* The structures for passing out data via callout functions. We use structures
+so that new fields can be added on the end in future versions, without changing
+the API of the function, thereby allowing old clients to work without
+modification. Define the generic versions in a macro; the width-specific
+versions are generated from this macro below. */
+
+/* Flags for the callout_flags field. These are cleared after a callout. */
+
+#define PCRE2_CALLOUT_STARTMATCH 0x00000001u /* Set for each bumpalong */
+#define PCRE2_CALLOUT_BACKTRACK 0x00000002u /* Set after a backtrack */
+
+#define PCRE2_STRUCTURE_LIST \
+typedef struct pcre2_callout_block { \
+ uint32_t version; /* Identifies version of block */ \
+ /* ------------------------ Version 0 ------------------------------- */ \
+ uint32_t callout_number; /* Number compiled into pattern */ \
+ uint32_t capture_top; /* Max current capture */ \
+ uint32_t capture_last; /* Most recently closed capture */ \
+ PCRE2_SIZE *offset_vector; /* The offset vector */ \
+ PCRE2_SPTR mark; /* Pointer to current mark or NULL */ \
+ PCRE2_SPTR subject; /* The subject being matched */ \
+ PCRE2_SIZE subject_length; /* The length of the subject */ \
+ PCRE2_SIZE start_match; /* Offset to start of this match attempt */ \
+ PCRE2_SIZE current_position; /* Where we currently are in the subject */ \
+ PCRE2_SIZE pattern_position; /* Offset to next item in the pattern */ \
+ PCRE2_SIZE next_item_length; /* Length of next item in the pattern */ \
+ /* ------------------- Added for Version 1 -------------------------- */ \
+ PCRE2_SIZE callout_string_offset; /* Offset to string within pattern */ \
+ PCRE2_SIZE callout_string_length; /* Length of string compiled into pattern */ \
+ PCRE2_SPTR callout_string; /* String compiled into pattern */ \
+ /* ------------------- Added for Version 2 -------------------------- */ \
+ uint32_t callout_flags; /* See above for list */ \
+ /* ------------------------------------------------------------------ */ \
+} pcre2_callout_block; \
+\
+typedef struct pcre2_callout_enumerate_block { \
+ uint32_t version; /* Identifies version of block */ \
+ /* ------------------------ Version 0 ------------------------------- */ \
+ PCRE2_SIZE pattern_position; /* Offset to next item in the pattern */ \
+ PCRE2_SIZE next_item_length; /* Length of next item in the pattern */ \
+ uint32_t callout_number; /* Number compiled into pattern */ \
+ PCRE2_SIZE callout_string_offset; /* Offset to string within pattern */ \
+ PCRE2_SIZE callout_string_length; /* Length of string compiled into pattern */ \
+ PCRE2_SPTR callout_string; /* String compiled into pattern */ \
+ /* ------------------------------------------------------------------ */ \
+} pcre2_callout_enumerate_block; \
+\
+typedef struct pcre2_substitute_callout_block { \
+ uint32_t version; /* Identifies version of block */ \
+ /* ------------------------ Version 0 ------------------------------- */ \
+ PCRE2_SPTR input; /* Pointer to input subject string */ \
+ PCRE2_SPTR output; /* Pointer to output buffer */ \
+ PCRE2_SIZE output_offsets[2]; /* Changed portion of the output */ \
+ PCRE2_SIZE *ovector; /* Pointer to current ovector */ \
+ uint32_t oveccount; /* Count of pairs set in ovector */ \
+ uint32_t subscount; /* Substitution number */ \
+ /* ------------------------------------------------------------------ */ \
+} pcre2_substitute_callout_block;
+
+
+/* List the generic forms of all other functions in macros, which will be
+expanded for each width below. Start with functions that give general
+information. */
+
+#define PCRE2_GENERAL_INFO_FUNCTIONS \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION pcre2_config(uint32_t, void *);
+
+
+/* Functions for manipulating contexts. */
+
+#define PCRE2_GENERAL_CONTEXT_FUNCTIONS \
+PCRE2_EXP_DECL pcre2_general_context PCRE2_CALL_CONVENTION \
+ *pcre2_general_context_copy(pcre2_general_context *); \
+PCRE2_EXP_DECL pcre2_general_context PCRE2_CALL_CONVENTION \
+ *pcre2_general_context_create(void *(*)(PCRE2_SIZE, void *), \
+ void (*)(void *, void *), void *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_general_context_free(pcre2_general_context *);
+
+#define PCRE2_COMPILE_CONTEXT_FUNCTIONS \
+PCRE2_EXP_DECL pcre2_compile_context PCRE2_CALL_CONVENTION \
+ *pcre2_compile_context_copy(pcre2_compile_context *); \
+PCRE2_EXP_DECL pcre2_compile_context PCRE2_CALL_CONVENTION \
+ *pcre2_compile_context_create(pcre2_general_context *);\
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_compile_context_free(pcre2_compile_context *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_bsr(pcre2_compile_context *, uint32_t); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_character_tables(pcre2_compile_context *, const uint8_t *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_compile_extra_options(pcre2_compile_context *, uint32_t); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_max_pattern_length(pcre2_compile_context *, PCRE2_SIZE); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_newline(pcre2_compile_context *, uint32_t); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_parens_nest_limit(pcre2_compile_context *, uint32_t); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_compile_recursion_guard(pcre2_compile_context *, \
+ int (*)(uint32_t, void *), void *);
+
+#define PCRE2_MATCH_CONTEXT_FUNCTIONS \
+PCRE2_EXP_DECL pcre2_match_context PCRE2_CALL_CONVENTION \
+ *pcre2_match_context_copy(pcre2_match_context *); \
+PCRE2_EXP_DECL pcre2_match_context PCRE2_CALL_CONVENTION \
+ *pcre2_match_context_create(pcre2_general_context *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_match_context_free(pcre2_match_context *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_callout(pcre2_match_context *, \
+ int (*)(pcre2_callout_block *, void *), void *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_substitute_callout(pcre2_match_context *, \
+ int (*)(pcre2_substitute_callout_block *, void *), void *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_depth_limit(pcre2_match_context *, uint32_t); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_heap_limit(pcre2_match_context *, uint32_t); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_match_limit(pcre2_match_context *, uint32_t); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_offset_limit(pcre2_match_context *, PCRE2_SIZE); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_recursion_limit(pcre2_match_context *, uint32_t); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_recursion_memory_management(pcre2_match_context *, \
+ void *(*)(PCRE2_SIZE, void *), void (*)(void *, void *), void *);
+
+#define PCRE2_CONVERT_CONTEXT_FUNCTIONS \
+PCRE2_EXP_DECL pcre2_convert_context PCRE2_CALL_CONVENTION \
+ *pcre2_convert_context_copy(pcre2_convert_context *); \
+PCRE2_EXP_DECL pcre2_convert_context PCRE2_CALL_CONVENTION \
+ *pcre2_convert_context_create(pcre2_general_context *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_convert_context_free(pcre2_convert_context *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_glob_escape(pcre2_convert_context *, uint32_t); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_glob_separator(pcre2_convert_context *, uint32_t);
+
+
+/* Functions concerned with compiling a pattern to PCRE internal code. */
+
+#define PCRE2_COMPILE_FUNCTIONS \
+PCRE2_EXP_DECL pcre2_code PCRE2_CALL_CONVENTION \
+ *pcre2_compile(PCRE2_SPTR, PCRE2_SIZE, uint32_t, int *, PCRE2_SIZE *, \
+ pcre2_compile_context *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_code_free(pcre2_code *); \
+PCRE2_EXP_DECL pcre2_code PCRE2_CALL_CONVENTION \
+ *pcre2_code_copy(const pcre2_code *); \
+PCRE2_EXP_DECL pcre2_code PCRE2_CALL_CONVENTION \
+ *pcre2_code_copy_with_tables(const pcre2_code *);
+
+
+/* Functions that give information about a compiled pattern. */
+
+#define PCRE2_PATTERN_INFO_FUNCTIONS \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_pattern_info(const pcre2_code *, uint32_t, void *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_callout_enumerate(const pcre2_code *, \
+ int (*)(pcre2_callout_enumerate_block *, void *), void *);
+
+
+/* Functions for running a match and inspecting the result. */
+
+#define PCRE2_MATCH_FUNCTIONS \
+PCRE2_EXP_DECL pcre2_match_data PCRE2_CALL_CONVENTION \
+ *pcre2_match_data_create(uint32_t, pcre2_general_context *); \
+PCRE2_EXP_DECL pcre2_match_data PCRE2_CALL_CONVENTION \
+ *pcre2_match_data_create_from_pattern(const pcre2_code *, \
+ pcre2_general_context *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_dfa_match(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \
+ uint32_t, pcre2_match_data *, pcre2_match_context *, int *, PCRE2_SIZE); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_match(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \
+ uint32_t, pcre2_match_data *, pcre2_match_context *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_match_data_free(pcre2_match_data *); \
+PCRE2_EXP_DECL PCRE2_SPTR PCRE2_CALL_CONVENTION \
+ pcre2_get_mark(pcre2_match_data *); \
+PCRE2_EXP_DECL PCRE2_SIZE PCRE2_CALL_CONVENTION \
+ pcre2_get_match_data_size(pcre2_match_data *); \
+PCRE2_EXP_DECL uint32_t PCRE2_CALL_CONVENTION \
+ pcre2_get_ovector_count(pcre2_match_data *); \
+PCRE2_EXP_DECL PCRE2_SIZE PCRE2_CALL_CONVENTION \
+ *pcre2_get_ovector_pointer(pcre2_match_data *); \
+PCRE2_EXP_DECL PCRE2_SIZE PCRE2_CALL_CONVENTION \
+ pcre2_get_startchar(pcre2_match_data *);
+
+
+/* Convenience functions for handling matched substrings. */
+
+#define PCRE2_SUBSTRING_FUNCTIONS \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substring_copy_byname(pcre2_match_data *, PCRE2_SPTR, PCRE2_UCHAR *, \
+ PCRE2_SIZE *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substring_copy_bynumber(pcre2_match_data *, uint32_t, PCRE2_UCHAR *, \
+ PCRE2_SIZE *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_substring_free(PCRE2_UCHAR *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substring_get_byname(pcre2_match_data *, PCRE2_SPTR, PCRE2_UCHAR **, \
+ PCRE2_SIZE *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substring_get_bynumber(pcre2_match_data *, uint32_t, PCRE2_UCHAR **, \
+ PCRE2_SIZE *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substring_length_byname(pcre2_match_data *, PCRE2_SPTR, PCRE2_SIZE *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substring_length_bynumber(pcre2_match_data *, uint32_t, PCRE2_SIZE *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substring_nametable_scan(const pcre2_code *, PCRE2_SPTR, PCRE2_SPTR *, \
+ PCRE2_SPTR *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substring_number_from_name(const pcre2_code *, PCRE2_SPTR); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_substring_list_free(PCRE2_SPTR *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substring_list_get(pcre2_match_data *, PCRE2_UCHAR ***, PCRE2_SIZE **);
+
+/* Functions for serializing / deserializing compiled patterns. */
+
+#define PCRE2_SERIALIZE_FUNCTIONS \
+PCRE2_EXP_DECL int32_t PCRE2_CALL_CONVENTION \
+ pcre2_serialize_encode(const pcre2_code **, int32_t, uint8_t **, \
+ PCRE2_SIZE *, pcre2_general_context *); \
+PCRE2_EXP_DECL int32_t PCRE2_CALL_CONVENTION \
+ pcre2_serialize_decode(pcre2_code **, int32_t, const uint8_t *, \
+ pcre2_general_context *); \
+PCRE2_EXP_DECL int32_t PCRE2_CALL_CONVENTION \
+ pcre2_serialize_get_number_of_codes(const uint8_t *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_serialize_free(uint8_t *);
+
+
+/* Convenience function for match + substitute. */
+
+#define PCRE2_SUBSTITUTE_FUNCTION \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substitute(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \
+ uint32_t, pcre2_match_data *, pcre2_match_context *, PCRE2_SPTR, \
+ PCRE2_SIZE, PCRE2_UCHAR *, PCRE2_SIZE *);
+
+
+/* Functions for converting pattern source strings. */
+
+#define PCRE2_CONVERT_FUNCTIONS \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_pattern_convert(PCRE2_SPTR, PCRE2_SIZE, uint32_t, PCRE2_UCHAR **, \
+ PCRE2_SIZE *, pcre2_convert_context *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_converted_pattern_free(PCRE2_UCHAR *);
+
+
+/* Functions for JIT processing */
+
+#define PCRE2_JIT_FUNCTIONS \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_jit_compile(pcre2_code *, uint32_t); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_jit_match(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \
+ uint32_t, pcre2_match_data *, pcre2_match_context *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_jit_free_unused_memory(pcre2_general_context *); \
+PCRE2_EXP_DECL pcre2_jit_stack PCRE2_CALL_CONVENTION \
+ *pcre2_jit_stack_create(PCRE2_SIZE, PCRE2_SIZE, pcre2_general_context *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_jit_stack_assign(pcre2_match_context *, pcre2_jit_callback, void *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_jit_stack_free(pcre2_jit_stack *);
+
+
+/* Other miscellaneous functions. */
+
+#define PCRE2_OTHER_FUNCTIONS \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_get_error_message(int, PCRE2_UCHAR *, PCRE2_SIZE); \
+PCRE2_EXP_DECL const uint8_t PCRE2_CALL_CONVENTION \
+ *pcre2_maketables(pcre2_general_context *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_maketables_free(pcre2_general_context *, const uint8_t *);
+
+/* Define macros that generate width-specific names from generic versions. The
+three-level macro scheme is necessary to get the macros expanded when we want
+them to be. First we get the width from PCRE2_LOCAL_WIDTH, which is used for
+generating three versions of everything below. After that, PCRE2_SUFFIX will be
+re-defined to use PCRE2_CODE_UNIT_WIDTH, for use when macros such as
+pcre2_compile are called by application code. */
+
+#define PCRE2_JOIN(a,b) a ## b
+#define PCRE2_GLUE(a,b) PCRE2_JOIN(a,b)
+#define PCRE2_SUFFIX(a) PCRE2_GLUE(a,PCRE2_LOCAL_WIDTH)
+
+
+/* Data types */
+
+#define PCRE2_UCHAR PCRE2_SUFFIX(PCRE2_UCHAR)
+#define PCRE2_SPTR PCRE2_SUFFIX(PCRE2_SPTR)
+
+#define pcre2_code PCRE2_SUFFIX(pcre2_code_)
+#define pcre2_jit_callback PCRE2_SUFFIX(pcre2_jit_callback_)
+#define pcre2_jit_stack PCRE2_SUFFIX(pcre2_jit_stack_)
+
+#define pcre2_real_code PCRE2_SUFFIX(pcre2_real_code_)
+#define pcre2_real_general_context PCRE2_SUFFIX(pcre2_real_general_context_)
+#define pcre2_real_compile_context PCRE2_SUFFIX(pcre2_real_compile_context_)
+#define pcre2_real_convert_context PCRE2_SUFFIX(pcre2_real_convert_context_)
+#define pcre2_real_match_context PCRE2_SUFFIX(pcre2_real_match_context_)
+#define pcre2_real_jit_stack PCRE2_SUFFIX(pcre2_real_jit_stack_)
+#define pcre2_real_match_data PCRE2_SUFFIX(pcre2_real_match_data_)
+
+
+/* Data blocks */
+
+#define pcre2_callout_block PCRE2_SUFFIX(pcre2_callout_block_)
+#define pcre2_callout_enumerate_block PCRE2_SUFFIX(pcre2_callout_enumerate_block_)
+#define pcre2_substitute_callout_block PCRE2_SUFFIX(pcre2_substitute_callout_block_)
+#define pcre2_general_context PCRE2_SUFFIX(pcre2_general_context_)
+#define pcre2_compile_context PCRE2_SUFFIX(pcre2_compile_context_)
+#define pcre2_convert_context PCRE2_SUFFIX(pcre2_convert_context_)
+#define pcre2_match_context PCRE2_SUFFIX(pcre2_match_context_)
+#define pcre2_match_data PCRE2_SUFFIX(pcre2_match_data_)
+
+
+/* Functions: the complete list in alphabetical order */
+
+#define pcre2_callout_enumerate PCRE2_SUFFIX(pcre2_callout_enumerate_)
+#define pcre2_code_copy PCRE2_SUFFIX(pcre2_code_copy_)
+#define pcre2_code_copy_with_tables PCRE2_SUFFIX(pcre2_code_copy_with_tables_)
+#define pcre2_code_free PCRE2_SUFFIX(pcre2_code_free_)
+#define pcre2_compile PCRE2_SUFFIX(pcre2_compile_)
+#define pcre2_compile_context_copy PCRE2_SUFFIX(pcre2_compile_context_copy_)
+#define pcre2_compile_context_create PCRE2_SUFFIX(pcre2_compile_context_create_)
+#define pcre2_compile_context_free PCRE2_SUFFIX(pcre2_compile_context_free_)
+#define pcre2_config PCRE2_SUFFIX(pcre2_config_)
+#define pcre2_convert_context_copy PCRE2_SUFFIX(pcre2_convert_context_copy_)
+#define pcre2_convert_context_create PCRE2_SUFFIX(pcre2_convert_context_create_)
+#define pcre2_convert_context_free PCRE2_SUFFIX(pcre2_convert_context_free_)
+#define pcre2_converted_pattern_free PCRE2_SUFFIX(pcre2_converted_pattern_free_)
+#define pcre2_dfa_match PCRE2_SUFFIX(pcre2_dfa_match_)
+#define pcre2_general_context_copy PCRE2_SUFFIX(pcre2_general_context_copy_)
+#define pcre2_general_context_create PCRE2_SUFFIX(pcre2_general_context_create_)
+#define pcre2_general_context_free PCRE2_SUFFIX(pcre2_general_context_free_)
+#define pcre2_get_error_message PCRE2_SUFFIX(pcre2_get_error_message_)
+#define pcre2_get_mark PCRE2_SUFFIX(pcre2_get_mark_)
+#define pcre2_get_match_data_size PCRE2_SUFFIX(pcre2_get_match_data_size_)
+#define pcre2_get_ovector_pointer PCRE2_SUFFIX(pcre2_get_ovector_pointer_)
+#define pcre2_get_ovector_count PCRE2_SUFFIX(pcre2_get_ovector_count_)
+#define pcre2_get_startchar PCRE2_SUFFIX(pcre2_get_startchar_)
+#define pcre2_jit_compile PCRE2_SUFFIX(pcre2_jit_compile_)
+#define pcre2_jit_match PCRE2_SUFFIX(pcre2_jit_match_)
+#define pcre2_jit_free_unused_memory PCRE2_SUFFIX(pcre2_jit_free_unused_memory_)
+#define pcre2_jit_stack_assign PCRE2_SUFFIX(pcre2_jit_stack_assign_)
+#define pcre2_jit_stack_create PCRE2_SUFFIX(pcre2_jit_stack_create_)
+#define pcre2_jit_stack_free PCRE2_SUFFIX(pcre2_jit_stack_free_)
+#define pcre2_maketables PCRE2_SUFFIX(pcre2_maketables_)
+#define pcre2_maketables_free PCRE2_SUFFIX(pcre2_maketables_free_)
+#define pcre2_match PCRE2_SUFFIX(pcre2_match_)
+#define pcre2_match_context_copy PCRE2_SUFFIX(pcre2_match_context_copy_)
+#define pcre2_match_context_create PCRE2_SUFFIX(pcre2_match_context_create_)
+#define pcre2_match_context_free PCRE2_SUFFIX(pcre2_match_context_free_)
+#define pcre2_match_data_create PCRE2_SUFFIX(pcre2_match_data_create_)
+#define pcre2_match_data_create_from_pattern PCRE2_SUFFIX(pcre2_match_data_create_from_pattern_)
+#define pcre2_match_data_free PCRE2_SUFFIX(pcre2_match_data_free_)
+#define pcre2_pattern_convert PCRE2_SUFFIX(pcre2_pattern_convert_)
+#define pcre2_pattern_info PCRE2_SUFFIX(pcre2_pattern_info_)
+#define pcre2_serialize_decode PCRE2_SUFFIX(pcre2_serialize_decode_)
+#define pcre2_serialize_encode PCRE2_SUFFIX(pcre2_serialize_encode_)
+#define pcre2_serialize_free PCRE2_SUFFIX(pcre2_serialize_free_)
+#define pcre2_serialize_get_number_of_codes PCRE2_SUFFIX(pcre2_serialize_get_number_of_codes_)
+#define pcre2_set_bsr PCRE2_SUFFIX(pcre2_set_bsr_)
+#define pcre2_set_callout PCRE2_SUFFIX(pcre2_set_callout_)
+#define pcre2_set_character_tables PCRE2_SUFFIX(pcre2_set_character_tables_)
+#define pcre2_set_compile_extra_options PCRE2_SUFFIX(pcre2_set_compile_extra_options_)
+#define pcre2_set_compile_recursion_guard PCRE2_SUFFIX(pcre2_set_compile_recursion_guard_)
+#define pcre2_set_depth_limit PCRE2_SUFFIX(pcre2_set_depth_limit_)
+#define pcre2_set_glob_escape PCRE2_SUFFIX(pcre2_set_glob_escape_)
+#define pcre2_set_glob_separator PCRE2_SUFFIX(pcre2_set_glob_separator_)
+#define pcre2_set_heap_limit PCRE2_SUFFIX(pcre2_set_heap_limit_)
+#define pcre2_set_match_limit PCRE2_SUFFIX(pcre2_set_match_limit_)
+#define pcre2_set_max_pattern_length PCRE2_SUFFIX(pcre2_set_max_pattern_length_)
+#define pcre2_set_newline PCRE2_SUFFIX(pcre2_set_newline_)
+#define pcre2_set_parens_nest_limit PCRE2_SUFFIX(pcre2_set_parens_nest_limit_)
+#define pcre2_set_offset_limit PCRE2_SUFFIX(pcre2_set_offset_limit_)
+#define pcre2_set_substitute_callout PCRE2_SUFFIX(pcre2_set_substitute_callout_)
+#define pcre2_substitute PCRE2_SUFFIX(pcre2_substitute_)
+#define pcre2_substring_copy_byname PCRE2_SUFFIX(pcre2_substring_copy_byname_)
+#define pcre2_substring_copy_bynumber PCRE2_SUFFIX(pcre2_substring_copy_bynumber_)
+#define pcre2_substring_free PCRE2_SUFFIX(pcre2_substring_free_)
+#define pcre2_substring_get_byname PCRE2_SUFFIX(pcre2_substring_get_byname_)
+#define pcre2_substring_get_bynumber PCRE2_SUFFIX(pcre2_substring_get_bynumber_)
+#define pcre2_substring_length_byname PCRE2_SUFFIX(pcre2_substring_length_byname_)
+#define pcre2_substring_length_bynumber PCRE2_SUFFIX(pcre2_substring_length_bynumber_)
+#define pcre2_substring_list_get PCRE2_SUFFIX(pcre2_substring_list_get_)
+#define pcre2_substring_list_free PCRE2_SUFFIX(pcre2_substring_list_free_)
+#define pcre2_substring_nametable_scan PCRE2_SUFFIX(pcre2_substring_nametable_scan_)
+#define pcre2_substring_number_from_name PCRE2_SUFFIX(pcre2_substring_number_from_name_)
+
+/* Keep this old function name for backwards compatibility */
+#define pcre2_set_recursion_limit PCRE2_SUFFIX(pcre2_set_recursion_limit_)
+
+/* Keep this obsolete function for backwards compatibility: it is now a noop. */
+#define pcre2_set_recursion_memory_management PCRE2_SUFFIX(pcre2_set_recursion_memory_management_)
+
+/* Now generate all three sets of width-specific structures and function
+prototypes. */
+
+#define PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS \
+PCRE2_TYPES_LIST \
+PCRE2_STRUCTURE_LIST \
+PCRE2_GENERAL_INFO_FUNCTIONS \
+PCRE2_GENERAL_CONTEXT_FUNCTIONS \
+PCRE2_COMPILE_CONTEXT_FUNCTIONS \
+PCRE2_CONVERT_CONTEXT_FUNCTIONS \
+PCRE2_CONVERT_FUNCTIONS \
+PCRE2_MATCH_CONTEXT_FUNCTIONS \
+PCRE2_COMPILE_FUNCTIONS \
+PCRE2_PATTERN_INFO_FUNCTIONS \
+PCRE2_MATCH_FUNCTIONS \
+PCRE2_SUBSTRING_FUNCTIONS \
+PCRE2_SERIALIZE_FUNCTIONS \
+PCRE2_SUBSTITUTE_FUNCTION \
+PCRE2_JIT_FUNCTIONS \
+PCRE2_OTHER_FUNCTIONS
+
+#define PCRE2_LOCAL_WIDTH 8
+PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
+#undef PCRE2_LOCAL_WIDTH
+
+#define PCRE2_LOCAL_WIDTH 16
+PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
+#undef PCRE2_LOCAL_WIDTH
+
+#define PCRE2_LOCAL_WIDTH 32
+PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
+#undef PCRE2_LOCAL_WIDTH
+
+/* Undefine the list macros; they are no longer needed. */
+
+#undef PCRE2_TYPES_LIST
+#undef PCRE2_STRUCTURE_LIST
+#undef PCRE2_GENERAL_INFO_FUNCTIONS
+#undef PCRE2_GENERAL_CONTEXT_FUNCTIONS
+#undef PCRE2_COMPILE_CONTEXT_FUNCTIONS
+#undef PCRE2_CONVERT_CONTEXT_FUNCTIONS
+#undef PCRE2_MATCH_CONTEXT_FUNCTIONS
+#undef PCRE2_COMPILE_FUNCTIONS
+#undef PCRE2_PATTERN_INFO_FUNCTIONS
+#undef PCRE2_MATCH_FUNCTIONS
+#undef PCRE2_SUBSTRING_FUNCTIONS
+#undef PCRE2_SERIALIZE_FUNCTIONS
+#undef PCRE2_SUBSTITUTE_FUNCTION
+#undef PCRE2_JIT_FUNCTIONS
+#undef PCRE2_OTHER_FUNCTIONS
+#undef PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
+
+/* PCRE2_CODE_UNIT_WIDTH must be defined. If it is 8, 16, or 32, redefine
+PCRE2_SUFFIX to use it. If it is 0, undefine the other macros and make
+PCRE2_SUFFIX a no-op. Otherwise, generate an error. */
+
+#undef PCRE2_SUFFIX
+#ifndef PCRE2_CODE_UNIT_WIDTH
+#error PCRE2_CODE_UNIT_WIDTH must be defined before including pcre2.h.
+#error Use 8, 16, or 32; or 0 for a multi-width application.
+#else /* PCRE2_CODE_UNIT_WIDTH is defined */
+#if PCRE2_CODE_UNIT_WIDTH == 8 || \
+ PCRE2_CODE_UNIT_WIDTH == 16 || \
+ PCRE2_CODE_UNIT_WIDTH == 32
+#define PCRE2_SUFFIX(a) PCRE2_GLUE(a, PCRE2_CODE_UNIT_WIDTH)
+#elif PCRE2_CODE_UNIT_WIDTH == 0
+#undef PCRE2_JOIN
+#undef PCRE2_GLUE
+#define PCRE2_SUFFIX(a) a
+#else
+#error PCRE2_CODE_UNIT_WIDTH must be 0, 8, 16, or 32.
+#endif
+#endif /* PCRE2_CODE_UNIT_WIDTH is defined */
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* PCRE2_H_IDEMPOTENT_GUARD */
+
+/* End of pcre2.h */
diff --git a/libcgi/.indent.pro b/libcgi/.indent.pro
deleted file mode 100644
index 632288da..00000000
--- a/libcgi/.indent.pro
+++ /dev/null
@@ -1,6 +0,0 @@
--nbad -bap -nbbo -nbc -br -brs -c33 -cd33 -ncdb -nce -ci4
--cp33 -ncs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs
--npsl -nsc -nsob -nss
--Tform_entry
--Tcgi_info
--TFILE
diff --git a/libcgi/Makefile.in b/libcgi/Makefile.in
deleted file mode 100644
index 30409dd6..00000000
--- a/libcgi/Makefile.in
+++ /dev/null
@@ -1,45 +0,0 @@
-# CGI virdoc library makefile
-
-#WNOERROR=-Werror
-#WARNINGS=$(WNOERROR) -ansi -pedantic -Wall -Wtraditional -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Dlint
-
-# You shouldn't have to edit anything else.
-CC=@CC@ $(WARNINGS)
-INSTALL=@INSTALL@
-AUX_LIBS=
-RANLIB=@RANLIB@
-RM=rm
-LINT=lint
-
-SRCS=form_ent.c get_cgi_info.c main.c syn_mime.c syn_url.c mcode.c\
- form_tags.c strops.c html.c
-
-.c.o:
- $(CC) -c $(CFLAGS) $(AUX_CFLAGS) $(INF_INCS) $<
-
-ALL = libcgi.a
-
-%.o: %.c
- $(CC) -c $(CFLAGS) $(AUX_CFLAGS) $(INF_INCS) $<
-
-all: $(ALL)
-
-libcgi.a: form_ent.o get_cgi_info.o main.o syn_mime.o syn_url.o mcode.o\
- form_tags.o strops.o html.o
- ar r $@ $?
- ${RANLIB} $@
-
-install: $(ALL)
-
-clean:
- -$(RM) -f *.o *~ *.a
-
-clobber: clean
-distclean: clean
-
-insight: clean
- $(MAKE) CC="insight"
-
-lint:
- $(LINT) $(LINTFLAGS) $(SRCS) 2>&1 | tee lint.out
-
diff --git a/libcgi/cgi.h b/libcgi/cgi.h
deleted file mode 100644
index 9674f579..00000000
--- a/libcgi/cgi.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- ** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp.
- ** VeriFone Inc./Hewlett-Packard. All Rights Reserved.
- ** Kevin Hughes, kev@kevcom.com 3/11/94
- ** Kent Landfield, kent@landfield.com 4/6/97
- **
- ** This program and library is free software; you can redistribute it and/or
- ** modify it under the terms of the GNU (Library) General Public License
- ** as published by the Free Software Foundation; either version 2
- ** of the License, or 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 (Library) General Public License for more details.
- **
- ** You should have received a copy of the GNU (Library) 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
- **/
-
-/**
- ** This file is part of the LIBCGI library
- **
- */
-
-#ifndef CGI_H
-#define CGI_H
-
-#include
-#include
-#include
-#include
-#include "../config.h"
-
-#ifdef NO_MACRO
-#undef isspace
-#undef isdigit
-#undef isalpha
-#undef isupper
-#undef islower
-#undef isxdigit
-#undef isalnum
-#undef ispunct
-#undef isprint
-#undef isgraph
-#undef iscntrl
-#undef isascii
-#endif
-
-
-
-#define MCODE_GET 1
-#define MCODE_POST 2
-#define MCODE_PUT 3
-#define MCODE_HEAD 4
-
-typedef struct {
- char *server_software;
- char *server_name;
- char *gateway_interface;
- char *server_protocol;
- char *server_port;
- char *request_method;
- char *http_accept;
- char *path_info;
- char *path_translated;
- char *script_name;
- char *query_string;
- char *remote_host;
- char *remote_addr;
- char *remote_user;
- char *auth_type;
- char *remote_ident;
- char *content_type;
- int content_length;
-} cgi_info;
-
-typedef struct festruct {
- char *name;
- char *val;
- struct festruct *next;
-} form_entry;
-
-
-/* Prototypes */
-/* ---------- */
-
-int get_cgi_info(cgi_info *);
-int syn_base_url(char *, cgi_info *);
-int syn_mimeheader(char *, char *);
-int mcode(cgi_info *);
-char *trim(char *);
-char *strmaxcpy(char *, char *, int);
-char *sanitize(char *, char *);
-char *parmval(form_entry *, char *);
-int print_base_url(cgi_info *);
-int print_mimeheader(const char *);
-void print_doc_begin(char *);
-void print_doc_end(char *);
-void print_logo(void);
-void print_sel_list(char *, char **, char *);
-void print_submit(char *);
-void print_input_blank(char *, unsigned int, unsigned int, char *);
-form_entry *get_form_entries(cgi_info *);
-void free_form_entries(form_entry *);
-form_entry *get_fes_from_string(char *);
-form_entry *get_fes_from_stream(int, FILE *);
-unsigned char dd2c(char, char);
-void dump_cgi_info(cgi_info *);
-
-#ifdef lint
-extern int isspace(int);
-extern int isalnum(int);
-
-extern int strcasecmp(const char *, const char *);
-extern int strncasecmp(const char *, const char *, size_t);
-#endif
-#endif
diff --git a/libcgi/form_ent.c b/libcgi/form_ent.c
deleted file mode 100644
index 5022d432..00000000
--- a/libcgi/form_ent.c
+++ /dev/null
@@ -1,290 +0,0 @@
-/**
- ** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp.
- ** VeriFone Inc./Hewlett-Packard. All Rights Reserved.
- ** Kevin Hughes, kev@kevcom.com 3/11/94
- ** Kent Landfield, kent@landfield.com 4/6/97
- **
- ** This program and library is free software; you can redistribute it and/or
- ** modify it under the terms of the GNU (Library) General Public License
- ** as published by the Free Software Foundation; either version 2
- ** of the License, or 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 (Library) General Public License for more details.
- **
- ** You should have received a copy of the GNU (Library) 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
- */
-
-/*
- * This file is part of the LIBCGI library
- *
- */
-
-#include "cgi.h"
-
-#define LF 10
-#define CR 13
-
-#define STARTSIZE 8
-
-form_entry *get_form_entries(cgi_info *ci)
-{
- if (ci && ci->request_method &&
- !strncasecmp(ci->request_method, "POST", 4) && ci->content_type &&
- !strncasecmp(ci->content_type, "application/x-www-form-urlencoded",
- 33)) return get_fes_from_stream(ci->content_length,
- stdin);
- else if (ci && ci->request_method &&
- !strncasecmp(ci->request_method, "GET", 3))
- return get_fes_from_string(ci->query_string);
- else
- return NULL;
-}
-
-void free_form_entries(form_entry *fe)
-{
- form_entry *tempfe;
- while (fe) {
- if (fe->name)
- free(fe->name);
- if (fe->val)
- free(fe->val);
- tempfe = fe->next;
- free(fe);
- fe = tempfe;
- }
-}
-
-char *parmval(form_entry *fe, char *s)
-{
- while (fe) {
- if (!strcasecmp(fe->name, s))
- return fe->val;
- else
- fe = fe->next;
- }
- return NULL;
-}
-
-form_entry *get_fes_from_string(char *s)
-{
- form_entry *fe;
- int asize;
- int i;
-
- if (s == NULL)
- return NULL;
- while (isspace(*s) || *s == '&')
- s++; /* some cases that shouldn't happen */
- if (*s == '\0')
- return NULL;
- fe = (form_entry *)malloc(sizeof(form_entry));
- if (fe == NULL)
- return NULL;
- fe->name = malloc((asize = STARTSIZE * sizeof(char)));
- if (fe->name == NULL) {
- free(fe);
- return NULL;
- }
- /* get form field name */
- for (i = 0; *s && *s != '&' && *s != '='; s++, i++) {
- switch (*s) {
- case '+':
- fe->name[i] = ' ';
- break;
- case '%':
- fe->name[i] = dd2c(s[1], s[2]);
- s += 2;
- break;
- default:
- fe->name[i] = *s;
- }
- if (i + 1 >= asize) { /* try to double the buffer */
- fe->name = realloc(fe->name, (asize *= 2));
- if (fe->name == NULL)
- return NULL;
- }
- }
- fe->name[i] = '\0';
- switch (*s++) {
- case '&':
- fe->val = NULL;
- break;
- case '=':
- fe->val = malloc((asize = STARTSIZE * sizeof(char)));
- if (fe->val == NULL)
- break;
- for (i = 0; *s && *s != '&'; s++, i++) {
- switch (*s) {
- case '+':
- fe->val[i] = ' ';
- break;
- case '%':
- fe->val[i] = dd2c(s[1], s[2]);
- s += 2;
- break;
- default:
- fe->val[i] = *s;
- }
- if (i + 1 >= asize) { /* try to double the buffer */
- fe->val = realloc(fe->val, (asize *= 2));
- if (fe->val == NULL)
- return NULL;
- }
- }
- fe->val[i] = '\0';
- switch (*s++) {
- case '&':
- fe->next = get_fes_from_string(s);
- break;
- case '\0':
- default:
- fe->next = NULL;
- }
- break;
- case '\0':
- default:
- fe->val = NULL;
- fe->next = NULL;
- }
- return fe;
-}
-
-#define getccl(s, l) (l-- ? getc(s) : EOF)
-
-form_entry *get_fes_from_stream(int length, FILE *stream)
-{
- form_entry *fe;
- int asize;
- int i;
- int c;
- int c1, c2;
-
- while (isspace(c = getccl(stream, length)) || c == '&');
- if (c == EOF)
- return NULL;
- fe = (form_entry *)malloc(sizeof(form_entry));
- if (fe == NULL)
- return NULL;
- fe->name = malloc((asize = STARTSIZE * sizeof(char)));
- if (fe->name == NULL) {
- free(fe);
- return NULL;
- }
- /* get form field name */
- for (i = 0; c != EOF && c != '&' && c != '=';
- c = getccl(stream, length), i++) {
- switch (c) {
- case '+':
- fe->name[i] = ' ';
- break;
- case '%':
- c1 = getccl(stream, length);
- c2 = getccl(stream, length);
- fe->name[i] = dd2c(c1, c2);
- break;
- default:
- fe->name[i] = c;
- }
- if (i + 1 >= asize) { /* try to double the buffer */
- fe->name = realloc(fe->name, (asize *= 2));
- if (fe->name == NULL)
- return NULL;
- }
- }
- fe->name[i] = '\0';
- if (c == EOF) {
- fe->val = NULL;
- fe->next = NULL;
- }
- else
- switch (c) {
- case '&':
- fe->val = NULL;
- break;
- case '=':
- fe->val = malloc((asize = STARTSIZE * sizeof(char)));
- for (i = 0, c = getccl(stream, length); c != EOF && c != '&';
- c = getccl(stream, length), i++) {
- switch (c) {
- case '+':
- fe->val[i] = ' ';
- break;
- case '%':
- c1 = getccl(stream, length);
- c2 = getccl(stream, length);
- fe->val[i] = dd2c(c1, c2);
- break;
- default:
- fe->val[i] = c;
- }
- if (i + 1 >= asize) { /* try to double the buffer */
- fe->val = realloc(fe->val, (asize *= 2));
- if (fe->val == NULL)
- return NULL;
- }
- }
- fe->val[i] = '\0';
- if (c == '&') {
- fe->next = get_fes_from_stream(length, stream);
- }
- else
- fe->next = NULL;
- }
- return fe;
-}
-
-unsigned char dd2c(char d1, char d2)
-{
- register unsigned char digit;
-
- digit = (d1 >= 'A' ? ((d1 & 0xdf) - 'A') + 10 : (d1 - '0'));
- digit *= 16;
- digit += (d2 >= 'A' ? ((d2 & 0xdf) - 'A') + 10 : (d2 - '0'));
- return (digit);
-}
-
-
-void dump_cgi_info(cgi_info *ci)
-{
- printf("CONTENT_LENGTH: %d\n", ci->content_length);
- if (ci->content_type != NULL)
- printf("
CONTENT_TYPE: %s\n", ci->content_type);
- if (ci->server_name != NULL)
- printf("
SERVER_NAME: %s\n", ci->server_name);
- if (ci->server_software != NULL)
- printf("
SERVER_SOFTWARE: %s\n", ci->server_software);
- if (ci->gateway_interface != NULL)
- printf("
GATEWAY_INTERFACE: %s\n", ci->gateway_interface);
- if (ci->server_protocol != NULL)
- printf("
SERVER_PROTOCOL: %s\n", ci->server_protocol);
- if (ci->server_port != NULL)
- printf("
SERVER_PORT: %s\n", ci->server_port);
- if (ci->request_method != NULL)
- printf("
REQUEST_METHOD: %s\n", ci->request_method);
- if (ci->http_accept != NULL)
- printf("
HTTP_ACCEPT: %s\n", ci->http_accept);
- if (ci->path_info != NULL)
- printf("
PATH_INFO: %s\n", ci->path_info);
- if (ci->path_translated != NULL)
- printf("
PATH_TRANSLATED: %s\n", ci->path_translated);
- if (ci->script_name != NULL)
- printf("
SCRIPT_NAME: %s\n", ci->script_name);
- if (ci->query_string != NULL)
- printf("
QUERY_STRING: %s\n", ci->query_string);
- if (ci->remote_host != NULL)
- printf("
REMOTE_HOST: %s\n", ci->remote_host);
- if (ci->remote_addr != NULL)
- printf("
REMOTE_ADDR: %s\n", ci->remote_addr);
- if (ci->auth_type != NULL)
- printf("
AUTH_TYPE: %s\n", ci->auth_type);
- if (ci->remote_user != NULL)
- printf("
REMOTE_USER: %s\n", ci->remote_user);
- if (ci->remote_ident != NULL)
- printf("
REMOTE_IDENT: %s\n", ci->remote_ident);
- return;
-}
diff --git a/libcgi/form_tags.c b/libcgi/form_tags.c
deleted file mode 100644
index f2fe6a44..00000000
--- a/libcgi/form_tags.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp.
-** VeriFone Inc./Hewlett-Packard. All Rights Reserved.
-** Kevin Hughes, kev@kevcom.com 3/11/94
-** Kent Landfield, kent@landfield.com 4/6/97
-**
-** This program and library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU (Library) General Public License
-** as published by the Free Software Foundation; either version 2
-** of the License, or 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 (Library) General Public License for more details.
-**
-** You should have received a copy of the GNU (Library) 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
-*/
-
-/*
- * This file is part of the LIBCGI library
- *
- */
-
-#include "cgi.h"
-
-void print_sel_list(char *tname, char **opts, char *init)
-{
- printf("", stdout);
-}
-
-void print_input_blank(char *tname, unsigned int size,
- unsigned int maxlength, char *init)
-{
- printf("", stdout);
-}
-
-void print_submit(char *label)
-{
- printf("", stdout);
-}
diff --git a/libcgi/get_cgi_info.c b/libcgi/get_cgi_info.c
deleted file mode 100644
index 9ad918db..00000000
--- a/libcgi/get_cgi_info.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp.
-** VeriFone Inc./Hewlett-Packard. All Rights Reserved.
-** Kevin Hughes, kev@kevcom.com 3/11/94
-** Kent Landfield, kent@landfield.com 4/6/97
-**
-** This program and library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU (Library) General Public License
-** as published by the Free Software Foundation; either version 2
-** of the License, or 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 (Library) General Public License for more details.
-**
-** You should have received a copy of the GNU (Library) 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
-*/
-
-/*
- * This file is part of the LIBCGI library
- *
- */
-
-#include "cgi.h"
-
-int get_cgi_info(cgi_info *ci)
-{
- char *s;
-
- ci->content_length = (s = getenv("CONTENT_LENGTH")) ? atoi(s) : 0;
- ci->content_type = getenv("CONTENT_TYPE");
- ci->server_software = getenv("SERVER_SOFTWARE");
- ci->gateway_interface = getenv("GATEWAY_INTERFACE");
- ci->server_protocol = getenv("SERVER_PROTOCOL");
- ci->server_port = getenv("SERVER_PORT");
- ci->request_method = getenv("REQUEST_METHOD");
- ci->http_accept = getenv("HTTP_ACCEPT");
- ci->path_info = getenv("PATH_INFO");
- ci->path_translated = getenv("PATH_TRANSLATED");
- ci->script_name = getenv("SCRIPT_NAME");
- ci->query_string = getenv("QUERY_STRING");
- ci->remote_host = getenv("REMOTE_HOST");
- ci->remote_addr = getenv("REMOTE_ADDR");
- ci->remote_user = getenv("REMOTE_USER");
- ci->auth_type = getenv("AUTH_TYPE");
- ci->remote_user = getenv("REMOTE_USER");
- ci->remote_ident = getenv("REMOTE_IDENT");
- return (ci->server_name = getenv("SERVER_NAME")) != NULL;
-}
diff --git a/libcgi/html.c b/libcgi/html.c
deleted file mode 100644
index 729ddf38..00000000
--- a/libcgi/html.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp.
-** VeriFone Inc./Hewlett-Packard. All Rights Reserved.
-** Kevin Hughes, kev@kevcom.com 3/11/94
-** Kent Landfield, kent@landfield.com 4/6/97
-**
-** This program and library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU (Library) General Public License
-** as published by the Free Software Foundation; either version 2
-** of the License, or 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 (Library) General Public License for more details.
-**
-** You should have received a copy of the GNU (Library) 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
-*/
-
-/*
- * This file is part of the LIBCGI library
- *
- */
-
-#include "cgi.h"
-
-void print_doc_begin(char *title)
-{
- printf("%s \n", title);
- printf("%s
\n
",
- title);
-}
-
-void print_doc_end(char *text)
-{
- char *w;
-
- puts("
");
- if (text && *text)
- puts(text);
- else if ((w = getenv("WEBMASTER")))
- printf("%s\n", w);
-}
-
-void print_logo(void)
-{
- printf("
");
-}
diff --git a/libcgi/libcgi.html b/libcgi/libcgi.html
deleted file mode 100644
index 9788c460..00000000
--- a/libcgi/libcgi.html
+++ /dev/null
@@ -1,232 +0,0 @@
-
-
-Hypermail's CGI Library
-
-
-
CGI Library
-
-These functions help you write virtual document (CGI) programs using C.
-Look at the template.c file for an illustrative
-example. Feel free to download
-the latest
-distributions from ftp.hypermail.org.
-
-
-
-- main()
-
- cgi_main(cgi_info *ci)
-
- int get_cgi_info(cgi_info *)
-
- form_entry *get_form_entries(cgi_info *)
-
- void free_form_entries(cgi_info *)
-
- char *parmval(form_entry *, char *)
-
- int syn_mimeheader(char *, char *)
-
- int print_mimeheader(char *)
-
- int syn_base_url(char *, cgi_info *)
-
- int print_base_url(cgi_info *)
-
- int mcode(cgi_info *)
-
- void print_sel_list(char *tname, char **opts, char *init)
-
- void print_input_blank(char *tname, unsigned size, char *init)
-
- void print_submit(char *label)
-
- char *trim(char *s)
-
- char *sanitize(char *to, char *from)
-
- char *strmaxcpy(char *s1, char *s2, int n)
-
-
-
-Synopsis
-
-#include "libcgi/cgi.h"
-main()
-cgi_main(cgi_info *ci)
-
-
-Description
-libcgi contains a simple stub of a main program, which merely
-calls cgi_main()
with a struct filled with all the CGI
-vars. Thus cgi_main is actually the entry point for
-your CGI-processing code. It is this way to be upwardly-compatible
-with a scheme for virtual document "daemons" that we're hatching.
-
-
-Synopsis
-
-#include "libcgi/cgi.h"
-int get_cgi_info(cgi_info *)
-
-Description
-This routine paws through the environment and fills up the struct
-provided, which must already be allocated.
-
-This function is called by main
, and the result passed to
-cgi_main
.
-
-
Returns
-0 if there is a problem.
-
-
-
-Synopsis
-
-#include "libcgi/cgi.h"
-form_entry *get_form_entries(cgi_info *)
-void free_form_entries(cgi_info *)
-char *parmval(form_entry *, char *)
-
-Description
-get_form_entries parses any form inputs information into a linked-list
-of name/value pairs, returning the head pointer of that list. It does
-all plus-to-space and hex code translations.
-
-free_form_entries reclaims all the memory from the provided linked-list.
-
-parmval return the value corresponding to the name in the second
-argument (a caseless string compar) by a linear search through the list
-in the first argument.
-
-
Returns
-get_form_enties returns the head pointer, or NULL if there is a problem
-or no form input information was available.
-
-parmval returns the corresponding value string or NULL if there is a
-problem or no matching name.
-
-
-
-Synopsis
-
-#include "libcgi/cgi.h"
-int syn_mimeheader(char *, char *)
-int print_mimeheader(char *)
-
-Description
-syn_mimeheader creates a MIME header based on the MIME type in
-the second string and writes it into the first string buffer
-(including trailing double-newline).
-
-print_mimeheader creates the same MIME header based on the MIME
-type in its sole argument, and prints it to stdout
-
-
Returns
-both return 0 if there is a problem
-
-
-
-Synopsis
-
-#include "libcgi/cgi.h"
-int syn_base_url(char *, cgi_info *)
-int print_base_url(cgi_info *)
-
-Description
-syn_base_url reconstructs the virtual document's URL given the
-cgi_info, minus any query string, and fills the provided char
-buffer.
-
-print_base_url does the same but prints to stdout instead
-
-
Returns
-both return 0 if there is a problem
-
-
-
-Synopsis
-
-#include "libcgi/cgi.h"
-int mcode(cgi_info *)
-
-Description
-This function examines the request_method in the cgi information
-and returns an integer code. These codes are defined in cgi.h.
-
-Returns
-0 if it doesn't recognize the method name, otherwise the code as
-defined in cgi.h
-
-
-
-Synopsis
-
-#include "libcgi/cgi.h"
-void print_sel_list(char *tname, char **opts, char *init)
-
-Description
-Prints an HTML+ selection list construct to stdout. The name of
-the SELECT tag is given by tname, and the NULL-terminated string
-array opts is turned into separate OPTION tags with values
-corresponding to entries in opts. If any of these entries
-are a caseless match with init, then that OPTION tag is the
-default selection.
-
-
-
-Synopsis
-
-#include "libcgi/cgi.h"
-void print_input_blank(char *tname, unsigned size, char *init)
-
-Description
-Prints an HTML+ INPUT tag (of type text) to stdout. The tag's
-name is tname, its size is size, and initial value is init.
-
-
-
-Synopsis
-
-#include "libcgi/cgi.h"
-void print_submit(char *label)
-
-Description
-Prints an HTML+ INPUT tag of type submit to stdout. The submit
-button will be labelled by label if non-NULL.
-
-
-
-Synopsis
-
-#include "libcgi/cgi.h"
-char *trim(char *s)
-
-Description
-Changes the string from blank-padded to NULL-padded
-
-Returns
-its argument
-
-
-
-Synopsis
-
-#include "libcgi/cgi.h"
-char *sanitize(char *to, char *from)
-
-Description
-Prepares the string for inclusion in a URL. That is, the from
-string is copied to the to buffer except that blanks are turned
-into '+' characters and non-alphanumerics are turned into
-3-character sequences of a '%' followed by two hex digits
-corresponding to the ascii code.
-
-Returns
-the to string
-
-
-
-Synopsis
-
-#include "libcgi/cgi.h"
-char *strmaxcpy(char *s1, char *s2, int n)
-
-
-Description
-copies at most n-1 characters from s2 into s1, and then
-null-terminates. Handy for truncating while copying.
-
-Returns
-s1 as long as n > 0, NULL otherwise
-
-
-
-hypermail@hypermail.org
-
-
-
diff --git a/libcgi/main.c b/libcgi/main.c
deleted file mode 100644
index 51678423..00000000
--- a/libcgi/main.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp.
-** VeriFone Inc./Hewlett-Packard. All Rights Reserved.
-** Kevin Hughes, kev@kevcom.com 3/11/94
-** Kent Landfield, kent@landfield.com 4/6/97
-**
-** This program and library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU (Library) General Public License
-** as published by the Free Software Foundation; either version 2
-** of the License, or 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 (Library) General Public License for more details.
-**
-** You should have received a copy of the GNU (Library) 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
-*/
-
-/*
- * This file is part of the LIBCGI library
- *
- */
-
-#include "cgi.h"
-
-void cgi_main(cgi_info *ci);
-
-int main(void)
-{
- cgi_info ci;
-
- get_cgi_info(&ci);
- cgi_main(&ci);
- return (0);
-}
diff --git a/libcgi/mcode.c b/libcgi/mcode.c
deleted file mode 100644
index 891a3e3d..00000000
--- a/libcgi/mcode.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp.
-** VeriFone Inc./Hewlett-Packard. All Rights Reserved.
-** Kevin Hughes, kev@kevcom.com 3/11/94
-** Kent Landfield, kent@landfield.com 4/6/97
-**
-** This program and library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU (Library) General Public License
-** as published by the Free Software Foundation; either version 2
-** of the License, or 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 (Library) General Public License for more details.
-**
-** You should have received a copy of the GNU (Library) 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
-*/
-
-/*
- * This file is part of the LIBCGI library
- *
- */
-
-#include "cgi.h"
-
-int mcode(cgi_info *ci)
-{
- if (ci->request_method == NULL)
- return 0;
- else if (!strncasecmp(ci->request_method, "GET", 3))
- return MCODE_GET;
- else if (!strncasecmp(ci->request_method, "POST", 4))
- return MCODE_POST;
- else if (!strncasecmp(ci->request_method, "PUT", 3))
- return MCODE_PUT;
- else if (!strncasecmp(ci->request_method, "HEAD", 4))
- return MCODE_HEAD;
- else
- return 0;
-}
diff --git a/libcgi/strops.c b/libcgi/strops.c
deleted file mode 100644
index a402b4cb..00000000
--- a/libcgi/strops.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp.
-** VeriFone Inc./Hewlett-Packard. All Rights Reserved.
-** Kevin Hughes, kev@kevcom.com 3/11/94
-** Kent Landfield, kent@landfield.com 4/6/97
-**
-** This program and library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU (Library) General Public License
-** as published by the Free Software Foundation; either version 2
-** of the License, or 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 (Library) General Public License for more details.
-**
-** You should have received a copy of the GNU (Library) 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
-*/
-
-/*
-** This file is part of the LIBCGI library
-**
-*/
-
-#include "cgi.h"
-
-char *trim(char *s)
-{
- char *t = s;
-
- while (*t)
- t++;
- while (t > s && *--t == ' ')
- *t = 0;
- return s;
-}
-
-#if 0
-char *sanitize(char *buf, char *s)
-{
- char *t;
-
- for (t = buf; *s; s++)
- if (*s == ' ')
- *t++ = '+';
- else if (isalnum(*s))
- *t++ = *s;
- else {
- sprintf(t, "%%%2X", *s);
- t += 3;
- }
- *t = '\0';
- return buf;
-}
-#endif
-
-char *strmaxcpy(char *dest, char *src, int n)
-{
- char *d = dest;
-
- if (n < 1)
- return NULL;
- while (--n && *src)
- *d++ = *src++;
- *d = 0;
- return dest;
-}
diff --git a/libcgi/syn_mime.c b/libcgi/syn_mime.c
deleted file mode 100644
index f412be6c..00000000
--- a/libcgi/syn_mime.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp.
-** VeriFone Inc./Hewlett-Packard. All Rights Reserved.
-** Kevin Hughes, kev@kevcom.com 3/11/94
-** Kent Landfield, kent@landfield.com 4/6/97
-**
-** This program and library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU (Library) General Public License
-** as published by the Free Software Foundation; either version 2
-** of the License, or 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 (Library) General Public License for more details.
-**
-** You should have received a copy of the GNU (Library) 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
-*/
-
-/*
- * This file is part of the LIBCGI library
- *
- */
-
-#include "cgi.h"
-
-#if 0
-int syn_mimeheader(char *buf, char *ct)
-{
- int x;
-
- if (buf && ct) {
- x = (int)sprintf(buf, "Content-Type: %s\n\n", ct);
- return (x && x != EOF);
- }
- else
- return 0;
-}
-#endif
-
-int print_mimeheader(const char *ct)
-{
- return (ct && (printf("Content-Type: %s\n\n", ct) != EOF));
-}
diff --git a/libcgi/syn_url.c b/libcgi/syn_url.c
deleted file mode 100644
index 908e2dce..00000000
--- a/libcgi/syn_url.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp.
-** VeriFone Inc./Hewlett-Packard. All Rights Reserved.
-** Kevin Hughes, kev@kevcom.com 3/11/94
-** Kent Landfield, kent@landfield.com 4/6/97
-**
-** This program and library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU (Library) General Public License
-** as published by the Free Software Foundation; either version 2
-** of the License, or 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 (Library) General Public License for more details.
-**
-** You should have received a copy of the GNU (Library) 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
-*/
-
-/*
- * This file is part of the LIBCGI library
- *
- */
-
-#include "cgi.h"
-
-#if 0
-int syn_base_url(char *buf, cgi_info *ci)
-{
- int x;
-
- if (ci && buf) {
- x =
- (int)sprintf(buf, "http://%s:%s%s", ci->server_name,
- ci->server_port, ci->script_name);
- return (x && x != EOF);
- }
- else
- return 0;
-}
-#endif
-
-int print_base_url(cgi_info *ci)
-{
- return (ci &&
- (printf("http://%s:%s%s", ci->server_name, ci->server_port,
- ci->script_name) != EOF));
-}
diff --git a/libcgi/template.c b/libcgi/template.c
deleted file mode 100644
index 86d9789f..00000000
--- a/libcgi/template.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp.
-** VeriFone Inc./Hewlett-Packard. All Rights Reserved.
-** Kevin Hughes, kev@kevcom.com 3/11/94
-** Kent Landfield, kent@landfield.com 4/6/97
-**
-** This program and library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU (Library) General Public License
-** as published by the Free Software Foundation; either version 2
-** of the License, or 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 (Library) General Public License for more details.
-**
-** You should have received a copy of the GNU (Library) 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
-*/
-
-/*
- * This file is part of the LIBCGI library
- *
- */
-
-#include "cgi.h"
-
-void cgi_main(cgi_info *ci)
-{
- char *parmval();
- form_entry *parms, *p;
- form_entry *get_form_entries();
- char *foo, *bar;
-
- print_mimeheader("text/html");
-
- puts("Your Title Here ");
- puts("Your heading here
");
-
- parms = get_form_entries(ci);
- if (parms) {
- /* extract specific form parameters */
- for (p = parms; p; p = p->next) {
- if (strcasecmp(p->name, "foo"))
- foo = p->val;
- else if (strcasecmp(p->name, "bar"))
- bar = p->val;
- }
- }
-
- switch (mcode(ci)) {
-
- case MCODE_HEAD:
- return;
-
- case MCODE_GET:
- puts("Your GET response here");
- printf("based on foo=%s and bar=%s.\n", foo, bar);
- break;
-
- case MCODE_POST:
- puts("Your POST response here");
- printf("based on foo=%s and bar=%s.\n", foo, bar);
- break;
-
- default:
- printf("Unrecognized method '%s'.\n", ci->request_method);
- }
-
- free_form_entries(parms);
-}
diff --git a/m4/apr.m4 b/m4/apr.m4
new file mode 100644
index 00000000..ebc6a54d
--- /dev/null
+++ b/m4/apr.m4
@@ -0,0 +1,140 @@
+dnl Some macros borrowed from Apache's httpd config file. Thanks!
+
+dnl
+dnl APR_SUBDIR_CONFIG(dir [, sub-package-cmdline-args, args-to-drop])
+dnl
+dnl dir: directory to find configure in
+dnl sub-package-cmdline-args: arguments to add to the invocation (optional)
+dnl args-to-drop: arguments to drop from the invocation (optional)
+dnl
+dnl Note: This macro relies on ac_configure_args being set properly.
+dnl
+dnl The args-to-drop argument is shoved into a case statement, so
+dnl multiple arguments can be separated with a |.
+dnl
+dnl Note: Older versions of autoconf do not single-quote args, while 2.54+
+dnl places quotes around every argument. So, if you want to drop the
+dnl argument called --enable-layout, you must pass the third argument as:
+dnl [--enable-layout=*|\'--enable-layout=*]
+dnl
+dnl Trying to optimize this is left as an exercise to the reader who wants
+dnl to put up with more autoconf craziness. I give up.
+dnl
+AC_DEFUN([APR_SUBDIR_CONFIG], [
+ # save our work to this point; this allows the sub-package to use it
+ AC_CACHE_SAVE
+
+ echo "configuring package in $1 now"
+ ac_popdir=`pwd`
+ apr_config_subdirs="$1"
+ test -d $1 || $mkdir_p $1
+ ac_abs_srcdir=`(cd $srcdir/$1 && pwd)`
+ cd $1
+
+changequote(, )dnl
+ # A "../" for each directory in /$config_subdirs.
+ ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
+changequote([, ])dnl
+
+ # Make the cache file pathname absolute for the subdirs
+ # required to correctly handle subdirs that might actually
+ # be symlinks
+ case "$cache_file" in
+ /*) # already absolute
+ ac_sub_cache_file=$cache_file ;;
+ *) # Was relative path.
+ ac_sub_cache_file="$ac_popdir/$cache_file" ;;
+ esac
+
+ ifelse($3, [], [apr_configure_args=$ac_configure_args],[
+ apr_configure_args=
+ apr_sep=
+ for apr_configure_arg in $ac_configure_args
+ do
+ case "$apr_configure_arg" in
+ $3)
+ continue ;;
+ esac
+ apr_configure_args="$apr_configure_args$apr_sep'$apr_configure_arg'"
+ apr_sep=" "
+ done
+ ])
+
+ dnl autoconf doesn't add --silent to ac_configure_args; explicitly pass it
+ test "x$silent" = "xyes" && apr_configure_args="$apr_configure_args --silent"
+
+ dnl AC_CONFIG_SUBDIRS silences option warnings, emulate this for 2.62
+ apr_configure_args="--disable-option-checking $apr_configure_args"
+
+ dnl The eval makes quoting arguments work - specifically the second argument
+ dnl where the quoting mechanisms used is "" rather than [].
+ dnl
+ dnl We need to execute another shell because some autoconf/shell combinations
+ dnl will choke after doing repeated APR_SUBDIR_CONFIG()s. (Namely Solaris
+ dnl and autoconf-2.54+)
+ if eval $SHELL $ac_abs_srcdir/configure $apr_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir $2
+ then :
+ echo "$1 configured properly"
+ else
+ echo "configure failed for $1"
+ exit 1
+ fi
+
+ cd $ac_popdir
+
+ # grab any updates from the sub-package
+ AC_CACHE_LOAD
+])dnl
+
+dnl
+dnl APR_ADDTO(variable, value)
+dnl
+dnl Add value to variable
+dnl
+AC_DEFUN([APR_ADDTO], [
+ if test "x$$1" = "x"; then
+ test "x$silent" != "xyes" && echo " setting $1 to \"$2\""
+ $1="$2"
+ else
+ apr_addto_bugger="$2"
+ for i in $apr_addto_bugger; do
+ apr_addto_duplicate="0"
+ for j in $$1; do
+ if test "x$i" = "x$j"; then
+ apr_addto_duplicate="1"
+ break
+ fi
+ done
+ if test $apr_addto_duplicate = "0"; then
+ test "x$silent" != "xyes" && echo " adding \"$i\" to $1"
+ $1="$$1 $i"
+ fi
+ done
+ fi
+])dnl
+
+dnl
+dnl APR_REMOVEFROM(variable, value)
+dnl
+dnl Remove a value from a variable
+dnl
+AC_DEFUN([APR_REMOVEFROM], [
+ if test "x$$1" = "x$2"; then
+ test "x$silent" != "xyes" && echo " nulling $1"
+ $1=""
+ else
+ apr_new_bugger=""
+ apr_removed=0
+ for i in $$1; do
+ if test "x$i" != "x$2"; then
+ apr_new_bugger="$apr_new_bugger $i"
+ else
+ apr_removed=1
+ fi
+ done
+ if test $apr_removed = "1"; then
+ test "x$silent" != "xyes" && echo " removed \"$2\" from $1"
+ $1=$apr_new_bugger
+ fi
+ fi
+]) dnl
diff --git a/patchlevel.h b/patchlevel.h
index 389e0790..542bc256 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -1,2 +1,2 @@
-#define VERSION "2.4.0"
-#define PATCHLEVEL "0"
+#define VERSION "3.0.0"
+
diff --git a/src/Makefile.in b/src/Makefile.in
index 2838fa4b..4344107c 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -14,9 +14,6 @@ bindir=@bindir@
# This is where the man page goes
mandir=@mandir@
-# This is where your CGI programs live
-cgidir=@cgidir@
-
# Executable program suffix (.exe for windows, null for Unix systems)
SUFFIX=@suffix@
@@ -28,44 +25,51 @@ INSTALL_PROG=@INSTALL@
SPLINTFLAGS=@INCLUDES@
-PCRE_DEP=@PCRE_DEP@
+PCRE2_DEP=@PCRE2_DEP@
TRIO_DEP=@TRIO_DEP@
FNV_DEP=@FNV_DEP@
#WNOERROR=-Werror
-#WARNINGS=$(WNOERROR) -ansi -pedantic -Wall -Wtraditional -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Dlint
+# Note that -ansi and -std=iso9899:199409 seem to be equivalent in gcc as it
+# doesn't support the
+# for clang -std=c90
+# @@ make this part of autoconf?
+#WARNINGS=$(WNOERROR) -Wall -Wextra -std=iso9899:199409 -pedantic -Wno-overlength-strings -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Dlint
+
+# While waiting to put this in configure.ac
+# Note: if you're debugging memory issues (leaks, overruns, unallocated memory use)
+# Add the folowing two warnings -fsanitize=address -fno-omit-frame-pointer
+# and -static-libasan to LIBS
CFLAGS=@CFLAGS@ $(WARNINGS)
CPPFLAGS=@CPPFLAGS@ @INCLUDES@
YACC=@YACC@
-NETLIBS=@LIBS@
LDFLAGS=@LDFLAGS@
-MISC_LIBS= -lpcre -ltrio -lm
+MISC_LIBS= -lpcre2-8 -ltrio -lm
OPT_LIBS=@EXTRA_LIBS@
INCS= domains.h hypermail.h lang.h proto.h \
../config.h ../patchlevel.h dsprintf.h threadprint.h \
- getdate.h getname.h finelink.h txt2html.h search.h
+ getdate.h getname.h finelink.h txt2html.h search.h \
+ utf8.h
SRCS= base64.c date.c domains.c file.c hypermail.c lang.c lock.c \
- mem.c parse.c print.c printfile.c string.c struct.c uudecode.c\
+ mem.c parse.c print.c printfile.c printcss.c string.c struct.c uudecode.c\
dmatch.c setup.c threadprint.c getdate.c getname.c\
finelink.c txt2html.c search.c quotes.c
OBJS= base64.o date.o domains.o file.o hypermail.o lang.o lock.o \
- mem.o parse.o print.o printfile.o string.o struct.o uudecode.o\
+ mem.o parse.o print.o printfile.o printcss.o string.o struct.o uudecode.o\
dmatch.o setup.o threadprint.o getdate.o getname.o\
finelink.o txt2html.o search.o quotes.o
-MAILOBJS= mail.o ../libcgi/libcgi.a
-
.c.o:
$(CC) -c $(CFLAGS) $(CPPFLAGS) $<
-all: @PCRE_DEP@ @TRIO_DEP@ @FNV_DEP@ hypermail$(SUFFIX) mail$(SUFFIX) lang$(SUFFIX)
+all: @PCRE2_DEP@ @TRIO_DEP@ @FNV_DEP@ hypermail$(SUFFIX) lang$(SUFFIX)
-pcre/.libs/libpcre.a:
- @cd pcre; $(MAKE) CC="$(CC)" ; rm -f .libs/lib*.so*
+pcre2/.libs/libpcre2-8.a:
+ @cd pcre2; $(MAKE) CC="$(CC)" ; rm -f .libs/lib*.so*
trio/libtrio.a:
@cd trio; $(MAKE) CC="$(CC)"
@@ -77,32 +81,24 @@ hypermail$(SUFFIX): $(OBJS)
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(OPT_LIBS) $(MISC_LIBS)
chmod 0755 $@
-mail$(SUFFIX): $(MAILOBJS)
- $(CC) -o $@ $(CFLAGS) $(MAILOBJS) $(NETLIBS) -lm
- chmod 0755 $@
-
lang$(SUFFIX): lang.c lang.h
$(CC) -DLANG_PROG $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ lang.c $(MISC_LIBS)
-../libcgi/libcgi.a:
- @cd ../libcgi; $(MAKE) all CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)"
-
getdate.c: getdate.y getdate.h
@echo "Expect 13 shift/reduce conflicts."
$(YACC) getdate.y
@mv -f y.tab.c getdate.c
+convert-css: ../docs/hypermail.css ../contrib/css_to_c.pl
+ @echo "Converting ../docs/hypermail.css to printcss.c"
+ @perl ../contrib/css_to_c.pl ../docs/hypermail.css > printcss.c
+
install: all
@if [ ! -d $(bindir) ]; then mkdir -p $(bindir); fi
$(INSTALL_PROG) -s -c -m 0755 hypermail$(SUFFIX) $(bindir)
-mail.install:
- @if [ ! -d $(cgidir) ]; then mkdir -p $(cgidir); fi
- $(INSTALL_PROG) -s -c -m 0755 mail$(SUFFIX) $(cgidir)
-
uninstall:
rm -f $(bindir)/hypermail$(SUFFIX)
- rm -f $(cgidir)/mail$(SUFFIX)
insight:
$(MAKE) CC="insight"
@@ -122,31 +118,24 @@ splint:
lint:
lint $(SRCS) 2>&1 | tee lint.out
-lint_mail:
- lint mail.c 2>&1 | tee lint.out
- @(cd ../libcgi; $(MAKE) lint 2>&1 | tee -a ../lint.out)
-
clean:
- rm -f hypermail$(SUFFIX) mail$(SUFFIX) lang$(SUFFIX)
+ rm -f hypermail$(SUFFIX) lang$(SUFFIX)
rm -f *.o .pure *qx *qv *.ln core
rm -f .inslog tca.map lint.out splint.out
rm -f getdate.c
- @(if test "$(PCRE_DEP)" != "" ; then cd pcre; $(MAKE) clean; fi)
+ @(if test "$(PCRE2_DEP)" != "" ; then cd pcre2; $(MAKE) clean; fi)
@(if test "$(TRIO_DEP)" != "" ; then cd trio; $(MAKE) clean; fi)
@(if test "$(FNV_DEP)" != "" ; then cd fnv; $(MAKE) clean; fi)
- @cd ../libcgi; $(MAKE) clean
clobber: clean
- @(if test "$(PCRE_DEP)" != "" ; then cd pcre; rm -f *.lock; fi)
+ @(if test "$(PCRE_DEP2)" != "" ; then cd pcre2; rm -f *.lock; fi)
@(if test "$(TRIO_DEP)" != ""; then cd trio; rm -f *.lock; fi)
@(if test "$(FNV_DEP)" != "" ; then cd fnv; $(MAKE) clobber; fi)
- @cd ../libcgi; $(MAKE) clobber
distclean: clobber
- @(if test "$(PCRE_DEP)" != "" ; then cd pcre; $(MAKE) distclean; fi)
+ @(if test "$(PCRE2_DEP)" != "" ; then cd pcre2; $(MAKE) distclean; fi)
@(if test "$(TRIO_DEP)" != ""; then cd trio; $(MAKE) clean; fi)
@(if test "$(FNV_DEP)" != "" ; then cd fnv; $(MAKE) distclean; fi)
- @cd ../libcgi; $(MAKE) distclean
#
# Regenerate this dependency list with gcc -MM *.c:
@@ -170,15 +159,18 @@ hypermail.o: hypermail.c hypermail.h ../config.h ../patchlevel.h proto.h \
lang.o: lang.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h
lock.o: lock.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h \
setup.h
-mail.o: mail.c ../libcgi/cgi.h ../libcgi/../config.h ../config.h
mem.o: mem.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h
parse.o: parse.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h \
setup.h struct.h uudecode.h base64.h search.h getname.h parse.h print.h
print.o: print.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h \
setup.h struct.h printfile.h print.h parse.h txt2html.h finelink.h \
threadprint.h
+printcss.o: printcss.c hypermail.h ../config.h ../patchlevel.h proto.h \
+ lang.h setup.h
printfile.o: printfile.c hypermail.h ../config.h ../patchlevel.h proto.h \
lang.h setup.h print.h printfile.h struct.h
+printcss.o: printcss.c hypermail.h ../config.h ../patchlevel.h proto.h \
+ lang.h setup.h
quotes.o: quotes.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h \
setup.h
search.o: search.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h \
@@ -186,7 +178,7 @@ search.o: search.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h \
setup.o: setup.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h \
defaults.h setup.h struct.h print.h
string.o: string.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h \
- setup.h parse.h uconvert.h
+ setup.h parse.h uconvert.h utf8.h
struct.o: struct.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h \
dmatch.h setup.h struct.h parse.h getname.h
threadprint.o: threadprint.c hypermail.h ../config.h ../patchlevel.h \
@@ -195,3 +187,4 @@ txt2html.o: txt2html.c hypermail.h ../config.h ../patchlevel.h proto.h \
lang.h setup.h print.h finelink.h txt2html.h
uudecode.o: uudecode.c hypermail.h ../config.h ../patchlevel.h proto.h \
lang.h setup.h uudecode.h
+
diff --git a/src/base64.c b/src/base64.c
index b28b92ec..a34b28cf 100644
--- a/src/base64.c
+++ b/src/base64.c
@@ -10,85 +10,146 @@
**
** - Encoded strings that ended with more than one = caused the decode
** function+ to generate 3 extra zero bytes at the end of the output.
+**
+** CHANGES by Andy Valencia - May 15 2023:
+**
+** - Preserve decoding state between calls to the
+** base64_stream_decode() function to take into account UA that
+** output intermediate base64 lines that are not always multiple of
+** four.
*/
#include "hypermail.h"
#include "base64.h"
-void base64Decode(char *intext, char *out, int *length)
+/*
+ * base64_decoder_state_new()
+ * Allocate a new base64 decoder state
+ */
+struct base64_decoder_state *base64_decoder_state_new(void)
+{
+ struct base64_decoder_state *st = (struct base64_decoder_state *)emalloc(sizeof(struct base64_decoder_state));
+ if (!st) {
+ return(0);
+ }
+ memset(st, 0, sizeof(struct base64_decoder_state));
+ return(st);
+}
+
+/*
+ * base64_decoder_state_free()
+ * Release storage
+ */
+void base64_decoder_state_free(struct base64_decoder_state *st)
+{
+ free(st);
+}
+
+/*
+ * base64_decode_stream()
+ *
+ * Accept base64 "intext",
+ * place resulting decoded output in a null-terminated "out".
+ *
+ * "st" is our state, which will be updated and can carry state between
+ * calls.
+ */
+int base64_decode_stream(struct base64_decoder_state *st, const char *intext, char *out)
{
- unsigned char ibuf[4];
- unsigned char obuf[3];
char ignore;
- char endtext = FALSE;
char ch;
- int lindex = 0;
- *length = 0;
-
- memset(ibuf, 0, sizeof(ibuf));
+ int length;
+
+ /* Ignore trailing garbage */
+ if (st->endtext) {
+ *out = '\0';
+ return(0);
+ }
+ length = 0;
while (*intext) {
ch = *intext;
-
ignore = FALSE;
- if ((ch >= 'A') && (ch <= 'Z'))
+
+ if ((ch >= 'A') && (ch <= 'Z')) {
ch = ch - 'A';
- else if ((ch >= 'a') && (ch <= 'z'))
+ } else if ((ch >= 'a') && (ch <= 'z')) {
ch = ch - 'a' + 26;
- else if ((ch >= '0') && (ch <= '9'))
+ } else if ((ch >= '0') && (ch <= '9')) {
ch = ch - '0' + 52;
- else if (ch == '+')
+ } else if (ch == '+') {
ch = 62;
- else if (ch == '=') { /* end of text */
- if (endtext)
+ } else if (ch == '=') { /* end of text */
+ if (st->endtext) {
break;
- endtext = TRUE;
- lindex--;
- if (lindex < 0)
- lindex = 3;
- }
- else if (ch == '/')
+ }
+ st->endtext = TRUE;
+ st->lindex--;
+ if (st->lindex < 0) {
+ st->lindex = 3;
+ }
+ } else if (ch == '/') {
ch = 63;
- else if (endtext)
+ } else if (st->endtext) {
break;
- else
+ } else {
ignore = TRUE;
-
+ }
+
if (!ignore) {
- if (!endtext) {
- ibuf[lindex] = ch;
+ if (!st->endtext) {
+ st->ibuf[st->lindex] = ch;
- lindex++;
- lindex &= 3; /* use bit arithmetic instead of remainder */
+ st->lindex++;
+ st->lindex &= 3; /* use bit arithmetic instead of remainder */
}
- if ((0 == lindex) || endtext) {
-
- obuf[0] = (ibuf[0] << 2) | ((ibuf[1] & 0x30) >> 4);
- obuf[1] =
- ((ibuf[1] & 0x0F) << 4) | ((ibuf[2] & 0x3C) >> 2);
- obuf[2] = ((ibuf[2] & 0x03) << 6) | (ibuf[3] & 0x3F);
+ if ((0 == st->lindex) || st->endtext) {
- switch (lindex) {
+ st->obuf[0] = (st->ibuf[0] << 2) | ((st->ibuf[1] & 0x30) >> 4);
+ st->obuf[1] =
+ ((st->ibuf[1] & 0x0F) << 4) | ((st->ibuf[2] & 0x3C) >> 2);
+ st->obuf[2] = ((st->ibuf[2] & 0x03) << 6) | (st->ibuf[3] & 0x3F);
+
+ switch (st->lindex) {
case 1:
- sprintf(out, "%c", obuf[0]);
- out++;
- (*length)++;
+ *out++ = st->obuf[0];
+ length += 1;
break;
case 2:
- sprintf(out, "%c%c", obuf[0], obuf[1]);
- out += 2;
- (*length) += 2;
+ *out++ = st->obuf[0];
+ *out++ = st->obuf[1];
+ length += 2;
break;
default:
- sprintf(out, "%c%c%c", obuf[0], obuf[1], obuf[2]);
- out += 3;
- (*length) += 3;
+ *out++ = st->obuf[0];
+ *out++ = st->obuf[1];
+ *out++ = st->obuf[2];
+ length += 3;
break;
}
- memset(ibuf, 0, sizeof(ibuf));
+ memset(st->ibuf, 0, sizeof(st->ibuf));
}
}
intext++;
}
*out = 0;
+ return (length);
+}
+
+/*
+ * base64_decode_string()
+ * Convenience wrapper when decoding a single string
+ */
+int base64_decode_string(const char *intext, char *out)
+{
+ struct base64_decoder_state *st = base64_decoder_state_new();
+ int length = 0;
+
+ if (!st) {
+ return 0;
+ }
+ length = base64_decode_stream(st, intext, out);
+ base64_decoder_state_free(st);
+
+ return (length);
}
diff --git a/src/base64.h b/src/base64.h
index a0d5b0dc..e98e0977 100644
--- a/src/base64.h
+++ b/src/base64.h
@@ -1,5 +1,43 @@
+#ifndef _HYPERMAIL_BASE64_H
+#define _HYPERMAIL_BASE64_H
+/*
+** Copyright (C) 1997-2023 Hypermail Project
+**
+** This program and library is free software; you can redistribute it and/or
+** modify it under the terms of the GNU (Library) General Public License
+** as published by the Free Software Foundation; either version 3
+** of the License, or 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 (Library) General Public License for more details.
+**
+** You should have received a copy of the GNU (Library) 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
+*/
+
/*
** MIME Decode - base64.c
*/
-void base64Decode(char *, char *, int *);
+/* Common state as you feed successive lines into base64_decode_stream() */
+struct base64_decoder_state {
+ unsigned char ibuf[4]; /* input buffer */
+ unsigned char obuf[3]; /* output buffer */
+ int lindex; /* index for ibuf / obuf */
+ char endtext; /* base64 end detected */
+};
+
+/* allocate and free a base64_state structure */
+struct base64_decoder_state *base64_decoder_state_new(void);
+void base64_decoder_state_free(struct base64_decoder_state *);
+
+/* decode a stream made of multiple base64 lines */
+int base64_decode_stream(struct base64_decoder_state *, const char *, char *);
+
+/* decode a single string */
+int base64_decode_string(const char *, char *);
+
+#endif /* _HYPERMAIL_BASE64_H */
diff --git a/src/date.c b/src/date.c
index 660c34be..00a632b0 100644
--- a/src/date.c
+++ b/src/date.c
@@ -3,6 +3,7 @@
** VeriFone Inc./Hewlett-Packard. All Rights Reserved.
** Kevin Hughes, kev@kevcom.com 3/11/94
** Kent Landfield, kent@landfield.com 4/6/97
+** Hypermail Project 1998-2023
**
** This program and library is free software; you can redistribute it and/or
** modify it under the terms of the GNU (Library) General Public License
diff --git a/src/defaults.h.in b/src/defaults.h.in
index 44bbec97..ca83ef07 100644
--- a/src/defaults.h.in
+++ b/src/defaults.h.in
@@ -11,6 +11,8 @@
#define CONFIGFILE "~/.hmrc"
+#define MSG_FRAGMENT_PREFIX "msg"
+
#define INLINE_TYPES "image/gif image/jpeg image/png"
#define SHOW_HEADERS "From Subject Date Message-ID"
@@ -27,10 +29,31 @@
#define DEFAULTINDEX "@defaultindex@"
+#define DEFAULT_TOP_INDEX "folders"
+
#define DOMAINADDR "@domainaddr@"
#define ANTISPAM_AT "_at_"
+#define APPLE_MAIL_UA_HEADER "X-Mailer"
+
#define APPLE_MAIL_UA "Apple iPhone iPad"
+#define DEFAULT_CHARSET "US-ASCII"
+
+#define HM_ANNOTATION_HEADER "X-Hypermail-Annotated"
+
+#define HM_DELETED_HEADERS "X-Hypermail-Deleted X-No-Archive"
+
+#define EXPIRES_HEADER "Expires"
+
+#define NEW_MSG_COMMAND "mailto:$TO"
+
+#define REPLYMSG_COMMAND "not set"
+
+#define DEFAULT_CSS_URL "hypermail.css"
+
+/* this is a format string where %s will be replaced by the archive's label */
+#define DEFAULT_MHTML_NAVBAR2UP "\n - %s
\n
\n"
+
#endif
diff --git a/src/dmatch.c b/src/dmatch.c
index f6d8d2d4..fd328810 100644
--- a/src/dmatch.c
+++ b/src/dmatch.c
@@ -1,3 +1,21 @@
+/*
+** Copyright (C) 1997-2023 Hypermail Project
+**
+** This program and library is free software; you can redistribute it and/or
+** modify it under the terms of the GNU (Library) General Public License
+** as published by the Free Software Foundation; either version 3
+** of the License, or 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 (Library) General Public License for more details.
+**
+** You should have received a copy of the GNU (Library) 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
+*/
+
/*
The shortest ever? 88 characters...
diff --git a/src/dmatch.h b/src/dmatch.h
index 353b717c..dfe2d07f 100644
--- a/src/dmatch.h
+++ b/src/dmatch.h
@@ -1 +1,23 @@
+#ifndef _HYPERMAIL_DMATCH_H
+#define _HYPERMAIL_DMATCH_H
+/*
+** Copyright (C) 1997-2023 Hypermail Project
+**
+** This program and library is free software; you can redistribute it and/or
+** modify it under the terms of the GNU (Library) General Public License
+** as published by the Free Software Foundation; either version 3
+** of the License, or 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 (Library) General Public License for more details.
+**
+** You should have received a copy of the GNU (Library) 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
+*/
+
char Match(char *, char *);
+
+#endif /* _HYPERMAIL_DMATCH_H */
diff --git a/src/domains.c b/src/domains.c
index 324a1322..f5e1636a 100644
--- a/src/domains.c
+++ b/src/domains.c
@@ -1,3 +1,21 @@
+/*
+** Copyright (C) 1997-2023 Hypermail Project
+**
+** This program and library is free software; you can redistribute it and/or
+** modify it under the terms of the GNU (Library) General Public License
+** as published by the Free Software Foundation; either version 3
+** of the License, or 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 (Library) General Public License for more details.
+**
+** You should have received a copy of the GNU (Library) 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
+*/
+
#include "hypermail.h"
#include "domains.h"
diff --git a/src/domains.h b/src/domains.h
index 6d3eeaaa..7645fee8 100644
--- a/src/domains.h
+++ b/src/domains.h
@@ -1,3 +1,23 @@
+#ifndef _HYPERMAIL_DOMAINS_H
+#define _HYPERMAIL_DOMAINS_H
+/*
+** Copyright (C) 1997-2023 Hypermail Project
+**
+** This program and library is free software; you can redistribute it and/or
+** modify it under the terms of the GNU (Library) General Public License
+** as published by the Free Software Foundation; either version 3
+** of the License, or 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 (Library) General Public License for more details.
+**
+** You should have received a copy of the GNU (Library) 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
+*/
+
/*
** @(#)domains.h 1.17 03/09/03 - Kent Landfield
*/
@@ -284,3 +304,5 @@ struct co_code domain_codes[] = {
#define num_root_domains (sizeof (domain_codes) / sizeof (struct co_code))
#define MIN_DOMAIN_LEN 2
+
+#endif /* _HYPERMAIL_DOMAINS_H */
diff --git a/src/file.c b/src/file.c
index 5aafc834..6917ca6c 100644
--- a/src/file.c
+++ b/src/file.c
@@ -3,11 +3,12 @@
** VeriFone Inc./Hewlett-Packard. All Rights Reserved.
** Kevin Hughes, kev@kevcom.com 3/11/94
** Kent Landfield, kent@landfield.com 4/6/97
+** Hypermail Project 1998-2023
**
** This program and library is free software; you can redistribute it and/or
** modify it under the terms of the GNU (Library) General Public License
-** as published by the Free Software Foundation; either version 2
-** of the License, or any later version.
+** as published by the Free Software Foundation; either version 3
+** of the License, or 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
@@ -63,7 +64,7 @@ int isfile(char *path)
if (stat(path, &stbuf))
return 0;
- return ((stbuf.st_mode & S_IFMT) == S_IFREG) ? 1 : 0;
+ return (S_ISREG(stbuf.st_mode)) ? 1 : 0;
}
/*
@@ -76,7 +77,7 @@ int isdir(char *path)
if (stat(path, &stbuf))
return 0;
- return ((stbuf.st_mode & S_IFMT) == S_IFDIR) ? 1 : 0;
+ return (S_ISDIR(stbuf.st_mode)) ? 1 : 0;
}
/*
@@ -98,7 +99,7 @@ void check1dir(char *dir)
if (errno != ENOENT || mkdir(dir, set_dirmode) < 0) {
#endif
if (errno != EEXIST) {
- snprintf(errmsg, sizeof(errmsg), "%s \"%s\".", lang[MSG_CANNOT_CREATE_DIRECTORY], dir);
+ trio_snprintf(errmsg, sizeof(errmsg), "%s \"%s\".", lang[MSG_CANNOT_CREATE_DIRECTORY], dir);
progerr(errmsg);
}
}
@@ -106,7 +107,7 @@ void check1dir(char *dir)
printf(" %s \"%s\", %s %o.\n", lang[MSG_CREATING_DIRECTORY], dir, lang[MSG_MODE], set_dirmode);
if (chmod(dir, set_dirmode) == -1) {
- snprintf(errmsg, sizeof(errmsg), "%s \"%s\" to %o.", lang[MSG_CANNOT_CHMOD], dir, set_dirmode);
+ trio_snprintf(errmsg, sizeof(errmsg), "%s \"%s\" to %o.", lang[MSG_CANNOT_CHMOD], dir, set_dirmode);
progerr(errmsg);
}
}
@@ -139,7 +140,7 @@ void checkdir(char *dir)
if (errno != ENOENT || mkdir(dir, set_dirmode) < 0) {
#endif
if (errno != EEXIST) {
- snprintf(errmsg, sizeof(errmsg), "%s \"%s\".", lang[MSG_CANNOT_CREATE_DIRECTORY], dir);
+ trio_snprintf(errmsg, sizeof(errmsg), "%s \"%s\".", lang[MSG_CANNOT_CREATE_DIRECTORY], dir);
progerr(errmsg);
}
}
@@ -150,7 +151,7 @@ void checkdir(char *dir)
printf(" %s \"%s\", %s %o.\n", lang[MSG_CREATING_DIRECTORY], dir, lang[MSG_MODE], set_dirmode);
if (chmod(dir, set_dirmode) == -1) {
- snprintf(errmsg, sizeof(errmsg), "%s \"%s\" to %o.", lang[MSG_CANNOT_CHMOD], dir, set_dirmode);
+ trio_snprintf(errmsg, sizeof(errmsg), "%s \"%s\" to %o.", lang[MSG_CANNOT_CHMOD], dir, set_dirmode);
progerr(errmsg);
}
}
@@ -288,13 +289,13 @@ void readconfigs(char *path, int cmd_show_variables)
** location for the config file and go on to try $HOME.
*/
if ((pp = getpwuid(getuid())) != NULL) {
- snprintf(tmppath, sizeof(tmppath), "%s%s", pp->pw_dir, path + 1); /* AUDIT biege: who gurantees that path+1 contains data? */
+ trio_snprintf(tmppath, sizeof(tmppath), "%s%s", pp->pw_dir, path + 1); /* AUDIT biege: who gurantees that path+1 contains data? */
ConfigInit(tmppath);
}
else
#endif
if ((ep = getenv("HOME")) != NULL) { /* AUDIT biege: possible BOF.. but it's not setuid.. so why to care? */
- snprintf(tmppath, sizeof(tmppath), "%s%s", ep, path + 1); /* AUDIT biege: who gurantees that path+1 contains data? */
+ trio_snprintf(tmppath, sizeof(tmppath), "%s%s", ep, path + 1); /* AUDIT biege: who gurantees that path+1 contains data? */
ConfigInit(tmppath);
}
/*
@@ -317,7 +318,7 @@ void symlink_latest()
** skip that whole thing and ignore that option.
*/
#ifdef __LCC__
- snprintf(errmsg, sizeof(errmsg),
+ trio_snprintf(errmsg, sizeof(errmsg),
"WARNING: latest_folder not supported in Win32 environment.\n");
fprintf(stderr, "%s", errmsg);
#else
@@ -330,13 +331,13 @@ void symlink_latest()
trio_snprintf(filename, MAXFILELEN, "%s%s", set_dir, set_latest_folder);
if (!stat(filename, &stbuf) && unlink(filename)) {
- snprintf(errmsg, sizeof(errmsg), "%s \"%s\" (latest_folder option).", lang[MSG_CANNOT_UNLINK], filename);
+ trio_snprintf(errmsg, sizeof(errmsg), "%s \"%s\" (latest_folder option).", lang[MSG_CANNOT_UNLINK], filename);
progerr(errmsg);
return;
}
if (symlink(latest_folder_path, filename)) {
- snprintf(errmsg, sizeof(errmsg), "%s \"%s\" (latest_folder option).", lang[MSG_CANNOT_CREATE_SYMLINK], filename);
+ trio_snprintf(errmsg, sizeof(errmsg), "%s \"%s\" (latest_folder option).", lang[MSG_CANNOT_CREATE_SYMLINK], filename);
progerr(errmsg);
return;
}
@@ -392,7 +393,7 @@ int find_max_msgnum()
return -1;
dir = opendir(s_dir);
if (dir == NULL) {
- snprintf(errmsg, sizeof(errmsg), "internal error find_max_msgnum opening \"%s\".", s_dir);
+ trio_snprintf(errmsg, sizeof(errmsg), "internal error find_max_msgnum opening \"%s\".", s_dir);
progerr(errmsg);
}
}
diff --git a/src/finelink.c b/src/finelink.c
index e320f8c1..845e7b71 100644
--- a/src/finelink.c
+++ b/src/finelink.c
@@ -59,7 +59,7 @@ static struct body *place_anchor(const String_Match * match_info,
if (*ptr == match_info->start_match) {
strcpy(token, last_ptr);
*last_ptr = 0;
- fprintf(fp2, "%s", buffer, anchor);
+ fprintf(fp2, "%s", buffer, anchor);
strcpy(buffer, token);
*ptr = last_ptr0;
return bp;
@@ -86,7 +86,7 @@ static struct body *place_anchor(const String_Match * match_info,
if (0)
printf("No match found %s; %s", anchor, buffer);
}
- fprintf(fp2, "", anchor);
+ fprintf(fp2, "", anchor);
return bp;
}
@@ -95,7 +95,9 @@ static int place_a_end(const String_Match * match_info, struct body **bp, char *
int index;
char token[MAXLINE];
char *ptr1 = buffer;
+#ifdef IS_THIS_NEEDED_20230503
char *last_ptr = ptr1;
+#endif
char *tptr;
if (!*bp)
return FALSE;
@@ -106,7 +108,9 @@ static int place_a_end(const String_Match * match_info, struct body **bp, char *
fprintf(fp2, "%s%s", buffer, token);
return TRUE;
}
+#ifdef IS_THIS_NEEDED_20230503
last_ptr = ptr1;
+#endif
if (!(tptr = strstr(ptr1, *ptr))) {
int len = (4 * strlen(*ptr)) / 5;
char *temp1 = (char *)emalloc(len + 1);
@@ -168,7 +172,7 @@ static int add_anchor(int msgnum, int quoting_msgnum, int quote_num, const char
}
tmpfilename = htmlfilename("tmp", ep, "tmp"); /* AUDIT biege: where is the tmp-file created? cwd? what about checking the return-value */
if ((fp2 = fopen(tmpfilename, "w")) == NULL) {
- snprintf(errmsg, sizeof(errmsg), "Couldn't write \"%s\".", tmpfilename);
+ trio_snprintf(errmsg, sizeof(errmsg), "Couldn't write \"%s\".", tmpfilename);
progerr(errmsg);
}
while (fgets(buffer, sizeof(buffer), fp1)) {
@@ -242,11 +246,11 @@ static int add_anchor(int msgnum, int quoting_msgnum, int quote_num, const char
remove(tmpfilename);
else {
if (rename(tmpfilename, filename) == -1) {
- snprintf(errmsg, sizeof(errmsg), "Couldn't rename \"%s\" to %s.", tmpfilename, filename);
+ trio_snprintf(errmsg, sizeof(errmsg), "Couldn't rename \"%s\" to %s.", tmpfilename, filename);
progerr(errmsg);
}
if (chmod(filename, set_filemode) == -1) {
- snprintf(errmsg, sizeof(errmsg), "Couldn't chmod \"%s\" to %o.", filename, set_filemode);
+ trio_snprintf(errmsg, sizeof(errmsg), "Couldn't chmod \"%s\" to %o.", filename, set_filemode);
progerr(errmsg);
}
}
@@ -430,7 +434,7 @@ int handle_quoted_text(FILE *fp, struct emailinfo *email, const struct body *bp,
tmpline[part2 - line] = 0;
}
if (set_link_to_replies)
- fprintf(fp, "", quote_num);
+ fprintf(fp, "", quote_num);
p2 = ConvURLsString(part2, email->msgid, email->subject, email->charset);
if (replacing)
fprintf(fp, fmt1, url1, set_quote_link_string, p2 ? p2 : "");
@@ -510,7 +514,7 @@ int get_new_reply_to()
* "In reply to"
*/
-void replace_maybe_replies(const char *filename, struct emailinfo *ep, int new_reply_to)
+void replace_maybe_replies(const char *filename, struct emailinfo *ep, int local_new_reply_to)
{
char tmpfilename[MAXFILELEN];
char buffer[MAXLINE];
@@ -520,15 +524,15 @@ void replace_maybe_replies(const char *filename, struct emailinfo *ep, int new_r
char *ptr;
static const char *prev_patt0 = ".html\">[ Previous ]";
- if (!hashnumlookup(new_reply_to, &ep2))
+ if (!hashnumlookup(local_new_reply_to, &ep2))
return;
- snprintf(tmpfilename, sizeof(tmpfilename), "%s/aaaa.tmp", set_dir); /* AUDIT biege: poss. BOF. */
+ trio_snprintf(tmpfilename, sizeof(tmpfilename), "%s/aaaa.tmp", set_dir); /* AUDIT biege: poss. BOF. */
if ((fp1 = fopen(filename, "r")) == NULL) {
- snprintf(errmsg, sizeof(errmsg), "Couldn't read \"%s\".", filename);
+ trio_snprintf(errmsg, sizeof(errmsg), "Couldn't read \"%s\".", filename);
progerr(errmsg);
}
if ((fp2 = fopen(tmpfilename, "w")) == NULL) {
- snprintf(errmsg, sizeof(errmsg), "Couldn't write \"%s\".", tmpfilename);
+ trio_snprintf(errmsg, sizeof(errmsg), "Couldn't write \"%s\".", tmpfilename);
progerr(errmsg);
}
while (fgets(buffer, sizeof(buffer), fp1)) {
@@ -541,9 +545,9 @@ void replace_maybe_replies(const char *filename, struct emailinfo *ep, int new_r
char *tmpptr = convchars(ep2->subject, ep2->charset);
if (tmpptr) {
char *path = get_path(ep, ep2);
- fprintf(fp2,"[ %s ]\n",
- path, new_reply_to, set_htmlsuffix, lang[MSG_LTITLE_IN_REPLY_TO],
- ep2->name, tmpptr ? tmpptr : "");
+ fprintf(fp2,"%s \n",
+ path, local_new_reply_to, set_htmlsuffix,
+ tmpptr ? tmpptr : "");
free(tmpptr);
}
}
@@ -552,10 +556,10 @@ void replace_maybe_replies(const char *filename, struct emailinfo *ep, int new_r
char *tmpptr = convchars(ep2->subject, ep2->charset);
if (tmpptr) {
char *path = get_path(ep, ep2);
- fprintf(fp2, "%s "
- "%s: \"%s\" \n",
+ fprintf(fp2, "%s "
+ "%s: \"%s\" \n",
lang[MSG_IN_REPLY_TO], path,
- new_reply_to, set_htmlsuffix, lang[MSG_LTITLE_IN_REPLY_TO],
+ local_new_reply_to, set_htmlsuffix,
ep2->name, tmpptr ? tmpptr : "");
free(tmpptr);
}
@@ -565,7 +569,7 @@ void replace_maybe_replies(const char *filename, struct emailinfo *ep, int new_r
char *tmpptr = convchars(ep2->subject, ep2->charset);
if (tmpptr) {
char *path = get_path(ep, ep2);
- fprintf(fp2, " %s: " "%s: \"%s\"\n", lang[MSG_IN_REPLY_TO], path, new_reply_to, set_htmlsuffix, ep2->name, tmpptr ? tmpptr : "");
+ fprintf(fp2, " %s: " "%s: \"%s\"\n", lang[MSG_IN_REPLY_TO], path, local_new_reply_to, set_htmlsuffix, ep2->name, tmpptr ? tmpptr : "");
free(tmpptr);
}
}
@@ -577,9 +581,9 @@ void replace_maybe_replies(const char *filename, struct emailinfo *ep, int new_r
"%s:",
" Previous message: %s: %s: %s: %s: %s: %s: %s: tDAY tDAY_UNIT tDAYZONE tHOUR_UNIT tMINUTE_UNIT
-%type tMONTH tMONTH_UNIT
-%type tSEC_UNIT tSNUMBER tUNUMBER tYEAR_UNIT tZONE
-%type tMERIDIAN o_merid
+%token tAGO tID tDST tNEVER
+%token tDAY tDAY_UNIT tDAYZONE tHOUR_UNIT tMINUTE_UNIT
+%token tMONTH tMONTH_UNIT
+%token tSEC_UNIT tSNUMBER tUNUMBER tYEAR_UNIT tZONE
+%token tMERIDIAN
+%type o_merid
%%
diff --git a/src/getname.c b/src/getname.c
index edd5d5b4..111cc441 100644
--- a/src/getname.c
+++ b/src/getname.c
@@ -1,3 +1,21 @@
+/*
+** Copyright (C) 1997-2023 Hypermail Project
+**
+** This program and library is free software; you can redistribute it and/or
+** modify it under the terms of the GNU (Library) General Public License
+** as published by the Free Software Foundation; either version 3
+** of the License, or 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 (Library) General Public License for more details.
+**
+** You should have received a copy of the GNU (Library) 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
+*/
+
#include "hypermail.h"
#include "getname.h"
#include "setup.h"
@@ -56,6 +74,12 @@ static int blankstring(char *str)
**
** This is an interesting new one (1998-11-26):
** From: ›Name.Hidden@era.ericsson.seœ
+**
+** Another case that was not yet handled, when there are two @ chars
+** in the line, one in comments, and one for the address. The code was only
+** detecting the first one and including the parenthesis as part of the address.
+** (2023-04-27):
+** From: "Roy T. Fielding (fielding@kiwi.ics.uci.edu)"
*/
/* AUDIT biege: this code is really tricky and may lead to BOFs in email[] and/or name[] */
@@ -64,6 +88,7 @@ void getname(char *line, char **namep, char **emailp)
int i;
int len;
char *c;
+ int offset;
int comment_fnd;
char email[MAILSTRLEN];
@@ -84,7 +109,17 @@ void getname(char *line, char **namep, char **emailp)
/* EMail Processing First:
** First, is there an '@' sign we can use as an anchor ?
*/
- if ((c = hm_strchr(line, '@')) == NULL) {
+
+ /* email is often found between <> chars, let's try to find it there
+ to cover the case of the @ char found in comments and between <> */
+ c = hm_strchr(line, '<');
+ if (c && hm_strchr(c, '@')) {
+ offset = c - line;
+ } else {
+ offset = 0;
+ }
+
+ if ((c = hm_strchr(line + offset, '@')) == NULL) {
/*
** No '@' sign here so ...
*/
@@ -204,7 +239,12 @@ void getname(char *line, char **namep, char **emailp)
for (i = 0, len = NAMESTRLEN - 1; *c && *c != '\"' && *c != '[' && *c != '\n' && i < len; c++)
name[i++] = *c;
- name[--i] = '\0';
+ if (i > 0) {
+ --i;
+ } else {
+ i = 0;
+ }
+ name[i] = '\0';
comment_fnd = 1;
}
else {
diff --git a/src/getname.h b/src/getname.h
index 5fc5e5d6..1fd67acd 100644
--- a/src/getname.h
+++ b/src/getname.h
@@ -1 +1,23 @@
+#ifndef _HYPERMAIL_GETNAME_H
+#define _HYPERMAIL_GETNAME_H
+/*
+** Copyright (C) 1997-2023 Hypermail Project
+**
+** This program and library is free software; you can redistribute it and/or
+** modify it under the terms of the GNU (Library) General Public License
+** as published by the Free Software Foundation; either version 3
+** of the License, or 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 (Library) General Public License for more details.
+**
+** You should have received a copy of the GNU (Library) 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
+*/
+
void getname(char *, char **, char **);
+
+#endif /* _HYPERMAIL_GETNAME_H */
diff --git a/src/hypermail.c b/src/hypermail.c
index b293302a..45a9f4fb 100644
--- a/src/hypermail.c
+++ b/src/hypermail.c
@@ -3,10 +3,11 @@
** VeriFone Inc./Hewlett-Packard. All Rights Reserved.
** Kevin Hughes, kev@kevcom.com 3/11/94
** Kent Landfield, kent@landfield.com 4/6/97
+** Hypermail Project 1998-2023
**
** This program and library is free software; you can redistribute it and/or
** modify it under the terms of the GNU (Library) General Public License
-** as published by the Free Software Foundation; either version 2
+** as published by the Free Software Foundation; either version 3
** of the License, or any later version.
**
** This program is distributed in the hope that it will be useful,
@@ -114,7 +115,7 @@ char *setindex(char *dfltindex, char *indextype, char *suffix)
void version(void)
{
- printf("%s: %s: %s %s: %s\n", PROGNAME, lang[MSG_VERSION], VERSION, lang[MSG_PATCHLEVEL], PATCHLEVEL);
+ printf("%s: %s: %s\n", PROGNAME, lang[MSG_VERSION], VERSION);
exit(0);
}
@@ -147,8 +148,6 @@ void usage(void)
printf(" -o keyword=val: Set config item\n");
printf(" -p : %s\n", lang[MSG_OPTION_P]);
printf(" -s htmlsuffix : %s\n", "HTML file suffix (.html, .htm, ..)");
- printf(" -t : %s\n", "Use Tables");
- printf(" -T : %s\n", "Use index tables");
printf(" -u : %s\n", lang[MSG_OPTION_U]);
printf(" -v : %s\n", lang[MSG_OPTION_VERBOSE]);
printf(" -V : %s\n", lang[MSG_OPTION_VERSION]);
@@ -165,7 +164,6 @@ void usage(void)
}
printf(")\n");
printf("%s : %s\n", lang[MSG_VERSION], VERSION);
- printf("%s : %s\n", lang[MSG_PATCHLEVEL], PATCHLEVEL);
printf("%s : %s\n\n", lang[MSG_DOCS], HMURL);
exit(1);
}
@@ -225,7 +223,6 @@ int main(int argc, char **argv)
case 'p':
case 's':
case 't':
- case 'T':
case 'u':
case 'x':
case 'X':
@@ -303,9 +300,12 @@ int main(int argc, char **argv)
case 't':
set_usetable = TRUE;
break;
+ /* removed in 2.2.25 */
+ /*
case 'T':
set_indextable = TRUE;
break;
+ */
case 'u':
set_increment = TRUE;
break;
@@ -335,7 +335,10 @@ int main(int argc, char **argv)
break;
}
}
-
+
+ /* do some postconfig checks for deprecated / obsolete options and inits */
+ PostConfig();
+
#ifdef DEBUG
dump_config();
exit(0);
@@ -353,35 +356,35 @@ int main(int argc, char **argv)
*/
if (strlen(set_language) > 2) {
- locale_code = strsav(set_language);
+ locale_code = set_language;
set_language[2] = 0; /* shorten to 2-letter code */
}
else
locale_code = NULL;
if ((tlang = valid_language(set_language, &locale_code)) == NULL) {
- snprintf(errmsg, sizeof(errmsg), "\"%s\" %s.", set_language, lang[MSG_LANGUAGE_NOT_SUPPORTED]);
- cmderr(errmsg);
+ trio_snprintf(errmsg, sizeof(errmsg), "\"%s\" %s.", set_language, lang[MSG_LANGUAGE_NOT_SUPPORTED]);
+ cmderr(errmsg);
}
#ifdef HAVE_LOCALE_H
- if (!setlocale(LC_ALL, locale_code)) {
- char *rv;
-
- if (!strcmp(locale_code, "en_US")) {
- /* many systems now install by defualt en_US.UTF-8.
- Here we assume that the mapping between en_US and en_US.UTF-8
- in system messages is identical.
- We cannot do the same for other languages, though */
- rv = setlocale(LC_ALL, "en_US.UTF-8");
- }
- if (!rv) {
- snprintf(errmsg, sizeof(errmsg), "WARNING: locale \"%s\", not supported.\n", locale_code);
- fprintf(stderr, "%s", errmsg);/* AUDIT biege: avoid format-bug warning */
- }
+ if (!setlocale(LC_ALL, locale_code)) {
+ char *rv = NULL;
+
+ if (!strcmp(locale_code, "en_US")) {
+ /* many systems now install by defualt en_US.UTF-8.
+ Here we assume that the mapping between en_US and en_US.UTF-8
+ in system messages is identical.
+ We cannot do the same for other languages, though */
+ rv = setlocale(LC_ALL, "en_US.UTF-8");
+ }
+ if (!rv) {
+ trio_snprintf(errmsg, sizeof(errmsg), "WARNING: locale \"%s\", not supported.\n", locale_code);
+ fprintf(stderr, "%s", errmsg);/* AUDIT biege: avoid format-bug warning */
+ }
}
#endif
-
+
lang = tlang; /* A good language, make it so. */
if (print_usage) /* Print the usage message and terminate */
@@ -389,17 +392,17 @@ int main(int argc, char **argv)
#ifndef GDBM
if (set_usegdbm) {
- fprintf(stderr, "%s: %s\n", PROGNAME, lang[MSG_OPTION_G_NOT_BUILD_IN]);
- usage();
+ fprintf(stderr, "%s: %s\n", PROGNAME, lang[MSG_OPTION_G_NOT_BUILD_IN]);
+ usage();
}
#endif
-
+
#ifndef HAVE_LIBFNV
if (set_nonsequential)
- progerr("Hypermail isn't built with the libfnv hash library.\n"
- "You cannot use the nonsequential option.\n");
+ progerr("Hypermail isn't built with the libfnv hash library.\n"
+ "You cannot use the nonsequential option.\n");
#endif /* HAVE_LIBFNV */
-
+
if (set_mbox && !strcasecmp(set_mbox, "NONE")) {
use_stdin = TRUE;
}
@@ -425,24 +428,39 @@ int main(int argc, char **argv)
use_stdin = FALSE;
}
else {
- if (set_mbox)
+ if (set_mbox) {
free(set_mbox);
+ }
set_mbox = NULL;
}
- /*
- ** Deprecated options
- */
- if (set_showhr) {
- fprintf (stderr, "The \"showhr\" option has been deprecated. Ignoring it.\n");
- set_showhr = FALSE;
+ if (set_dir) {
+ char *dp = dirpath(set_dir);
+ set_dir = strreplace(set_dir, dp);
+ free (dp);
}
+
+ /*
+ * Default names for directories and labels need to be figured out.
+ */
+
+ if (use_stdin && (!set_dir || !strcasecmp(set_dir, "NONE")))
+ set_dir = strreplace(set_dir, DIRNAME);
- if (set_usetable) {
- fprintf (stderr, "The \"usetable\" option has been deprecated. Ignoring it.\n");
- set_usetable = FALSE;
+ if (!set_dir || !strcasecmp(set_dir, "NONE"))
+ set_dir = strreplace(set_dir, (strrchr(set_mbox, '/')) ? strrchr(set_mbox, '/') + 1 : set_mbox);
+
+ if (set_dir[strlen(set_dir) - 1] != PATH_SEPARATOR) {
+ char *t = set_dir;
+
+ trio_asprintf(&set_dir, "%s%c", t, PATH_SEPARATOR);
+ free(t);
}
+ if (!set_label || !strcasecmp(set_label, "NONE")) {
+ set_label = set_mbox ? (strreplace(set_label, (strrchr(set_mbox, '/')) ? strrchr(set_mbox, '/') + 1 : set_mbox)) : strsav("stdin");
+ }
+
/*
* Read the contents of the file into the variables to be used
* in printing out the pages.
@@ -456,26 +474,19 @@ int main(int argc, char **argv)
ihtmlnavbar2upfile = expand_contents(set_ihtmlnavbar2up);
mhtmlheaderfile = expand_contents(set_mhtmlheader);
mhtmlfooterfile = expand_contents(set_mhtmlfooter);
+ if (set_mhtmlnavbar2up) {
+ mhtmlnavbar2upfile = expand_contents(set_mhtmlnavbar2up);
+ } else {
+ mhtmlnavbar2upfile = expand_contents(set_ihtmlnavbar2up);
+ }
- if (set_dir)
- set_dir = strreplace(set_dir, dirpath(set_dir));
-
- /*
- * Default names for directories and labels need to be figured out.
- */
-
- if (use_stdin && (!set_dir || !strcasecmp(set_dir, "NONE")))
- set_dir = strreplace(set_dir, DIRNAME);
-
- if (!set_dir || !strcasecmp(set_dir, "NONE"))
- set_dir = strreplace(set_dir, (strrchr(set_mbox, '/')) ? strrchr(set_mbox, '/') + 1 : set_mbox);
-
- if (set_dir[strlen(set_dir) - 1] != PATH_SEPARATOR)
- trio_asprintf(&set_dir, "%s%c", set_dir, PATH_SEPARATOR);
-
- if (!set_label || !strcasecmp(set_label, "NONE"))
- set_label = set_mbox ? (strreplace(set_label, (strrchr(set_mbox, '/')) ? strrchr(set_mbox, '/') + 1 : set_mbox)) : "stdin";
-
+ /* if the user didn't specify a message navbar for messages, we
+ set up a generic one using the archives's label and linking
+ back to the main index */
+ if (!mhtmlnavbar2upfile || !*mhtmlnavbar2upfile) {
+ trio_asprintf(&mhtmlnavbar2upfile, DEFAULT_MHTML_NAVBAR2UP, set_label);
+ }
+
/*
* Which index file will be called "index.html"?
*/
@@ -594,6 +605,22 @@ int main(int argc, char **argv)
checkdir(set_dir);
+ /* write the default css if any of the two custom ones was not
+ declared */
+ if (! (set_icss_url && *set_icss_url) ||
+ ! (set_mcss_url && *set_mcss_url)) {
+
+ char *filename;
+
+ if (set_default_css_url && !strcmp (set_default_css_url, "hypermail.css")) {
+ trio_asprintf(&filename, "%s%s", set_dir, "hypermail.css");
+ if (!isfile(filename)) {
+ print_default_css_file (filename);
+ }
+ free(filename);
+ }
+ }
+
/*
* Let's do it.
*/
@@ -678,8 +705,18 @@ int main(int argc, char **argv)
writearticles(0, max_msgnum + 1);
}
- if (amount_new) { /* Always write the index files */
- if (set_linkquotes) {
+ /* only update the indices when we either have a new
+ message (if set_increment) is set or when inputting
+ a whole mbox.
+ This is a lame way to take into account msgid collision
+ when adding a new message. Without binding the condition
+ to set_condition, this could result in the indices stating
+ the archive is empty */
+ if ((set_increment && amount_new > 0)
+ || (!set_increment
+ && (amount_new > 0 || count_deleted(max_msgnum + 1)))) {
+ /* Always write the index files */
+ if (amount_new && set_linkquotes) {
threadlist = NULL;
threadlist_end = NULL;
printedthreadlist = NULL;
@@ -703,7 +740,7 @@ int main(int argc, char **argv)
/* if (ep->flags & THREADING_ALTERED) */
}
}
- count_deleted(max_msgnum + 1);
+
if (show_index[0][DATE_INDEX])
writedates(amount_new, NULL);
if (show_index[0][THREAD_INDEX])
@@ -731,24 +768,16 @@ int main(int argc, char **argv)
if (set_uselock)
unlock_archive();
+ /*
+ ** do some cleanup
+ */
+ printed_free(printedlist);
+ printed_free(printedthreadlist);
+
+ ConfigCleanup();
+
if (configfile)
free(configfile);
- if (ihtmlheaderfile)
- free(ihtmlheaderfile);
- if (ihtmlfooterfile)
- free(ihtmlfooterfile);
- if (ihtmlheadfile)
- free(ihtmlheadfile);
- if (ihtmlhelpupfile)
- free(ihtmlhelpupfile);
- if (ihtmlhelplowfile)
- free(ihtmlhelplowfile);
- if (ihtmlnavbar2upfile)
- free(ihtmlnavbar2upfile);
- if (mhtmlheaderfile)
- free(mhtmlheaderfile);
- if (mhtmlfooterfile)
- free(mhtmlfooterfile);
-
+
return (0);
}
diff --git a/src/hypermail.h b/src/hypermail.h
index 38d71ac9..4f126f47 100644
--- a/src/hypermail.h
+++ b/src/hypermail.h
@@ -1,12 +1,15 @@
+#ifndef _HYPERMAIL_HYPERMAIL_H
+#define _HYPERMAIL_HYPERMAIL_H
/*
** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp.
** VeriFone Inc./Hewlett-Packard. All Rights Reserved.
** Kevin Hughes, kev@kevcom.com 3/11/94
** Kent Landfield, kent@landfield.com 4/6/97
+** Hypermail Project 1998-2023
**
** This program and library is free software; you can redistribute it and/or
** modify it under the terms of the GNU (Library) General Public License
-** as published by the Free Software Foundation; either version 2
+** as published by the Free Software Foundation; either version 3
** of the License, or any later version.
**
** This program is distributed in the hope that it will be useful,
@@ -19,9 +22,6 @@
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
-#ifndef _HYPERMAIL_HYPERMAIL_H
-#define _HYPERMAIL_HYPERMAIL_H
-
#ifndef MAIN_FILE
#define VAR extern
#else
@@ -98,8 +98,8 @@
#endif
/*
-* this redefines the standard *printf() to use ours
-*/
+ * this redefines the standard *printf() to use ours
+ */
#define TRIO_REPLACE_STDIO
#define HAVE_SSCANF /* avoid problems in setup.c with trio_sscanf */
#include
@@ -114,7 +114,7 @@
#define TRUE 1
#define PROGNAME "hypermail"
-#define HMURL "http://www.hypermail-project.org/"
+#define HMURL "https://github.com/hypermail-project/hypermail/"
#define INDEXNAME "index"
#define DIRNAME "archive"
@@ -134,7 +134,9 @@
#define NUMSTRLEN 10
#define MAXLINE 1024
+#define MAXURLLEN 4096
#define MAXFILELEN 256
+#define MAX_FWD_MSG_NESTING_LEVEL 100
#define NAMESTRLEN 320
#define MAILSTRLEN 80
#define DATESTRLEN 80
@@ -191,10 +193,27 @@ typedef enum {
FORMAT_FLOWED = 1
} textplain_format_t;
+typedef enum {
+ MN_KEEP = 0,
+ MN_KEEP_WITH_STORED_ATTACHMENT = 1,
+ MN_SKIP_BUT_KEEP_CHILDREN = 2,
+ MN_SKIP_STORED_ATTACHMENT = 4,
+ MN_SKIP_ALL = 8
+} message_node_skip_t;
+
+typedef enum {
+ MN_KEEP_NODE = 0,
+ MN_FREE_NODE = 1,
+ MN_FREE_ROOT_NODE = 2,
+ MN_DELETE_ATTACHMENTS = 4
+} message_node_release_details_t;
+
/* conversions supported by string.c:parseemail() */
typedef enum {
- MAKEMAILCOMMAND = 1, /* makes links clickable */
- REPLACE_DOMAIN = 2, /* replaces domain by antispamdomain */
+ MAKEMAILCOMMAND = 1, /* makes links clickable */
+ OBFUSCATE_ADDRESS = 2, /* only obfuscate the email address */
+ REPLACE_DOMAIN = 3 /* replaces domain by antispamdomain */
+
} parseemail_conversion_t;
/*
@@ -233,7 +252,28 @@ struct body {
char html; /* set to TRUE if already converted to HTML */
char header; /* part of header */
char parsedheader; /* this header line has been parsed once */
+ char invalid_header; /* this is an invalid header line, it's missing its
+ header name, header value, and or has an invalid value */
+ char antispam_disabled; /* no antispam was applied to this line */
+#ifdef DELETE_ME
char attached; /* part of attachment */
+#endif
+#ifdef DELETE_ME
+ char attachment_status; /* says if this is the start / end of an attachment and
+ type, expected to replace attached */
+#endif
+ /* review if still used */
+ char attachment_links; /* part of generated links to attachments */
+ int attachment_links_flags;
+ char attachment_rfc822; /* first line of a message/rfc822 attachment */
+ int attachment_flags; /* states metadata for generating
+ markup when printing out the body,
+ like start or end of an attachment,
+ or a list of stored attachments,
+ and so on. check the flags defined
+ in BODY_ATTACHMENT early on this
+ section (and convert them to use an
+ typedef enum one day */
char demimed; /* if this is a header, this is set to TRUE if
it has passed the decoderfc2047() function */
int format_flowed; /* TRUE if this a text/plain f=f line */
@@ -241,6 +281,41 @@ struct body {
struct body *next;
};
+/* here we divide a message into nodes. A message that has no attachments
+ has a single node. A message with attachments has one attachment child.
+ All those attachments then are considered siblings.
+ An attachment itself may be a message with children attachments, for
+ example a message/rfc822 */
+struct message_node {
+ struct body *bp;
+ struct body *lp;
+#ifdef DEBUG_PARSE_MSGID_TRACE
+ char *msgid; /* for helping debugging */
+#endif
+ char *charset; /* the charset declared in the content-type */
+ char *charsetsave; /* the first charset found in MIME RFC2047 encoded headers */
+ char *content_type;
+ char *bin_filename; /* gives the path + filename if the part is stored */
+ char *meta_filename; /* gives the path + filename of the metadata filename if it
+ was created */
+ char *html_link; /* gives the link that will be added to the stored attachment
+ list */
+ char *comment_filename; /* gives the filename that will be mentioned
+ in the HTML comment underneath the link */
+ char *boundary_part; /* for multipart/mixed and message/rfc822, the
+ MIME for a given part */
+ char *boundary_type; /* for multipart/mixed, the boundary declared in
+ the content type */
+ char attachment_rfc822; /* set to TRUE if this message node is a
+ message/rfc822 attachment */
+ char alternative; /* set to TRUE if this message node is a child of multipart/alternative */
+ message_node_skip_t skip; /* different values stating how we should deal with this node
+ if we need to fully or partially skip it when flattening it */
+ struct message_node *attachment_child;
+ struct message_node *attachment_next_sibling;
+ struct message_node *parent;
+};
+
struct printed {
int msgnum;
struct printed *next;
@@ -330,25 +405,52 @@ struct attach {
#define BODY_CONTINUE (1<<0) /* this is a continued line */
#define BODY_HTMLIZED (1<<1) /* this is already htmlified */
#define BODY_HEADER (1<<2) /* this is a header line */
-#define BODY_ATTACHED (1<<3) /* this line was attached */
-#define BODY_FORMAT_FLOWED (1<<4) /* this line is format-flowed */
-#define BODY_DEL_SSQ (1<<5) /* remove both space stuffing and
+#define BODY_ATTACHMENT (1<<3) /* this line was attached */
+#define BODY_ATTACHMENT_START (1<<4) /* meta data to help encapsulate attachments */
+#define BODY_ATTACHMENT_END (1<<5)
+/* beginning and ending of a list of external attachment links */
+#define BODY_ATTACHMENT_LINKS_START (1<<6)
+#define BODY_ATTACHMENT_LINKS_END (1<<7)
+#define BODY_ATTACHMENT_LINKS (1<<8) /* this line is a child of the list of external
+ attachment links */
+#define BODY_ATTACHMENT_RFC822 (1<<9) /* this line is the beginning of an message/rfc822
+ ** attachment */
+#define BODY_FORMAT_FLOWED (1<<10) /* this line is format-flowed */
+#define BODY_DEL_SSQ (1<<11) /* remove both space stuffing and
* quotes where applicable for f=f */
+#define BODY_NO_ANTISPAM (1<<12) /* disables anti spam protection for this line */
+#ifdef DELETE_ME
+#define BODY_ATTACHED (1<<13) /* temp while cleaning code */
+#endif
-
-struct boundary {
- struct boundary *next;
- struct boundary *prev;
- char *line;
+/* used to store a MIME boundary and all the context related to it
+** alternative_info, charset, applemail_hack, ... */
+struct boundary_stack {
+ struct boundary_stack *next;
+ struct boundary_stack *prev;
+ char *boundary_id;
+
+ char alternativeparser;
+ int alternative_weight;
+ struct body *alternative_lp;
+ struct body *alternative_bp;
+ struct message_node *current_alt_message_node;
+ struct message_node *root_alt_message_node;
+ char alternative_message_node_created;
+ char alternative_file[131];
+ char alternative_lastfile[131];
+ char last_alternative_type[131];
+ /* the following three store the context for the applemail hack */
+ int parse_multipart_alternative_force_save_alts;
+ int applemail_old_set_save_alts;
+ int set_save_alts;
};
-struct charset_stack {
- struct charset_stack *next;
- struct charset_stack *prev;
- char *charset;
- char *charsetsave;
+struct hm_stack {
+ struct hm_stack *prev;
+ void *value;
};
-
+
VAR struct header *subjectlist;
VAR struct header *authorlist;
VAR struct header *datelist;
@@ -395,6 +497,7 @@ VAR char *ihtmlhelplowfile;
VAR char *ihtmlnavbar2upfile;
VAR char *mhtmlheaderfile;
VAR char *mhtmlfooterfile;
+VAR char *mhtmlnavbar2upfile;
VAR long firstdatenum;
VAR long lastdatenum;
@@ -431,4 +534,4 @@ extern int strcasecmp(const char *, const char *);
extern int strncasecmp(const char *, const char *, size_t);
#endif
-#endif /* ! _HYPERMAIL_HYPERMAIL_H */
+#endif /* _HYPERMAIL_HYPERMAIL_H */
diff --git a/src/lang.c b/src/lang.c
index 11952330..1fb8e80c 100644
--- a/src/lang.c
+++ b/src/lang.c
@@ -1,3 +1,21 @@
+/*
+** Copyright (C) 1997-2023 Hypermail Project
+**
+** This program and library is free software; you can redistribute it and/or
+** modify it under the terms of the GNU (Library) General Public License
+** as published by the Free Software Foundation; either version 3
+** of the License, or 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 (Library) General Public License for more details.
+**
+** You should have received a copy of the GNU (Library) 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
+*/
+
#ifdef LANG_PROG
#define MAIN_FILE
#endif
diff --git a/src/lang.h b/src/lang.h
index 7ec42e66..ec265819 100644
--- a/src/lang.h
+++ b/src/lang.h
@@ -1,3 +1,23 @@
+#ifndef _HYPERMAIL_LANG_H
+#define _HYPERMAIL_LANG_H
+/*
+** Copyright (C) 1997-2023 Hypermail Project
+**
+** This program and library is free software; you can redistribute it and/or
+** modify it under the terms of the GNU (Library) General Public License
+** as published by the Free Software Foundation; either version 3
+** of the License, or 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 (Library) General Public License for more details.
+**
+** You should have received a copy of the GNU (Library) 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
+*/
+
/*
** WARNING!!! Don't muck with this file unless you know what you are
** getting yourself into!!!!!!
@@ -231,6 +251,16 @@ struct language_entry {
#define MSG_EDITED 166
#define MSG_SENDER_DELETED 167
#define MSG_SUBJECT_DELETED 168
+#define MSG_ACCESS_MAIL_ARCHIVES_BY_CAPTION 169
+#define MSG_CSORT_BY 170
+#define MSG_EMPTY_ARCHIVE 171
+#define MSG_ATTACHED_MESSAGE_NOTICE 172
+#define MSG_FORWARDED_MESSAGE_NOTICE 173
+#define MSG_ATTACHMENTS_NOTICE 174
+#define MSG_ATTACHMENTS_FOR_MESSAGE_NOTICE 175
+#define MSG_EMPTY_ARCHIVE_NOTICE 176
+#define MSG_CSS_NORMAL_VIEW 177
+
#ifdef MAIN_FILE
/*
@@ -344,9 +374,9 @@ char *de[] = { /* German */
"Aktionsmöglichkeiten", /* Mail actions (MA) header -HTML*/
"Sende E-Mail mit neuen Titel", /* MA New Message -HTML*/
"Antworte auf die E-Mail", /* MA Reply -HTML*/
- "Zusammenfassung der monatlichen Index-Dateien",
+ "zusammenfassung der monatlichen index-dateien",
/* monthly -HTML*/
- "Zusammenfassung der jährlichen Index-Dateien",
+ "zusammenfassung der jährlichen index-dateien",
/* yearly -HTML*/
"Lege GDBM-Zwischenspeicher für Kopfzeilen an",
/* Build a GDBM header cache -STDOUT*/
@@ -370,7 +400,7 @@ char *de[] = { /* German */
"Verzeichnisliste", /* MSG_FOLDERS_INDEX -HTML */
"Diese Nachricht wurde aus dem Archiv entfernt",/* MSG_DELETED -HTML */
"Diese Nachricht ist abgelaufen", /* MSG_EXPIRED -HTML */
- "(gelöschte Nachricht)", /* MSG_DEL_SHORT -HTML */
+ "gelöschte Nachricht", /* MSG_DEL_SHORT -HTML */
"Ursprünglicher Text dieser Nachricht", /* MSG_TXT_VERSION -HTML */
"Diese Nachricht wurde herausgefiltert", /* MSG_FILTERED_OUT -HTML */
"Autor", /* MSG_FROM -HTML*/
@@ -418,11 +448,20 @@ char *de[] = { /* German */
" bis ", /* to - HTML */
"from", /* from - HTML */
"on", /* on - HTML */
- "message archived in another list or period", /* unknown in reply to - HTML */
+ "Message archived in another list or period", /* unknown in reply to - HTML */
"Diese Nachricht wurde aus dem Archiv entfernt", /* MSG_DELETED_OTHER -HTML */
"Note: this message has been edited and differs from the originally archived copy.", /* MSG_EDITED -HTML */
"deleted", /* MSG_SENDER_DELETED -HTML */
"deleted", /* MSG_SUBJECT_DELETED -HTML */
+ "Access mail archives by date, thread, author and subject", /* MSG_ACCESS_MAIL_ARCHIVES_BY_CAPTION - HTML */
+ "Sortieren nach", /* CSort by - HTML */
+ "Nothing received yet!", /* MSG_EMPTY_ARCHIVE - HTML */
+ "attached message", /* MSG_ATTACHED_MESSAGE_NOTICE - HTML */
+ "Forwarded message", /* MSG_FORWARDED_MESSAGE_NOTICE - HTML */
+ "Attachments", /* MSG_ATTACHMENTS_NOTICE */
+ "Attachments for message", /* MSG_ATTACHMENTS_FOR_MESSAGE_NOTICE */
+ "(no messages are available in this archive)", /* MSG_EMPTY_ARCHIVE_NOTICE */
+ "Normal view", /* MSG_CSS_NORMAL_VIEW */
NULL, /* End Of Message Table - NOWHERE*/
};
@@ -529,8 +568,8 @@ char *pl[] = { /* English */
"Wybierz", /* Mail actions (MA) header -HTML*/
"wy¶lij nowy temat", /* MA New Message -HTML*/
"odpowiedz na t± wiadomo¶æ", /* MA Reply -HTML*/
- "Zestawienie miesiêcy", /* monthly -HTML*/
- "Zestawienie lat", /* yearly -HTML*/
+ "zestawienie miesiêcy", /* monthly -HTML*/
+ "zestawienie lat", /* yearly -HTML*/
"Utwórz cache nag³owków GDBM", /* Build a GDBM header cache -STDOUT*/
"GDBM header cache option not build in",
/* GDBM header cache option not build in -STDERR*/
@@ -549,7 +588,7 @@ char *pl[] = { /* English */
"Lista Katalogów", /* MSG_FOLDERS_INDEX -HTML */
"Ta wiadomo¶æ zosta³a usuniêta z archiwum", /* MSG_DELETED -HTML */
"Ta wiadomo¶æ jest przedawniona", /*MSG_EXPIRED -HTML */
- "(usuniêta wiadomo¶æ)", /* MSG_DEL_SHORT -HTML */
+ "usuniêta wiadomo¶æ", /* MSG_DEL_SHORT -HTML */
"Tekst tej zawarto¶ci", /* MSG_TXT_VERSION -HTML */
"Ta wiadomo¶æ zosta³a odfiltrowana", /* MSG_FILTERED_OUT -HTML */
"Autor", /* MSG_FROM -HTML*/
@@ -597,11 +636,20 @@ char *pl[] = { /* English */
" to ", /* to - HTML */
"from", /* from - HTML */
"on", /* on - HTML */
- "message archived in another list or period", /* unknown in reply to - HTML */
+ "Message archived in another list or period", /* unknown in reply to - HTML */
"Ta wiadomo¶æ zosta³a usuniêta z archiwum", /* MSG_DELETED_OTHER -HTML */
"Note: this message has been edited and differs from the originally archived copy.", /* MSG_EDITED -HTML */
"deleted", /* MSG_SENDER_DELETED -HTML */
"deleted", /* MSG_SUBJECT_DELETED -HTML */
+ "Access mail archives by date, thread, author and subject", /* MSG_ACCESS_MAIL_ARCHIVES_BY_CAPTION - HTML */
+ "Sort by", /* CSort by - HTML */
+ "Nothing received yet!", /* MSG_EMPTY_ARCHIVE - HTML */
+ "attached message", /* MSG_ATTACHED_MESSAGE_NOTICE - HTML */
+ "Forwarded message", /* MSG_FORWARDED_MESSAGE_NOTICE - HTML */
+ "Attachments", /* MSG_ATTACHMENTS_NOTICE */
+ "Attachments for message", /* MSG_ATTACHMENTS_FOR_MESSAGE_NOTICE */
+ "(no messages are available in this archive)", /* MSG_EMPTY_ARCHIVE_NOTICE */
+ "Normal view", /* MSG_CSS_NORMAL_VIEW */
NULL, /* End Of Message Table - NOWHERE*/
};
@@ -709,8 +757,8 @@ char *en[] = { /* English */
"Mail actions", /* Mail actions (MA) header -HTML*/
"mail a new topic", /* MA New Message -HTML*/
"respond to this message", /* MA Reply -HTML*/
- "Summary of Monthly Index Files", /* monthly -HTML*/
- "Summary of Yearly Index Files", /* yearly -HTML*/
+ "summary of monthly index files", /* monthly -HTML*/
+ "summary of yearly index files", /* yearly -HTML*/
"Build a GDBM header cache", /* Build a GDBM header cache -STDOUT*/
"GDBM header cache option not build in",
/* GDBM header cache option not build in -STDERR*/
@@ -729,7 +777,7 @@ char *en[] = { /* English */
"List of Folders", /* MSG_FOLDERS_INDEX -HTML */
"This message has been deleted from the archive", /* MSG_DELETED -HTML */
"This message has expired", /* MSG_EXPIRED -HTML */
- "(deleted message)", /* MSG_DEL_SHORT -HTML */
+ "deleted message", /* MSG_DEL_SHORT -HTML */
"Original text of this message", /* MSG_TXT_VERSION -HTML */
"This message has been filtered out", /* MSG_FILTERED_OUT -HTML */
"From", /* MSG_FROM -HTML*/
@@ -777,11 +825,20 @@ char *en[] = { /* English */
" to ", /* to - HTML */
"from", /* from - HTML */
"on", /* on - HTML */
- "message archived in another list or period", /* unknown in reply to - HTML */
- "This message has been deleted from the archive", /* MSG_DELETED_OTHER -HTML */
- "Note: this message has been edited and differs from the originally archived copy.", /* MSG_EDITED -HTML */
- "deleted", /* MSG_SENDER_DELETED -HTML */
- "deleted", /* MSG_SUBJECT_DELETED -HTML */
+ "Message archived in another list or period", /* unknown in reply to - HTML */
+ "This message has been deleted from the archive", /* MSG_DELETED_OTHER - HTML */
+ "Note: this message has been edited and differs from the originally archived copy.", /* MSG_EDITED - HTML */
+ "deleted", /* MSG_SENDER_DELETED - HTML */
+ "deleted", /* MSG_SUBJECT_DELETED - HTML */
+ "Access mail archives by date, thread, author and subject", /* MSG_ACCESS_MAIL_ARCHIVES_BY_CAPTION - HTML */
+ "Sort by", /* CSort by - HTML*/
+ "Nothing received yet!", /* MSG_EMPTY_ARCHIVE - HTML */
+ "attached message", /* MSG_ATTACHED_MESSAGE_NOTICE - HTML */
+ "Forwarded message", /* MSG_FORWARDED_MESSAGE_NOTICE - HTML */
+ "Attachments", /* MSG_ATTACHMENTS_NOTICE */
+ "Attachments for message", /* MSG_ATTACHMENTS_FOR_MESSAGE_NOTICE */
+ "(no messages are available in this archive)", /* MSG_EMPTY_ARCHIVE_NOTICE */
+ "Normal view", /* MSG_CSS_NORMAL_VIEW */
NULL, /* End Of Message Table - NOWHERE*/
};
@@ -899,8 +956,8 @@ char *es[] = { /* Espanol/Spanish */
"Cabecera MA (Mail actions)", /* Mail actions (MA) header - HTML */
"Enviar un nuevo tema", /* MA New Message - HTML */
"responder a este mensaje", /* MA Reply - HTML */
- "Resumen de índices mensuales", /* monthly - HTML */
- "Resumen de índices anuales", /* yearly - HTML */
+ "resumen de índices mensuales", /* monthly - HTML */
+ "resumen de índices anuales", /* yearly - HTML */
"Costruir cabecera para caché GDBM",/* Build a GDBM header cache - STDOUT*/
"Creando índice gdbm... ", /* Creating gdbm index - STDOUT*/
"No pudo crearse fichero gdbm... ", /* Can't create gdbm index - STDOUT*/
@@ -919,7 +976,7 @@ char *es[] = { /* Espanol/Spanish */
"El mensaje ha sido borrado del archivo",
/* MSG_DELETED - HTML */
"El mensaje ha caducado", /* MSG_EXPIRED - HTML */
- "(mensaje borrado)", /* MSG_DEL_SHORT - HTML */
+ "mensaje borrado", /* MSG_DEL_SHORT - HTML */
"Texto original del mensaje", /* MSG_TXT_VERSION - HTML */
"El mensaje ha sido filtrado", /* MSG_FILTERED_OUT - HTML */
"Autor", /* MSG_FROM - HTML */
@@ -967,12 +1024,21 @@ char *es[] = { /* Espanol/Spanish */
" to ", /* to - HTML */
"from", /* from - HTML */
"on", /* on - HTML */
- "message archived in another list or period", /* unknown in reply to - HTML */
+ "Message archived in another list or period", /* unknown in reply to - HTML */
"El mensaje ha sido borrado del archivo",
/* MSG_DELETED_OTHER - HTML */
"Note: this message has been edited and differs from the originally archived copy.", /* MSG_EDITED -HTML */
"deleted", /* MSG_SENDER_DELETED -HTML */
"deleted", /* MSG_SUBJECT_DELETED -HTML */
+ "Access mail archives by date, thread, author and subject", /* MSG_ACCESS_MAIL_ARCHIVES_BY_CAPTION - HTML */
+ "Sort by", /* CSort by - HTML*/
+ "Nothing received yet!", /* MSG_EMPTY_ARCHIVE - HTML */
+ "attached message", /* MSG_ATTACHED_MESSAGE_NOTICE - HTML */
+ "Forwarded message", /* MSG_FORWARDED_MESSAGE_NOTICE - HTML */
+ "Attachments", /* MSG_ATTACHMENTS_NOTICE */
+ "Attachments for message", /* MSG_ATTACHMENTS_FOR_MESSAGE_NOTICE */
+ "(no messages are available in this archive)", /* MSG_EMPTY_ARCHIVE_NOTICE */
+ "Normal view", /* MSG_CSS_NORMAL_VIEW */
NULL, /* End Of Message Table */
};
@@ -1082,8 +1148,8 @@ char *pt[] = { /* Brazilian Portuguese */
"Ações de E-Mail", /* Mail actions (MA) header -HTML*/
"Novo tópico de E-Mail", /* MA New Message -HTML*/
"Responder à esta mensagem", /* MA Reply -HTML*/
- "Sumário dos Arquivos Mensais de Índice", /* monthly -HTML*/
- "Sumário dos Arquivos Anuais de Índice", /* yearly -HTML*/
+ "sumário dos arquivos mensais de índice", /* monthly -HTML*/
+ "sumário dos arquivos anuais de índice", /* yearly -HTML*/
"Compilar cache de cabeçalho GDBM", /* Build a GDBM header cache -STDOUT*/
"Opção de cabeçalho GDBM não compilada", /* GDBM header cache option not build in -STDERR*/
"Criando índice gdbm... ", /* Creating gdbm index -STDOUT*/
@@ -1102,7 +1168,7 @@ char *pt[] = { /* Brazilian Portuguese */
"Lista de Diretórios", /* MSG_FOLDERS_INDEX -HTML */
"Esta mensagem foi removida do arquivo", /* MSG_DELETED -HTML */
"Esta mensagem expirou", /* MSG_EXPIRED -HTML */
- "(mensagem removida)", /* MSG_DEL_SHORT -HTML */
+ "mensagem removida", /* MSG_DEL_SHORT -HTML */
"Texto original desta mensagem", /* MSG_TXT_VERSION -HTML */
"Esta mensagem foi filtrada", /* MSG_FILTERED_OUT -HTML */
"De", /* MSG_FROM -HTML*/
@@ -1150,11 +1216,20 @@ char *pt[] = { /* Brazilian Portuguese */
"por anexo", /* by attachment - HTML */
"período", /* period - HTML */
" para ", /* to - HTML */
- "message archived in another list or period", /* unknown in reply to - HTML */
+ "Message archived in another list or period", /* unknown in reply to - HTML */
"Esta mensagem foi removida do arquivo", /* MSG_DELETE_OTHER -HTML */
"Note: this message has been edited and differs from the originally archived copy.", /* MSG_EDITED -HTML */
"deleted", /* MSG_SENDER_DELETED -HTML */
"deleted", /* MSG_SUBJECT_DELETED -HTML */
+ "Access mail archives by date, thread, author and subject", /* MSG_ACCESS_MAIL_ARCHIVES_BY_CAPTION - HTML */
+ "Ordenar por", /* CSort by - HTML*/
+ "Nothing received yet!", /* MSG_EMPTY_ARCHIVE - HTML */
+ "attached message", /* MSG_ATTACHED_MESSAGE_NOTICE - HTML */
+ "Forwarded message", /* MSG_FORWARDED_MESSAGE_NOTICE - HTML */
+ "Attachments", /* MSG_ATTACHMENTS_NOTICE */
+ "Attachments for message", /* MSG_ATTACHMENTS_FOR_MESSAGE_NOTICE */
+ "(no messages are available in this archive)", /* MSG_EMPTY_ARCHIVE_NOTICE */
+ "Normal view", /* MSG_CSS_NORMAL_VIEW */
NULL, /* End Of Message Table - NOWHERE*/
};
@@ -1260,8 +1335,8 @@ char *fi[] = { /* Finnish */
"Mail actions", /* Mail actions (MA) header -HTML*/
"mail a new topic", /* MA New Message -HTML*/
"respond to this message", /* MA Reply -HTML*/
- "Summary of Monthly Index Files", /* monthly -HTML*/
- "Summary of Yearly Index Files", /* yearly -HTML*/
+ "summary of monthly index files", /* monthly -HTML*/
+ "summary of yearly index files", /* yearly -HTML*/
"Build a GDBM header cache", /* Build a GDBM header cache -STDOUT*/
"GDBM header cache option not build in",
/* GDBM header cache option not build in -STDERR*/
@@ -1280,7 +1355,7 @@ char *fi[] = { /* Finnish */
"List of Folders", /* MSG_FOLDERS_INDEX -HTML */
"This message has been deleted from the archive", /* MSG_DELETED -HTML */
"This message has expired", /* MSG_EXPIRED -HTML */
- "(deleted message)", /* MSG_DEL_SHORT -HTML */
+ "deleted message", /* MSG_DEL_SHORT -HTML */
"Original text of this message", /* MSG_TXT_VERSION -HTML */
"This message has been filtered out", /* MSG_FILTERED_OUT -HTML */
"Kirjoittajan mukaan", /* MSG_FROM -HTML*/
@@ -1328,11 +1403,20 @@ char *fi[] = { /* Finnish */
" to ", /* to - HTML */
"from", /* from - HTML */
"on", /* on - HTML */
- "message archived in another list or period", /* unknown in reply to - HTML */
+ "Message archived in another list or period", /* unknown in reply to - HTML */
"This message has been deleted from the archive", /* MSG_DELETED_OTHER -HTML */
"Note: this message has been edited and differs from the originally archived copy.", /* MSG_EDITED -HTML */
"deleted", /* MSG_SENDER_DELETED -HTML */
"deleted", /* MSG_SUBJECT_DELETED -HTML */
+ "Access mail archives by date, thread, author and subject", /* MSG_ACCESS_MAIL_ARCHIVES_BY_CAPTION - HTML */
+ "Sort by", /* CSort by - HTML*/
+ "Nothing received yet!", /* MSG_EMPTY_ARCHIVE - HTML */
+ "attached message", /* MSG_ATTACHED_MESSAGE_NOTICE - HTML */
+ "Forwarded message", /* MSG_FORWARDED_MESSAGE_NOTICE - HTML */
+ "Attachments", /* MSG_ATTACHMENTS_NOTICE */
+ "Attachments for message", /* MSG_ATTACHMENTS_FOR_MESSAGE_NOTICE */
+ "(no messages are available in this archive)", /* MSG_EMPTY_ARCHIVE_NOTICE */
+ "Normal view", /* MSG_CSS_NORMAL_VIEW */
NULL, /* End Of Message Table - NOWHERE*/
};
@@ -1443,8 +1527,8 @@ char *it[] = { /* Italian */
"Azioni di posta", /* Mail actions (MA) header -HTML*/
"spedisci un nuovo argomento", /* MA New Message -HTML*/
"rispondi a questo messaggio", /* MA Reply -HTML*/
- "Riepilogo dei file di indice mensili", /* monthly -HTML*/
- "Riepilogo dei file di indice annuali", /* yearly -HTML*/
+ "riepilogo dei file di indice mensili", /* monthly -HTML*/
+ "riepilogo dei file di indice annuali", /* yearly -HTML*/
"Costruisci una cache degli header in GDBM", /* Build a GDBM header cache -STDOUT*/
"Creazione dell'indice gdbm ... ", /* Creating gdbm index -STDOUT*/
"Impossibile creare l'indice gdbm ... ", /* Can't create gdbm index -STDOUT*/
@@ -1461,7 +1545,7 @@ char *it[] = { /* Italian */
"Lista delle cartelle", /* MSG_FOLDERS_INDEX -HTML */
"Questo messaggio è stato cancellato dall'archivio", /* MSG_DELETED -HTML */
"Il messaggio è scaduto", /* MSG_EXPIRED -HTML */
- "(messaggio cancellato)", /* MSG_DEL_SHORT -HTML */
+ "messaggio cancellato", /* MSG_DEL_SHORT -HTML */
"Testo originale di questo messaggio", /* MSG_TXT_VERSION -HTML */
"Questo messaggio è stato filtrato", /* MSG_FILTERED_OUT -HTML */
"From", /* MSG_FROM -HTML*/
@@ -1509,11 +1593,20 @@ char *it[] = { /* Italian */
" to ", /* to - HTML */
"from", /* from - HTML */
"on", /* on - HTML */
- "message archived in another list or period", /* unknown in reply to - HTML */
+ "Message archived in another list or period", /* unknown in reply to - HTML */
"Questo messaggio è stato cancellato dall'archivio", /* MSG_DELETED_OTHER -HTML */
"Note: this message has been edited and differs from the originally archived copy.", /* MSG_EDITED -HTML */
"deleted", /* MSG_SENDER_DELETED -HTML */
"deleted", /* MSG_SUBJECT_DELETED -HTML */
+ "Access mail archives by date, thread, author and subject", /* MSG_ACCESS_MAIL_ARCHIVES_BY_CAPTION - HTML */
+ "Sort by", /* CSort by - HTML*/
+ "Nothing received yet!", /* MSG_EMPTY_ARCHIVE - HTML */
+ "attached message", /* MSG_ATTACHED_MESSAGE_NOTICE - HTML */
+ "Forwarded message", /* MSG_FORWARDED_MESSAGE_NOTICE - HTML */
+ "Attachments", /* MSG_ATTACHMENTS_NOTICE */
+ "Attachments for message", /* MSG_ATTACHMENTS_FOR_MESSAGE_NOTICE */
+ "(no messages are available in this archive)", /* MSG_EMPTY_ARCHIVE_NOTICE */
+ "Normal view", /* MSG_CSS_NORMAL_VIEW */
NULL, /* End Of Message Table - NOWHERE*/
};
@@ -1621,8 +1714,8 @@ char *fr[] = { /* French */
"Actions sur les mails", /* Mail actions (MA) header -HTML*/
"créer un nouveau thème", /* MA New Message -HTML*/
"répondre à ce message", /* MA Reply -HTML*/
- "Récapitulatif des fichiers Index mensuels", /* monthly -HTML*/
- "Récapitulatif des fichiers Index annuels", /* yearly -HTML*/
+ "récapitulatif des fichiers index mensuels", /* monthly -HTML*/
+ "récapitulatif des fichiers index annuels", /* yearly -HTML*/
"Creation d'un cache GDBM pour les en-têtes", /* Build a GDBM header cache -STDOUT*/
"GDBM header cache option not build in",
/* GDBM header cache option not build in -STDERR*/
@@ -1641,7 +1734,7 @@ char *fr[] = { /* French */
"Liste des dossiers", /* MSG_FOLDERS_INDEX -HTML */
"Ce message a été supprimé de l'archive", /* MSG_DELETED -HTML */
"Ce message est trop vieux", /* MSG_EXPIRED -HTML */
- "(message supprimé)", /* MSG_DEL_SHORT -HTML */
+ "message supprimé", /* MSG_DEL_SHORT -HTML */
"Texte original de ce message", /* MSG_TXT_VERSION -HTML */
"Ce message a été supprimé par filtrage", /* MSG_FILTERED_OUT -HTML */
"Auteur", /* MSG_FROM -HTML*/
@@ -1669,7 +1762,7 @@ char *fr[] = { /* French */
"Messages récents par fichier attaché", /* Contemporary messages by attachments - HTML*/
"Barre de navigation vers le niveau supérieur", /* Navigation bar, upper levels - HTML*/
"Barre de navigation", /* Navigation bar - HTML*/
- "Trier par", /* Sort by - HTML*/
+ "trier par", /* Sort by - HTML*/
"Autres périodes", /* Other periods - HTML */
"Suivant", /* Next folder - HTML */
"Messages archives dans la période suivante, triés par date", /* Next folder, by date - HTML link */
@@ -1689,11 +1782,20 @@ char *fr[] = { /* French */
" &eagrave; ", /* to - HTML */
"from", /* from - HTML */
"on", /* on - HTML */
- "message archived in another list or period", /* unknown in reply to - HTML */
+ "Message archived in another list or period", /* unknown in reply to - HTML */
"Ce message a été supprimé de l'archive", /* MSG_DELETED_OTHER -HTML */
"Note: this message has been edited and differs from the originally archived copy.", /* MSG_EDITED -HTML */
"deleted", /* MSG_SENDER_DELETED -HTML */
"deleted", /* MSG_SUBJECT_DELETED -HTML */
+ "Access mail archives by date, thread, author and subject", /* MSG_ACCESS_MAIL_ARCHIVES_BY_CAPTION - HTML */
+ "Trier par", /* CSort by - HTML*/
+ "Nothing received yet!", /* MSG_EMPTY_ARCHIVE - HTML */
+ "attached message", /* MSG_ATTACHED_MESSAGE_NOTICE - HTML */
+ "Forwarded message", /* MSG_FORWARDED_MESSAGE_NOTICE - HTML */
+ "Attachments", /* MSG_ATTACHMENTS_NOTICE */
+ "Attachments for message", /* MSG_ATTACHMENTS_FOR_MESSAGE_NOTICE */
+ "(no messages are available in this archive)", /* MSG_EMPTY_ARCHIVE_NOTICE */
+ "Normal view", /* MSG_CSS_NORMAL_VIEW */
NULL, /* End Of Message Table - NOWHERE*/
};
@@ -1801,8 +1903,8 @@ char *is[] = { /* Icelandic */
"Mail actions", /* Mail actions (MA) header -HTML*/
"mail a new topic", /* MA New Message -HTML*/
"respond to this message", /* MA Reply -HTML*/
- "Summary of Monthly Index Files", /* monthly -HTML*/
- "Summary of Yearly Index Files", /* yearly -HTML*/
+ "summary of monthly index files", /* monthly -HTML*/
+ "summary of yearly index files", /* yearly -HTML*/
"Build a GDBM header cache", /* Build a GDBM header cache -STDOUT*/
"GDBM header cache option not build in",
/* GDBM header cache option not build in -STDERR*/
@@ -1823,7 +1925,7 @@ char *is[] = { /* Icelandic */
"List of Folders", /* MSG_FOLDERS_INDEX -HTML */
"This message has been deleted from the archive", /* MSG_DELETED -HTML */
"This message has expired", /* MSG_EXPIRED -HTML */
- "(deleted message)", /* MSG_DEL_SHORT -HTML */
+ "deleted message", /* MSG_DEL_SHORT -HTML */
"Original text of this message", /* MSG_TXT_VERSION -HTML */
"This message has been filtered out", /* MSG_FILTERED_OUT -HTML */
"Höfundur", /* MSG_FROM -HTML*/
@@ -1871,11 +1973,20 @@ char *is[] = { /* Icelandic */
" to ", /* to - HTML */
"from", /* from - HTML */
"on", /* on - HTML */
- "message archived in another list or period", /* unknown in reply to - HTML */
+ "Message archived in another list or period", /* unknown in reply to - HTML */
"This message has been deleted from the archive", /* MSG_DELETED_OTHER -HTML */
"Note: this message has been edited and differs from the originally archived copy.", /* MSG_EDITED -HTML */
"deleted", /* MSG_SENDER_DELETED -HTML */
"deleted", /* MSG_SUBJECT_DELETED -HTML */
+ "Access mail archives by date, thread, author and subject", /* MSG_ACCESS_MAIL_ARCHIVES_BY_CAPTION - HTML */
+ "Sort by", /* CSort by - HTML*/
+ "Nothing received yet!", /* MSG_EMPTY_ARCHIVE - HTML */
+ "attached message", /* MSG_ATTACHED_MESSAGE_NOTICE - HTML */
+ "Forwarded message", /* MSG_FORWARDED_MESSAGE_NOTICE - HTML */
+ "Attachments", /* MSG_ATTACHMENTS_NOTICE */
+ "Attachments for message", /* MSG_ATTACHMENTS_FOR_MESSAGE_NOTICE */
+ "(no messages are available in this archive)", /* MSG_EMPTY_ARCHIVE_NOTICE */
+ "Normal view", /* MSG_CSS_NORMAL_VIEW */
NULL, /* End Of Message Table - NOWHERE*/
};
@@ -1988,8 +2099,8 @@ char *sv[] = {
"E-postfunktioner", /* Mail actions (MA) header -HTML*/
"sänd ett nytt ämne", /* MA New Message -HTML*/
"svara på brevet", /* MA Reply -HTML*/
- "Sammanfattning över månatliga indexfiler", /* monthly -HTML*/
- "Sammanfattning över årliga indexfiler", /* yearly -HTML*/
+ "sammanfattning över månatliga indexfiler", /* monthly -HTML*/
+ "sammanfattning över årliga indexfiler", /* yearly -HTML*/
"Bygger en GDBM-huvudcache", /* Build a GDBM header cache -STDOUT*/
"Tillval för GDBM-huvudcache inte inkompilerat",
/* GDBM header cache option not build in -STDERR*/
@@ -2008,7 +2119,7 @@ char *sv[] = {
"Mapplista", /* MSG_FOLDERS_INDEX -HTML */
"Detta brev har tagits bort från arkivet", /* MSG_DELETED -HTML */
"Detta brev har utgått", /* MSG_EXPIRED -HTML */
- "(borttaget brev)", /* MSG_DEL_SHORT -HTML */
+ "borttaget brev", /* MSG_DEL_SHORT -HTML */
"Ursprunglig brevtext", /* MSG_TXT_VERSION -HTML */
"Detta brev har filtrerats", /* MSG_FILTERED_OUT -HTML */
"Författare", /* MSG_FROM -HTML*/
@@ -2056,11 +2167,20 @@ char *sv[] = {
" to ", /* to - HTML */
"from", /* from - HTML */
"on", /* on - HTML */
- "message archived in another list or period", /* unknown in reply to - HTML */
+ "Message archived in another list or period", /* unknown in reply to - HTML */
"Detta brev har tagits bort från arkivet", /* MSG_DELETED_OTHER -HTML */
"Note: this message has been edited and differs from the originally archived copy.", /* MSG_EDITED -HTML */
"deleted", /* MSG_SENDER_DELETED -HTML */
"deleted", /* MSG_SUBJECT_DELETED -HTML */
+ "Access mail archives by date, thread, author and subject", /* MSG_ACCESS_MAIL_ARCHIVES_BY_CAPTION - HTML */
+ "Sort by", /* CSort by - HTML*/
+ "Nothing received yet!", /* MSG_EMPTY_ARCHIVE - HTML */
+ "attached message", /* MSG_ATTACHED_MESSAGE_NOTICE - HTML */
+ "Forwarded message", /* MSG_FORWARDED_MESSAGE_NOTICE - HTML */
+ "Attachments", /* MSG_ATTACHMENTS_NOTICE */
+ "Attachments for message", /* MSG_ATTACHMENTS_FOR_MESSAGE_NOTICE */
+ "(no messages are available in this archive)", /* MSG_EMPTY_ARCHIVE_NOTICE */
+ "Normal view", /* MSG_CSS_NORMAL_VIEW */
NULL, /* End Of Message Table - NOWHERE*/
};
@@ -2173,8 +2293,8 @@ char *no[] = {
"E-postfunksjoner", /* Mail actions (MA) header -HTML*/
"Lag ny tråd", /* MA New Message -HTML*/
"besvare meldingen", /* MA Reply -HTML*/
- "Sammenfatning over månedlige indeksfiler", /* monthly -HTML*/
- "Sammenfatning over årlige indeksfiler", /* yearly -HTML*/
+ "sammenfatning over månedlige indeksfiler", /* monthly -HTML*/
+ "sammenfatning over årlige indeksfiler", /* yearly -HTML*/
"Bygger en GDBM-headercache", /* Build a GDBM header cache -STDOUT*/
"GDBM header cache opsjon ikke innebygget",
/* GDBM header cache option not build in -STDERR*/
@@ -2193,7 +2313,7 @@ char *no[] = {
"Mappeliste", /* MSG_FOLDERS_INDEX -HTML */
"Denne meldingen er fjernet fra arkivet", /* MSG_DELETED -HTML */
"Dette meldingen har utgått", /* MSG_EXPIRED -HTML */
- "(slettet melding)", /* MSG_DEL_SHORT -HTML */
+ "slettet melding", /* MSG_DEL_SHORT -HTML */
"Opprinnelig brevtekst", /* MSG_TXT_VERSION -HTML */
"Denne meldingen har blitt filtrert bort", /* MSG_FILTERED_OUT -HTML */
"Forfatter", /* MSG_FROM -HTML*/
@@ -2241,11 +2361,20 @@ char *no[] = {
" to ", /* to - HTML */
"from", /* from - HTML */
"on", /* on - HTML */
- "message archived in another list or period", /* unknown in reply to - HTML */
+ "Message archived in another list or period", /* unknown in reply to - HTML */
"Denne meldingen er fjernet fra arkivet", /* MSG_DELETED_OTHER -HTML */
"Note: this message has been edited and differs from the originally archived copy.", /* MSG_EDITED -HTML */
"deleted", /* MSG_SENDER_DELETED -HTML */
"deleted", /* MSG_SUBJECT_DELETED -HTML */
+ "Access mail archives by date, thread, author and subject", /* MSG_ACCESS_MAIL_ARCHIVES_BY_CAPTION - HTML */
+ "Sort by", /* CSort by - HTML*/
+ "Nothing received yet!", /* MSG_EMPTY_ARCHIVE - HTML */
+ "attached message", /* MSG_ATTACHED_MESSAGE_NOTICE - HTML */
+ "Forwarded message", /* MSG_FORWARDED_MESSAGE_NOTICE - HTML */
+ "Attachments", /* MSG_ATTACHMENTS_NOTICE */
+ "Attachments for message", /* MSG_ATTACHMENTS_FOR_MESSAGE_NOTICE */
+ "(no messages are available in this archive)", /* MSG_EMPTY_ARCHIVE_NOTICE */
+ "Normal view", /* MSG_CSS_NORMAL_VIEW */
NULL, /* End Of Message Table - NOWHERE*/
};
@@ -2363,8 +2492,8 @@ char *gr[] = { /* Greek */
"Mail åíÝñãåéåò", /* Mail actions (MA) header -HTML*/
"Óôåßëå åíá êáéíïýñéï ìÞíõìá ", /* MA New Message -HTML*/
"ÁðÜíôçóå óå áõôü ôï ìÞíõìá", /* MA Reply -HTML*/
- "Ðåñßëçøç ôùí ìçíéáßùí åõñåôÞñéùí", /* monthly -HTML*/
- "Ðåñßëçøç ôùí åôÞóéùí åõñåôÞñéùí", /* yearly -HTML*/
+ "ðåñßëçøç ôùí ìçíéáßùí åõñåôÞñéùí", /* monthly -HTML*/
+ "ðåñßëçøç ôùí åôÞóéùí åõñåôÞñéùí", /* yearly -HTML*/
"Build a GDBM header cache", /* Build a GDBM header cache -STDOUT*/
"Äçìéïõñãþ ôï gdbm åõñåôÞñéï... ", /* Creating gdbm index -STDOUT*/
"Äåí ìðïñþ íá äçìéïõñãÞóù ôï gdbm áñ÷åßï... ", /* Can't create gdbm index -STDOUT*/
@@ -2381,7 +2510,7 @@ char *gr[] = { /* Greek */
"Ëßóôá êáôáëüãùí", /* MSG_FOLDERS_INDEX -HTML */
"Áõôü ôï ìÞíõìá Ý÷åé óâçóôåß áðï ôï áñ÷åßï", /* MSG_DELETED -HTML */
"Áõôü ôï ìÞíõìá Ý÷åé ëÞîåé", /* MSG_EXPIRED -HTML */
- "(óâçóìÝíï ìÞíõìá)", /* MSG_DEL_SHORT -HTML */
+ "óâçóìÝíï ìÞíõìá", /* MSG_DEL_SHORT -HTML */
"Ðñüôõðï êåßìåíï ôïõ ìçíýìáôïò", /* MSG_TXT_VERSION -HTML */
"Áõôü ôï ìÞíõìá Ý÷åé öéëôñáñéóôåß ", /* MSG_FILTERED_OUT -HTML */
"ÓõããñáöÝáò", /* MSG_FROM -HTML*/
@@ -2427,11 +2556,20 @@ char *gr[] = { /* Greek */
" to ", /* to - HTML */
"from", /* from - HTML */
"on", /* on - HTML */
- "message archived in another list or period", /* unknown in reply to - HTML */
+ "Message archived in another list or period", /* unknown in reply to - HTML */
"Áõôü ôï ìÞíõìá Ý÷åé óâçóôåß áðï ôï áñ÷åßï", /* MSG_DELETED_OTHER -HTML */
"Note: this message has been edited and differs from the originally archived copy.", /* MSG_EDITED -HTML */
"deleted", /* MSG_SENDER_DELETED -HTML */
"deleted", /* MSG_SUBJECT_DELETED -HTML */
+ "Access mail archives by date, thread, author and subject", /* MSG_ACCESS_MAIL_ARCHIVES_BY_CAPTION - HTML */
+ "Sort by", /* CSort by - HTML*/
+ "Nothing received yet!", /* MSG_EMPTY_ARCHIVE - HTML */
+ "attached message", /* MSG_ATTACHED_MESSAGE_NOTICE - HTML */
+ "Forwarded message", /* MSG_FORWARDED_MESSAGE_NOTICE - HTML */
+ "Attachments", /* MSG_ATTACHMENTS_NOTICE */
+ "Attachments for message", /* MSG_ATTACHMENTS_FOR_MESSAGE_NOTICE */
+ "(no messages are available in this archive)", /* MSG_EMPTY_ARCHIVE_NOTICE */
+ "Normal view", /* MSG_CSS_NORMAL_VIEW */
NULL, /* End Of Message Table - NOWHERE*/
};
@@ -2538,8 +2676,8 @@ char *ru[] = { /* Russian */
"äÅÊÓÔ×ÉÑ Ó ÐÏÞÔÏÊ", /* Mail actions (MA) header -HTML*/
"ðÏÓÌÁÔØ ÎÏ×ÕÀ ÓÔÁÔØÀ", /* MA New Message -HTML*/
"ïÔ×ÅÔÉÔØ ÎÁ ÜÔÏ ÓÏÏÂÝÅÎÉÅ", /* MA Reply -HTML*/
- "óÕÍÍÁÒÎÏ ÚÁ ÍÅÓÑà ÉÎÄÅËÓÎÙÈ ÆÁÊÌÏ×", /* monthly -HTML*/
- "óÕÍÍÁÒÎÏ ÚÁ ÇÏÄ ÉÎÄÅËÓÎÙÈ ÆÁÊÌÏ×", /* yearly -HTML*/
+ "óõííáòîï úá íåóñã éîäåëóîùè æáêìï×", /* monthly -HTML*/
+ "óõííáòîï úá çïä éîäåëóîùè æáêìï×", /* yearly -HTML*/
"ðÏÓÔÒÏÅÎÉÅ GDBM ÚÁÇÏÌÏ×ËÁ ËÜÛÁ", /* Build a GDBM header cache -STDOUT*/
"ïÐÃÉÑ GDBM header cache ÎÅ ×ÓÔÒÏÅÎÁ",/* GDBM header cache option not build in -STDERR*/
"óÔÒÏÀ gdbm ÉÎÄÅËÓ... ", /* Creating gdbm index -STDOUT*/
@@ -2557,7 +2695,7 @@ char *ru[] = { /* Russian */
"óÐÉÓÏË ÄÉÒÅËÔÏÒÉÊ", /* MSG_FOLDERS_INDEX -HTML */
"üÔÏ ÓÏÏÂÝÅÎÉÅ ÂÙÌÏ ÕÄÁÌÅÎÏ ÉÈ ÁÒÈÉ×Á", /* MSG_DELETED -HTML */
"üÔÏ ÓÏÏÂÝÅÎÉÅ ÐÒÏÓÒÏÞÅÎÏ", /* MSG_EXPIRED -HTML */
- "(ÕÄÁÌÅÎÎÏÅ ÓÏÏÂÝÅÎÉÅ)", /* MSG_DEL_SHORT -HTML */
+ "ÕÄÁÌÅÎÎÏÅ ÓÏÏÂÝÅÎÉÅ", /* MSG_DEL_SHORT -HTML */
"éÓÈÏÄÎÙÊ ÔÅËÓÔ ÄÁÎÎÏÇÏ ÓÏÏÂÝÅÎÉÑ", /* MSG_TXT_VERSION -HTML */
"üÔÏ ÓÏÏÂÝÅÎÉÅ ÂÙÌÏ ÏÔÆÉÌØÔÒÏ×ÁÎÏ", /* MSG_FILTERED_OUT -HTML */
"ïÔ", /* MSG_FROM -HTML*/
@@ -2605,11 +2743,20 @@ char *ru[] = { /* Russian */
" to ", /* to - HTML */
"from", /* from - HTML */
"on", /* on - HTML */
- "message archived in another list or period", /* unknown in reply to - HTML */
+ "Message archived in another list or period", /* unknown in reply to - HTML */
"üÔÏ ÓÏÏÂÝÅÎÉÅ ÂÙÌÏ ÕÄÁÌÅÎÏ ÉÈ ÁÒÈÉ×Á", /* MSG_DELETED_OTHER -HTML */
"Note: this message has been edited and differs from the originally archived copy.", /* MSG_EDITED -HTML */
"deleted", /* MSG_SENDER_DELETED -HTML */
"deleted", /* MSG_SUBJECT_DELETED -HTML */
+ "Access mail archives by date, thread, author and subject", /* MSG_ACCESS_MAIL_ARCHIVES_BY_CAPTION - HTML */
+ "Sort by", /* CSort by - HTML*/
+ "Nothing received yet!", /* MSG_EMPTY_ARCHIVE - HTML */
+ "attached message", /* MSG_ATTACHED_MESSAGE_NOTICE - HTML */
+ "Forwarded message", /* MSG_FORWARDED_MESSAGE_NOTICE - HTML */
+ "Attachments", /* MSG_ATTACHMENTS_NOTICE */
+ "Attachments for message", /* MSG_ATTACHMENTS_FOR_MESSAGE_NOTICE */
+ "(no messages are available in this archive)", /* MSG_EMPTY_ARCHIVE_NOTICE */
+ "Normal view", /* MSG_CSS_NORMAL_VIEW */
NULL, /* End Of Message Table - NOWHERE*/
};
@@ -2647,3 +2794,5 @@ extern char **lang;
extern struct language_entry ltable[];
#endif
+
+#endif /* _HYPERMAIL_LANG_H */
diff --git a/src/lock.c b/src/lock.c
index ad919913..8f6fa14d 100644
--- a/src/lock.c
+++ b/src/lock.c
@@ -1,3 +1,21 @@
+/*
+** Copyright (C) 1997-2023 Hypermail Project
+**
+** This program and library is free software; you can redistribute it and/or
+** modify it under the terms of the GNU (Library) General Public License
+** as published by the Free Software Foundation; either version 3
+** of the License, or 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 (Library) General Public License for more details.
+**
+** You should have received a copy of the GNU (Library) 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
+*/
+
#include "hypermail.h"
#include "setup.h"
@@ -13,7 +31,7 @@ void lock_archive(char *dir)
int count = 0; /* # minutes waited */
i_locked_it = 0; /* guilty until proven innocent */
- snprintf(lockfile, sizeof(lockfile), "%s/%s", dir, LOCKBASE);
+ trio_snprintf(lockfile, sizeof(lockfile), "%s/%s", dir, LOCKBASE);
while ((fp = fopen(lockfile, "r")) != NULL) {
fgets(buffer, MAXLINE-1, fp);
@@ -36,14 +54,14 @@ void lock_archive(char *dir)
fclose(fp);
}
else if (dir[0]) {
- snprintf(errmsg, sizeof(errmsg), "Couldn't create lock file \"%s\".", lockfile);
+ trio_snprintf(errmsg, sizeof(errmsg), "Couldn't create lock file \"%s\".", lockfile);
progerr(errmsg);
}
}
void unlock_archive(void)
{
- if (lockfile && i_locked_it)
+ if (*lockfile != '\0' && i_locked_it)
remove(lockfile);
lockfile[0] = '\0';
}
diff --git a/src/mail.c b/src/mail.c
deleted file mode 100644
index 5cb16ab8..00000000
--- a/src/mail.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp.
-** VeriFone Inc./Hewlett-Packard. All Rights Reserved.
-** Kevin Hughes, kev@kevcom.com 3/11/94
-** Jay Weber, weber@eit.com
-** Kent Landfield, kent@landfield.com 4/6/97
-**
-** This program and library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU (Library) General Public License
-** as published by the Free Software Foundation; either version 2
-** of the License, or 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 (Library) General Public License for more details.
-**
-** You should have received a copy of the GNU (Library) 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
-*/
-#include "../libcgi/cgi.h"
-#include "../config.h"
-
-void cgi_main(cgi_info *ci)
-{
- /* This program has been disabled because it
- * was probably easy for spammers to use as an open relay. It also
- * had problems with enabling malicious use of JavaScript and
- * CRLF Injection.
- */
- printf("\n");
- printf("\n");
- printf("This page has been disabled due to potential abuse by spammers.\n");
- printf("\n\n");
-}
diff --git a/src/mem.c b/src/mem.c
index 9a687f51..2cfe8447 100644
--- a/src/mem.c
+++ b/src/mem.c
@@ -3,10 +3,11 @@
** VeriFone Inc./Hewlett-Packard. All Rights Reserved.
** Kevin Hughes, kev@kevcom.com 3/11/94
** Kent Landfield, kent@landfield.com 4/6/97
+** Hypermail Project 1998-2023
**
** This program and library is free software; you can redistribute it and/or
** modify it under the terms of the GNU (Library) General Public License
-** as published by the Free Software Foundation; either version 2
+** as published by the Free Software Foundation; either version 3
** of the License, or any later version.
**
** This program is distributed in the hope that it will be useful,
diff --git a/src/parse.c b/src/parse.c
index aad1740e..18dba039 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -1,26 +1,26 @@
-/*
+/*
** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp.
** VeriFone Inc./Hewlett-Packard. All Rights Reserved.
** Kevin Hughes, kev@kevcom.com 3/11/94
** Kent Landfield, kent@landfield.com 4/6/97
-**
-** This program and library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU (Library) General Public License
-** as published by the Free Software Foundation; either version 2
-** of the License, or 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 (Library) General Public License for more details.
-**
+** Hypermail Project 1998-2023
+**
+** This program and library is free software; you can redistribute it and/or
+** modify it under the terms of the GNU (Library) General Public License
+** as published by the Free Software Foundation; either version 3
+** of the License, or 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 (Library) General Public License for more details.
+**
** You should have received a copy of the GNU (Library) 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
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include
-#include
#include "hypermail.h"
#include "setup.h"
@@ -64,7 +64,7 @@
#include "../lcc/lcc_extras.h"
#endif
-extern char *mktemp(char *);
+#define NEW_PARSER 1
typedef enum {
ENCODE_NORMAL,
@@ -91,11 +91,11 @@ typedef enum {
CONTENT_UNKNOWN /* must be the last one */
} ContentType;
-static int hasblack(char *p)
-{
- while(p && *p && isspace(*p++));
- return (*p ? TRUE : FALSE);
-}
+typedef enum {
+ NO_FILE,
+ MAKE_FILE,
+ MADE_FILE
+} FileStatus; /* for attachments */
int ignorecontent(char *type)
{
@@ -214,9 +214,8 @@ int isre(char *re, char **end)
endp = re + 3;
}
else if (!strncasecmp("Re[", re, 3)) {
- long level;
re += 3;
- level = strtol(re, &re, 10); /* eat the number */
+ strtol(re, &re, 10); /* eat the number */
if (!strncmp("]:", re, 2)) {
/* we have an end "]:" and therefore it qualifies as a Re */
endp = re + 2;
@@ -241,7 +240,11 @@ char *findre(char *in, char **end)
while (*in) {
if (isre(in, end))
return in;
- in++;
+ if (isspace(*in)) {
+ in++;
+ } else {
+ break;
+ }
}
return NULL;
}
@@ -278,9 +281,9 @@ void print_progress(int num, char *msg, char *filename)
fputs(bufstr, stdout); /* put out the string */
len = strlen(bufstr); /* get length of new string */
- /*
- * If there is a new message then erase
- * the trailing info from the enw string
+ /*
+ * If there is a new message then erase
+ * the trailing info from the enw string
*/
if (msg != NULL) {
@@ -305,13 +308,22 @@ char *safe_filename(char *name)
register char *np;
np = name;
+
+ if (!np || *np == '\0') {
+ return NULL;
+ }
+
+ /* skip leading spaces in the filename */
while (*np && (*np == ' ' || *np == '\t'))
np++;
- if (!*np)
- return (NULL);
+ if (!*np || !*np == '\n' || *np == '\r') {
+ /* filename is made of only spaces; replace them with
+ REPLACEMENT_CHAR */
+ np = name;
+ }
- for (sp = name, np = name; *np && *np != '\n';) {
+ for (sp = name, np = name; *np && *np != '\n' && *np != '\r';) {
/* if valid character then store it */
if (((*np >= 'a' && *np <= 'z') || (*np >= '0' && *np <= '9') ||
(*np >= 'A' && *np <= 'Z') || (*np == '-') || (*np == '.') ||
@@ -346,7 +358,9 @@ create_attachname(char *attachname, int max_len)
strncpy(suffix, attachname + i, sizeof(suffix) - 1);
else
suffix[0] = 0;
- strncpy(attachname, set_filename_base, max_len);
+ strncpy(attachname, set_filename_base, max_len - 1);
+ /* make sure it is a NULL terminated string */
+ attachname[max_len - 1] = '\0';
strncat(attachname, suffix, max_len - strlen(attachname) - 1);
safe_filename(attachname);
}
@@ -376,7 +390,7 @@ void crossindex(void)
&maybereply);
if (status != -1) {
struct emailinfo *email2;
-
+
if (!hashnumlookup(status, &email2)) {
++num;
continue;
@@ -390,7 +404,7 @@ void crossindex(void)
++num;
continue;
}
-
+
if (set_linkquotes) {
struct reply *rp;
int found_num = 0;
@@ -406,7 +420,7 @@ void crossindex(void)
#else
replylist = addreply(replylist, status, email, maybereply,
&replylist_end);
-#endif
+#endif
}
else {
#ifdef FASTREPLYCODE
@@ -415,7 +429,7 @@ void crossindex(void)
#else
replylist = addreply(replylist, status, email, maybereply,
&replylist_end);
-#endif
+#endif
}
}
num++;
@@ -437,7 +451,7 @@ void crossindex(void)
#endif
}
-/*
+/*
** Recursively checks for replies to replies to a message, etc.
** Replies are added to the thread list.
*/
@@ -448,8 +462,7 @@ void crossindexthread2(int num)
struct reply *rp;
struct emailinfo *ep;
if(!hashnumlookup(num, &ep)) {
- char errmsg[512];
- snprintf(errmsg, sizeof(errmsg),
+ trio_snprintf(errmsg, sizeof(errmsg),
"internal error crossindexthread2 %d", num);
progerr(errmsg);
}
@@ -460,7 +473,15 @@ void crossindexthread2(int num)
if (0) fprintf(stderr, "add thread.b %d %d %d\n", num, rp->data->msgnum, rp->msgnum);
threadlist = addreply(threadlist, num, rp->data, 0,
&threadlist_end);
- printedlist = markasprinted(printedthreadlist, rp->msgnum);
+#ifdef FIX_OR_DELETE_ME
+ /* JK: 2023-05-17: this seems to have been a longtime typo,
+ it produces memory leaks and didn't have any use in the
+ thread code. Tentatively correcting it to printthreadlist
+ and checking for side effects */
+ printedlist = markasprinted(printedthreadlist, rp->msgnum);
+#else
+ printedthreadlist = markasprinted(printedthreadlist, rp->msgnum);
+#endif
crossindexthread2(rp->msgnum);
}
}
@@ -475,7 +496,14 @@ void crossindexthread2(int num)
rp->data->flags |= USED_THREAD;
threadlist = addreply(threadlist, num, rp->data, 0,
&threadlist_end);
+#ifdef FIX_OR_DELETE_ME
+ /* JK: 2023-05-17: this seems to have been a longtime typo,
+ it produces memory leaks and didn't have any use in the
+ thread code. Tentatively correcting it to printthreadlist
+ and checking for side effects */
printedlist = markasprinted(printedthreadlist, rp->msgnum);
+#endif
+ printedthreadlist = markasprinted(printedthreadlist, rp->msgnum);
crossindexthread2(rp->msgnum);
}
}
@@ -543,14 +571,16 @@ char *getmaildate(char *line)
INIT_PUSH(buff);
c = strchr(line, ':');
- if ((*(c + 1) && *(c + 1) == '\n') || (*(c + 2) && *(c + 2) == '\n')) {
+ if (!*(c + 1)
+ || ((*(c + 1) == '\n')
+ || (*(c + 1) == '\r'))) {
PushString(&buff, NODATE);
RETURN_PUSH(buff);
}
c += 2;
while (*c == ' ' || *c == '\t')
c++;
- for (i = 0, len = DATESTRLEN - 1; *c && *c != '\n' && i < len; c++)
+ for (i = 0, len = DATESTRLEN - 1; *c && *c != '\n' && *c != '\r' && i < len; c++)
PushByte(&buff, *c);
RETURN_PUSH(buff);
@@ -572,7 +602,7 @@ char *getfromdate(char *line)
if (days[i] == NULL)
tmpdate[0] = '\0';
else {
- for (i = 0, len = DATESTRLEN - 1; *c && *c != '\n' && i < len; c++)
+ for (i = 0, len = DATESTRLEN - 1; *c && *c != '\n' && *c != '\r' && i < len; c++)
tmpdate[i++] = *c;
tmpdate[i] = '\0';
@@ -581,7 +611,7 @@ char *getfromdate(char *line)
}
-/*
+/*
** Grabs the message ID, like <...> from the Message-ID: header.
*/
@@ -595,9 +625,9 @@ char *getid(char *line)
INIT_PUSH(buff);
if (strrchr(line, '<') == NULL) {
- /*
+ /*
* bozo alert!
- * msg-id = "<" addr-spec ">"
+ * msg-id = "<" addr-spec ">"
* try to recover as best we can
*/
c = strchr(line, ':') + 1; /* we know this exists! */
@@ -609,7 +639,7 @@ char *getid(char *line)
else
c = strrchr(line, '<') + 1;
- for (i = 0; *c && *c != '>' && *c != '\n'; c++) {
+ for (i = 0; *c && *c != '>' && *c != '\n' && *c != '\r'; c++) {
if (*c == '\\')
continue;
PushByte(&buff, *c);
@@ -662,7 +692,7 @@ char *getsubject(char *line)
startp = c;
- for (i = len = 0; c && *c && (*c != '\n'); c++) {
+ for (i = len = 0; c && *c && (*c != '\n') && (*c != '\r'); c++) {
i++;
/* keep track of the max length without trailing white spaces: */
if (!isspace(*c))
@@ -670,7 +700,7 @@ char *getsubject(char *line)
}
if (isre(startp, &postre)) {
- if (!*postre || (*postre == '\n'))
+ if (!*postre || (*postre == '\n') || (*postre == '\r'))
len = 0;
}
@@ -687,7 +717,7 @@ char *getsubject(char *line)
/*
** Grabs the annotation values given in the annotation user-defined header
-**
+**
** annotation_content is set to the value of the content annotation
** annotation_robot is set to the values of the robot annotations
** Returns TRUE if an annotation was found, FALSE otherwise.
@@ -701,7 +731,7 @@ getannotation(char *line, annotation_content_t *annotation_content,
*annotation_content = ANNOTATION_CONTENT_NONE;;
*annotation_robot = ANNOTATION_ROBOT_NONE;
-
+
c = strchr(line, ':');
if (!c)
return FALSE;
@@ -713,9 +743,9 @@ getannotation(char *line, annotation_content_t *annotation_content,
while (isspace(*c))
c++;
-
+
startp = c;
- while (!isspace (*c) && *c != '\n' && *c != ',') {
+ while (!isspace (*c) && *c != '\n' && *c != '\r' && *c != ',') {
c++;
}
@@ -741,7 +771,7 @@ getannotation(char *line, annotation_content_t *annotation_content,
}
/* only return true if at least a valid annotation was found */
- return (*annotation_content != ANNOTATION_CONTENT_NONE
+ return (*annotation_content != ANNOTATION_CONTENT_NONE
|| *annotation_robot != ANNOTATION_ROBOT_NONE);
}
@@ -749,15 +779,15 @@ getannotation(char *line, annotation_content_t *annotation_content,
** Grabs the message ID, or date, from the In-reply-to: header.
**
** Maybe I'm confused but....
-** What either ? Should it not be consistent and choose to return
-** one (the msgid) as the default and fall back to date when a
+** What either ? Should it not be consistent and choose to return
+** one (the msgid) as the default and fall back to date when a
** msgid cannot be found ?
**
** Who knows what other formats are out there...
**
** In-Reply-To: <1DD9B854E27@everett.pitt.cc.nc.us>
** In-Reply-To: <199709181645.MAA02097@mail.clark.net> from "Marcus J. Ranum" at Sep 18, 97 12:41:40 pm
-** In-Reply-To: <199709181645.MAA02097@mail.clark.net> from
+** In-Reply-To: <199709181645.MAA02097@mail.clark.net> from
** In-Reply-To: "L. Detweiler"'s message of Fri, 04 Feb 94 22:51:22 -0700 <199402050551.WAA16189@longs.lance.colostate.edu>
**
** The message id should always be returned for threading purposes. Mixing
@@ -776,42 +806,42 @@ char *getreply(char *line)
/* Check for blank line */
- /*
- * Check for line with " from " and " at ". Format of the line is
+ /*
+ * Check for line with " from " and " at ". Format of the line is
* from "quoted user name" at date-string
*/
if (strstr(line, " from ") != NULL) {
if ((strstr(line, " at ")) != NULL) {
if ((m = strchr(line, '<')) != NULL) {
- for (m++; *m && *m != '>' && *m != '\n'; m++) {
+ for (m++; *m && *m != '>' && *m != '\n' && *m != '\r'; m++) {
PushByte(&buff, *m);
}
RETURN_PUSH(buff);
}
}
- /*
+ /*
* If no 'at' the line may be a continued line or a truncated line.
* Both will be picked up later.
*/
}
- /*
- * Check for line with " message of ". Format of the line is
+ /*
+ * Check for line with " message of ". Format of the line is
* "quoted user name"'s message of date-string
*/
if ((c = strstr(line, "message of ")) != NULL) {
/*
- * Check to see if there is a message ID on the line.
+ * Check to see if there is a message ID on the line.
* If not this is a continued line and when you add a readline()
* function that concatenates continuation lines collapsing
* white space, you might want to revisit this...
*/
if ((m = strchr(line, '<')) != NULL) {
- for (m++; *m && *m != '>' && *m != '\n'; m++) {
+ for (m++; *m && *m != '>' && *m != '\n' && *m != '\r'; m++) {
PushByte(&buff, *m);
}
RETURN_PUSH(buff);
@@ -824,7 +854,7 @@ char *getreply(char *line)
if (*c == '"')
c++;
- for (; *c && *c != '.' && *c != '\n'; c++) {
+ for (; *c && *c != '.' && *c != '\n' && *c != '\r'; c++) {
PushByte(&buff, *c);
}
RETURN_PUSH(buff);
@@ -832,7 +862,7 @@ char *getreply(char *line)
if ((c = strstr(line, "dated: ")) != NULL) {
c += 7;
- for (; *c && *c != '.' && *c != '\n'; c++) {
+ for (; *c && *c != '.' && *c != '\n' && *c != '\r'; c++) {
PushByte(&buff, *c);
}
RETURN_PUSH(buff);
@@ -840,7 +870,7 @@ char *getreply(char *line)
if ((c = strstr(line, "dated ")) != NULL) {
c += 6;
- for (; *c && *c != '.' && *c != '\n'; c++) {
+ for (; *c && *c != '.' && *c != '\n' && *c != '\r'; c++) {
PushByte(&buff, *c);
}
RETURN_PUSH(buff);
@@ -849,7 +879,7 @@ char *getreply(char *line)
if ((c = strchr(line, '<')) != NULL) {
c++;
- for (; *c && *c != '>' && *c != '\n'; c++) {
+ for (; *c && *c != '>' && *c != '\n' && *c != '\r'; c++) {
if (*c == '\\')
continue;
PushByte(&buff, *c);
@@ -862,7 +892,7 @@ char *getreply(char *line)
if (*c == '\"')
c++;
- for (; *c && *c != '.' && *c != '\n' && *c != 'f'; c++) {
+ for (; *c && *c != '.' && *c != '\n' && *c != '\r' && *c != 'f'; c++) {
PushByte(&buff, *c);
}
RETURN_PUSH(buff);
@@ -910,7 +940,7 @@ extract_rfc2047_content(char *iptr)
**
** Should result in "I'm called Daniel" too.
**
-** Returns the newly allcated string, or the previous if nothing changed
+** Returns the newly allcated string, or the previous if nothing changed
*/
static char *mdecodeRFC2047(char *string, int length, char *charsetsave)
@@ -924,13 +954,12 @@ static char *mdecodeRFC2047(char *string, int length, char *charsetsave)
char charset[129];
char encoding[33];
char dummy[129];
- char *ptr, *endptr;
- char *old_output;
+ char *endptr;
#ifdef NOTUSED
char equal;
#endif
- int value;
+ unsigned int value;
char didanything = FALSE;
@@ -959,14 +988,15 @@ static char *mdecodeRFC2047(char *string, int length, char *charsetsave)
if (!strcasecmp("q", encoding)) {
/* quoted printable decoding */
- endptr = ptr + strlen(ptr);
+#ifdef HAVE_ICONV
+ char *orig2,*output2,*output3;
+ size_t len, charsetlen;
+#endif
+ endptr = ptr + strlen(ptr);
#ifdef HAVE_ICONV
- char *orig2,*output2,*output3;
- size_t len, charsetlen;
- orig2=output2=malloc(strlen(string)+1);
- memset(output2,0,strlen(string)+1);
- old_output=output;
+ orig2=output2=malloc(strlen(string)+1);
+ memset(output2,0,strlen(string)+1);
for (; ptr < endptr; ptr++) {
switch (*ptr) {
@@ -1011,12 +1041,12 @@ static char *mdecodeRFC2047(char *string, int length, char *charsetsave)
}
else if (!strcasecmp("b", encoding)) {
/* base64 decoding */
- int len;
- size_t charsetlen;
#ifdef HAVE_ICONV
+ size_t charsetlen;
size_t tmplen;
char *output2;
- base64Decode(ptr, output, &len);
+
+ base64_decode_string(ptr, output);
output2=i18n_convstring(output,charset,"UTF-8",&tmplen);
memcpy(output,output2,tmplen);
output += tmplen;
@@ -1025,7 +1055,9 @@ static char *mdecodeRFC2047(char *string, int length, char *charsetsave)
memcpy(charsetsave,charset,charsetlen);
charsetsave[charsetlen] = '\0';
#else
- base64Decode(ptr, output, &len);
+ int len;
+
+ len = base64_decode_string(ptr, output);
output += len;
#endif
}
@@ -1083,30 +1115,115 @@ static char *mdecodeRFC2047(char *string, int length, char *charsetsave)
puts("");
}
#endif
+ /* here we should add calls to validate the utf8 string,
+ to avoid security issues */
return storage; /* return new */
}
else {
free(storage);
-#ifdef HAVE_ICONV
- /* make sure there are only ascii chars in the string
- ** for messages that don't respect rfc2047 */
- i18n_replace_non_ascii_chars(string);
-#endif
+
+ if ( i18n_is_valid_us_ascii(string) ) {
+ /* nothing to do, passing thru */
+ }
+
+ /* RFC6532 allows for using UTF-8 as a header value; we make
+ sure that it is valid UTF-8 */
+ else if ( i18n_is_valid_utf8(string) ) {
+ /* "default" UTF-8 charset */
+ strcpy(charsetsave, "UTF-8");
+
+ } else {
+
+ /*
+ * try to detect the charset of the string and convert it to UTF-8;
+ * in case of failure, replace the header value with "(invalid string)"
+ */
+
+#if defined HAVE_CHARDET && HAVE_ICONV
+ char *charset;
+ char *conv_string;
+ char header_name[129];
+ char *header_value;
+ struct Push pbuf;
+
+ INIT_PUSH(pbuf);
+
+ sscanf(string, "%127[^:]", header_name);
+
+ /* save the header_name:\s */
+ PushString(&pbuf, header_name);
+
+ header_value = string + strlen(header_name);
+ PushByte(&pbuf, *header_value);
+ header_value++;
+ PushByte(&pbuf, *header_value);
+ header_value++;
+
+ /* consider the header_value everything after header_name:\s */
+ charset = i18n_charset_detect(header_value);
+
+ if (!charset || charset[0] == '\0' && !strcmp(charset, "UTF-8") ) {
+ PushString (&pbuf, "(invalid string)");
+ }
+ else {
+ size_t conv_string_sz;
+ conv_string = i18n_convstring(header_value, charset, "UTF-8", &conv_string_sz);
+ if ( !i18n_is_valid_utf8(conv_string) ) {
+ free(conv_string);
+ PushString (&pbuf, "(invalid string)");
+ } else {
+ int charsetlen = strlen(charset) < 255 ? strlen(charset) : 255;
+ memcpy(charsetsave,charset,charsetlen);
+ charsetsave[charsetlen] = '\0';
+ PushString(&pbuf, conv_string);
+ free(conv_string);
+ }
+ free(charset);
+ }
+
+ free(string);
+ string = PUSH_STRING(pbuf);
+#else
+ free(string);
+ string = strsav("(invalid string)");
+#endif
+ }
+
return string;
}
}
-/*
+/*
** RFC 3676 format=flowed parsing routines
*/
-/* get_quote_level returns the number of quotes in a line,
+/*
+** returns true if a string line is s signature start
+** rfc3676 gives "-- \n" and "-- \r\n" as signatures.
+** We also add "--\n" to this list, as mutt allows it
+*/
+static int is_sig_separator (const char *line)
+{
+ bool rv;
+
+ if (!strcmp (line, "-- \n")
+ || !strcmp (line, "-- \r\n")
+ || !strcmp (line, "--\n")) {
+ rv = TRUE;
+ } else {
+ rv = FALSE;
+ }
+
+ return rv;
+}
+
+/* get_quote_level returns the number of quotes in a line,
following the RFC 3676 section 4.5 criteria.
*/
static int get_quotelevel (const char *line)
{
int quoted = 0;
- char *p = (char *) line;
+ const char *p = line;
while (p && *p == '>')
{
@@ -1135,7 +1252,7 @@ static int get_quotelevel (const char *line)
** The function returns true if the current line is flowed.
**
*/
-static bool rfc3676_handler (char *line, bool delsp_flag, int *quotelevel,
+static bool rfc3676_handler (char *line, bool delsp_flag, int *quotelevel,
bool *continue_prev_flow_flag)
{
int new_quotelevel = 0;
@@ -1156,8 +1273,8 @@ static bool rfc3676_handler (char *line, bool delsp_flag, int *quotelevel,
rules for quotes:
1. quoted lines always begin with a '>' char. This symbol may depend on the
- msg charset.
- 2. They are not ss before the quote symbol but may be after it
+ msg charset.
+ 2. They are not ss before the quote symbol but may be after it
appears.
rules for seeing if a line should be flowed with the next one:
@@ -1175,7 +1292,7 @@ static bool rfc3676_handler (char *line, bool delsp_flag, int *quotelevel,
printf("RFC3676: Previous line flow flag: %d\n", *continue_prev_flow_flag);
#endif
- /*
+ /*
** hard crlf detection.
*/
if (rfc3676_ishardlb(line)) {
@@ -1187,7 +1304,7 @@ static bool rfc3676_handler (char *line, bool delsp_flag, int *quotelevel,
#endif
return FALSE;
}
-
+
/*
** quote level detection
*/
@@ -1203,21 +1320,21 @@ static bool rfc3676_handler (char *line, bool delsp_flag, int *quotelevel,
#if DEBUG_PARSE
printf("RFC3676: different quote levels detected. Stopping ff\n");
-#endif
+#endif
}
tmp_padding = new_quotelevel;
- /*
- ** skip space stuffing if any
+ /*
+ ** skip space stuffing if any
*/
if (line[tmp_padding] == ' ') {
tmp_padding++;
#if DEBUG_PARSE
printf("RFC3676: space-stuffing detected; skipping space\n");
-#endif
+#endif
}
- /*
+ /*
** hard crlf detection after quotes
*/
if (rfc3676_ishardlb(line+tmp_padding)) {
@@ -1233,13 +1350,9 @@ static bool rfc3676_handler (char *line, bool delsp_flag, int *quotelevel,
/*
** signature detection
*/
-
- /* Is it a signature separator? */
- /* rfc3676 gives "-- \n" and "--\r\n" as signatures. We also add "--\n" to this list,
- as mutt allows it */
- if (!strcmp (line + tmp_padding, "-- \n")
- || !strcmp (line + tmp_padding, "-- \r\n")
- || !strcmp (line + tmp_padding, "--\n")) {
+
+ /* Is it an RFC3676 signature separator? */
+ if (is_sig_separator (line + tmp_padding)) {
/* yes, stop f=f */
*continue_prev_flow_flag = FALSE;
sig_sep = TRUE;
@@ -1276,12 +1389,12 @@ static bool rfc3676_handler (char *line, bool delsp_flag, int *quotelevel,
}
}
}
-
+
/*
** update flags
*/
*quotelevel = new_quotelevel;
-
+
#if DEBUG_PARSE
if (*continue_prev_flow_flag)
printf("RFC3676: Continuing previous flow\n");
@@ -1329,7 +1442,7 @@ static char * mdecodeQP(FILE *file, char *input, char **result, int *length,
input++;
if ('=' == inchar) {
- int value;
+ unsigned int value;
if ('\n' == *input) {
if (!fgets(i_buffer, MAXLINE, file))
break;
@@ -1462,7 +1575,7 @@ static int do_uudecode(FILE *fp, char *line, char *line_buf,
if (uudecode(fp, line, line, NULL, &pbuf))
/*
- * oh gee, we failed this is chaos
+ * oh gee, we failed this is chaos
*/
return 0;
p2 = PUSH_STRING(pbuf);
@@ -1490,7 +1603,7 @@ static void write_txt_file(struct emailinfo *emp, struct Push *raw_text_buf)
sprintf(tmp_buf, "%.4d", emp->msgnum);
txt_filename = htmlfilename(tmp_buf, emp, set_txtsuffix);
if ((!emp->is_deleted
- || ((emp->is_deleted & (FILTERED_DELETE | FILTERED_OLD | FILTERED_NEW
+ || ((emp->is_deleted & (FILTERED_DELETE | FILTERED_OLD | FILTERED_NEW
| FILTERED_DELETE_OTHER))
&& set_delete_level > 2)
|| (emp->is_deleted == FILTERED_EXPIRE && set_delete_level == 2))
@@ -1505,6 +1618,256 @@ static void write_txt_file(struct emailinfo *emp, struct Push *raw_text_buf)
INIT_PUSH(*raw_text_buf);
}
+/*
+** returns the value for a message_node skip value field
+** following some heuristics
+*/
+static message_node_skip_t message_node_skip_status(FileStatus file_created,
+ ContentType content,
+ char *content_type)
+{
+ message_node_skip_t rv;
+
+ if (content == CONTENT_IGNORE) {
+ rv = MN_SKIP_ALL;
+ /* we want to skip adding a section when root is multipart/foo
+ but we'll handle that elsewhere */
+
+ }
+
+ else if (!strncasecmp(content_type, "multipart/", 10)
+ && content == CONTENT_BINARY && file_created == NO_FILE) {
+ rv = MN_SKIP_BUT_KEEP_CHILDREN;
+ }
+
+ else if (content == CONTENT_BINARY || content == CONTENT_UNKNOWN) {
+ rv = MN_SKIP_STORED_ATTACHMENT;
+ }
+
+ else {
+ rv = MN_KEEP;
+ }
+
+ return rv;
+}
+
+/*
+** singlecontent_get_charset
+**
+** for single (not multipart/) messages, returns
+** the best charset; if none available returns
+** set_default_charset
+**
+** caller must free the returned string
+*/
+static char *_single_content_get_charset(char *charset, char *charsetsave)
+{
+ char *rv;
+ char *s;
+
+ s = choose_charset(charset, charsetsave);
+ if (!s || *s == '\0') {
+ rv = set_default_charset;
+ } else {
+ rv = s;
+ }
+
+ return strsav(rv);
+}
+
+/*
+** returns TRUE if line is just a stand-alone
+** "--" or "-- "
+*/
+static bool _is_signature_separator(const char *line)
+{
+ bool rv;
+ int l = strlen(line);
+
+ if (!strncmp(line, "--", 2)
+ && ((l == 2 && line[2] =='\0')
+ || (l > 2
+ && (line[2] == ' ' || line[2] == '\r' || line[2] == '\n')))) {
+ rv = TRUE;
+ } else {
+ rv= FALSE;
+ }
+
+ return rv;
+}
+
+/*
+** Some old versions of thunderbird, pine, and other UA
+** URL-escaped the <> in the In-Reply-To and first
+** Reference header values.
+** This functions normalizes them by unescaping those
+** characters.
+**
+** If any unescaping takes place, returns a new string
+** that the caller must free.
+**
+** If none unescaping happened, returns NULL.
+**
+*/
+static char * _unescape_reply_and_reference_values(char *line)
+{
+ char *ptr_lower_than;
+ char *ptr_greater_than;
+ char *c;
+ struct Push buff;
+
+ if (!line || !*line || *line == '\n' || *line == '\r') {
+ return NULL;
+ }
+
+ ptr_lower_than = strstr(line, " %3C");
+ ptr_greater_than = strstr(line, "%3E");
+
+ /* we only do the replacement if we found both <> */
+ if (!ptr_lower_than || !ptr_greater_than) {
+ return NULL;
+ }
+
+ /* verify that we have a contiguous string between both
+ * characters */
+ for (c = ptr_lower_than + sizeof(char) * 1; c < ptr_greater_than; c++) {
+ if (isspace(*c) || *c == '\r' || *c == '\n')
+ return NULL;
+ }
+
+ /* verify what the char immediately after the ptr_greater_than to make
+ sure it's a separator or EOL */
+ c = ptr_greater_than + sizeof(char) * 3;
+ if (!isspace(*c) && *c != '\n' && *c != '\r') {
+ return NULL;
+ }
+
+ INIT_PUSH(buff);
+
+ PushNString(&buff, line, ptr_lower_than - line + 1);
+ PushByte(&buff, '<');
+ PushNString(&buff, ptr_lower_than + sizeof(char) * 4, ptr_greater_than - ptr_lower_than - sizeof(char) *4);
+ PushString(&buff, ">");
+ PushString(&buff, ptr_greater_than + sizeof(char) * 3);
+
+ RETURN_PUSH(buff);
+}
+
+/*
+** parses a filename in either a Content-Disposition or Content-Description
+** line.
+**
+** np must be pointing at the first character after the attribute and equal
+** sign, i.e., filename= or name=, respectively.
+** attachname is a preallocated string of size attachname_size
+** the function copies the filename, if found, to attachname and calls
+** safe_filename to make sure it's a valid O.S. name.
+*/
+static void _extract_attachname(char *np, char *attachname, size_t attachname_size)
+{
+ char *jp;
+
+ /* some UA may have done line folding between filename= and the "foo" attribute value;
+ if this is the case, we skip all spaces until we find the first non-space char */
+ jp = np;
+ while (*jp && isspace(*jp)) {
+ jp++;
+ }
+
+ /* if we find a non space character, update np to the new position;
+ otherwise we ignore jp and just use np as it was as
+ we'll handle the only spaces case further down */
+ if (*jp && *jp != '\n' && *jp != '\r' && *jp != ';') {
+ np = jp;
+ }
+
+ /* skip the first quote */
+ if (*np == '"')
+ np++;
+
+ for (jp = attachname; np && *np != '\n' && *np != '\r'
+ && *np != '"' && *np != ';'
+ && jp < attachname + attachname_size - 1;) {
+ *jp++ = *np++;
+ }
+ *jp = '\0';
+ safe_filename(attachname);
+}
+
+/*
+** if the attachname that is given is empty, searchs the Content-Type:
+** header value for a name attribute and, if found, copies it to
+** attachname; If in this case, the Content-Type: header value doesn't
+** have a name attribute, it clears the attachname.
+*/
+static void _control_attachname(char *content_type, char *attachname, size_t attachname_size)
+{
+ /* only use the Content-Type name attribute to get
+ the filename if Content-Disposition didn't
+ provide a filename */
+ char *fname;
+
+ if (*attachname == '\0') {
+ fname = strcasestr(content_type, "name=");
+ if (fname) {
+ fname += 5;
+ _extract_attachname(fname, attachname, attachname_size);
+#ifdef FACTORIZE_ATTACHNAME
+ if ('\"' == *fname)
+ fname++;
+ sscanf(fname, "%128[^\"]", attachname);
+ safe_filename(attachname);
+#endif /* FACTORIZE_ATTACHNAME */
+ }
+ else {
+ attachname[0] = '\0'; /* just clear it */
+ }
+ }
+}
+
+/* validates that a header name is RFC282 compliant
+ returns TRUE if valid, FALSE otherwise
+*/
+static bool _validate_header(const char *header_line)
+{
+ char header_name[129];
+ const char *ptr;
+
+ /* control that we have a header_name: header_value */
+ if (!header_line
+ || *header_line=='\0'
+ || !(ptr = strstr(header_line, ":"))
+ || ptr == header_line
+ || *(ptr + 1) == '\0'
+ || (*(ptr + 1) != ' ' && *(ptr + 1) != '\t')) {
+
+ return FALSE;
+ }
+
+ /* control length of header-name and its requirement
+ to be only valid printable US-ASCII */
+
+ if (!sscanf(header_line, "%127[^:]", header_name)
+ /* line doesn't start with : */
+ || header_line[strlen(header_name)] != ':'
+ /* header name is us_ascii */
+ || !i18n_is_valid_us_ascii(header_name)) {
+
+ return FALSE;
+ }
+
+ /* control that we have a value that is not spaces */
+ ptr = header_line + strlen(header_name) + 1;
+ while (*ptr) {
+ if (*ptr != ' ' && *ptr != '\t' && *ptr != '\r' && *ptr != '\n') {
+ return TRUE;
+ }
+ ptr++;
+ }
+
+ return FALSE;
+}
+
/*
** Parsing...the heart of Hypermail!
** This loads in the articles from stdin or a mailbox, adding the right
@@ -1529,7 +1892,12 @@ int parsemail(char *mbox, /* file name */
char *inreply = NULL;
char *namep = NULL;
char *emailp = NULL;
- char *line = NULL;
+ char message_headers_parsed = FALSE; /* we use this flag to avoid
+ having message/rfc822
+ headers clobber the
+ encapsulating message
+ headers */
+ char *line = NULL;
char line_buf[MAXLINE], fromdate[DATESTRLEN] = "";
char *cp;
char *dp = NULL;
@@ -1552,34 +1920,38 @@ int parsemail(char *mbox, /* file name */
char *att_dir = NULL; /* directory name to store attachments in */
char *meta_dir = NULL; /* directory name where we're storing the meta data
that describes the attachments */
- typedef enum {
- NO_FILE,
- MAKE_FILE,
- MADE_FILE
- } FileStatus; /* for attachments */
-
/* -- variables for the multipart/alternative parser -- */
struct body *origbp = NULL; /* store the original bp */
struct body *origlp = NULL; /* ... and the original lp */
char alternativeparser = FALSE; /* set when inside alternative parser mode */
int alternative_weight = -1; /* the current weight of the prefered alternative content */
- char *prefered_content_charset = NULL; /* the current charset of the alternative */
+ char *prefered_charset = NULL; /* the charset for a message as chosen by heuristics */
struct body *alternative_lp = NULL; /* the previous alternative lp */
struct body *alternative_bp = NULL; /* the previous alternative bp */
struct body *append_bp = NULL; /* text to append to body after parse done*/
struct body *append_lp = NULL;
+
FileStatus alternative_lastfile_created = NO_FILE; /* previous alternative attachments, for non-inline MIME types */
- char alternative_file[129]; /* file name where we store the non-inline alternatives */
- char alternative_lastfile[129]; /* last file name where we store the non-inline alternatives */
- char last_alternative_type[129]; /* the alternative Content-Type value */
+ char alternative_file[131]; /* file name where we store the non-inline alternatives */
+ char alternative_lastfile[131]; /* last file name where we store the non-inline alternatives */
+ char last_alternative_type[131]; /* the alternative Content-Type value */
int att_counter = 0; /* used to generate a unique name for attachments */
+
int parse_multipart_alternative_force_save_alts = 0; /* used to control if we are parsing alternative as multipart */
- int old_set_save_alts = -1; /* used to store the set_save_alts when overriding it for apple mail */
- int applemail_ua_header_len = (set_applemail_mimehack) ? strlen (set_applemail_ua_header) : 0; /* code optimization to avoid computing it each time */
- /*
- ** keeps track of attachment file name used so far for this message
+
+ /* used to store the set_save_alts when overriding it for apple mail */
+ int applemail_old_set_save_alts = -1;
+ /* code optimization to avoid computing it each time */
+ int applemail_ua_header_len = (set_applemail_mimehack) ? strlen (set_applemail_ua_header) : 0;
+ /* we make a local copy of this config variable because the apple mail
+ hack will alter it and we may need to fall back to the original value
+ while processing a complex multipart/ message/rfc822 message */
+ int local_set_save_alts = set_save_alts;
+
+ /*
+ ** keeps track of attachment file name used so far for this message
*/
- struct hmlist *att_name_list = NULL;
+ struct hmlist *att_name_list = NULL;
struct hmlist *att_name_last = NULL;
/* -- end of alternative parser variables -- */
@@ -1591,37 +1963,40 @@ int parsemail(char *mbox, /* file name */
struct body *headp = NULL; /* stored pointer to the point where we last
scanned the headers of this mail. */
- struct body *content_type_p = NULL; /* pointer to the Content-Type header */
-
+
char Mime_B = FALSE;
char boundbuffer[256] = "";
- struct boundary *boundp = NULL; /* This variable is used to store a stack
- of boundary separators in cases with mimed
- mails inside mimed mails */
+ /* This variable is used to store a stack of boundary separators
+ when having multipart body parts embeeded inside other
+ multipart body parts */
+ struct boundary_stack *boundp = NULL;
- struct boundary *multipartp = NULL; /* This variable is used to store a stack of
- mimetypes when dealing with multipart mails */
+ /* This variable is used to store a stack of mime types when
+ dealing with multipart mails */
+ struct hm_stack *multipartp = NULL;
- struct charset_stack *charsetsp = NULL; /* This variable is used
- to store a stack of
- charset/charset_save
- values when dealing
- with multipart mails */
+ struct message_node *root_message_node = NULL; /* points to the first node of a message */
+ struct message_node *current_message_node = NULL;
+ struct message_node *root_alt_message_node = NULL; /* for temporarily storing alternatives */
+ struct message_node *current_alt_message_node = NULL;
+ char alternative_message_node_created = FALSE; /* true if we have created a node used to
+ store multipart/alternative while selecting
+ the prefered one */
bool skip_mime_epilogue = FALSE; /* This variable is used to help skip multipart/foo
epilogues */
-
- char multilinenoend = FALSE; /* This variable is set TRUE if we have read
- a partial line off a multiline-encoded line,
+
+ char multilinenoend = FALSE; /* This variable is set TRUE if we have read
+ a partial line off a multiline-encoded line,
and the next line we read is supposed to get
appended to the previous one */
- int bodyflags = 0; /* This variable is set to extra flags that the
+ int bodyflags = 0; /* This variable is set to extra flags that the
addbody() calls should OR in the flag parameter */
/* RFC 3676 related variables, set while parsing the headers and body content */
- textplain_format_t textplain_format = FORMAT_FIXED;
+ textplain_format_t textplain_format = FORMAT_FIXED;
bool flowed_line = FALSE;
int quotelevel = 0;
bool continue_previous_flow_flag = FALSE;
@@ -1629,55 +2004,63 @@ int parsemail(char *mbox, /* file name */
int binfile = -1;
- char *charset = NULL; /* this is the LOCAL charset used in the mail */
+ char *charset = NULL; /* this is the charset declared in the Content-Type header */
char *charsetsave; /* charset in MIME encoded text */
char *boundary_id = NULL;
char type[129]; /* for Content-Type type */
+ char *content_type_ptr; /* pointing to the Content-Type parsed line */
+ bool attachment_rfc822; /* set to TRUE if the current attachment type is
+ message/rfc822 */
+
char charbuffer[129]; /* for Content-Type charset */
FileStatus file_created = NO_FILE; /* for attachments */
char attachname[129]; /* for attachment file names */
+ char *att_binname = NULL; /* full path + filename pointing to a stored attachment */
+ char *meta_filename = NULL; /* full path + filename to metadata associated with
+ a stored attachment */
+ char *att_link = NULL; /* for a stored attachment HTML link */
+ char *att_comment_filename = NULL; /* for the HTML comment that is inserted after att_link */
char inline_force = FALSE; /* show a attachment in-line, regardles of
the content_disposition */
char *description = NULL; /* user-supplied description for an attachment */
- /* @@@ test for attachment */
char attach_force;
- /* @@@ */
-
+ struct base64_decoder_state *b64_decoder_state = NULL; /* multi-line base64 decoding */
+
EncodeType decode = ENCODE_NORMAL;
ContentType content = CONTENT_TEXT;
charsetsave=malloc(256);
memset(charsetsave,0,255);
-
-
+ *directory = 0;
+ *filename = 0;
+ *pathname = 0;
+ *attachname = '\0';
+
if (use_stdin || !mbox || !strcasecmp(mbox, "NONE"))
fp = stdin;
else if ((fp = fopen(mbox, "rb")) == NULL) {
- snprintf(errmsg, sizeof(errmsg), "%s \"%s\".",
+ trio_snprintf(errmsg, sizeof(errmsg), "%s \"%s\".",
lang[MSG_CANNOT_OPEN_MAIL_ARCHIVE], mbox);
progerr(errmsg);
}
if(set_append) {
-
+
/* add to an mbox as we read */
- *directory = 0;
- *filename = 0;
- *pathname = 0;
if (set_append_filename) {
time_t curtime;
const struct tm *local_curtime;
-
+
time(&curtime);
local_curtime = localtime(&curtime);
-
+
if(strncmp(set_append_filename, "$DIR/", 5) == 0) {
strncpy(directory, dir, MAXFILELEN - 1);
- strftime(filename, MAXFILELEN - 1, set_append_filename+5,
+ strftime(filename, MAXFILELEN - 1, set_append_filename+5,
local_curtime);
} else {
- strftime(filename, MAXFILELEN - 1, set_append_filename,
+ strftime(filename, MAXFILELEN - 1, set_append_filename,
local_curtime);
}
} else {
@@ -1694,6 +2077,9 @@ int parsemail(char *mbox, /* file name */
lang[MSG_CANNOT_OPEN_MAIL_ARCHIVE], pathname);
progerr(errmsg);
}
+ *directory = 0;
+ *filename = 0;
+ *pathname = 0;
}
num = startnum;
@@ -1707,9 +2093,12 @@ int parsemail(char *mbox, /* file name */
msgid = NULL;
bp = NULL;
subject = NOSUBJECT;
+ message_headers_parsed = FALSE;
parse_multipart_alternative_force_save_alts = 0;
- old_set_save_alts = -1;
+ attachment_rfc822 = FALSE;
+ applemail_old_set_save_alts = -1;
+ local_set_save_alts = set_save_alts;
require_filter_len = require_filter_full_len = 0;
for (tlist = set_filter_require; tlist != NULL; require_filter_len++, tlist = tlist->next)
@@ -1744,7 +2133,7 @@ int parsemail(char *mbox, /* file name */
}
}
- for ( ; fgets(line_buf, MAXLINE, fp) != NULL;
+ for ( ; fgets(line_buf, MAXLINE, fp) != NULL;
set_txtsuffix ? PushString(&raw_text_buf, line_buf) : 0) {
#if DEBUG_PARSE
fprintf(stderr,"\n^IN: %s", line_buf);
@@ -1756,8 +2145,8 @@ int parsemail(char *mbox, /* file name */
"alternative_lp", (alternative_lp) ? alternative_lp->line : "",
"origbp", (origbp) ? origbp->line : "",
"origlp", (origlp) ? origlp->line : "",
- "headp", (headp) ? headp->line : "");
-#endif
+ "headp", (headp) ? headp->line : "");
+#endif
if(set_append) {
if(fputs(line_buf, fpo) < 0) {
progerr("Can't write to \"mbox\""); /* revisit me */
@@ -1765,14 +2154,20 @@ int parsemail(char *mbox, /* file name */
}
line = line_buf + set_ietf_mbox;
+ /* skip the mime epilogue until we find a known boundary or
+ a new message */
if (skip_mime_epilogue) {
- if (line[0] == '\n') {
+ int l = strlen(line);
+ if ((strncmp(line, "--", 2)
+ || _is_signature_separator(line)
+ || !boundary_stack_has_id(boundp, line))
+ && strncasecmp(line_buf, "From ", 5)) {
continue;
} else {
skip_mime_epilogue = FALSE;
}
}
-
+
if (!is_deleted &&
inlist_regex_pos(set_filter_out_full_body, line) != -1) {
is_deleted = FILTERED_OUT;
@@ -1787,12 +2182,18 @@ int parsemail(char *mbox, /* file name */
/* check for MIME */
else if (!strncasecmp(line, "MIME-Version:", 13))
Mime_B = TRUE;
+ else if (!strncasecmp(line, "Content-Type:", 13)) {
+ /* we don't do anything here except switch off anti-spam
+ to avoid having boundaries with @ chars being changed
+ by the antispam functions */
+ bp = addbody(bp, &lp, line, BODY_HEADER | BODY_NO_ANTISPAM | bodyflags);
+ }
else if (isspace(line[0]) && ('\n' != line[0]) \
&& !('\r' == line[0] && '\n' == line[1])) {
/*
- * since this begins with a whitespace, it means the
- * previous line is continued on this line, leave only
- * one space character and go!
+ * since this begins with a whitespace, it means the
+ * previous line is continued on this line, leave only
+ * one space character and go!
*/
char *ptr = line;
while (isspace(*ptr))
@@ -1809,9 +2210,9 @@ int parsemail(char *mbox, /* file name */
char savealternative;
- /*
- * we mark this as a header-line, and we use it to
- * track end-of-header displays
+ /*
+ * we mark this as a header-line, and we use it to
+ * track end-of-header displays
*/
/* skip the alternate "\n", otherwise, we'll have
@@ -1821,109 +2222,229 @@ int parsemail(char *mbox, /* file name */
isinheader--;
/*
- * This signals us that we are no longer in the header,
- * let's fill in all those fields we are interested in.
- * Parse the headers up to now and copy to the target
- * variables
+ * This signals us that we are no longer in the header,
+ * let's fill in all those fields we are interested in.
+ * Parse the headers up to now and copy to the target
+ * variables
*/
+ /* parsing of all headers except for Content-* related ones */
for (head = bp; head; head = head->next) {
- char head_name[128];
+ char head_name[129];
+
+ /* if we have a single \n, we just mark it as head->demimed
+ and skip the rest of the checks, which would give the
+ same result */
+ if (head->line && rfc3676_ishardlb(head->line)) {
+ head->demimed = TRUE;
+ continue;
+ }
+
if (head->header && !head->demimed) {
- head->line =
- mdecodeRFC2047(head->line, strlen(head->line),charsetsave);
- head->demimed = TRUE;
+ char *ptr;
+
+ /* control that we have a valid header line */
+ if ( !_validate_header(head->line) ) {
+ /* not a valid header line, we mark it as so to ignore it
+ later on */
+ head->invalid_header = TRUE;
+ head->parsedheader = TRUE;
+ /* the following line is probably overkill and can be skipped */
+ head->demimed = TRUE;
+ continue;
+ }
+
+ head->line =
+ mdecodeRFC2047(head->line, strlen(head->line), charsetsave);
+ head->demimed = TRUE;
}
- if (head->parsedheader || head->attached ||
- !head->header) {
+ if (head->parsedheader
+#ifdef DELETE_ME
+ || head->attached
+#endif
+ || !head->header) {
continue;
}
- if (!sscanf(head->line, "%127[^:]", head_name))
- continue;
-
+
+ /* we probably would be ok just with the sscanf as we
+ validated the header line some lines above */
+ if (!sscanf(head->line, "%127[^:]", head_name)) {
+ head->invalid_header = TRUE;
+ head->parsedheader = TRUE;
+ continue;
+ }
+
if (inlist(set_deleted, head_name)) {
- char *val = getsubject(head->line); /* revisit me */
- if (!strcasecmp(val, "yes"))
- is_deleted = FILTERED_DELETE;
- free(val);
+ if (!message_headers_parsed) {
+ char *val = getsubject(head->line); /* revisit me */
+ if (!strcasecmp(val, "yes"))
+ is_deleted = FILTERED_DELETE;
+ free(val);
+ }
+ head->parsedheader = TRUE;
}
if (inlist(set_expires, head_name)) {
- char *val = getmaildate(head->line);
- exp_time = convtoyearsecs(val);
- if (exp_time != -1 && exp_time < time(NULL))
- is_deleted = FILTERED_EXPIRE;
- free(val);
+ if (!message_headers_parsed) {
+ char *val = getmaildate(head->line);
+ exp_time = convtoyearsecs(val);
+ if (exp_time != -1 && exp_time < time(NULL))
+ is_deleted = FILTERED_EXPIRE;
+ free(val);
+ }
+ head->parsedheader = TRUE;
}
if (inlist(set_annotated, head_name)) {
- getannotation(head->line, &annotation_content,
- &annotation_robot);
- if (annotation_content == ANNOTATION_CONTENT_DELETED_OTHER)
- is_deleted = FILTERED_DELETE_OTHER;
- else if (annotation_content == ANNOTATION_CONTENT_DELETED_SPAM)
- is_deleted = FILTERED_DELETE;
+ if (!message_headers_parsed) {
+ getannotation(head->line, &annotation_content,
+ &annotation_robot);
+ if (annotation_content == ANNOTATION_CONTENT_DELETED_OTHER)
+ is_deleted = FILTERED_DELETE_OTHER;
+ else if (annotation_content == ANNOTATION_CONTENT_DELETED_SPAM)
+ is_deleted = FILTERED_DELETE;
+ }
head->parsedheader = TRUE;
}
- if (!is_deleted &&
- inlist_regex_pos(set_filter_out, head->line) != -1) {
- is_deleted = FILTERED_OUT;
- }
-
- pos = inlist_regex_pos(set_filter_require, head->line);
- if (pos != -1 && pos < require_filter_len) {
- require_filter[pos] = TRUE;
- }
+
+ if (!message_headers_parsed) {
+ if (!is_deleted
+ && inlist_regex_pos(set_filter_out, head->line) != -1) {
+ is_deleted = FILTERED_OUT;
+ }
- if (!strncasecmp(head->line, "Date:", 5)) {
- date = getmaildate(head->line);
- head->parsedheader = TRUE;
- hasdate = 1;
+ pos = inlist_regex_pos(set_filter_require, head->line);
+ if (pos != -1 && pos < require_filter_len) {
+ require_filter[pos] = TRUE;
+ }
+ }
+
+ if (!strncasecmp(head->line, "Received:", 8)) {
+ /* we are not doing anything with these
+ headers and there can be many of them, let's
+ mark them as parsed to speed up the processing
+ further below */
+ head->parsedheader = TRUE;
+ continue;
+ }
+ else if (!strncasecmp(head->line, "Date:", 5)) {
+ strlftonl(head->line);
+ head->parsedheader = TRUE;
+ if (!message_headers_parsed) {
+ if (hasdate) {
+ /* msg has two or more of this header,
+ ignore them */
+ continue;
+ }
+ date = getmaildate(head->line);
+ hasdate = 1;
+ }
}
else if (!strncasecmp(head->line, "From:", 5)) {
- getname(head->line, &namep, &emailp);
- head->parsedheader = TRUE;
- if (set_spamprotect) {
- emailp = spamify(strsav(emailp));
- /* we need to "fix" the name as well, as sometimes
- the email ends up in the name part */
- namep = spamify(strsav(namep));
+ head->parsedheader = TRUE;
+ strlftonl(head->line);
+ if (!message_headers_parsed) {
+ if (namep || emailp) {
+ /* msg has two or more of this header,
+ ignore them */
+ continue;
+ }
+ getname(head->line, &namep, &emailp);
+ if (set_spamprotect) {
+ char *tmp;
+ tmp = emailp;
+ emailp = spamify(tmp);
+ free(tmp);
+ /* we need to "fix" the name as well, as sometimes
+ the email ends up in the name part */
+ tmp = namep;
+ namep = spamify(tmp);
+ free(tmp);
+ }
}
}
+ else if (!strncasecmp(head->line, "To:", 3)) {
+ /* we don't do anything specific with this header,
+ we just want to mark it as parsed to avoid
+ processing it over and over here below
+ */
+ head->parsedheader = TRUE;
+ strlftonl(head->line);
+ }
else if (!strncasecmp(head->line, "Message-Id:", 11)) {
- msgid = getid(head->line);
- head->parsedheader = TRUE;
+ head->parsedheader = TRUE;
+ strlftonl(head->line);
+ if (!message_headers_parsed) {
+ if (msgid) {
+ /* msg has two or more of this header,
+ ignore them */
+ continue;
+ }
+ msgid = getid(head->line);
+ }
}
else if (!strncasecmp(head->line, "Subject:", 8)) {
- subject = getsubject(head->line);
- hassubject = 1;
- head->parsedheader = TRUE;
+ head->parsedheader = TRUE;
+ strlftonl(head->line);
+ if (!message_headers_parsed) {
+ if (hassubject) {
+ /* msg has two or more of this header,
+ ignore them */
+ continue;
+ }
+ subject = getsubject(head->line);
+ hassubject = 1;
+ }
}
else if (!strncasecmp(head->line, "In-Reply-To:", 12)) {
- inreply = getreply(head->line);
- head->parsedheader = TRUE;
- }
- else if (!strncasecmp(head->line, "References:", 11)) {
- /*
- * Adding threading capability for the "References"
- * header, ala RFC 822, used only for messages that
- * have "References" but do not have an "In-reply-to"
- * field. This is partically a concession for Netscape's
- * email composer, which erroneously uses "References"
- * when it should use "In-reply-to".
- */
- if (!inreply)
- inreply = getid(head->line);
- if (set_linkquotes) {
- bp = addbody(bp, &lp, line, 0);
- }
+ char *unescaped_reply_to;
head->parsedheader = TRUE;
+ strlftonl(head->line);
+ unescaped_reply_to =
+ _unescape_reply_and_reference_values(head->line);
+ if (unescaped_reply_to) {
+ free(head->line);
+ head->line = unescaped_reply_to;
+ }
+ if (!message_headers_parsed) {
+ if (inreply) {
+ /* we already parsed a References: header before, but
+ we're going to give priority to In-Reply-To */
+ free(inreply);
+ }
+ inreply = getreply(head->line);
+ }
+ }
+ else if (!strncasecmp(head->line, "References:", 11)) {
+ head->parsedheader = TRUE;
+ if (!message_headers_parsed) {
+ char *unescaped_references;
+
+ unescaped_references =
+ _unescape_reply_and_reference_values(head->line);
+ if (unescaped_references) {
+ free(head->line);
+ head->line = unescaped_references;
+ }
+
+ /*
+ * Adding threading capability for the "References"
+ * header, ala RFC 822, used only for messages that
+ * have "References" but do not have an "In-reply-to"
+ * field. This is partically a concession for Netscape's
+ * email composer, which erroneously uses "References"
+ * when it should use "In-reply-to".
+ */
+ if (!inreply) {
+ inreply = getid(head->line);
+ }
+ if (set_linkquotes) {
+ bp = addbody(bp, &lp, line, 0);
+ }
+ }
}
- else if (!strncasecmp(head->line, "Content-Type:", 13)) {
- content_type_p = head;
- }
else if (applemail_ua_header_len > 0
&& !strncasecmp(head_name, set_applemail_ua_header,
applemail_ua_header_len)) {
@@ -1931,11 +2452,11 @@ int parsemail(char *mbox, /* file name */
head->parsedheader = TRUE;
if (alternativeparser
|| !Mime_B
- || set_save_alts
+ || local_set_save_alts
|| !set_applemail_mimehack) {
continue;
}
-
+
/* If the UA is an apple mail client and we're configured to do the
* applemail hack and we're not already configured to
* save the alternatives, memorize the old setting and force
@@ -1951,26 +2472,32 @@ int parsemail(char *mbox, /* file name */
** in-line.
*/
- old_set_save_alts = set_save_alts;
- set_save_alts = 2;
-
+ applemail_old_set_save_alts = local_set_save_alts;
+ local_set_save_alts = 2;
+
#if DEBUG_PARSE
printf("Applemail_hack force save_alts: yes\n");
printf("Applemail_hack set_save_alts changed from %d to %d\n",
- old_set_save_alts, set_save_alts);
+ applemail_old_set_save_alts, local_set_save_alts);
#endif
}
}
}
-
- if (!is_deleted && set_delete_older && (date || fromdate)) {
+
+ /* avoid overwriting the message headers by those coming from
+ message/rfc attachments */
+ if (!message_headers_parsed) {
+ message_headers_parsed = TRUE;
+ }
+
+ if (!is_deleted && set_delete_older && (date || *fromdate)) {
time_t email_time = convtoyearsecs(date);
if (email_time == -1)
email_time = convtoyearsecs(fromdate);
if (email_time != -1 && email_time < delete_older_than)
is_deleted = FILTERED_OLD;
}
- if (!is_deleted && set_delete_newer && (date || fromdate)) {
+ if (!is_deleted && set_delete_newer && (date || *fromdate)) {
time_t email_time = convtoyearsecs(date);
if (email_time == -1)
email_time = convtoyearsecs(fromdate);
@@ -1984,28 +2511,189 @@ int parsemail(char *mbox, /* file name */
savealternative = FALSE;
attach_force = FALSE;
+#if NEW_PARSER
+ /* testing separating parsing from post-processing */
+ /* extract content-type and other values from the headers */
+ content_type_ptr = NULL;
+ for (head = headp; head; head = head->next) {
+ if (head->parsedheader || !head->header || head->invalid_header)
+ continue;
+
+ if (!strncasecmp(head->line, "Content-Type:", 13)) {
+ char *ptr = head->line + 13;
+#define DISP_HREF 1
+#define DISP_IMG 2
+#define DISP_IGNORE 3
+ /* we must make sure this is not parsed more times
+ than this */
+ head->parsedheader = TRUE;
+
+ while (isspace(*ptr))
+ ptr++;
+
+ content_type_ptr = ptr;
+ sscanf(ptr, "%128[^;]", type);
+
+ filter_content_type_values(type);
+
+ /* now, check if there's a charset indicator here too! */
+ cp = strcasestr(ptr, "charset=");
+ if (cp) {
+ cp += 8; /* pass charset= */
+ if ('\"' == *cp)
+ cp++; /* pass a quote too if one is there */
+
+ sscanf(cp, "%128[^;\"\n\r]", charbuffer);
+ /* @@ we need a better filter here, to remove all non US-ASCII */
+ filter_content_type_values(charbuffer);
+ /* some old messages use DEFAULT_CHARSET or foo_CHARSET,
+ we strip it out */
+ filter_charset_value(charbuffer);
+ /* save the charset info */
+ if (charbuffer[0] != '\0') {
+ charset = strsav(charbuffer);
+ }
+ }
+
+ /* now check if there's a format indicator */
+ if (set_format_flowed) {
+ cp = strcasestr(ptr, "format=");
+ if (cp) {
+ cp += 7; /* pass charset= */
+ if ('\"' == *cp)
+ cp++; /* pass a quote too if one is there */
+
+ sscanf(cp, "%128[^;\"\n\r]", charbuffer);
+ /* save the format info */
+ if (!strcasecmp (charbuffer, "flowed"))
+ textplain_format = FORMAT_FLOWED;
+ }
+
+ /* now check if there's a delsp indicator */
+ cp = strcasestr(ptr, "delsp=");
+ if (cp) {
+ cp += 6; /* pass charset= */
+ if ('\"' == *cp)
+ cp++; /* pass a quote too if one is there */
+
+ sscanf(cp, "%128[^;\"\n\r]", charbuffer);
+ /* save the delsp info */
+ if (!strcasecmp (charbuffer, "yes"))
+ delsp_flag = TRUE;
+ }
+ }
+ break;
+ }
+
+ } /* for content-type */
+
+ /* post-processing Content-Type:
+ check if we have the a Content=Type, a boundary parameter,
+ and a corresponding start bondary
+ revert to a default type otherwise.
+ */
+ if (content_type_ptr == NULL) {
+ /* missing Content-Type header, use default text/plain unless
+ immediate parent is multipart/digest; in that case, use
+ message/rfc822 (RFC 2046) */
+ if (multipart_stack_top_has_type(multipartp, "multipart/digest")
+ && !attachment_rfc822) {
+ strcpy(type, "message/rfc822");
+ } else {
+ strcpy(type, "text/plain");
+ }
+ content_type_ptr = type;
+#if DEBUG_PARSE
+ printf("Missing Content-Type header, defaulting to %s\n", type);
+#endif
+ } else if (!strncasecmp(type, "multipart/", 10)) {
+ boundary_id = strcasestr(content_type_ptr, "boundary=");
+#if DEBUG_PARSE
+ printf("boundary found in %s\n", content_type_ptr);
+#endif
+ if (boundary_id) {
+ boundary_id = strchr(boundary_id, '=');
+ if (boundary_id) {
+ boundary_id++;
+ while (isspace(*boundary_id))
+ boundary_id++;
+ *boundbuffer ='\0';
+ if ('\"' == *boundary_id) {
+ sscanf(++boundary_id, "%255[^\"]",
+ boundbuffer);
+ }
+ else
+ sscanf(boundary_id, "%255[^;\n]",
+ boundbuffer);
+ boundary_id = (*boundbuffer) ? boundbuffer : NULL;
+ }
+ }
+
+ /* if we have multipart/ but there's no missing
+ boundary attribute, downgrade the content type to
+ text/plain */
+ if (!boundary_id) {
+ strcpy(type, "text/plain");
+ content_type_ptr = type;
+#if DEBUG_PARSE
+ printf("Missing boundary attribute in multipart/*, downgrading to text/plain\n");
+#endif
+ }
+ }
+
+ /* a limit to avoid having the message_node tree growing
+ uncontrollably */
+ if ((set_max_attach_per_msg != 0)
+ && (att_counter > set_max_attach_per_msg)) {
+ content = CONTENT_IGNORE;
+#if DEBUG_PARSE
+ printf("Hit max_attach_per_msg limit; ignoring further attachments for msgid %s\n", msgid);
+#endif
+ }
+
+ if (content == CONTENT_IGNORE) {
+ continue;
+ } else if (ignorecontent(type)) {
+ /* don't save this */
+ content = CONTENT_IGNORE;
+ continue;
+ }
+#if 0
+ /* not sure if we should add charset save here or wait until later */
+ if (charset[0] == NULL) {
+ strcpy(charset, set_default_charset);
+ }
+#endif
+
+ /* parsing of all Content-* related headers except for Content-Type */
description = NULL;
for (head = headp; head; head = head->next) {
- if (head->parsedheader || !head->header)
+ if (head->parsedheader || !head->header || head->invalid_header)
continue;
+
/* Content-Description is defined ... where?? */
if (!strncasecmp(head->line, "Content-Description:", 20)) {
char *ptr = head->line;
description = ptr + 21;
+ head->parsedheader = TRUE;
}
/* Content-Disposition is defined in RFC 2183 */
- else
- if (!strncasecmp (head->line, "Content-Disposition:", 20)) {
+ else if (!strncasecmp (head->line, "Content-Disposition:", 20)) {
char *ptr = head->line + 20;
char *fname;
- char *jp;
char *np;
+ head->parsedheader = TRUE;
+
+ if (inlist(set_ignore_content_disposition, type)) {
+ continue;
+ }
+
while (*ptr && isspace(*ptr))
ptr++;
- if (!strncasecmp(ptr, "attachment;", 11)
+ if (!strncasecmp(ptr, "attachment", 10)
&& (content != CONTENT_IGNORE)) {
- /* signal we want to attach, rather than embeed this MIME
+ /* signal we want to attach, rather than embeed this MIME
attachment */
if (inlist(set_ignore_types, "$NONPLAIN")
|| inlist(set_ignore_types, "$BINARY"))
@@ -2020,14 +2708,7 @@ int parsemail(char *mbox, /* file name */
fname = strcasestr(ptr, "filename=");
if (fname) {
np = fname+9;
- if (*np == '"')
- np++;
- for (jp = attachname; np && *np != '\n'
- && *np != '"' && jp < attachname + sizeof(attachname) - 1;) {
- *jp++ = *np++;
- }
- *jp = '\0';
- safe_filename(attachname);
+ _extract_attachname(np, attachname, sizeof(attachname));
}
else {
attachname[0] = '\0'; /* just clear it */
@@ -2035,18 +2716,8 @@ int parsemail(char *mbox, /* file name */
file_created = MAKE_FILE; /* please make one */
}
}
-#if 0
-/*
-** Why was this limited to just type image ? There are more inline types than just image.
-** I removed the image restriction and all of a sudden more attachments had the proper name.
-*/
- else if (!strncasecmp(ptr, "inline;", 7)
- && (content != CONTENT_IGNORE)
- && (!strncasecmp(type, "image/", 5))) {
- /* @@@ <-- here I should use the inline thingy */
-#endif
- else if (!strncasecmp(ptr, "inline;", 7)
+ else if (!strncasecmp(ptr, "inline", 6)
&& (content != CONTENT_IGNORE)
&& inlinecontent(type)) {
inline_force = TRUE;
@@ -2056,482 +2727,608 @@ int parsemail(char *mbox, /* file name */
fname = strcasestr(ptr, "filename=");
if (fname) {
np = fname+9;
- if (*np == '"')
- np++;
- for (jp = attachname; np && *np != '\n' && *np != '"'
- && jp < attachname + sizeof(attachname) - 1;) {
- *jp++ = *np++;
- }
- *jp = '\0';
- safe_filename(attachname);
+ _extract_attachname(np, attachname, sizeof(attachname));
}
else {
attachname[0] = '\0'; /* just clear it */
}
file_created = MAKE_FILE; /* please make one */
} /* inline */
- } /* Content-Disposition: */
+
+ } /* Content-Disposition: */
else if (!strncasecmp(head->line, "Content-Base:", 13)) {
#ifdef NOTUSED
char *ptr = head->line + 13;
-#endif
+ /* we just ignore this header. Why were we ignoring the whole
+ attachment? */
content=CONTENT_IGNORE;
+#endif
/* we must make sure this is not parsed more times
than this */
head->parsedheader = TRUE;
- }
- else if (!strncasecmp(head->line, "Content-Type:", 13)) {
- char *ptr = head->line + 13;
-#define DISP_HREF 1
-#define DISP_IMG 2
-#define DISP_IGNORE 3
- /* we must make sure this is not parsed more times
- than this */
+ } else if (!strncasecmp
+ (head->line, "Content-Transfer-Encoding:", 26)) {
+ char *ptr = head->line + 26;
+
head->parsedheader = TRUE;
while (isspace(*ptr))
ptr++;
-
- sscanf(ptr, "%128[^;]", type);
- cp = type + strlen(type) - 1;
- while (cp > type && isspace(*cp)) {
- *cp = '\0'; /* rm newlines, etc */
- --cp;
+ if (!strncasecmp(ptr, "QUOTED-PRINTABLE", 16)) {
+ decode = ENCODE_QP;
+ }
+ else if (!strncasecmp(ptr, "BASE64", 6)) {
+ decode = ENCODE_BASE64;
+ b64_decoder_state = base64_decoder_state_new();
+ }
+ else if (!strncasecmp(ptr, "8BIT", 4)) {
+ decode = ENCODE_NORMAL;
+ }
+ else if (!strncasecmp(ptr, "7BIT", 4)) {
+ decode = ENCODE_NORMAL;
+ }
+ else if (!strncasecmp(ptr, "x-uue", 5)) {
+ decode = ENCODE_UUENCODE;
+ /* JK 20230504: what does this do?
+ break; do we need to abort content-type too? */
+ if (!do_uudecode(fp, line, line_buf,
+ &raw_text_buf, fpo))
+ break;
}
+ else {
+ /* Unknown format, we use default decoding */
+ char code[64];
- /* now, check if there's a charset indicator here too! */
- cp = strcasestr(ptr, "charset=");
- if (cp) {
- cp += 8; /* pass charset= */
- if ('\"' == *cp)
- cp++; /* pass a quote too if one is there */
+ /* is there any value for content-encoding or is it missing? */
+ if (sscanf(ptr, "%63s", code) != EOF) {
- sscanf(cp, "%128[^;\"\n]", charbuffer);
- /* save the charset info */
- charset = strsav(charbuffer);
- }
+ trio_snprintf(line, sizeof(line_buf) - set_ietf_mbox,
+ " ('%s' %s)\n", code,
+ lang[MSG_ENCODING_IS_NOT_SUPPORTED]);
- /* now check if there's a format indicator */
- if (set_format_flowed) {
- cp = strcasestr(ptr, "format=");
- if (cp) {
- cp += 7; /* pass charset= */
- if ('\"' == *cp)
- cp++; /* pass a quote too if one is there */
-
- sscanf(cp, "%128[^;\"\n]", charbuffer);
- /* save the format info */
- if (!strcasecmp (charbuffer, "flowed"))
- textplain_format = FORMAT_FLOWED;
- }
-
- /* now check if there's a delsp indicator */
- cp = strcasestr(ptr, "delsp=");
- if (cp) {
- cp += 6; /* pass charset= */
- if ('\"' == *cp)
- cp++; /* pass a quote too if one is there */
-
- sscanf(cp, "%128[^;\"\n]", charbuffer);
- /* save the delsp info */
- if (!strcasecmp (charbuffer, "yes"))
- delsp_flag = TRUE;
- }
- }
+ bp = addbody(bp, &lp, line,
+ BODY_HTMLIZED | bodyflags);
- if (alternativeparser) {
- struct body *next;
- struct body *temp_bp = NULL;
-
- /* We are parsing alternatives... */
+#if DEBUG_PARSE
+ printf("Ignoring unknown Content-Transfer-Encoding: %s\n", code);
+#endif
+ } else {
+#if DEBUG_PARSE
+ printf("Missing Content-Transfer-Encoding value\n");
+#endif
+ }
+ }
+#if DEBUG_PARSE
+ printf("DECODE set to %d\n", decode);
+#endif
+ } /* Content-Transfer-Encoding */
+ } /* for Content-* except Content-Type */
- if (parse_multipart_alternative_force_save_alts
- && multipartp
- && !strcasecmp(multipartp->line, "multipart/alternative")
- && *last_alternative_type
- && !strcasecmp(last_alternative_type, "text/plain")) {
+ /* process specific Content-Type values */
+ do {
+ if (alternativeparser) {
+ struct body *temp_bp = NULL;
+
+ /* We are parsing alternatives... */
+
+ if (parse_multipart_alternative_force_save_alts
+ && multipart_stack_top_has_type(multipartp, "multipart/alternative")
+ && *last_alternative_type
+ && !strcasecmp(last_alternative_type, "text/plain")) {
- /* if the UA is Apple mail and if the only
- ** alternatives are text/plain and
- ** text/html and if the preference is
- ** text/plain, skip the text/html version
- ** if the applemail_hack is enabled
- */
- if (!strcasecmp(type, "text/html")) {
+ /* if the UA is Apple mail and if the only
+ ** alternatives are text/plain and
+ ** text/html and if the preference is
+ ** text/plain, skip the text/html version
+ ** if the applemail_hack is enabled
+ */
+ if (!strcasecmp(type, "text/html")) {
#if DEBUG_PARSE
- fprintf(stderr, "Discarding apparently equivalent text//html alternative\n");
+ fprintf(stderr, "Discarding apparently equivalent text/html alternative\n");
#endif
- content = CONTENT_IGNORE;
- break;
- }
+ content = CONTENT_IGNORE;
+ break;
}
-
- if (preferedcontent(&alternative_weight, type, decode)) {
- /* ... this is a prefered type, we want to store
- this [instead of the earlier one]. */
- /* erase the previous alternative info */
- temp_bp = alternative_bp; /* remember the value of bp for GC */
- alternative_bp = alternative_lp = NULL;
- if (prefered_content_charset) {
- free(prefered_content_charset);
- }
- prefered_content_charset = strsav (charset);
- strncpy(last_alternative_type, type,
- sizeof(last_alternative_type) - 1);
+ }
+
+ if (preferedcontent(&alternative_weight, type, decode)) {
+ /* ... this is a prefered type, we want to store
+ this [instead of the earlier one]. */
+ /* erase the previous alternative info */
+ if (current_message_node->alternative) {
+ current_message_node->skip = MN_SKIP_ALL;
+ }
+
+ strncpy(last_alternative_type, type,
+ sizeof(last_alternative_type) - 2);
+ /* make sure it's a NULL ending string if ever type > 128 */
+ last_alternative_type[sizeof(last_alternative_type) - 1] = '\0';
#ifdef DEBUG_PARSE
- fprintf(stderr, "setting new prefered alternative charset to %s\n", charset);
+ fprintf(stderr, "setting new prefered alternative charset to %s\n", charset);
#endif
- alternative_lastfile_created = NO_FILE;
- content = CONTENT_UNKNOWN;
- if (alternative_lastfile[0] != '\0') {
- /* remove the previous attachment */
- unlink(alternative_lastfile);
- alternative_lastfile[0] = '\0';
- }
- }
- else if (set_save_alts == 2) {
- content = CONTENT_BINARY;
- } else {
- /* ...and this type is not a prefered one. Thus, we
- * shall ignore it completely! */
- content = CONTENT_IGNORE;
- /* erase the current alternative info */
- temp_bp = bp; /* remember the value of bp for GC */
- lp = alternative_lp;
- bp = alternative_bp;
- strcpy(alternative_file,
- alternative_lastfile);
- file_created =
- alternative_lastfile_created;
- alternative_bp = alternative_lp = NULL;
- alternative_lastfile_created = NO_FILE;
- alternative_lastfile[0] = '\0';
- /* we haven't yet created any attachment file, so there's no need
- to erase it yet */
+ alternative_lastfile_created = NO_FILE;
+ content = CONTENT_UNKNOWN;
+ /* @@ JK: add here a delete for mmixed, for all children,
+ composite or not under this node */
+ if (root_message_node != current_message_node
+ && current_alt_message_node == current_message_node) {
+ message_node_delete_attachments(current_message_node);
}
-
- /* free any previous alternative */
- while (temp_bp) {
- next = temp_bp->next;
- if (temp_bp->line)
- free(temp_bp->line);
- free(temp_bp);
- temp_bp = next;
- }
+ if (alternative_lastfile[0] != '\0') {
+ /* remove the previous attachment */
+ /* unlink(alternative_lastfile); */
+ alternative_lastfile[0] = '\0';
+ }
+ }
+ else if (local_set_save_alts == 2) {
+ content = CONTENT_BINARY;
+ } else {
+ /* ...and this type is not a prefered one. Thus, we
+ * shall ignore it completely! */
+ content = CONTENT_IGNORE;
+ /* erase the current alternative info */
+ temp_bp = bp; /* remember the value of bp for GC */
+ /*
+ lp = alternative_lp;
+ bp = alternative_bp;
+ */
+ lp = bp = headp = NULL;
+ strcpy(alternative_file,
+ alternative_lastfile);
+ file_created =
+ alternative_lastfile_created;
+ alternative_bp = alternative_lp = NULL;
+ alternative_lastfile_created = NO_FILE;
+ alternative_lastfile[0] = '\0';
+ /* we haven't yet created any attachment file, so there's no need
+ to erase it yet */
+ }
+
+ /* free any previous alternative */
+ free_body (temp_bp);
+
+ /* @@ not sure if I should add a diff flag to do this break */
+ if (content == CONTENT_IGNORE)
+ /* end the header parsing... we already know what we want */
+ break;
+
+ } /* alternativeparser */
+
+ if (content == CONTENT_IGNORE)
+ break;
+ else if (ignorecontent(type)) {
+ /* don't save this */
+ content = CONTENT_IGNORE;
+ break;
+ } else if (textcontent(type)
+ || (inlinehtml &&
+ !strcasecmp(type, "text/html"))) {
+ /* text content or text/html follows.
+ */
+
+ if (local_set_save_alts && alternativeparser
+ && content == CONTENT_BINARY) {
+ file_created = MAKE_FILE; /* please make one */
+ description = set_alts_text ? set_alts_text
+ : "alternate version of message";
+ /* JK 2023/04: why is description tied to
+ the length of attachname and why it was
+ using it to make a filename? code
+ commented out while investigating. We
+ get the filename from the filename
+ found in Content-Disposition or
+ Content-Type, and if none is found, we
+ generate one.
+ */
+#ifdef FIX_OR_DELETE_ME
+ strncpy(attachname, description, sizeof(attachname) - 1);
+ /* make sure it's a NULL terminated string */
+ attachname[sizeof(attachname) - 1] = '\0';
+ safe_filename(attachname);
+#endif
+ }
- /* @@ not sure if I should add a diff flag to do this break */
- if (content == CONTENT_IGNORE)
- /* end the header parsing... we already know what we want */
- break;
- }
+ /* if it's not a stored attachment,
+ ** try to define content more precisely
+ ** The condition to detect if it's a
+ ** is to see if file_created == MAKE_FILE
+ ** or content = CONTENT_BINARY */
+ else if (file_created != MAKE_FILE) {
+ if (!strcasecmp(type, "text/html"))
+ content = CONTENT_HTML;
+ else
+ content = CONTENT_TEXT;
+ } else {
+ /* we should refactor and simplify the cases when
+ we call the following function.
+ It's needed here when a text/plain part has
+ Content-Disposition: attachment and a filename
+ given only in the Content-Type name attribute */
+ _control_attachname(content_type_ptr, attachname, sizeof(attachname));
+ }
+ break;
- if (content == CONTENT_IGNORE)
- continue;
- else if (ignorecontent(type))
- /* don't save this */
- content = CONTENT_IGNORE;
- else if (textcontent(type)
- || (inlinehtml &&
- !strcasecmp(type, "text/html"))) {
- /* text content or text/html follows.
- */
+ } /* textcontent(type) || inlinehtml && type == text/html */
- if (set_save_alts && alternativeparser
- && content == CONTENT_BINARY) {
- file_created = MAKE_FILE; /* please make one */
- description = set_alts_text ? set_alts_text
- : "alternate version of message";
- if (strlen(description) >= sizeof(attachname))
- progerr("alts_text too long");
- strcpy(attachname, description);
- safe_filename(attachname);
- }
- else if (!strcasecmp(type, "text/html"))
- content = CONTENT_HTML;
- else
- content = CONTENT_TEXT;
-
- if (!alternativeparser && !prefered_content_charset) {
- /* there are apparently no
- alternatives in this message, let's
- use the first text/* charset we
- found as the prefered one */
- prefered_content_charset = strsav (charset);
- }
+
+#if 1 || TESTING_IF_THIS_IS_AN_ERROR
+ else if (attach_force) {
+ /* maybe copy description and desc default values here?
+ other things here?
+ what to do with content == CONTENT_BINARY?
+ */
+
+ {
+ /* don't like calling this function in two parts,
+ but we need to fix a bug. Will have to refactorize how
+ to handle attach_force when we revisit the code */
- continue;
- }
- else if (!strncasecmp(type, "message/rfc822", 14)) {
- /*
- * Here comes an attached mail! This can be ugly,
- * since the attached mail may very well itself
- * contain attached binaries, or why not another
- * attached mail? :-)
- *
- * We need to store the current boundary separator
- * in order to get it back when we're done parsing
- * this particular mail, since each attached mail
- * will have its own boundary separator that *might*
- * be used.
- */
- bp = addbody(bp, &lp,
- "attached mail follows:
",
- BODY_HTMLIZED | bodyflags);
- bodyflags |= BODY_ATTACHED;
- /* @@ should it be 1 or 2 ?? should we use another method? */
-#if 0
- isinheader = 2;
+ /* if attachname is empty, copy the value of the name attribute,
+ if given in the Content-Type header */
+ _control_attachname(content_type_ptr, attachname, sizeof(attachname));
+ }
+ break;
+ }
#endif
- isinheader = 1;
- continue;
- }
- else if (strncasecmp(type, "multipart/", 10)) {
- /*
- * This is not a multipart and not text
- */
- char *fname = NULL; /* attachment filename */
-
- /*
- * only do anything here if we're not
- * ignoring this content
- */
- if (CONTENT_IGNORE != content) {
+ else if (!strncasecmp(type, "message/rfc822", 14)) {
+ /*
+ * Here comes an attached mail! This can be ugly,
+ * since the attached mail may very well itself
+ * contain attached binaries, or why not another
+ * attached mail? :-)
+ *
+ * We need to store the current boundary separator
+ * in order to get it back when we're done parsing
+ * this particular mail, since each attached mail
+ * will have its own boundary separator that *might*
+ * be used.
+ */
+
+ /* need to take into account alternates with rfc822? */
+ if (boundp == NULL && multipartp == NULL) {
+ /* we have a non multipart message with a message/rfc822
+ content-type body */
+ bp = addbody(bp, &lp,
+ NULL,
+ BODY_ATTACHMENT | BODY_ATTACHMENT_RFC822);
+
+ } else {
+ free_body(bp);
+ description = NULL;
+ bp = lp = headp = NULL;
+ attachment_rfc822 = TRUE;
+ }
+ isinheader = 1;
- fname = strcasestr(ptr, "name=");
- if (fname) {
- fname += 5;
- if ('\"' == *fname)
- fname++;
- sscanf(fname, "%128[^\"]", attachname);
- safe_filename(attachname);
- }
- else {
- attachname[0] = '\0'; /* just clear it */
- }
+ /* RFC2046 states that message/rfc822 can only
+ have Content-Transfer-Encoding values of 7bit,
+ 8bit, and binary. Some broken mail clients
+ may have used something else */
+ if (decode != ENCODE_NORMAL) {
+#if DEBUG_PARSE
+ printf("Error: msgid %s : message/rfc822 Content-Type associated with a\n"
+ "Content-Transfer-Encoding that is not\n7bit, 8bit, or binary.\n"
+ "Forcing ENCODE_NORMAL\n", msgid);
+#endif
+ if (decode == ENCODE_BASE64) {
+ base64_decoder_state_free(b64_decoder_state);
+ b64_decoder_state = NULL;
+ }
+ decode = ENCODE_NORMAL;
+ }
+
+ /* reset the apple mail hack and the
+ local_set_save_alts as we don't know if the
+ forwarded message was originally sent from
+ an apple mal client */
+ parse_multipart_alternative_force_save_alts = 0;
+ applemail_old_set_save_alts = -1;
+ local_set_save_alts = set_save_alts;
+ break;
+
+ } /* message/rfc822 */
- file_created = MAKE_FILE; /* please make one */
+ else if (strncasecmp(type, "multipart/", 10)) {
+ /*
+ * This is not a multipart and not text
+ */
+
+ /*
+ * only do anything here if we're not
+ * ignoring this content
+ */
+ if (CONTENT_IGNORE != content) {
+ /* only use the Content-Type name attribute to get
+ the filename if Content-Disposition didn't
+ provide a filename */
+ _control_attachname(content_type_ptr, attachname, sizeof(attachname));
+ file_created = MAKE_FILE; /* please make one */
+ content = CONTENT_BINARY; /* uknown turns into binary */
+ }
+ break;
+
+ } /* !multipart/ */
- content = CONTENT_BINARY; /* uknown turns into binary */
- }
- continue;
- }
- else {
- /*
- * Find the first boundary separator
- */
+ else {
+ /*
+ * Find the first boundary separator
+ */
+
+ struct body *tmpbp;
+ struct body *tmplp;
+ bool found_start_boundary;
+
- struct body *tmpbp;
- struct body *tmplp;
-
- boundary_id = strcasestr(ptr, "boundary=");
+#if DELETE_ME_CODE_MOVED_UP
+ boundary_id = strcasestr(content_type_ptr, "boundary=");
#if DEBUG_PARSE
- printf("boundary found in %s\n", ptr);
+ printf("boundary found in %s\n", ptr);
#endif
- if (boundary_id) {
- boundary_id = strchr(boundary_id, '=');
- if (boundary_id) {
- boundary_id++;
- while (isspace(*boundary_id))
- boundary_id++;
- if ('\"' == *boundary_id) {
- sscanf(++boundary_id, "%255[^\"]",
- boundbuffer);
- }
- else
- sscanf(boundary_id, "%255[^;\n]",
- boundbuffer);
- boundary_id = boundbuffer;
- }
-
- /* restart on a new list: */
- tmpbp = tmplp = NULL;
-
- while (fgets(line_buf, MAXLINE, fp)) {
- if(set_append) {
- if(fputs(line_buf, fpo) < 0) {
- progerr("Can't write to \"mbox\""); /* revisit me */
- }
- }
- if (!strncmp(line_buf + set_ietf_mbox, "--", 2) &&
- !strncmp(line_buf + set_ietf_mbox + 2, boundbuffer,
- strlen(boundbuffer))) {
- break;
- }
- if (!strncasecmp(line_buf, "From ", 5)) {
-#if DEBUG_PARSE
- printf("Error, new message found instead of boundary!\n");
#endif
- isinheader = 0;
- if (tmpbp)
- bp = append_body(bp, &lp, tmpbp);
- boundary_id = NULL;
- goto leave_header;
- }
- /* save lines in case no boundary found */
- tmpbp = addbody(tmpbp, &tmplp, line_buf, bodyflags);
- }
- if (!strncmp(line_buf + set_ietf_mbox + 2 + strlen(boundary_id), "--", 2)
- && tmpbp) {
-#if DEBUG_PARSE
- printf("Error, end of mime found before mime start!\n");
+ if (boundary_id) {
+#if DELETE_ME_CODE_MOVED_UP
+ boundary_id = strchr(boundary_id, '=');
+ if (boundary_id) {
+ boundary_id++;
+ while (isspace(*boundary_id))
+ boundary_id++;
+ *boundbuffer = '\0';
+ if ('\"' == *boundary_id) {
+ sscanf(++boundary_id, "%255[^\"]",
+ boundbuffer);
+ }
+ else
+ sscanf(boundary_id, "%255[^;\n]",
+ boundbuffer);
+ boundary_id = boundbuffer;
+ }
#endif
- /* end of mime found before mime start */
- bp = append_body(bp, &lp, tmpbp);
- boundary_id = NULL;
- goto leave_header;
- }
- free_body(tmpbp);
-
- /*
- * This stores the boundary string in a stack
- * of strings:
- */
- boundp = bound(boundp, boundbuffer);
- multipartp = multipart(multipartp, type);
- skip_mime_epilogue = FALSE;
+
+ /* restart on a new list: */
+ tmpbp = tmplp = NULL;
+ found_start_boundary = FALSE;
+
+ while (fgets(line_buf, MAXLINE, fp)) {
+ char *tmpline;
- /* printf("set new boundary: %s\n", boundp->line); */
-
- /* @@JK Take into account errors when we abort, malformed mime, etc,
- probably put this call up, before detecting errors? */
- charsetsp = charsets(charsetsp, charset, charsetsave);
-#ifdef DEBUG_PARSE
- fprintf(stderr, "pushing charset %s and charsetsave %s\n", charset, charsetsave);
-#endif
- if (charset) {
- free(charset);
- charset = NULL;
+ if(set_append) {
+ if(fputs(line_buf, fpo) < 0) {
+ progerr("Can't write to \"mbox\""); /* revisit me */
}
- charsetsave[0] = '\0';
+ }
-#ifdef DEBUG_PARSE
- fprintf(stderr, "restoring parents charset %s and charsetsave %s\n", charset, charsetsave);
-#endif
+ tmpline = line_buf + set_ietf_mbox;
- /*
- * We set ourselves, "back in header" since there is
- * gonna come MIME headers now after the separator
- */
- isinheader = 1;
+ /*
+ ** detect different cases where we may have broken, missing,
+ ** or unexpected start and end boundaries.
+ ** Using mutt as a reference on how to process each case
+ **/
- /* Daniel Stenberg started adding the
- * "multipart/alternative" parser 13th of July
- * 1998! We check if this is a 'multipart/
- * alternative' header, in which case we need to
- * treat it very special.
- */
+ /* start boundary? */
+ if (is_start_boundary(boundary_id, tmpline)) {
+ found_start_boundary = TRUE;
+ break;
+ }
+ /* new message found */
+ if (!strncasecmp(line_buf, "From ", 5)) {
+#if DEBUG_PARSE
+ printf("Error, new message found instead of expected start_boundary: %s\n", boundbuffer);
+#endif
+ break;
- if (!strncasecmp
- (&ptr[10], "alternative", 11)) {
- /* It *is* an alternative session! Alternative
- * means there will be X parts with the same text
- * using different content-types. We are supposed
- * to take the most prefered format of the ones
- * used and only output that one. MIME defines
- * the order of the texts to start with pure text
- * and then continue with more and more obscure
- * formats. (well, it doesn't use those terms but
- * that's what it means! ;-))
- */
-
- /* How "we" are gonna deal with them:
- *
- * We create a "spare" linked list body for the
- * very first part. Since the first part is
- * defined to be the most readable, we save that
- * in case no content-type present is prefered!
- *
- * We skip all parts that are not prefered. All
- * prefered parts found will replace the first
- * one that is saved. When we reach the end of
- * the alternatives, we will use the last saved
- * one as prefered.
- */
-
- savealternative = TRUE;
+ }
+ /* a preceding non-closed boundary? */
+ else if (!strncmp(tmpline, "--", 2)
+ && ! _is_signature_separator(line)) {
+ char *tmp_boundary = boundary_stack_has_id(boundp, tmpline);
+
+ boundary_id = tmp_boundary;
+#if DEBUG_PARSE
+ printf("Error, an existing boundary found instead of expected start_boundary: %s\n", boundbuffer);
+#endif
+ break;
+ }
+ /* save lines in case no boundary found */
+ tmpbp = addbody(tmpbp, &tmplp, tmpline, bodyflags);
+ }
+
+ /* control we found the start boundary we were expecting */
+ if (!found_start_boundary) {
#if DEBUG_PARSE
- printf("SAVEALTERNATIVE: yes\n");
+ printf("Error: didn't find start boundary\n");
+ printf("last line read:\n%s", line_buf);
#endif
+ isinheader = 0;
+ boundary_id = NULL;
+
+ if (tmpbp) {
+ bp = append_body(bp, &lp, tmpbp, TRUE);
}
- }
- else
- boundary_id = NULL;
- }
- }
- else
- if (!strncasecmp
- (head->line, "Content-Transfer-Encoding:", 26)) {
- char *ptr = head->line + 26;
+ /* downgrading to text/plain */
+ strcpy(type, "text/plain");
+ content_type_ptr = type;
+#if DEBUG_PARSE
+ printf("Downgrading to text/plain\n");
+#endif
+ goto leave_header;
+ }
+ free_body(tmpbp);
+
+ /*
+ ** we got a new part coming
+ */
+ current_message_node =
+ message_node_mimetest(current_message_node,
+ bp, lp, charset, charsetsave,
+ type,
+ (boundp) ? boundp->boundary_id : NULL,
+ boundary_id,
+ att_binname,
+ meta_filename,
+ att_link,
+ att_comment_filename,
+ attachment_rfc822,
+ message_node_skip_status(file_created,
+ content,
+ type));
+#if DEBUG_PARSE_MSGID_TRACE
+ current_message_node->msgid = strsav(msgid);
+#endif
+ if (alternativeparser) {
+ current_alt_message_node = current_message_node;
+ }
+ if (att_binname) {
+ free(att_binname);
+ att_binname = NULL;
+ }
+ if (meta_filename) {
+ free(meta_filename);
+ meta_filename = NULL;
+ }
+ if (att_link) {
+ free(att_link);
+ att_link = NULL;
+ }
+ if (att_comment_filename) {
+ free(att_comment_filename);
+ att_comment_filename = NULL;
+ }
+
+ if (alternativeparser) {
+ current_message_node->alternative = TRUE;
+ }
- head->parsedheader = TRUE;
- while (isspace(*ptr))
- ptr++;
- if (!strncasecmp(ptr, "QUOTED-PRINTABLE", 16)) {
- decode = ENCODE_QP;
- }
- else if (!strncasecmp(ptr, "BASE64", 6)) {
- decode = ENCODE_BASE64;
- }
- else if (!strncasecmp(ptr, "8BIT", 4)) {
- decode = ENCODE_NORMAL;
- }
- else if (!strncasecmp(ptr, "7BIT", 4)) {
- decode = ENCODE_NORMAL;
- }
- else if (!strncasecmp(ptr, "x-uue", 5)) {
- decode = ENCODE_UUENCODE;
- if (!do_uudecode(fp, line, line_buf,
- &raw_text_buf, fpo))
- break;
- }
- else {
- /* Unknown format, we use default decoding */
- char code[64];
+ /*
+ if (!strncasecmp(type, "multipart/related", 17)) {
+ current_message_node->skip = MN_SKIP_BUT_KEEP_CHILDREN;
+ }
+ */
+
+ if (!root_message_node) {
+ root_message_node = current_message_node;
+ }
+
+ /*
+ * This stores the boundary string in a stack
+ * of strings:
+ */
+ if (boundp && alternativeparser) {
+ /* if we were dealing with multipart/alternative or
+ message/rfc822, store the current content */
+ boundp->alternativeparser = alternativeparser;
+ boundp->alternative_weight = alternative_weight;
+ boundp->alternative_message_node_created =
+ alternative_message_node_created;
+ strcpy(boundp->alternative_file, alternative_file);
+ strcpy(boundp->alternative_lastfile, alternative_lastfile);
+ strcpy(boundp->last_alternative_type, last_alternative_type);
+ boundp->alternative_lp = alternative_lp;
+ boundp->alternative_bp = alternative_bp;
+ boundp->current_alt_message_node = current_alt_message_node;
+ boundp->root_alt_message_node = root_alt_message_node;
+ current_alt_message_node = root_alt_message_node = NULL;
+ alternative_file[0] = alternative_lastfile[0] = last_alternative_type[0] = '\0';
+ alternative_message_node_created = FALSE;
+ alternativeparser = FALSE;
+ }
- /* is there any value for content-encoding or is it missing? */
- if (sscanf(ptr, "%63s", code) != EOF) {
-
- snprintf(line, sizeof(line_buf) - set_ietf_mbox,
- " ('%s' %s)\n", code,
- lang[MSG_ENCODING_IS_NOT_SUPPORTED]);
+ boundp = boundary_stack_push(boundp, boundbuffer);
+ boundp->parse_multipart_alternative_force_save_alts = parse_multipart_alternative_force_save_alts;
+ boundp->applemail_old_set_save_alts = applemail_old_set_save_alts;
+ boundp->set_save_alts = local_set_save_alts;
+ multipartp = multipart_stack_push(multipartp, type);
+ skip_mime_epilogue = FALSE;
- bp = addbody(bp, &lp, line,
- BODY_HTMLIZED | bodyflags);
+ attachment_rfc822 = FALSE;
+
+ description = NULL;
+ *filename = '\0';
+ bp = lp = headp = NULL;
+ /* printf("set new boundary: %s\n", boundp->boundary_id); */
-#if DEBUG_PARSE
- printf("Ignoring unknown Content-Transfer-Encoding: %s\n", code);
-#endif
- } else {
-#if DEBUG_PARSE
- printf("Missing Content-Transfer-Encoding value\n");
+ if (charset) {
+ free(charset);
+ charset = NULL;
+ }
+ charsetsave[0] = '\0';
+
+#ifdef DEBUG_PARSE
+ fprintf(stderr, "restoring parents charset %s and charsetsave %s\n", charset, charsetsave);
#endif
- }
- }
+
+ /*
+ * We set ourselves, "back in header" since there is
+ * gonna come MIME headers now after the separator
+ */
+ isinheader = 1;
+
+ /* Daniel Stenberg started adding the
+ * "multipart/alternative" parser 13th of July
+ * 1998! We check if this is a 'multipart/
+ * alternative' header, in which case we need to
+ * treat it very special.
+ */
+
+ if (!strncasecmp
+ (&content_type_ptr[10], "alternative", 11)) {
+ /* It *is* an alternative session! Alternative
+ * means there will be X parts with the same text
+ * using different content-types. We are supposed
+ * to take the most prefered format of the ones
+ * used and only output that one. MIME defines
+ * the order of the texts to start with pure text
+ * and then continue with more and more obscure
+ * formats. (well, it doesn't use those terms but
+ * that's what it means! ;-))
+ */
+
+ /* How "we" are gonna deal with them:
+ *
+ * We create a "spare" linked list body for the
+ * very first part. Since the first part is
+ * defined to be the most readable, we save that
+ * in case no content-type present is prefered!
+ *
+ * We skip all parts that are not prefered. All
+ * prefered parts found will replace the first
+ * one that is saved. When we reach the end of
+ * the alternatives, we will use the last saved
+ * one as prefered.
+ */
+
+ savealternative = TRUE;
#if DEBUG_PARSE
- printf("DECODE set to %d\n", decode);
+ printf("SAVEALTERNATIVE: yes\n");
#endif
- }
- }
+ }
+
+ }
+ else
+ boundary_id = NULL;
+ }
+ break;
+ } while (0); /* do .. while (0) */
+
+#endif /* NEW_PARSER */
/* @@@ here we try to do a post parsing cleanup */
/* have to find out all the conditions to turn it off */
if (attach_force) {
savealternative = FALSE;
isinheader = 0;
+ /* a kludge while I wait to see how to better integrate this
+ case */
+ content = CONTENT_BINARY;
}
if (savealternative) {
- /* let's remember 'bp' and 'lp' */
-
- origbp = bp;
- origlp = lp;
-
alternativeparser = TRUE;
/* restart on a new list: */
- lp = bp = NULL;
+ lp = bp = headp = NULL;
/* clean the alternative status variables */
alternative_weight = -1;
alternative_lp = alternative_bp = NULL;
@@ -2564,8 +3361,58 @@ int parsemail(char *mbox, /* file name */
binfile = -1;
}
+ if (bp || lp) {
+ /* if we reach this condition, it means the message is missing one or
+ more mime boundary ends. Closing the current active node should fix
+ this */
+ if (current_message_node) {
+ current_message_node =
+ message_node_mimetest(current_message_node,
+ bp, lp, charset, charsetsave,
+ type,
+ (boundp) ? boundp->boundary_id : NULL,
+ boundary_id,
+ att_binname,
+ meta_filename,
+ att_link,
+ att_comment_filename,
+ attachment_rfc822,
+ message_node_skip_status(file_created,
+ content,
+ type));
+#if DEBUG_PARSE_MSGID_TRACE
+ current_message_node->msgid = strsav(msgid);
+#endif
+ }
+ }
+
+ /* THE PREFERED CHARSET ALGORITHM */
+
/* as long as we don't handle UTF-8 throughout), use the prefered
content charset if we got one */
+
+ /* see struct.c:choose_charset() for the algo heuristics 1 */
+ if (root_message_node) {
+ prefered_charset = message_node_get_charset(root_message_node);
+ } else {
+ prefered_charset = _single_content_get_charset(charset, charsetsave);
+ }
+
+ if (prefered_charset && set_replace_us_ascii_with_utf8
+ && !strncasecmp(prefered_charset, "us-ascii", 8)) {
+ if (set_debug_level) {
+ fprintf(stderr, "Replacing content charset %s with UTF-8\n",
+ prefered_charset);
+ }
+ free(prefered_charset);
+ prefered_charset = strsav("UTF-8");
+ }
+
+ if (set_debug_level) {
+ fprintf(stderr, "Message will be stored using charset %s\n", prefered_charset);
+ }
+
+#ifdef CHARSETSP
if (prefered_content_charset) {
if (charset) {
free(charset);
@@ -2583,10 +3430,10 @@ int parsemail(char *mbox, /* file name */
charset=strsav(charsetsave);
} else{
/* default charset for plain/text is US-ASCII */
- /* ISO-8859-1 is modern, however (DM) */
- charset=strsav("US-ASCII");
+ /* UTF-8 is modern, however (DM) */
+ charset=strsav(set_default_charset);
#ifdef DEBUG_PARSE
- fprintf(stderr, "found no charset for body, set ISO-8859-1.\n");
+ fprintf(stderr, "found no charset for body, using default_charset %s.\n", set_default_charset);
#endif
}
} else {
@@ -2599,11 +3446,8 @@ int parsemail(char *mbox, /* file name */
}
}
}
-#endif
-
-#ifdef DEBUG_PARSE
- fprintf(stderr, "Message will be stored using charset %s\n", charset);
-#endif
+#endif /* ICONV */
+#endif /* CHARSETSP */
isinheader = 1;
if (!hassubject)
@@ -2620,11 +3464,12 @@ int parsemail(char *mbox, /* file name */
inreply = oneunre(subject);
/* control the use of format and delsp according to RFC 3676 */
- if (textplain_format == FORMAT_FLOWED
- && content != CONTENT_TEXT
- || (content == CONTENT_TEXT && strcasecmp (type, "text/plain"))) {
- /* format flowed only allowed on text/plain */
- textplain_format = FORMAT_FIXED;
+ if (textplain_format == FORMAT_FLOWED
+ && (content != CONTENT_TEXT
+ || (content == CONTENT_TEXT
+ && strcasecmp (type, "text/plain")))) {
+ /* format flowed only allowed on text/plain */
+ textplain_format = FORMAT_FIXED;
}
if (textplain_format == FORMAT_FIXED && delsp_flag) {
@@ -2632,29 +3477,48 @@ int parsemail(char *mbox, /* file name */
delsp_flag = FALSE;
}
+ if (root_message_node) {
+ /* multipart message */
+
+ if (set_debug_level == DEBUG_DUMP_ATT
+ || set_debug_level == DEBUG_DUMP_ATT_VERBOSE) {
+ message_node_dump (root_message_node);
+ progerr("exiting");
+ }
+
+ bp = message_node_flatten (&lp, root_message_node);
+ /* free memory allocated to message nodes */
+ message_node_free(root_message_node);
+ root_message_node = current_message_node = NULL;
+ root_alt_message_node = current_alt_message_node = NULL;
+ } else {
+ /* it was not a multipart message, remove all empty lines
+ at the end of the message */
+ while (rmlastlines(bp));
+ }
+
if (append_bp && append_bp != bp) {
/* if we had attachments, close the structure */
- append_bp =
- addbody(append_bp, &append_lp, "
Adding a search engine
to your Hypermail archives
-
-One of the feature requests we hear most often is to incorporate -a search engine in Hypermail. But because everyone has his or her -own favorite search engine, and since it's hard to imagine a search engine -that may not turn out to be unusable -for some archives, we haven't built a search engine into hypermail, and -we probably won't.
- -But hypermail's page -customizations make it easy to integrate your own search engine into your -hypermail archives.
- -For our example, we're going to put a form box on the top and bottom of -every index page, and we'll use the swish-e -search engine. We'll show a typical PHP -script and a typical Perl script that can -function as a glue layer between the web and the search engine. -There ought to be enough information here to get you -started regardless of what search engine and scripting language you choose -for your site.
- -Let's begin by modifying the header and footer hypermail puts on each -index file.
- -(1) Create a file called indexheader.hyp containing the following:
-indexheader.hyp
-+THIS DOC IS VERY OLD, WRITTEN FOR THE DEFUNCT SWISH SEARCH ENGINE AND HASN'T BEEN REVIEWED IN AGES.
+IT'S INCLUDED HERE FOR INFORMATIONAL PURPOSES.
+ +Adding a search engine
+
+ to your Hypermail archivesOne of the feature requests we hear most often is to + incorporate a search engine in Hypermail. But because everyone + has his or her own favorite search engine, and since it's hard to + imagine a search engine that may not turn out to be unusable for + some archives, we haven't built a search engine into hypermail, + and we probably won't.
+But hypermail's page customizations make it easy to integrate + your own search engine into your hypermail archives.
+For our example, we're going to put a form box on the top and + bottom of every index page, and we'll use the swish-e search engine. We'll show a + typical PHP script and a + typical Perl script that can + function as a glue layer between the web and the search engine. + There ought to be enough information here to get you started + regardless of what search engine and scripting language you + choose for your site.
+Let's begin by modifying the header and footer hypermail puts + on each index file.
+(1) Create a file called indexheader.hyp containing the + following:
+indexheader.hyp
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> @@ -110,26 +121,25 @@- -indexheader.hyp
</div>Notice the HTML comment about 2/3 of the way down. Everything -above that line is standard, and ought to be very similar to the default -header. The custom code (below the comment) adds the features you -want to add. In this case, it's a form for a search.
- -You will, of course, substitute your own URL for search.php for the form's ACTION -and the name of your own search index for "name.of.index". See the bottom of this page for -an example of creating a search index file.
- -If you like the general appearance of the web pages Hypermail creates and -don't want to spend a lot of time playing with the HTML, you might want to -look at the source of "index.html" in the directory for which you're installing -a search engine and just copy the appropriate lines (e.g., the lines -above the first <hr />) to indexheader.hyp.
- -(2) Create a file called indexfooter.hyp containing the following:
- -indexfooter.hyp
-+Notice the HTML comment about 2/3 of the way down. Everything + above that line is standard, and ought to be very similar to the + default header. The custom code (below the comment) adds the + features you want to add. In this case, it's a form for a + search.
+You will, of course, substitute your own URL for search.php + for the form's ACTION and the name of your own search index for + "name.of.index". See the bottom of this page for an example of + creating a search index file.
+If you like the general appearance of the web pages Hypermail + creates and don't want to spend a lot of time playing with the + HTML, you might want to look at the source of "index.html" in the + directory for which you're installing a search engine and just + copy the appropriate lines (e.g., the lines above the + first <hr />) to indexheader.hyp.
+(2) Create a file called indexfooter.hyp containing the + following:
+indexfooter.hyp
+<div class="center"> <form action="/url/of/search.php" method="post" enctype="application/x-www-form-urlencoded"> @@ -153,18 +163,16 @@-indexfooter.hyp
</html>Since this is a footer file, the common code will be at the end, and -you'll put your custom code above the comment.
- -You may have noted what seem to be superfluous <div> elements in -the HTML in the header and footer file. -The W3C validator likes them, and -they do no harm.
- -(3) Modify the .hmrc file to point to your custom header and footer:
- -.hmrc (excerpt)
-+Since this is a footer file, the common code will be at the + end, and you'll put your custom code above the comment.
+You may have noted what seem to be superfluous <div> + elements in the HTML in the header and footer file. The W3C validator likes them, and they + do no harm.
+(3) Modify the .hmrc file to point to your custom header and + footer:
+.hmrc (excerpt)
+# ihtmlheaderfile = [ path to index header template file | NONE ] # # Set this to the path to the Index header template file containing @@ -182,18 +190,16 @@-.hmrc (excerpt)
ihtmlfooterfile = /path/to/indexfooter.hypYou'll call hypermail using this .hmrc file to create your archive -or add a message:
- -+You'll call hypermail using this .hmrc file to create your + archive or add a message:
+hypermail -c /path/to/.hmrc [...]-Here's a sample PHP script that performs the minimum functionality -required for "search.php":
- -search.php
-+Here's a sample PHP script that performs the minimum + functionality required for "search.php":
+search.php
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> @@ -272,29 +278,25 @@- -search.php
</html>If you prefer Perl, or if your web server doesn't offer PHP, then you could -modify these lines in indexheader.hyp and indexfooter.hyp:
- -+If you prefer Perl, or if your web server doesn't offer PHP, + then you could modify these lines in indexheader.hyp and + indexfooter.hyp:
+<form action="/url/of/search.php" method="post" enctype="application/x-www-form-urlencoded">- -to
- -+to
+<form action="/url/of/search.pl" method="post" enctype="application/x-www-form-urlencoded">- -Here's a sample script contributed by Perl maven Greg Bacon that -performs the minimum functionality required for "search.pl":
- -search.pl
-+Here's a sample script contributed by Perl maven Greg Bacon + that performs the minimum functionality required for + "search.pl":
+search.pl
+#! /usr/local/bin/perl -T @@ -502,14 +504,13 @@- -search.pl
EOFooterSwish-e, like many other search engines, requires you to generate -a search index before you perform any searches. Here's a .conf file for -swish-e that might generate a reasonable -search index for a hypermail archive of messages about model railroading:
- -model-rr.conf
-+Swish-e, like many other search engines, requires you to + generate a search index before you perform any searches. Here's a + .conf file for swish-e that might generate a reasonable search + index for a hypermail archive of messages about model + railroading:
+model-rr.conf
+IndexDir /path/to/model-rr-archive IndexFile /path/to/model-rr.index IndexReport 3 @@ -523,30 +524,32 @@- -model-rr.conf
FileRules filename is thread.htmlThis tells swish-e to collect data from all the HTML files in your -model railroading archive except the index pages that hypermail -generates. That way, all the search results will point directly to the -messages themselves.
- -When you want to build your search index, you'll call swish-e something like this:
- -+This tells swish-e to collect data from all the HTML files in + your model railroading archive except the index pages + that hypermail generates. That way, all the search results will + point directly to the messages themselves.
+When you want to build your search index, you'll call swish-e + something like this:
+swish-e -v 3 -c /path/to/model-rr.conf > /path/to/model-rr.report 2>&1-Many people do this either in a cron job during off-peak hours or -through a CGI script that they call whenever they update their archive.
- -You might want to add search logging, page control (so you only -print, say, 20 results at a time), some nice CSS, and all sorts of other -things to your script. And if you'd prefer to write your script in -Python, sh, or Ada, you can do that too. From here on, it's up to you.
- ---- -Bob Crispen -Thursday, June 26, 2003 -+Many people do this either in a cron job during off-peak hours + or through a CGI script that they call whenever they update their + archive.
+You might want to add search logging, page control (so you + only print, say, 20 results at a time), some nice CSS, and all + sorts of other things to your script. And if you'd prefer to + write your script in Python, sh, or Ada, you can do that too. + From here on, it's up to you.
++ -- + + Bob Crispen + + + Thursday, June 26, 2003 + +diff --git a/docs/customizing.html b/docs/customizing.html index 653bd241..9a085e0c 100644 --- a/docs/customizing.html +++ b/docs/customizing.html @@ -1,478 +1,514 @@ - - - -Hypermail Documentation - - - -- -
Customizing Hypermail Pages
- --Contents: -
-
-
- Hypermail Pages
-
-
- Definitions
-
-
- Choosing the Default Look of Your Pages
-
-
-
- Standard Page HTML - -
- Table Menu Display -
-
- Using Template Files to Customize Your Pages
-
-
-
- Including Reference Links -
- In-lining Images -
- Changing The HTML File Suffix -
- -
Hypermail Pages
- -You can customize hypermail generated pages to suit your local web site -needs as well as the needs of the list. -Hypermail generates three types of files: --
-
- HTML index pages, -
- HTML message pages, -
- MIME enclosure attactment files. -
-The attachment files are a copy of the attachment the user included and -are not altered. -
-This version of hypermail allows you to -customize both index and message pages separately as described below. - -
- -
Definitions
--In the examples below, the following terms are used. -
-label - the label passed in via the -command line or specified in the list configuration file. -
-indextype - depends on the type of index being -presented. It could be By Author, By Date, By Subject, or By -Thread. -
-mailto-address - the MAILTO -value compiled into hypermail, specified in the environment with the -HM_MAILTO variable, or specified in the -hm_mailto variable in the list specific -configuration file. -
-subject-of-message - the contents of the message's -RFC 2822 Subject: -header. -
-HMURL - Used to contain a link to the Hypermail -Development Center. Defined in hypermail.h. -
-PROGNAME - contains the name of the executable. -Defined in hypermail.h. -
-VERSION - contains the version of the software that -generated the page this appears on. Defined in src/hypermail.h. - -
- -
Choosing the Default Look of Your Pages
--There is no need to customize hypermail pages unless you have a specific -need. There are two different default page layouts provided with hypermail, -the Table Menu Display and the Standard Display. - -
-
Standard Page HTML
-- -If you are not using the HTML template files described -below then Hypermail generates headers and footers that look similar -to the following. Note that you can substitute a <BODY> statement by -either defining BODY in options.h or by using the -hm_body variable in a list specific configuration file. - -
-
Index Page Headers
-- -The default Index page headers used in hypermail look like: - -
- - -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -- -
<HTML> -
<HEAD> -
<TITLE>label: indextype</TITLE> -
<LINK REV="made" HREF="mailto:mailto-address"> -
<HEAD> -
<BODY BGCOLOR="#ffffff" TEXT="#000000"> -
<H1 ALIGN=CENTER>label<BR>By indextype</H1> -
<HR WIDTH=400> - - -
-
Message Pages
-- -The default Message page headers used in hypermail look like: - -
- - -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -- -
<HTML> -
<HEAD> -
<TITLE>label: subject-of-message</TITLE> -
<LINK REV="made" HREF="mailto:mailto-address"> -
<HEAD> -
<BODY BGCOLOR="#ffffff" TEXT="#000000"> -<H1 ALIGN=CENTER>subject</H1> -
<HR> - - -
-
Page Footer
-- -The default page footer shown below is used in hypermail on both the -index and the message pages look like: - -
- - -<HR> -- -
<P> -
<SMALL> -
<EM> -
This archive was generated by <A HREF="HMURL">PROGNAME VERSION</A> on DATE and TIME -
</EM> -
</SMALL> -
</BODY> -
</HTML> - - -
-
Table Menu Display
-- -The table menu display generates pages that have a menu bar at the top -and the bottom of the page that looks something like the following. If -you have enabled the "About" and "Other Archives" links are displayed if -you have enabled them in options.h, the environment variables or in the -list configuration file. A example page: - -
TITLE HERE
--
New Message | -Reply | -About this list | -Date view | -Thread view | -Subject view | -Author view | -
---|
-Kent Landfield (kent@landfield.com)
-Wed, 17 Jun 1998 22:28:29 -0500 (CDT)
-
-
-
-
- Next message: Kent Landfield: "Re: Getting started" -
- Previous message: Crispen, Bob: "RE: Ideas" -
- Next in thread: Andrew Kuchling: "Re: Getting started" -
-
BODY OF MESSAGE HERE
--
-
-
-
- Next message: Kent Landfield: "Ideas" -
- Next in thread: Guido van Rossum: "Re: Getting started" -
New Message | -Reply | -About this list | -Date view | -Thread view | -Subject view | -Author view | -
---|
- - -This archive was generated by hypermail 2.0x -on Thu Jun 04 1998 - 10:05:34 CDT - - -
-If you do not want to use the table display then make sure that -USETABLE is not defined in options.h and the -hm_usetable is not enabled in the list configuration file. -When you do so you will get the standard look and feel of the hypermail -you have grown acustomed to. - -
- -Also note that New Message allows you to provide a means -for someone to post a message to the list. This feature is currently only -availabe on the Table Menu Display. It can be enabled or disabled by defining -HMAIL in options.h or by setting the hm_hmail -variable in the list specific configuration file. - -
- -
Using Template Files to Customize Your Pages
--You can customize your page headers and footers by specifying HTML template -files. Hypermail reads template files and uses those in generating the header -and footer sections of the index and message pages. Template files contain -the actual HTML that you want used when generating the pages. Template files -may also contain "Substitution Cookies". - -
-
Substitution Cookies
--You can insert "substitution cookies" in the header and footer template -files so the appropriate information is filled in at runtime. -
-Substitution cookies supported: -
-
---
-- %% - '%' character - %~ - Storage directory - %a - Other Archives URL - %b - About Archive URL - %e - Email address of message Author - Not valid on index pages - %g - Date and time archive generated - %h - HMURL - %i - Message-id - Not valid on index pages - %l - Archive label - %m - Mailto address - %p - PROGNAME - %s - Subject of message or Index Title - %v - VERSION - %u - Expanded version link (HMURL,PROGNAME,VERSION) - \n - newline character - \t - tab character
-Additional cookies generate the complete HTML lines: -
-- --
-- %A - Author META HTML - Not valid on index pages - %B - BODY HTML statement - %S - Subject META HTML
-
Specifying template file locations
--You can specify the location of the template files either via environment -variables or via entries in the list specific configuration file. -
-
Using Environment Variables
--If you wish to use environment variables, make sure they are exported and -correctly available for hypermail to use. How to do this is dependent on -the type of shell in use. See the appropriate man pages if you need more -information. -
-
-
- HM_IHTMLHEADERFILE - the location of the INDEX header template. -
- HM_IHTMLFOOTERFILE - the location of the INDEX footer template. -
- HM_MHTMLHEADERFILE - the location of the MESSAGE header template. -
- HM_MHTMLFOOTERFILE - the location of the MESSAGE footer template. -
-
Using Configuration File Entries
--An easy way is to tell hypermail where the template files are is via a -list specific configuration file. The following entries can be used. -
-
-
-
- hm_ihtmlheaderfile - the location of the INDEX header template. -
- hm_ihtmlfooterfile - the location of the INDEX footer template. -
- hm_mhtmlheaderfile - the location of the MESSAGE header template. -
- hm_mhtmlfooterfile - the location of the MESSAGE footer template. -
-
Examples
-- -It is acceptable to have a single configuration file listed in more than -one entry. Suppose you want to have a common footer for all pages and -separate headers. The following example shows that. -
-
-hm_ihtmlheaderfile = /lists/wu-ftpd/wu-ftpd-index.hyp-
-hm_mhtmlheaderfile = /lists/wu-ftpd/wu-ftpd-msg.hyp
-hm_ihtmlfooterfile = /lists/wu-ftpd/wu-ftpd-msgfooter.hyp
-hm_mhtmlfooterfile = /lists/wu-ftpd/wu-ftpd-msgfooter.hyp -
- -If an entry is left blank and a location is not specified via an environment -variable then the hypermail default headers are used. -
-
-hm_ihtmlheaderfile = /lists/wu-ftpd/wu-ftpd-index.hyp- -The above example informs hypermail to use the template files listed for -the Index header and the Message header and footer. The hypermail default -page footer would be used on the index pages. -
-hm_ihtmlfooterfile =
-hm_mhtmlheaderfile = /lists/wu-ftpd/wu-ftpd-msg.hyp
-hm_mhtmlfooterfile = /lists/wu-ftpd/wu-ftpd-msgfooter.hyp
-
- -NOTE: While it is not necessary to provide absolute paths, -it is a good idea to. - -
-
Message Pages
-- -Each HTML file that is generated for a message contains (where applicable): -
-
-
-
- the subject of the article, -
- the name and email address of the sender, -
- the date the article was sent, -
- links to the next and previous messages in the archive, -
- a link to the message the article is in reply to, and -
- a link to the message next in the current thread. -
- -
Including Reference Links
-- -Reference links such as the following - -
-
-
- Next message: Kent Landfield: "Re: Getting started" -
- Previous message: Crispen, Bob: "RE: Ideas" -
- Next in thread: Andrew Kuchling: "Re: Getting started" -
- -Additionally, if you want to list all replies to a message -such as the following, - -
-
-
- In reply to: Kent Landfield: "Getting started" -
- Reply: Guido van Rossum: "Re: Getting started" -
- Reply: Andrew Kuchling: "Re: Getting started" -
- Reply: Kent Landfield: "Re: Getting started" -
- -
In-lining Images
--It is possible to have images that are sent in email automatically -displayed when the message is presented. To do this you need to set -the hm_inline_types in the list configuration file. - -
-For example, if you listed -
-hm_inline_types = image/gif image/jpeg --then both GIF files and JPEG files would be displayed as part of the -message. Types that are not "in-lined" are linked as a simple attachment -requiring the user to click on it to have it displayed. - -
- -
Changing The HTML File Suffix
--You may wish to have the pages generated use a different HTML file -suffix other than the default ".html". To do this you need -to either set the default define HTMLSUFFIX in options.h, -set the environment variable HM_HTMLSUFFIX or set it in -the list's configuration file by using the hm_htmlsuffix -variable. -
-Note: -Do not include a "." in the suffix; If you do -you will end up with filenames that look like. "..html" - -
-
See Also
--hypermail.(1), - -hmrc.(4), - -Hypermail - -and - -Hypermail List Configuration File. -and Adding a Search Engines to your Hypermail Archive -- -
- -Last updated April 10, 2003 - - - - + + + + + +
Customizing Hypermail Pages
+ +
Contents:
+-
+
- Hypermail Pages +
- Definitions +
-
+ Choosing the Default Look of Your Pages
+
-
+
- + Standard Page HTML + + +
- Table Menu Display +
+ - + Using Template Files to Customize Your Pages + + +
- Including Reference Links +
- In-lining Images +
- Changing The HTML File Suffix +
+
Hypermail Pages
You can + customize hypermail generated pages to suit your local web site + needs as well as the needs of the list. Hypermail generates three + types of files: +-
+
- HTML index pages, +
- HTML message pages, +
- MIME enclosure attactment files. +
The attachment files are a copy of the attachment the user + included and are not altered.
+This version of hypermail allows you to customize both index + and message pages separately as described below.
++
Definitions
+In the examples below, the following terms are used.
+label - the label passed in via the + command line or specified in the list configuration file.
+indextype - depends on the type of + index being presented. It could be By Author, By + Date, By Subject, or By Thread.
+mailto-address - the + MAILTO value compiled into hypermail, specified + in the environment with the HM_MAILTO variable, + or specified in the hm_mailto variable in the + list specific configuration file.
+subject-of-message - the contents of + the message's RFC + 2822 Subject: header.
+HMURL - Used to contain a link to + the Hypermail Development Center. Defined in hypermail.h.
+PROGNAME - contains the name of the + executable. Defined in hypermail.h.
+VERSION - contains the version of + the software that generated the page this appears on. Defined in + src/hypermail.h.
++
Choosing the Default Look of Your + Pages
+There is no need to customize hypermail pages unless you have + a specific need. There are two different default page layouts + provided with hypermail, the Table Menu Display and the Standard + Display.
+Standard Page HTML
+If you are not using the HTML template files + described below then Hypermail generates headers and footers that + look similar to the following. Note that you can substitute a + <BODY> statement by either defining BODY + in options.h or by using the hm_body variable in + a list specific configuration file.
+Index Page + Headers
+The default Index page headers used in hypermail look + like:
++ <!DOCTYPE HTML PUBLIC "-//IETF//DTD + HTML//EN">+
+ <HTML>
+ <HEAD>
+ <TITLE>label: indextype</TITLE>
+ + <LINK REV="made" + HREF="mailto:mailto-address">
+ <HEAD>
+ <BODY BGCOLOR="#ffffff" TEXT="#000000">
+ <H1 + ALIGN=CENTER>label<BR>By indextype</H1>
+ + <HR WIDTH=400> +
Message Pages
+The default Message page headers used in hypermail look + like:
++ <!DOCTYPE HTML PUBLIC "-//IETF//DTD + HTML//EN">+
+ <HTML>
+ <HEAD>
+ <TITLE>label: subject-of-message</TITLE>
+ + <LINK REV="made" + HREF="mailto:mailto-address">
+ <HEAD>
+ <BODY BGCOLOR="#ffffff" TEXT="#000000"> <H1 + ALIGN=CENTER>subject</H1>
+ <HR> +
Page Footer
+The default page footer shown below is used in hypermail on + both the index and the message pages look like:
++ <HR>+
+ <P>
+ <SMALL>
+ <EM>
+ This archive was generated by <A + HREF="HMURL">PROGNAME VERSION</A> on DATE and + TIME
+ </EM>
+ </SMALL>
+ </BODY>
+ </HTML> +
Table Menu Display
+The table menu display generates pages that have a menu bar at + the top and the bottom of the page that looks something like the + following. If you have enabled the "About" and "Other Archives" + links are displayed if you have enabled them in options.h, the + environment variables or in the list configuration file. A + example page:
+TITLE HERE
+New + Message | ++ Reply | +About this + list | +Date view | +Thread view | +Subject view | +Author view | +
---|
Kent Landfield (kent@landfield.com)
+
+ Wed, 17 Jun 1998 22:28:29 -0500 (CDT)
-
+
- Next message: Kent Landfield: "Re: Getting + started" +
- Previous message: Crispen, Bob: "RE: Ideas" +
- Next in thread: Andrew Kuchling: "Re: Getting + started" +
+
BODY OF MESSAGE + HERE
++
-
+
- Next message: Kent Landfield: "Ideas" +
- Next in thread: Guido van Rossum: "Re: Getting + started" +
New + Message | ++ Reply | +About this + list | +Date view | +Thread view | +Subject view | +Author view | +
---|
This archive was generated by hypermail 2.0x on Thu Jun 04 + 1998 - 10:05:34 CDT
+If you do not want to use the table display then make sure + that USETABLE is not defined in options.h and + the hm_usetable is not enabled in the list + configuration file. When you do so you will get the standard look + and feel of the hypermail you have grown acustomed to.
+Also note that New Message allows you to + provide a means for someone to post a message to the list. This + feature is currently only availabe on the Table Menu Display. It + can be enabled or disabled by defining HMAIL in + options.h or by setting the hm_hmail variable in + the list specific configuration file.
++
Using Template Files to Customize + Your Pages
+You can customize your page headers and footers by specifying + HTML template files. Hypermail reads template files and uses + those in generating the header and footer sections of the index + and message pages. Template files contain the actual HTML that + you want used when generating the pages. Template files may also + contain "Substitution Cookies".
+Substitution Cookies
+You can insert "substitution cookies" in the header and footer + template files so the appropriate information is filled in at + runtime.
+Substitution cookies supported:
++++
++ +%% +- '%' character ++ +%~ +- Storage directory ++ +%a +- Other Archives URL ++ +%b +- About Archive URL ++ +%e +- Email address of message Author - Not valid on index + pages ++ +%g +- Date and time archive generated ++ +%h +- HMURL ++ +%i +- Message-id - Not valid on index pages ++ +%l +- Archive label ++ +%m +- Mailto address ++ +%p +- PROGNAME ++ +%s +- Subject of message or Index Title ++ +%v +- VERSION ++ +%u +- Expanded version link (HMURL,PROGNAME,VERSION) ++ +\n +- newline character ++ +\t +- tab character +
Additional cookies generate the complete HTML + lines:
++++
++ +%A +- Author META HTML - Not valid on index pages ++ +%B +- BODY HTML statement ++ +%S +- Subject META HTML +
Specifying template file + locations
+You can specify the location of the template files either via + environment variables or via entries in the list specific + configuration file.
+Using Environment + Variables
+If you wish to use environment variables, make sure they are + exported and correctly available for hypermail to use. How to do + this is dependent on the type of shell in use. See the + appropriate man pages if you need more information.
+-
+
- HM_IHTMLHEADERFILE - the location of the + INDEX header template. +
- HM_IHTMLFOOTERFILE - the location of the + INDEX footer template. +
- HM_MHTMLHEADERFILE - the location of the + MESSAGE header template. +
- HM_MHTMLFOOTERFILE - the location of the + MESSAGE footer template. +
Using Configuration File + Entries
+An easy way is to tell hypermail where the template files are + is via a list specific configuration file. The following entries + can be used.
+-
+
- hm_ihtmlheaderfile - the location of the + INDEX header template. +
- hm_ihtmlfooterfile - the location of the + INDEX footer template. +
- hm_mhtmlheaderfile - the location of the + MESSAGE header template. +
- hm_mhtmlfooterfile - the location of the + MESSAGE footer template. +
Examples
+It is acceptable to have a single configuration file listed in + more than one entry. Suppose you want to have a common footer for + all pages and separate headers. The following example shows + that.
++ hm_ihtmlheaderfile = /lists/wu-ftpd/wu-ftpd-index.hyp+
+ hm_mhtmlheaderfile = /lists/wu-ftpd/wu-ftpd-msg.hyp
+ hm_ihtmlfooterfile = /lists/wu-ftpd/wu-ftpd-msgfooter.hyp
+ hm_mhtmlfooterfile = /lists/wu-ftpd/wu-ftpd-msgfooter.hyp +
If an entry is left blank and a location is not specified via + an environment variable then the hypermail default headers are + used.
++ hm_ihtmlheaderfile = /lists/wu-ftpd/wu-ftpd-index.hypThe above example informs hypermail to use the + template files listed for the Index header and the Message header + and footer. The hypermail default page footer would be used on + the index pages. +
+ hm_ihtmlfooterfile =
+ hm_mhtmlheaderfile = /lists/wu-ftpd/wu-ftpd-msg.hyp
+ hm_mhtmlfooterfile = /lists/wu-ftpd/wu-ftpd-msgfooter.hyp
+
NOTE: While it is not necessary to provide + absolute paths, it is a good idea to.
+Message Pages
+Each HTML file that is generated for a message contains (where + applicable):
+-
+
- the subject of the article, +
- the name and email address of the sender, +
- the date the article was sent, +
- links to the next and previous messages in the + archive, +
- a link to the message the article is in reply to, and +
- a link to the message next in the current thread. +
+
Including Reference + Links
+Reference links such as the following
+-
+
- Next message: Kent Landfield: "Re: Getting + started" +
- Previous message: Crispen, Bob: "RE: Ideas" +
- Next in thread: Andrew Kuchling: "Re: Getting + started" +
Additionally, if you want to list all replies + to a message such as the following,
+-
+
- In reply to: Kent Landfield: "Getting started" +
- Reply: Guido + van Rossum: "Re: Getting started" +
- Reply: Andrew + Kuchling: "Re: Getting started" +
- Reply: Kent + Landfield: "Re: Getting started" +
+
In-lining Images
+It is possible to have images that are sent in email + automatically displayed when the message is presented. To do this + you need to set the hm_inline_types in the list + configuration file.
+For example, if you listed
++ hm_inline_types = image/gif image/jpeg +then both GIF files and JPEG files would be + displayed as part of the message. Types that are not "in-lined" + are linked as a simple attachment requiring the user to click on + it to have it displayed. +
+
Changing The HTML File + Suffix
+You may wish to have the pages generated use a different HTML + file suffix other than the default ".html". To do this you need + to either set the default define HTMLSUFFIX in + options.h, set the environment variable + HM_HTMLSUFFIX or set it in the list's + configuration file by using the hm_htmlsuffix + variable.
+Note: Do not include a "." in the suffix; If + you do you will end up with filenames that look like. + "..html"
++
See Also
++ hypermail.(1), + hmrc.(4), Hypermail and + Hypermail List Configuration + File. and Adding a Search Engines to your Hypermail + Archive ++
+ Last updated April 10, + 2003 + + diff --git a/docs/faq.html b/docs/faq.html new file mode 100644 index 00000000..644cc595 --- /dev/null +++ b/docs/faq.html @@ -0,0 +1,499 @@ + + + + + +
+
Hypermail Frequently Asked Questions
++
This is the beginning of the Hypermail FAQ. + Don't dispair that there is little here. That will change + shortly.
+Table of Contents
+-
+
- Why is the License Different ? +
- Will hypermail run on my system ? +
- What Happened to EIT ? +
- Where in the World is Kevin Hughes ? +
- What is the latest version of Hypermail + ? +
- Where can I get the latest version of + Hypermail ? +
- How can I split the archives into months + ? +
- How do I change the font on the pages + ? +
- What is HM_MAILTO used for ? +
- Can I send a message to the list from the web + archive ? +
- Can I build and run this on Windows + 98/2000/NT ? +
- How can I remove a listserver subject prefix + ? +
- Which configuration file should I use + ? +
- Why is the downloaded file name different + when I download hypermail.tar.gz ? +
- Can I throttle hypermail's CPU usage + ? +
- How can I make my archive searchable + ? +
- How does hypermail decide whether messages + are in the same thread? +
- How can I have multiple mailboxes produce one + archive? +
- I have received an email with attachment that + needs octet-stream. What should I do? +
- Why is Hypermail ignoring some + messages? +
- Bogus dates are causing some emails to be put + in a strange folder. Is there an easy way around this? +
+
1. Why is the License Different + ?
+Hewlett-Packard (who is now the legal owner of Hypermail, + since EIT was bought by VeriFone, which was bought by + Hewlett-Packard) has put it under the GNU license, a widely used + "free software" license. This means that you can use and modify + the source code as long as you make your changes publically + available and do not charge for their use (although, under GNU, + you can charge for their distribution). More details are + available at http://www.fsf.org/ and http://www.fsf.org/copyleft/gpl.html.
++ +
2. Will hypermail run on my + system ?
+Hypermail can compile and run as-is on most of the more + popular UNIX systems today. If you're not sure if hypermail will + run on your UNIX system, try compiling it and see!
+Hypermail has been reported to work on MacOSX (X.2.6), with + the advice to use --disable-shared and manually execute make in + src/pcre.
+People have indeed ported hypermail to DOS, Windows 95, and + Windows NT (but not Java ...yet). Installation advice for some + Windows systems is available at win32.html.
++ +
3. What Happened to EIT + ?
+A very old and established government contractor company + called Electronic Instrumentation and Technology Inc. made legal + moves to obtain the eit.com domain. Since VeriFone/HP had no + interest in keeping EIT, they dissolved it completely some months + ago. This company had a trademark on EIT so the domain name was + given to them. (Thank you InterNic...)
++ +
4. Where in the World is Kevin + Hughes ?
+Kevin has not dropped off the face of the earth but is + extremely busy these days as a Hypermedia Engineer at Veo + Systems.
++ Kevin Hughes+
+ kev@kevcom.com
+ kevinh@veosys.com
+ (650) 858-7710 (office number)
+ (650) 858-4925 (fax)
+ www.veosystems.com +
+ +
5. What is the latest version of + Hypermail ?
+The latest stable version of Hypermail is Version 2.1.9. It is + available from http://www.hypermail-project.org
++ +
6. Where can I get the latest + version of Hypermail ?
+The latest version of Hypermail is available from the + Hypermail Development Center at SourceForge + and/or at
+http://www.hypermail-project.org/
It + and past versions are also available via FTP from +ftp://ftp.hypermail.org/hypermail/
+The cvs server at :pserver:cvs@cvs.hypermail.org:/CVS + usually has a more recent but less tested version.
++
7. How can I split the archives + into months ?
+I have a fat archive that I'd like to split up by month, + like I see so many others doing. Is there a description somewhere + of a procedure to follow, or will I just have to think it + through?
+If you are using version 2.1.0 or later and either have gdbm + or don't do incremental updates, see the folder_by_date option. The simple + way to use this is to add these to your .hmrc:
++ folder_by_date="%y%m"and regenerate your archive from its mbox file. +
+ usegdbm = 1 +
An older alternative is a set of scripts in a directory named + archive/ that has tools to do just + what you want to do.
+If you want index files split by month but don't need to split + the archive into multiple directories, try adding + "monthly_index=1" in your config file (usually ~/.hmrc) + (available in version 2.1). A summary.html file will provide + links to all the monthly indices. This is probably appropriate + for archives with a few thousand messages, but for larger + archives I recommend splitting into multiple directories.
+There's a script at http://users.netrus.net/troc/perl.html + called mms (monthly mail splitter) which has also been reported + useful.
++ +
8. How do I change the font on + the pages ?
+What I'd like to do is change the font of the archives + pages. I tried doing this by adding a <FONT FACE=...> tag + in the header.hyp file and a <FONT> tag in the footer file, + but it didn't work. Is there something in the program itself + that's preventing me from making this change?
+Yes and no. Let me guess... You have hm_usetable = + 1. The code for tables is not inheriting the FONT values + and that they need to be set in the <TH..> tags. If tables + are not used it works as expected.
+To test it put a
++ <FONT SIZE="1" + FACE="GENEVA,ARIAL,HELVETICA"> +in the test-index.hyp and test-msg.hyp. In + test-footer.hyp put +
+ </FONT> ++
With hm_usetable = 1 in the test.rc file, + then ran "hypermail -c test.rc -m testmail" and + everything between the "menus" was the right FONT but the menus + were not.
+Then edit the test.rc file and set hm_usetable = + 0. Next remove the existing testdir and rerun hypermail + again. This time the FONT works as expected.
+Is this what is happening to you ? If so the code will need to + be modified.
++ +
9. What is HM_MAILTO used for + ?
+I've enabled this option in .hyprc (the configuration file + to which the pipe script for my archive points). Unlike the other + options, this one does not create a link to + mailto:admin@domain.com as I would expect. Any ideas?
+HM_MAILTO has a couple different uses. One is to trigger the + insertion of the <LINK REV=made HREF=mailto:...> header in + the HTML sources. This is most useable with ascii browsers such + as lynx.
++ hm_mailto = [ email-address | NONE ]+
+ #
+ # The address of the contact point that is put in the HTML + header line
+ # <LINK REV=made HREF=mailto:hm_mailto>
+ #
+ # The <LINK...> header can be disabled by default by + setting
+ # mailto to NONE. +
It can also be used in a hypermail page template file since it + resolves to %m.
+For example, your footer file might look like...
+<P ALIGN=CENTER><IMG
+ SRC="/images/bar.png" WIDTH="400" HEIGHT="4"
+ ALT="---------"></P>
+ <ADDRESS>
+ <EM>
+ <SMALL>
+ This archive was generated by %u on %g
+ <P ALIGN=CENTER>
+ Send administrative comments to<A
+ HREF="mailto:%m">%m</A>
+ </P>
+ </SMALL>
+ </EM>
+ </ADDRESS>
+ </BODY>
+ </HTML>
In this case the %m is expanded to admin@domain.com.
++ +
10. Can I send a message to the + list from the web archive ?
+I would like to add a link to the menu that says "Send a + Message to the List." I read through the documentation on your + website, and I think I know what I have to do. However, I cannot + find an example of what a .hyp template file should look + like.
+That's what "Respond" on the menubar does. It allows a person + to reply to the existing message, with the reply sent to the list + address. And "mail a new topic" on the menubar allows a user to + send a new message to the list.
+To enable this feature set
+
+ hm_hmail = listaddr@your-site.domain
+ +
Can I build and run this on + Windows 98/2000/NT ?
+I would like to use Hypermail on my Windows box. Can I ? + If so how do I build the latest version ?
+There is a complete description on how to build hypermail on a + Windows system at win32.html. This was + written by Bob Crispen <bob.crispen@boeing.com>. (Thanks + Bob!)
++ +
How can I remove a listserver + subject prefix ?
+The Subject index page does not seem to do the right + sorting. My list has a "subject prefix" so people can filter + their inbound mail better. Is that confusing the sorting + ?
+Yes. Hypermail functions that deal with replies look for the + Re: and return a pointer to the subject line after the "Re: ". + The listserver software is prefixing the subject line contents + with [subject-prefix]. For example:
+Initial message:
+ Subject: [subject-prefix] the subject of the + message ++
Replies:
+ Subject: [subject-prefix] Re: the subject of the + message ++
The best solution is to use the directive
++ stripsubject = [subject-prefix] +in the config file for that list. Then + [subject-prefix] is stripped before the Reply processing occurs + and the proper things happen. This is the proper fix since + hypermail would need to know to strip the [subject-prefix] from + the initial messages to get it right. +
+ +
Which configuration file should + I use ?
+Which configuration file should I use ?. Is it the + hypermail.rc file in the Configs directory? I'm trying to edit + the appearance of pages created by hypermail, but I think I'm + trying to edit the wrong config file.
+With one of the later versions you can use the -v option to + generate a config file that you can use. There is not just one + config file. What are included are examples.
++ $ hypermail -v > + some-file.rc +Edit the some-file.rc and set the values to what you + want. +
Then run hypermail using the config file by:
++ $ hypermail -c some-file.rc. ++
+ +
Why is the downloaded file name + different when I download hypermail.tar.gz ?
+The source is available from
++ www.hypermail.org/hypermail.tar.gz +However: When downloading though IE v4 browser + on an NT PC, you get a file called hypermail_tar.tar. +
Depending on your browser MIME type setup and support + applications, the filename downloaded might be hypermail.tar, + hypermail.tar.gz, etc. In any case, you will be informed as to + the filename when you actually download it onto a Windows/NT PC. + Use that name from that point forward.
++ +
Can I throttle hypermail's CPU + usage ?
+I'm looking for a good way to throttle hypermail. When it + runs it is taking over both CPU's on my system. Is there a way to + have it limit itself?
+There is currently no "nice" call in hypermail to limit + itself. Maybe we can consider it in the future. You might run it + as a subcommand to nice. For example in an aliases file:
++ "|nice someval 'hypermail command + line'" +I've NEVER tried this so... ;) +
You might also be looking at a very large archive with lots of + messages being the cause. If so then try breaking it up into + smaller archives such as monthly archives. Tools are available + for that in the latest release.
+And if the list is a high traffic list, consider not running + it from a sendmail alias and instead, run it from cron. (To + assure it does not run unnecessarily, consider using 'make' to + check dependencies on the inbound mailbox and the archive itself. + If the mailbox is newer, then run the hypermail command. If not, + then no new message have been received so don't bother running + it.
+If the you are using the linkquotes option and incremental + update (-u option), add a searchbackmsgnum line to your config + file. It controls the tradeoff between speed and the reliability + of finding the right source for quoted text. Try to set it to the + largest number of messages between a message and the final direct + reply to that message.
++ +
How can I make my archive + searchable ?
+Where can I find a program that provides an easy way of + adding a "search this archive" feature to my hypermail + archive?
+These seem to be the most popular choices:
+-
+
- Htdig +
- Swish-E +
- Glimpse +
- Namazu +
- mnoGoSearch +
You can also use search engines by putting text such as this
+ on your web page (although this search produces results from an
+ entire site, not just the email archive):
+ <form action=http://www.google.com/search>
+ <input type=text name=as_q>
+ <input type=hidden name=as_sitesearch
+ value=hypermail-project.org>
+ <input type=submit value="Search Hypermail">
+ </form>
You can probably get more complete (but apparently not recent) + info at: Search + Engine Software For Your Web Site.
++ +
How does hypermail decide + whether messages are in the same thread?
+It uses the In-Reply-To: header if that is available. If not, + it uses the References: header if that is available. If these are + not available, it looks for previous messages with the same + subject header. Matches based on the subject are listed as + "maybe" replies.
+If the linkquotes option is used, it will also search the + message bodies of the previous searchbackmsgnum (default = 500) + messages for text that looks like it is being quoted in the + current message. If it finds one or more prior messages with such + text matches, it will treat the one with the longest match as the + message being replied to. The exact algorithms for deciding what + is quoted text are a bit complex. These matches override the + In-Reply-To: and References: info (this rule may deserve further + thought).
++ +
How can I have multiple + mailboxes produce one archive?
+One simple way is to combine them into one mailbox, and send
+ that to hypermail. Something like
+ "cat file1 file2 file3 > combined" +should do that. +
Another way is to invoke hypermail several times, using the -u + flag for any mailboxes that you want added after the html archive + has been started:
++ hypermail -m file1 + hypermail -u -m file2 + hypermail -u -m file3 ++
Do not try to send hypermail more than one mailbox at a time, + or send it a second mailbox without using the -u flag or the + increment=1 or increment=-1 option.
++ +
I have received an email with + attachment that needs octet-stream. What should I do?
+No attachment "needs" octet-stream. octet-stream is a label + that describes the attachment as being "a stream of octets". What + is that you say? Well, the application didn't know any more + specifics and thus it identified it as good as possible. It knows + it is a stream of octets, nothing else.
+So, an attachment coming as "octet-stream" can be pretty much + ANYTHING. You have no idea, and neither does anyone else. The + only way to figure out is to download the file and see for + yourself, ask the person who mailed it or to hope that the mail + it came with describes what the attachment was about.
+"octet-stream" could just as well be named "I haven't got the + slightest idea what this is, but I know it is built up with a + series of bytes".
++ +
Why is Hypermail ignoring some + messages?
+One possibility is that those messages have a header + saying
++ X-No-Archive: yes +which seems to indicate that the author doesn't want + them included in any archive. This is controlled by a configure + option which defaults to: +
+ deleted = "X-Hypermail-Deleted X-No-Archive" +To get Hypermail to treat these as normal messages, + add this to your config file (which is ~/.hmrc by default) or + alter the "deleted" line in your existing config file to: +
+ deleted = "X-Hypermail-Deleted" ++
+ +
Bogus dates are causing some + emails to be put in a strange folder. Is there an easy way around + this?
+If the bad dates were caused by a computer with the date set + absurdly, try running mailbox_date_trimmer.py, + available in the Hypermail's contrib directory.
+If the bad dates are in a format that Hypermail doesn't + understand, then you will probably need to edit them + manually.
++ +
+
+ + diff --git a/docs/hmrc.4 b/docs/hmrc.4 index 8a79e180..736192a1 100644 --- a/docs/hmrc.4 +++ b/docs/hmrc.4 @@ -184,6 +184,15 @@ for the valid conversion specifications. A string to be stripped from all subject lines. Helps unclutter mailing lists which add tags to subject lines. .TP +.B archive_date = boolean_number +Adds a specific line in the indexes giving the date the archive +was generated. Disabled by default. +.TP +.B hypermail_colophon = boolean_number +Adds a footer line to messages and indexes stating that the archive +was generated by hypermail, the version, and the generation date. +Enabled by default. +.TP .B archives = "URL" This will create a link in the archived index pages labeled .I "Other mail archives" @@ -236,15 +245,6 @@ experimental .B X-Robots-Tag HTTP header. For more information, browse https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag .TP -.B indextable = boolean_number -Setting this variable to -.B 1 -will tell Hypermail to generate an message index -Subject/Author/Date listings using a table format. -Set to -.B 0 -if you want the standard Hypermail index page look and feel. -.TP .B reverse = boolean_number Setting this variable to .B 1 @@ -286,6 +286,11 @@ will word wrap. This only takes effect if is enabled. .TP .B iquotes = boolean_number +.B NOTE: +This option has been deprecated as markup allows you to replicate this +behavior using the CSS +.B .quote +rule. Set this to .B 1 to italicize quoted lines. @@ -477,6 +482,11 @@ for further discussion on the .B noindex metadata value. .TP +.B empty_archive_notice = "string" +Message that hypermail should display in the indices if the archive +is empty (e.g, no messages, or all messages marked as deleted or spam), +If not set, hypermail will use a default localized message. +.TP .B base_url = "url" The url of the archive's main directory. This is needed when the latest_folder option is used and the folder_by_date makes @@ -543,7 +553,7 @@ directives. .B Robot annotations instruct a visiting web robot if the contents of a message should be indexed and/or if the outgoing links from the message should be followed, doing so thru -a specific HTML meta tag. (browse http://www.robotstxt.org/ for further +a specific HTML meta tag. (browse https://www.robotstxt.org/ for further details). .B Robot annotations @@ -690,7 +700,7 @@ a file for each thread that contains all the messages in that thread. .TP .B href_detection = boolean_number Set this to On to assume that any string on the body of the message -that says is a URL, together with its markup and treat it as such. .TP .B mbox_shortened = boolean_number @@ -763,6 +773,16 @@ With a setting of 2, attachment creation information is listed individually with the number of the message the attachments relate to. This is written to stdout. .TP +.B warn_deprecated_options = [ 0 | 1 ] +Set this to +.B 1 +if you want hypermail to display warning messages if you +are using deprecated or planned to deprecate configuration options. +Set it to +.B 0 +to hide those warnings. This option is enabled by default +This warning is written to stdout. +.TP .B thrdlevels = number This specifies the number of thread levels to outline in the thread index. For instance, if .B thrdlevels @@ -821,6 +841,21 @@ and .B statement. .TP +.B mhtmlnavbar2upfile = path +Define path as the path to a template file containing valid HTML formatting +statements you wish to be included as information on each archived message, +giving links to the hierarchy of your archive. By default uses the +value of +.B ihtmlnavbar2upfile +If +.B mhtmlnavbar2upfile +and +.B ihtmlnavbar2upfile +are undefined, hypermail will generate a generic breadcrumb +that uses the archive's +.B label +and links back to the archive's default index file. +.TP .B hmail = Mailing_List_Submission_Address Set this to the list's submission address. When enabled, this can be used to submit a new message to the list served by the hypermail archive. @@ -857,25 +892,36 @@ header. The variable is used to specify where the .B Message-Identifier value will appear in the link. A possible command one could use is -.B http://example.org/mid-resolver/$ID. +.B https://example.org/mid-resolver/$ID. This option is .B disabled by default. .TP +.B default_css_url = "URL" +This option points to an external stylesheet that will be used +for indexes and messages if either +.B icss_url +or +.B mcss_url +are not configured. + +By default this option is the relative URL +.B hypermail.css +.TP .B icss_url = "URL" This will link an external stylesheet found at the given URL to the index files. This will happen thru a -.B LINK +.B link element in the index document's -.B HEAD. +.B head. By default this option is disabled. .TP .B mcss_url = "URL" This will link an external stylesheet found at the given URL to the message files. This will happen thru a -.B LINK +.B link element in the message document's -.B HEAD. +.B head. By default this option is disabled. .TP .B show_headers = list_of_RFC_Headers_to_display @@ -939,6 +985,14 @@ do anything with. They are quietly ignored. They can be listed individually on multiple lines or comma or space separated on a single line. .TP +.B ignore_content_disposition = types_of_MIME_attachments +This is the list of MIME attachment types for which you wish to ignore any +associated +.B Content-Disposition +header. They are quietly ignored. They can be +listed individually on multiple lines or comma or space separated on a single +line. +.TP .B applemail_mimehack = [ 0 | 1] In a multipart/alternative message, Apple Mail (as of June/2018) is only adding attachments to the text/html related part. Set this @@ -957,6 +1011,20 @@ option. .B Disabled by default. .TP +.B max_attachments_per_msg = positive integer +This specifies the maximum number of attachments that will be +processed for a message. Any attachments beyond this limit +will be ignored. +Set to +.B 0 +to remove this limit. +Note that if you remove this limit or set it too high, +memory usage may increase when parsing a message +made up of hundreds of attachments. +Set to +.B 200 +by default. +.TP .B searchbackmsgnum = postive integer If the linkquotes option is on and an incremental update is being done (-u option), this controls the tradeoff between speed and @@ -1002,8 +1070,6 @@ recommended for archives with over a few hundred messages. Setting this greater than 1 will produce multiple levels of files for each thread whose replies are nested by more than 1 level, but that is rarely useful. This option is currently disabled -if the indextable option is turned on, and probably needs to -be less than thrdlevels. .LP .SH HTML TEMPLATE FILE SUBSTITUTION COOKIES .LP diff --git a/docs/hmrc.html b/docs/hmrc.html index 4953123b..211f9fa7 100644 --- a/docs/hmrc.html +++ b/docs/hmrc.html @@ -1,28 +1,30 @@ - - - - - -
Hypermail List
+
+
+
+
+
+
+ Hypermail - hmrc list configuration
+
+
+
+
+
+
Hypermail List
Configuration File
-
+
The hypermail list configuration file is used to specify
list specific or user specific information to
hypermail. Comments are denoted by the '#' character at the
begining of the line. The file to use can be specified via the -c
command line argument. The default file is .hmrc in the user's home
directory.
-Examples listed on this page are shown in this style. The
-default value is shown unless otherwise indicated. Off is
-equivalent to 0, and On is equivalent to 1 for options which
-are either on or off.
+Examples listed on this page are shown in this style. The
+default value is shown unless otherwise indicated. Off is
+equivalent to 0, and On is equivalent to 1 for options which
+ are either on or off.
+
simple
+ obfuscation of email addresses
+
Hypermail List
Configuration File
-+
The hypermail list configuration file is used to specify list specific or user specific information to hypermail. Comments are denoted by the '#' character at the begining of the line. The file to use can be specified via the -c command line argument. The default file is .hmrc in the user's home directory.
-Examples listed on this page are shown in this style. The -default value is shown unless otherwise indicated. Off is -equivalent to 0, and On is equivalent to 1 for options which -are either on or off.
+Examples listed on this page are shown in this style. The +default value is shown unless otherwise indicated. Off is +equivalent to 0, and On is equivalent to 1 for options which + are either on or off.
+
msgsperfolder split into subdirs
of n messages
avoid_top_indices don't
generate these files
-
-
- indextable style of message -lists
- reverse sort order, date/thread files
- reverse_folders sort order, list
@@ -114,7 +119,7 @@
thrdlevels max indentation
- thread_file_depth threads get their own files -
- icss_url stylesheet +
- icss_url URL of CSS stylesheet for indexes
- describe_folder labels for subdirs
Body style
- showhtml how much conversion to
-html?
+html? (may be deprecated)
Links
- linkquotes fine-grained link to
-source of quoted text
+source of quoted text (UNMAINTAINED)
- searchbackmsgnum linkquotes
-performance
+performance (UNMAINTAINED)
- link_to_replies fine-grained
-link to responses
+link to responses (UNMAINTAINED)
- quote_link_string linkquotes
-labels
+labels (UNMAINTAINED)
- spamprotect obfuscate email
addresses
- antispamdomain how to obfuscate
@@ -174,24 +179,27 @@
show_msg_links next, previous,
next in thread
- show_index_links control links
-to index pages
+ to index pages
- showheaders To:, From:,
-Subject:
+ Subject:
- show_headers others (Message-ID,
-etc)
+ etc)
+- show_headers_msg_rfc822 others (Message-ID,
+ etc) but only for message/rfc822 attachments.
- format_flowed support RFC 3676
-format=flowed
+ format=flowed (EXPERIMENTAL)
- format_flowed_disable_quoted
-disable support for RFC 3676 format=flowed in quoted text
+ disable support for RFC 3676 format=flowed in quoted text (EXPERIMENTAL)
- mhtmlheaderfile template
- mhtmlfooterfile template
+- mhtmlnavbar2upfile template (NEW IN 3.0)
-
show_msg_links next, previous,
next in thread
- inlinehtml where to put text/html @@ -209,7 +217,9 @@
prefered_types choose from
multipart/mixed
htmlmessage_deleted_spam custom
markup body for deleted messages (by spam reasons)
-Options affecting both
+
+
+
+
+Options affecting both
messages and index pages
-Locale
+Locale
-
-- language = [ two-or-more-letter-language-id
-]
+- language = [ two-or-more-letter-language-id
+]
- This is a two-letter string specifying the default language to
use, or a longer string specifying a language and locale. Set this
the value of the language table you wish to use when running and
generating archives. See also iso2022jp
-and eurodate.
-
-Current supported languages, with their default locales:
-
-de (de_DE) - German
-en (en_US) - English
-es (es_ES) - Spanish
-fi (fi_FI) - Finnish
-fr (fr_FR) - French
-el (el) - Greek
-gr (el_GR) - Greek
-is (is_IS) - Icelandic
-no (no_NO) - Norwegian
-pl (pl_PL) - Polish
-pt (pt_BR) - Brazilian Portuguese
-ru (ru_RU) - Russian
-sv (sv_SE) - Swedish
-
+and eurodate.
+
+Current supported languages, with their default locales:
+
+de (de_DE) - German
+en (en_US) - English
+es (es_ES) - Spanish
+fi (fi_FI) - Finnish
+fr (fr_FR) - French
+el (el) - Greek
+gr (el_GR) - Greek
+is (is_IS) - Icelandic
+no (no_NO) - Norwegian
+pl (pl_PL) - Polish
+pt (pt_BR) - Brazilian Portuguese
+ru (ru_RU) - Russian
+sv (sv_SE) - Swedish
+
The directory /usr/share/i18n/locales on many systems has the
-locale codes that are available on that system.
-
-language = en
-
-- iso2022jp = [ 0 | 1 ]
-- Set this to On to support ISO-2022-JP messages.
-
-iso2022jp = 0
-
-- i18n = [ 0 | 1 ]
+locale codes that are available on that system.
+
+language = en
+- iso2022jp = [ 0 | 1 ]
+- Set this to On to support ISO-2022-JP messages.
+
+iso2022jp = 0
+- i18n = [ 0 | 1 ]
- Enable I18N features, hypermail must be linked with libiconv.
-
-i18n = 1 (disabled by default)
-
-- eurodate = [ 0 | 1 ]
+"https://www.gnu.org/software/libiconv/">libiconv
.
+
+i18n = 1 (disabled by default)
+eurodate = [ 0 | 1 ]
Set this to reflect how you want dates displayed in the index
-files.
-Set as 1 to to use European date format "DD MM YYYY".
-Define as 0 to to use American date format "MM DD YYYY".
-
-eurodate = 0
-
-dateformat = strftime-date-format
-Format used in strftime(3) call for displaying dates.
-See strftime(3) for the valid conversion specifications.
-
-dateformat = "%D-%r Z" (disabled by default)
-
-isodate = [ 0 | 1 ]
+files.
+Set as 1 to to use European date format "DD MM YYYY".
+Define as 0 to to use American date format "MM DD YYYY".
+
+eurodate = 0
+dateformat = strftime-date-format
+Format used in strftime(3) call for displaying dates.
+See strftime(3) for the valid conversion specifications.
+
+dateformat = "%D-%r Z" (disabled by default)
+isodate = [ 0 | 1 ]
Set this to On to display article received dates in YYYY-MM-DD
HH:MM:SS format. If used with the gmtime option, a Z will be
-inserted between the DD and HH.
-
-isodate = 0
-
-gmtime = [ 0 | 1 ]
+inserted between the DD and HH.
+
+isodate = 0
+gmtime = [ 0 | 1 ]
Set this to On to display article received dates using
-Greenwich Mean Time (UTC) rather than local time.
-
-gmtime = 0
-
-Header options
-
-label = [ Title | NONE ]
-This is the default title you want to call your archives.
-Set this to NONE to use the name of the input mailbox.
-
-label = Hypermail Development List (default value is
+Greenwich Mean Time (UTC) rather than local time.
+
+gmtime = 0
+
+Header options
+
+- label = [ Title | NONE ]
+- This is the default title you want to call your archives.
+Set this to NONE to use the name of the input mailbox.
+
+label = Hypermail Development List (default value is
filename?????)
-
-- hmail = [ Mailing List Submission Address | NONE
-]
+- hmail = [ Mailing List Submission Address | NONE
+]
- Set this to the list's submission address. When enabled, this
can be used to submit a new message to the list served by the
-hypermail archive. "NONE" means don't use it.
-
-hmail = hypermail@hypermail.org (disabled by default)
-
-- newmsg_command = [ string ]
+hypermail archive. "NONE" means don't use it.
+
+hmail = hypermail@hypermail.org (disabled by default)
+- newmsg_command = [ string ]
- This specifies the mail command to use when converting the
set_hmail address to links in replies. The variables $TO, $SUBJECT,
-and $ID can be used in constructing the command string.
-
-newmsg_command=mailto:$TO
-
-- replymsg_command = [ string ]
+and $ID can be used in constructing the command string.
+
+newmsg_command=mailto:$TO
+- replymsg_command = [ string ]
- This specifies the mail command to use when converting the
set_hmail address to links in replies. The variables $TO, $SUBJECT,
and $ID can be used in constructing the command string. The value
from the mailcommand option will be used
-if this option is not specified.
+if this option is not specified.
There may be browsers that will benefit from adding something like
%26In-Reply-To=<$ID>
to the command, but I've heard no reports of this actually
-working.
-
-replymsg_command=mailto:$TO?Subject=$SUBJECT
-
-- inreplyto_command = [ string ]
+working.
+
+replymsg_command=mailto:$TO?Subject=$SUBJECT
+- inreplyto_command = [ string ]
- This specifies a URI template to a script that hypermail will
link to if it's unable to find in the archive's messages the MID
corresponding to an In-Reply-To header. The variable
$ID is used to specify where the Message-Identifier
-value will appear in the link.
-
-inreplyto_command = http://example.org/mid-resolver/$ID.
+value will appear in the link.
+
+inreplyto_command = https://example.org/mid-resolver/$ID.
(disabled by default)
--
-
Miscellaneous
-
-- stripsubject = [ string | NONE ]
+
+Miscellaneous
+
+ - archive_date = [ 0 | 1 ]
+ - adds a specific line in the indexes giving the date the archive was generated.
+
+ archive_date = On (disabled by default)
+- hypermail_colophon = [ 0 | 1 ]
+- adds a footnote stating the hypermail version that was used and generation date.
+
+ hypermail_colophon = On (enabled by default)
+- stripsubject = [ string | NONE ]
- A string to be stripped from all subject lines. Helps unclutter
-mailing lists which add tags to subject lines.
-
-stripsubject = NONE
-
-- mailcommand = [ direct mailto | cgi-bin script path |
-NONE ]
+mailing lists which add tags to subject lines.
+
+stripsubject = NONE
+- mailcommand = [ direct mailto | cgi-bin script path |
+NONE ]
- This is the mail command that email links go to, for instance
"mailto:$TO" or
-"/cgi-bin/mail?to=$TO&replyto=$ID&subject=$SUBJECT"
-In constructing this command, you can specify variables:
-
-$TO : the email address of the person you're sending mail to.
-$ID : the ID of the message you're replying to.
-$SUBJECT: the subject you're replying to.
-
-NONE disables mailcommand usage.
+"/cgi-bin/mail?to=$TO&replyto=$ID&subject=$SUBJECT"
+In constructing this command, you can specify variables:
+
+$TO : the email address of the person you're sending mail to.
+$ID : the ID of the message you're replying to.
+$SUBJECT: the subject you're replying to.
+
+NONE disables mailcommand usage.
There may be browsers that will benefit from adding something like
%26In-Reply-To=<$ID>
to the command, but I've heard no reports of this actually
-working.
-
-mailcommand = mailto:$TO?Subject=$SUBJECT
-
-- mailto = [ email-address | NONE ]
+working.
+
+mailcommand = mailto:$TO?Subject=$SUBJECT
+- mailto = [ email-address | NONE ]
- The address of the contact point that is put in the HTML header
-line
-<LINK REV=made HREF=mailto:mailto>
-
+line
+<LINK REV=made HREF=mailto:mailto>
+
The <LINK...> header can be disabled by default by setting
-mailto to NONE.
-
-mailto = webmaster@hypermail.org (disabled by default)
-
-- domainaddr = [ domainname | NONE ]
+mailto to NONE.
+
+mailto = webmaster@hypermail.org (disabled by default)
+- domainaddr = [ domainname | NONE ]
- Domain-ize Addresses -- addresses appearing in the RFC2822
field which lack hostname can't be made into proper HREFs. Because
the MTA resides on the same host as the list, it is often not
required to domain-ize these addresses for delivery. In such cases,
-hypermail will add the DOMAINADDR to the email address.
-
-domainaddr = hypermail.org (disabled by default)
-
-- use_sender_date = [ 0 | 1 ]
+hypermail will add the DOMAINADDR to the email address.
+
+domainaddr = hypermail.org (disabled by default)
+- use_sender_date = [ 0 | 1 ]
- Set this to On to have it use the Date: header (created by the
the system that sent the message) rather than the date/time the
message was received, for purposes such as putting in folders or
sorting. Details of which purposes this affects may change in the
-future.
-
-use_sender_date = 0
-
-- fragment_prefix = [ preifx ]
+future.
+
+use_sender_date = 0
+- fragment_prefix = [ preifx ]
- Put this string before the message number in each URI
-fragment.
-
-fragment_prefix = id (default is msg)
-
-- email_address_obfuscation = [ 0 | 1 ]
+fragment.
+
+fragment_prefix = id (default is msg)
+- email_address_obfuscation = [ 0 | 1 ]
- Set to 1 to enable email address obfuscation using numeric
-character references.
-
-mail_address_obfuscationx = 1 (disabled by default)
--
-
Index page options
-Index
+ character references.
+
+ mail_address_obfuscation = 1 (disabled by default)
+- default_css_url = [ URL | NONE ]
+- Gives the URL for the default CSS file used by hypermail if either the icss_url or mcss_url configuration options are not declared. The stylesheet will be linked to thru a
link
element in the in the document's head
.
+
+ The default value is hypermail.css (link relative to the archive).
+
+ default_css_url = https://example.org/StyleSheets/my_hypermail.css
+
+
+
Options affecting both messages and index pages
-Locale
+Locale
-
-
- -
- language = [ two-or-more-letter-language-id -] +
- language = [ two-or-more-letter-language-id +]
- This is a two-letter string specifying the default language to
use, or a longer string specifying a language and locale. Set this
the value of the language table you wish to use when running and
generating archives. See also iso2022jp
-and eurodate.
-
-Current supported languages, with their default locales:
-
-de (de_DE) - German
-en (en_US) - English
-es (es_ES) - Spanish
-fi (fi_FI) - Finnish
-fr (fr_FR) - French
-el (el) - Greek
-gr (el_GR) - Greek
-is (is_IS) - Icelandic
-no (no_NO) - Norwegian
-pl (pl_PL) - Polish
-pt (pt_BR) - Brazilian Portuguese
-ru (ru_RU) - Russian
-sv (sv_SE) - Swedish
-
+and eurodate.
+
+Current supported languages, with their default locales:
+
+de (de_DE) - German
+en (en_US) - English
+es (es_ES) - Spanish
+fi (fi_FI) - Finnish
+fr (fr_FR) - French
+el (el) - Greek
+gr (el_GR) - Greek
+is (is_IS) - Icelandic
+no (no_NO) - Norwegian
+pl (pl_PL) - Polish
+pt (pt_BR) - Brazilian Portuguese
+ru (ru_RU) - Russian
+sv (sv_SE) - Swedish
+
The directory /usr/share/i18n/locales on many systems has the -locale codes that are available on that system.
-
-language = en
- - -
- iso2022jp = [ 0 | 1 ] -
- Set this to On to support ISO-2022-JP messages.
-
-iso2022jp = 0
- - -
- i18n = [ 0 | 1 ] +locale codes that are available on that system.
- iso2022jp = [ 0 | 1 ] +
- Set this to On to support ISO-2022-JP messages.
+
+iso2022jp = 0
+ - i18n = [ 0 | 1 ]
- Enable I18N features, hypermail must be linked with libiconv.
-
-i18n = 1 (disabled by default)
- - -
- eurodate = [ 0 | 1 ] +"https://www.gnu.org/software/libiconv/">libiconv
+
+language = en +
+
+i18n = 1 (disabled by default) +
-Set as 1 to to use European date format "DD MM YYYY".
-Define as 0 to to use American date format "MM DD YYYY".
-
-eurodate = 0
-See strftime(3) for the valid conversion specifications.
-
-dateformat = "%D-%r Z" (disabled by default)
+Set as 1 to to use European date format "DD MM YYYY".
+Define as 0 to to use American date format "MM DD YYYY".
+
+eurodate = 0 +
+See strftime(3) for the valid conversion specifications.
+
+dateformat = "%D-%r Z" (disabled by default)
-
-isodate = 0
+
+isodate = 0 +
-
-gmtime = 0
Header options
--Set this to NONE to use the name of the input mailbox.
-
-label = Hypermail Development List (default value is +Greenwich Mean Time (UTC) rather than local time.
+
+gmtime = 0
Header options
+-
+
- label = [ Title | NONE ] +
- This is the default title you want to call your archives.
+Set this to NONE to use the name of the input mailbox.
+
+label = Hypermail Development List (default value is filename?????)
- - -
- hmail = [ Mailing List Submission Address | NONE -] +
- hmail = [ Mailing List Submission Address | NONE +]
- Set this to the list's submission address. When enabled, this
can be used to submit a new message to the list served by the
-hypermail archive. "NONE" means don't use it.
-
-hmail = hypermail@hypermail.org (disabled by default)
- - -
- newmsg_command = [ string ] +hypermail archive. "NONE" means don't use it.
- newmsg_command = [ string ]
- This specifies the mail command to use when converting the
set_hmail address to links in replies. The variables $TO, $SUBJECT,
-and $ID can be used in constructing the command string.
-
-newmsg_command=mailto:$TO
- - -
- replymsg_command = [ string ] +and $ID can be used in constructing the command string.
- replymsg_command = [ string ]
- This specifies the mail command to use when converting the
set_hmail address to links in replies. The variables $TO, $SUBJECT,
and $ID can be used in constructing the command string. The value
from the mailcommand option will be used
-if this option is not specified.
+if this option is not specified.
There may be browsers that will benefit from adding something like%26In-Reply-To=<$ID>
to the command, but I've heard no reports of this actually -working.
-
-replymsg_command=mailto:$TO?Subject=$SUBJECT
- - -
- inreplyto_command = [ string ] +working.
- inreplyto_command = [ string ]
- This specifies a URI template to a script that hypermail will
link to if it's unable to find in the archive's messages the MID
corresponding to an In-Reply-To header. The variable
$ID is used to specify where the Message-Identifier
-value will appear in the link.
-
-inreplyto_command = http://example.org/mid-resolver/$ID. +value will appear in the link.
+
+inreplyto_command = https://example.org/mid-resolver/$ID. (disabled by default)
- -
-
Miscellaneous
-
- - stripsubject = [ string | NONE ] +
+
+hmail = hypermail@hypermail.org (disabled by default) +
+
+newmsg_command=mailto:$TO +
+
+replymsg_command=mailto:$TO?Subject=$SUBJECT +
Miscellaneous
+-
+
- archive_date = [ 0 | 1 ] +
- adds a specific line in the indexes giving the date the archive was generated.
+
+ archive_date = On (disabled by default)
+ - hypermail_colophon = [ 0 | 1 ] +
- adds a footnote stating the hypermail version that was used and generation date.
+
+ hypermail_colophon = On (enabled by default)
+ - stripsubject = [ string | NONE ]
- A string to be stripped from all subject lines. Helps unclutter
-mailing lists which add tags to subject lines.
-
-stripsubject = NONE
- - -
- mailcommand = [ direct mailto | cgi-bin script path | -NONE ] +mailing lists which add tags to subject lines.
- mailcommand = [ direct mailto | cgi-bin script path | +NONE ]
- This is the mail command that email links go to, for instance
"mailto:$TO" or
-"/cgi-bin/mail?to=$TO&replyto=$ID&subject=$SUBJECT"
-In constructing this command, you can specify variables:
-
-$TO : the email address of the person you're sending mail to.
-$ID : the ID of the message you're replying to.
-$SUBJECT: the subject you're replying to.
-
-NONE disables mailcommand usage.
+"/cgi-bin/mail?to=$TO&replyto=$ID&subject=$SUBJECT"
+In constructing this command, you can specify variables:
+
+$TO : the email address of the person you're sending mail to.
+$ID : the ID of the message you're replying to.
+$SUBJECT: the subject you're replying to.
+
+NONE disables mailcommand usage.
There may be browsers that will benefit from adding something like%26In-Reply-To=<$ID>
to the command, but I've heard no reports of this actually -working.
-
-mailcommand = mailto:$TO?Subject=$SUBJECT
- - -
- mailto = [ email-address | NONE ] +working.
- mailto = [ email-address | NONE ]
- The address of the contact point that is put in the HTML header
-line
-<LINK REV=made HREF=mailto:mailto>
-
+line
+<LINK REV=made HREF=mailto:mailto>
+
The <LINK...> header can be disabled by default by setting -mailto to NONE.
-
-mailto = webmaster@hypermail.org (disabled by default)
- - -
- domainaddr = [ domainname | NONE ] +mailto to NONE.
- domainaddr = [ domainname | NONE ]
- Domain-ize Addresses -- addresses appearing in the RFC2822
field which lack hostname can't be made into proper HREFs. Because
the MTA resides on the same host as the list, it is often not
required to domain-ize these addresses for delivery. In such cases,
-hypermail will add the DOMAINADDR to the email address.
-
-domainaddr = hypermail.org (disabled by default)
- - -
- use_sender_date = [ 0 | 1 ] +hypermail will add the DOMAINADDR to the email address.
- use_sender_date = [ 0 | 1 ]
- Set this to On to have it use the Date: header (created by the
the system that sent the message) rather than the date/time the
message was received, for purposes such as putting in folders or
sorting. Details of which purposes this affects may change in the
-future.
-
-use_sender_date = 0
- - -
- fragment_prefix = [ preifx ] +future.
- fragment_prefix = [ preifx ]
- Put this string before the message number in each URI
-fragment.
-
-fragment_prefix = id (default is msg)
- - -
- email_address_obfuscation = [ 0 | 1 ] +fragment.
- email_address_obfuscation = [ 0 | 1 ]
- Set to 1 to enable email address obfuscation using numeric
-character references.
-
-mail_address_obfuscationx = 1 (disabled by default)
- -
-
Index page options
-Index + character references.
+
+ mail_address_obfuscation = 1 (disabled by default)
+ - default_css_url = [ URL | NONE ] +
- Gives the URL for the default CSS file used by hypermail if either the icss_url or mcss_url configuration options are not declared. The stylesheet will be linked to thru a
link
element in the in the document'shead
. +
+ The default value is hypermail.css (link relative to the archive).
+
+ default_css_url = https://example.org/StyleSheets/my_hypermail.css +
+
+
+stripsubject = NONE +
+
+mailcommand = mailto:$TO?Subject=$SUBJECT +
+
+mailto = webmaster@hypermail.org (disabled by default) +
+
+domainaddr = hypermail.org (disabled by default) +
+
+use_sender_date = 0 +
+
+fragment_prefix = id (default is msg) +
Index page options
+Index availability
- --
+
- folder_by_date = [ strftime-date-format ]
- This string causes the messages to be put in subdirectories by
date. The string will be passed to strftime(3) to generate
subdirectory names based on message dates. Suggested values are
@@ -511,131 +527,116 @@
Index "%G/%V" for weekly. Do not alter this for an existing archive without removing the old html files. If you use this and update the archive incrementally (e.g. with -u), you must use the usegdbm option.
-
-folder_by_date = %y%m (disabled by default)
- - -
- monthly_index = [ 0 | 1 ] +"#usegdbm">usegdbm option.
- monthly_index = [ 0 | 1 ]
- Set this to On to create additional index files broken up by
month. A summary.html file will provide links to all the monthly
-indices.
-
-monthly_index = 0
- - -
- msgsperfolder = integer +indices.
- msgsperfolder = integer
- Put messages in subdirectories with this many messages per
directory. Do not use this and folder_by_date on the same archive.
Do not alter this for an existing archive without removing the old
html files. Deleted/expired messages are counted
for the purpose of deciding how many messages to put in a
-subdirectory.
-
-msgsperfolder = 100 (disabled by default)
- - -
- yearly_index = [ 0 | 1 ] +subdirectory.
- yearly_index = [ 0 | 1 ]
- Set this to On to create additional index files broken up by
year. A summary.html file will provide links to all the yearly
-indices.
-
-yearly_index = 0
- - -
- defaultindex = [ thread | date | subject | author | -attachment ] +indices.
- defaultindex = [ thread | date | subject | author | +attachment ]
- This indicates the default type of main index hypermail will
generate. Users see this type of index when the archive is first
accessed. When using the folder_by_date or msgsperfolder options, this option applies to
-subdirectories.
-
-defaultindex = thread
- - -
- default_top_index = [ folders | thread | date | subject -| author | attachment ] +subdirectories.
- default_top_index = [ folders | thread | date | subject +| author | attachment ]
- This specifies the default index that users can view when
entering the top level of an archive that uses the folder_by_date or msgsperfolder option.
-
-default_top_index = folders
- - -
- avoid_indices = [ string ] +"#msgsperfolder">msgsperfolder option.
- avoid_indices = [ string ]
- This is a list of index files to not generate. Valid types are
date, thread, author, and subject. They can be listed individually
on multiple lines or comma or space separated on a single line.
When using the folder_by_date or
msgsperfolder options, this option
-applies to subdirectories.
-
-avoid_indices = subject author (disabled by default)
- - -
- avoid_top_indices = [ string ] +applies to subdirectories.
- avoid_top_indices = [ string ]
- This is a list of index files to not generate for the top
directory of an archive using the folder_by_date or msgsperfolder
option. Valid types are date, thread, author, subject, folders, and
-attachment.
-
-avoid_top_indices = date thread author subject
- - -
- attachmentsindex = [ 0 | 1 ] +attachment.
- attachmentsindex = [ 0 | 1 ]
- Set this to Off to make hypermail not output an index of
-messages with attachments.
-
-attachmentsindex = On
- - -
- latest_folder = [ string ] +messages with attachments.
- latest_folder = [ string ]
- If folder_by_date or msgsperfolder are in use, create a symbolic
link by this name to the most recently created subdirectory. Note
that many web servers are configured to not follow symbolic links
for security reasons. The link will be created in the directory
-specified by the "dir" or "-d" option.
-
-latest_folder = current (disabled by default)
- - -
- noindex_onindexes = [ 0 | 1 ] +specified by the "dir" or "-d" option.
- noindex_onindexes = [ 0 | 1 ]
- Tells hypermail to add a noindex metadata to
its generated message indexes (by author, etc.), to instruct robots
to not index the indexes. See anontated
-for further discussion on noindex.
-
+for further discussion on noindex.
+
noindex_onindexes = 0
- -
-
Index body style
-
- - indextable = [ 0 | 1 ] -
- Setting this variable to 1 will tell Hypermail to generate a
-message index Subject/Author/Date listings using a table format.
-Set to 0 if you want the standard Hypermail index page look and
-feel.
-
-indextable = 0
- - -
- reverse = [ 0 | 1 ] +
- empty_archive_notice = [ string ] +
- Message that hypermail should display in the indices if the archive
+is empty (e.g, no messages, or all messages marked as deleted or spam),
+If not set, hypermail will use a default localized message.
+
+empty_archive_notice = "(no messages are available in this archive)"
+
+
+folder_by_date = %y%m (disabled by default) +
+
+monthly_index = 0 +
+
+msgsperfolder = 100 (disabled by default) +
+
+yearly_index = 0 +
+
+defaultindex = thread +
+
+default_top_index = folders +
+
+avoid_indices = subject author (disabled by default) +
+
+avoid_top_indices = date thread author subject +
+
+attachmentsindex = On +
+
+latest_folder = current (disabled by default) +
Index body style
+-
+
- reverse = [ 0 | 1 ]
- Setting this variable to 1 will reverse-sort the article
entries in the date and thread index files by the date they were
received. That is, the most recent messages will appear at the top
of the index rather than the other way around. Set to 0 if you want
-latest message on the bottom for date and thread indexes.
-
-reverse = 0
- - -
- reverse_folders = [ 0 | 1 ] +latest message on the bottom for date and thread indexes.
- reverse_folders = [ 0 | 1 ]
- Setting this variable to On will reverse-sort the list of
folders. That is, the most recent folders will appear at the top of
-the index rather than the other way around.
-
-reverse_folders = 0
- - -
- thrdlevels = number +the index rather than the other way around.
- thrdlevels = number
- This specifies the number of thread levels to outline in the
thread index. For instance, if thrdlevels is 2, replies to messages
will be indented once in the index, but replies to replies, etc.,
-will only be indented once as well. The normal value is 4.
-
-thrdlevels = 4
- - -
- thread_file_depth = [ 0 | 1 ] +will only be indented once as well. The normal value is 4.
- thread_file_depth = [ 0 | 1 ]
- If nonzero, break the threads index file into multiple files,
with the initial message of each thread in the main index file
along with links to files containing the replies. Setting this to 1
@@ -643,336 +644,342 @@
Index body style
recommended for archives with over a few hundred messages. Setting this greater than 1 will produce multiple levels of files for each thread whose replies are nested by more than 1 level, but that is -rarely useful. This option is currently disabled if the indextable -option is turned on, and probably needs to be less than -thrdlevels.
-
-thread_file_depth = 0
- - -
- icss_url= [ URL | NONE ] +rarely useful.
- icss_url = [ URL | NONE ]
- This option let's you specify an external stylesheet that you
-would like to link to the index files. The stylesheet will be
-linked to thru a LINK element in the HEAD in the document's
-HEAD.
-By default, this option is deactivated.
-
-icss_url = -http://www.w3.org/StyleSheets/Mail/public-messagelist.css
- - -
- describe_folder = format string + would like to link to the index files. The stylesheet will be + linked to thru a
- describe_folder = format string
- Controls the labels used in folders.html to describe the
directories created by the folder_by_date or msgsperfolder options. For folder_by_date
labels, the describe_folder string will be passed to strftime(3)
-the same as the folder_by_date string.
-For msgsperfolder:
-%d for the directory number (starts with 0)
-%D for the directory number (starts with 1)
-%m for the number of the first message in the directory
+the same as the folder_by_date string.
+For msgsperfolder:
+%d for the directory number (starts with 0)
+%D for the directory number (starts with 1)
+%m for the number of the first message in the directory
%M for the number of the last message that can be put in the -directory.
+directory.
The default is the value of folder_by_date if that is selected, -"%d" for msgsperfolder.
-
-describe_folder = "%b %Y"
- -
-
Index headers/footers
-
- - archives = [ URL | NONE ] +"%d" for msgsperfolder.
+
+reverse = 0 +
+
+reverse_folders = 0 +
+
+thrdlevels = 4 +
+
+thread_file_depth = 0 +
link
element in the in the document's
+ head
. If this option is not configured, indexes will use the value of the
+ default_css_url
.+ By default, this option is inactive.
+
+icss_url = +https://example.org/StyleSheets/index.css +
+
+describe_folder = "%b %Y" +
Index headers/footers
+-
+
- archives = [ URL | NONE ]
- This creates a link in the archived index pages labeled "Other
-mail archives". Set this to NONE to omit such a link.
-
-archives = NONE
- - -
- custom_archives = [ HTML text | NONE ] +mail archives". Set this to NONE to omit such a link.
- custom_archives = [ HTML text | NONE ]
- If this variable is defined, a navigation entry will be created
below the sorted_by_x list entry, with the text "Other mail
archives: " followed by the value of this variable. Set it to NONE
-to ommit such an entry.
-
-custom_archives = NONE
- - -
- about = [ URL | NONE ] +to ommit such an entry.
- about = [ URL | NONE ]
- This creates a link in the archived index pages labeled "About
-this archive". Set this to NONE to omit such a link.
-
-about = NONE
- - -
- ihtmlheaderfile = [ path to index header template file -| NONE ] +this archive". Set this to NONE to omit such a link.
- ihtmlheaderfile = [ path to index header template file +| NONE ]
- Set this to the path to the Index header template file. The
template file contains HTML directives and substitution cookies for
-runtime expansion.
-
-ihtmlheaderfile = /lists/hypermail-idxheader.hyp (disabled +runtime expansion.
+
+ihtmlheaderfile = /lists/hypermail-idxheader.hyp (disabled by default)
- - -
- ihtmlfooterfile = [ path to index footer template file -| NONE ] +
- Set this to the path to the Index footer template file. The
template file contains HTML directives and substitution cookies for
-runtime expansion.
-
-ihtmlfooterfile = /lists/hypermail-idxfooter.hyp (disabled +runtime expansion.
+
+ihtmlfooterfile = /lists/hypermail-idxfooter.hyp (disabled by default)
- -
-
Message page options
-Body style
-
- - showhtml = [ 0 | 1 | 2 ] +
+
+archives = NONE +
+
+custom_archives = NONE +
+
+about = NONE +
Message page options
+Body style
+-
+
- showhtml = [ 0 | 1 | 2 ]
- Set this to 1 to show the articles in a proportionally-spaced
font rather than a fixed-width (monospace) font. Setting this
option to 1 also tells Hypermail to attempt to italicize quoted
-passages in articles.
+passages in articles.
Set this to 2 for more complex conversion to html similar to that in txt2html.pl.
-Showhtml = 2 will normally produce nicer looking results than
-showhtml = 1, and showhtml = 0 will look pretty dull, but
-1 and 2 run risks of altering the appearance in undesired ways.
-
-showhtml = 1
- - -
- href_detection = [ 0 | 1 ] +"https://www.cs.wustl.edu/~seth/txt2html/">txt2html.pl.
- href_detection = [ 0 | 1 ]
- Set this to 1 to assume that any string on the body of the
message that says <A HREF=" ... </A> is a URL, together
-with its markup and treat it as such.
-
-href_detection = 0
- - -
- showbr = [ 0 | 1 ] +with its markup and treat it as such.
- showbr = [ 0 | 1 ]
- Set this to 1 if you want article lines to end with the
<br> tag. Else set to 0 to have non-quoted lines word-wrap.
-Only takes effect if showhtml is set to 1.
-
-showbr = 1
- - -
- iquotes = [ 0 | 1 ] -
- Set this to 1 if you want quoted lines to be shown in italics.
-Only take effect if showhtml is set to 1.
-
-iquotes = 1
- - -
- i18n_body = [ 0 | 1 ] -
- Translate message body into UTF-8. The i18n
-configuration option must be enabled.
-
-i18n_body = 1 (disabled by default)
- - -
- mcss_url= [ URL | NONE ] +Only takes effect if showhtml is set to 1.
- iquotes = [ 0 | 1 ] DEPRECATED, use css .quote rule instead +
- Set this to 1 if you want quoted lines to be shown in italics.
+Only take effect if showhtml is set to 1.
+
+iquotes = 1
+ - i18n_body = [ 0 | 1 ] +
- Translate message body into UTF-8. The i18n
+configuration option must be enabled.
+
+i18n_body = 1 (disabled by default)
+ - mcss_url = [ URL | NONE ]
- This option let's you specify an external stylesheet that you
would like to link to the message files. The stylesheet will be
-linked to thru a LINK element in the HEAD in the document's HEAD.
-By default, this option is inactive.
-
-mcss_url = -http://www.w3.org/StyleSheets/Mail/public-message.css
- - -
- quote_hide_threshold = percent (integer) -
- If the linkquotes option is on,
+ linked to thru a
link
element in the in the document'shead
. +If this option is not configured, messages will use the value of the +default_css_url
.
+ By default, this option is inactive.
+
+mcss_url = +https://example.org/StyleSheets/message.css
+ - quote_hide_threshold = percent (integer) +
- If the linkquotes option is on
setting this to an integer less than 100 will cause it to replace
quoted text with one-line links if the percent of lines in the
message body (exluding the signature) consisting of quoted text
-exceeds the number indicated by this option.
-
-quote_hide_threshold = 100
- - -
- files_by_thread = [ 0 | 1] +exceeds the number indicated by this option.
- files_by_thread = [ 0 | 1]
- Set this to 1 to generate (in addition to the usual files), a
file for each thread that contains all the messages in that thread.
The first line in each thread of the thread index page links to
-this file instead of to a single message.
-
-files_by_thread = 0
- -
-
Message page links
-
- - linkquotes = [ 0 | 1 ] -
- Set this to On to create fine-grained links from quoted text to
+this file instead of to a single message.
+
+files_by_thread = 0
+
+Showhtml = 2 will normally produce nicer looking results than
+showhtml = 1, and showhtml = 0 will look pretty dull, but
+1 and 2 run risks of altering the appearance in undesired +ways.
+
+showhtml = 1 +
+
+href_detection = 0 +
+
+showbr = 1 +
+
+quote_hide_threshold = 100 +
Message page links
+-
+
- linkquotes = [ 0 | 1 ] +
- NOTE: this option has not been working
+well since 2.4.0 and should now be considered experimental.
+It may be deprecated in the next version of hypermail.
+Set this to On to create fine-grained links from quoted text to the text where the quote originated. It also improves the threads index file by more accurately matching messages with replies. Note that this may be rather cpu intensive (see the searchbackmsgnum option to alter the -performance).
-
-linkquotes = 0
- - -
- searchbackmsgnum = postive integer +performance).
- searchbackmsgnum = postive integer
- If the linkquotes option is on and an
incremental update is being done (-u option), this controls the
tradeoff between speed and the reliability of finding the right
source for quoted text. Try to set it to the largest number of
messages between a message and the final direct reply to that
-message.
-
-searchbackmsgnum = 500
- - -
- link_to_replies = [ string | NONE] +message.
- link_to_replies = [ string | NONE]
- If the linkquotes option is on,
specifying a string here causes it to generate links from original
quoted text the location(s) in replies which quote them. The string
-is used to display the link.
-
-link_to_replies = NONE
- - -
- quote_link_string = [ string | NONE ] +is used to display the link.
- quote_link_string = [ string | NONE ]
- If the quote_hide_threshold
option is being used, the quote_link_string will be used if
available to display the link that replaces the quoted text. If no
string is specified here, the first line of each section of quoted
-text will used.
-
-quote_link_string = NONE
- - -
- spamprotect = [ 0 | 1 ] +text will used.
- spamprotect = [ 0 | 1 ]
- Set this to On to make hypermail not output real email
addresses in the output HTML but instead it will obfuscate them a
little. You can control the obfuscation with antispamdomain.
-
-spamprotect = On
- - -
- antispamdomain = string with invalid -domain +"#antispamdomain">antispamdomain.
- antispamdomain = string with invalid +domain
- By default the spamprotect option only does a small amount of
massaging of email addresses. Use this to completely replace the
domain from which a message originates (everything after the @)
with some string to confuse screen-scraping programs. It is
-probably wise to make this an invalid mail domain.
-
-antispamdomain = "email.domain.hidden" (disabled by +probably wise to make this an invalid mail domain.
+
+antispamdomain = "email.domain.hidden" (disabled by default)
- - -
- spamprotect_id = [ 0 | 1 ] +
- spamprotect_id = [ 0 | 1 ]
- Set this to On to make hypermail not output real email message
ids in HTML comments (sometimes used internally by hypermail) but
instead it will obfuscate them a little so they don't look like
-email addresses to spammers.
-
-spamprotect_id = On
- -
-
Message page +email addresses to spammers.
+
+spamprotect_id = On
+
+
+linkquotes = 0 +
+
+searchbackmsgnum = 500 +
+
+link_to_replies = NONE +
+
+quote_link_string = NONE +
+
+spamprotect = On +
Message page headers/footers
- --
+
- showreplies = [ 0 | 1 ]
- Set to 1 to show all replies to a message as links in article
-files. If this is set to 0 no reply links are generated.
-
-showreplies = 1
- - -
- show_msg_links = [ 0 | 1 | 3 | 4 ] +files. If this is set to 0 no reply links are generated.
- show_msg_links = [ 0 | 1 | 3 | 4 ]
- Set this to 1 if you want links to Next, Prev, Next thread,
Reply to, etc. displayed on the article pages. Setting this to 0
disables these links from appearing on the generated pages. Set it
to 3 to produce those links only at the top of the message pages,
-or 4 to produce those links only at the bottom of the message.
-
-show_msg_links = 1
- - -
- show_index_links = [ 0 | 1 | 3 | 4 ] +or 4 to produce those links only at the bottom of the +message.
- show_index_links = [ 0 | 1 | 3 | 4 ]
- Set this to 1 to show links to index pages from the top and
bottom of each message file. Set it to 0 to avoid those links. Set
it to 3 to show the links only at the top of the message pages, or
-4 to produce those links only at the bottom of the message.
-
-show_index_links = 1
- - -
- showheaders = [ 0 | 1 ] +4 to produce those links only at the bottom of the message.
- showheaders = [ 0 | 1 ]
- Set this to 1 to show the RFC 2822 message headers To:, From:,
and Subject: information found in the email messages. Set to 0 if
-you want to hide mail headers in articles.
-
-showheaders = 0
- - -
- show_headers = List of RFC 2822 Headers to -display +you want to hide mail headers in articles.
- show_headers = List of RFC 2822 Headers to +display
- This is the list of headers to be displayed if showheaders is
set to 1 (TRUE) They can be listed comman or space separated all on
-a single line such as
+a single line such as
show_headers = -From,Subject,Date,Message-ID
-
-or they can be listed individually or any combination of.
-
- show_headers = From
- show_headers = Subject
- show_headers = Date
- show_headers = Message-ID
-
+From,Subject,Date,Message-ID
+
+or they can be listed individually or any combination of.
+
+ show_headers = From
+ show_headers = Subject
+ show_headers = Date
+ show_headers = Message-ID
+
If show_headers contains the special character ``*'', then -hypermail will display all header lines.
+hypermail will display all header lines.
NOTE: Do not put the ':' at the end of the -headers.
-
-show_headers = From,Subject,Date,Message-ID (disabled by +headers.
+
+show_headers = From,Subject,Date,Message-ID (disabled by +default)
+ - show_headers_msg_rfc822 = List of RFC 2822 Headers to + display in message/rfc822 attachments +
- This option is identical to show_headers but only
+applies to message/rfc822 attachments. If it is not defined, hypermail will use
+ show_headers for message/rfc822 attachments.
+
+show_headers_message_rfc822 = From,Subject,Date,Message-ID,Archived-At (disabled by default)
- - -
- format_flowed [ 0 | 1 ] (EXPERIMENTAL) +
- format_flowed [ 0 | 1 ] (EXPERIMENTAL)
- Enable this option to support RFC 3676 format=flowed. When this
option is enabled and a message says it is supporting
format=flowed, hypermail will recreate a long-line that has been
-split into multiple lines as a single one.
-
+split into multiple lines as a single one.
+
format_flowed = 1 (disabled by default)
- - -
- format_flowed_disable_quoted [ 0 | 1 ] +
- format_flowed_disable_quoted [ 0 | 1 ]
- Use this option if you want to disable support for
format=flowed inside quoted text (the lines starting with one or
more '>' characters). This option is always disabled if
-format_flowed is not enabled.
-
+format_flowed is not enabled.
+
format_flowed_disable_quoted = 1 (disabled by default)
- - -
- mhtmlheaderfile = [ path to message header template -file | NONE ] +
- mhtmlheaderfile = [ path to message header template +file | NONE ]
- Set this to the path to the Message header template file. The
template file contains HTML directives and substitution cookies for
-runtime expansion.
-
-mhtmlheaderfile = /lists/hypermail-msgheader.hyp (disabled +runtime expansion.
+
+mhtmlheaderfile = /lists/hypermail-msgheader.hyp (disabled by default)
- - -
- mhtmlfooterfile = [ path to message footer template -file | NONE ] +
- Set this to the path to the Message footer template file. The
-template file contains HTML directives and substitution cookies for
-runtime expansion.
-
-mhtmlfooterfile = /lists/hypermail-msgfooter.hyp (disabled -by default)
- -
-
Attachments
-
- - inlinehtml [ 0 | 1 ] + template file contains HTML directives and substitution cookies for + runtime expansion.
- Set this to the path to a template file containing
+ valid HTML formatting statements that you wish to be
+ included as information in each archived message,
+ giving links to the hierarchy of your archive.
+ By default uses the value ofihtmlnavbar2upfile
,
+ Ifmhtmlnavbar2upfile
and ihtmlnavbar2upfile + are unspecified, hypermail will use the following breadcrumb + that will use the archive'slabel
and link to the default + index of the archive:
++ <ul> + <li><a href="./index.html" rel="start"><em>label for the archive</em></a></li> + </ul> +
+ mhtmlnavbar2upfile = /lists/hypermail-navbar2upfile.hyp (disabled + by default)
+
+
+showreplies = 1 +
+
+show_msg_links = 1 +
+
+show_index_links = 1 +
+
+showheaders = 0 +
+
+ mhtmlfooterfile = /lists/hypermail-msgfooter.hyp (disabled + by default) + + +
Attachments
+-
+
- inlinehtml [ 0 | 1 ]
- Define to On to make text/html parts to get inlined with the
mails. If set to Off, HTML-parts will be stored as separate files.
A "Content-Disposition: attachment;" line in the mail will cause an
HTML-part to be stored as a separate file even if this option is
-On.
-
-inlinehtml = 1
- - -
- usemeta [ 0 | 1 ] +On.
- usemeta [ 0 | 1 ]
- This option allows you to use metadata to store the content
type of a MIME attachments and, later on, when a user browses the
attachment, send back this information in the HTTP Content-Type
header. When set to 1, the Content-Type header of
-a MIME attachment will be stored in a metadata file.
+a MIME attachment will be stored in a metadata file.
Let us say that the MIME attachments for a message are stored in directory att-num. The metadata for those attachments will then be stored in directory att-num/.meta. If a MIME attachment is stored in file att-file, its metadata will be stored in file att-file.meta. This convention is directly -compatible with the Apache server handling of metadata.
-
-usemeta = 0
- - -
- userobotmeta [ 0 | 1 ] +compatible with the Apache server handling of metadata.
- userobotmeta [ 0 | 1 ]
- If a message has annotations for robots and usemeta is enabled, setting this option to
1 will associate the value of the annotations to
@@ -980,85 +987,95 @@
Attachments
X-Robots-Tag HTTP header. For more information, browse Google's -Robots Meta Tag documentation.
-
+Robots Meta Tag documentation.
+
userobotmeta = 0
- - -
- text_types = list of types to be the same as -text/plain +
- text_types = list of types to be the same as +text/plain
- This is a list of MIME types that you want hypermail to treat
exactly as if they were text/plain. They can be listed individually
-on multiple lines or comma or space separated on a single line.
-
-text_types = text, text/plain, message/rfc2822 (disabled by +on multiple lines or comma or space separated on a single +line.
+
+text_types = text, text/plain, message/rfc2822 (disabled by default)
- - -
- inline_types = indicate data types data to be -inlined +
- inline_types = indicate data types data to be +inlined
- This is the list of MIME types that you want inlined as opposed
to simply linked into the message. They can be listed individually
-on multiple lines or comma or space separated on a single line.
-
+on multiple lines or comma or space separated on a single +line.
+
inline_types = image/gif -image/jpeg
-or
- inline_types = image/gif
- inline_types = image/jpeg
-
-inline_types = image/gif image/jpeg
- - -
- inline_addlink = [ 0 | 1 ] +image/jpeg
- inline_addlink = [ 0 | 1 ]
- Set to On to add inline links to content that is stored in the\
attachments subdirectory. inline_types must be
-enabled.
-
-inline_addlink = 1 (enabled by default)
- - -
- prefered_types = multipart/mixed types to -present +enabled.
- prefered_types = multipart/mixed types to +present
- When mails using multipart/mixed or multipart/alternative types
are scanned, this list of MIME types defines which part you want
-presented in the result.
-
-prefered_types = text/plain, text/html
- - -
- ignore_types = indicate types of attachments to -ignore +presented in the result.
- ignore_types = indicate types of attachments to +ignore
- This is the list of MIME attachment types that you do not want
to do anything with. They are quietly ignored and are not
processed. They can be listed individually on multiple lines or
comma or space separated on a single line.
-
Two special types may be used here:
+Two special types may be used here:
-
$BINARY - ignore all types that would be stored as separate -files.
+files.
$NONPLAIN - ignore all types not treated as text/plain, and all -$BINARY types.
+$BINARY types.
Note: the behavior of these may be affected by the inlinehtml option.
+
+application/x-msdownload
ignore_types = text/x-vcard -application/x-msdownload
-or
- ignore_types = text/x-vcard
+application/x-msdownload
+or
+ ignore_types = +text/x-vcard
ignore_types = -application/x-msdownload
-
-ignore_types = text/x-vcard
-ignore_types = application/x-msdownload
+
+ignore_types = text/x-vcard
+ignore_types = application/x-msdownload
- - -
- attachmentlink = attachment-link-format -
- Format of the attachment links.
-
-%p for the full path to the attachment
-%f for the file name part only
-%d for the directory name only
-%n for the message number
-%c for the content type string
-
-attachmentlink = "%p"
- - -
- applemail_mimehack [ 0 | 1 ] +
- ignore_content_disposition = indicate types + of attachments for which you want to ignore the Content-Disposition +header +
- This is the list of MIME attachment types for which you do not want
+to honor an associated Content-Disposition header (thus making them inline by default).
+The header is silenty ignored and is not parsed.
+The MIME types can be listed individually on multiple lines or +comma or space separated on a single line.
+This option is useful when dealing with broken UA, such as early Apple Mail +clients that associated Content-Disposition: attachment with +multipart/appledouble. Later on, Apple fixed this and either used +Content-Disposition: inline or discarded this header entirely.
+
+ignore_content_disposition = multipart/appledouble (disabled by default)
+ - attachmentlink = attachment-link-format +
- Format of the attachment links.
+
+%p for the full path to the attachment
+%f for the file name part only
+%d for the directory name only
+%n for the message number
+%c for the content type string
+
+attachmentlink = "%p"
+ - applemail_mimehack [ 0 | 1 ]
- In a multipart/alternative message, Apple Mail (as of
June/2018) is only adding attachments to the text/html related
part. Set this option to On to force the display of all alternate
@@ -1066,10 +1083,9 @@
Attachments
only a text/plain and a text/html alternatives and the preference is for text/plain, the text/html alternative won't be displayed. This option won't be taken into account if your prefered type is -text/html or if you enabled the save_alts option.
-applemail_mimehack = 0 (disabled by default)
- - -
- unsafe_chars = list of chars to prohibit +text/html or if you enabled the save_alts option.
- unsafe_chars = list of chars to prohibit
- Any characters listed in this string are removed from
user-specified attachment filenames. Those characters will be
replaced by a "_" (which means that specifying "_" here won't have
@@ -1079,64 +1095,72 @@
Attachments
prevented if you specify "." here (e.g. if a web server is configured to enable server side includes on filenames ending in something other than .shtml), but that will prevent browsers from -recognizing many file types.
-
-unsafe_chars = "." (disabled by default)
- - -
- save_alts = [ 0 | 1 | 2 ] +recognizing many file types.
- save_alts = [ 0 | 1 | 2 ]
- This controls what happens to alternatives (other than the
-prefered alternative) for multipart/alternative messages.
-0 - discard non-prefered alternatives
-1 - show all alternatives inline
-2 - put non-prefered alternatives in a separate file.
-
-save_alts = 0
- - -
- alts_text = descriptive text +prefered alternative) for multipart/alternative messages.
- alts_text = descriptive text
- If save_alts is 1, this text is put between the
-alternatives.
+alternatives.
If save_alts is 2, this text is used to describe the link to each -alternative file.
-
-alts_text = "alternate version of message" (the default if -save_alts = 2)
-alts_text = "<hr>" (the default if save_alts = 1)
- -
-
System administration
-Message input
-
- - increment = [ -1 | 0 | 1 ] -
+alternative file.
+
+alts_text = "alternate version of message" (the default if +save_alts = 2)
+alts_text = "<hr>" (the default if save_alts = 1)
+- max_attachments_per_message = positive integer +
- This specifies the maximum number of attachments that will be
+ processed for a message. Any attachments beyond this limit
+ will be ignored.
+ Set to0
to remove this limit.
+ Note that if you remove this limit or set it too high, + memory usage may increase when parsing a message made up + of hundreds of attachments.
+
+ max_attachments_per_message = 30 (set to200
by default) +
+
+
+inlinehtml = 1 +
+
+usemeta = 0 +
+or
+ inline_types = image/gif
+ inline_types = image/jpeg
+
+inline_types = image/gif image/jpeg +
+
+inline_addlink = 1 (enabled by default) +
+
+prefered_types = text/plain, text/html +
+applemail_mimehack = 0 (disabled by default) +
+
+unsafe_chars = "." (disabled by default) +
+0 - discard non-prefered alternatives
+1 - show all alternatives inline
+2 - put non-prefered alternatives in a separate file.
+
+save_alts = 0 +
System administration
+Message input
+-
+
- increment = [ -1 | 0 | 1 ] +
Define as 1 to append all input messages to the end of existing -archives.
+archives.
Define as 0 for it to read a mailbox that corresponds to the entire archive. (See the mbox_shortened option for an exception to the requirement that it be the entire archive). If there are any existing html messages, it will figure out which ones at the end of the mailbox are new, and add only -those that haven't been converted yet.
+those that haven't been converted yet.
Define as -1 to have hypermail figure out whether the input is entirely new messages to be appended or whether it contains messages that are already in the archive. A value of -1 cannot be used with the mbox_shortened option or with the -i command line -option or with mbox = NONE.
-
-increment = 0
-- -
- readone = [ 0 | 1 ] +option or with mbox = NONE.
- readone = [ 0 | 1 ]
- Set this to 1 to specify there is only one message in the
-input.
-
-readone = 0
- - -
- mbox = [ filename | NONE ] +input.
- mbox = [ filename | NONE ]
- This is the default mailbox to read messages in from. Set this
with a value of NONE to read from standard input as the
-default.
-
-mbox = NONE
- - -
- mbox_shortened = [ 0 | 1 ] +default.
- mbox_shortened = [ 0 | 1 ]
- Set this to 1 to enable use of mbox that has had some of its
initial messages deleted. Requires usegdbm = 1 and increment = 0.
The first message in the shortened mbox must have a Message-Id
@@ -1145,195 +1169,181 @@
Message input
Message-Id as a message that was deleted. The mbox may not be altered in any way other than deleting from beginning of the mbox or appending new messages to the end (unless you rebuild the -archive from scratch using a complete mbox).
-
-mbox_shortened = 0
- - -
- ietf_mbox = [ 0 | 1 ] +archive from scratch using a complete mbox).
- ietf_mbox = [ 0 | 1 ]
- Setting this variable to 1 will tell hypermail that the mbox is
formatted according to the IETF mbox convention: all lines, except
-for the envelope, are prefixed with a > char.
-
-ietf_mbox = 0
- - -
- discard_dup_msgids = [ 0 | 1 ] +for the envelope, are prefixed with a > char.
- discard_dup_msgids = [ 0 | 1 ]
- Set this to 0 to accept messages with a Message-ID matching
that of a message already in this archive. By default such messages
-are discarded.
-
-discard_dup_msgids = 1
- - -
- require_msgids = [ 0 | 1 ] +are discarded.
- require_msgids = [ 0 | 1 ]
- Set this to 0 to accept messages without a Message-ID
-header.
-Set this to 1 to discard messages without a Message-ID header.
-By default such messages are discarded.
-
-require_msgids = 1
- -
-
Message Filtering
-Regular expression support is provided by the PCRE library package, which is +header.
+Set this to 1 to discard messages without a Message-ID +header.
+By default such messages are discarded.
+
+require_msgids = 1
+
+
+increment = 0 +
+
+readone = 0 +
+
+mbox = NONE +
+
+mbox_shortened = 0 +
+
+ietf_mbox = 0 +
+
+discard_dup_msgids = 1 +
Message Filtering
+Regular expression support is provided by the PCRE library package, which is open source software, written by Philip Hazel, and copyright by the -University of Cambridge, England. +University of Cambridge, England.
The full body searches can be slow, and do not match multi-line -strings in message bodies. A string that spans multiple lines of a -header can be matched.
- - --
+
- filter_out = expression
- Delete from the html archives any message having a header line
which matches any of these expressions. Uses the same rules for
deletion as the expires option. The expressions use the same syntax
as Perl regular expressions.
The following examples should reject messages Cc'd to more than 3 addresses or from any address at spammers.com. This option is -disabled by default.
+disabled by default.
-
-filter_out=Cc:([^,]*,){3}
-filter_out=From:.+@spammers.com
+
+filter_out=Cc:([^,]*,){3}
+filter_out=From:.+@spammers.com
- - -
- filter_require = expression +
- filter_require = expression
- Delete from the html archives any message not having header
lines which match each of these expressions. Uses the same rules
for deletion as the expires option. The expressions use the same
-syntax as Perl regular expressions.
-
-filter_require =
- - -
- filter_out_full_body = expression +syntax as Perl regular expressions.
- filter_out_full_body = expression
- Delete from the html archives any message having a line which
matches any of these expressions. Uses the same rules for deletion
as the expires option. The expressions use the same syntax as Perl
-regular expressions.
-
-filter_out_full_body =
- - -
- filter_require_full_body = expression +regular expressions.
- filter_require_full_body = expression
- Delete from the html archives any message not having lines
which match each of these expressions. Uses the same rules for
deletion as the expires option. The expressions use the same syntax
-as Perl regular expressions.
-
-filter_require_full_body =
- -
-
Filesystem output
-
- - dir = [ directory path | NONE ] +as Perl regular expressions.
+
+filter_require = +
+
+filter_out_full_body = +
+
+filter_require_full_body = +
Filesystem output
+-
+
- dir = [ directory path | NONE ]
- This is the default directory that Hypermail uses when creating
and updating archives. If set to NONE, the directory will have the
-same name as the input mailbox.
+same name as the input mailbox.
Note that the date that Hypermail was run will be used, not a date from the message (use the folder_by_date option to have Hypermail use -dates from messages).
-
-dir = NONE
- - -
- overwrite = [ 0 | 1 ] -
- Set to 1 to make Hypermail rewrite all messages.
-Set to 0 to rewrite as few messages as possible.
+dates from messages).
+
+dir = NONE
+ - overwrite = [ 0 | 1 ] +
- Set to 1 to make Hypermail rewrite all messages.
+Set to 0 to rewrite as few messages as possible.
Rewriting all messages is slower, but if you change the options that control the appearance of the messages you may want to rewrite all the messages to make the appearance consistent throughout the archive. (This defaulted to 1 for most versions 2.0 through 2.1.3, presumably to encourage archives that upgraded to have a single -style. The default was changed back to 0 after 2.1.3).
-
-overwrite = 0
- - -
- htmlsuffix = [ html | htm | shtml ... ] +style. The default was changed back to 0 after 2.1.3).
- htmlsuffix = [ html | htm | shtml ... ]
- Use this to specify the html file suffix to be used when
Hypermail generates the html files. This is dependent on local
needs. Do not put a '.' in the value. It would result in
-"file..html", probably not what you want.
-
-htmlsuffix = shtml
- - -
- dirmode = octal number +"file..html", probably not what you want.
- dirmode = octal number
- This is an octal number representing the rwx modes that new
directories are set to when they are created. If the archives will
be made publically available, it's a good idea to define this as
-0755. This must be an octal number.
-
-dirmode = 0755
- - -
- filemode = octal number +0755. This must be an octal number.
- filemode = octal number
- This is an octal number representing the permission modes that
new files are set to when they are created. If the archives will be
made publically available, it's a good idea to define this as 0644.
-This must be an octal number.
-
-filemode = 0644
- - -
- filename_base = [ string ] +This must be an octal number.
- filename_base = [ string ]
- This option overrides the normal rules for creating attachment
file names, and creates file names from the string that this option
is set to plus a file name extension if one can be found in the
name supplied by the message. This option is mainly for languages
-that use different character sets from English.
-
-filename_base = attachment (disabled by default)
- -
-
System miscellaneous
-
- - usegdbm = [ 0 | 1 ] +that use different character sets from English.
+
+overwrite = 0 +
+
+htmlsuffix = shtml +
+
+dirmode = 0755 +
+
+filemode = 0644 +
+
+filename_base = attachment (disabled by default) +
System miscellaneous
+-
+
- usegdbm = [ 0 | 1 ]
- Set this to 1 to use gdbm to implement a header cache. This
will speed up hypermail, especially if your filesystem is slow. It
will not provide any speedup with the linkquotes option.
-
-usegdbm = 0
- - -
- writehaof = [ 0 | 1 ] +"#linkquotes">linkquotes option.
- writehaof = [ 0 | 1 ]
- Set this to On to let hypermail write an XML archive overview
-file in each directory. The filename is archive_overview.haof.
-
-writehaof = 0
- - -
- append = [ 0 | 1 ] +file in each directory. The filename is +archive_overview.haof.
- append = [ 0 | 1 ]
- Set this to On to maintain a parallel mbox archive. The file
-name defaults to mbox in the directory specified by -d or dir.
-
-append = 1
- - -
- append_filename = [ string ] +name defaults to mbox in the directory specified by -d or +dir.
- append_filename = [ string ]
- Specifies the filename to be used by the append option. $DIR may
be used to specify a name relative to the directory specified in the
-d or dir option. The string will be passed to strftime(3) to allow
splitting the mailbox into yearly or monthy files, such as
-"%Y-%m.mbox".
-
-append_filename = $DIR/INBOX
- - -
- txtsuffix = [ string ] +"%Y-%m.mbox".
- txtsuffix = [ string ]
- If you want the original mail messages archived in individual
files, set this to the extension that you want these messages to
-have (recommended value: txt).
-
-txtsuffix = txt (off by default)
- - -
- annotated = list of headers used to indicate -deletion +have (recommended value: txt).
- annotated = list of headers used to indicate +deletion
- This is the list of headers that indicate that a message
contains an annotation. Options disabled by
-default.
-
+default.
+
In an annotated message, the values of the header specify the type of annotations. The header may have one or more comma-separated values. Order and case are not important. Hypermail recognizes two types of annotations: content and -robot annotations.
-
+robot annotations.
+
Content annotations give information to the reader about how an archive maintainer has operated on an original received message. This operation typically happens as a belated action, for example, when removing spam from an existing archive. Content annotations can have one, and only one, of the following -values:
+values:
- spam
- message deleted because it is spam; @@ -1342,7 +1352,7 @@
- edited
- original received message was manually edited.
System miscellaneous
+
If a message specifies more than one content annotation, only the first one will be taken into account. You can customize the markup that\'s shown for content annotations by means of the System miscellaneous htmlmessage_deleted_spam, and htmlmessage_edited directives. See also the delete_level -option for more info about what happens to a deleted message.
-
+option for more info about what happens to a deleted message.
+
Robot annotations instruct a visiting web robot if a the contents of a message should be indexed and/or if the outgoing links from the message should be followed, doing so thru a specific HTML meta tag (browse About the Robots <META> tag -for further details).
+"https://www.robotstxt.org/">About the Robots <META> tag +for further details).
Robot annotations can have either one or both of the following values:-
@@ -1366,91 +1376,85 @@
- noindex
- don't index this message.
System miscellaneous
+
You can use one or both robot annotation values and combine them with the edited content annotation. Note that spam and deleted annotations have an implicit robot noindex annotation. In such case, user supplied robot annotations values will be silently -ignored.
-
+ignored.
+
Use userobotmeta for associating -attachments with annotations for robots.
-
+attachments with annotations for robots.
+
Note that the list maintainer must be careful on whether to accept incoming messages containing the annotated header. If the policy is not to allow that header on incoming messages, it must be filtered out before the message is stored or acted upon by -hypermail.
-
-In an hmrc file:
-annotated = X-Hypermail-Annotated (off by default)
-In a message:
+hypermail.
+
+In an hmrc file:
+annotated = X-Hypermail-Annotated (off by default)
+In a message:
X-Hypermail-Annotated: edited, noindex
- - -
- deleted = list of headers used to indicate -deletion [DEPRECATED] +
- deleted = list of headers used to indicate + deletion DEPRECATED, replaced by annotated
- This is the list of headers that indicate the message should
not be displayed if the value of this header is 'yes'. See the
delete_level option for more info about
-what happens to the message.
+what happens to the message.
NOTE: This option has been deprecated if favor of annotated. However, it will still be -parsed and honored to take into account legacy archives.
-
-deleted = X-Hypermail-Deleted X-No-Archive
- - -
- expires = list of headers used to indicate -expiration +parsed and honored to take into account legacy archives.
- expires = list of headers used to indicate +expiration
- This is the list of headers that indicate the message should
not be displayed if the value of this header is a date in the past.
See the delete_level option for more
-info about what happens to the message.
-
-expires = Expires
- - -
- delete_older = date/time string +info about what happens to the message.
- delete_older = date/time string
- Any message older than this date should not be displayed. See
the delete_level option for more info
about what happens to the message. Any date format that works in
-the Date: header line of an email message should work here.
-
-delete_older = "Wed, 14 Mar 2001 12:59:51 +0200" (off by +the Date: header line of an email message should work here.
+
+delete_older = "Wed, 14 Mar 2001 12:59:51 +0200" (off by default)
- - -
- delete_newer = date/time string +
- delete_newer = date/time string
- Any message newer than this date should not be displayed. See
the delete_level option for more info
about what happens to the message. Any date format that works in
-the Date: header line of an email message should work here.
-
-delete_newer = "Wed, 28 Mar 2001 12:59:51 +0200" (off by +the Date: header line of an email message should work here.
+
+delete_newer = "Wed, 28 Mar 2001 12:59:51 +0200" (off by default)
- - -
- delete_msgnum = list of message numbers +
- delete_msgnum = list of message numbers
- This is the list of message numbers that should be deleted from
the html archive. The mbox is not changed. See the delete_level option for more info about what
-happens to the message.
-
-delete_msgnum = 42 666 (off by default)
- - delete_level = [ 0 | 1 | 2 | 3 ] -
+happens to the message.
+
+delete_msgnum = 42 666 (off by default) +
+- delete_level = [ 0 | 1 | 2 | 3 ] +
0 - remove deleted and expired files. Note that with this choice threading may be screwed up if there are replies to deleted or -expired options and the archive is updated incrementally
-1 - remove message body
+expired options and the archive is updated incrementally
+1 - remove message body
2 - remove message body for deleted messages, leave expired -messages
-3 - leave all messages
+messages
+3 - leave all messages
Deleted and expired messages are removed from the index files -regardless of the delete_level selection.
-
-delete_level = 1
-- -
- delete_incremental = [ 0 | 1 ] -
+regardless of the delete_level selection.
+
+delete_level = 1
+- delete_incremental = [ 0 | 1 ] +
If this option is enabled, hypermail will perform deletions on old messages when run in incremental mode (according to the other delete configuration options). Note that depending on your @@ -1458,124 +1462,124 @@System miscellaneous
markup, there may be memory and parsing issues, specifically when there are non-deleted replies to a deleted message. If this option is disabled, deleted messages will only be removed when rebuilding -the whole archive.
-
-delete_incremental = 0 (enabled by default)
-- -
- htmlmessage_edited = [HTML markup string] -
-Custom markup to use in the body of manually edited message -when delete_level is equal or superior to 2.
-
-htmlmessage_edited = <div class="edited"><img -src="http://example.org/Mail/edited.png" alt="original message +the whole archive.
+
+delete_incremental = 0 (enabled by default)
+- htmlmessage_edited = [HTML markup string] +
+Custom markup to use in the body of manually edited message when +delete_level is equal or superior to 2.
+
+htmlmessage_edited = <div class="edited"><img +src="https://example.org/Mail/edited.png" alt="original message edited" /> <p class="editedmmes">The originally received message was edited by the archive maintainer.</p><p class="spamfooter">The editing of this email is consistent with -<a href="http://example.org/Mail/">example.org's Mailing List -and Archive Usage Policy.</a></p></div> +<a href="https://example.org/Mail/">example.org's Mailing List +and Archive Usage Policy.</a></p></div> (disabled by default)
-- -
- htmlmessage_deleted_other = [HTML markup -string] -
-Custom markup to use in the body of deleted messages (by -reasons other than spam) when delete_level is equal or -superior to 2.
-
-htmlmessage_deleted_spam = <div class="deleted"><img -src="http://example.org/Mail/deleted.png" alt="email removed" /> +- htmlmessage_deleted_other = [HTML markup +string]
+ +with <a href="https://example.org/Mail/">example.org's Mailing +List and Archive Usage Policy.</a></p></div> (disabled by default)
+Custom markup to use in the body of deleted messages (by reasons +other than spam) when delete_level is equal or superior to +2.
+
+htmlmessage_deleted_spam = <div class="deleted"><img +src="https://example.org/Mail/deleted.png" alt="email removed" /> <p class="deletedmmes">This message was removed from our mail archives by the archive maintainer.</p><p class="deletedfooter">The removal of this email is consistent -with <a href="http://example.org/Mail/">example.org's Mailing -List and Archive Usage Policy.</a></p></div>
-- -
- htmlmessage_deleted_spam = [HTML markup -string] -
+- htmlmessage_deleted_spam = [HTML markup +string] +
Custom markup to use in the body of deleted messages (by spam -reasons) when delete_level is equal or superior to 2.
-
-htmlmessage_deleted_spam = <div class="spam"><img -src="http://example.org/Mail/noUCE.png" alt="unsolicited bulk email +reasons) when delete_level is equal or superior to +2.
+
+htmlmessage_deleted_spam = <div class="spam"><img +src="https://example.org/Mail/noUCE.png" alt="unsolicited bulk email removed" /> <p class="spammes">This message was determined to be unsolicited bulk email and has been removed from our archives.</p><p class="spamfooter">The removal of this email is consistent with <a -href="http://example.org/Mail/">example.org's Mailing List and -Archive Usage Policy.</a></p></div> (disabled +href="https://example.org/Mail/">example.org's Mailing List and +Archive Usage Policy.</a></p></div> (disabled by default)
-- -
- progress = [ 0 | 1 | 2 ] +
- progress = [ 0 | 1 | 2 ]
- Set to 1 or 2 to show progress as Hypermail works. Set to 0 for
silent operation. Output goes to standard output. Set to 1,
progress information relating to attachments creation is
overwritten for each new attachment. Set to 2, attachment creation
information is listed individually with the number of the message
-the attachments relates to.
-
-progress = 0
- - -
- warn_suppressions = [ 0 | 1 ] +the attachments relates to.
- warn_deprecated_options = [ 0 | 1 ] +
- Set to 1 if you want hypermail to display warning messages if you
+are using deprecated or planned to deprecate configuration options.
+Set it to 0 to hide those warnings. This warning is written to stdout.
+This option is enabled by default.
+
+warn_deprecated_options = 0 +
+ - warn_suppressions = [ 0 | 1 ]
- Set this to 1 to get warnings (on stdout) about messages that
are not converted because of they are missing a msgid (if
require_msgids is On) or because one of the following options
suppressed it: deleted expires delete_msgnum filter_out
-filter_require filter_out_full_body filter_require_full_body.
-
-warn_suppressions = 1
- - -
- uselock = [ 0 | 1 ] +filter_require filter_out_full_body filter_require_full_body.
- uselock = [ 0 | 1 ]
- Controls whether to use hypermail's built-in locking mechanism.
By default, this option is set to 1. Set it to
0 if you have an external locking mechanism, like,
-for example, when using procmail or smartlist.
-
-uselock = 0
- - -
- locktime = number-of-seconds +for example, when using procmail or smartlist.
- locktime = number-of-seconds
- The number of seconds that a lock should be honored when
-processing inbound messages before it is overridden.
-
-locktime = 3600
- - -
- base_url = url-of-main-archive-directory +processing inbound messages before it is overridden.
- base_url = url-of-main-archive-directory
- The url of the archive's main directory. This is needed when
the latest_folder option is used and the folder_by_date makes
-directories more than one level deep (e.g. with '%y/%m').
-
-base_url = http://www.hypermail-project.org/archive/
- - -
- report_new_folder = [ 0 | 1 ] +directories more than one level deep (e.g. with '%y/%m').
- report_new_folder = [ 0 | 1 ]
- Set this to On to have it print (on stdout) the names of any
new directories created pursuant to the folder_by_date or
msgsperfolder option, or the initial creation of the archive. It
will print the full path if that is what you use to specify the
archive directory. Does not print anything when attachment or
-metadata directories are created.
-
-report_new_folder = 0
- - -
- report_new_file = [ 0 | 1 ] +metadata directories are created.
- report_new_file = [ 0 | 1 ]
- Set this to On to have it print (on stdout) the names of any
-new files created for new messages. It will print the full path if
-that is what you use to specify the archive directory.
-report_new_file = 0
+ new files created for new messages. It will print the full path if
+ that is what you use to specify the archive directory.
+Note that this option has not been reviewed since years and should +now be considered UNMAINTAINED and at risk of being DEPRECATED.
+
+usegdbm = 0 +
+
+writehaof = 0 +
+
+append = 1 +
+
+append_filename = $DIR/INBOX +
+
+txtsuffix = txt (off by default) +
+
+deleted = X-Hypermail-Deleted X-No-Archive +
+
+expires = Expires +
+
+progress = 0 +
+
+warn_suppressions = 1 +
+
+uselock = 0 +
+
+locktime = 3600 +
+
+base_url = https://www.hypermail-project.org/archive/ +
+
+report_new_folder = 0 +
+ report_new_file = 0
-See Also +
-
Hypermail Frequently Asked Questions
--
Table of Contents
--
-
- Why is the License Different ? -
- Will hypermail run on my system ? -
- What Happened to EIT ? -
- Where in the World is Kevin Hughes ? -
- What is the latest version of Hypermail ? -
- Where can I get the latest version of Hypermail ? -
- How can I split the archives into months ? -
- How do I change the font on the pages ? -
- What is HM_MAILTO used for ? -
- Can I send a message to the list from the web archive ? -
- Can I build and run this on Windows 98/2000/NT ? -
- How can I remove a listserver subject prefix ? -
- Which configuration file should I use ? -
- Why is the downloaded file name different when I download hypermail.tar.gz ? -
- Can I throttle hypermail's CPU usage ? -
- How can I make my archive searchable ? -
- How does hypermail decide whether messages are in the same thread? -
- How can I have multiple mailboxes produce one archive? -
- I have received an email with attachment that needs octet-stream. What should I do? -
- Why is Hypermail ignoring some messages? -
- Bogus dates are causing some emails to be put in a strange folder. Is there an easy way around this? -
1. Why is the License Different ?
--Hewlett-Packard (who is now the legal owner of Hypermail, since EIT was -bought by VeriFone, which was bought by Hewlett-Packard) has put it -under the GNU license, a widely used "free software" license. This means -that you can use and modify the source code as long as you make your changes -publically available and do not charge for their use (although, under GNU, -you can charge for their distribution). More details are available at -http://www.fsf.org/ and -http://www.fsf.org/copyleft/gpl.html. - -
2. Will hypermail run on my system ?
--Hypermail can compile and run as-is on most of the more popular UNIX systems -today. If you're not sure if -hypermail will run on your UNIX system, try compiling it and see! -
-Hypermail has been reported to work on MacOSX (X.2.6), with the advice -to use --disable-shared and manually execute make in src/pcre. -
-People have indeed ported hypermail to DOS, Windows 95, and Windows NT (but -not Java ...yet). Installation advice for some Windows systems is available at -win32.html. - -
-
3. What Happened to EIT ?
--A very old and established government contractor company called Electronic -Instrumentation and Technology Inc. made legal moves to obtain the eit.com -domain. Since VeriFone/HP had no interest in keeping EIT, they dissolved it -completely some months ago. This company had a trademark on EIT so the -domain name was given to them. (Thank you InterNic...) - -
4. Where in the World is Kevin Hughes ?
--Kevin has not dropped off the face of the earth but is extremely busy -these days as a Hypermedia Engineer at Veo Systems. - -
- Kevin Hughes -- -
kev@kevcom.com -
kevinh@veosys.com -
(650) 858-7710 (office number) -
(650) 858-4925 (fax) -
www.veosystems.com -
-
5. What is the latest version of Hypermail ?
--The latest stable version of Hypermail is Version 2.1.9. It is available from -http://www.hypermail-project.org - -
-
6. Where can I get the latest version of Hypermail ?
--The latest version of Hypermail is available from the Hypermail Development -Center at - -SourceForge -and/or at -
-http://www.hypermail-project.org/ -
- -It and past versions are also available via FTP from - -ftp://ftp.hypermail.org/hypermail/
--The cvs server at :pserver:cvs@cvs.hypermail.org:/CVS -usually has a more recent but less tested version. - -
-
7. How can I split the archives into months ?
--I have a fat archive that I'd like to split up by month, like I see so many -others doing. Is there a description somewhere of a procedure to follow, -or will I just have to think it through? -
-If you are using version 2.1.0 or later and either have gdbm or don't -do incremental updates, see the - -folder_by_date - -option. The simple way to use this is to add these to your .hmrc: -
-folder_by_date="%y%m" --and regenerate your archive from its mbox file. -
usegdbm = 1 -
-An older alternative is a set of scripts in a directory -named archive/ that has tools to do just what -you want to do. -
-If you want index files split by month but don't need to split the archive -into multiple directories, try adding "monthly_index=1" in your -config file (usually ~/.hmrc) (available in version 2.1). A summary.html -file will provide links to all the monthly indices. -This is probably appropriate for archives with a few thousand messages, -but for larger archives I recommend splitting into multiple directories. -
- There's a script at -http://users.netrus.net/troc/perl.html -called mms (monthly mail splitter) which has also been reported useful. - -
-
8. How do I change the font on the pages ?
--What I'd like to do is change the font of the archives pages. I tried -doing this by adding a <FONT FACE=...> tag in the header.hyp file and a -<FONT> tag in the footer file, but it didn't work. Is there something -in the program itself that's preventing me from making this change? -
-Yes and no. Let me guess... You have hm_usetable = 1. -The code for tables is not inheriting the FONT values and that they need -to be set in the <TH..> tags. If tables are not used it works as -expected. -
-To test it put a
-
-
-<FONT SIZE="1" FACE="GENEVA,ARIAL,HELVETICA">
-
-
-in the test-index.hyp and test-msg.hyp. In test-footer.hyp put
-
-
-</FONT>
-
-
-
-With hm_usetable = 1 in the test.rc file, then ran -"hypermail -c test.rc -m testmail" and everything -between the "menus" was the right FONT but the menus were not. -
-Then edit the test.rc file and set hm_usetable = 0. -Next remove the existing testdir and rerun hypermail again. This time -the FONT works as expected. -
-Is this what is happening to you ? If so the code will need to be modified. - -
-
9. What is HM_MAILTO used for ?
-- -I've enabled this option in .hyprc (the configuration file to which -the pipe script for my archive points). Unlike the other options, this one -does not create a link to mailto:admin@domain.com as I would expect. Any -ideas? -
-HM_MAILTO has a couple different uses. One is to trigger the insertion of -the <LINK REV=made HREF=mailto:...> header in the HTML sources. -This is most useable with ascii browsers such as lynx. -
-
-
- hm_mailto = [ email-address | NONE ]
-
-
-
#
-
# The address of the contact point that is put in the HTML header line
-
# <LINK REV=made HREF=mailto:hm_mailto>
-
#
-
# The <LINK...> header can be disabled by default by setting
-
# mailto to NONE.
-
-It can also be used in a hypermail page template file since it resolves -to %m. -
-For example, your footer file might look like...
-
- <P ALIGN=CENTER><IMG SRC="/images/bar.png" WIDTH="400" HEIGHT="4" ALT="---------"></P>
-
<ADDRESS>
-
<EM>
-
<SMALL>
-
This archive was generated by %u on %g
-
<P ALIGN=CENTER>
-
Send administrative comments to<A HREF="mailto:%m">%m</A>
-
</P>
-
</SMALL>
-
</EM>
-
</ADDRESS>
-
</BODY>
-
</HTML>
-
-In this case the %m is expanded to admin@domain.com. - -
-
10. Can I send a message to the list from the web archive ?
--I would like to add a link to the menu that says "Send a Message to the -List." I read through the documentation on your website, and I think I -know what I have to do. However, I cannot find an example of what a .hyp -template file should look like. -
-That's what "Respond" on the menubar does. It allows a person -to reply to the existing message, with the reply sent to the list address. -And "mail a new topic" on the menubar allows a user to send -a new message to the list. -
-To enable this feature set -
-
-
hm_hmail = listaddr@your-site.domain
-
-
Can I build and run this on Windows 98/2000/NT ?
--I would like to use Hypermail on my Windows box. Can I ? If so how do -I build the latest version ? -
-There is a complete description on how to build hypermail on a Windows - system at win32.html. This was written by -Bob Crispen <bob.crispen@boeing.com>. (Thanks Bob!) - - -
How can I remove a listserver subject prefix ?
--The Subject index page does not seem to do the right sorting. My list -has a "subject prefix" so people can filter their inbound mail better. Is -that confusing the sorting ? -
-Yes. Hypermail functions that deal with replies look for the Re: and -return a pointer to the subject line after the "Re: ". -The listserver software is prefixing the subject line contents with -[subject-prefix]. For example: -
-
-Initial message:
-Replies:
-
- Subject: [subject-prefix] the subject of the message
-
-
-
- Subject: [subject-prefix] Re: the subject of the message
-
-
-
-The best solution is to use the directive -
- stripsubject = [subject-prefix] --in the config file for that list. Then [subject-prefix] is stripped before -the Reply processing occurs and the proper things happen. This is the proper -fix since hypermail would need to know to strip the [subject-prefix] from -the initial messages to get it right. - -
Which configuration file should I use ?
--Which configuration file should I use ?. Is it the hypermail.rc file -in the Configs directory? I'm trying to edit the appearance of pages created -by hypermail, but I think I'm trying to edit the wrong config file. -
-With one of the later versions you can use the -v option to generate -a config file that you can use. There is not just one config file. -What are included are examples. -
-
-
- $ hypermail -v > some-file.rc
-
-
-
-Edit the some-file.rc and set the values to what you want.
-
-Then run hypermail using the config file by:
-
-
-
- $ hypermail -c some-file.rc.
-
-
-
-
Why is the downloaded file name different when I download hypermail.tar.gz ?
-
-
-The source is available from
-
-www.hypermail.org/hypermail.tar.gz
-
-However: When downloading though IE v4 browser on an NT
-PC, you get a file called hypermail_tar.tar.
-
-
-Depending on your browser MIME type setup and support applications, -the filename downloaded might be hypermail.tar, hypermail.tar.gz, etc. -In any case, you will be informed as to the filename when you actually -download it onto a Windows/NT PC. Use that name from that point forward. - -
Can I throttle hypermail's CPU usage ?
-- -I'm looking for a good way to throttle hypermail. When it runs it is -taking over both CPU's on my system. Is there a way to have it limit -itself? - -
-There is currently no "nice" call in hypermail to limit itself. Maybe
-we can consider it in the future. You might run it as a subcommand to
-nice. For example in an aliases file:
-
-
- "|nice someval 'hypermail command line'"
-
-
-I've NEVER tried this so... ;)
-
-You might also be looking at a very large archive with lots of messages -being the cause. If so then try breaking it up into smaller archives -such as monthly archives. Tools are available for that in the latest -release. -
-And if the list is a high traffic list, consider not running it from a -sendmail alias and instead, run it from cron. (To assure it does not -run unnecessarily, consider using 'make' to check dependencies on the -inbound mailbox and the archive itself. If the mailbox is newer, then -run the hypermail command. If not, then no new message have been received -so don't bother running it. - -
-If the you are using the linkquotes option and incremental update -(-u option), add a searchbackmsgnum line to your config file. -It controls the tradeoff between speed and -the reliability of finding the right source for quoted text. -Try to set it to the largest number of messages between a -message and the final direct reply to that message. - -
How can I make my archive searchable ?
--Where can I find a program that provides an easy way of adding a -"search this archive" feature to my hypermail archive? - -
-These seem to be the most popular choices: -
-
-
- Htdig -
- Swish-E -
- Glimpse -
- Namazu -
- mnoGoSearch -
- You can also use search engines by putting text such as this on
-your web page (although this search produces results from an entire site,
-not just the email archive):
-
<form action=http://www.google.com/search>
-
<input type=text name=as_q>
-
<input type=hidden name=as_sitesearch value=hypermail-project.org>
-
<input type=submit value="Search Hypermail">
-
</form>
-
-You can probably get more complete (but apparently not recent) info at: -Search Engine Software For Your Web Site. - -
How does hypermail decide whether messages are in the same thread?
-- It uses the In-Reply-To: header if that is available. If not, it uses -the References: header if that is available. If these are not available, -it looks for previous messages with the same subject header. Matches based -on the subject are listed as "maybe" replies. -
- If the linkquotes option is used, it will also search the message bodies -of the previous searchbackmsgnum (default = 500) messages for text that -looks like it is being quoted in the current message. If it finds one or more -prior messages with such text matches, it will treat the one with the longest -match as the message being replied to. The exact algorithms for deciding what -is quoted text are a bit complex. These matches override the In-Reply-To: -and References: info (this rule may deserve further thought). - -
How can I have multiple mailboxes produce one archive?
-
- One simple way is to combine them into one mailbox, and send that to
-hypermail. Something like
"cat file1 file2 file3 > combined"-should do that. -
- Another way is to invoke hypermail several times, using the -u flag for -any mailboxes that you want added after the html archive has been started: -
- hypermail -m file1 - hypermail -u -m file2 - hypermail -u -m file3 --
- Do not try to send hypermail more than one mailbox at a time, or send -it a second mailbox without using the -u flag or the increment=1 or -increment=-1 option. - -
I have received an email with attachment that needs octet-stream. What should I do?
--No attachment "needs" octet-stream. octet-stream is a label that describes -the attachment as being "a stream of octets". What is that you say? Well, the -application didn't know any more specifics and thus it identified it as good -as possible. It knows it is a stream of octets, nothing else. -
-So, an attachment coming as "octet-stream" can be pretty much ANYTHING. You -have no idea, and neither does anyone else. The only way to figure out is to -download the file and see for yourself, ask the person who mailed it or to -hope that the mail it came with describes what the attachment was about. -
-"octet-stream" could just as well be named "I haven't got the slightest idea -what this is, but I know it is built up with a series of bytes". - -
Why is Hypermail ignoring some messages?
-One possibility is that those messages have a header saying -
-X-No-Archive: yes --which seems to indicate that the author doesn't want them included in any -archive. This is controlled by a configure option which defaults to: -
-deleted = "X-Hypermail-Deleted X-No-Archive" --To get Hypermail to treat these as normal messages, add this to your -config file (which is ~/.hmrc by default) or alter the "deleted" line -in your existing config file to: -
-deleted = "X-Hypermail-Deleted" -- -
Bogus dates are causing some emails to be put in a strange folder. Is there an easy way around this?
--If the bad dates were caused by a computer with the date set absurdly, try -running -mailbox_date_trimmer.py, available in the Hypermail's contrib directory. -
-If the bad dates are in a format that Hypermail doesn't understand, then -you will probably need to edit them manually. - -
-
- - diff --git a/docs/hypermail.1 b/docs/hypermail.1 index a1b3ef54..c40959ab 100644 --- a/docs/hypermail.1 +++ b/docs/hypermail.1 @@ -146,14 +146,6 @@ generates the html files. This is dependent on local needs. Do not put a '.' in the value. It would result in "file..html", probably not what you want. .TP -.B \-t - This will tell Hypermail to generate an -index menu at the top and bottom of each page in a table format. -.TP -.B \-T -This will tell Hypermail to generate -a message index Subject/Author/Date listings using a table format. -.TP .B \-u This option tells Hypermail to add message(s) to the end of the existing HTML file archive and integrate them into it by links and cross-references. All archive index files will be regenerated to include the new message. Hypermail used to require that you only send it one message at a time when @@ -554,8 +546,6 @@ recommended for archives with over a few hundred messages. Setting this greater than 1 will produce multiple levels of files for each thread whose replies are nested by more than 1 level, but that is rarely useful. This option is currently disabled -if the indextable option is turned on, and probably needs to -be less than thrdlevels. .SH BUGS @@ -572,15 +562,15 @@ was originally designed and developed by Tom Gruber .RI
Hypermail
-
-- -
-Contents: -
-
-
- What is Hypermail? -
- Usage -
- Command-Line Options - -
- Configuration Options -
- Order of Options Processing -
- Other Things -
- Running Hypermail Automatically -
- Getting Help With Hypermail -
- Getting Hypermail Software -
- Credits -
- See Also -
- -
- -
What is Hypermail?
- -Hypermail is a program that takes a file of mail messages in UNIX mailbox format and generates a set of cross-referenced HTML documents. Each file that is created represents a separate message in the mail archive and contains links to other articles, so that the entire archive can be browsed in a number of ways by following links. Archives generated by Hypermail can be incrementally updated, and Hypermail is set by default to only update archives when changes are detected. --Each HTML file that is generated for a message contains (where applicable): -
-
-
-
- the subject of the article, -
- the name and email address of the sender, -
- the date the article was sent, -
- links to the next and previous messages in the archive, -
- a link to the message the article is in reply to, and -
- a link to the message next in the current thread. -
-In addition, Hypermail will convert references in each message to email addresses and URLs to hyperlinks so they can be selected. Email addresses can be converted to mailto: URLs or links to a CGI mail program. -
-To complement each set of HTML messages, four index files are created which sort the articles by date received, thread, subject, and author. Each entry in these index files are links to the individual articles and provide a bird's-eye view of every archived message. -
-Hypermail was originally developed and designed by Tom Gruber for Enterprise Integration Technologies (EIT) in Common Lisp. It was later rewritten in C by Kevin Hughes while at EIT. Hypermail is now being maintained by Peter McCluskey <pcm@rahul.net>. -
- -To see what Hypermail can do, take a look at these Hypermail-produced archives: -
-
-- -
- -
Usage
- --
+ + + + ++While the example uses quotes ("), they is not +required when used in the configuration file. +Hypermail Documentation + + + + ++ ++
Hypermail
+ + ++
+What is Hypermail?
+ Hypermail is a program that takes a file of mail + messages in UNIX mailbox format and generates a set of + cross-referenced HTML documents. Each file that is created + represents a separate message in the mail archive and contains + links to other articles, so that the entire archive can be browsed + in a number of ways by following links. Archives generated by + Hypermail can be incrementally updated, and Hypermail is set by + default to only update archives when changes are detected. +Each HTML file that is generated for a message contains (where + applicable):
++
+- the subject of the article,
+- the name and email address of the sender,
+- the date the article was sent,
+- links to the next and previous messages in the archive,
+- a link to the message the article is in reply to, and
+- a link to the message next in the current thread.
+In addition, Hypermail will convert references in each message + to email addresses and URLs to hyperlinks so they can be selected. + Email addresses can be converted to mailto: URLs + or links to a CGI mail program.
+To complement each set of HTML messages, four index files are + created which sort the articles by date received, thread, subject, + and author. Each entry in these index files are links to the + individual articles and provide a bird's-eye view of every archived + message.
+ +To see what Hypermail can do, take a look at these + Hypermail-produced archives:
++
+- W3C Public Mailing List Archives (3.0)
+- Hypermail + Development Archives (2.3)
+- FAQ + Maintainers Archives (2.2)
+
+Usage
+Usage: hypermail [options] Options: @@ -89,8 +103,6 @@-Usage
-o keyword=val: Set config item -p : Show progress -s htmlsuffix : HTML file suffix (.html, .htm, ..) - -t : Use Tables - -T : Use index tables -u : Append all input messages -v : Show configuration variables only -V : Show version information and exit @@ -100,42 +112,46 @@Usage
-1 : Read only one mail from input -L lang : Specify language to use (de en es fi fr is pl pt sv no el gr ru it ) --Using the flags -h, or -? with Hypermail will display this usage summary. -
- -
- -Command-Line Options
- -Input and Output Options:
---i, --
-m "mailbox", -
-d "directory", -
-c "file" -- -To tell Hypermail what mailbox to read in, use the -m option. If articles will be sent to Hypermail through standard input, use the -i option. Note that the -m and -i options can't be used together! By default, Hypermail will look for a file called mbox to read its articles in from. -
-The -d option specifies the directory to put the HTML files and index files that are created into. If the directory doesn't exist, a new one will be created with the name that is specified. If the -d option isn't used, Hypermail will look for a directory with the same name as the mailbox or will create one if needed. -
-
++Using the flags -h, or -? with +Hypermail will display this usage summary.
+
+Command-Line Options
+Input and Output +Options:
+-i,+
+-m "mailbox",
+-d "directory",
+-c "file"To tell Hypermail what mailbox to read in, use the +-m option. If articles will be sent to Hypermail +through standard input, use the -i option. Note +that the -m and -i options can't +be used together! By default, Hypermail will look for a file called +mbox to read its articles in from.
+The -d option specifies the directory to put +the HTML files and index files that are created into. If the +directory doesn't exist, a new one will be created with the name +that is specified. If the -d option isn't used, +Hypermail will look for a directory with the same name as the +mailbox or will create one if needed.
+example 1: hypermail -m "wu-ftpd" -d "/wu-ftpd" example 2: cat "/var/spool/mail/wu-ftpd" | hypermail -i ---
-
-- This example reads the articles in wu-ftpd and will save the output in the /wu-ftpd directory. -
-
- This reads the file /var/spool/mail/wu-ftpd from standard input and will save the output in a directory called archive in the same directory Hypermail was run from. -
-Note that Hypermail can only read messages in the UNIX mailbox format! Such archives are typically RFC 2822 mail messages appended to each other that look similar to this: -
-
+++
+- This example reads the articles in wu-ftpd and +will save the output in the /wu-ftpd +directory.
+- This reads the file /var/spool/mail/wu-ftpd +from standard input and will save the output in a directory called +archive in the same directory Hypermail was run +from.
+Note that Hypermail can only read messages in the UNIX mailbox +format! Such archives are typically RFC 2822 mail messages appended +to each other that look similar to this:
+From john@foo.com Mon Jan 1 00:01:30 1994 Date: Mon, 1 Jan 1994 00:01:15 PDT From: john@foo.com @@ -147,482 +163,517 @@-Command-Line Options
From someone.else@foo.com Mon Jan 1 00:02:00 1994 Date: Mon, 1 Jan 1994 00:01:45 PDT ... --The messages are typically separated by lines in this format: -
-
++The messages are typically separated by lines in this +format:
+From wu-ftpd@wugate.wustl.edu Fri Jul 1 00:18:20 1994 ---The -c option tells Hypermail to read in settings from a configuration file. By default, the program will attempt to read settings from a file called .hmrc in the user's home directory if it exists. -
-In the configuration file, variables are set in the following manner: -
-
- -variable = number -- -The complete set of variables that Hypermail recognizes is described in the Configuration Options page. -
variable = "string" - -- -Archive Interface Options: -
--l "label", --
-b "About URL", -
-a "Other Archives URL" --The -l option tells Hypermail what to call the archive - the name that is specified will be in the title of the index pages so users know what sort of messages are being archived. -
-The -a option includes a link labelled "Other mail archives" in the index pages to any specified URL. This way users who are looking at the archive have the opportunity to go to pointers to other mail archives. By default, this will be a pointer to the parent directory in which the archive files reside. -
-The -b option includes a link labelled "About this archive" in the index pages to any specified URL. This way users who are looking at the archive have the opportunity to go to information about the archive. -
-
++The -c option tells Hypermail to read in +settings from a configuration file. By +default, the program will attempt to read settings from a file +called .hmrc in the user's home directory if it +exists.
+In the configuration file, variables are set in the following +manner:
+variable = number+ +
+variable = "string"The complete set of variables that Hypermail recognizes is +described in the Configuration Options + page.
+ +To get you up to speed, a sample annotated hypermail configuration file is included in the docs dir.
+ + +-l "label",+
+-b "About URL",
+-a "Other Archives +URL"The -l option tells Hypermail what to call the +archive - the name that is specified will be in the title of the +index pages so users know what sort of messages are being +archived.
+The -a option includes a link labelled "Other +mail archives" in the index pages to any specified URL. This way +users who are looking at the archive have the opportunity to go to +pointers to other mail archives. By default, this will be a pointer +to the parent directory in which the archive files reside.
+The -b option includes a link labelled "About +this archive" in the index pages to any specified URL. This way +users who are looking at the archive have the opportunity to go to +information about the archive.
+example: hypermail -l "WU-FTPD Development Archives" -a "http://www.landfield.com/wu-ftpd/" -b "http://www.landfield.com/wu-ftpd/mail-archive/" ---In the index files for the archive, the above setting will produce something like this: -
-
-(top of page) ---WU-FTPD Archives -
--(list of indexed articles below) -
- -Updating Options:
---x, --
-u --The -x option tells Hypermail to explicitly overwrite any previous HTML files that may exist. Use this option only when it is desirable to completely rewrite the entire archive. -
-The -u option tells Hypermail to add message(s) to the end of the existing HTML file archive and integrate them into it by links and cross-references. All archive index files will be regenerated to include the new message. -
- Hypermail used to require that you only send it one message at a time when -using the -u option, but it should now work reasonably when -given mailboxes containing multiple messages. -
-When using the -u option, don't send any messages that -Hypermail has already processed. If you want Hypermail to recognize that -some messages are old messages that shouldn't be added to the archive again, -send it a mailbox with a complete set of messages and avoid the --u option. -
-
++In the index files for the archive, the above setting will +produce something like this:
+(top of page) ++ +WU-FTPD Archives
+ +(list of indexed articles below)
+-x,+
+-uThe -x option tells Hypermail to explicitly +overwrite any previous HTML files that may exist. Use this option +only when it is desirable to completely rewrite the entire +archive.
+The -u option tells Hypermail to add message(s) +to the end of the existing HTML file archive and integrate them +into it by links and cross-references. All archive index files will +be regenerated to include the new message.
+Hypermail used to require that you only send it one message at a +time when using the -u option, but it should now +work reasonably when given mailboxes containing multiple +messages.
+When using the -u option, don't send any +messages that Hypermail has already processed. If you want +Hypermail to recognize that some messages are old messages that +shouldn't be added to the archive again, send it a mailbox with a +complete set of messages and avoid the -u +option.
+example 1: cat "one.letter" | hypermail -i -u -d "/wu-ftpd/mail-archives" example 2: hypermail -u -m "one.letter" -d "/wu-ftpd/mail-archives" example 3: hypermail -m "mailbox" -d "/wu-ftpd/mail-archives" -x example 4: hypermail -m "mailbox" -d "/wu-ftpd/mail-archives" ---
-
-- This tells Hypermail to take the article it receives from standard input -and integrate it with the archive under the wu-ftpd/mail-archives -directory. If no archive exists, a new one will be created with the specified -letter as the first file of the archive. -
-
- This does the same thing, except that the letter is read in from a file that contains only that letter. -
-
- With these options, Hypermail will read in the articles from -mailbox and write over any existing files in the -wu-ftpd/mail-archives directory if they exist. If no archive -exists, a new one will be created. -
-
- With these options, Hypermail will read in the articles from -mailbox and only write new articles - it will not overwrite -any existing archive files. -
-Note that no matter what options are specified, the index files are always -rewritten. The date when Hypermail was last run is included in index pages, -so it's easy to tell when the archive was last updated. -
--p --
-v -
-V --The -p option shows a progress report as Hypermail reads in and writes out messages - the number of files that Hypermail is reading and writing and the file names of the directory and files created are shown. This information is written to standard output. -
-The -v option shows the configuration variables and their values that Hypermail would use if it was run with the same configuration file and command line options. This is useful when starting up a new list or modifying a list configuration file. Once the information is displayed, Hypermail terminates and no actual processing occurs. -
-The -V option prints the Hypermail version information. Once the information is displayed, Hypermail terminates and not actual processing occurs. -
-The -0 option list message numbers that should be deleted -from the html archive. The mbox is not changed. -It is equivalent to the delete_msgnum -option. -
-
- -Configuration Options
- -Hypermail has many variables that can be set as environment variables or as variables in the specified configuration file. For instance, using the C shell, one could define variables in this manner: --
+++
+- This tells Hypermail to take the article it receives from +standard input and integrate it with the archive under the +wu-ftpd/mail-archives directory. If no archive +exists, a new one will be created with the specified letter as the +first file of the archive.
+- This does the same thing, except that the letter is read in +from a file that contains only that letter.
+- With these options, Hypermail will read in the articles from +mailbox and write over any existing files in the +wu-ftpd/mail-archives directory if they exist. If +no archive exists, a new one will be created.
+- With these options, Hypermail will read in the articles from +mailbox and only write new articles - it will not +overwrite any existing archive files.
+Note that no matter what options are specified, the index files +are always rewritten. The date when Hypermail was last run is +included in index pages, so it's easy to tell when the archive was +last updated.
+ +-p+
+-v
+-VThe -p option shows a progress report as +Hypermail reads in and writes out messages - the number of files +that Hypermail is reading and writing and the file names of the +directory and files created are shown. This information is written +to standard output.
+The -v option shows the configuration variables +and their values that Hypermail would use if it was run with the +same configuration file and command line +options. This is useful when starting up a new list or modifying a +list configuration file. Once the information is displayed, +Hypermail terminates and no actual processing occurs.
+The -V option prints the Hypermail version +information. Once the information is displayed, Hypermail +terminates and not actual processing occurs.
+The -0 option list message numbers that should +be deleted from the html archive. The mbox is not changed. It is +equivalent to the delete_msgnum option.
+
+Configuration Options
+Hypermail has many variables that can be set as environment +variables or as variables in the specified configuration file. For instance, using the C +shell, one could define variables in this manner: +setenv HM_MBOX /home/john/my_mailbox setenv HM_FILEMODE 0600 ---In the configuration file, variables must be in lowercase and separated by their values with an equals (=) sign. Blank lines and lines beginning with the # character are skipped: -
++In the configuration file, variables must be in lowercase and +separated by their values with an equals (=) sign. +Blank lines and lines beginning with the # +character are skipped:
+mbox = "/home/john/my_mailbox" filemode = 0600 --While the example uses quotes ("), they is not required when used in the configuration file. --Below is a list of the more important configuration variables. -For a complete list, see hmrc.html. -
-
-
-- HM_LABEL "label name" -
- Define this as the default label to put in archives. -
-
- HM_ARCHIVES "URL" -
- This will create a link in the archived index pages to the specified - URL. Define as "NONE" to omit such a link. - See also custom_archives. -
-
- HM_HMAIL "list submission address" -
- This is the email address used to send a new message to a hypermail archive. "NONE" means don't use it. Since this is different for each hypermail archive, you should probably leave it set to "NONE" here, and let it be specified at runtime by command-line parameters in the list specific configfile. -
See also newmsg_command -and replymsg_command. --
- HM_DIR "directory" -
- This is the default directory that Hypermail will look for when creating and updating archives. If defined as "NONE", the directory name will be the same name as the mailbox read in. -
-
- HM_MBOX "filename" -
- This is the default mailbox to read messages in from. Define this with - a value of "NONE" to read from standard input as the - default. -
-
- HM_STRIPSUBJECT "text"
- - A string to be stripped from all subject lines. Helps -unclutter mailing lists which add tags to subject lines. -
-- HM_FOLDER_BY_DATE = "strftime-date-format"
- -This string causes the messages to be put in subdirectories -by date. The string will be passed to strftime(3) to generate -subdirectory names based on message dates. Suggested values are -"%y%m" or "%b%y" for monthly subdirectories, "%Y" for -yearly, "%G/%V" for weekly. Do not alter this for an existing -archive without removing the old html files. If you use this -and update the archive incrementally (e.g. with -u), you must -use the usegdbm option. -
-
See also monthly_index. -- HM_ISODATE boolean_number
- -Set this to On to display article received dates in -YYYY-MM-DD HH:MM:SS format. If used with the gmtime -option, a Z will be inserted between the DD and HH. -
-
See also eurodate and dateformat. --
- HM_LANGUAGE "language-id" -
- This is a two-letter string specifying the default - language to use, or a longer string specifying a language - and locale. Set this the value of the language - table you wish to use when running and generating - archives. See also iso2022jp - and eurodate. -
-
Current supported languages, with their default locales: --de (de_DE) - German --The directory /usr/share/i18n/locales on many systems has the locale -codes that are available on that system. -
en (en_US) - English -
es (es_ES) - Spanish -
fi (fi_FI) - Finnish -
fr (fr_FR) - French -
el (el) - Greek -
gr (el_GR) - Greek -
is (is_IS) - Icelandic -
no (no_NO) - Norwegian -
pl (pl_PL) - Polish -
pt (pt_BR) - Brazilian Portuguese -
ru (ru_RU) - Russian -
sv (sv_SE) - Swedish --
- HM_INCREMENT -1, 0, or 1 -
Define as 1 to append all input messages to the end of existing archives. -
Define as 0 for it to read a mailbox that corresponds to the entire -archive. If there are any existing html messages, it will figure out which -ones at the end of the mailbox are new, and add only those that haven't been -converted yet. -
Define as -1 to have hypermail figure out whether the input -is entirely new messages to be appended or whether it contains -messages that are already in the archive. A value of -1 cannot be -used with the mbox_shortened option or with the -i command line -option or with mbox = NONE.
-- HM_APPEND boolean_number
- -Set this to On to maintain a parallel mbox archive. The file -name defaults to mbox in the directory specified by -d or dir. -
-
See also append_filename -and txtsuffix. --
- HM_SHOWHTML 0, 1, or 2 -
- -Define as 1 to show the articles in a proportionally-spaced -font rather than a fixed-width (monospace) font. Setting this -option to 1 also tells Hypermail to attempt to italicize quoted -passages in articles. -
-Define as 2 for more complex conversion to html -similar to that in txt2html.pl. -Showhtml = 2 will normally produce nicer looking results than -showhtml = 1, and showhtml = 0 will look pretty dull, but -1 and 2 run risks of altering the appearance in undesired ways. -
-
- HM_LINKQUOTES boolean_number -
- Set this to On to create fine-grained links from quoted -text to the text where the quote originated. It also improves -the threads index file by more accurately matching messages -with replies. Note that this may be rather cpu intensive (see -the searchbackmsgnum option to alter the performance). -
-
- HM_ABOUT "URL" -
- This will create a link in the archived index pages to the specified URL. Define as "NONE" to omit such a link. -
-
- HM_MAILTO address -
- The address of the contact point that is put in the HTML header line -
-
- The <LINK...> header can be disabled by default by setting HM_MAILTO to "NONE". -- <LINK REV=made HREF=mailto:MAILTO> -
-
- HM_INDEXTABLE boolean_number -
- Setting this variable to 1 will tell Hypermail to generate - a message index Subject/Author/Date listings using a table - format. Set to 0 if you want the standard Hypermail index - page look and feel. -
-
- HM_FILTER_OUT expression -Delete messages with headers matching regular expressions -(PCRE syntax). -See also filter_require, -filter_out_full_body, and -filter_require_full_body. - -
-
- HM_DOMAINADDR "domainname" -
- Set this to the domainname you want added to a mail address appearing -in the RFC2822 field which lack a hostname. When the list resides on the -same host as the user sending the message, it is often not required of -the MTA to domain-ize these addresses for delivery. In such cases, -Hypermail will add the DOMAINADDR to the email address. If defined as -NONE, this feature is turned off. -
-
- HM_USEMETA [ 0 | 1 ] -
- This option allows you to use metadata to store the content type - of a MIME attachments and, later on, when a user browses the - attachment, send back this information in the HTTP Content-Type - header. When set to 1, the Content-Type header of a - MIME attachment will be stored in a metadata file. Let us say that - the MIME attachments for a message are stored in directory - att-num. The metadata for those attachments will - then be stored in directory att-num/.meta. If a - MIME attachment is stored in file att-file, its - metadata will be stored in file att-file.meta. This - convention is directly compatible with the Apache server handling of - metadata. -
-
- HM_REVERSE boolean_number -
- Defining this variable as 1 will reverse-sort the article entries in the date and thread index files by the date they were received. That is, the most recent messages will appear at the top of the index rather than the other way around. -
-
- HM_MHTMLHEADERFILE "path" -
- Define path as the path to a file containing valid HTML formatting statements that you wish to included at the top of every message page. Hypermail will print this file as the header of the message so make sure it contains <HTML>, <HEAD>, and <BODY> and other statements that suit your local customized needs. -
-See also ihtmlheaderfile, -ihtmlfooterfile, and -mhtmlfooterfile. --
- HM_CONFIGFILE "filename" -
- This is the default configuration file to read settings in from. This - can only be specified as an environment variable. If the first character - is "~", Hypermail will look for the file under the current user's home - directory. -
-
- -
- -Order of Options Processing
--Settings are processed in this order: -
-
-
-- From the program's hard-wired internal defaults (specified in options.h), -
- From runtime environment variables, -
- From the configuration file, -
- From command-line options. -
-Early versions of Hypermail read the command line before reading the -configuration file. -
-
- -Other Things
- -Filenames: In the specified directory, articles will be read out in the order that they were read in from a mailbox or standard input. Filenames start at zero and increase in this fashion: 0000.html, 0001.html, 0002.html, etc. In the same directory: --
-
-- date.html is the index of articles sorted by the date they were received by the system's mail daemon. -
- thread.html is the index of articles sorted by thread first, then the date they were received. -
- subject.html is the index of articles sorted by subject. Any "Re:" prefixes in front of subjects will have been stripped out. -
- author.html is the index of articles sorted by the first word of the author's name. If the author's name can't be determined, their email address will be substituted. -
- One of the above files will be called index.html and is the default index that users can go to when entering the archive. -
- -Sorting: In the date and thread index files, note that these lists are sorted by the date the articles were received by the system's mail daemon, not by the date they were written on. The order of articles in the date index may not necessarily match the order in which the article files are written and linked together. Because of this, it is a good idea to make sure the mailbox is sorted by date with the most recent messages towards the bottom. -
- - -Running Hypermail automatically: All that's needed to start archiving email messages is to set up Hypermail to do incremental updates in your /etc/aliases file (assuming that you use sendmail or something that works like it to deliver mail). - Here's what an entry might look like (the last line is one unbroken line): -
- -# -- -After adding the entry, make sure newaliases is run to update the -mail aliases. This entry will run Hypermail and update/create the archive whenever -a new message is received. Hypermail also works well as a cron job. -Because sendmail may run Hypermail as different users, you will -want to make sure that archive directories and files are made readable and writeable -by a trusted sendmail user (or read/writable by everyone if you can't do that) -when they are created. This will ensure that there will be no problems incrementally -updating the archive. -
# WU-FTPD Mailing List Archives -
# -
wulist: "|/usr/local/bin/hypermail -i -u -d /wu-ftpd/mail-archive -l \"WU-FTPD Mailing List Archive\"" - -If you use qmail instead of sendmail, you probably want to create a file -/var/qmail/alias/.qmail-<mylistemailaddress> containing something like this: -
-|/usr/local/bin/hypermail -i -u -d /wu-ftpd/mail-archive -l \"WU-FTPD Mailing List Archive\" --- If you are running Linux kernel version 2.4 or higher, -dnotify -looks like it provides another way to automate Hypermail. - -
-Including HTML in messages: One can include formatted HTML in message bodies by enclosing the HTML with the <HTML> tag (in either uppercase or lowercase). This tag must be on a line by itself: -
-
- This text will not be parsed... - <html> - this text will be parsed as HTML. - </html> - This text will not be parsed... ---There is no limit to how often the <HTML> tag can be used in an article. -
- -
- -Getting Help With Hypermail
--If you are are looking for more information on Hypermail and its features and -developmental status, check out -SourceForge: Project Info - hypermail -and hypermail-project.org. Additional -documentation and the hypermail development list archives are available there. - -
-
- -Getting Hypermail Software
- --Hypermail is available free of charge under GNU Public License. More details -about the GPL are available at http://www.fsf.org/copyleft/gpl.html. -
-Currently, SourceForge: Project Info - hypermail -has the most recent version. -
-The Hypermail Development Center also has beta development versions of hypermail available from time to time. - -
-
- -Credits
- -I would like to thank Tom Gruber, -who originally designed and developed Hypermail in Common Lisp, for the basis -of a GREAT tool. --I'd also like to thank Kevin Hughes for -developing the initial C version of Hypermail. Kevin also provided a great -deal of assistance with restarting the current hypermail development. -
-There are a great deal of people that also contributed to Hypermail's development. -The Hypermail Development Center Credits page is an attempt to let you know just who they are. -
-Hypermail development is currently being fostered by -<Peter McCluskey>. - -
- -
-See Also
--hypermail(1), - -hmrc(4), - -Hypermail List Configuration File. - -and - -Customizing Hypermail Pages -and Adding a Search Engines to your Hypermail Archive -- - -
-- -Please send any feature requests, bug fixes, and comments on Hypermail -to <hypermail@hypermail-project.org>. In order to minimize spam on the list, you must subscribe to the list (at least temporarily) in order to send mail to it. -You may subscribe to the list by sending a message with the word -"subscribe" in the Subject: field to hypermail-request@hypermail-project.org. - -
- -Last updated Sep 2, 2006 - - - - +
Below is a list of the more important configuration variables. +For a complete list, see hmrc.html.
+-
+
- HM_LABEL "label name" +
- Define this as the default label to put in archives. + +
- HM_ARCHIVES "URL" +
- This will create a link in the archived index pages to the + specified URL. Define as "NONE" to omit such a + link. See also custom_archives. + + +
- HM_HMAIL "list submission address" +
- This is the email address used to send a new message to a
+ hypermail archive. "NONE" means don't use it. Since this is
+ different for each hypermail archive, you should probably leave it
+ set to "NONE" here, and let it be specified at runtime by
+ command-line parameters in the list specific configfile.
+ See also newmsg_command and + replymsg_command. +
+
+ - HM_DIR "directory" +
- This is the default directory that Hypermail will look for when + creating and updating archives. If defined as + "NONE", the directory name will be the same name + as the mailbox read in. + + +
- HM_MBOX "filename" +
- This is the default mailbox to read messages in from. Define + this with a value of "NONE" to read from standard + input as the default. + + +
- HM_STRIPSUBJECT "text" +
- A string to be stripped from all subject lines. Helps unclutter + mailing lists which add tags to subject lines. + + +
- HM_FOLDER_BY_DATE ="strftime-date-format" +
- This string causes the messages to be put in subdirectories by
+ date. The string will be passed to strftime(3) to generate
+ subdirectory names based on message dates. Suggested values are
+ "%y%m" or "%b%y" for monthly subdirectories, "%Y" for yearly,
+ "%G/%V" for weekly. Do not alter this for an existing archive
+ without removing the old html files. If you use this and update the
+ archive incrementally (e.g. with -u), you must use the
+ usegdbm option.
+ See also monthly_index. +
+
+ - HM_ISODATE boolean_number +
- Set this to On to display article received dates in YYYY-MM-DD
+ HH:MM:SS format. If used with the
+ gmtime option, a Z will be inserted between
+ the DD and HH.
+ See also eurodate and + dateformat. +
+
+ - HM_LANGUAGE "language-id" +
- NB non-english language files have not been updated since long time ago
+ and are now lagging in translation.
+ This is a two-letter string specifying the default language to + use, or a longer string specifying a language and locale. Set this + the value of the language table you wish to use when running and + generating archives. See also iso2022jp and eurodate.
+
+ Current supported languages, with their default locales: ++ de (de_DE) - German
+ The directory /usr/share/i18n/locales on many systems has the + locale codes that are available on that system. +
+ en (en_US) - English
+ es (es_ES) - Spanish
+ fi (fi_FI) - Finnish
+ fr (fr_FR) - French
+ el (el) - Greek
+ gr (el_GR) - Greek
+ is (is_IS) - Icelandic
+ no (no_NO) - Norwegian
+ pl (pl_PL) - Polish
+ pt (pt_BR) - Brazilian Portuguese
+ ru (ru_RU) - Russian
+ sv (sv_SE) - Swedish +
+
+ - HM_INCREMENT -1, 0, or 1
- Define as 1 to append all input messages to the
+ end of existing archives.
+ Define as 0 for it to read a mailbox that + corresponds to the entire archive. If there are any existing html + messages, it will figure out which ones at the end of the mailbox + are new, and add only those that haven't been converted yet.
+ Define as -1 to have hypermail figure out whether + the input is entirely new messages to be appended or whether it + contains messages that are already in the archive. A value of -1 + cannot be used with the mbox_shortened option or with the -i + command line option or with mbox = NONE.
+
+
+
+ - HM_APPEND boolean_number +
- Set this to On to maintain a parallel mbox archive. The file
+ name defaults to mbox in the directory specified by -d or
+ dir.
+ See also append_filename + and txtsuffix. +
+
+ - HM_SHOWHTML 0, 1, or 2 + +
- Define as 1 to show the articles in a
+ proportionally-spaced font rather than a fixed-width
+ (monospace) font. Setting this option to 1 also tells
+ Hypermail to attempt to italicize quoted passages in articles.
+
Define as 2 for more complex conversion to html + similar to that in + txt2html.pl. Showhtml + = 2 will normally produce nicer looking results than showhtml = 1, + and showhtml = 0 will look pretty dull, but 1 and 2 run risks of + altering the appearance in undesired ways.
+
+
+ - HM_LINKQUOTES boolean_number +
- Set this to On to create fine-grained links from quoted text to + the text where the quote originated. It also improves the threads + index file by more accurately matching messages with replies. Note + that this may be rather cpu intensive (see the + searchbackmsgnum option to alter + the performance). + + +
- HM_ABOUT "URL" +
- This will create a link in the archived index pages to the + specified URL. Define as "NONE" to omit such a link. + + +
- HM_MAILTO address +
- The address of the contact point that is put in the HTML header
+ line
+
+
+ The<LINK REV=made HREF=mailto:MAILTO>
+<LINK...>
header can be disabled by default by setting +HM_MAILTO
to "NONE
". +
+
+ - HM_FILTER_OUT expression +
- Delete messages with
+ headers matching regular expressions
+ (PCRE syntax).
+ See also filter_require,
+ filter_out_full_body,
+ and filter_require_full_body.
+
+
+ - HM_DOMAINADDR "domainname" +
- Set this to the domainname you want added to a mail address + appearing in the RFC2822 field which lack a hostname. When the list + resides on the same host as the user sending the message, it is + often not required of the MTA to domain-ize these addresses for + delivery. In such cases, Hypermail will add the DOMAINADDR to the + email address. If defined as NONE, this feature is turned off. + + +
- HM_USEMETA [ 0 | 1 ] +
- This option allows you to use metadata to store the content + type of a MIME attachments and, later on, when a user browses the + attachment, send back this information in the HTTP Content-Type + header. When set to 1, the Content-Type header of + a MIME attachment will be stored in a metadata file. Let us say + that the MIME attachments for a message are stored in directory + att-num. The metadata for those attachments will + then be stored in directory att-num/.meta. If a + MIME attachment is stored in file att-file, its + metadata will be stored in file att-file.meta. + This convention is directly compatible with the Apache server + handling of metadata. + + +
- HM_REVERSE boolean_number +
- Defining this variable as 1 will reverse-sort + the article entries in the date and thread index files by the date + they were received. That is, the most recent messages will appear + at the top of the index rather than the other way around. + + +
- HM_MHTMLHEADERFILE "path" +
- Define path as the path to a file containing valid HTML
+ formatting statements that you wish to included at the top of every
+ message page. Hypermail will print this file as the header of the
+ message so make sure it contains <HTML>,
+ <HEAD>, and <BODY> and other statements that
+ suit your local customized needs.
+ See also ihtmlheaderfile, + ihtmlfooterfile, and + mhtmlfooterfile. +
+
+ - HM_CONFIGFILE "filename" +
- This is the default configuration file to read settings in + from. This can only be specified as an environment variable. If the + first character is "~", Hypermail will look for the file under the + current user's home directory. + +
+ +
Order of Options Processing
+Settings are processed in this order:
+-
+
- From the program's hard-wired internal defaults (specified in +defaults.h and setup.c), +
- From runtime environment variables, +
- From the configuration file, +
- From command-line options. +
+ +
Other Things
+ +Filenames
+ +In the specified directory, articles will be read out in the order +that they were read in from a mailbox or standard input. Filenames +start at zero and increase in this fashion: 0000.html, 0001.html, 0002.html, +etc. In the same directory:
+ +-
+
- date.html is the index of articles sorted by + the date they were received by the system's mail daemon. +
- thread.html is the index of articles sorted by + thread first, then the date they were received. +
- subject.html is the index of articles sorted + by subject. Any "Re:" prefixes in front of subjects will have been + stripped out. +
- author.html is the index of articles sorted by + the first word of the author's name. If the author's name can't be + determined, their email address will be substituted. +
- One of the above files will be called + index.html and is the default index that users can + go to when entering the archive. +
Sorting
+ +In the date and thread index files, note that these lists are sorted +by the date the articles were received by the system's mail daemon, +not by the date they were written on. The order of articles in the +date index may not necessarily match the order in which the article +files are written and linked together. Because of this, it is a good +idea to make sure the mailbox is sorted by date with the most recent +messages towards the bottom.
+ +Running Hypermail automatically
+ +The following are some tips on how to make hypermail archive incoming + messages on-the-fly.
+ +Sendmail and qmail aliases
+ +All that's needed to start archiving email +messages is to set up Hypermail to do incremental updates in your +/etc/aliases file (assuming that you use +sendmail or something that works like it to +deliver mail). Here's what an entry might look like (the last line +is one unbroken line):
+ +#+ +
+# WU-FTPD Mailing List Archives
+#
+wulist: "|/usr/local/bin/hypermail -i -u -d /wu-ftpd/mail-archive +-l \"WU-FTPD Mailing List Archive\""
After adding the entry, make sure newaliases is +run to update the mail aliases. This entry will run Hypermail and + update/create the archive whenever a new message is received.
+ +Because sendmail may run Hypermail as different users, you +will want to make sure that archive directories and files are made +readable and writeable by a trusted sendmail user (or read/writable +by everyone if you can't do that) when they are created. This will +ensure that there will be no problems incrementally updating the + archive.
+ +If you use qmail instead of sendmail, you probably want to +create a file /var/qmail/alias/.qmail-<mylistemailaddress> +containing something like this:
+|/usr/local/bin/hypermail -i -u -d + /wu-ftpd/mail-archive -l \"WU-FTPD Mailing List + Archive\"+ +
Smartlist / Procmail
+ +If you are using smartlist, + you can call hypermail automatically by enabling rc.local.s20 and + adding a filter. You may also use this filter in a procmail rule. Note that in both cases, we're relying on smartlist/procmail's locks insted of hypermail's:
++ :0 cw + | /usr/local/bin/hypermail -o uselock=0 -i -u -d + /wu-ftpd/mail-archive -l \"WU-FTPD Mailing List + Archive\"+ +
Other ways of automatizing hypermail
+ +On linux, cronjobs and inotify may be two other possibilities for running hypermail.
+ ++ +
Getting Hypermail Software
+ +Please visit The Hypermail Project github repository to +download the latest stable version of Hypermail as well as follow its +development.
+ +Hypermail is available free of charge under GNU Public License version 3 (GPLv3). Please read the LICENSES.txt file for licenses that cover libraries and some functions that are used by Hypermail.
+ ++ +
Getting Help With Hypermail
+ +We don't run any mailing lists anymore. We rely on github for reporting issues, feature requests, bug fixes, publishing releases, and tracking development.
+ +If you're interested in the past history of hypermail and design decisions, you can browse the hypermail developer's mailing list archives (mirror), covering the 1998-2010 activity period.
+ ++ +
Credits
+ +Hypermail was originally developed and designed by + Tom Gruber for Enterprise + Integration Technologies (EIT) in Common Lisp. It was later + rewritten in C by Kevin Hughes + while at EIT.
+ +Hypermail is currently fostered by + José Kahan.
+ +Please refer to the credits page for a list of + people who have contributed to the hypermail project.
+ ++ +
See Also
+hypermail(1), +hmrc(4), Hypermail List Configuration File, +Customizing Hypermail +Pages, Adding +a Search Engines to your Hypermail +Archive+
+ +
Last updated May 24, 2023
+ + + diff --git a/docs/stars.png b/docs/stars.png deleted file mode 100644 index 212902bb..00000000 Binary files a/docs/stars.png and /dev/null differ diff --git a/docs/thanks.html b/docs/thanks.html new file mode 100644 index 00000000..0bb05a35 --- /dev/null +++ b/docs/thanks.html @@ -0,0 +1,111 @@ + + + + + +Thank You!
++
++ ++ This project has been alive for many years. Countless people have provided + feedback that have improved hypermail. +
+ +Thanks to + Tom Gruber, who originally designed and developed Hypermail + in Common Lisp, for the basis of a GREAT + tool.
+ +Thanks to Kevin Hughes for developing the initial C version of + Hypermail and assisting in its transition to the hypermail + project organization. Thanks Kevin!
+ +Thanks to Kent Landfield for having started the hypermail + project organization, the first hypermail project web site, + leading the project 1997 to 2003, and encouraging people to + contribute their patches and ideas. The few years you spent on + hypermail really made the project evolve.
+ +Thanks to Darci Chapman for encouraging Kent to incorporate his + initial "hacks" into the hypermail source code and for the + initial code clean up.
+ +Many thanks to Daniel Stenberg for all the work he did for + adding support for MIME attachments and his trio library.
+ +Thanks to Peter C. McCluskey for his code contributions, for + having curated hypermail from roughly 2003-2008 as well as + keeping hypermail project site + running for so long.
+ +Thanks to Ashley M. Kirchner for having maintained the original + CVS server for hypermail and giving us access to the + repository for transitioning to sourceforge
+ +The following people should be noted for their work and + contributions to Hypermail's development(alphabetic by last name or user handle).
+ +If you have contributed but are missing here, please let us know!
+ ++
+ +- Tom von Alten
+- Bob Crispen
+- Baptiste Daroussin
+- Byron C. Darrah
+- Roy T. Fielding
+- John Finlay
+- Paul Haldane
+- I. Ioannou
+- José Kahan
+- Fumihiro Kato
+- David D. Kilzer
+- Ashley M. Kirchner
+- Dave Kopper
+- Elliot Lee
+- Daigo Matsubara
+- Peter C. McCluskey
+- Christof Meerwald
+- Jared Reisinger
+- James Riordon
+- Scott Rose
+- Martin Schulze
+- Bill Shannon
+- Jay Soffian
+- Glen Stewart
+- Craig A Summerhill
+- Roy Tennant
+- Andy Valencia
+Last, but not least, a BIG THANKS! to the + past members of the (now defunct) Hypermail Development list (1998-2010) + and to the people who participate in the hypermail project + github repository for their encouragement, ideas, bug + fixes, and participation,
+ +Thanks All!
+
+ + + + diff --git a/lcc/config.h b/lcc/config.h index 07fe111d..661c26c2 100644 --- a/lcc/config.h +++ b/lcc/config.h @@ -142,7 +142,7 @@ #define GDBM 1 /* PCRE (Perl regular expressions) */ -#define HAVE_PCRE 1 +#define HAVE_PCRE2 1 /* Whether you want function version of ctype functions */ #undef NO_MACRO diff --git a/lcc/defaults.h b/lcc/defaults.h index 33296ba9..933814a5 100644 --- a/lcc/defaults.h +++ b/lcc/defaults.h @@ -11,6 +11,8 @@ #define CONFIGFILE "~/.hmrc" +#define MSG_FRAGMENT_PREFIX "msg" + #define INLINE_TYPES "image/gif image/jpeg image/png" #define SHOW_HEADERS "From Subject Date Message-ID" @@ -27,8 +29,28 @@ #define DEFAULTINDEX "@defaultindex@" +#define DEFAULT_TOP_INDEX "folders" + #define DOMAINADDR "@domainaddr@" #define ANTISPAM_AT "_at_" +#define APPLE_MAIL_UA_HEADER "X-Mailer" + +#define APPLE_MAIL_UA "Apple iPhone iPad" + +#define DEFAULT_CHARSET "US-ASCII" + +#define HM_ANNOTATION_HEADER "X-Hypermail-Annotated" + +#define HM_DELETED_HEADERS "X-Hypermail-Deleted X-No-Archive" + +#define EXPIRES_HEADER "Expires" + +#define NEW_MSG_COMMAND "mailto:$TO" + +#define REPLYMSG_COMMAND "not set" + +#define DEFAULT_CSS_URL "hypermail.css" + #endif diff --git a/lcc/pcre.h b/lcc/pcre.h deleted file mode 100644 index a6aa4e93..00000000 --- a/lcc/pcre.h +++ /dev/null @@ -1,653 +0,0 @@ -/************************************************* -* Perl-Compatible Regular Expressions * -*************************************************/ - -/* This is the public header file for the PCRE library, to be #included by -applications that call the PCRE functions. - - Copyright (c) 1997-2012 University of Cambridge - ------------------------------------------------------------------------------ -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of the University of Cambridge nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------ -*/ - -#ifndef _PCRE_H -#define _PCRE_H - -/* The current PCRE version information. */ - -#define PCRE_MAJOR 8 -#define PCRE_MINOR 32 -#define PCRE_PRERELEASE -#define PCRE_DATE 2012-11-30 - -/* When an application links to a PCRE DLL in Windows, the symbols that are -imported have to be identified as such. When building PCRE, the appropriate -export setting is defined in pcre_internal.h, which includes this file. So we -don't change existing definitions of PCRE_EXP_DECL and PCRECPP_EXP_DECL. */ - -#if defined(_WIN32) && !defined(PCRE_STATIC) -# ifndef PCRE_EXP_DECL -# define PCRE_EXP_DECL extern __declspec(dllimport) -# endif -# ifdef __cplusplus -# ifndef PCRECPP_EXP_DECL -# define PCRECPP_EXP_DECL extern __declspec(dllimport) -# endif -# ifndef PCRECPP_EXP_DEFN -# define PCRECPP_EXP_DEFN __declspec(dllimport) -# endif -# endif -#endif - -/* By default, we use the standard "extern" declarations. */ - -#ifndef PCRE_EXP_DECL -# ifdef __cplusplus -# define PCRE_EXP_DECL extern "C" -# else -# define PCRE_EXP_DECL extern -# endif -#endif - -#ifdef __cplusplus -# ifndef PCRECPP_EXP_DECL -# define PCRECPP_EXP_DECL extern -# endif -# ifndef PCRECPP_EXP_DEFN -# define PCRECPP_EXP_DEFN -# endif -#endif - -/* Have to include stdlib.h in order to ensure that size_t is defined; -it is needed here for malloc. */ - -#include
CONTENT_TYPE: %s\n", ci->content_type); - if (ci->server_name != NULL) - printf("
SERVER_NAME: %s\n", ci->server_name); - if (ci->server_software != NULL) - printf("
SERVER_SOFTWARE: %s\n", ci->server_software); - if (ci->gateway_interface != NULL) - printf("
GATEWAY_INTERFACE: %s\n", ci->gateway_interface); - if (ci->server_protocol != NULL) - printf("
SERVER_PROTOCOL: %s\n", ci->server_protocol); - if (ci->server_port != NULL) - printf("
SERVER_PORT: %s\n", ci->server_port); - if (ci->request_method != NULL) - printf("
REQUEST_METHOD: %s\n", ci->request_method); - if (ci->http_accept != NULL) - printf("
HTTP_ACCEPT: %s\n", ci->http_accept); - if (ci->path_info != NULL) - printf("
PATH_INFO: %s\n", ci->path_info); - if (ci->path_translated != NULL) - printf("
PATH_TRANSLATED: %s\n", ci->path_translated); - if (ci->script_name != NULL) - printf("
SCRIPT_NAME: %s\n", ci->script_name); - if (ci->query_string != NULL) - printf("
QUERY_STRING: %s\n", ci->query_string); - if (ci->remote_host != NULL) - printf("
REMOTE_HOST: %s\n", ci->remote_host); - if (ci->remote_addr != NULL) - printf("
REMOTE_ADDR: %s\n", ci->remote_addr); - if (ci->auth_type != NULL) - printf("
AUTH_TYPE: %s\n", ci->auth_type); - if (ci->remote_user != NULL) - printf("
REMOTE_USER: %s\n", ci->remote_user); - if (ci->remote_ident != NULL) - printf("
REMOTE_IDENT: %s\n", ci->remote_ident); - return; -} diff --git a/libcgi/form_tags.c b/libcgi/form_tags.c deleted file mode 100644 index f2fe6a44..00000000 --- a/libcgi/form_tags.c +++ /dev/null @@ -1,59 +0,0 @@ -/* -** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp. -** VeriFone Inc./Hewlett-Packard. All Rights Reserved. -** Kevin Hughes, kev@kevcom.com 3/11/94 -** Kent Landfield, kent@landfield.com 4/6/97 -** -** This program and library is free software; you can redistribute it and/or -** modify it under the terms of the GNU (Library) General Public License -** as published by the Free Software Foundation; either version 2 -** of the License, or 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 (Library) General Public License for more details. -** -** You should have received a copy of the GNU (Library) 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 -*/ - -/* - * This file is part of the LIBCGI library - * - */ - -#include "cgi.h" - -void print_sel_list(char *tname, char **opts, char *init) -{ - printf("", stdout); -} - -void print_input_blank(char *tname, unsigned int size, - unsigned int maxlength, char *init) -{ - printf("", stdout); -} - -void print_submit(char *label) -{ - printf("", stdout); -} diff --git a/libcgi/get_cgi_info.c b/libcgi/get_cgi_info.c deleted file mode 100644 index 9ad918db..00000000 --- a/libcgi/get_cgi_info.c +++ /dev/null @@ -1,52 +0,0 @@ -/* -** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp. -** VeriFone Inc./Hewlett-Packard. All Rights Reserved. -** Kevin Hughes, kev@kevcom.com 3/11/94 -** Kent Landfield, kent@landfield.com 4/6/97 -** -** This program and library is free software; you can redistribute it and/or -** modify it under the terms of the GNU (Library) General Public License -** as published by the Free Software Foundation; either version 2 -** of the License, or 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 (Library) General Public License for more details. -** -** You should have received a copy of the GNU (Library) 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 -*/ - -/* - * This file is part of the LIBCGI library - * - */ - -#include "cgi.h" - -int get_cgi_info(cgi_info *ci) -{ - char *s; - - ci->content_length = (s = getenv("CONTENT_LENGTH")) ? atoi(s) : 0; - ci->content_type = getenv("CONTENT_TYPE"); - ci->server_software = getenv("SERVER_SOFTWARE"); - ci->gateway_interface = getenv("GATEWAY_INTERFACE"); - ci->server_protocol = getenv("SERVER_PROTOCOL"); - ci->server_port = getenv("SERVER_PORT"); - ci->request_method = getenv("REQUEST_METHOD"); - ci->http_accept = getenv("HTTP_ACCEPT"); - ci->path_info = getenv("PATH_INFO"); - ci->path_translated = getenv("PATH_TRANSLATED"); - ci->script_name = getenv("SCRIPT_NAME"); - ci->query_string = getenv("QUERY_STRING"); - ci->remote_host = getenv("REMOTE_HOST"); - ci->remote_addr = getenv("REMOTE_ADDR"); - ci->remote_user = getenv("REMOTE_USER"); - ci->auth_type = getenv("AUTH_TYPE"); - ci->remote_user = getenv("REMOTE_USER"); - ci->remote_ident = getenv("REMOTE_IDENT"); - return (ci->server_name = getenv("SERVER_NAME")) != NULL; -} diff --git a/libcgi/html.c b/libcgi/html.c deleted file mode 100644 index 729ddf38..00000000 --- a/libcgi/html.c +++ /dev/null @@ -1,50 +0,0 @@ -/* -** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp. -** VeriFone Inc./Hewlett-Packard. All Rights Reserved. -** Kevin Hughes, kev@kevcom.com 3/11/94 -** Kent Landfield, kent@landfield.com 4/6/97 -** -** This program and library is free software; you can redistribute it and/or -** modify it under the terms of the GNU (Library) General Public License -** as published by the Free Software Foundation; either version 2 -** of the License, or 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 (Library) General Public License for more details. -** -** You should have received a copy of the GNU (Library) 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 -*/ - -/* - * This file is part of the LIBCGI library - * - */ - -#include "cgi.h" - -void print_doc_begin(char *title) -{ - printf("
%s
\n
", - title); -} - -void print_doc_end(char *text) -{ - char *w; - - puts("
"); - if (text && *text) - puts(text); - else if ((w = getenv("WEBMASTER"))) - printf("%s\n", w); -} - -void print_logo(void) -{ - printf("


CGI Library
--These functions help you write virtual document (CGI) programs using C. -Look at the template.c file for an illustrative -example. Feel free to download -the latest -distributions from ftp.hypermail.org. -
- -
-
-
- main() -
- cgi_main(cgi_info *ci) -
- int get_cgi_info(cgi_info *) -
- form_entry *get_form_entries(cgi_info *) -
- void free_form_entries(cgi_info *) -
- char *parmval(form_entry *, char *) -
- int syn_mimeheader(char *, char *) -
- int print_mimeheader(char *) -
- int syn_base_url(char *, cgi_info *) -
- int print_base_url(cgi_info *) -
- int mcode(cgi_info *) -
- void print_sel_list(char *tname, char **opts, char *init) -
- void print_input_blank(char *tname, unsigned size, char *init) -
- void print_submit(char *label) -
- char *trim(char *s) -
- char *sanitize(char *to, char *from) -
- char *strmaxcpy(char *s1, char *s2, int n) -
-
Synopsis
--#include "libcgi/cgi.h" -main() -cgi_main(cgi_info *ci) -- -
Description
-libcgi contains a simple stub of a main program, which merely -callscgi_main()
with a struct filled with all the CGI
-vars. Thus cgi_main is actually the entry point for
-your CGI-processing code. It is this way to be upwardly-compatible
-with a scheme for virtual document "daemons" that we're hatching.
-
--
Synopsis
--#include "libcgi/cgi.h" -int get_cgi_info(cgi_info *) --
Description
-This routine paws through the environment and fills up the struct -provided, which must already be allocated. -
-This function is called by main
, and the result passed to
-cgi_main
.
-
-
Returns
-0 if there is a problem. - -- -
Synopsis
--#include "libcgi/cgi.h" -form_entry *get_form_entries(cgi_info *) -void free_form_entries(cgi_info *) -char *parmval(form_entry *, char *) --
Description
-get_form_entries parses any form inputs information into a linked-list -of name/value pairs, returning the head pointer of that list. It does -all plus-to-space and hex code translations. --free_form_entries reclaims all the memory from the provided linked-list. -
-parmval return the value corresponding to the name in the second -argument (a caseless string compar) by a linear search through the list -in the first argument. - -
Returns
-get_form_enties returns the head pointer, or NULL if there is a problem -or no form input information was available. - -parmval returns the corresponding value string or NULL if there is a -problem or no matching name. - -- -
Synopsis
--#include "libcgi/cgi.h" -int syn_mimeheader(char *, char *) -int print_mimeheader(char *) --
Description
-syn_mimeheader creates a MIME header based on the MIME type in -the second string and writes it into the first string buffer -(including trailing double-newline). --print_mimeheader creates the same MIME header based on the MIME -type in its sole argument, and prints it to stdout - -
Returns
-both return 0 if there is a problem - -- -
Synopsis
--#include "libcgi/cgi.h" -int syn_base_url(char *, cgi_info *) -int print_base_url(cgi_info *) --
Description
-syn_base_url reconstructs the virtual document's URL given the -cgi_info, minus any query string, and fills the provided char -buffer. --print_base_url does the same but prints to stdout instead - -
Returns
-both return 0 if there is a problem - -- -
Synopsis
--#include "libcgi/cgi.h" -int mcode(cgi_info *) --
Description
-This function examines the request_method in the cgi information -and returns an integer code. These codes are defined in cgi.h. - -Returns
-0 if it doesn't recognize the method name, otherwise the code as -defined in cgi.h - -- -
Synopsis
--#include "libcgi/cgi.h" -void print_sel_list(char *tname, char **opts, char *init) --
Description
-Prints an HTML+ selection list construct to stdout. The name of -the SELECT tag is given by tname, and the NULL-terminated string -array opts is turned into separate OPTION tags with values -corresponding to entries in opts. If any of these entries -are a caseless match with init, then that OPTION tag is the -default selection. - -- -
Synopsis
--#include "libcgi/cgi.h" -void print_input_blank(char *tname, unsigned size, char *init) --
Description
-Prints an HTML+ INPUT tag (of type text) to stdout. The tag's -name is tname, its size is size, and initial value is init. - -- -
Synopsis
--#include "libcgi/cgi.h" -void print_submit(char *label) --
Description
-Prints an HTML+ INPUT tag of type submit to stdout. The submit -button will be labelled by label if non-NULL. - -- -
Synopsis
--#include "libcgi/cgi.h" -char *trim(char *s) --
Description
-Changes the string from blank-padded to NULL-padded - -Returns
-its argument - -- -
Synopsis
--#include "libcgi/cgi.h" -char *sanitize(char *to, char *from) --
Description
-Prepares the string for inclusion in a URL. That is, the from -string is copied to the to buffer except that blanks are turned -into '+' characters and non-alphanumerics are turned into -3-character sequences of a '%' followed by two hex digits -corresponding to the ascii code. - -Returns
-the to string - -- -
Synopsis
--#include "libcgi/cgi.h" -char *strmaxcpy(char *s1, char *s2, int n) -- -
Description
-copies at most n-1 characters from s2 into s1, and then -null-terminates. Handy for truncating while copying. - -Returns
-s1 as long as n > 0, NULL otherwise - --
-hypermail@hypermail.org - - - diff --git a/libcgi/main.c b/libcgi/main.c deleted file mode 100644 index 51678423..00000000 --- a/libcgi/main.c +++ /dev/null @@ -1,38 +0,0 @@ -/* -** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp. -** VeriFone Inc./Hewlett-Packard. All Rights Reserved. -** Kevin Hughes, kev@kevcom.com 3/11/94 -** Kent Landfield, kent@landfield.com 4/6/97 -** -** This program and library is free software; you can redistribute it and/or -** modify it under the terms of the GNU (Library) General Public License -** as published by the Free Software Foundation; either version 2 -** of the License, or 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 (Library) General Public License for more details. -** -** You should have received a copy of the GNU (Library) 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 -*/ - -/* - * This file is part of the LIBCGI library - * - */ - -#include "cgi.h" - -void cgi_main(cgi_info *ci); - -int main(void) -{ - cgi_info ci; - - get_cgi_info(&ci); - cgi_main(&ci); - return (0); -} diff --git a/libcgi/mcode.c b/libcgi/mcode.c deleted file mode 100644 index 891a3e3d..00000000 --- a/libcgi/mcode.c +++ /dev/null @@ -1,43 +0,0 @@ -/* -** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp. -** VeriFone Inc./Hewlett-Packard. All Rights Reserved. -** Kevin Hughes, kev@kevcom.com 3/11/94 -** Kent Landfield, kent@landfield.com 4/6/97 -** -** This program and library is free software; you can redistribute it and/or -** modify it under the terms of the GNU (Library) General Public License -** as published by the Free Software Foundation; either version 2 -** of the License, or 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 (Library) General Public License for more details. -** -** You should have received a copy of the GNU (Library) 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 -*/ - -/* - * This file is part of the LIBCGI library - * - */ - -#include "cgi.h" - -int mcode(cgi_info *ci) -{ - if (ci->request_method == NULL) - return 0; - else if (!strncasecmp(ci->request_method, "GET", 3)) - return MCODE_GET; - else if (!strncasecmp(ci->request_method, "POST", 4)) - return MCODE_POST; - else if (!strncasecmp(ci->request_method, "PUT", 3)) - return MCODE_PUT; - else if (!strncasecmp(ci->request_method, "HEAD", 4)) - return MCODE_HEAD; - else - return 0; -} diff --git a/libcgi/strops.c b/libcgi/strops.c deleted file mode 100644 index a402b4cb..00000000 --- a/libcgi/strops.c +++ /dev/null @@ -1,69 +0,0 @@ -/* -** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp. -** VeriFone Inc./Hewlett-Packard. All Rights Reserved. -** Kevin Hughes, kev@kevcom.com 3/11/94 -** Kent Landfield, kent@landfield.com 4/6/97 -** -** This program and library is free software; you can redistribute it and/or -** modify it under the terms of the GNU (Library) General Public License -** as published by the Free Software Foundation; either version 2 -** of the License, or 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 (Library) General Public License for more details. -** -** You should have received a copy of the GNU (Library) 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 -*/ - -/* -** This file is part of the LIBCGI library -** -*/ - -#include "cgi.h" - -char *trim(char *s) -{ - char *t = s; - - while (*t) - t++; - while (t > s && *--t == ' ') - *t = 0; - return s; -} - -#if 0 -char *sanitize(char *buf, char *s) -{ - char *t; - - for (t = buf; *s; s++) - if (*s == ' ') - *t++ = '+'; - else if (isalnum(*s)) - *t++ = *s; - else { - sprintf(t, "%%%2X", *s); - t += 3; - } - *t = '\0'; - return buf; -} -#endif - -char *strmaxcpy(char *dest, char *src, int n) -{ - char *d = dest; - - if (n < 1) - return NULL; - while (--n && *src) - *d++ = *src++; - *d = 0; - return dest; -} diff --git a/libcgi/syn_mime.c b/libcgi/syn_mime.c deleted file mode 100644 index f412be6c..00000000 --- a/libcgi/syn_mime.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp. -** VeriFone Inc./Hewlett-Packard. All Rights Reserved. -** Kevin Hughes, kev@kevcom.com 3/11/94 -** Kent Landfield, kent@landfield.com 4/6/97 -** -** This program and library is free software; you can redistribute it and/or -** modify it under the terms of the GNU (Library) General Public License -** as published by the Free Software Foundation; either version 2 -** of the License, or 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 (Library) General Public License for more details. -** -** You should have received a copy of the GNU (Library) 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 -*/ - -/* - * This file is part of the LIBCGI library - * - */ - -#include "cgi.h" - -#if 0 -int syn_mimeheader(char *buf, char *ct) -{ - int x; - - if (buf && ct) { - x = (int)sprintf(buf, "Content-Type: %s\n\n", ct); - return (x && x != EOF); - } - else - return 0; -} -#endif - -int print_mimeheader(const char *ct) -{ - return (ct && (printf("Content-Type: %s\n\n", ct) != EOF)); -} diff --git a/libcgi/syn_url.c b/libcgi/syn_url.c deleted file mode 100644 index 908e2dce..00000000 --- a/libcgi/syn_url.c +++ /dev/null @@ -1,50 +0,0 @@ -/* -** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp. -** VeriFone Inc./Hewlett-Packard. All Rights Reserved. -** Kevin Hughes, kev@kevcom.com 3/11/94 -** Kent Landfield, kent@landfield.com 4/6/97 -** -** This program and library is free software; you can redistribute it and/or -** modify it under the terms of the GNU (Library) General Public License -** as published by the Free Software Foundation; either version 2 -** of the License, or 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 (Library) General Public License for more details. -** -** You should have received a copy of the GNU (Library) 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 -*/ - -/* - * This file is part of the LIBCGI library - * - */ - -#include "cgi.h" - -#if 0 -int syn_base_url(char *buf, cgi_info *ci) -{ - int x; - - if (ci && buf) { - x = - (int)sprintf(buf, "http://%s:%s%s", ci->server_name, - ci->server_port, ci->script_name); - return (x && x != EOF); - } - else - return 0; -} -#endif - -int print_base_url(cgi_info *ci) -{ - return (ci && - (printf("http://%s:%s%s", ci->server_name, ci->server_port, - ci->script_name) != EOF)); -} diff --git a/libcgi/template.c b/libcgi/template.c deleted file mode 100644 index 86d9789f..00000000 --- a/libcgi/template.c +++ /dev/null @@ -1,72 +0,0 @@ -/* -** Copyright (C) 1994, 1995 Enterprise Integration Technologies Corp. -** VeriFone Inc./Hewlett-Packard. All Rights Reserved. -** Kevin Hughes, kev@kevcom.com 3/11/94 -** Kent Landfield, kent@landfield.com 4/6/97 -** -** This program and library is free software; you can redistribute it and/or -** modify it under the terms of the GNU (Library) General Public License -** as published by the Free Software Foundation; either version 2 -** of the License, or 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 (Library) General Public License for more details. -** -** You should have received a copy of the GNU (Library) 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 -*/ - -/* - * This file is part of the LIBCGI library - * - */ - -#include "cgi.h" - -void cgi_main(cgi_info *ci) -{ - char *parmval(); - form_entry *parms, *p; - form_entry *get_form_entries(); - char *foo, *bar; - - print_mimeheader("text/html"); - - puts("
Your heading here
"); - - parms = get_form_entries(ci); - if (parms) { - /* extract specific form parameters */ - for (p = parms; p; p = p->next) { - if (strcasecmp(p->name, "foo")) - foo = p->val; - else if (strcasecmp(p->name, "bar")) - bar = p->val; - } - } - - switch (mcode(ci)) { - - case MCODE_HEAD: - return; - - case MCODE_GET: - puts("Your GET response here"); - printf("based on foo=%s and bar=%s.\n", foo, bar); - break; - - case MCODE_POST: - puts("Your POST response here"); - printf("based on foo=%s and bar=%s.\n", foo, bar); - break; - - default: - printf("Unrecognized method '%s'.\n", ci->request_method); - } - - free_form_entries(parms); -} diff --git a/m4/apr.m4 b/m4/apr.m4 new file mode 100644 index 00000000..ebc6a54d --- /dev/null +++ b/m4/apr.m4 @@ -0,0 +1,140 @@ +dnl Some macros borrowed from Apache's httpd config file. Thanks! + +dnl +dnl APR_SUBDIR_CONFIG(dir [, sub-package-cmdline-args, args-to-drop]) +dnl +dnl dir: directory to find configure in +dnl sub-package-cmdline-args: arguments to add to the invocation (optional) +dnl args-to-drop: arguments to drop from the invocation (optional) +dnl +dnl Note: This macro relies on ac_configure_args being set properly. +dnl +dnl The args-to-drop argument is shoved into a case statement, so +dnl multiple arguments can be separated with a |. +dnl +dnl Note: Older versions of autoconf do not single-quote args, while 2.54+ +dnl places quotes around every argument. So, if you want to drop the +dnl argument called --enable-layout, you must pass the third argument as: +dnl [--enable-layout=*|\'--enable-layout=*] +dnl +dnl Trying to optimize this is left as an exercise to the reader who wants +dnl to put up with more autoconf craziness. I give up. +dnl +AC_DEFUN([APR_SUBDIR_CONFIG], [ + # save our work to this point; this allows the sub-package to use it + AC_CACHE_SAVE + + echo "configuring package in $1 now" + ac_popdir=`pwd` + apr_config_subdirs="$1" + test -d $1 || $mkdir_p $1 + ac_abs_srcdir=`(cd $srcdir/$1 && pwd)` + cd $1 + +changequote(, )dnl + # A "../" for each directory in /$config_subdirs. + ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` +changequote([, ])dnl + + # Make the cache file pathname absolute for the subdirs + # required to correctly handle subdirs that might actually + # be symlinks + case "$cache_file" in + /*) # already absolute + ac_sub_cache_file=$cache_file ;; + *) # Was relative path. + ac_sub_cache_file="$ac_popdir/$cache_file" ;; + esac + + ifelse($3, [], [apr_configure_args=$ac_configure_args],[ + apr_configure_args= + apr_sep= + for apr_configure_arg in $ac_configure_args + do + case "$apr_configure_arg" in + $3) + continue ;; + esac + apr_configure_args="$apr_configure_args$apr_sep'$apr_configure_arg'" + apr_sep=" " + done + ]) + + dnl autoconf doesn't add --silent to ac_configure_args; explicitly pass it + test "x$silent" = "xyes" && apr_configure_args="$apr_configure_args --silent" + + dnl AC_CONFIG_SUBDIRS silences option warnings, emulate this for 2.62 + apr_configure_args="--disable-option-checking $apr_configure_args" + + dnl The eval makes quoting arguments work - specifically the second argument + dnl where the quoting mechanisms used is "" rather than []. + dnl + dnl We need to execute another shell because some autoconf/shell combinations + dnl will choke after doing repeated APR_SUBDIR_CONFIG()s. (Namely Solaris + dnl and autoconf-2.54+) + if eval $SHELL $ac_abs_srcdir/configure $apr_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir $2 + then : + echo "$1 configured properly" + else + echo "configure failed for $1" + exit 1 + fi + + cd $ac_popdir + + # grab any updates from the sub-package + AC_CACHE_LOAD +])dnl + +dnl +dnl APR_ADDTO(variable, value) +dnl +dnl Add value to variable +dnl +AC_DEFUN([APR_ADDTO], [ + if test "x$$1" = "x"; then + test "x$silent" != "xyes" && echo " setting $1 to \"$2\"" + $1="$2" + else + apr_addto_bugger="$2" + for i in $apr_addto_bugger; do + apr_addto_duplicate="0" + for j in $$1; do + if test "x$i" = "x$j"; then + apr_addto_duplicate="1" + break + fi + done + if test $apr_addto_duplicate = "0"; then + test "x$silent" != "xyes" && echo " adding \"$i\" to $1" + $1="$$1 $i" + fi + done + fi +])dnl + +dnl +dnl APR_REMOVEFROM(variable, value) +dnl +dnl Remove a value from a variable +dnl +AC_DEFUN([APR_REMOVEFROM], [ + if test "x$$1" = "x$2"; then + test "x$silent" != "xyes" && echo " nulling $1" + $1="" + else + apr_new_bugger="" + apr_removed=0 + for i in $$1; do + if test "x$i" != "x$2"; then + apr_new_bugger="$apr_new_bugger $i" + else + apr_removed=1 + fi + done + if test $apr_removed = "1"; then + test "x$silent" != "xyes" && echo " removed \"$2\" from $1" + $1=$apr_new_bugger + fi + fi +]) dnl diff --git a/patchlevel.h b/patchlevel.h index 389e0790..542bc256 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -1,2 +1,2 @@ -#define VERSION "2.4.0" -#define PATCHLEVEL "0" +#define VERSION "3.0.0" + diff --git a/src/Makefile.in b/src/Makefile.in index 2838fa4b..4344107c 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -14,9 +14,6 @@ bindir=@bindir@ # This is where the man page goes mandir=@mandir@ -# This is where your CGI programs live -cgidir=@cgidir@ - # Executable program suffix (.exe for windows, null for Unix systems) SUFFIX=@suffix@ @@ -28,44 +25,51 @@ INSTALL_PROG=@INSTALL@ SPLINTFLAGS=@INCLUDES@ -PCRE_DEP=@PCRE_DEP@ +PCRE2_DEP=@PCRE2_DEP@ TRIO_DEP=@TRIO_DEP@ FNV_DEP=@FNV_DEP@ #WNOERROR=-Werror -#WARNINGS=$(WNOERROR) -ansi -pedantic -Wall -Wtraditional -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Dlint +# Note that -ansi and -std=iso9899:199409 seem to be equivalent in gcc as it +# doesn't support the +# for clang -std=c90 +# @@ make this part of autoconf? +#WARNINGS=$(WNOERROR) -Wall -Wextra -std=iso9899:199409 -pedantic -Wno-overlength-strings -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Dlint + +# While waiting to put this in configure.ac +# Note: if you're debugging memory issues (leaks, overruns, unallocated memory use) +# Add the folowing two warnings -fsanitize=address -fno-omit-frame-pointer +# and -static-libasan to LIBS CFLAGS=@CFLAGS@ $(WARNINGS) CPPFLAGS=@CPPFLAGS@ @INCLUDES@ YACC=@YACC@ -NETLIBS=@LIBS@ LDFLAGS=@LDFLAGS@ -MISC_LIBS= -lpcre -ltrio -lm +MISC_LIBS= -lpcre2-8 -ltrio -lm OPT_LIBS=@EXTRA_LIBS@ INCS= domains.h hypermail.h lang.h proto.h \ ../config.h ../patchlevel.h dsprintf.h threadprint.h \ - getdate.h getname.h finelink.h txt2html.h search.h + getdate.h getname.h finelink.h txt2html.h search.h \ + utf8.h SRCS= base64.c date.c domains.c file.c hypermail.c lang.c lock.c \ - mem.c parse.c print.c printfile.c string.c struct.c uudecode.c\ + mem.c parse.c print.c printfile.c printcss.c string.c struct.c uudecode.c\ dmatch.c setup.c threadprint.c getdate.c getname.c\ finelink.c txt2html.c search.c quotes.c OBJS= base64.o date.o domains.o file.o hypermail.o lang.o lock.o \ - mem.o parse.o print.o printfile.o string.o struct.o uudecode.o\ + mem.o parse.o print.o printfile.o printcss.o string.o struct.o uudecode.o\ dmatch.o setup.o threadprint.o getdate.o getname.o\ finelink.o txt2html.o search.o quotes.o -MAILOBJS= mail.o ../libcgi/libcgi.a - .c.o: $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -all: @PCRE_DEP@ @TRIO_DEP@ @FNV_DEP@ hypermail$(SUFFIX) mail$(SUFFIX) lang$(SUFFIX) +all: @PCRE2_DEP@ @TRIO_DEP@ @FNV_DEP@ hypermail$(SUFFIX) lang$(SUFFIX) -pcre/.libs/libpcre.a: - @cd pcre; $(MAKE) CC="$(CC)" ; rm -f .libs/lib*.so* +pcre2/.libs/libpcre2-8.a: + @cd pcre2; $(MAKE) CC="$(CC)" ; rm -f .libs/lib*.so* trio/libtrio.a: @cd trio; $(MAKE) CC="$(CC)" @@ -77,32 +81,24 @@ hypermail$(SUFFIX): $(OBJS) $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(OPT_LIBS) $(MISC_LIBS) chmod 0755 $@ -mail$(SUFFIX): $(MAILOBJS) - $(CC) -o $@ $(CFLAGS) $(MAILOBJS) $(NETLIBS) -lm - chmod 0755 $@ - lang$(SUFFIX): lang.c lang.h $(CC) -DLANG_PROG $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ lang.c $(MISC_LIBS) -../libcgi/libcgi.a: - @cd ../libcgi; $(MAKE) all CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" - getdate.c: getdate.y getdate.h @echo "Expect 13 shift/reduce conflicts." $(YACC) getdate.y @mv -f y.tab.c getdate.c +convert-css: ../docs/hypermail.css ../contrib/css_to_c.pl + @echo "Converting ../docs/hypermail.css to printcss.c" + @perl ../contrib/css_to_c.pl ../docs/hypermail.css > printcss.c + install: all @if [ ! -d $(bindir) ]; then mkdir -p $(bindir); fi $(INSTALL_PROG) -s -c -m 0755 hypermail$(SUFFIX) $(bindir) -mail.install: - @if [ ! -d $(cgidir) ]; then mkdir -p $(cgidir); fi - $(INSTALL_PROG) -s -c -m 0755 mail$(SUFFIX) $(cgidir) - uninstall: rm -f $(bindir)/hypermail$(SUFFIX) - rm -f $(cgidir)/mail$(SUFFIX) insight: $(MAKE) CC="insight" @@ -122,31 +118,24 @@ splint: lint: lint $(SRCS) 2>&1 | tee lint.out -lint_mail: - lint mail.c 2>&1 | tee lint.out - @(cd ../libcgi; $(MAKE) lint 2>&1 | tee -a ../lint.out) - clean: - rm -f hypermail$(SUFFIX) mail$(SUFFIX) lang$(SUFFIX) + rm -f hypermail$(SUFFIX) lang$(SUFFIX) rm -f *.o .pure *qx *qv *.ln core rm -f .inslog tca.map lint.out splint.out rm -f getdate.c - @(if test "$(PCRE_DEP)" != "" ; then cd pcre; $(MAKE) clean; fi) + @(if test "$(PCRE2_DEP)" != "" ; then cd pcre2; $(MAKE) clean; fi) @(if test "$(TRIO_DEP)" != "" ; then cd trio; $(MAKE) clean; fi) @(if test "$(FNV_DEP)" != "" ; then cd fnv; $(MAKE) clean; fi) - @cd ../libcgi; $(MAKE) clean clobber: clean - @(if test "$(PCRE_DEP)" != "" ; then cd pcre; rm -f *.lock; fi) + @(if test "$(PCRE_DEP2)" != "" ; then cd pcre2; rm -f *.lock; fi) @(if test "$(TRIO_DEP)" != ""; then cd trio; rm -f *.lock; fi) @(if test "$(FNV_DEP)" != "" ; then cd fnv; $(MAKE) clobber; fi) - @cd ../libcgi; $(MAKE) clobber distclean: clobber - @(if test "$(PCRE_DEP)" != "" ; then cd pcre; $(MAKE) distclean; fi) + @(if test "$(PCRE2_DEP)" != "" ; then cd pcre2; $(MAKE) distclean; fi) @(if test "$(TRIO_DEP)" != ""; then cd trio; $(MAKE) clean; fi) @(if test "$(FNV_DEP)" != "" ; then cd fnv; $(MAKE) distclean; fi) - @cd ../libcgi; $(MAKE) distclean # # Regenerate this dependency list with gcc -MM *.c: @@ -170,15 +159,18 @@ hypermail.o: hypermail.c hypermail.h ../config.h ../patchlevel.h proto.h \ lang.o: lang.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h lock.o: lock.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h \ setup.h -mail.o: mail.c ../libcgi/cgi.h ../libcgi/../config.h ../config.h mem.o: mem.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h parse.o: parse.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h \ setup.h struct.h uudecode.h base64.h search.h getname.h parse.h print.h print.o: print.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h \ setup.h struct.h printfile.h print.h parse.h txt2html.h finelink.h \ threadprint.h +printcss.o: printcss.c hypermail.h ../config.h ../patchlevel.h proto.h \ + lang.h setup.h printfile.o: printfile.c hypermail.h ../config.h ../patchlevel.h proto.h \ lang.h setup.h print.h printfile.h struct.h +printcss.o: printcss.c hypermail.h ../config.h ../patchlevel.h proto.h \ + lang.h setup.h quotes.o: quotes.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h \ setup.h search.o: search.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h \ @@ -186,7 +178,7 @@ search.o: search.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h \ setup.o: setup.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h \ defaults.h setup.h struct.h print.h string.o: string.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h \ - setup.h parse.h uconvert.h + setup.h parse.h uconvert.h utf8.h struct.o: struct.c hypermail.h ../config.h ../patchlevel.h proto.h lang.h \ dmatch.h setup.h struct.h parse.h getname.h threadprint.o: threadprint.c hypermail.h ../config.h ../patchlevel.h \ @@ -195,3 +187,4 @@ txt2html.o: txt2html.c hypermail.h ../config.h ../patchlevel.h proto.h \ lang.h setup.h print.h finelink.h txt2html.h uudecode.o: uudecode.c hypermail.h ../config.h ../patchlevel.h proto.h \ lang.h setup.h uudecode.h + diff --git a/src/base64.c b/src/base64.c index b28b92ec..a34b28cf 100644 --- a/src/base64.c +++ b/src/base64.c @@ -10,85 +10,146 @@ ** ** - Encoded strings that ended with more than one = caused the decode ** function+ to generate 3 extra zero bytes at the end of the output. +** +** CHANGES by Andy Valencia - May 15 2023: +** +** - Preserve decoding state between calls to the +** base64_stream_decode() function to take into account UA that +** output intermediate base64 lines that are not always multiple of +** four. */ #include "hypermail.h" #include "base64.h" -void base64Decode(char *intext, char *out, int *length) +/* + * base64_decoder_state_new() + * Allocate a new base64 decoder state + */ +struct base64_decoder_state *base64_decoder_state_new(void) +{ + struct base64_decoder_state *st = (struct base64_decoder_state *)emalloc(sizeof(struct base64_decoder_state)); + if (!st) { + return(0); + } + memset(st, 0, sizeof(struct base64_decoder_state)); + return(st); +} + +/* + * base64_decoder_state_free() + * Release storage + */ +void base64_decoder_state_free(struct base64_decoder_state *st) +{ + free(st); +} + +/* + * base64_decode_stream() + * + * Accept base64 "intext", + * place resulting decoded output in a null-terminated "out". + * + * "st" is our state, which will be updated and can carry state between + * calls. + */ +int base64_decode_stream(struct base64_decoder_state *st, const char *intext, char *out) { - unsigned char ibuf[4]; - unsigned char obuf[3]; char ignore; - char endtext = FALSE; char ch; - int lindex = 0; - *length = 0; - - memset(ibuf, 0, sizeof(ibuf)); + int length; + + /* Ignore trailing garbage */ + if (st->endtext) { + *out = '\0'; + return(0); + } + length = 0; while (*intext) { ch = *intext; - ignore = FALSE; - if ((ch >= 'A') && (ch <= 'Z')) + + if ((ch >= 'A') && (ch <= 'Z')) { ch = ch - 'A'; - else if ((ch >= 'a') && (ch <= 'z')) + } else if ((ch >= 'a') && (ch <= 'z')) { ch = ch - 'a' + 26; - else if ((ch >= '0') && (ch <= '9')) + } else if ((ch >= '0') && (ch <= '9')) { ch = ch - '0' + 52; - else if (ch == '+') + } else if (ch == '+') { ch = 62; - else if (ch == '=') { /* end of text */ - if (endtext) + } else if (ch == '=') { /* end of text */ + if (st->endtext) { break; - endtext = TRUE; - lindex--; - if (lindex < 0) - lindex = 3; - } - else if (ch == '/') + } + st->endtext = TRUE; + st->lindex--; + if (st->lindex < 0) { + st->lindex = 3; + } + } else if (ch == '/') { ch = 63; - else if (endtext) + } else if (st->endtext) { break; - else + } else { ignore = TRUE; - + } + if (!ignore) { - if (!endtext) { - ibuf[lindex] = ch; + if (!st->endtext) { + st->ibuf[st->lindex] = ch; - lindex++; - lindex &= 3; /* use bit arithmetic instead of remainder */ + st->lindex++; + st->lindex &= 3; /* use bit arithmetic instead of remainder */ } - if ((0 == lindex) || endtext) { - - obuf[0] = (ibuf[0] << 2) | ((ibuf[1] & 0x30) >> 4); - obuf[1] = - ((ibuf[1] & 0x0F) << 4) | ((ibuf[2] & 0x3C) >> 2); - obuf[2] = ((ibuf[2] & 0x03) << 6) | (ibuf[3] & 0x3F); + if ((0 == st->lindex) || st->endtext) { - switch (lindex) { + st->obuf[0] = (st->ibuf[0] << 2) | ((st->ibuf[1] & 0x30) >> 4); + st->obuf[1] = + ((st->ibuf[1] & 0x0F) << 4) | ((st->ibuf[2] & 0x3C) >> 2); + st->obuf[2] = ((st->ibuf[2] & 0x03) << 6) | (st->ibuf[3] & 0x3F); + + switch (st->lindex) { case 1: - sprintf(out, "%c", obuf[0]); - out++; - (*length)++; + *out++ = st->obuf[0]; + length += 1; break; case 2: - sprintf(out, "%c%c", obuf[0], obuf[1]); - out += 2; - (*length) += 2; + *out++ = st->obuf[0]; + *out++ = st->obuf[1]; + length += 2; break; default: - sprintf(out, "%c%c%c", obuf[0], obuf[1], obuf[2]); - out += 3; - (*length) += 3; + *out++ = st->obuf[0]; + *out++ = st->obuf[1]; + *out++ = st->obuf[2]; + length += 3; break; } - memset(ibuf, 0, sizeof(ibuf)); + memset(st->ibuf, 0, sizeof(st->ibuf)); } } intext++; } *out = 0; + return (length); +} + +/* + * base64_decode_string() + * Convenience wrapper when decoding a single string + */ +int base64_decode_string(const char *intext, char *out) +{ + struct base64_decoder_state *st = base64_decoder_state_new(); + int length = 0; + + if (!st) { + return 0; + } + length = base64_decode_stream(st, intext, out); + base64_decoder_state_free(st); + + return (length); } diff --git a/src/base64.h b/src/base64.h index a0d5b0dc..e98e0977 100644 --- a/src/base64.h +++ b/src/base64.h @@ -1,5 +1,43 @@ +#ifndef _HYPERMAIL_BASE64_H +#define _HYPERMAIL_BASE64_H +/* +** Copyright (C) 1997-2023 Hypermail Project +** +** This program and library is free software; you can redistribute it and/or +** modify it under the terms of the GNU (Library) General Public License +** as published by the Free Software Foundation; either version 3 +** of the License, or 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 (Library) General Public License for more details. +** +** You should have received a copy of the GNU (Library) 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 +*/ + /* ** MIME Decode - base64.c */ -void base64Decode(char *, char *, int *); +/* Common state as you feed successive lines into base64_decode_stream() */ +struct base64_decoder_state { + unsigned char ibuf[4]; /* input buffer */ + unsigned char obuf[3]; /* output buffer */ + int lindex; /* index for ibuf / obuf */ + char endtext; /* base64 end detected */ +}; + +/* allocate and free a base64_state structure */ +struct base64_decoder_state *base64_decoder_state_new(void); +void base64_decoder_state_free(struct base64_decoder_state *); + +/* decode a stream made of multiple base64 lines */ +int base64_decode_stream(struct base64_decoder_state *, const char *, char *); + +/* decode a single string */ +int base64_decode_string(const char *, char *); + +#endif /* _HYPERMAIL_BASE64_H */ diff --git a/src/date.c b/src/date.c index 660c34be..00a632b0 100644 --- a/src/date.c +++ b/src/date.c @@ -3,6 +3,7 @@ ** VeriFone Inc./Hewlett-Packard. All Rights Reserved. ** Kevin Hughes, kev@kevcom.com 3/11/94 ** Kent Landfield, kent@landfield.com 4/6/97 +** Hypermail Project 1998-2023 ** ** This program and library is free software; you can redistribute it and/or ** modify it under the terms of the GNU (Library) General Public License diff --git a/src/defaults.h.in b/src/defaults.h.in index 44bbec97..ca83ef07 100644 --- a/src/defaults.h.in +++ b/src/defaults.h.in @@ -11,6 +11,8 @@ #define CONFIGFILE "~/.hmrc" +#define MSG_FRAGMENT_PREFIX "msg" + #define INLINE_TYPES "image/gif image/jpeg image/png" #define SHOW_HEADERS "From Subject Date Message-ID" @@ -27,10 +29,31 @@ #define DEFAULTINDEX "@defaultindex@" +#define DEFAULT_TOP_INDEX "folders" + #define DOMAINADDR "@domainaddr@" #define ANTISPAM_AT "_at_" +#define APPLE_MAIL_UA_HEADER "X-Mailer" + #define APPLE_MAIL_UA "Apple iPhone iPad" +#define DEFAULT_CHARSET "US-ASCII" + +#define HM_ANNOTATION_HEADER "X-Hypermail-Annotated" + +#define HM_DELETED_HEADERS "X-Hypermail-Deleted X-No-Archive" + +#define EXPIRES_HEADER "Expires" + +#define NEW_MSG_COMMAND "mailto:$TO" + +#define REPLYMSG_COMMAND "not set" + +#define DEFAULT_CSS_URL "hypermail.css" + +/* this is a format string where %s will be replaced by the archive's label */ +#define DEFAULT_MHTML_NAVBAR2UP "- \n
- %s \n
attached mail follows:
", - BODY_HTMLIZED | bodyflags); - bodyflags |= BODY_ATTACHED; - /* @@ should it be 1 or 2 ?? should we use another method? */ -#if 0 - isinheader = 2; + /* if attachname is empty, copy the value of the name attribute, + if given in the Content-Type header */ + _control_attachname(content_type_ptr, attachname, sizeof(attachname)); + } + break; + } #endif - isinheader = 1; - continue; - } - else if (strncasecmp(type, "multipart/", 10)) { - /* - * This is not a multipart and not text - */ - char *fname = NULL; /* attachment filename */ - - /* - * only do anything here if we're not - * ignoring this content - */ - if (CONTENT_IGNORE != content) { + else if (!strncasecmp(type, "message/rfc822", 14)) { + /* + * Here comes an attached mail! This can be ugly, + * since the attached mail may very well itself + * contain attached binaries, or why not another + * attached mail? :-) + * + * We need to store the current boundary separator + * in order to get it back when we're done parsing + * this particular mail, since each attached mail + * will have its own boundary separator that *might* + * be used. + */ + + /* need to take into account alternates with rfc822? */ + if (boundp == NULL && multipartp == NULL) { + /* we have a non multipart message with a message/rfc822 + content-type body */ + bp = addbody(bp, &lp, + NULL, + BODY_ATTACHMENT | BODY_ATTACHMENT_RFC822); + + } else { + free_body(bp); + description = NULL; + bp = lp = headp = NULL; + attachment_rfc822 = TRUE; + } + isinheader = 1; - fname = strcasestr(ptr, "name="); - if (fname) { - fname += 5; - if ('\"' == *fname) - fname++; - sscanf(fname, "%128[^\"]", attachname); - safe_filename(attachname); - } - else { - attachname[0] = '\0'; /* just clear it */ - } + /* RFC2046 states that message/rfc822 can only + have Content-Transfer-Encoding values of 7bit, + 8bit, and binary. Some broken mail clients + may have used something else */ + if (decode != ENCODE_NORMAL) { +#if DEBUG_PARSE + printf("Error: msgid %s : message/rfc822 Content-Type associated with a\n" + "Content-Transfer-Encoding that is not\n7bit, 8bit, or binary.\n" + "Forcing ENCODE_NORMAL\n", msgid); +#endif + if (decode == ENCODE_BASE64) { + base64_decoder_state_free(b64_decoder_state); + b64_decoder_state = NULL; + } + decode = ENCODE_NORMAL; + } + + /* reset the apple mail hack and the + local_set_save_alts as we don't know if the + forwarded message was originally sent from + an apple mal client */ + parse_multipart_alternative_force_save_alts = 0; + applemail_old_set_save_alts = -1; + local_set_save_alts = set_save_alts; + break; + + } /* message/rfc822 */ - file_created = MAKE_FILE; /* please make one */ + else if (strncasecmp(type, "multipart/", 10)) { + /* + * This is not a multipart and not text + */ + + /* + * only do anything here if we're not + * ignoring this content + */ + if (CONTENT_IGNORE != content) { + /* only use the Content-Type name attribute to get + the filename if Content-Disposition didn't + provide a filename */ + _control_attachname(content_type_ptr, attachname, sizeof(attachname)); + file_created = MAKE_FILE; /* please make one */ + content = CONTENT_BINARY; /* uknown turns into binary */ + } + break; + + } /* !multipart/ */ - content = CONTENT_BINARY; /* uknown turns into binary */ - } - continue; - } - else { - /* - * Find the first boundary separator - */ + else { + /* + * Find the first boundary separator + */ + + struct body *tmpbp; + struct body *tmplp; + bool found_start_boundary; + - struct body *tmpbp; - struct body *tmplp; - - boundary_id = strcasestr(ptr, "boundary="); +#if DELETE_ME_CODE_MOVED_UP + boundary_id = strcasestr(content_type_ptr, "boundary="); #if DEBUG_PARSE - printf("boundary found in %s\n", ptr); + printf("boundary found in %s\n", ptr); #endif - if (boundary_id) { - boundary_id = strchr(boundary_id, '='); - if (boundary_id) { - boundary_id++; - while (isspace(*boundary_id)) - boundary_id++; - if ('\"' == *boundary_id) { - sscanf(++boundary_id, "%255[^\"]", - boundbuffer); - } - else - sscanf(boundary_id, "%255[^;\n]", - boundbuffer); - boundary_id = boundbuffer; - } - - /* restart on a new list: */ - tmpbp = tmplp = NULL; - - while (fgets(line_buf, MAXLINE, fp)) { - if(set_append) { - if(fputs(line_buf, fpo) < 0) { - progerr("Can't write to \"mbox\""); /* revisit me */ - } - } - if (!strncmp(line_buf + set_ietf_mbox, "--", 2) && - !strncmp(line_buf + set_ietf_mbox + 2, boundbuffer, - strlen(boundbuffer))) { - break; - } - if (!strncasecmp(line_buf, "From ", 5)) { -#if DEBUG_PARSE - printf("Error, new message found instead of boundary!\n"); #endif - isinheader = 0; - if (tmpbp) - bp = append_body(bp, &lp, tmpbp); - boundary_id = NULL; - goto leave_header; - } - /* save lines in case no boundary found */ - tmpbp = addbody(tmpbp, &tmplp, line_buf, bodyflags); - } - if (!strncmp(line_buf + set_ietf_mbox + 2 + strlen(boundary_id), "--", 2) - && tmpbp) { -#if DEBUG_PARSE - printf("Error, end of mime found before mime start!\n"); + if (boundary_id) { +#if DELETE_ME_CODE_MOVED_UP + boundary_id = strchr(boundary_id, '='); + if (boundary_id) { + boundary_id++; + while (isspace(*boundary_id)) + boundary_id++; + *boundbuffer = '\0'; + if ('\"' == *boundary_id) { + sscanf(++boundary_id, "%255[^\"]", + boundbuffer); + } + else + sscanf(boundary_id, "%255[^;\n]", + boundbuffer); + boundary_id = boundbuffer; + } #endif - /* end of mime found before mime start */ - bp = append_body(bp, &lp, tmpbp); - boundary_id = NULL; - goto leave_header; - } - free_body(tmpbp); - - /* - * This stores the boundary string in a stack - * of strings: - */ - boundp = bound(boundp, boundbuffer); - multipartp = multipart(multipartp, type); - skip_mime_epilogue = FALSE; + + /* restart on a new list: */ + tmpbp = tmplp = NULL; + found_start_boundary = FALSE; + + while (fgets(line_buf, MAXLINE, fp)) { + char *tmpline; - /* printf("set new boundary: %s\n", boundp->line); */ - - /* @@JK Take into account errors when we abort, malformed mime, etc, - probably put this call up, before detecting errors? */ - charsetsp = charsets(charsetsp, charset, charsetsave); -#ifdef DEBUG_PARSE - fprintf(stderr, "pushing charset %s and charsetsave %s\n", charset, charsetsave); -#endif - if (charset) { - free(charset); - charset = NULL; + if(set_append) { + if(fputs(line_buf, fpo) < 0) { + progerr("Can't write to \"mbox\""); /* revisit me */ } - charsetsave[0] = '\0'; + } -#ifdef DEBUG_PARSE - fprintf(stderr, "restoring parents charset %s and charsetsave %s\n", charset, charsetsave); -#endif + tmpline = line_buf + set_ietf_mbox; - /* - * We set ourselves, "back in header" since there is - * gonna come MIME headers now after the separator - */ - isinheader = 1; + /* + ** detect different cases where we may have broken, missing, + ** or unexpected start and end boundaries. + ** Using mutt as a reference on how to process each case + **/ - /* Daniel Stenberg started adding the - * "multipart/alternative" parser 13th of July - * 1998! We check if this is a 'multipart/ - * alternative' header, in which case we need to - * treat it very special. - */ + /* start boundary? */ + if (is_start_boundary(boundary_id, tmpline)) { + found_start_boundary = TRUE; + break; + } + /* new message found */ + if (!strncasecmp(line_buf, "From ", 5)) { +#if DEBUG_PARSE + printf("Error, new message found instead of expected start_boundary: %s\n", boundbuffer); +#endif + break; - if (!strncasecmp - (&ptr[10], "alternative", 11)) { - /* It *is* an alternative session! Alternative - * means there will be X parts with the same text - * using different content-types. We are supposed - * to take the most prefered format of the ones - * used and only output that one. MIME defines - * the order of the texts to start with pure text - * and then continue with more and more obscure - * formats. (well, it doesn't use those terms but - * that's what it means! ;-)) - */ - - /* How "we" are gonna deal with them: - * - * We create a "spare" linked list body for the - * very first part. Since the first part is - * defined to be the most readable, we save that - * in case no content-type present is prefered! - * - * We skip all parts that are not prefered. All - * prefered parts found will replace the first - * one that is saved. When we reach the end of - * the alternatives, we will use the last saved - * one as prefered. - */ - - savealternative = TRUE; + } + /* a preceding non-closed boundary? */ + else if (!strncmp(tmpline, "--", 2) + && ! _is_signature_separator(line)) { + char *tmp_boundary = boundary_stack_has_id(boundp, tmpline); + + boundary_id = tmp_boundary; +#if DEBUG_PARSE + printf("Error, an existing boundary found instead of expected start_boundary: %s\n", boundbuffer); +#endif + break; + } + /* save lines in case no boundary found */ + tmpbp = addbody(tmpbp, &tmplp, tmpline, bodyflags); + } + + /* control we found the start boundary we were expecting */ + if (!found_start_boundary) { #if DEBUG_PARSE - printf("SAVEALTERNATIVE: yes\n"); + printf("Error: didn't find start boundary\n"); + printf("last line read:\n%s", line_buf); #endif + isinheader = 0; + boundary_id = NULL; + + if (tmpbp) { + bp = append_body(bp, &lp, tmpbp, TRUE); } - } - else - boundary_id = NULL; - } - } - else - if (!strncasecmp - (head->line, "Content-Transfer-Encoding:", 26)) { - char *ptr = head->line + 26; + /* downgrading to text/plain */ + strcpy(type, "text/plain"); + content_type_ptr = type; +#if DEBUG_PARSE + printf("Downgrading to text/plain\n"); +#endif + goto leave_header; + } + free_body(tmpbp); + + /* + ** we got a new part coming + */ + current_message_node = + message_node_mimetest(current_message_node, + bp, lp, charset, charsetsave, + type, + (boundp) ? boundp->boundary_id : NULL, + boundary_id, + att_binname, + meta_filename, + att_link, + att_comment_filename, + attachment_rfc822, + message_node_skip_status(file_created, + content, + type)); +#if DEBUG_PARSE_MSGID_TRACE + current_message_node->msgid = strsav(msgid); +#endif + if (alternativeparser) { + current_alt_message_node = current_message_node; + } + if (att_binname) { + free(att_binname); + att_binname = NULL; + } + if (meta_filename) { + free(meta_filename); + meta_filename = NULL; + } + if (att_link) { + free(att_link); + att_link = NULL; + } + if (att_comment_filename) { + free(att_comment_filename); + att_comment_filename = NULL; + } + + if (alternativeparser) { + current_message_node->alternative = TRUE; + } - head->parsedheader = TRUE; - while (isspace(*ptr)) - ptr++; - if (!strncasecmp(ptr, "QUOTED-PRINTABLE", 16)) { - decode = ENCODE_QP; - } - else if (!strncasecmp(ptr, "BASE64", 6)) { - decode = ENCODE_BASE64; - } - else if (!strncasecmp(ptr, "8BIT", 4)) { - decode = ENCODE_NORMAL; - } - else if (!strncasecmp(ptr, "7BIT", 4)) { - decode = ENCODE_NORMAL; - } - else if (!strncasecmp(ptr, "x-uue", 5)) { - decode = ENCODE_UUENCODE; - if (!do_uudecode(fp, line, line_buf, - &raw_text_buf, fpo)) - break; - } - else { - /* Unknown format, we use default decoding */ - char code[64]; + /* + if (!strncasecmp(type, "multipart/related", 17)) { + current_message_node->skip = MN_SKIP_BUT_KEEP_CHILDREN; + } + */ + + if (!root_message_node) { + root_message_node = current_message_node; + } + + /* + * This stores the boundary string in a stack + * of strings: + */ + if (boundp && alternativeparser) { + /* if we were dealing with multipart/alternative or + message/rfc822, store the current content */ + boundp->alternativeparser = alternativeparser; + boundp->alternative_weight = alternative_weight; + boundp->alternative_message_node_created = + alternative_message_node_created; + strcpy(boundp->alternative_file, alternative_file); + strcpy(boundp->alternative_lastfile, alternative_lastfile); + strcpy(boundp->last_alternative_type, last_alternative_type); + boundp->alternative_lp = alternative_lp; + boundp->alternative_bp = alternative_bp; + boundp->current_alt_message_node = current_alt_message_node; + boundp->root_alt_message_node = root_alt_message_node; + current_alt_message_node = root_alt_message_node = NULL; + alternative_file[0] = alternative_lastfile[0] = last_alternative_type[0] = '\0'; + alternative_message_node_created = FALSE; + alternativeparser = FALSE; + } - /* is there any value for content-encoding or is it missing? */ - if (sscanf(ptr, "%63s", code) != EOF) { - - snprintf(line, sizeof(line_buf) - set_ietf_mbox, - " ('%s' %s)\n", code, - lang[MSG_ENCODING_IS_NOT_SUPPORTED]); + boundp = boundary_stack_push(boundp, boundbuffer); + boundp->parse_multipart_alternative_force_save_alts = parse_multipart_alternative_force_save_alts; + boundp->applemail_old_set_save_alts = applemail_old_set_save_alts; + boundp->set_save_alts = local_set_save_alts; + multipartp = multipart_stack_push(multipartp, type); + skip_mime_epilogue = FALSE; - bp = addbody(bp, &lp, line, - BODY_HTMLIZED | bodyflags); + attachment_rfc822 = FALSE; + + description = NULL; + *filename = '\0'; + bp = lp = headp = NULL; + /* printf("set new boundary: %s\n", boundp->boundary_id); */ -#if DEBUG_PARSE - printf("Ignoring unknown Content-Transfer-Encoding: %s\n", code); -#endif - } else { -#if DEBUG_PARSE - printf("Missing Content-Transfer-Encoding value\n"); + if (charset) { + free(charset); + charset = NULL; + } + charsetsave[0] = '\0'; + +#ifdef DEBUG_PARSE + fprintf(stderr, "restoring parents charset %s and charsetsave %s\n", charset, charsetsave); #endif - } - } + + /* + * We set ourselves, "back in header" since there is + * gonna come MIME headers now after the separator + */ + isinheader = 1; + + /* Daniel Stenberg started adding the + * "multipart/alternative" parser 13th of July + * 1998! We check if this is a 'multipart/ + * alternative' header, in which case we need to + * treat it very special. + */ + + if (!strncasecmp + (&content_type_ptr[10], "alternative", 11)) { + /* It *is* an alternative session! Alternative + * means there will be X parts with the same text + * using different content-types. We are supposed + * to take the most prefered format of the ones + * used and only output that one. MIME defines + * the order of the texts to start with pure text + * and then continue with more and more obscure + * formats. (well, it doesn't use those terms but + * that's what it means! ;-)) + */ + + /* How "we" are gonna deal with them: + * + * We create a "spare" linked list body for the + * very first part. Since the first part is + * defined to be the most readable, we save that + * in case no content-type present is prefered! + * + * We skip all parts that are not prefered. All + * prefered parts found will replace the first + * one that is saved. When we reach the end of + * the alternatives, we will use the last saved + * one as prefered. + */ + + savealternative = TRUE; #if DEBUG_PARSE - printf("DECODE set to %d\n", decode); + printf("SAVEALTERNATIVE: yes\n"); #endif - } - } + } + + } + else + boundary_id = NULL; + } + break; + } while (0); /* do .. while (0) */ + +#endif /* NEW_PARSER */ /* @@@ here we try to do a post parsing cleanup */ /* have to find out all the conditions to turn it off */ if (attach_force) { savealternative = FALSE; isinheader = 0; + /* a kludge while I wait to see how to better integrate this + case */ + content = CONTENT_BINARY; } if (savealternative) { - /* let's remember 'bp' and 'lp' */ - - origbp = bp; - origlp = lp; - alternativeparser = TRUE; /* restart on a new list: */ - lp = bp = NULL; + lp = bp = headp = NULL; /* clean the alternative status variables */ alternative_weight = -1; alternative_lp = alternative_bp = NULL; @@ -2564,8 +3361,58 @@ int parsemail(char *mbox, /* file name */ binfile = -1; } + if (bp || lp) { + /* if we reach this condition, it means the message is missing one or + more mime boundary ends. Closing the current active node should fix + this */ + if (current_message_node) { + current_message_node = + message_node_mimetest(current_message_node, + bp, lp, charset, charsetsave, + type, + (boundp) ? boundp->boundary_id : NULL, + boundary_id, + att_binname, + meta_filename, + att_link, + att_comment_filename, + attachment_rfc822, + message_node_skip_status(file_created, + content, + type)); +#if DEBUG_PARSE_MSGID_TRACE + current_message_node->msgid = strsav(msgid); +#endif + } + } + + /* THE PREFERED CHARSET ALGORITHM */ + /* as long as we don't handle UTF-8 throughout), use the prefered content charset if we got one */ + + /* see struct.c:choose_charset() for the algo heuristics 1 */ + if (root_message_node) { + prefered_charset = message_node_get_charset(root_message_node); + } else { + prefered_charset = _single_content_get_charset(charset, charsetsave); + } + + if (prefered_charset && set_replace_us_ascii_with_utf8 + && !strncasecmp(prefered_charset, "us-ascii", 8)) { + if (set_debug_level) { + fprintf(stderr, "Replacing content charset %s with UTF-8\n", + prefered_charset); + } + free(prefered_charset); + prefered_charset = strsav("UTF-8"); + } + + if (set_debug_level) { + fprintf(stderr, "Message will be stored using charset %s\n", prefered_charset); + } + +#ifdef CHARSETSP if (prefered_content_charset) { if (charset) { free(charset); @@ -2583,10 +3430,10 @@ int parsemail(char *mbox, /* file name */ charset=strsav(charsetsave); } else{ /* default charset for plain/text is US-ASCII */ - /* ISO-8859-1 is modern, however (DM) */ - charset=strsav("US-ASCII"); + /* UTF-8 is modern, however (DM) */ + charset=strsav(set_default_charset); #ifdef DEBUG_PARSE - fprintf(stderr, "found no charset for body, set ISO-8859-1.\n"); + fprintf(stderr, "found no charset for body, using default_charset %s.\n", set_default_charset); #endif } } else { @@ -2599,11 +3446,8 @@ int parsemail(char *mbox, /* file name */ } } } -#endif - -#ifdef DEBUG_PARSE - fprintf(stderr, "Message will be stored using charset %s\n", charset); -#endif +#endif /* ICONV */ +#endif /* CHARSETSP */ isinheader = 1; if (!hassubject) @@ -2620,11 +3464,12 @@ int parsemail(char *mbox, /* file name */ inreply = oneunre(subject); /* control the use of format and delsp according to RFC 3676 */ - if (textplain_format == FORMAT_FLOWED - && content != CONTENT_TEXT - || (content == CONTENT_TEXT && strcasecmp (type, "text/plain"))) { - /* format flowed only allowed on text/plain */ - textplain_format = FORMAT_FIXED; + if (textplain_format == FORMAT_FLOWED + && (content != CONTENT_TEXT + || (content == CONTENT_TEXT + && strcasecmp (type, "text/plain")))) { + /* format flowed only allowed on text/plain */ + textplain_format = FORMAT_FIXED; } if (textplain_format == FORMAT_FIXED && delsp_flag) { @@ -2632,29 +3477,48 @@ int parsemail(char *mbox, /* file name */ delsp_flag = FALSE; } + if (root_message_node) { + /* multipart message */ + + if (set_debug_level == DEBUG_DUMP_ATT + || set_debug_level == DEBUG_DUMP_ATT_VERBOSE) { + message_node_dump (root_message_node); + progerr("exiting"); + } + + bp = message_node_flatten (&lp, root_message_node); + /* free memory allocated to message nodes */ + message_node_free(root_message_node); + root_message_node = current_message_node = NULL; + root_alt_message_node = current_alt_message_node = NULL; + } else { + /* it was not a multipart message, remove all empty lines + at the end of the message */ + while (rmlastlines(bp)); + } + if (append_bp && append_bp != bp) { /* if we had attachments, close the structure */ - append_bp = - addbody(append_bp, &append_lp, "