You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ma...@apache.org on 2006/01/10 17:39:03 UTC
svn commit: r367680 - in /httpd/mod_mbox/branches/surgery/src: libmbox/
module/
Author: maxime
Date: Tue Jan 10 08:38:53 2006
New Revision: 367680
URL: http://svn.apache.org/viewcvs?rev=367680&view=rev
Log:
Untabify and remove trailing whitespaces. No code changes
Modified:
httpd/mod_mbox/branches/surgery/src/libmbox/mbox_cache.c
httpd/mod_mbox/branches/surgery/src/libmbox/mbox_cte.c
httpd/mod_mbox/branches/surgery/src/libmbox/mbox_externals.c
httpd/mod_mbox/branches/surgery/src/libmbox/mbox_mime.c
httpd/mod_mbox/branches/surgery/src/libmbox/mbox_parse.c
httpd/mod_mbox/branches/surgery/src/module/mod_mbox.c
httpd/mod_mbox/branches/surgery/src/module/mod_mbox_file.c
httpd/mod_mbox/branches/surgery/src/module/mod_mbox_index.c
httpd/mod_mbox/branches/surgery/src/module/mod_mbox_mime.c
httpd/mod_mbox/branches/surgery/src/module/mod_mbox_out.c
httpd/mod_mbox/branches/surgery/src/module/mod_mbox_search.c
Modified: httpd/mod_mbox/branches/surgery/src/libmbox/mbox_cache.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/surgery/src/libmbox/mbox_cache.c?rev=367680&r1=367679&r2=367680&view=diff
==============================================================================
--- httpd/mod_mbox/branches/surgery/src/libmbox/mbox_cache.c (original)
+++ httpd/mod_mbox/branches/surgery/src/libmbox/mbox_cache.c Tue Jan 10 08:38:53 2006
@@ -293,5 +293,3 @@
/* dump_dbm(mli->db); */
return rv;
}
-
-
Modified: httpd/mod_mbox/branches/surgery/src/libmbox/mbox_cte.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/surgery/src/libmbox/mbox_cte.c?rev=367680&r1=367679&r2=367680&view=diff
==============================================================================
--- httpd/mod_mbox/branches/surgery/src/libmbox/mbox_cte.c (original)
+++ httpd/mod_mbox/branches/surgery/src/libmbox/mbox_cte.c Tue Jan 10 08:38:53 2006
@@ -78,7 +78,7 @@
* safe.
*/
apr_size_t mbox_cte_escape_html(apr_pool_t *p, const char *s,
- apr_size_t len, char **body)
+ apr_size_t len, char **body)
{
char *x;
int i, j;
@@ -296,26 +296,26 @@
/* Quoted-Printable decoding : mode 'q' */
if ((*mode == 'q') || (*mode == 'Q')) {
apr_size_t data_len;
- int i;
+ int i;
- /* In QP header encoding, spaces are encoded either in =20 (as
- in all QP encoding) or in underscores '_' (for header
- encoding). The first case will be handle by the QP
- decoding, so we must handle the other one */
- for (i = 0; i < strlen(data); i++) {
- if (data[i] == '_') {
- data[i] = ' ';
- }
- }
+ /* In QP header encoding, spaces are encoded either in =20 (as
+ in all QP encoding) or in underscores '_' (for header
+ encoding). The first case will be handle by the QP
+ decoding, so we must handle the other one */
+ for (i = 0; i < strlen(data); i++) {
+ if (data[i] == '_') {
+ data[i] = ' ';
+ }
+ }
- data_len = mbox_cte_decode_qp(data);
- data[data_len] = 0;
+ data_len = mbox_cte_decode_qp(data);
+ data[data_len] = 0;
}
else if ((*mode == 'b') || (*mode == 'B')) {
apr_size_t data_len;
- data_len = mbox_cte_decode_b64(data);
- data[data_len] = 0;
+ data_len = mbox_cte_decode_b64(data);
+ data[data_len] = 0;
}
/* Convert charset to uppercase */
@@ -326,24 +326,24 @@
/* Charset conversion */
if (apr_xlate_open(&xlate, "UTF-8", charset, p) == APR_SUCCESS) {
apr_size_t inbytes_left, outbytes_left;
- apr_size_t outbuf_len = strlen(data);
+ apr_size_t outbuf_len = strlen(data);
- char *new_data;
+ char *new_data;
- /* Allocate some memory for our resulting data, and initialize
- counters. */
- new_data = apr_palloc(p, outbuf_len);
- inbytes_left = strlen(data);
- outbytes_left = strlen(data);
+ /* Allocate some memory for our resulting data, and initialize
+ counters. */
+ new_data = apr_palloc(p, outbuf_len);
+ inbytes_left = strlen(data);
+ outbytes_left = strlen(data);
- /* Convert */
- // apr_xlate_conv_buffer(xlate, data, &inbytes_left,
- // new_data, &outbytes_left);
+ /* Convert */
+ // apr_xlate_conv_buffer(xlate, data, &inbytes_left,
+ // new_data, &outbytes_left);
- // new_data[outbuf_len - outbytes_left] = 0;
- // data = new_data;
+ // new_data[outbuf_len - outbytes_left] = 0;
+ // data = new_data;
- apr_xlate_close(xlate);
+ apr_xlate_close(xlate);
}
return data;
@@ -358,27 +358,27 @@
do {
char c;
- start = strstr(src, "=?");
- if (!start) {
- result = apr_psprintf(p, "%s%s", result, src);
- return result;
- }
+ start = strstr(src, "=?");
+ if (!start) {
+ result = apr_psprintf(p, "%s%s", result, src);
+ return result;
+ }
- end = strstr(start, "?=");
- if (!end) {
+ end = strstr(start, "?=");
+ if (!end) {
result = apr_psprintf(p, "%s%s", result, src);
- return result;
- }
+ return result;
+ }
- c = *start;
- *start = 0;
- result = apr_psprintf(p, "%s%s", result, src);
- *start = c;
+ c = *start;
+ *start = 0;
+ result = apr_psprintf(p, "%s%s", result, src);
+ *start = c;
- part = mbox_cte_decode_rfc2047(p, start);
- result = apr_psprintf(p, "%s%s", result, part);
+ part = mbox_cte_decode_rfc2047(p, start);
+ result = apr_psprintf(p, "%s%s", result, part);
- src = end + 2;
+ src = end + 2;
} while (src && *src);
return result;
Modified: httpd/mod_mbox/branches/surgery/src/libmbox/mbox_externals.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/surgery/src/libmbox/mbox_externals.c?rev=367680&r1=367679&r2=367680&view=diff
==============================================================================
--- httpd/mod_mbox/branches/surgery/src/libmbox/mbox_externals.c (original)
+++ httpd/mod_mbox/branches/surgery/src/libmbox/mbox_externals.c Tue Jan 10 08:38:53 2006
@@ -1,18 +1,18 @@
/* Copyright 2001-2005 The Apache Software Foundation or its licensors, as
-* applicable.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/** THIS FILE MUST BE REMOVED WHEN THE APR-UTIL LIBRARY WILL BE FIXED
* AND PACKAGED. */
@@ -371,17 +371,17 @@
/* Do we have a timezone ? */
if (gmtstr) {
int offset;
- switch (*gmtstr) {
- case '-':
- offset = atoi(gmtstr+1);
- ds.tm_gmtoff -= (offset / 100) * 60 * 60;
- ds.tm_gmtoff -= (offset % 100) * 60;
- break;
- case '+':
- offset = atoi(gmtstr+1);
- ds.tm_gmtoff += (offset / 100) * 60 * 60;
- ds.tm_gmtoff += (offset % 100) * 60;
- break;
+ switch (*gmtstr) {
+ case '-':
+ offset = atoi(gmtstr+1);
+ ds.tm_gmtoff -= (offset / 100) * 60 * 60;
+ ds.tm_gmtoff -= (offset % 100) * 60;
+ break;
+ case '+':
+ offset = atoi(gmtstr+1);
+ ds.tm_gmtoff += (offset / 100) * 60 * 60;
+ ds.tm_gmtoff += (offset % 100) * 60;
+ break;
}
}
Modified: httpd/mod_mbox/branches/surgery/src/libmbox/mbox_mime.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/surgery/src/libmbox/mbox_mime.c?rev=367680&r1=367679&r2=367680&view=diff
==============================================================================
--- httpd/mod_mbox/branches/surgery/src/libmbox/mbox_mime.c (original)
+++ httpd/mod_mbox/branches/surgery/src/libmbox/mbox_mime.c Tue Jan 10 08:38:53 2006
@@ -23,8 +23,8 @@
* levels of MIME parts, this function is recursive.
*/
mbox_mime_message_t *mbox_mime_decode_multipart(apr_pool_t *p, char *body,
- char *ct, mbox_cte_e cte,
- char *boundary)
+ char *ct, mbox_cte_e cte,
+ char *boundary)
{
mbox_mime_message_t *mail;
char *tmp = NULL, *k = NULL, *end_bound = NULL;
@@ -53,53 +53,53 @@
/* If no Content-Type is given, we have to look for it. */
if (!ct) {
- tmp += sizeof("Content-Type: ") - 1;
- k = strchr(tmp, ';');
+ tmp += sizeof("Content-Type: ") - 1;
+ k = strchr(tmp, ';');
- /* Isolate the Content-Type string (between 'Content-Type: '
- and ';' or end of line */
- if (k && k < headers_bound) {
- *k = 0;
- }
- else {
- k = tmp;
- while (*k) {
- if (isspace(*k)) {
- *k = 0;
- break;
- }
- *k++;
- }
- }
-
- /* Copy the Content-Type and reset *k */
- mail->content_type = apr_pstrdup(p, tmp);
- *k = ';';
-
- /* If available, get MIME part name */
- tmp = ap_strstr(body, "name=");
- if (tmp && tmp < headers_bound) {
- tmp += sizeof("name=") - 1;
- k = tmp;
-
- while (*k) {
- if (isspace(*k) || *k == ';') {
- *k = 0;
- break;
- }
- *k++;
- }
-
- /* Check for double quotes */
- if ((*tmp == '"') && (tmp[strlen(tmp)-1] == '"')) {
- mail->content_name = apr_pstrndup(p, tmp+1, strlen(tmp) - 2);
- }
- else {
- mail->content_name = apr_pstrdup(p, tmp);
- }
+ /* Isolate the Content-Type string (between 'Content-Type: '
+ and ';' or end of line */
+ if (k && k < headers_bound) {
+ *k = 0;
+ }
+ else {
+ k = tmp;
+ while (*k) {
+ if (isspace(*k)) {
+ *k = 0;
+ break;
+ }
+ *k++;
+ }
+ }
+
+ /* Copy the Content-Type and reset *k */
+ mail->content_type = apr_pstrdup(p, tmp);
+ *k = ';';
+
+ /* If available, get MIME part name */
+ tmp = ap_strstr(body, "name=");
+ if (tmp && tmp < headers_bound) {
+ tmp += sizeof("name=") - 1;
+ k = tmp;
+
+ while (*k) {
+ if (isspace(*k) || *k == ';') {
+ *k = 0;
+ break;
+ }
+ *k++;
+ }
+
+ /* Check for double quotes */
+ if ((*tmp == '"') && (tmp[strlen(tmp)-1] == '"')) {
+ mail->content_name = apr_pstrndup(p, tmp+1, strlen(tmp) - 2);
+ }
+ else {
+ mail->content_name = apr_pstrdup(p, tmp);
+ }
- *k = ';';
- }
+ *k = ';';
+ }
}
else {
mail->content_type = ct;
@@ -110,20 +110,20 @@
/* Check Content-Disposition if the match is within the headers */
tmp = ap_strstr(body, "Content-Disposition: ");
if (tmp && tmp < headers_bound) {
- tmp += sizeof("Content-Disposition: ") - 1;
- k = tmp;
+ tmp += sizeof("Content-Disposition: ") - 1;
+ k = tmp;
- while (*k) {
- if (isspace(*k) || *k == ';') {
- *k = 0;
- break;
- }
- *k++;
- }
-
- /* Copy the Content-Disposition and reset *k */
- mail->content_disposition = apr_pstrdup(p, tmp);
- *k = '\n';
+ while (*k) {
+ if (isspace(*k) || *k == ';') {
+ *k = 0;
+ break;
+ }
+ *k++;
+ }
+
+ /* Copy the Content-Disposition and reset *k */
+ mail->content_disposition = apr_pstrdup(p, tmp);
+ *k = '\n';
}
else {
mail->content_disposition = apr_pstrdup(p, "inline");
@@ -132,23 +132,23 @@
/* Check Content-Transfer-Encoding, if needed */
if (cte == CTE_NONE)
{
- tmp = ap_strstr(body, "Content-Transfer-Encoding: ");
- if (tmp && tmp < headers_bound) {
- tmp += sizeof("Content-Transfer-Encoding: ") - 1;
- k = tmp;
-
- while (*k) {
- if (isspace(*k) || *k == ';') {
- *k = 0;
- break;
- }
- *k++;
- }
-
- /* Copy the Content-Disposition and reset *k */
- mail->cte = mbox_parse_cte_header(tmp);
- *k = '\n';
- }
+ tmp = ap_strstr(body, "Content-Transfer-Encoding: ");
+ if (tmp && tmp < headers_bound) {
+ tmp += sizeof("Content-Transfer-Encoding: ") - 1;
+ k = tmp;
+
+ while (*k) {
+ if (isspace(*k) || *k == ';') {
+ *k = 0;
+ break;
+ }
+ *k++;
+ }
+
+ /* Copy the Content-Disposition and reset *k */
+ mail->cte = mbox_parse_cte_header(tmp);
+ *k = '\n';
+ }
}
else {
mail->cte = cte;
@@ -172,95 +172,95 @@
/* If the mail is a multipart message, search for the boundary,
and process its sub parts by recursive calls. */
if (strncmp(mail->content_type, "multipart/", strlen("multipart/")) == 0) {
- int end = 0, count = 0;
- char *search, *bound;
+ int end = 0, count = 0;
+ char *search, *bound;
+
+ /* If the boundary was not given, we must look for it in the headers */
+ if (!boundary) {
+ tmp = ap_strstr(body, "boundary=\"");
+ if (!tmp) {
+ return NULL;
+ }
+
+ tmp += sizeof("boundary=\"") - 1;
+ k = tmp;
+
+ while (*k) {
+ if (*k == '"') {
+ *k = 0;
+ break;
+ }
+ *k++;
+ }
+
+ mail->boundary = apr_pstrdup(p, tmp);
+ *k = '"';
+ }
- /* If the boundary was not given, we must look for it in the headers */
- if (!boundary) {
- tmp = ap_strstr(body, "boundary=\"");
- if (!tmp) {
- return NULL;
- }
-
- tmp += sizeof("boundary=\"") - 1;
- k = tmp;
-
- while (*k) {
- if (*k == '"') {
- *k = 0;
- break;
- }
- *k++;
- }
-
- mail->boundary = apr_pstrdup(p, tmp);
- *k = '"';
- }
-
- /* Otherwise, the boundary is as given to us */
- else {
- mail->boundary = boundary;
- }
-
- /* Now we have our boundary string. We must : look for it once
- (begining of MIME part) and then look for the end boundary :
- --boundary-- to mark the end of the MIME part */
-
- /* The start boundary */
- bound = ap_strstr(mail->body, mail->boundary);
- if (!bound) {
- return NULL;
- }
-
- /* The end boudary */
- end_bound = apr_psprintf(p, "--%s--", mail->boundary);
- tmp = ap_strstr(mail->body, end_bound);
- if (!tmp) {
- return NULL;
- }
- *tmp = 0;
-
- /* Set the search begining to the line after the start boundary. */
- search = bound + strlen(mail->boundary) + 1;
-
- /* While the MIME part is not finished, go through all sub parts */
- while (!end) {
- char *inbound;
-
- inbound = ap_strstr(search+strlen(mail->boundary), mail->boundary);
- if (inbound) {
- char *t = inbound - 2;
- *t = 0;
- }
-
- /* Allocate a new pointer for the sub part, and parse it. */
- mail->sub = realloc(mail->sub, ++count * sizeof(struct mimemsg *));
- mail->sub[count-1] = mbox_mime_decode_multipart(p, search, NULL, CTE_NONE, NULL);
-
- /* If the boudary is found again, it means we have another
- MIME part in the same multipart message. Set the new
- search begining to the line after this new start
- boundary */
- if (inbound) {
- char *t = inbound - 2;
- *t = '-';
-
- search = inbound + strlen(mail->boundary) + 1;
-
- if (mail->sub[count-1] && mail->sub[count-1]->body) {
- mail->sub[count-1]->body_len = inbound - mail->sub[count-1]->body - 2;
- }
- }
-
- /* Otherwise, the MIME part is finished. */
- else {
- mail->sub_count = count;
- end = 1;
- }
- }
+ /* Otherwise, the boundary is as given to us */
+ else {
+ mail->boundary = boundary;
+ }
+
+ /* Now we have our boundary string. We must : look for it once
+ (begining of MIME part) and then look for the end boundary :
+ --boundary-- to mark the end of the MIME part */
+
+ /* The start boundary */
+ bound = ap_strstr(mail->body, mail->boundary);
+ if (!bound) {
+ return NULL;
+ }
+
+ /* The end boudary */
+ end_bound = apr_psprintf(p, "--%s--", mail->boundary);
+ tmp = ap_strstr(mail->body, end_bound);
+ if (!tmp) {
+ return NULL;
+ }
+ *tmp = 0;
+
+ /* Set the search begining to the line after the start boundary. */
+ search = bound + strlen(mail->boundary) + 1;
+
+ /* While the MIME part is not finished, go through all sub parts */
+ while (!end) {
+ char *inbound;
+
+ inbound = ap_strstr(search+strlen(mail->boundary), mail->boundary);
+ if (inbound) {
+ char *t = inbound - 2;
+ *t = 0;
+ }
+
+ /* Allocate a new pointer for the sub part, and parse it. */
+ mail->sub = realloc(mail->sub, ++count * sizeof(struct mimemsg *));
+ mail->sub[count-1] = mbox_mime_decode_multipart(p, search, NULL, CTE_NONE, NULL);
+
+ /* If the boudary is found again, it means we have another
+ MIME part in the same multipart message. Set the new
+ search begining to the line after this new start
+ boundary */
+ if (inbound) {
+ char *t = inbound - 2;
+ *t = '-';
+
+ search = inbound + strlen(mail->boundary) + 1;
+
+ if (mail->sub[count-1] && mail->sub[count-1]->body) {
+ mail->sub[count-1]->body_len = inbound - mail->sub[count-1]->body - 2;
+ }
+ }
+
+ /* Otherwise, the MIME part is finished. */
+ else {
+ mail->sub_count = count;
+ end = 1;
+ }
+ }
- /* Finally reset the end-body pointer. */
- // *tmp = '-';
+ /* Finally reset the end-body pointer. */
+ // *tmp = '-';
}
/* If the parsed body is not multipart or is a MIME part, the body
Modified: httpd/mod_mbox/branches/surgery/src/libmbox/mbox_parse.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/surgery/src/libmbox/mbox_parse.c?rev=367680&r1=367679&r2=367680&view=diff
==============================================================================
--- httpd/mod_mbox/branches/surgery/src/libmbox/mbox_parse.c (original)
+++ httpd/mod_mbox/branches/surgery/src/libmbox/mbox_parse.c Tue Jan 10 08:38:53 2006
@@ -527,7 +527,7 @@
m->rfc822_date = (char*)apr_pcalloc(r->pool, APR_RFC822_DATE_LEN);
apr_strftime(m->str_date, &len, APR_RFC822_DATE_LEN,
- "%a, %d %b, %H:%M", &time_exp);
+ "%a, %d %b, %H:%M", &time_exp);
apr_rfc822_date(m->rfc822_date, m->date);
/* Parse the references into a table. */
@@ -761,13 +761,13 @@
{
#ifdef APR_HAS_MMAP
msgc.body_end = b.b - b.sb;
- /* With mmap, we can hit a file that brings the From check to the very
- * end of the mmap region - hence a dangling pointer (likely SEGV).
- * Therefore, break out of the loop first.
- */
- if (msgc.body_end == b.maxlen) {
- break;
- }
+ /* With mmap, we can hit a file that brings the From check to the very
+ * end of the mmap region - hence a dangling pointer (likely SEGV).
+ * Therefore, break out of the loop first.
+ */
+ if (msgc.body_end == b.maxlen) {
+ break;
+ }
#else
msgc.body_end = b.totalread - b.len + b.b - b.rb;
#endif
@@ -813,8 +813,8 @@
msgc.subject = apr_table_get(table, "Subject");
temp = apr_table_get(table, "Date");
if (temp) {
- /* FIXME: Change this back to apr_date_parse_rfc()
- as soon as it is fixed ! */
+ /* FIXME: Change this back to apr_date_parse_rfc()
+ as soon as it is fixed ! */
msgc.date = mbox_date_parse_rfc(temp);
}
else {
@@ -958,9 +958,9 @@
status = apr_dbm_nextkey(msgDB, &msgKey);
- if (count) {
- (*count)++;
- }
+ if (count) {
+ (*count)++;
+ }
}
apr_pool_destroy(tpool);
Modified: httpd/mod_mbox/branches/surgery/src/module/mod_mbox.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/surgery/src/module/mod_mbox.c?rev=367680&r1=367679&r2=367680&view=diff
==============================================================================
--- httpd/mod_mbox/branches/surgery/src/module/mod_mbox.c (original)
+++ httpd/mod_mbox/branches/surgery/src/module/mod_mbox.c Tue Jan 10 08:38:53 2006
@@ -164,15 +164,15 @@
for (i=0, pos=0; i<len; i++, pos++) {
/* Reset the position counter if we pass a newline character */
if (str[i] == '\n') {
- pos = 0;
+ pos = 0;
}
/* If the position counter is after the wrap limit, wrap text at
- first space available */
+ first space available */
if ((pos >= MBOX_WRAP_TO) &&
- ((str[i] == ' ') || (str[i] == '\t'))) {
- str[i] = '\n';
- pos = 0;
+ ((str[i] == ' ') || (str[i] == '\t'))) {
+ str[i] = '\n';
+ pos = 0;
}
}
@@ -212,10 +212,10 @@
static const command_rec mbox_cmds[] ={
AP_INIT_FLAG("mboxindex", ap_set_flag_slot,
(void *)APR_OFFSETOF(mbox_dir_cfg_t, enabled), OR_INDEXES,
- "Enable mod_mbox to create directory listings of .mbox files."),
+ "Enable mod_mbox to create directory listings of .mbox files."),
AP_INIT_FLAG("mboxantispam", ap_set_flag_slot,
(void *)APR_OFFSETOF(mbox_dir_cfg_t, antispam), OR_INDEXES,
- "Enable mod_mbox email obfuscation."),
+ "Enable mod_mbox email obfuscation."),
AP_INIT_TAKE1("mboxsearch", ap_set_string_slot,
(void *)APR_OFFSETOF(mbox_dir_cfg_t, search_path), OR_INDEXES,
"Set the Directory that contains Search Data"),
@@ -230,7 +230,7 @@
"Set the path to the Javascript file."),
AP_INIT_FLAG("mboxhideempty", ap_set_flag_slot,
(void *)APR_OFFSETOF(mbox_dir_cfg_t, hide_empty), OR_INDEXES,
- "Whether to display empty mboxes in index listing."),
+ "Whether to display empty mboxes in index listing."),
{NULL}
};
Modified: httpd/mod_mbox/branches/surgery/src/module/mod_mbox_file.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/surgery/src/module/mod_mbox_file.c?rev=367680&r1=367679&r2=367680&view=diff
==============================================================================
--- httpd/mod_mbox/branches/surgery/src/module/mod_mbox_file.c (original)
+++ httpd/mod_mbox/branches/surgery/src/module/mod_mbox_file.c Tue Jan 10 08:38:53 2006
@@ -1,18 +1,18 @@
/* Copyright 2001-2005 The Apache Software Foundation or its licensors, as
-* applicable.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
#include "mod_mbox.h"
@@ -42,9 +42,9 @@
values */
if (!len) {
m->raw_msg = NULL;
- m->raw_body = NULL;
+ m->raw_body = NULL;
- return m;
+ return m;
}
m->raw_msg = apr_palloc(r->pool, len+1);
@@ -218,14 +218,14 @@
if (threads) {
c = find_prev_thread(r, msgID, threads);
- if (c && c->message) {
- context[2] = c->message->msgID;
- }
-
- c = find_next_thread(r, msgID, threads);
- if (c && c->message) {
- context[3] = c->message->msgID;
- }
+ if (c && c->message) {
+ context[2] = c->message->msgID;
+ }
+
+ c = find_next_thread(r, msgID, threads);
+ if (c && c->message) {
+ context[3] = c->message->msgID;
+ }
}
return context;
@@ -249,7 +249,7 @@
r->handler != MBOX_HANDLER */
if (!r->handler ||
(strcmp(r->handler,MBOX_MAGIC_TYPE) &&
- strcmp(r->handler,MBOX_HANDLER))) {
+ strcmp(r->handler,MBOX_HANDLER))) {
return DECLINED;
}
@@ -278,7 +278,7 @@
/* Open the file */
if ((status = apr_file_open(&f, r->filename, APR_READ,
- APR_OS_DEFAULT, r->pool)) != APR_SUCCESS) {
+ APR_OS_DEFAULT, r->pool)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
"file permissions deny server access: %s", r->filename);
return HTTP_FORBIDDEN;
@@ -286,44 +286,44 @@
/* AJAX requests return XML */
if (strncmp(r->path_info, "/ajax", 5) == 0) {
- /* Set content type */
+ /* Set content type */
ap_set_content_type(r, "application/xml");
- if (r->header_only) {
- return OK;
+ if (r->header_only) {
+ return OK;
}
- if (strcmp(r->path_info, "/ajax/boxlist") == 0)
- status = mbox_xml_boxlist(r);
+ if (strcmp(r->path_info, "/ajax/boxlist") == 0)
+ status = mbox_xml_boxlist(r);
- else if (strcmp(r->path_info, "/ajax/thread") == 0)
- status = mbox_xml_msglist(r, f, MBOX_SORT_THREAD);
- else if (strcmp(r->path_info, "/ajax/author") == 0)
- status = mbox_xml_msglist(r, f, MBOX_SORT_AUTHOR);
- else if (strcmp(r->path_info, "/ajax/date") == 0)
- status = mbox_xml_msglist(r, f, MBOX_SORT_DATE);
- else
- status = mbox_xml_message(r, f);
+ else if (strcmp(r->path_info, "/ajax/thread") == 0)
+ status = mbox_xml_msglist(r, f, MBOX_SORT_THREAD);
+ else if (strcmp(r->path_info, "/ajax/author") == 0)
+ status = mbox_xml_msglist(r, f, MBOX_SORT_AUTHOR);
+ else if (strcmp(r->path_info, "/ajax/date") == 0)
+ status = mbox_xml_msglist(r, f, MBOX_SORT_DATE);
+ else
+ status = mbox_xml_message(r, f);
}
else if (strncmp(r->path_info, "/raw", 4) == 0) {
status = mbox_raw_message(r, f);
}
else {
- /* Set content type */
+ /* Set content type */
ap_set_content_type(r, "text/html");
- if (r->header_only) {
- return OK;
+ if (r->header_only) {
+ return OK;
}
- if (strcmp(r->path_info, "/browser") == 0)
- status = mbox_ajax_browser(r);
+ if (strcmp(r->path_info, "/browser") == 0)
+ status = mbox_ajax_browser(r);
else if (strcmp(r->path_info, "/thread") == 0)
status = mbox_static_msglist(r, f, MBOX_SORT_THREAD);
- else if (strcmp(r->path_info, "/author") == 0)
+ else if (strcmp(r->path_info, "/author") == 0)
status = mbox_static_msglist(r, f, MBOX_SORT_AUTHOR);
- else if (strcmp(r->path_info, "/date") == 0)
+ else if (strcmp(r->path_info, "/date") == 0)
status = mbox_static_msglist(r, f, MBOX_SORT_DATE);
else
Modified: httpd/mod_mbox/branches/surgery/src/module/mod_mbox_index.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/surgery/src/module/mod_mbox_index.c?rev=367680&r1=367679&r2=367680&view=diff
==============================================================================
--- httpd/mod_mbox/branches/surgery/src/module/mod_mbox_index.c (original)
+++ httpd/mod_mbox/branches/surgery/src/module/mod_mbox_index.c Tue Jan 10 08:38:53 2006
@@ -1,18 +1,18 @@
/* Copyright 2001-2005 The Apache Software Foundation or its licensors, as
-* applicable.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/* The file contains an alternative Directory Index Handler that
* displays information about the mailing list.
@@ -73,8 +73,8 @@
(strstr(finfo.name, "incomplete") == NULL)) {
fi = (mbox_file_t*)apr_array_push(files);
fi->filename = apr_pstrdup(r->pool, finfo.name);
- mbox_cache_get_count(mli, &(fi->count), (char *)finfo.name);
- }
+ mbox_cache_get_count(mli, &(fi->count), (char *)finfo.name);
+ }
}
apr_dir_close(dir);
@@ -96,7 +96,7 @@
apr_size_t dlen;
char *etag;
apr_time_exp_t extime;
-
+
/* Only allow GETs */
r->allowed |= (AP_METHOD_BIT << M_GET);
if (r->method_number != M_GET) {
@@ -118,14 +118,14 @@
ap_rputs("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", r);
ap_rputs("<feed xmlns=\"http://www.w3.org/2005/Atom\">\n", r);
ap_rprintf(r, "<title>%s@%s Archives</title>\n",
- ESCAPE_OR_BLANK(r->pool, mli->list),
- ESCAPE_OR_BLANK(r->pool, mli->domain));
+ ESCAPE_OR_BLANK(r->pool, mli->list),
+ ESCAPE_OR_BLANK(r->pool, mli->domain));
ap_rprintf(r, "<link rel=\"self\" href=\"%s?format=atom\"/>\n", ap_construct_url(r->pool, r->uri, r));
ap_rprintf(r, "<link href=\"%s\"/>\n", ap_construct_url(r->pool, r->uri, r));
ap_rprintf(r, "<id>%s</id>\n", ap_construct_url(r->pool, r->uri, r));
apr_time_exp_gmt(&extime, mli->mtime);
-
+
apr_strftime(dstr, &dlen, sizeof(dstr),
"%G-%m-%dT%H:%M:%SZ", &extime);
@@ -209,25 +209,25 @@
if (conf->style_path) {
ap_rprintf(r, " <link rel=\"stylesheet\" type=\"text/css\" href=\"%s\" />\n",
- conf->style_path);
+ conf->style_path);
}
if (conf->script_path) {
ap_rprintf(r, " <script type=\"text/javascript\" src=\"%s\"></script>\n",
- conf->script_path);
+ conf->script_path);
}
ap_rputs(" </head>\n\n", r);
ap_rputs(" <body id=\"archives\" onload=\"indexLinks ();\">\n", r);
ap_rprintf(r, " <h1>Mailing list archives: %s@%s</h1>\n",
- ESCAPE_OR_BLANK(r->pool, mli->list),
- ESCAPE_OR_BLANK(r->pool, mli->domain));
+ ESCAPE_OR_BLANK(r->pool, mli->list),
+ ESCAPE_OR_BLANK(r->pool, mli->domain));
if (conf->root_path) {
ap_rprintf(r, " <h5><a href=\"%s\" title=\"Back to the archives depot\">"
- "Site index</a></h5>\n\n",
- conf->root_path);
+ "Site index</a></h5>\n\n",
+ conf->root_path);
}
/* Output header and list information */
@@ -236,32 +236,32 @@
ap_rputs(" <tbody>\n", r);
ap_rprintf(r, " <tr><td class=\"left\">Writing to the list</td>"
- "<td class=\"right\">%s@%s</td></tr>\n",
- ESCAPE_OR_BLANK(r->pool, mli->list),
- ESCAPE_OR_BLANK(r->pool, mli->domain));
+ "<td class=\"right\">%s@%s</td></tr>\n",
+ ESCAPE_OR_BLANK(r->pool, mli->list),
+ ESCAPE_OR_BLANK(r->pool, mli->domain));
ap_rprintf(r, " <tr><td class=\"left\">Subscription address</td>"
- "<td class=\"right\">%s-subscribe@%s</td></tr>\n",
- ESCAPE_OR_BLANK(r->pool, mli->list),
- ESCAPE_OR_BLANK(r->pool, mli->domain));
+ "<td class=\"right\">%s-subscribe@%s</td></tr>\n",
+ ESCAPE_OR_BLANK(r->pool, mli->list),
+ ESCAPE_OR_BLANK(r->pool, mli->domain));
ap_rprintf(r, " <tr><td class=\"left\">Digest subscription address</td>"
- "<td class=\"right\">%s-digest-subscribe@%s</td></tr>\n",
- ESCAPE_OR_BLANK(r->pool, mli->list),
- ESCAPE_OR_BLANK(r->pool, mli->domain));
+ "<td class=\"right\">%s-digest-subscribe@%s</td></tr>\n",
+ ESCAPE_OR_BLANK(r->pool, mli->list),
+ ESCAPE_OR_BLANK(r->pool, mli->domain));
ap_rprintf(r, " <tr><td class=\"left\">Unsubscription addresses</td>"
- "<td class=\"right\">%s-unsubscribe@%s</td></tr>\n",
- ESCAPE_OR_BLANK(r->pool, mli->list),
- ESCAPE_OR_BLANK(r->pool, mli->domain));
+ "<td class=\"right\">%s-unsubscribe@%s</td></tr>\n",
+ ESCAPE_OR_BLANK(r->pool, mli->list),
+ ESCAPE_OR_BLANK(r->pool, mli->domain));
ap_rprintf(r, " <tr><td class=\"left\">Getting help with the list</td>"
- "<td class=\"right\">%s-help@%s</td></tr>\n",
- ESCAPE_OR_BLANK(r->pool, mli->list),
- ESCAPE_OR_BLANK(r->pool, mli->domain));
+ "<td class=\"right\">%s-help@%s</td></tr>\n",
+ ESCAPE_OR_BLANK(r->pool, mli->list),
+ ESCAPE_OR_BLANK(r->pool, mli->domain));
ap_rputs("<tr><td class=\"left\">Feeds:</td>"
- "<td class=\"right\">"
+ "<td class=\"right\">"
"<a href=\"?format=atom\">Atom 1.0</a></td></tr>\n", r);
ap_rputs(" </tbody>\n", r);
Modified: httpd/mod_mbox/branches/surgery/src/module/mod_mbox_mime.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/surgery/src/module/mod_mbox_mime.c?rev=367680&r1=367679&r2=367680&view=diff
==============================================================================
--- httpd/mod_mbox/branches/surgery/src/module/mod_mbox_mime.c (original)
+++ httpd/mod_mbox/branches/surgery/src/module/mod_mbox_mime.c Tue Jan 10 08:38:53 2006
@@ -1,18 +1,18 @@
/* Copyright 2001-2005 The Apache Software Foundation or its licensors, as
-* applicable.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/* MIME parsing and structure management functions.
*/
@@ -36,7 +36,7 @@
len = mbox_cte_decode_b64(new_body);
}
else if (cte == CTE_QP) {
- len = mbox_cte_decode_qp(new_body);
+ len = mbox_cte_decode_qp(new_body);
}
new_body[len] = 0;
@@ -60,14 +60,14 @@
if (strncasecmp(m->content_type, "text/", strlen("text/")) == 0) {
char *new_body;
- new_body = mbox_mime_decode_body(p, m->cte, m->body, m->body_len);
- if (!new_body) {
- return MBOX_FETCH_ERROR_STR;
- }
+ new_body = mbox_mime_decode_body(p, m->cte, m->body, m->body_len);
+ if (!new_body) {
+ return MBOX_FETCH_ERROR_STR;
+ }
- m->body_len = mbox_cte_escape_html(p, new_body, m->body_len, &(m->body));
+ m->body_len = mbox_cte_escape_html(p, new_body, m->body_len, &(m->body));
- return apr_pstrndup(p, m->body, m->body_len);
+ return apr_pstrndup(p, m->body, m->body_len);
}
if (!m->sub) {
@@ -83,7 +83,7 @@
/* Display an XHTML MIME structure */
void mbox_mime_display_static_structure(request_rec *r, mbox_mime_message_t *m,
- char *link)
+ char *link)
{
int i;
@@ -109,7 +109,7 @@
}
ap_rprintf(r, " (%s, %s, %u bytes)</li>\n", m->content_disposition,
- mbox_cte_to_char(m->cte), m->body_len);
+ mbox_cte_to_char(m->cte), m->body_len);
if (!m->sub) {
return;
@@ -118,19 +118,19 @@
for (i=0 ; i<m->sub_count ; i++) {
ap_rputs("<ul>\n", r);
- if (link[strlen(link)-1] == '/') {
- link[strlen(link)-1] = 0;
- }
-
- mbox_mime_display_static_structure(r, m->sub[i],
- apr_psprintf(r->pool, "%s/%d", link, i+1));
- ap_rputs("</ul>\n", r);
+ if (link[strlen(link)-1] == '/') {
+ link[strlen(link)-1] = 0;
+ }
+
+ mbox_mime_display_static_structure(r, m->sub[i],
+ apr_psprintf(r->pool, "%s/%d", link, i+1));
+ ap_rputs("</ul>\n", r);
}
}
/* Display an XML MIME structure */
void mbox_mime_display_xml_structure(request_rec *r, mbox_mime_message_t *m,
- char *link)
+ char *link)
{
int i;
@@ -140,15 +140,15 @@
if (m->content_name) {
ap_rprintf(r, "<part name=\"%s\" cd=\"%s\" cte=\"%s\" "
- "length=\"%u\" link=\"%s\" />\n",
- m->content_name, m->content_disposition,
- mbox_cte_to_char(m->cte), m->body_len, link);
+ "length=\"%u\" link=\"%s\" />\n",
+ m->content_name, m->content_disposition,
+ mbox_cte_to_char(m->cte), m->body_len, link);
}
else {
ap_rprintf(r, "<part ct=\"%s\" cd=\"%s\" cte=\"%s\" "
- "length=\"%u\" link=\"%s\" />\n",
- m->content_type, m->content_disposition,
- mbox_cte_to_char(m->cte), m->body_len, link);
+ "length=\"%u\" link=\"%s\" />\n",
+ m->content_type, m->content_disposition,
+ mbox_cte_to_char(m->cte), m->body_len, link);
}
if (!m->sub) {
@@ -157,12 +157,12 @@
ap_rputs("<mime>\n", r);
for (i=0 ; i<m->sub_count ; i++) {
- if (link[strlen(link)-1] == '/') {
- link[strlen(link)-1] = 0;
- }
+ if (link[strlen(link)-1] == '/') {
+ link[strlen(link)-1] = 0;
+ }
mbox_mime_display_xml_structure(r, m->sub[i],
- apr_psprintf(r->pool, "%s/%d", link, i+1));
+ apr_psprintf(r->pool, "%s/%d", link, i+1));
}
ap_rputs("</mime>\n", r);
}
Modified: httpd/mod_mbox/branches/surgery/src/module/mod_mbox_out.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/surgery/src/module/mod_mbox_out.c?rev=367680&r1=367679&r2=367680&view=diff
==============================================================================
--- httpd/mod_mbox/branches/surgery/src/module/mod_mbox_out.c (original)
+++ httpd/mod_mbox/branches/surgery/src/module/mod_mbox_out.c Tue Jan 10 08:38:53 2006
@@ -1,18 +1,18 @@
/* Copyright 2001-2005 The Apache Software Foundation or its licensors, as
-* applicable.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/* This file contains all output functions.
*/
@@ -24,7 +24,7 @@
void display_atom_entry(request_rec *r, Message *m, const char* mboxfile,
apr_pool_t *pool, apr_file_t *f);
void mbox_static_message_nav(request_rec *r, char **context,
- char *baseURI, char *msgID);
+ char *baseURI, char *msgID);
char *mbox_months[12][2] = {
{ "Jan", "January" },
@@ -85,8 +85,8 @@
load_message(pool, f, m);
/* Parse multipart information */
m->mime_msg = mbox_mime_decode_multipart(pool, m->raw_body,
- m->content_type,
- m->cte, m->boundary);
+ m->content_type,
+ m->cte, m->boundary);
ap_rprintf(r, "%s", mbox_wrap_text(mbox_mime_get_body(pool, m->mime_msg)));
@@ -205,9 +205,9 @@
for (i = 0; i < files->nelts; i++) {
if (fi[i].count || !conf->hide_empty) {
- ap_rprintf(r, "<mbox id=\"%s\" count=\"%d\" />\n",
+ ap_rprintf(r, "<mbox id=\"%s\" count=\"%d\" />\n",
fi[i].filename, fi[i].count);
- }
+ }
}
ap_rputs("</boxlist>\n", r);
@@ -264,25 +264,25 @@
for (i=0 ; i < files->nelts; i++) {
if (fi[i].count || !conf->hide_empty) {
- if (strcmp(k+1, fi[i].filename) == 0) {
- ap_rputs(" <tr id=\"boxactive\">", r);
- }
- else {
- ap_rputs(" <tr>", r);
- }
-
- ap_rprintf(r, " <td class=\"box\"><a href=\"%s/%s%s\" title=\"Browse %s %.4s archives\">"
- "%s %.4s</a></td><td class=\"msgcount\">%d</td>\n",
- base_path, fi[i].filename, r->path_info,
- mbox_months[atoi(apr_pstrndup(r->pool,
- fi[i].filename+4, 2)) - 1][1],
- fi[i].filename,
- mbox_months[atoi(apr_pstrndup(r->pool,
- fi[i].filename+4, 2)) - 1][0],
- fi[i].filename, fi[i].count);
+ if (strcmp(k+1, fi[i].filename) == 0) {
+ ap_rputs(" <tr id=\"boxactive\">", r);
+ }
+ else {
+ ap_rputs(" <tr>", r);
+ }
+
+ ap_rprintf(r, " <td class=\"box\"><a href=\"%s/%s%s\" title=\"Browse %s %.4s archives\">"
+ "%s %.4s</a></td><td class=\"msgcount\">%d</td>\n",
+ base_path, fi[i].filename, r->path_info,
+ mbox_months[atoi(apr_pstrndup(r->pool,
+ fi[i].filename+4, 2)) - 1][1],
+ fi[i].filename,
+ mbox_months[atoi(apr_pstrndup(r->pool,
+ fi[i].filename+4, 2)) - 1][0],
+ fi[i].filename, fi[i].count);
- ap_rputs(" </tr>\n", r);
- }
+ ap_rputs(" </tr>\n", r);
+ }
}
ap_rputs(" </tbody>\n", r);
@@ -293,7 +293,7 @@
/* Outputs an XHTML list of available mailboxes */
apr_status_t mbox_static_index_boxlist(request_rec *r, mbox_dir_cfg_t *conf,
- mbox_cache_info *mli)
+ mbox_cache_info *mli)
{
mbox_file_t *fi;
apr_array_header_t *files;
@@ -310,59 +310,59 @@
for (i=0; i < files->nelts; i++) {
/* Only display an entry if it has messages or if we don't
- hide empty mailboxes */
+ hide empty mailboxes */
if (fi[i].count || !conf->hide_empty) {
- if (!year_hdr) {
- if (!side) {
- ap_rputs(" <tr><td class=\"left\">\n", r);
- side = 1;
- }
- else {
- ap_rputs(" <td class=\"right\">\n", r);
- side = 0;
- }
-
- ap_rputs(" <table class=\"year\">\n", r);
- ap_rputs(" <thead><tr>\n", r);
- ap_rprintf(r, " <th colspan=\"3\">Year %.4s</th>\n",
- fi[i].filename);
- ap_rputs(" </tr></thead>\n", r);
- ap_rputs(" <tbody>\n", r);
-
- year_hdr = 1;
- }
-
- ap_rputs(" <tr>\n", r);
- ap_rprintf(r, " <td class=\"date\">%s %.4s</td>\n",
- mbox_months[atoi(apr_pstrndup(r->pool,
+ if (!year_hdr) {
+ if (!side) {
+ ap_rputs(" <tr><td class=\"left\">\n", r);
+ side = 1;
+ }
+ else {
+ ap_rputs(" <td class=\"right\">\n", r);
+ side = 0;
+ }
+
+ ap_rputs(" <table class=\"year\">\n", r);
+ ap_rputs(" <thead><tr>\n", r);
+ ap_rprintf(r, " <th colspan=\"3\">Year %.4s</th>\n",
+ fi[i].filename);
+ ap_rputs(" </tr></thead>\n", r);
+ ap_rputs(" <tbody>\n", r);
+
+ year_hdr = 1;
+ }
+
+ ap_rputs(" <tr>\n", r);
+ ap_rprintf(r, " <td class=\"date\">%s %.4s</td>\n",
+ mbox_months[atoi(apr_pstrndup(r->pool,
fi[i].filename+4, 2)) - 1][0],
- fi[i].filename);
- ap_rprintf(r, " <td class=\"links\"><span class=\"links\" id=\"%.4s%.2s\">"
- "<a href=\"%.4s%.2s.mbox/thread\">Thread</a>"
- " · <a href=\"%.4s%.2s.mbox/date\">Date</a>"
- " · <a href=\"%.4s%.2s.mbox/author\">Author</a></span></td>\n",
- fi[i].filename, fi[i].filename+4,
- fi[i].filename, fi[i].filename+4,
- fi[i].filename, fi[i].filename+4,
- fi[i].filename, fi[i].filename+4);
- ap_rprintf(r, " <td class=\"msgcount\">%d</td>\n", fi[i].count);
- ap_rputs(" </tr>\n", r);
- }
-
- /* Year separation */
- if ((fi[i+1].filename && year_hdr) &&
- (fi[i].filename[3] != fi[i+1].filename[3])) {
- ap_rputs(" </tbody>\n", r);
- ap_rputs(" </table>\n", r);
- if (side) {
- ap_rputs(" </td>\n", r);
- }
- else {
- ap_rputs(" </td></tr>\n\n", r);
- }
+ fi[i].filename);
+ ap_rprintf(r, " <td class=\"links\"><span class=\"links\" id=\"%.4s%.2s\">"
+ "<a href=\"%.4s%.2s.mbox/thread\">Thread</a>"
+ " · <a href=\"%.4s%.2s.mbox/date\">Date</a>"
+ " · <a href=\"%.4s%.2s.mbox/author\">Author</a></span></td>\n",
+ fi[i].filename, fi[i].filename+4,
+ fi[i].filename, fi[i].filename+4,
+ fi[i].filename, fi[i].filename+4,
+ fi[i].filename, fi[i].filename+4);
+ ap_rprintf(r, " <td class=\"msgcount\">%d</td>\n", fi[i].count);
+ ap_rputs(" </tr>\n", r);
+ }
+
+ /* Year separation */
+ if ((fi[i+1].filename && year_hdr) &&
+ (fi[i].filename[3] != fi[i+1].filename[3])) {
+ ap_rputs(" </tbody>\n", r);
+ ap_rputs(" </table>\n", r);
+ if (side) {
+ ap_rputs(" </td>\n", r);
+ }
+ else {
+ ap_rputs(" </td></tr>\n\n", r);
+ }
- year_hdr = 0;
- }
+ year_hdr = 0;
+ }
}
ap_rputs(" </tbody>\n", r);
@@ -401,8 +401,8 @@
/* Wipe out at most three chars preceding the '@' sign */
for (i=0 ; i<3 ; i++) {
if ((atsign - i) > ltsign) {
- email[atsign - i] = '.';
- }
+ email[atsign - i] = '.';
+ }
}
return email;
@@ -410,7 +410,7 @@
/* Display an XHTML message list entry */
static void display_static_msglist_entry(request_rec *r, Message *m,
- int linked, int depth)
+ int linked, int depth)
{
mbox_dir_cfg_t *conf;
@@ -454,7 +454,7 @@
/* Message date */
if (linked) {
ap_rprintf(r, " <td class=\"date\">%s</td>\n",
- ESCAPE_OR_BLANK(r->pool, m->str_date));
+ ESCAPE_OR_BLANK(r->pool, m->str_date));
}
else {
ap_rputs(" <td class=\"date\"></td>\n", r);
@@ -465,7 +465,7 @@
/* Display an XML message list entry */
static void display_xml_msglist_entry(request_rec *r, Message *m,
- int linked, int depth)
+ int linked, int depth)
{
mbox_dir_cfg_t *conf;
@@ -480,7 +480,7 @@
}
ap_rprintf(r, " <message linked=\"%d\" depth=\"%d\" id=\"%s\">\n",
- linked, depth, URI_ESCAPE_OR_BLANK(r->pool, m->msgID));
+ linked, depth, URI_ESCAPE_OR_BLANK(r->pool, m->msgID));
ap_rprintf(r, " <from><![CDATA[%s]]></from>\n", from);
ap_rprintf(r, " <date><![CDATA[%s]]></date>\n", ESCAPE_OR_BLANK(r->pool, m->str_date));
@@ -491,7 +491,7 @@
/* Display a threaded message list for Container 'c' */
static void display_msglist_thread(request_rec *r, Container *c,
- int depth, int mode)
+ int depth, int mode)
{
Message *m;
int linked = 1;
@@ -506,7 +506,7 @@
}
else {
m = c->child->message;
- linked = 0;
+ linked = 0;
}
if (mode == MBOX_OUTPUT_STATIC) {
@@ -560,24 +560,24 @@
/* Compute the page count, depending on the sort flags */
if (sortFlags != MBOX_SORT_THREAD) {
pages = count / DEFAULT_MSGS_PER_PAGE;
- if (count > pages * DEFAULT_MSGS_PER_PAGE) {
- pages++;
- }
+ if (count > pages * DEFAULT_MSGS_PER_PAGE) {
+ pages++;
+ }
}
else {
- threads = calculate_threads(r->pool, head);
- c = threads;
- count = 0;
-
- while (c) {
- c = c->next;
- count++;
- }
+ threads = calculate_threads(r->pool, head);
+ c = threads;
+ count = 0;
+
+ while (c) {
+ c = c->next;
+ count++;
+ }
pages = count / DEFAULT_THREADS_PER_PAGE;
- if (count > pages * DEFAULT_THREADS_PER_PAGE) {
- pages++;
- }
+ if (count > pages * DEFAULT_THREADS_PER_PAGE) {
+ pages++;
+ }
}
/* This index only changes when the .mbox file changes. */
@@ -588,45 +588,45 @@
/* Send page header */
ap_rputs("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", r);
ap_rprintf(r, "<index page=\"%d\" pages=\"%d\">\n",
- current_page, pages);
+ current_page, pages);
/* For date and author sorts */
if (sortFlags != MBOX_SORT_THREAD) {
/* Sort the list */
head = mbox_sort_list(head, sortFlags);
- /* Pass useless messages */
- while (head && (i < current_page * DEFAULT_MSGS_PER_PAGE)) {
- head = head->next;
- i++;
- }
-
- /* Display current_page's messages */
- while (head && (i < (current_page + 1) * DEFAULT_MSGS_PER_PAGE)) {
- m = (Message*)head->value;
- display_xml_msglist_entry(r, m, 1, 0);
-
- head = head->next;
- i++;
- }
+ /* Pass useless messages */
+ while (head && (i < current_page * DEFAULT_MSGS_PER_PAGE)) {
+ head = head->next;
+ i++;
+ }
+
+ /* Display current_page's messages */
+ while (head && (i < (current_page + 1) * DEFAULT_MSGS_PER_PAGE)) {
+ m = (Message*)head->value;
+ display_xml_msglist_entry(r, m, 1, 0);
+
+ head = head->next;
+ i++;
+ }
}
/* For threaded view */
else {
c = threads;
- /* Pass useless threads */
- while (c && (i < current_page * DEFAULT_THREADS_PER_PAGE)) {
- c = c->next;
- i++;
- }
-
- /* Display current_page's threads */
- while (c && (i < (current_page + 1) * DEFAULT_THREADS_PER_PAGE)) {
- display_msglist_thread(r, c, 0, MBOX_OUTPUT_AJAX);
- c = c->next;
- i++;
- }
+ /* Pass useless threads */
+ while (c && (i < current_page * DEFAULT_THREADS_PER_PAGE)) {
+ c = c->next;
+ i++;
+ }
+
+ /* Display current_page's threads */
+ while (c && (i < (current_page + 1) * DEFAULT_THREADS_PER_PAGE)) {
+ display_msglist_thread(r, c, 0, MBOX_OUTPUT_AJAX);
+ c = c->next;
+ i++;
+ }
}
ap_rputs("</index>", r);
@@ -639,7 +639,7 @@
* FIXME: improve the algorithm in order to handle long pages list.
*/
static void mbox_static_msglist_page_selector(request_rec *r, char *baseURI,
- int pages, int current_page)
+ int pages, int current_page)
{
int i;
@@ -651,26 +651,26 @@
if (current_page) {
ap_rprintf(r, "<a href=\"%s%s?%d\">« Previous</a> · ",
- baseURI, r->path_info, current_page-1);
+ baseURI, r->path_info, current_page-1);
}
for (i = 0; i < pages; i++) {
if (i != 0) {
- ap_rputs(" · ", r);
- }
+ ap_rputs(" · ", r);
+ }
- if (i != current_page) {
- ap_rprintf(r, "<a href=\"%s%s?%d\">%d</a>",
- baseURI, r->path_info, i, i+1);
- }
- else {
- ap_rprintf(r, "%d", i+1);
- }
+ if (i != current_page) {
+ ap_rprintf(r, "<a href=\"%s%s?%d\">%d</a>",
+ baseURI, r->path_info, i, i+1);
+ }
+ else {
+ ap_rprintf(r, "%d", i+1);
+ }
}
if (current_page+1 < pages) {
ap_rprintf(r, " · <a href=\"%s%s?%d\">Next »</a>",
- baseURI, r->path_info, current_page+1);
+ baseURI, r->path_info, current_page+1);
}
}
@@ -707,24 +707,24 @@
/* Compute the page count, depending on the sort flags */
if (sortFlags != MBOX_SORT_THREAD) {
pages = count / DEFAULT_MSGS_PER_PAGE;
- if (count > pages * DEFAULT_MSGS_PER_PAGE) {
- pages++;
- }
+ if (count > pages * DEFAULT_MSGS_PER_PAGE) {
+ pages++;
+ }
}
else {
- threads = calculate_threads(r->pool, head);
- c = threads;
- count = 0;
-
- while (c) {
- c = c->next;
- count++;
- }
+ threads = calculate_threads(r->pool, head);
+ c = threads;
+ count = 0;
+
+ while (c) {
+ c = c->next;
+ count++;
+ }
pages = count / DEFAULT_THREADS_PER_PAGE;
- if (count > pages * DEFAULT_THREADS_PER_PAGE) {
- pages++;
- }
+ if (count > pages * DEFAULT_THREADS_PER_PAGE) {
+ pages++;
+ }
}
/* This index only changes when the .mbox file changes. */
@@ -754,13 +754,13 @@
ap_rputs("<html xmlns=\"http://www.w3.org/1999/xhtml\">\n", r);
ap_rputs(" <head>\n", r);
ap_rputs(" <meta http-equiv=\"Content-Type\" "
- "content=\"text/html; charset=utf-8\" />\n", r);
+ "content=\"text/html; charset=utf-8\" />\n", r);
ap_rprintf(r, " <title>Mailing list archives: %s %.4s</title>\n",
month, year);
if (conf->style_path) {
ap_rprintf(r, " <link rel=\"stylesheet\" type=\"text/css\" href=\"%s\" />\n",
- conf->style_path);
+ conf->style_path);
}
ap_rputs(" </head>\n\n", r);
@@ -773,12 +773,12 @@
if (conf->root_path) {
ap_rprintf(r, "<a href=\"%s\" title=\"Back to the archives depot\">"
- "Site index</a> · ",
- conf->root_path);
+ "Site index</a> · ",
+ conf->root_path);
}
ap_rprintf(r, "<a href=\"%s\" title=\"Back to the list index\">"
- "List index</a></h5>", get_base_path(r));
+ "List index</a></h5>", get_base_path(r));
ap_rputs(" <table id=\"msglist\">\n", r);
ap_rputs(" <thead><tr><th class=\"title\"><a href=\"browser\">Message list</a></th>", r);
@@ -790,21 +790,21 @@
ap_rputs("<th class=\"sort\">", r);
if (sortFlags == MBOX_SORT_THREAD) {
ap_rprintf(r, "Thread · "
- "<a href=\"%s/author\">Author</a> · "
- "<a href=\"%s/date\">Date</a>",
- baseURI, baseURI);
+ "<a href=\"%s/author\">Author</a> · "
+ "<a href=\"%s/date\">Date</a>",
+ baseURI, baseURI);
}
else if (sortFlags == MBOX_SORT_AUTHOR) {
ap_rprintf(r, "<a href=\"%s/thread\">Thread</a> · "
- "Author · "
- "<a href=\"%s/date\">Date</a>",
- baseURI, baseURI);
+ "Author · "
+ "<a href=\"%s/date\">Date</a>",
+ baseURI, baseURI);
}
else {
ap_rprintf(r, "<a href=\"%s/thread\">Thread</a> · "
- "<a href=\"%s/author\">Author</a> · "
- "Date",
- baseURI, baseURI);
+ "<a href=\"%s/author\">Author</a> · "
+ "Date",
+ baseURI, baseURI);
}
ap_rputs("</th></tr></thead>\n", r);
@@ -815,38 +815,38 @@
/* Sort the list */
head = mbox_sort_list(head, sortFlags);
- /* Pass useless messages */
- while (head && (i < current_page * DEFAULT_MSGS_PER_PAGE)) {
- head = head->next;
- i++;
- }
-
- /* Display current_page's messages */
- while (head && (i < (current_page + 1) * DEFAULT_MSGS_PER_PAGE)) {
- m = (Message*)head->value;
- display_static_msglist_entry(r, m, 1, 0);
-
- head = head->next;
- i++;
- }
+ /* Pass useless messages */
+ while (head && (i < current_page * DEFAULT_MSGS_PER_PAGE)) {
+ head = head->next;
+ i++;
+ }
+
+ /* Display current_page's messages */
+ while (head && (i < (current_page + 1) * DEFAULT_MSGS_PER_PAGE)) {
+ m = (Message*)head->value;
+ display_static_msglist_entry(r, m, 1, 0);
+
+ head = head->next;
+ i++;
+ }
}
/* For threaded view */
else {
c = threads;
- /* Pass useless threads */
- while (c && (i < current_page * DEFAULT_THREADS_PER_PAGE)) {
- c = c->next;
- i++;
- }
-
- /* Display current_page's threads */
- while (c && (i < (current_page + 1) * DEFAULT_THREADS_PER_PAGE)) {
- display_msglist_thread(r, c, 0, MBOX_OUTPUT_STATIC);
- c = c->next;
- i++;
- }
+ /* Pass useless threads */
+ while (c && (i < current_page * DEFAULT_THREADS_PER_PAGE)) {
+ c = c->next;
+ i++;
+ }
+
+ /* Display current_page's threads */
+ while (c && (i < (current_page + 1) * DEFAULT_THREADS_PER_PAGE)) {
+ display_msglist_thread(r, c, 0, MBOX_OUTPUT_STATIC);
+ c = c->next;
+ i++;
+ }
}
ap_rputs(" </tbody>\n", r);
@@ -878,17 +878,17 @@
ap_rputs("<html xmlns=\"http://www.w3.org/1999/xhtml\">\n", r);
ap_rputs(" <head>\n", r);
ap_rputs(" <meta http-equiv=\"Content-Type\" "
- "content=\"text/html; charset=utf-8\" />\n", r);
+ "content=\"text/html; charset=utf-8\" />\n", r);
ap_rputs(" <title>Mailing list archives</title>\n", r);
if (conf->style_path) {
ap_rprintf(r, " <link rel=\"stylesheet\" type=\"text/css\" href=\"%s\" />\n",
- conf->style_path);
+ conf->style_path);
}
if (conf->script_path) {
ap_rprintf(r, " <script type=\"text/javascript\" src=\"%s\"></script>\n",
- conf->script_path);
+ conf->script_path);
}
ap_rputs(" </head>\n\n", r);
@@ -900,18 +900,18 @@
if (conf->root_path) {
ap_rprintf(r, "<a href=\"%s\" title=\"Back to the archives depot\">"
- "Site index</a> · ",
- conf->root_path);
+ "Site index</a> · ",
+ conf->root_path);
}
ap_rprintf(r, "<a href=\"%s\" title=\"Back to the list index\">"
- "List index</a></h5>", get_base_path(r));
+ "List index</a></h5>", get_base_path(r));
/* Output a small notice if no MboxScriptPath configuration
directive was specified. */
if (!conf->script_path) {
ap_rputs(" <p>You did not specified a script path, and the dynamic "
- "browser won't run without it. Check your server configuration.\n", r);
+ "browser won't run without it. Check your server configuration.\n", r);
}
ap_rputs(" </body>\n</html>\n", r);
@@ -934,7 +934,7 @@
part = strchr(msgID, '/');
if (part) {
*part = 0;
- part++;
+ part++;
}
ap_unescape_url(msgID);
@@ -953,7 +953,7 @@
/* No MIME part specified : output whole message and return. */
if (!part) {
ap_set_content_type(r, "text/plain");
- ap_rprintf(r, "%s", m->raw_msg);
+ ap_rprintf(r, "%s", m->raw_msg);
return OK;
}
@@ -963,43 +963,43 @@
apr_size_t len = m->body_end - m->body_start;
ap_set_content_type(r, "text/plain");
- ap_rprintf(r, "%s", mbox_mime_decode_body(r->pool, m->cte,
- m->raw_body, len));
- return OK;
+ ap_rprintf(r, "%s", mbox_mime_decode_body(r->pool, m->cte,
+ m->raw_body, len));
+ return OK;
}
/* First, parse the MIME structure, and look for the correct
subpart */
m->mime_msg = mbox_mime_decode_multipart(r->pool, m->raw_body,
- m->content_type,
- m->cte, m->boundary);
+ m->content_type,
+ m->cte, m->boundary);
mime_part = m->mime_msg;
do {
int num;
- end = strchr(part, '/');
- if (end) {
- *end = 0;
- num = atoi(part);
- *end = '/';
-
- part = end + 1;
- }
- else {
- num = atoi(part);
- }
-
- if (mime_part && num > 0 &&
- (num <= mime_part->sub_count) &&
- mime_part->sub[num - 1] &&
- mime_part->sub[num - 1]->body != NULL) {
- mime_part = mime_part->sub[num - 1];
- }
- else {
- return HTTP_NOT_FOUND;
- }
+ end = strchr(part, '/');
+ if (end) {
+ *end = 0;
+ num = atoi(part);
+ *end = '/';
+
+ part = end + 1;
+ }
+ else {
+ num = atoi(part);
+ }
+
+ if (mime_part && num > 0 &&
+ (num <= mime_part->sub_count) &&
+ mime_part->sub[num - 1] &&
+ mime_part->sub[num - 1]->body != NULL) {
+ mime_part = mime_part->sub[num - 1];
+ }
+ else {
+ return HTTP_NOT_FOUND;
+ }
} while (*part && end);
if (strncmp(mime_part->content_type, "multipart/", 10) == 0) {
@@ -1026,28 +1026,28 @@
}
void mbox_static_message_nav(request_rec *r, char **context,
- char *baseURI, char *msgID)
+ char *baseURI, char *msgID)
{
ap_rputs(" <th class=\"nav\">", r);
/* Date navigation */
if (context[0]) {
ap_rprintf(r, "<a href=\"%s/%s\" "
- "title=\"Previous by date\">«</a>",
- baseURI, URI_ESCAPE_OR_BLANK(r->pool, context[0]));
+ "title=\"Previous by date\">«</a>",
+ baseURI, URI_ESCAPE_OR_BLANK(r->pool, context[0]));
}
else {
ap_rputs("«", r);
}
ap_rprintf(r, " <a href=\"%s/date\" "
- "title=\"View messages sorted by date\">Date</a> ",
- baseURI);
+ "title=\"View messages sorted by date\">Date</a> ",
+ baseURI);
if (context[1]) {
ap_rprintf(r, "<a href=\"%s/%s\" "
- "title=\"Next by date\">»</a>",
- baseURI, URI_ESCAPE_OR_BLANK(r->pool, context[1]));
+ "title=\"Next by date\">»</a>",
+ baseURI, URI_ESCAPE_OR_BLANK(r->pool, context[1]));
}
else {
ap_rputs("»", r);
@@ -1058,21 +1058,21 @@
/* Thread navigation */
if (context[2]) {
ap_rprintf(r, "<a href=\"%s/%s\" "
- "title=\"Previous by thread\">«</a>",
- baseURI, URI_ESCAPE_OR_BLANK(r->pool, context[2]));
+ "title=\"Previous by thread\">«</a>",
+ baseURI, URI_ESCAPE_OR_BLANK(r->pool, context[2]));
}
else {
ap_rputs("«", r);
}
ap_rprintf(r, " <a href=\"%s/thread\" "
- "title=\"View messages sorted by thread\">Thread</a> ",
- baseURI);
+ "title=\"View messages sorted by thread\">Thread</a> ",
+ baseURI);
if (context[3]) {
ap_rprintf(r, "<a href=\"%s/%s\" "
- "title=\"Next by thread\">»</a>",
- baseURI, URI_ESCAPE_OR_BLANK(r->pool, context[3]));
+ "title=\"Next by thread\">»</a>",
+ baseURI, URI_ESCAPE_OR_BLANK(r->pool, context[3]));
}
else {
ap_rputs("»", r);
@@ -1104,8 +1104,8 @@
/* Parse multipart information */
m->mime_msg = mbox_mime_decode_multipart(r->pool, m->raw_body,
- m->content_type,
- m->cte, m->boundary);
+ m->content_type,
+ m->cte, m->boundary);
ap_rputs("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", r);
ap_rputs("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n", r);
@@ -1114,12 +1114,12 @@
ap_rputs("<html xmlns=\"http://www.w3.org/1999/xhtml\">\n", r);
ap_rputs(" <head>\n", r);
ap_rputs(" <meta http-equiv=\"Content-Type\" "
- "content=\"text/html; charset=utf-8\" />\n", r);
+ "content=\"text/html; charset=utf-8\" />\n", r);
ap_rputs(" <title>Mailing list archives</title>\n", r);
if (conf->style_path) {
ap_rprintf(r, " <link rel=\"stylesheet\" type=\"text/css\" href=\"%s\" />\n",
- conf->style_path);
+ conf->style_path);
}
ap_rputs(" </head>\n\n", r);
@@ -1150,36 +1150,36 @@
/* Top navigation */
ap_rputs(" <thead>\n"
- " <tr>\n"
- " <th class=\"title\">Message view</th>\n", r);
+ " <tr>\n"
+ " <th class=\"title\">Message view</th>\n", r);
mbox_static_message_nav(r, context, baseURI, m->msgID);
ap_rputs(" </tr>\n"
- " </thead>\n\n", r);
+ " </thead>\n\n", r);
/* Bottom navigation */
ap_rputs(" <tfoot>\n"
- " <tr>\n"
- " <th class=\"title\"><a href=\"#archives\">Top</a></th>\n", r);
+ " <tr>\n"
+ " <th class=\"title\"><a href=\"#archives\">Top</a></th>\n", r);
mbox_static_message_nav(r, context, baseURI, m->msgID);
ap_rputs(" </tr>\n"
- " </tfoot>\n\n", r);
+ " </tfoot>\n\n", r);
/* Headers */
ap_rputs(" <tbody>\n", r);
ap_rprintf(r, " <tr class=\"from\">\n"
- " <td class=\"left\">From</td>\n"
- " <td class=\"right\">%s</td>\n"
- " </tr>\n", from);
+ " <td class=\"left\">From</td>\n"
+ " <td class=\"right\">%s</td>\n"
+ " </tr>\n", from);
ap_rprintf(r, " <tr class=\"subject\">\n"
- " <td class=\"left\">Subject</td>\n"
- " <td class=\"right\">%s</td>\n"
- " </tr>\n", ESCAPE_OR_BLANK(r->pool, m->subject));
+ " <td class=\"left\">Subject</td>\n"
+ " <td class=\"right\">%s</td>\n"
+ " </tr>\n", ESCAPE_OR_BLANK(r->pool, m->subject));
ap_rprintf(r, " <tr class=\"date\">\n"
- " <td class=\"left\">Date</td>\n"
- " <td class=\"right\">%s</td>\n"
- " </tr>\n", ESCAPE_OR_BLANK(r->pool, m->rfc822_date));
+ " <td class=\"left\">Date</td>\n"
+ " <td class=\"right\">%s</td>\n"
+ " </tr>\n", ESCAPE_OR_BLANK(r->pool, m->rfc822_date));
/* Message body */
ap_rputs(" <tr class=\"contents\"><td colspan=\"2\"><pre>\n", r);
@@ -1188,17 +1188,17 @@
/* MIME structure */
ap_rputs(" <tr class=\"mime\">\n"
- " <td class=\"left\">Mime</td>\n"
- " <td class=\"right\">\n<ul>\n", r);
+ " <td class=\"left\">Mime</td>\n"
+ " <td class=\"right\">\n<ul>\n", r);
mbox_mime_display_static_structure(r, m->mime_msg,
- apr_psprintf(r->pool, "%s/raw/%s/",
- baseURI, m->msgID));
+ apr_psprintf(r->pool, "%s/raw/%s/",
+ baseURI, m->msgID));
ap_rputs("</ul>\n</td>\n</tr>\n", r);
ap_rprintf(r, " <tr class=\"raw\">\n"
- " <td class=\"left\"></td>\n"
- " <td class=\"right\"><a href=\"%s/raw/%s\" rel=\"nofollow\">View raw message</a></td>\n"
- " </tr>\n", baseURI, URI_ESCAPE_OR_BLANK(r->pool, m->msgID));
+ " <td class=\"left\"></td>\n"
+ " <td class=\"right\"><a href=\"%s/raw/%s\" rel=\"nofollow\">View raw message</a></td>\n"
+ " </tr>\n", baseURI, URI_ESCAPE_OR_BLANK(r->pool, m->msgID));
ap_rputs(" </tbody>\n", r);
ap_rputs(" </table>\n", r);
@@ -1231,8 +1231,8 @@
/* Parse multipart information */
m->mime_msg = mbox_mime_decode_multipart(r->pool, m->raw_body,
- m->content_type,
- m->cte, m->boundary);
+ m->content_type,
+ m->cte, m->boundary);
ap_rputs("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", r);
@@ -1243,14 +1243,14 @@
}
ap_rprintf(r, "<mail id=\"%s\">\n"
- " <from><![CDATA[%s]]></from>\n"
- " <subject><![CDATA[%s]]></subject>\n"
- " <date><![CDATA[%s]]></date>\n"
- " <contents><![CDATA[",
- URI_ESCAPE_OR_BLANK(r->pool, m->msgID),
- from,
- ESCAPE_OR_BLANK(r->pool, m->subject),
- ESCAPE_OR_BLANK(r->pool, m->rfc822_date));
+ " <from><![CDATA[%s]]></from>\n"
+ " <subject><![CDATA[%s]]></subject>\n"
+ " <date><![CDATA[%s]]></date>\n"
+ " <contents><![CDATA[",
+ URI_ESCAPE_OR_BLANK(r->pool, m->msgID),
+ from,
+ ESCAPE_OR_BLANK(r->pool, m->subject),
+ ESCAPE_OR_BLANK(r->pool, m->rfc822_date));
ap_rprintf(r, "%s", mbox_wrap_text(mbox_mime_get_body(r->pool, m->mime_msg)));
ap_rputs("]]></contents>\n", r);
Modified: httpd/mod_mbox/branches/surgery/src/module/mod_mbox_search.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/surgery/src/module/mod_mbox_search.c?rev=367680&r1=367679&r2=367680&view=diff
==============================================================================
--- httpd/mod_mbox/branches/surgery/src/module/mod_mbox_search.c (original)
+++ httpd/mod_mbox/branches/surgery/src/module/mod_mbox_search.c Tue Jan 10 08:38:53 2006
@@ -1,18 +1,18 @@
/* Copyright 2001-2005 The Apache Software Foundation or its licensors, as
-* applicable.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
#include "mod_mbox.h"
@@ -71,7 +71,7 @@
r->allowed |= (AP_METHOD_BIT << M_GET);
if (r->method_number != M_GET) {
return HTTP_METHOD_NOT_ALLOWED;
- }
+ }
conf = ap_get_module_config(r->per_dir_config, &mbox_module);
@@ -82,4 +82,3 @@
return generate_search_page(r, conf->search_path);
}
-