{
if ((i = tolower (*a) - tolower (*b)))
return i;
- /* test for NUL here rather that in the for loop in order to detect unqual
+ /* test for NUL here rather that in the for loop in order to detect unequal
* length strings (see http://dev.mutt.org/trac/ticket/3601)
*/
if (!*a)
/* Checks the specified maildir subdir (cur or new) for new mail or mail counts.
* check_new: if true, check for new mail.
- * check_stats: if true, count total, new, and flagged mesages.
+ * check_stats: if true, count total, new, and flagged messages.
* Returns 1 if the dir has new mail.
*/
static int buffy_maildir_check_dir (BUFFY* mailbox, const char *dir_name, int check_new,
}
/* Checks new mail for a maildir mailbox.
- * check_stats: if true, also count total, new, and flagged mesages.
+ * check_stats: if true, also count total, new, and flagged messages.
* Returns 1 if the mailbox has new mail.
*/
static int buffy_maildir_check (BUFFY* mailbox, int check_stats)
}
/* Checks new mail for an mbox mailbox
- * check_stats: if true, also count total, new, and flagged mesages.
+ * check_stats: if true, also count total, new, and flagged messages.
* Returns 1 if the mailbox has new mail.
*/
static int buffy_mbox_check (BUFFY* mailbox, struct stat *sb, int check_stats)
mutt_canonical_charset (fromcode1, sizeof (fromcode1), fromcode);
/* maybe apply charset-hooks and recanonicalise fromcode,
- * but only when caller asked us to sanitize a potentialy wrong
+ * but only when caller asked us to sanitize a potentially wrong
* charset name incoming from the wild exterior. */
if ((flags & MUTT_ICONV_HOOK_FROM) && (tmp = mutt_charset_hook (fromcode1)))
mutt_canonical_charset (fromcode1, sizeof (fromcode1), tmp);
}
}
-/* Return trute when key K is valid. */
+/* Return true when key K is valid. */
static int crypt_key_is_valid (crypt_key_t *k)
{
if (k->flags & KEYFLAG_CANTUSE)
return 1;
}
-/* Return true whe validity of KEY is sufficient. */
+/* Return true when validity of KEY is sufficient. */
static int crypt_id_is_strong (crypt_key_t *key)
{
unsigned int is_strong = 0;
operation. Return the algorithm name as a C string in buffer BUF
which must have been allocated by the caller with size BUFLEN.
Returns 0 on success or -1 in case of an error. The return string
- is truncted to BUFLEN - 1. */
+ is truncated to BUFLEN - 1. */
static int get_micalg (gpgme_ctx_t ctx, int use_smime, char *buf, size_t buflen)
{
gpgme_sign_result_t result = NULL;
if ((app & APPLICATION_PGP))
{
- /* Its all a mess. That old GPGME expects different things
- depending on the protocol. For gpg we don' t need percent
+ /* It's all a mess. That old GPGME expects different things
+ depending on the protocol. For gpg we don't need percent
escaped pappert but simple strings passed in an array to the
keylist_ext_start function. */
LIST *l;
}
/* Display a menu to select a key from the array KEYS. FORCED_VALID
- will be set to true on return if the user did override the the
+ will be set to true on return if the user did override the
key's validity. */
static crypt_key_t *crypt_select_key (crypt_key_t *keys,
ADDRESS * p, const char *s,
#include "crypt-mod.h"
-/* A type an a variable to keep track of registered crypto modules. */
+/* A type of a variable to keep track of registered crypto modules. */
typedef struct crypt_module *crypt_module_t;
struct crypt_module
typedef void (*crypt_func_set_sender_t) (const char *sender);
/*
- A structure to keep all crypto module fucntions together.
+ A structure to keep all crypto module functions together.
*/
typedef struct crypt_module_functions
{
/* free tmp_body if messages was signed AND encrypted ... */
if (tmp_smime_pbody != msg->content && tmp_smime_pbody != tmp_pbody)
{
- /* detatch and don't delete msg->content,
+ /* detach and don't delete msg->content,
which tmp_smime_pbody->parts after signing. */
tmp_smime_pbody->parts = tmp_smime_pbody->parts->next;
msg->content->next = NULL;
addch (' ');
}
-/* See how many bytes to copy from string so its at most maxlen bytes
+/* See how many bytes to copy from string so it's at most maxlen bytes
* long and maxwid columns wide */
size_t mutt_wstr_trunc (const char *src, size_t maxlen, size_t maxwid, size_t *width)
{
*
* Return values:
*
- * 0 - Evereything's fine. The program's new current
+ * 0 - Everything's fine. The program's new current
* directory is the contains the file to be locked.
* The string pointed to by bn contains the name of
* the file to be locked.
if (!(is_uid || is_fpr || (*is_subkey && option (OPTPGPIGNORESUB))))
k = safe_malloc (sizeof (*k));
memcpy (k, &tmp, sizeof (*k));
- /* fixup parentship of uids after mering the temp key into
+ /* fixup parentship of uids after merging the temp key into
* the real key */
if (tmp.address)
{
/**
* mutt_hcache_per_folder - Generate the hcache pathname
* @param path Base directory, from $header_cache
- * @paran folder Mailbox name (including protocol)
+ * @param folder Mailbox name (including protocol)
* @param namer Callback to generate database filename
*
* @return Full pathname to the database (to be generated)
mutt_extract_token (tmp, s, 0);
if (parse_regex(idx, tmp, err))
- /* $reply_regexp and $alterantes require special treatment */
+ /* $reply_regexp and $alternates require special treatment */
if (Context && Context->msgcount &&
mutt_strcmp (MuttVars[idx].option, "reply_regexp") == 0)
{
if (Completed[0] == 0 && User_typed[0])
return 0;
- /* Num_matched will _always_ be atleast 1 since the initial
+ /* Num_matched will _always_ be at least 1 since the initial
* user-typed string is always stored */
if (numtabs == 1 && Num_matched == 2)
snprintf(Completed, sizeof(Completed),"%s", Matches[0]);
if (Completed[0] == 0 && User_typed[0])
return 0;
- /* Num_matched will _always_ be atleast 1 since the initial
+ /* Num_matched will _always_ be at least 1 since the initial
* user-typed string is always stored */
if (numtabs == 1 && Num_matched == 2)
snprintf(Completed, sizeof(Completed),"%s", Matches[0]);
AliasFile = safe_strdup (Muttrc->data);
}
- /* Process the global rc file if it exists and the user hasn't explicity
+ /* Process the global rc file if it exists and the user hasn't explicitly
requested not to via "-n". */
if (!skip_sys_rc)
{
Matches[Num_matched++] = User_typed;
/* All matches are stored. Longest non-ambiguous string is ""
- * i.e. dont change 'buffer'. Fake successful return this time */
+ * i.e. don't change 'buffer'. Fake successful return this time */
if (User_typed[0] == 0)
return 1;
}
if (Completed[0] == 0 && User_typed[0])
return 0;
- /* Num_matched will _always_ be atleast 1 since the initial
+ /* Num_matched will _always_ be at least 1 since the initial
* user-typed string is always stored */
if (numtabs == 1 && Num_matched == 2)
snprintf(Completed, sizeof(Completed), "%s", Matches[0]);
}
/*
- * Write the concatened pathname (dir + "/" + fname) into dst.
+ * Write the concatenated pathname (dir + "/" + fname) into dst.
* The slash is omitted when dir or fname is of 0 length.
* Returns NULL on error or a pointer to dst otherwise.
*/
* Create a directory, creating the parents if necessary. (like mkdir -p)
*
* Note: The permissions are only set on the final directory.
- * The permissions of any parent directoies are determined by the umask.
+ * The permissions of any parent directories are determined by the umask.
* (This is how "mkdir -p" behaves)
*/
int mutt_mkdir(const char *path, mode_t mode)
/*
* Returns 1 if the .mh_sequences last modification time is more recent than the last visit to this mailbox
- * Returns 0 if the modifcation time is older
+ * Returns 0 if the modification time is older
* Returns -1 on error
*/
static int mh_sequences_changed(BUFFY *b)
}
/* Checks new mail for a mh mailbox.
- * check_stats: if true, also count total, new, and flagged mesages.
+ * check_stats: if true, also count total, new, and flagged messages.
* Returns 1 if the mailbox has new mail.
*/
int mh_buffy (BUFFY *mailbox, int check_stats)
return maildir_merge_lists (left, right, cmp);
}
-/* Sorts mailbox into it's natural order.
+/* Sorts mailbox into its natural order.
* Currently only defined for MH where files are numbered.
*/
static void mh_sort_natural (CONTEXT *ctx, struct maildir **md)
/*
* The maildir specification requires that all files in the cur
- * subdirectory have the :unique string appeneded, regardless of whether
+ * subdirectory have the :unique string appended, regardless of whether
* or not there are any flags. If .old is set, we know that this message
* will end up in the cur directory, so we include it in the following
* test even though there is no associated flag.
/* Strategy here is to look for any file not beginning with a period */
do {
- /* we do "cur" on the first iteration since its more likely that we'll
+ /* we do "cur" on the first iteration since it's more likely that we'll
* find old messages without having to scan both subdirs
*/
snprintf (realpath, sizeof (realpath), "%s/%s", path,
return safe_calloc (1, sizeof (PARAMETER));
}
-/* Information that helps in determing the Content-* of an attachment */
+/* Information that helps in determining the Content-* of an attachment */
typedef struct content
{
long hibin; /* 8-bit characters */
unsigned int encoding : 3; /* content-transfer-encoding */
unsigned int disposition : 2; /* content-disposition */
unsigned int use_disp : 1; /* Content-Disposition uses filename= ? */
- unsigned int unlink : 1; /* flag to indicate the the file named by
+ unsigned int unlink : 1; /* flag to indicate the file named by
* "filename" should be unlink()ed before
* free()ing this structure
*/
/* Check that we have a usable passphrase, ask if not. */
int crypt_valid_passphrase (int);
-/* Write the message body/part A described by state S to a the given
+/* Write the message body/part A described by state S to the given
TEMPFILE. */
int crypt_write_signed(BODY *a, STATE *s, const char *tempf);
unsigned int noprogress : 1; /**< Don't show the progress bar */
unsigned int longrun : 1; /**< A long-lived action is in progress */
- unsigned int trans : 1; /**< Atomic transacion in progress */
+ unsigned int trans : 1; /**< Atomic transaction in progress */
unsigned int progress_ready : 1; /**< A progress bar has been initialised */
};
#else
/* This array needs to be large enough to hold all the possible values support
* by Mutt. The initialized values are just placeholders--the array gets
- * overwrriten in tls_negotiate() depending on the $ssl_use_* options.
+ * overwritten in tls_negotiate() depending on the $ssl_use_* options.
*/
static int protocol_priority[] = {GNUTLS_TLS1_2, GNUTLS_TLS1_1, GNUTLS_TLS1, GNUTLS_SSL3, 0};
return 0;
}
- /* terminate SASL sessoin */
+ /* terminate SASL session */
sasl_dispose (&saslconn);
if (conn->fd < 0)
break;
}
}
- /* not chached yet, store header */
+ /* not cached yet, store header */
else
{
mutt_debug (2, "parse_overview_line: mutt_hcache_store %s\n", buf);
resolve_color (struct line_t *lineInfo, int n, int cnt, int flags, int special,
ansi_attr *a)
{
- int def_color; /* color without syntax hilight */
+ int def_color; /* color without syntax highlight */
int color; /* final color */
static int last_color; /* last color set */
int search = 0, i, m;
}
}
- /* only do color hiliting if we are viewing a message */
+ /* only do color highlighting if we are viewing a message */
if (flags & (MUTT_SHOWCOLOR | MUTT_TYPES))
{
if ((*lineInfo)[n].type == -1)
NORMAL_COLOR;
index->pagelen = index_window->rows;;
- /* some fudge to work out where abouts the indicator should go */
+ /* some fudge to work out whereabouts the indicator should go */
if (index->current - indicator < 0)
index->top = 0;
else if (index->max - index->current < index->pagelen - indicator)
char *mime_inline;
if (msg->security & INLINE)
{
- /* L10N: These next string MUST have the same highlighed letter
+ /* L10N: These next string MUST have the same highlighted letter
One of them will appear in each of the three strings marked "(inline"), below. */
mime_inline = _("PGP/M(i)ME");
}
else
{
- /* L10N: These previous string MUST have the same highlighed letter
+ /* L10N: These previous string MUST have the same highlighted letter
One of them will appear in each of the three strings marked "(inline"), below. */
mime_inline = _("(i)nline");
}
return 0;
}
-/* reconnect and verify idnexes if connection was lost */
+/* reconnect and verify indexes if connection was lost */
int pop_reconnect (CONTEXT *ctx)
{
int ret;
{
if (ctx)
{
- /* if a mailbox is currently open, look to see if the orignal message
+ /* if a mailbox is currently open, look to see if the original message
the user attempted to reply to is in this mailbox */
p = skip_email_wsp(tmp->data + 18);
if (!ctx->id_hash)
}
/* If rfc1524_expand_command() is used on a recv'd message, then
- * the filename doesn't exist yet, but if its used while sending a message,
+ * the filename doesn't exist yet, but if it's used while sending a message,
* then we need to rename the existing file.
*
* This function returns 0 on successful move, 1 on old file doesn't exist,
pbuf += len;
buflen -= len;
- /* if there is another address, and its not a group mailbox name or
+ /* if there is another address, and it's not a group mailbox name or
group terminator, add a comma to separate the addresses */
if (addr->next && addr->next->mailbox && !addr->group)
{
* */
mutt_write_rfc822_header (msg->fp, hdr->env, hdr->content, post ? -post : 0, 0);
- /* (postponment) if this was a reply of some sort, <msgid> contains the
+ /* (postponement) if this was a reply of some sort, <msgid> contains the
* Message-ID: of message replied to. Save it using a special X-Mutt-
* header so it can be picked up if the message is recalled at a later
* point in time. This will allow the message to be marked as replied if
if (post && msgid)
fprintf (msg->fp, "X-Mutt-References: %s\n", msgid);
- /* (postponment) save the Fcc: using a special X-Mutt- header so that
+ /* (postponement) save the Fcc: using a special X-Mutt- header so that
* it can be picked up when the message is recalled
*/
if (post && fcc)
fprintf (msg->fp, "Status: RO\n");
/* mutt_write_rfc822_header() only writes out a Date: header with
- * mode == 0, i.e. _not_ postponment; so write out one ourself */
+ * mode == 0, i.e. _not_ postponement; so write out one ourself */
if (post)
fprintf (msg->fp, "%s", mutt_make_date (buf, sizeof (buf)));
- /* (postponment) if the mail is to be signed or encrypted, save this info */
+ /* (postponement) if the mail is to be signed or encrypted, save this info */
if ((WithCrypto & APPLICATION_PGP)
&& post && (hdr->security & APPLICATION_PGP))
{
fputc ('\n', msg->fp);
}
- /* (postponment) if the mail is to be signed or encrypted, save this info */
+ /* (postponement) if the mail is to be signed or encrypted, save this info */
if ((WithCrypto & APPLICATION_SMIME)
&& post && (hdr->security & APPLICATION_SMIME))
{
return (subjects);
}
-/* find the best possible match for a parent mesage based upon subject.
+/* find the best possible match for a parent message based upon subject.
* if there are multiple matches, the one which was sent the latest, but
* before the current message, is used.
*/