Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
hypermail
hypermail-setup.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File hypermail-setup.patch of Package hypermail
diff -Nru hypermail-2.2.0.20070131/src/setup.c hypermail-2.2.0.20070131.new/src/setup.c --- hypermail-2.2.0.20070131/src/setup.c 2005-10-25 08:15:14.000000000 +0200 +++ hypermail-2.2.0.20070131.new/src/setup.c 2007-01-31 20:18:37.000000000 +0100 @@ -150,90 +150,90 @@ int set_delete_level; struct Config cfg[] = { - {"i18n", &set_i18n, BTRUE, CFG_SWITCH, + {"i18n", &set_i18n, BTRUE, "# Enable I18N features, must linked with iconv().\n",FALSE}, - {"i18n_body", &set_i18n_body, BFALSE, CFG_SWITCH, + {"i18n_body", &set_i18n_body, BTRUE, "# Translate message body into UTF-8. \"i18n\" must be enabled.\n",FALSE}, - {"antispam_at", &set_antispam_at, ANTISPAM_AT, CFG_STRING, + {"antispam_at", &set_antispam_at, DV_STRING(ANTISPAM_AT), "# replace any @ sign with this string, if spam flags enabled.\n", FALSE}, - {"language", &set_language, LANGUAGE, CFG_STRING, + {"language", &set_language, DV_STRING(LANGUAGE), "# A two-letter string specifying the language to use!\n" "# For example 'en' for English.\n", FALSE}, - {"htmlsuffix", &set_htmlsuffix, HTMLSUFFIX, CFG_STRING, + {"htmlsuffix", &set_htmlsuffix, DV_STRING(HTMLSUFFIX), "# Use this to specify the html file suffix to be used\n" "# when Hypermail generates the html files. This is depen-\n" "# dent on local needs. Do not put a '.' in the value. It\n" "# would result in \"file..html\", probably not what you want.\n", FALSE}, - {"mbox", &set_mbox, NULL, CFG_STRING, + {"mbox", &set_mbox, DV_STRING(NULL), "# This is the mailbox to read messages in from. Set this with \n" "# a value of NONE to read from standard input.\n", FALSE}, - {"ietf_mbox", &set_ietf_mbox, BFALSE, CFG_SWITCH, + {"ietf_mbox", &set_ietf_mbox, BFALSE, "# Set this to On to read mboxes using the IETF convention.\n", FALSE}, - {"archives", &set_archives, NULL, CFG_STRING, + {"archives", &set_archives, DV_STRING(NULL), "# This will create a link in the archived index pages\n" "# labeled 'Other mail archives' to the specified URL. Set\n" "# this to NONE to omit such a link.\n", FALSE}, - {"custom_archives", &set_custom_archives, NULL, CFG_STRING, + {"custom_archives", &set_custom_archives, DV_STRING(NULL), "# If this variable is defined, a navigation entry will be\n" "# created below the sorted_by_x list entry, with the text\n" "# Other mail archives: followed by the value of this variable.\n" "# Set it to NONE to ommit such an entry.\n", FALSE}, - {"about", &set_about, NULL, CFG_STRING, + {"about", &set_about, DV_STRING(NULL), "# This will create a link in the archived index pages\n" "# labeled 'About this archive' to the specified URL. Set\n" "# this to NONE to omit such a link.\n", FALSE}, - {"label", &set_label, NULL, CFG_STRING, + {"label", &set_label, DV_STRING(NULL), "# Define this as the label to put in archives.\n", FALSE}, - {"dir", &set_dir, NULL, CFG_STRING, + {"dir", &set_dir, DV_STRING(NULL), "# This is the directory that Hypermail will look for when\n" "# creating and updating archives. If defined as NONE the\n" "# directory will have the same name as the input mailbox.\n", FALSE}, - {"defaultindex", &set_defaultindex, DEFAULTINDEX, CFG_STRING, + {"defaultindex", &set_defaultindex, DV_STRING(DEFAULTINDEX), "# This specifies the default index that users can view when\n" "# entering the archive. Valid types are date, thread, author,\n" "# subject, and attachment. When using the folder_by_date or\n" "# msgsperfolder options, this option applies to subdirectories.\n", FALSE}, - {"default_top_index", &set_default_top_index, "folders", CFG_STRING, + {"default_top_index", &set_default_top_index, DV_STRING("folders"), "# This specifies the default index that users can view when\n" "# entering the top level of an archive that uses the folder_by_date\n" "# or msgsperfolder option. Valid types are date, thread, author,\n" "# subject, attachment, and folders.\n", FALSE}, - {"avoid_indices", &set_avoid_indices, NULL, CFG_LIST, + {"avoid_indices", &set_avoid_indices, DV_LIST(NULL), "# This is a list of index files to not generate. Valid types are\n" "# date, thread, author, and subject. When using the folder_by_date or\n" "# msgsperfolder options, this option applies to subdirectories.\n", FALSE}, - {"avoid_top_indices", &set_avoid_top_indices, NULL, CFG_LIST, + {"avoid_top_indices", &set_avoid_top_indices, DV_LIST(NULL), "# This is a list of index files to not generate for the top\n" "# directory of an archive using the folder_by_date or\n" "# msgsperfolder option. Valid types are date, thread, author, \n" "# subject, folders, and attachment.\n", FALSE}, - {"overwrite", &set_overwrite, BFALSE, CFG_SWITCH, + {"overwrite", &set_overwrite, BFALSE, "# Set this to On to make Hypermail overwrite existing archives.\n", FALSE}, - {"inlinehtml", &set_inlinehtml, BTRUE, CFG_SWITCH, + {"inlinehtml", &set_inlinehtml, BTRUE, "# Define to On to make text/html parts to get inlined with the mails.\n" "# If set to Off, HTML-parts will be stored as separate files.\n" "# A \"Content-Disposition: attachment;\" line in the mail will\n" "# cause an HTML-part to be stored as a separate file even if this\n" "# option is On.\n", FALSE}, - {"increment", &set_increment, BFALSE, CFG_INTEGER, + {"increment", &set_increment, BFALSE, "# Set this to -1 to have hypermail figure out whether the input\n" "# is entirely new messages to be appended or whether it contains\n" "# messages that are already in the archive. A value of -1 cannot be\n" @@ -243,22 +243,22 @@ "# existing archive is not empty.\n" "# Set this to 1 to append the input to existing archive.\n", FALSE}, - {"readone", &set_readone, BFALSE, CFG_SWITCH, + {"readone", &set_readone, BFALSE, "# Set this to On to specify there is only one message in the input.\n", FALSE}, - {"reverse", &set_reverse, BFALSE, CFG_SWITCH, + {"reverse", &set_reverse, BFALSE, "# Setting this variable to On will reverse-sort the article\n" "# entries in the date and thread index files by the\n" "# date they were received. That is, the most recent messages\n" "# will appear at the top of the index rather than the other\n" "# way around.\n", FALSE}, - {"reverse_folders", &set_reverse_folders, BFALSE, CFG_SWITCH, + {"reverse_folders", &set_reverse_folders, BFALSE, "# Setting this variable to On will reverse-sort the list of\n" "# folders. That is, the most recent folders will appear at\n" "# the top of the index rather than the other way around.\n", FALSE}, - {"progress", &set_showprogress, INT(PROGRESS), CFG_INTEGER, + {"progress", &set_showprogress, DV_INT(PROGRESS), "# Set this to 1 or 2 to always show a progress report as\n" "# Hypermail works. With a setting of 1, hypermail\n" "# overwrites the progress information relating to attachment\n" @@ -266,12 +266,12 @@ "# is listed individually with the number of the message the\n" "# attachments relate to. This is written to stdout.\n", FALSE}, - {"showheaders", &set_showheaders, BFALSE, CFG_SWITCH, + {"showheaders", &set_showheaders, BFALSE, "# Set this to On to show the article header lines in the archived HTML\n" "# files. These lines typically include the To:, From:, and Subject:\n" "# information found in most email messages.\n", FALSE}, - {"showhtml", &set_showhtml, INT(1), CFG_INTEGER, + {"showhtml", &set_showhtml, DV_INT(1), "# Set this to 1 to show the articles in a proportionally-spaced\n" "# font rather than a fixed-width (monospace) font.\n" "# Set this to 2 for more complex conversion to html\n" @@ -280,21 +280,21 @@ "# showhtml = 1, and showhtml = 0 will look pretty dull, but\n" "# 1 and 2 run risks of altering the appearance in undesired ways.\n", FALSE}, - {"showbr", &set_showbr, BTRUE, CFG_SWITCH, + {"showbr", &set_showbr, BTRUE, "# Set this to On to place <br> tags at the end of article lines.\n" "# Otherwise, all non-quoted article lines will word wrap. This\n" "# only takes effect if hm_showhtml is 1.\n", FALSE}, - {"showhr", &set_showhr, BFALSE, CFG_SWITCH, + {"showhr", &set_showhr, BFALSE, "# Set this to On to place horizontal rules before and after articles.\n" "NOTE: THIS OPTION HAS BEEN DEPRECATED BY THE WAI CHANGES. IT WILL BE\n" "IGNORED.\n", FALSE}, - {"showreplies", &set_showreplies, BTRUE, CFG_SWITCH, + {"showreplies", &set_showreplies, BTRUE, "# Set this to On to show all replies to a message as links\n" "# in article files.\n", FALSE}, - {"show_msg_links", &set_show_msg_links, INT(1), CFG_INTEGER, + {"show_msg_links", &set_show_msg_links, DV_INT(1), "# Set this to 1 to put the individual message links at the top\n" "# of the individual message pages. Set this to 0 to produce pages\n" "# without the Next, Previous, Reply, In-Reply-To, etc. links. Set\n" @@ -302,14 +302,14 @@ "# pages, or 4 to produce those links only at the bottom of the\n" "# message.\n", FALSE}, - {"show_index_links", &set_show_index_links, INT(1), CFG_INTEGER, + {"show_index_links", &set_show_index_links, DV_INT(1), "# Set this to 1 to show links to index pages from the top and\n" "# bottom of each message file. Set it to 0 to avoid those links.\n" "# Set it to 3 to show the links only at the top of the message\n" "# pages, or 4 to produce those links only at the bottom of the\n" "# message.\n", FALSE}, - {"usetable", &set_usetable, BFALSE, CFG_SWITCH, + {"usetable", &set_usetable, BFALSE, "# Setting this variable to On will tell Hypermail to generate\n" "# an index menu at the top and bottom of each page in a table\n" "# format. Set to Off if you want the standard Hypermail page look\n" @@ -317,44 +317,44 @@ "NOTE: THIS OPTION HAS BEEN DEPRECATED BY THE WAI CHANGES. IT WILL BE\n" "IGNORED.\n", FALSE}, - {"indextable", &set_indextable, BFALSE, CFG_SWITCH, + {"indextable", &set_indextable, BFALSE, "# Setting this variable to On will tell Hypermail to generate\n" "# message index Subject/Author/Date listings using a nice table\n" "# format. Set to Off if you want the original Hypermail index look.\n", FALSE}, - {"iquotes", &set_iquotes, BTRUE, CFG_SWITCH, + {"iquotes", &set_iquotes, BTRUE, "# Set this to On to italicize quoted lines.\n", FALSE}, - {"eurodate", &set_eurodate, BFALSE, CFG_SWITCH, + {"eurodate", &set_eurodate, BFALSE, "# Set this to On to display article received dates with\n" "# days before months instead of months before days.\n", FALSE}, - {"isodate", &set_isodate, BFALSE, CFG_SWITCH, + {"isodate", &set_isodate, BFALSE, "# Set this to On to display article received dates in\n" "# YYYY-MM-DD HH:MM:SS format. If used with the gmtime option, a\n" "# Z will be inserted between the DD and HH.\n", FALSE}, - {"gmtime", &set_gmtime, BFALSE, CFG_SWITCH, + {"gmtime", &set_gmtime, BFALSE, "# Set this to On to display article received dates using\n" "# Greenwich Mean Time (UTC) rather than local time.\n", FALSE}, - {"discard_dup_msgids", &set_discard_dup_msgids, BTRUE, CFG_SWITCH, + {"discard_dup_msgids", &set_discard_dup_msgids, BTRUE, "# Set this to Off to accept messages with a Message-ID matching\n" "# that of a message already in this archive.\n" "# By default such messages are discarded.\n", FALSE}, - {"require_msgids", &set_require_msgids, BTRUE, CFG_SWITCH, + {"require_msgids", &set_require_msgids, BTRUE, "# Set this to Off to accept messages without a Message-ID header.\n" "# By default such messages are discarded.\n", FALSE}, - {"usemeta", &set_usemeta, BFALSE, CFG_SWITCH, + {"usemeta", &set_usemeta, BFALSE, "# Set this to On to store the content type of a MIME attachment in\n" "# a metadata file.\n", FALSE}, - {"uselock", &set_uselock, BTRUE, CFG_SWITCH, + {"uselock", &set_uselock, BTRUE, "# Set this to On to use hypermail's internal locking mechanism.\n", FALSE}, - {"usegdbm", &set_usegdbm, BFALSE, CFG_SWITCH, + {"usegdbm", &set_usegdbm, BFALSE, "# Set this to On to use gdbm to implement a header cache.\n" "# This will speed up hypermail, especially if your filesystem is slow.\n" "# It will not provide any speedup with the linkquotes option.\n" @@ -363,20 +363,20 @@ #endif , FALSE}, - {"writehaof", &set_writehaof, BFALSE, CFG_SWITCH, + {"writehaof", &set_writehaof, BFALSE, "# Set this to On to let hypermail write an XML archive overview file\n" "# in each directory. The filename is " HAOF_NAME ".\n", FALSE}, - {"append", &set_append, BFALSE, CFG_SWITCH, + {"append", &set_append, BFALSE, "# Set this to On to maintain a parallel mbox archive. The file\n" "# name defaults to mbox in the directory specified by -d or dir.\n", FALSE}, - {"append_filename", &set_append_filename, NULL, CFG_STRING, + {"append_filename", &set_append_filename, DV_STRING(NULL), "# Specifies the filename to be used by the append option.\n" "# $DIR may be used to specify a name relative to the directory\n" "# specified in the -d or dir option.\n", FALSE}, - {"nonsequential", &set_nonsequential, BFALSE, CFG_SWITCH, + {"nonsequential", &set_nonsequential, BFALSE, "# Set this to On to generate filenames that are not sequential, but\n" "# rather a hash of the message properties.\n" #ifndef HAVE_LIBFNV @@ -385,214 +385,214 @@ #endif , FALSE}, - {"thrdlevels", &set_thrdlevels, INT(4), CFG_INTEGER, + {"thrdlevels", &set_thrdlevels, DV_INT(4), "# This specifies the number of thread levels to outline\n" "# in the thread index.\n", FALSE}, - {"dirmode", &set_dirmode, INT(0755), CFG_OCTAL, + {"dirmode", &set_dirmode, DV_OCTAL(0755), "# This is an octal number representing the permissions\n" "# that new directories are set to when they are created.\n", FALSE}, - {"filemode", &set_filemode, INT(0644), CFG_OCTAL, + {"filemode", &set_filemode, DV_OCTAL(0644), "# This is an octal number representing the file permissions\n" "# that new files are set to when they are created.\n", FALSE}, - {"mailcommand", &set_mailcommand, MAILCOMMAND, CFG_STRING, + {"mailcommand", &set_mailcommand, DV_STRING(MAILCOMMAND), "# This specifies the mail command to use when converting\n" "# email addresses to links. The variables $TO, $SUBJECT,\n" "# and $ID can be used in constructing the command string.\n", FALSE}, - {"mailto", &set_mailto, NULL, CFG_STRING, + {"mailto", &set_mailto, DV_STRING(NULL), "# The address of the contact point that is put in the HTML header\n" "# line <link rev=made href=\"mailto:MAILTO\">. Setting this to NONE\n" "# disables <link...> header generation.\n", FALSE}, - {"hmail", &set_hmail, NULL, CFG_STRING, + {"hmail", &set_hmail, DV_STRING(NULL), "# Set this to the list's submission address.\n", FALSE}, - {"newmsg_command", &set_newmsg_command, "mailto:$TO", CFG_STRING, + {"newmsg_command", &set_newmsg_command, DV_STRING("mailto:$TO"), "# This specifies the mail command to use when converting the\n" "# set_hmail address to links in replies. The variables $TO, $SUBJECT,\n" "# and $ID can be used in constructing the command string.\n", FALSE}, - {"replymsg_command", &set_replymsg_command, "not set", CFG_STRING, + {"replymsg_command", &set_replymsg_command, DV_STRING("not set"), "# This specifies the mail command to use when converting the\n" "# set_hmail address to links in replies. The variables $TO, $SUBJECT,\n" "# and $ID can be used in constructing the command string. The value\n" "# from mailcommand will be used if this option is not specified.\n", FALSE}, - {"domainaddr", &set_domainaddr, DOMAINADDR, CFG_STRING, + {"domainaddr", &set_domainaddr, DV_STRING(DOMAINADDR), "# Set this to the domainname you want added to a mail address\n" "# appearing in the RFC822 field which lack a hostname.\n", FALSE}, - {"body", &set_htmlbody, NULL, CFG_STRING, + {"body", &set_htmlbody, DV_STRING(NULL), "# This obsolete entry kept around to help warn users with old config files.\n", FALSE}, - {"icss_url", &set_icss_url, NULL, CFG_STRING, + {"icss_url", &set_icss_url, DV_STRING(NULL), "# Specifies a URL to an external CSS stylesheet for the index pages.\n" "# The CSS will be associated to the indexes thru an HTML LINK element.\n" , FALSE}, - {"mcss_url", &set_mcss_url, NULL, CFG_STRING, + {"mcss_url", &set_mcss_url, DV_STRING(NULL), "# Specifies a URL to an external CSS stylesheet for the message pages.\n" "# The CSS will be associated to the indexes thru an HTML LINK element.\n" , FALSE}, - {"text_types", &set_text_types, NULL, CFG_LIST, + {"text_types", &set_text_types, DV_LIST(NULL), "# This is a list of MIME types that you want hypermail to treat\n" "# exactly as if they were text/plain.\n", FALSE}, - {"inline_types", &set_inline_types, INLINE_TYPES, CFG_LIST, + {"inline_types", &set_inline_types, DV_LIST(INLINE_TYPES), "# This is the list of MIME types that you want <img> tags to as\n" "# opposed to simply <a href> to from the message.\n", FALSE}, - {"prefered_types", &set_prefered_types, NULL, CFG_LIST, + {"prefered_types", &set_prefered_types, DV_LIST(NULL), "# When mails using multipart/mixed types are scanned, this list of\n" "# MIME types defines which part you want presented in the result.\n" "# See the save_alts option for how non prefered types are treated.\n", FALSE}, - {"ignore_types", &set_ignore_types, NULL, CFG_LIST, + {"ignore_types", &set_ignore_types, DV_LIST(NULL), "# This is the list of MIME attachment types that you do not want\n" "# to do anything with. Two special types may be used here:\n" "# $BINARY - ignore all types that would be stored as separate files.\n" "# $NONPLAIN - ignore all types not treated as text/plain, and all $BINARY types.\n" "# Note: the behavior of these may be affected by the inlinehtml option.\n", FALSE}, - {"show_headers", &set_show_headers, NULL, CFG_LIST, + {"show_headers", &set_show_headers, DV_LIST(NULL), "# This is the list of headers to be displayed if 'showheaders'\n" "# is set to On). They can be listed comma or space separated\n" "# all on a single line.\n", FALSE}, - {"ihtmlheaderfile", &set_ihtmlheader, NULL, CFG_STRING, + {"ihtmlheaderfile", &set_ihtmlheader, DV_STRING(NULL), "# Define path as the path to a template file containing\n" "# valid HTML formatting statements that you wish to\n" "# included at the top of every index page.\n", FALSE}, - {"ihtmlfooterfile", &set_ihtmlfooter, NULL, CFG_STRING, + {"ihtmlfooterfile", &set_ihtmlfooter, DV_STRING(NULL), "# Define path as the path to a template file containing\n" "# valid HTML formatting statements that you wish to\n" "# included at the bottom of every index page.\n", FALSE}, - {"ihtmlheadfile", &set_ihtmlhead, NULL, CFG_STRING, + {"ihtmlheadfile", &set_ihtmlhead, DV_STRING(NULL), "# Define path as the path to a template file containing\n" "# valid HTML formatting statements that you wish to\n" "# included inside the HTML HEAD element of every index page.\n", FALSE}, - {"ihtmlhelpupfile", &set_ihtmlhelpup, NULL, CFG_STRING, + {"ihtmlhelpupfile", &set_ihtmlhelpup, DV_STRING(NULL), "# Define path as the path to a template file containing\n" "# valid HTML formatting statements that you wish to\n" "# included as information giving help to your archive users," "# in the upper navigation bar.\n", FALSE}, - {"ihtmlhelplowfile", &set_ihtmlhelplow, NULL, CFG_STRING, + {"ihtmlhelplowfile", &set_ihtmlhelplow, DV_STRING(NULL), "# Define path as the path to a template file containing\n" "# valid HTML formatting statements that you wish to\n" "# included as information giving help to your archive users," "# in the lower navigation bar.\n", FALSE}, - {"ihtmlnavbar2upfile", &set_ihtmlnavbar2up, NULL, CFG_STRING, + {"ihtmlnavbar2upfile", &set_ihtmlnavbar2up, DV_STRING(NULL), "# Define path as the path to a template file containing\n" "# valid HTML formatting statements that you wish to\n" "# included as information giving links to the hierarchin your archive.\n", FALSE}, - {"mhtmlheaderfile", &set_mhtmlheader, NULL, CFG_STRING, + {"mhtmlheaderfile", &set_mhtmlheader, DV_STRING(NULL), "# Define path as the path to a template file containing\n" "# valid HTML formatting statements that you wish to use\n" "# at the top of every message page.\n", FALSE}, - {"mhtmlfooterfile", &set_mhtmlfooter, NULL, CFG_STRING, + {"mhtmlfooterfile", &set_mhtmlfooter, DV_STRING(NULL), "# Define path as the path to a template file containing\n" "# valid HTML formatting statements you wish to use at the\n" "# bottom of every message page.\n", FALSE}, - {"locktime", &set_locktime, INT(3600), CFG_INTEGER, + {"locktime", &set_locktime, DV_INT(3600), "# Specify number of seconds to wait for a lock before we\n" "# override it! .\n", FALSE}, - {"dateformat", &set_dateformat, NULL, CFG_STRING, + {"dateformat", &set_dateformat, DV_STRING(NULL), "# Format (see strftime(3)) for displaying dates.\n", FALSE}, - {"indexdateformat", &set_indexdateformat, NULL, CFG_STRING, + {"indexdateformat", &set_indexdateformat, DV_STRING(NULL), "# Format (see strftime(3)) for displaying dates in the index pages.\n" "# Will use dateformat if not specified.\n", FALSE}, - {"stripsubject", &set_stripsubject, NULL, CFG_STRING, + {"stripsubject", &set_stripsubject, DV_STRING(NULL), "# A word to be stripped from all subject lines. Helps unclutter\n" "# mailing lists which add tags to subject lines.\n", FALSE}, - {"attachmentlink", &set_attachmentlink, NULL, CFG_STRING, + {"attachmentlink", &set_attachmentlink, DV_STRING(NULL), "# Format of the attachment links.\n" "# %p for the full path to the attachment\n" "# %f for the file name part only\n" "# %d for the directory name only\n" "# %n for the message number\n" "# %c for the content type string\n", FALSE}, - {"spamprotect", &set_spamprotect, BTRUE, CFG_SWITCH, + {"spamprotect", &set_spamprotect, BTRUE, "# Set this to On to make hypermail not output real email addresses\n" "# in the output HTML but instead it will obfuscate them a little.\n" "# You can control the obfuscation with set_antispamdomain.\n", FALSE}, - {"antispamdomain", &set_antispamdomain, NULL, CFG_STRING, + {"antispamdomain", &set_antispamdomain, DV_STRING(NULL), "# By default hypermail only does a small amount of massaging\n" "# of email addresses. Use this to completely replace the domain\n" "# from which a message originates (everything after the @)\n" "# with some string to confuse screen-scraping programs.\n" "# It is probably wise to make this an invalid mail domain.\n", FALSE}, - {"spamprotect_id", &set_spamprotect_id, BTRUE, CFG_SWITCH, + {"spamprotect_id", &set_spamprotect_id, BTRUE, "# Set this to On to make hypermail not output real email message\n" "# ids in HTML comments (sometimes used internally by hypermail) but\n" "# instead it will obfuscate them a little so they don't look like\n" "# email addresses to spammers.\n", FALSE}, - {"attachmentsindex", &set_attachmentsindex, BTRUE, CFG_SWITCH, + {"attachmentsindex", &set_attachmentsindex, BTRUE, "# Set this to Off to make hypermail not output an index of\n" "# messages with attachments.\n", FALSE}, - {"linkquotes", &set_linkquotes, BFALSE, CFG_SWITCH, + {"linkquotes", &set_linkquotes, BFALSE, "# Set this to On to create fine-grained links from quoted\n" "# text to the text where the quote originated. It also improves\n" "# the threads index file by more accurately matching messages\n" "# with replies. Note that this may be rather cpu intensive (see\n" "# the searchbackmsgnum option to alter the performance).\n" , FALSE}, - {"searchbackmsgnum", &set_searchbackmsgnum, INT(500), CFG_INTEGER, + {"searchbackmsgnum", &set_searchbackmsgnum, DV_INT(500), "# If the linkquotes option is on and an incremental update is being" "# done (-u option), this controls the tradeoff between speed and\n" "# the reliability of finding the right source for quoted text.\n" "# Try to set it to the largest number of messages between a\n" "# message and the final direct reply to that message.\n", FALSE}, - {"link_to_replies", &set_link_to_replies, NULL, CFG_STRING, + {"link_to_replies", &set_link_to_replies, DV_STRING(NULL), "# If the linkquotes option is on, specifying a string here\n" "# causes it to generate links from original quoted text to the\n" "# location(s) in replies which quote them. The string\n" "# is used to display the link.\n", FALSE}, - {"quote_hide_threshold", &set_quote_hide_threshold, INT(100), CFG_INTEGER, + {"quote_hide_threshold", &set_quote_hide_threshold, DV_INT(100), "# If the linkquotes option is on, setting this to an\n" "# integer less than 100 will cause it to replace quoted\n" "# text with one-line links if the percent of lines in the\n" "# message body (exluding the signature) consisting of\n" "# quoted text exceeds the number indicated by this option.\n", FALSE}, - {"quote_link_string", &set_quote_link_string, NULL, CFG_STRING, + {"quote_link_string", &set_quote_link_string, DV_STRING(NULL), "# If the quote_hide_threshold option is being used, the\n" "# quote_link_string will be used if available to display the\n" "# link that replaces the quoted text. If no string is specified\n" "# here, the first line of each section of quoted text will used.\n", FALSE}, - {"monthly_index", &set_monthly_index, BFALSE, CFG_SWITCH, + {"monthly_index", &set_monthly_index, BFALSE, "# Set this to On to create additional index files broken up\n" "# by month. A summary.html file will provide links to all the\n" "# monthly indices.\n", FALSE}, - {"yearly_index", &set_yearly_index, BFALSE, CFG_SWITCH, + {"yearly_index", &set_yearly_index, BFALSE, "# Set this to On to create additional index files broken up\n" "# by year. A summary.html file will provide links to all the\n" "# yearly indices.\n", FALSE}, - {"thread_file_depth", &set_thread_file_depth, INT(0), CFG_INTEGER, + {"thread_file_depth", &set_thread_file_depth, DV_INT(0), "# If nonzero, break the threads index file into multiple files,\n" "# with the initial message of each thread in the main index file\n" "# along with links to files containing the replies. Setting this\n" @@ -604,7 +604,7 @@ "# if the indextable option is turned on, and probably needs to\n" "# be less than thrdlevels.\n", FALSE}, - {"startmsgnum", &set_startmsgnum, INT(0), CFG_INTEGER, + {"startmsgnum", &set_startmsgnum, DV_INT(0), "# Sets the number of the first message of an archive. This option is\n" "# only active when adding new messages to brand new archive.\n" "# If not set, the default number will be 0000.\n" @@ -612,7 +612,7 @@ "# rebuild your archive, you must use the same value or you'll break any\n" "# link pointing to your archive.\n", FALSE}, - {"folder_by_date", &set_folder_by_date, NULL, CFG_STRING, + {"folder_by_date", &set_folder_by_date, DV_STRING(NULL), "# This string causes the messages to be put in subdirectories\n" "# by date. The string will be passed to strftime(3) to generate\n" "# subdirectory names based on message dates. Suggested values are\n" @@ -622,14 +622,14 @@ "# and update the archive incrementally (e.g. with -u), you must\n" "# use the usegdbm option.\n", FALSE}, - {"msgsperfolder", &set_msgsperfolder, INT(0), CFG_INTEGER, + {"msgsperfolder", &set_msgsperfolder, DV_INT(0), "# Put messages in subdirectories with this many messages per\n" "# directory. Do not use this and folder_by_date on the same archive.\n" "# Do not alter this for an existing archive without removing the old\n" "# html files. Deleted/expired messages ARE COUNTED for the purpose\n" "# of deciding how many messages to put in a subdirectory.\n", FALSE}, - {"describe_folder", &set_describe_folder, NULL, CFG_STRING, + {"describe_folder", &set_describe_folder, DV_STRING(NULL), "# Controls the labels used in folders.html to describe the\n" "# directories created by the folder_by_date or msgsperfolder\n" "# options. For folder_by_date labels, the describe_folder string\n" @@ -641,7 +641,7 @@ "# %M for the number of the last message that can be put in the\n" "# directory.\n", FALSE}, - {"latest_folder", &set_latest_folder, NULL, CFG_STRING, + {"latest_folder", &set_latest_folder, DV_STRING(NULL), "# If folder_by_date or msgsperfolder are in use, create\n" "# a symbolic link by this name to the most recently created\n" "# subdirectory. Note that many web servers are configured to\n" @@ -649,33 +649,33 @@ "# be created in the directory specified by the 'dir' or '-d' option.\n", FALSE}, - {"base_url", &set_base_url, NULL, CFG_STRING, + {"base_url", &set_base_url, DV_STRING(NULL), "# The url of the archive's main directory. This is needed when\n" "# the latest_folder option is used and the folder_by_date makes\n" "# directories more than one level deep (e.g. with '%y/%m').\n", FALSE}, - {"iso2022jp", &set_iso2022jp, BFALSE, CFG_SWITCH, + {"iso2022jp", &set_iso2022jp, BFALSE, "# Set this to On to support ISO-2022-JP messages.\n", FALSE}, - {"deleted", &set_deleted, "X-Hypermail-Deleted X-No-Archive", CFG_LIST, + {"deleted", &set_deleted, DV_LIST("X-Hypermail-Deleted X-No-Archive"), "# This is the list of headers that indicate the message should\n" "# not be displayed if the value of this header is 'yes'.\n", FALSE}, - {"expires", &set_expires, "Expires", CFG_LIST, + {"expires", &set_expires, DV_LIST("Expires"), "# This is the list of headers that indicate the message should\n" "# not be displayed if the value of this header is a date in the past.\n", FALSE}, - {"delete_older", &set_delete_older, NULL, CFG_STRING, + {"delete_older", &set_delete_older, DV_STRING(NULL), "# Any message older than this date should not be displayed.\n", FALSE}, - {"delete_newer", &set_delete_newer, NULL, CFG_STRING, + {"delete_newer", &set_delete_newer, DV_STRING(NULL), "# Any message newer than this date should not be displayed.\n", FALSE}, - {"delete_msgnum", &set_delete_msgnum, NULL, CFG_LIST, + {"delete_msgnum", &set_delete_msgnum, DV_LIST(NULL), "# This is the list of message numbers that should be deleted from the\n" "# html archive. The mbox is not changed.\n", FALSE}, - {"delete_level", &set_delete_level, INT(DELETE_LEAVES_STUBS), CFG_INTEGER, + {"delete_level", &set_delete_level, DV_INT(DELETE_LEAVES_STUBS), "# 0 - remove deleted and expired files. Note that with this choice\n" "# threading may be screwed up if there are replies to deleted or\n" "# expired options and the archive is updated incrementally\n" @@ -685,55 +685,55 @@ "# Deleted and expired messages are removed from the index files\n" "# regardless of the delete_level selection.\n", FALSE}, - {"txtsuffix", &set_txtsuffix, NULL, CFG_STRING, + {"txtsuffix", &set_txtsuffix, DV_STRING(NULL), "# If you want the original mail messages archived in individual files,\n" "# set this to the extension that you want these messages to have\n" "# (recommended value: txt).\n", FALSE}, - {"filter_out", &set_filter_out, NULL, CFG_STRINGLIST, + {"filter_out", &set_filter_out, DV_STRINGLIST(NULL), "# Delete from the html archives any message having a header line\n" "# which matches any of these expressions. Uses the same rules for\n" "# deletion as the expires option. The expressions use the same\n" "# syntax as Perl regular expressions.\n", FALSE}, - {"filter_require", &set_filter_require, NULL, CFG_STRINGLIST, + {"filter_require", &set_filter_require, DV_STRINGLIST(NULL), "# Delete from the html archives any message not having header lines\n" "# which match each of these expressions. Uses the same rules for\n" "# deletion as the expires option. The expressions use the same\n" "# syntax as Perl regular expressions.\n", FALSE}, - {"filter_out_full_body", &set_filter_out_full_body, NULL, CFG_STRINGLIST, + {"filter_out_full_body", &set_filter_out_full_body, DV_STRINGLIST(NULL), "# Delete from the html archives any message having a line\n" "# which matches any of these expressions. Uses the same rules for\n" "# deletion as the expires option. The expressions use the same\n" "# syntax as Perl regular expressions.\n", FALSE}, - {"filter_require_full_body", &set_filter_require_full_body, NULL, CFG_STRINGLIST, + {"filter_require_full_body", &set_filter_require_full_body, DV_STRINGLIST(NULL), "# Delete from the html archives any message not having lines\n" "# which match each of these expressions. Uses the same rules for\n" "# deletion as the expires option. The expressions use the same\n" "# syntax as Perl regular expressions.\n", FALSE}, - {"save_alts", &set_save_alts, INT(0), CFG_INTEGER, + {"save_alts", &set_save_alts, DV_INT(0), "# This controls what happens to alternatives (other than the prefered\n" "# alternative) for multipart/alternative messages.\n" "# 0 - discard non-prefered alternatives\n" "# 1 - show all alternatives inline\n" "# 2 - put non-prefered alternatives in a separate file.\n", FALSE}, - {"alts_text", &set_alts_text, NULL, CFG_STRING, + {"alts_text", &set_alts_text, DV_STRING(NULL), "# If save_alts is 1, this text is put between the alternatives.\n" "# If save_alts is 2, this text is used to describe the link to each\n" "# alternative file.\n", FALSE}, - {"warn_surpressions", &set_warn_surpressions, BTRUE, CFG_SWITCH, + {"warn_surpressions", &set_warn_surpressions, BTRUE, "# Set this to On to get warnings (on stdout) about messages that\n" "# are not converted because of they are missing a msgid (if\n" "# require_msgids is On) or because one of the following options\n" "# surpressed it: deleted expires delete_msgnum filter_out\n" "# filter_require filter_out_full_body filter_require_full_body.\n", FALSE}, - {"unsafe_chars", &set_unsafe_chars, NULL, CFG_STRING, + {"unsafe_chars", &set_unsafe_chars, DV_STRING(NULL), "# Any characters listed in this string are removed from user-specified\n" "# attachment filenames. Those characters will be replaced by a \"_\"\n" "# (which means that specifying \"_\" here won't have any effect).\n" @@ -744,17 +744,17 @@ "# includes on filenames ending in something other than .shtml), but\n" "# that will prevent browsers from recognizing many file types.\n", FALSE}, - {"files_by_thread", &set_files_by_thread, BFALSE, CFG_SWITCH, + {"files_by_thread", &set_files_by_thread, BFALSE, "# Set this to On to generate (in addition to the usual files),\n" "# a file for each thread that contains all the messages in that\n" "# thread.\n", FALSE}, - {"href_detection", &set_href_detection, BTRUE, CFG_SWITCH, + {"href_detection", &set_href_detection, BTRUE, "# Set this to On to assume that any string on the body of the message\n" "# that says <A HREF=\" ... </A> is a URL, together with its markup\n" "# and treat it as such.\n", TRUE}, - {"mbox_shortened", &set_mbox_shortened, BFALSE, CFG_SWITCH, + {"mbox_shortened", &set_mbox_shortened, BFALSE, "# Set this to On to enable use of mbox that has had some of its\n" "# initial messages deleted. Requires usegdbm = 1 and increment = 0.\n" "# The first message in the shortened mbox must have a Message-Id header.\n" @@ -764,7 +764,7 @@ "# beginning of the mbox or appending new messages to the end (unless\n" "# you rebuild the archive from scratch using a complete mbox).\n", FALSE}, - {"report_new_folder", &set_report_new_folder, BFALSE, CFG_SWITCH, + {"report_new_folder", &set_report_new_folder, BFALSE, "# Set this to On to have it print (on stdout) the names of any\n" "# new directories created pursuant to the folder_by_date or\n" "# msgsperfolder option, or the initial creation of the archive.\n" @@ -772,12 +772,12 @@ "# the archive directory. Does not print anything when attachment\n" "# or metadata directories are created.\n", FALSE}, - {"report_new_file", &set_report_new_file, BFALSE, CFG_SWITCH, + {"report_new_file", &set_report_new_file, BFALSE, "# Set this to On to have it print (on stdout) the names of any\n" "# new files created for new messages. It will print the full path\n" "# if that is what you use to specify the archive directory.\n", FALSE}, - {"use_sender_date", &set_use_sender_date, BFALSE, CFG_SWITCH, + {"use_sender_date", &set_use_sender_date, BFALSE, "# Set this to On to have it use the Date: header (created by the\n" "# the system that sent the message) rather than the date/time the\n" "# message was received, for purposes such as putting in folders\n" @@ -823,7 +823,7 @@ fprintf(stdout, "#%s = %s\n", cfg[i].label, */ fprintf(stdout, "%s = %s\n", cfg[i].label, - cfg[i].def ? (char *)cfg[i].def : ""); + cfg[i].def.string ? (char *)cfg[i].def.string : ""); break; case CFG_LIST: case CFG_STRINGLIST: @@ -837,7 +837,7 @@ fprintf(stdout, "#%s = %s\n", cfg[i].label, */ fprintf(stdout, "%s = %s\n", cfg[i].label, - cfg[i].def ? (char *)cfg[i].def : ""); + cfg[i].def.string ? (char *)cfg[i].def.string : ""); } break; case CFG_OCTAL: @@ -851,7 +851,7 @@ fprintf(stdout, "#%s = %lo\n", cfg[i].label, */ fprintf(stdout, "%s = %lo\n", cfg[i].label, - (long)cfg[i].def); + (long)cfg[i].def.integer); break; case CFG_INTEGER: if (cfg[i].changed) @@ -864,7 +864,7 @@ fprintf(stdout, "#%s = %ld\n", cfg[i].label, */ fprintf(stdout, "%s = %ld\n", cfg[i].label, - (long)cfg[i].def); + (long)cfg[i].def.integer); break; case CFG_SWITCH: if (cfg[i].changed) @@ -877,7 +877,7 @@ fprintf(stdout, "#%s = %s\n", cfg[i].label, */ fprintf(stdout, "%s = %s\n", cfg[i].label, - cfg[i].def ? "On" : "Off"); + cfg[i].def.string ? "On" : "Off"); break; default: break; @@ -894,7 +894,8 @@ char name[128] = "HM_"; char *labp; int ind; - void *defval; + defval_t defval; + int use_default; for (i = 0; i < sizeof(cfg) / sizeof(cfg[0]); i++) { cfg[i].changed = FALSE; @@ -906,30 +907,35 @@ name[ind] = 0; /* we try to get a default value from an environment variable */ - defval = getenv(name); - if (!defval) - /* get the built-in default instead */ - defval = cfg[i].def; + defval.string = getenv(name); + /* get the built-in default instead */ + if( use_default = !defval.string ) + defval = cfg[i].def; switch (cfg[i].flags) { case CFG_STRING: - if (defval) - *(char **)cfg[i].value = strsav(defval); + if (defval.string) + *(char **)cfg[i].value = strsav(defval.string); else *(char **)cfg[i].value = NULL; break; case CFG_SWITCH: case CFG_INTEGER: + if (use_default) + *(int *)cfg[i].value = defval.integer; + else + *(int *)cfg[i].value = atoi(defval.string); + break; case CFG_OCTAL: - if (defval == cfg[i].def) - *(int *)cfg[i].value = (int)defval; + if (use_default) + *(int *)cfg[i].value = defval.integer; else - *(int *)cfg[i].value = atoi(defval); + *(int *)cfg[i].value = strtol(defval.string, NULL, 8); break; case CFG_LIST: - if (defval) { + if (defval.string) { char *tpstr; - tpstr = strsav(defval); + tpstr = strsav(defval.string); *(struct hmlist **)cfg[i].value = NULL; *(struct hmlist **)cfg[i].value = (void *)add_list(*(struct hmlist **)cfg[i].value, tpstr); @@ -939,9 +945,9 @@ *(struct hmlist **)cfg[i].value = NULL; break; case CFG_STRINGLIST: - if (defval) { + if (defval.string) { char *tpstr; - tpstr = strsav(defval); + tpstr = strsav(defval.string); *(struct hmlist **)cfg[i].value = NULL; *(struct hmlist **)cfg[i].value = (void *)add_2_list(*(struct hmlist **)cfg[i].value, tpstr); diff -Nru hypermail-2.2.0.20070131/src/setup.h hypermail-2.2.0.20070131.new/src/setup.h --- hypermail-2.2.0.20070131/src/setup.h 2005-10-25 08:11:26.000000000 +0200 +++ hypermail-2.2.0.20070131.new/src/setup.h 2007-01-31 19:56:33.000000000 +0100 @@ -2,11 +2,11 @@ #define __SETUP_H typedef int bool; - +typedef union _defval_t {char *string; int integer;} defval_t; struct Config { char *label; /* the real-name of what to set */ void *value; /* pointer to the real storage */ - void *def; /* default value */ + defval_t def; /* default value */ char flags; /* specifies the kind of config setting, see defines below */ char *verbose; /* detailed description of the label */ @@ -22,10 +22,14 @@ #define CFG_OCTAL 5 /* numerical, octal based */ #define CFG_STRINGLIST 6 /* uses itemlist, whole lines used as items */ -#define BTRUE (void *)1 -#define BFALSE (void *)0 +#define BTRUE (defval_t)1, CFG_SWITCH +#define BFALSE (defval_t)0, CFG_SWITCH -#define INT(x) (void *)x +#define DV_INT(x) (defval_t)x, CFG_INTEGER +#define DV_STRING(x) (defval_t) (char *)x, CFG_STRING +#define DV_LIST(x) (defval_t) (char *)x, CFG_LIST +#define DV_OCTAL(x) (defval_t) (char *)x, CFG_OCTAL +#define DV_STRINGLIST(x) (defval_t) (char *)x, CFG_STRINGLIST int ConfigInit(char *filename); void ConfigCleanup(void);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor