]> diplodocus.org Git - nmh/commitdiff
Fix spelling in C comments.
authorRalph Corderoy <ralph@inputplus.co.uk>
Fri, 28 Apr 2017 23:01:58 +0000 (00:01 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Fri, 28 Apr 2017 23:01:58 +0000 (00:01 +0100)
36 files changed:
h/addrsbr.h
h/aliasbr.h
h/fmt_compile.h
h/fmt_scan.h
h/mh.h
h/mhparse.h
h/oauth.h
h/prototypes.h
h/tws.h
mts/smtp/smtp.h
sbr/addrsbr.c
sbr/context_read.c
sbr/datetime.c
sbr/dtime.c
sbr/dtimep.l
sbr/escape_addresses.c
sbr/fmt_compile.c
sbr/m_getfld.c
sbr/netsec.c
sbr/utils.c
uip/annosbr.c
uip/fmttest.c
uip/folder.c
uip/forw.c
uip/inc.c
uip/mark.c
uip/mhbuildsbr.c
uip/mhfixmsg.c
uip/mhlsbr.c
uip/mhparse.c
uip/mhstoresbr.c
uip/popsbr.c
uip/post.c
uip/refile.c
uip/sendsbr.c
uip/sortm.c

index fac8318..3e6bffd 100644 (file)
@@ -102,7 +102,7 @@ char *auxformat(struct mailname *mp, int extras);
  *
  * 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,
index 1ac4faa..6554220 100644 (file)
@@ -18,7 +18,7 @@ struct adr {
 };
 
 /*
- * incore version of /etc/passwd
+ * in-core version of /etc/passwd
  */
 struct home {
     char *h_name;              /* user name                             */
@@ -42,7 +42,7 @@ char *akerror (int);
 
 /* 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 */
index a485882..532ccd1 100644 (file)
@@ -6,7 +6,7 @@
 #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                           */
@@ -76,7 +76,7 @@
 
 /* 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 */
@@ -91,7 +91,7 @@
 #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             */
index 8c1d3fe..faedecd 100644 (file)
@@ -148,7 +148,7 @@ int fmt_compile (char *fstring, struct format **fmt, int reset);
  *               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
diff --git a/h/mh.h b/h/mh.h
index 8829eb4..a72971d 100644 (file)
--- a/h/mh.h
+++ b/h/mh.h
@@ -8,7 +8,7 @@
  */
 #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                */
index 12137cb..00802d1 100644 (file)
@@ -159,7 +159,7 @@ struct Content {
     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...            */
@@ -415,7 +415,7 @@ int list_content(CT ct, int toplevel, int realsize, int verbose, int debug,
                 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.
  *
index 605008a..42c9ce7 100644 (file)
--- a/h/oauth.h
+++ b/h/oauth.h
@@ -19,7 +19,7 @@
  * 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
index f1d1d69..18b8758 100644 (file)
@@ -203,7 +203,7 @@ char *get_term_stringcap(char *capability);
  * 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);
 
@@ -534,7 +534,7 @@ nmh_creds_t nmh_get_credentials (const char *host, const char *user);
  *
  * 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().
  */
diff --git a/h/tws.h b/h/tws.h
index 9acda6a..17a01a2 100644 (file)
--- a/h/tws.h
+++ b/h/tws.h
@@ -5,7 +5,7 @@
    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] */
@@ -13,7 +13,7 @@ struct tws {
     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;
index f2d09d7..6de4e51 100644 (file)
@@ -135,7 +135,7 @@ char *rp_string (int);
 
 
 /*
- * SPECIFIC FALURE VALUES
+ * SPECIFIC FAILURE VALUES
  */
 
 /*
index 466d8cc..68bb6de 100644 (file)
    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.
index 778d4a3..668fdc3 100644 (file)
@@ -36,7 +36,7 @@ context_read (void)
     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 )
@@ -128,7 +128,7 @@ context_read (void)
 
     /* 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;
index 20b4be6..48f02d4 100644 (file)
@@ -369,7 +369,7 @@ format_datetime (tzdesc_t timezones, const contentline *node) {
 
     /* 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
index b4aaed8..5a61f9a 100644 (file)
@@ -198,8 +198,8 @@ dctime (struct tws *tw)
  *     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 *
@@ -219,8 +219,8 @@ dtimenow (int alpha_timezone)
  *     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 *
@@ -241,7 +241,7 @@ dtime (time_t *clock, int alpha_timezone)
  *
  *     Mon, 16 Jun 1992 15:30:48 -0700
  *
- * as specified by rfc822 and rfc1123.
+ * as specified by RFC 822 and RFC 1123.
  */
 
 char *
index 35c455d..2b6df17 100644 (file)
@@ -35,7 +35,7 @@
    */
 #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.
index 0d898db..a484a11 100644 (file)
@@ -42,7 +42,7 @@ escape_component (char *name, size_t namesize, char *chars_to_escape) {
     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);
index 27359d9..f4c8d5d 100644 (file)
@@ -797,7 +797,7 @@ do_expr (char *sp, int preprocess)
  *
  * 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.
index a7af3b1..fe8e927 100644 (file)
@@ -775,7 +775,7 @@ m_unknown(m_getfld_state_t *gstate, FILE *iob)
     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
@@ -885,7 +885,7 @@ m_Eom (m_getfld_state_t s)
         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;
 
index b85fa14..e0dd0c2 100644 (file)
@@ -1015,7 +1015,7 @@ netsec_set_sasl_params(netsec_context *nsc, const char *service,
 
     /*
      * 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.
      */
 
index 5784e4c..aa344b9 100644 (file)
@@ -469,7 +469,7 @@ nmh_init(const char *argv0, int read_context) {
         }
 
         /* 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))) {
index aaf3aad..c2aa865 100644 (file)
@@ -68,7 +68,7 @@ annotate (char *file, char *comp, char *text, int inplace, int datesw, int delet
 
 /*
  *  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.
  */
index d3d3649..5f52fdc 100644 (file)
@@ -510,7 +510,7 @@ process_messages(struct format *fmt, struct msgs_array *comps,
            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 */
 
@@ -602,7 +602,7 @@ process_single_file(FILE *in, struct msgs_array *comps, int *dat, int msgsize,
     }
 
     /*
-     * Initialize everyting else
+     * Initialize everything else
      */
 
     if (dat[0] == -1)
index a3cc4ec..bfeee8f 100644 (file)
@@ -599,7 +599,7 @@ print_folders (void)
 }
 
 /*
- * Set the current message and sychronize sequences
+ * Set the current message and synchronize sequences
  */
 
 static int
index 93ddf63..8746d45 100644 (file)
@@ -246,10 +246,10 @@ main (int argc, char **argv)
                    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:
index 8650b8b..790c5c5 100644 (file)
--- a/uip/inc.c
+++ b/uip/inc.c
@@ -402,7 +402,7 @@ main (int argc, char **argv)
     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();
 
     /*
index 3972508..7c137a1 100644 (file)
@@ -244,7 +244,7 @@ print_debug (struct msgs *mp)
 /*
  * 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.
  */
index 51185ee..f26c81b 100644 (file)
@@ -375,7 +375,7 @@ finish_field:
     }
 
     /*
-     * 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.
      */
@@ -1977,7 +1977,7 @@ setup_attach_content(CT ct, char *filename)
 
     /*
      * 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.
      */
@@ -2078,7 +2078,7 @@ set_disposition (CT ct) {
 
 /*
  * 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
index e105788..47ae44b 100644 (file)
@@ -1067,7 +1067,7 @@ replace_substring (char **str, const char *old, const char *new) {
 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;
index cd8da99..1cc472b 100644 (file)
@@ -20,7 +20,7 @@
  * 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])
@@ -459,10 +459,10 @@ mhl (int argc, char **argv)
                    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: 
index e10cd19..73296ca 100644 (file)
@@ -55,8 +55,8 @@ int npreferred;
  */
 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! */
 };
 
@@ -1089,7 +1089,7 @@ InitMultiPart (CT ct)
 
     /*
      * 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) {
@@ -1286,7 +1286,7 @@ last_part:
  * 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."
  */
@@ -3754,7 +3754,7 @@ output_params(size_t initialwidth, PM params, int *offsetout, int external)
        }
 
        /*
-        * 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.
         */
 
index 21ab2ef..d591721 100644 (file)
@@ -994,7 +994,7 @@ parse_format_string (CT ct, char *cp, char *buffer, int buflen, char *dir)
                    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;
index 591832d..a022957 100644 (file)
@@ -730,7 +730,7 @@ pop_getline (char *s, int n, netsec_context *ns)
      *
      * 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.
      */
 
index abd89b7..c0d10f6 100644 (file)
@@ -169,7 +169,7 @@ struct headers {
 #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:  */
 
index ec53901..05a533e 100644 (file)
@@ -310,7 +310,7 @@ opnfolds (struct msgs *src_folder, struct st_fold *folders, int nfolders)
 
 
 /*
- * Set the Previous-Sequence and then sychronize the
+ * Set the Previous-Sequence and then synchronize the
  * sequence file, for each destination folder.
  */
 
index a7c398a..792ac12 100644 (file)
@@ -452,7 +452,7 @@ sendaux (char **vec, int vecp, char *program, char *drft, struct stat *st)
        /*
         * 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) {
index 4f5602f..2a71119 100644 (file)
@@ -585,7 +585,7 @@ rename_msgs (struct msgs *mp, struct smsg **mlist)
        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.
         */