#include <stddef.h>
#include "lib/buffer.h"
#include "lib/memory.h"
-#include "envelope.h"
#include "lib/queue.h"
+#include "envelope.h"
#include "rfc822.h"
struct Envelope *mutt_new_envelope(void)
struct Envelope *e = Context->hdrs[i]->env;
if (e && e->subject)
{
- e->real_subj =
- (regexec(ReplyRegexp.regex, e->subject, 1, pmatch, 0)) ?
- e->subject :
- e->subject + pmatch[0].rm_eo;
+ e->real_subj = (regexec(ReplyRegexp.regex, e->subject, 1, pmatch, 0)) ?
+ e->subject :
+ e->subject + pmatch[0].rm_eo;
}
}
}
struct Envelope *e = Context->hdrs[i]->env;
if (e && e->subject)
{
- e->real_subj =
- (regexec(ReplyRegexp.regex, e->subject, 1, pmatch, 0)) ?
- e->subject :
- e->subject + pmatch[0].rm_eo;
+ e->real_subj = (regexec(ReplyRegexp.regex, e->subject, 1, pmatch, 0)) ?
+ e->subject :
+ e->subject + pmatch[0].rm_eo;
}
}
}
tz /= 60;
- return snprintf(buf, buflen, "%02d-%s-%d %02d:%02d:%02d %+03d%02d",
- tm->tm_mday, Months[tm->tm_mon], tm->tm_year + 1900, tm->tm_hour,
- tm->tm_min, tm->tm_sec, (int) tz / 60, (int) abs((int) tz) % 60);
+ return snprintf(buf, buflen, "%02d-%s-%d %02d:%02d:%02d %+03d%02d", tm->tm_mday,
+ Months[tm->tm_mon], tm->tm_year + 1900, tm->tm_hour, tm->tm_min,
+ tm->tm_sec, (int) tz / 60, (int) abs((int) tz) % 60);
}
/**
return (mutt_mktime(&t, 0) + tz);
}
-
struct stat sb, sb2;
char buf[2048];
-/* Defend against symlink attacks */
+ /* Defend against symlink attacks */
if ((lstat(s, &sb) == 0) && S_ISREG(sb.st_mode))
{
return mutt_strcasecmp(a, tmp);
}
-
#include "config.h"
#include "lib/hash.h"
+#include "lib/queue.h"
#include "lib/string2.h"
#include "globals.h"
#include "mutt_tags.h"
-#include "lib/queue.h"
/**
* driver_tags_free - Free tags from a header
#include "config.h"
#include "lib/lib.h"
-#include "crypt_mod.h"
#include "lib/queue.h"
+#include "crypt_mod.h"
/**
* struct CryptModule - A crypto plugin module
acct.type = MUTT_ACCT_TYPE_NNTP;
snprintf(file, sizeof(file), "%s%s", strstr(server, "://") ? "" : "news://", server);
if (url_parse(&url, file) < 0 || (url.path && *url.path) ||
- !(url.scheme == U_NNTP || url.scheme == U_NNTPS) ||
- !url.host ||
+ !(url.scheme == U_NNTP || url.scheme == U_NNTPS) || !url.host ||
mutt_account_fromurl(&acct, &url) < 0)
{
url_free(&url);
struct Url url;
strfcpy(buf, ctx->path, sizeof(buf));
- if (url_parse(&url, buf) < 0 || !url.host || !url.path || !(url.scheme == U_NNTP || url.scheme == U_NNTPS))
+ if (url_parse(&url, buf) < 0 || !url.host || !url.path ||
+ !(url.scheme == U_NNTP || url.scheme == U_NNTPS))
{
url_free(&url);
mutt_error(_("%s is an invalid newsgroup specification!"), ctx->path);
c = safe_strdup(path);
url_parse(&url, c);
- if ((url.scheme != U_POP && url.scheme != U_POPS) || !url.host || mutt_account_fromurl(acct, &url) < 0)
+ if ((url.scheme != U_POP && url.scheme != U_POPS) || !url.host ||
+ mutt_account_fromurl(acct, &url) < 0)
{
url_free(&url);
FREE(&c);
/* Add to output buffer. */
const char *line_break = "\n\t";
const int lb_len = 2; /* strlen(line_break) */
-
+
if ((bufpos + wlen + lb_len) > buflen)
{
buflen = bufpos + wlen + lb_len;
static bool write_as_text_part(struct Body *b)
{
- return (mutt_is_text_part(b) || ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp(b)));
+ return (mutt_is_text_part(b) ||
+ ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp(b)));
}
int mutt_write_mime_body(struct Body *a, FILE *f)
urlstr = safe_strdup(SmtpUrl);
url_parse(&url, urlstr);
- if ((url.scheme != U_SMTP && url.scheme != U_SMTPS) ||
- !url.host ||
+ if ((url.scheme != U_SMTP && url.scheme != U_SMTPS) || !url.host ||
mutt_account_fromurl(account, &url) < 0)
{
url_free(&url);
return (enum UrlScheme) i;
}
-
static int parse_query_string(struct Url *u, char *src)
{
struct UrlQueryString *qs = NULL;
return 0;
}
-
/**
* url_parse - Fill in Url
* @param u Url where the result is stored
else
u->port = 0;
-
if (mutt_strlen(src) != 0)
{
u->host = src;
struct UrlQueryString *np = STAILQ_FIRST(&u->query_strings), *next = NULL;
while (np)
{
- next = STAILQ_NEXT(np, entries);
- /* NOTE(sileht): We don't free members, they will be freed when
- * the src char* passed to url_parse() is freed */
- FREE(&np);
- np = next;
+ next = STAILQ_NEXT(np, entries);
+ /* NOTE(sileht): We don't free members, they will be freed when
+ * the src char* passed to url_parse() is freed */
+ FREE(&np);
+ np = next;
}
STAILQ_INIT(&u->query_strings);
}