*
* This function used to have an argument called 'wanthost' which would
* control whether or not it would canonicalize hostnames in email
- * addresses. This functionalit was removed for nmh 1.5, and eventually
+ * addresses. This functionality was removed for nmh 1.5, and eventually
* all of the code that used this argument was garbage collected.
*/
struct mailname *getm(char *str, char *dfhost, int dftype, char *eresult,
};
/*
- * incore version of /etc/passwd
+ * in-core version of /etc/passwd
*/
struct home {
char *h_name; /* user name */
/* codes returned by alias() */
-#define AK_OK 0 /* file parsed ok */
+#define AK_OK 0 /* file parsed OK */
#define AK_NOFILE 1 /* couldn't read file */
#define AK_ERROR 2 /* error parsing file */
#define AK_LIMIT 3 /* memory limit exceeded */
#define FT_COMPF 2 /* comp text, filled */
#define FT_LIT 3 /* literal text */
#define FT_LITF 4 /* literal text, filled */
-#define FT_CHAR 5 /* a single ascii character */
+#define FT_CHAR 5 /* a single ASCII character */
#define FT_NUM 6 /* "value" as decimal number */
#define FT_NUMF 7 /* "value" as filled dec number */
#define FT_STR 8 /* "str" as text */
/* Date Coercion */
#define FT_LOCALDATE 68 /* Coerce date to local timezone */
-#define FT_GMTDATE 69 /* Coerce date to gmt */
+#define FT_GMTDATE 69 /* Coerce date to GMT */
/* pre-format processing */
#define FT_PARSEDATE 70 /* parse comp into a date (tws) struct */
#define FT_SAVESTR 77 /* save current str reg */
#define FT_DONE 78 /* stop formatting */
#define FT_PAUSE 79 /* pause */
-#define FT_NOP 80 /* nop */
+#define FT_NOP 80 /* no-op */
#define FT_GOTO 81 /* (relative) goto */
#define FT_IF_S_NULL 82 /* test if "str" null */
#define FT_IF_S 83 /* test if "str" non-null */
* format instructions. Is always terminated with a
* newline (\n).
* width - Maximum number of displayed characters. Does not include
- * characters marked as nonprinting or (depending on the
+ * characters marked as non-printing or (depending on the
* encoding) bytes in a multibyte encoding that exceed the
* character's column width.
* dat - An integer array that contains data used by certain format
*/
#define NOTOK (-1) /* syscall()s return this on error */
#define OK 0 /* ditto on success */
-#define DONE 1 /* trinary logic */
+#define DONE 1 /* ternary logic */
#define ALL ""
#define MAXARGS 1000 /* max arguments to exec */
SizeCEFunc c_cesizefnx; /* size of decoded contents */
int c_umask; /* associated umask */
- int c_rfc934; /* rfc934 compatibility flag */
+ int c_rfc934; /* RFC 934 compatibility flag */
char *c_showproc; /* default, if not in profile */
char *c_termproc; /* for charset madness... */
int dispo);
/*
- * Display content-appropriate information on MIME parts, decending recursively
+ * Display content-appropriate information on MIME parts, descending recursively
* into multipart content if appropriate. Uses list_content() for displaying
* generic information.
*
* 1. User runs mhlogin which prints a URL the user must visit, and prompts for
* a code retrieved from that page.
*
- * 2. User vists this URL in browser, signs in with some Google account, and
+ * 2. User visits this URL in browser, signs in with some Google account, and
* copies and pastes the resulting code back to mhlogin.
*
* 3. mhlogin does HTTP POST to Google to exchange the user-provided code for a
* arg1..argN - Arguments 1-N.
*
* Returns a tparm and tputs-processed string, or NULL if there was a problem
- * initializating the terminal or retrieving the capability.
+ * initialising the terminal or retrieving the capability.
*/
char *get_term_stringparm(char *capability, long arg1, long arg2);
*
* creds - Structure from previous nmh_get_credentials() call
*
- * Returns NULL on error, otherwise a NUL-termined string containing
+ * Returns NULL on error, otherwise a NUL-terminated string containing
* the username. Points to allocated memory in the credentials structure
* that is free()d by nmh_free_credentials().
*/
be treated specially if it's in a zone that observes Daylight Saving Time.
For instance, during DST, a Date: like "Mon, 24 Jul 2000 12:31:44 -0700" will
be printed as "Mon, 24 Jul 2000 12:31:44 PDT". Without the code activated by
- the following #define, that'd be incorrectly printed as "...MST". */
+ the following #define, that would be incorrectly printed as "...MST". */
struct tws {
int tw_sec; /* seconds after the minute - [0, 61] */
int tw_hour; /* hour since midnight - [0, 23] */
int tw_mday; /* day of the month - [1, 31] */
int tw_mon; /* months since January - [0, 11] */
- int tw_year; /* 4 digit year (ie, 1997) */
+ int tw_year; /* 4 digit year (e.g. 1997) */
int tw_wday; /* days since Sunday - [0, 6] */
int tw_yday; /* days since January 1 - [0, 365] */
int tw_zone;
/*
- * SPECIFIC FALURE VALUES
+ * SPECIFIC FAILURE VALUES
*/
/*
REALLYDUMB are now the default in the code.
If #ifdef DUMB is in effect, a full 822-style parser is called
- for syntax recongition. This breaks each address into its components.
+ for syntax recognition. This breaks each address into its components.
Note however that no semantics are assumed about the parts or their
totality. This means that implicit hostnames aren't made explicit,
- and explicit hostnames aren't expanded to their "official" represenations.
+ and explicit hostnames aren't expanded to their "official" representations.
If DUMB is not in effect, then this module does some
high-level thinking about what the addresses are.
int failed_to_lock = 0;
/*
- * If this routine _is_ called again (despite the wanings in the
+ * If this routine _is_ called again (despite the warnings in the
* comments above), return immediately.
*/
if ( m_defs != 0 )
/* context is NULL if context_foil() was called to disable use of context
* We also support users setting explicitly setting MHCONTEXT to /dev/null.
- * (if this wasn't specialcased then the locking would be liable to fail)
+ * (if this wasn't special-cased then the locking would be liable to fail)
*/
if (!cp || (strcmp(cp,"/dev/null") == 0)) {
ctxpath = NULL;
/* Find the corresponding tzdesc. */
for (tz = timezones; dt_timezone && tz; tz = tz->next) {
- /* Property parameter values are case insenstive (RFC 5545
+ /* Property parameter values are case insensitive (RFC 5545
Sec. 2) and time zone identifiers are property parameters
(RFC 5545 Sec. 3.8.2.4), though it would seem odd to use
different case in the same file for identifiers that are
* Mon, 16 Jun 1992 15:30:48 -700 (or)
* Mon, 16 Jun 1992 15:30:48 EDT
*
- * for the current time, as specified by rfc822.
- * The first form is required by rfc1123.
+ * for the current time, as specified by RFC 822.
+ * The first form is required by RFC 1123.
*/
char *
* Mon, 16 Jun 1992 15:30:48 -700 (or)
* Mon, 16 Jun 1992 15:30:48 EDT
*
- * as specified by rfc822. The first form is required
- * by rfc1123 for outgoing messages.
+ * as specified by RFC 822. The first form is required
+ * by RFC 1123 for outgoing messages.
*/
char *
*
* Mon, 16 Jun 1992 15:30:48 -0700
*
- * as specified by rfc822 and rfc1123.
+ * as specified by RFC 822 and RFC 1123.
*/
char *
*/
#define YY_DECL struct tws *dparsetime(char *lexstr)
- /* yyerminate() is called after the input string is matched to
+ /* yyterminate() is called after the input string is matched to
* completion (actually, when the lexer reaches an EOF). The only
* thing that really needs to be in this macro function is the
* return call, which must be substituted inline into dparsetime.
if (strpbrk(name, chars_to_escape)) {
char *destp, *srcp;
/* Maximum space requirement would be if each character had
- to be escaped, plus enclosing double quotes, plus null termintor.
+ to be escaped, plus enclosing double quotes, plus NUL terminator.
E.g., 2 characters, "", would require 7, "\"\""0, where that 0
is '\0'. */
char *tmp = mh_xmalloc (2*strlen(name) + 3);
*
* Okay, got some more information on this from John L. Romine! From an
* email he sent to the nmh-workers mailing list on December 2, 2010, he
- * explains it thusly:
+ * explains it so:
*
* In this case (scan, formatsbr) it has to do with an extension to
* the mh-format syntax to allow for looping.
s = *gstate;
/*
- * Figure out what the message delimitter string is for this
+ * Figure out what the message delimiter string is for this
* maildrop. (This used to be part of m_Eom but I didn't like
* the idea of an "if" statement that could only succeed on the
* first call to m_Eom getting executed on each call, i.e., at
strncmp (text, (char *)s->edelim, s->edelimlen)) {
if (i == 0 && s->msg_style == MS_MBOX)
/* the final newline in the (brain damaged) unix-format
- * maildrop is part of the delimitter - delete it.
+ * maildrop is part of the delimiter - delete it.
*/
return 1;
/*
* According to the RFC, mechanisms can only be uppercase letter, numbers,
- * and a hypen or underscore. So make sure we uppercase any letters
+ * and a hyphen or underscore. So make sure we uppercase any letters
* in case the user passed in lowercase.
*/
}
/* Check to see if the user is running a different (or older, if
- specified) version of nmh than they had run bfore, and notify them
+ specified) version of nmh than they had run before, and notify them
if so. But only if read_context was set to a value to enable. */
if (allow_version_check && isatty (fileno (stdin)) &&
isatty (fileno (stdout)) && isatty (fileno (stderr))) {
/*
* Produce a listing of all header fields (annotations) whose field name matches
- * comp. Number the listing if number is set. Treate the field bodies as path
+ * comp. Number the listing if number is set. Treat the field bodies as path
* names and just output the last component unless text is non-NULL. We don't
* care what text is set to.
*/
done(1);
seq_setprev(mp); /* set the Previous-Sequence */
- context_replace(pfolder, folder); /* update curren folder */
+ context_replace(pfolder, folder); /* update current folder */
seq_save(mp); /* synchronize message sequences */
context_save(); /* save the context file */
}
/*
- * Initialize everyting else
+ * Initialize everything else
*/
if (dat[0] == -1)
}
/*
- * Set the current message and sychronize sequences
+ * Set the current message and synchronize sequences
*/
static int
continue;
case BITSTUFFSW:
- dashstuff = 1; /* trinary logic */
+ dashstuff = 1; /* ternary logic */
continue;
case NBITSTUFFSW:
- dashstuff = -1; /* trinary logic */
+ dashstuff = -1; /* ternary logic */
continue;
case FROMSW:
if (host && !*host)
host = NULL;
- /* guarantee dropping group priveleges; we might not have done so earlier */
+ /* guarantee dropping group privileges; we might not have done so earlier */
DROPGROUPPRIVS();
/*
/*
* Print debugging info about all the SELECTED
* messages and the sequences they are in.
- * Due limitattions of snprintb(), only a limited
+ * Due to limitations of snprintb(), only a limited
* number of sequences will be printed. See the
* comments in sbr/seq_bits.c.
*/
}
/*
- * We initally assume we will find multiple contents in the
+ * We initially assume we will find multiple contents in the
* draft. So create a multipart/mixed content to hold everything.
* We can remove this later, if it is not needed.
*/
/*
* Parse the Content-Type. get_ctinfo() parses MIME parameters, but
- * since we're just feeding it a MIME type we have to add those ourself.
+ * since we're just feeding it a MIME type we have to add those ourselves.
* Map that to a valid content-type label and call any initialization
* function.
*/
/*
* Set text content charset if it was unspecified. contains8bit
- * selctions:
+ * selections:
* 0: content does not contain 8-bit characters
* 1: content contains 8-bit characters
* -1: ignore content and use user's locale to determine charset
char *
remove_parameter (char *str, const char *name) {
/* It looks to me, based on the BNF in RFC 2045, than there can't
- be whitespace betwwen the parameter name and the "=", or
+ be whitespace between the parameter name and the "=", or
between the "=" and the parameter value. */
char *param_name = concat (name, "=", NULL);
char *cp;
* set, then addresses get split wrong (not at the spaces between commas).
* To fix this correctly, putstr() should know about "atomic" strings that
* must NOT be broken across lines. That's too difficult for right now
- * (it turns out that there are a number of degernate cases), so in
+ * (it turns out that there are a number of degenerate cases), so in
* oneline(), instead of
*
* (*onelp == '\n' && !onelp[1])
continue;
case BITSTUFFSW:
- dashstuff = 1; /* trinary logic */
+ dashstuff = 1; /* ternary logic */
continue;
case NBITSTUFFSW:
- dashstuff = -1; /* trinary logic */
+ dashstuff = -1; /* ternary logic */
continue;
case NBODYSW:
*/
struct k2v SubText[] = {
{ "plain", TEXT_PLAIN },
- { "richtext", TEXT_RICHTEXT }, /* defined in RFC-1341 */
- { "enriched", TEXT_ENRICHED }, /* defined in RFC-1896 */
+ { "richtext", TEXT_RICHTEXT }, /* defined in RFC 1341 */
+ { "enriched", TEXT_ENRICHED }, /* defined in RFC 1896 */
{ NULL, TEXT_UNKNOWN } /* this one must be last! */
};
/*
* The encoding for multipart messages must be either
- * 7bit, 8bit, or binary (per RFC2045).
+ * 7bit, 8bit, or binary (per RFC 2045).
*/
if (! skip_mp_cte_check && ct->c_encoding != CE_7BIT &&
ct->c_encoding != CE_8BIT && ct->c_encoding != CE_BINARY) {
* ease of choosing/displaying it later on. from a mail message on
* nmh-workers, from kenh:
* "Stock" MH 6.8.5 did not have a reverse_parts() function, but I
- * see code in mhn that did the same thing... Acccording to the RCS
+ * see code in mhn that did the same thing... According to the RCS
* logs, that code was around from the initial checkin of mhn.c by
* John Romine in 1992, which is as far back as we have."
*/
}
/*
- * At this point, we're either finishing a contined parameter, or
+ * At this point, we're either finishing a continued parameter, or
* we're working on a new one.
*/
break;
case 'p':
- /* insert part number withouth leading dot */
+ /* insert part number without leading dot */
if (ct->c_partno)
strncpy (bp, ct->c_partno, buflen);
break;
*
* We get a length back from netsec_readline, but the rest of the POP
* code doesn't handle it; the assumptions are that everything from
- * the network can be respresented as C strings. That should get fixed
+ * the network can be represented as C strings. That should get fixed
* someday.
*/
#define MVIS 0x0008 /* we've seen sighted addrs */
#define MINV 0x0010 /* we've seen blind addrs */
#define MSND 0x0020 /* we've seen a Sender: */
-#define MRSN 0x0040 /* We've seen a Resent-Sendr:*/
+#define MRSN 0x0040 /* We've seen a Resent-Sender: */
#define MEFM 0x0080 /* We've seen Envelope-From: */
#define MMIM 0x0100 /* We've seen Mime-Version: */
/*
- * Set the Previous-Sequence and then sychronize the
+ * Set the Previous-Sequence and then synchronize the
* sequence file, for each destination folder.
*/
/*
* child process -- send it
*
- * If fd is ok, then we are pushing and fd points to temp
+ * If fd is OK, then we are pushing and fd points to temp
* file, so capture anything on stdout and stderr there.
*/
if (fd != NOTOK) {
rename_chain (mp, mlist, j, i);
/*
- * Run the external hook to refile the temorary message number
+ * Run the external hook to refile the temporary message number
* to the real place.
*/