]> diplodocus.org Git - nmh/commitdiff
Move the opening brace of a C function to its own line.
authorRalph Corderoy <ralph@inputplus.co.uk>
Thu, 2 Nov 2017 01:09:32 +0000 (01:09 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Thu, 2 Nov 2017 01:09:32 +0000 (01:09 +0000)
If the brace doesn't start a line of its own then vi(1)'s
function-related commands don't spot the function.

35 files changed:
sbr/addrsbr.c
sbr/base64.c
sbr/charstring.c
sbr/context_find.c
sbr/credentials.c
sbr/datetime.c
sbr/escape_addresses.c
sbr/fmt_new.c
sbr/fmt_scan.c
sbr/icalendar.l
sbr/icalparse.y
sbr/m_getfld.c
sbr/m_mktemp.c
sbr/m_rand.c
sbr/message_id.c
sbr/mime_type.c
sbr/mts.c
sbr/print_help.c
sbr/readconfig.c
sbr/signals.c
sbr/trimcpy.c
sbr/utils.c
sbr/vector.c
uip/folder.c
uip/mhbuildsbr.c
uip/mhfixmsg.c
uip/mhical.c
uip/mhparse.c
uip/mhshowsbr.c
uip/mhstoresbr.c
uip/mkstemp.c
uip/repl.c
uip/replsbr.c
uip/scansbr.c
uip/sendsbr.c

index e55c15aadd4d59e67426303d9d69a94fa26d3a4c..fe508ba90322e2d6443d42494fb0fda9cf6acca0 100644 (file)
@@ -77,7 +77,8 @@ static char adr[BUFSIZ];
 static int eai = 0;
 
 void
 static int eai = 0;
 
 void
-enable_eai(void) {
+enable_eai(void)
+{
     eai = 1;
 }
 
     eai = 1;
 }
 
index 2afad491afbfccb41d404d109adc777feff09b96..75e823014d0d58f0ce33238f5fbaf820c2508eb3 100644 (file)
@@ -248,7 +248,8 @@ static const unsigned char b642nib[0x80] = {
  */
 int
 decodeBase64 (const char *encoded, unsigned char **decoded, size_t *len,
  */
 int
 decodeBase64 (const char *encoded, unsigned char **decoded, size_t *len,
-             int skip_crs, unsigned char *digest) {
+             int skip_crs, unsigned char *digest)
+{
     const char *cp = encoded;
     int bitno, skip;
     uint32_t bits;
     const char *cp = encoded;
     int bitno, skip;
     uint32_t bits;
@@ -351,7 +352,8 @@ test_end:
  * is allocated by the function and must be freed by the caller.
  */
 void
  * is allocated by the function and must be freed by the caller.
  */
 void
-hexify (const unsigned char *input, size_t len, char **output) {
+hexify (const unsigned char *input, size_t len, char **output)
+{
     /* Start with a charstring capacity that's arbitrarily larger than len. */
     const charstring_t tmp = charstring_create (2 * len);
     const unsigned char *cp = input;
     /* Start with a charstring capacity that's arbitrarily larger than len. */
     const charstring_t tmp = charstring_create (2 * len);
     const unsigned char *cp = input;
index 589b000ec2e5b6df7617985e6afef35c52768f1f..d6243717cdf344b92517fc40b554c674fb7b7f74 100644 (file)
@@ -26,7 +26,8 @@ struct charstring {
 
 
 static void
 
 
 static void
-charstring_reserve (charstring_t s, size_t need) {
+charstring_reserve (charstring_t s, size_t need)
+{
     const size_t cur = s->cur - s->buffer;
 
     while (need >= s->max - cur) {
     const size_t cur = s->cur - s->buffer;
 
     while (need >= s->max - cur) {
@@ -40,7 +41,8 @@ charstring_reserve (charstring_t s, size_t need) {
  * max is in characters
  */
 charstring_t
  * max is in characters
  */
 charstring_t
-charstring_create (size_t max) {
+charstring_create (size_t max)
+{
     charstring_t s;
 
     NEW(s);
     charstring_t s;
 
     NEW(s);
@@ -52,7 +54,8 @@ charstring_create (size_t max) {
 }
 
 charstring_t
 }
 
 charstring_t
-charstring_copy (const charstring_t src) {
+charstring_copy (const charstring_t src)
+{
     const size_t num = src->cur - src->buffer;
     charstring_t s;
 
     const size_t num = src->cur - src->buffer;
     charstring_t s;
 
@@ -70,7 +73,8 @@ charstring_copy (const charstring_t src) {
  * OK to call charstring_free with a NULL argument.
  */
 void
  * OK to call charstring_free with a NULL argument.
  */
 void
-charstring_free (charstring_t s) {
+charstring_free (charstring_t s)
+{
     if (s) {
         free (s->buffer);
         free (s);
     if (s) {
         free (s->buffer);
         free (s);
@@ -78,7 +82,8 @@ charstring_free (charstring_t s) {
 }
 
 void
 }
 
 void
-charstring_push_back (charstring_t s, const char c) {
+charstring_push_back (charstring_t s, const char c)
+{
     charstring_reserve (s, s->cur - s->buffer + 1);
     *s->cur++ = c;
     ++s->chars;
     charstring_reserve (s, s->cur - s->buffer + 1);
     *s->cur++ = c;
     ++s->chars;
@@ -90,7 +95,8 @@ charstring_push_back (charstring_t s, const char c) {
  */
 void
 charstring_push_back_chars (charstring_t s, const char c[], size_t num,
  */
 void
 charstring_push_back_chars (charstring_t s, const char c[], size_t num,
-                            size_t width) {
+                            size_t width)
+{
     size_t i;
 
     charstring_reserve (s, s->cur - s->buffer + num);
     size_t i;
 
     charstring_reserve (s, s->cur - s->buffer + num);
@@ -99,7 +105,8 @@ charstring_push_back_chars (charstring_t s, const char c[], size_t num,
 }
 
 void
 }
 
 void
-charstring_append (charstring_t dest, const charstring_t src) {
+charstring_append (charstring_t dest, const charstring_t src)
+{
     const size_t num = src->cur - src->buffer;
 
     if (num > 0) {
     const size_t num = src->cur - src->buffer;
 
     if (num > 0) {
@@ -111,7 +118,8 @@ charstring_append (charstring_t dest, const charstring_t src) {
 }
 
 void
 }
 
 void
-charstring_append_cstring (charstring_t dest, const char src[]) {
+charstring_append_cstring (charstring_t dest, const char src[])
+{
     const size_t num = strlen (src);
 
     if (num > 0) {
     const size_t num = strlen (src);
 
     if (num > 0) {
@@ -123,7 +131,8 @@ charstring_append_cstring (charstring_t dest, const char src[]) {
 }
 
 void
 }
 
 void
-charstring_clear (charstring_t s) {
+charstring_clear (charstring_t s)
+{
     s->cur = s->buffer;
     s->chars = 0;
 }
     s->cur = s->buffer;
     s->chars = 0;
 }
@@ -133,7 +142,8 @@ charstring_clear (charstring_t s) {
  * intervening push_back's; use charstring_buffer_copy() instead.
  */
 const char *
  * intervening push_back's; use charstring_buffer_copy() instead.
  */
 const char *
-charstring_buffer (const charstring_t s) {
+charstring_buffer (const charstring_t s)
+{
     charstring_reserve (s, s->cur - s->buffer + 1);
 
     /* This is the only place that we null-terminate the buffer. */
     charstring_reserve (s, s->cur - s->buffer + 1);
 
     /* This is the only place that we null-terminate the buffer. */
@@ -146,7 +156,8 @@ charstring_buffer (const charstring_t s) {
 }
 
 char *
 }
 
 char *
-charstring_buffer_copy (const charstring_t s) {
+charstring_buffer_copy (const charstring_t s)
+{
     char *copy = mh_xmalloc (s->cur - s->buffer + 1);
 
     /* Use charstring_buffer() to null terminate the buffer. */
     char *copy = mh_xmalloc (s->cur - s->buffer + 1);
 
     /* Use charstring_buffer() to null terminate the buffer. */
@@ -156,17 +167,20 @@ charstring_buffer_copy (const charstring_t s) {
 }
 
 size_t
 }
 
 size_t
-charstring_bytes (const charstring_t s) {
+charstring_bytes (const charstring_t s)
+{
     return s->cur - s->buffer;
 }
 
 size_t
     return s->cur - s->buffer;
 }
 
 size_t
-charstring_chars (const charstring_t s) {
+charstring_chars (const charstring_t s)
+{
     return s->chars;
 }
 
 int
     return s->chars;
 }
 
 int
-charstring_last_char_len (const charstring_t s) {
+charstring_last_char_len (const charstring_t s)
+{
     int len = 0;
 #ifdef MULTIBYTE_SUPPORT
     const char *sp = charstring_buffer (s);
     int len = 0;
 #ifdef MULTIBYTE_SUPPORT
     const char *sp = charstring_buffer (s);
index f4fe7ed1303035120e68ff9b3d7d8032e2b81edf..e312bceb4776f8d342ad181fd2c1397ee6dd3084 100644 (file)
@@ -30,7 +30,8 @@ context_find (const char *str)
  */
 char *
 context_find_by_type (const char *string, const char *type,
  */
 char *
 context_find_by_type (const char *string, const char *type,
-                      const char *subtype) {
+                      const char *subtype)
+{
     char *value = NULL;
 
     if (subtype) {
     char *value = NULL;
 
     if (subtype) {
@@ -58,7 +59,8 @@ context_find_by_type (const char *string, const char *type,
  * The search is case insensitive.
  */
 int
  * The search is case insensitive.
  */
 int
-context_find_prefix (const char *prefix) {
+context_find_prefix (const char *prefix)
+{
     struct node *np;
     size_t len;
 
     struct node *np;
     size_t len;
 
index b610b2b9810306dd9060c33125be4fec6c2547a8..c728c52ff67f8de8dfb968ab4fe9a36e693b7a0e 100644 (file)
@@ -17,7 +17,8 @@ struct nmh_creds {
 };
 
 void
 };
 
 void
-init_credentials_file(void) {
+init_credentials_file(void)
+{
     if (credentials_file == NULL) {
         char *cred_style = context_find ("credentials");
 
     if (credentials_file == NULL) {
         char *cred_style = context_find ("credentials");
 
index a7906a52063bd5c23ad7b12adf509be5dabd5943..f51ed2f4fc5f5b8a0c4459bd4296082526cefe24 100644 (file)
@@ -59,7 +59,8 @@ struct tzdesc {
  */
 static int
 parse_datetime (const char *datetime, const char *zone, bool dst,
  */
 static int
 parse_datetime (const char *datetime, const char *zone, bool dst,
-                struct tws *tws) {
+                struct tws *tws)
+{
     char utc_indicator;
     bool form_1;
     int items_matched;
     char utc_indicator;
     bool form_1;
     int items_matched;
@@ -153,7 +154,8 @@ parse_datetime (const char *datetime, const char *zone, bool dst,
 }
 
 tzdesc_t
 }
 
 tzdesc_t
-load_timezones (const contentline *clines) {
+load_timezones (const contentline *clines)
+{
     tzdesc_t timezones = NULL, timezone = NULL;
     bool in_vtimezone, in_standard, in_daylight;
     tzparams *params = NULL;
     tzdesc_t timezones = NULL, timezone = NULL;
     bool in_vtimezone, in_standard, in_daylight;
     tzparams *params = NULL;
@@ -240,7 +242,8 @@ load_timezones (const contentline *clines) {
 }
 
 void
 }
 
 void
-free_timezones (tzdesc_t timezone) {
+free_timezones (tzdesc_t timezone)
+{
     tzdesc_t next;
 
     for ( ; timezone; timezone = next) {
     tzdesc_t next;
 
     for ( ; timezone; timezone = next) {
@@ -270,7 +273,8 @@ free_timezones (tzdesc_t timezone) {
  */
 time_t
 rrule_clock (const char *rrule, const char *starttime, const char *zone,
  */
 time_t
 rrule_clock (const char *rrule, const char *starttime, const char *zone,
-             unsigned int year) {
+             unsigned int year)
+{
     time_t clock = 0;
 
     if (nmh_strcasestr (rrule, "FREQ=YEARLY;INTERVAL=1")  ||
     time_t clock = 0;
 
     if (nmh_strcasestr (rrule, "FREQ=YEARLY;INTERVAL=1")  ||
@@ -333,7 +337,8 @@ fail:
 }
 
 char *
 }
 
 char *
-format_datetime (tzdesc_t timezones, const contentline *node) {
+format_datetime (tzdesc_t timezones, const contentline *node)
+{
     param_list *p;
     char *dt_timezone = NULL;
     int dst = 0;
     param_list *p;
     char *dt_timezone = NULL;
     int dst = 0;
index 05c6f9365def246518e07e8404a1f5ac8611460d..ac314a61759d3a721fb2338a566030d49049cf28 100644 (file)
@@ -12,14 +12,16 @@ static void escape_component (char *name, size_t namesize, char *chars);
 
 
 void
 
 
 void
-escape_display_name (char *name, size_t namesize) {
+escape_display_name (char *name, size_t namesize)
+{
   char *specials = "\"(),.:;<>@[\\]";
   escape_component (name, namesize, specials);
 }
 
 
 void
   char *specials = "\"(),.:;<>@[\\]";
   escape_component (name, namesize, specials);
 }
 
 
 void
-escape_local_part (char *name, size_t namesize) {
+escape_local_part (char *name, size_t namesize)
+{
   /* wsp (whitespace) is horizontal tab or space, according to
      RFC 5234. */
   char *specials_less_dot_plus_wsp = "  \"(),:;<>@[\\]";
   /* wsp (whitespace) is horizontal tab or space, according to
      RFC 5234. */
   char *specials_less_dot_plus_wsp = "  \"(),:;<>@[\\]";
@@ -33,7 +35,8 @@ escape_local_part (char *name, size_t namesize) {
    namesize argument.  The need_escape argument is a string of
    characters that require that name be escaped. */
 static void
    namesize argument.  The need_escape argument is a string of
    characters that require that name be escaped. */
 static void
-escape_component (char *name, size_t namesize, char *chars_to_escape) {
+escape_component (char *name, size_t namesize, char *chars_to_escape)
+{
     /* If name contains any chars_to_escape:
        1) enclose it in ""
        2) escape any embedded "
     /* If name contains any chars_to_escape:
        1) enclose it in ""
        2) escape any embedded "
index cd81017a4a4c12c79f336546e5402e6e9f583db6..05da19bc3d1d2133d7ec5db0593a0ab120c39d0c 100644 (file)
@@ -56,7 +56,8 @@ new_fs (char *form, char *format, char *default_fs)
 
 
 void
 
 
 void
-free_fs(void) {
+free_fs(void)
+{
     free (formats);
     formats = 0;
 }
     free (formats);
     formats = 0;
 }
index 3c93a5a70b856f7564e86306fa518cdb0b40d7fe..207692fcaa69ce3f787b6d5a704f81645c48e991 100644 (file)
@@ -67,7 +67,8 @@ match (char *str, char *sub)
  * copy a number to the destination subject to a maximum width
  */
 void
  * copy a number to the destination subject to a maximum width
  */
 void
-cpnumber(charstring_t dest, int num, int wid, char fill, size_t max) {
+cpnumber(charstring_t dest, int num, int wid, char fill, size_t max)
+{
     /* Maybe we should handle left padding at some point? */
     if (wid == 0)
        return;
     /* Maybe we should handle left padding at some point? */
     if (wid == 0)
        return;
@@ -120,7 +121,8 @@ cpnumber(charstring_t dest, int num, int wid, char fill, size_t max) {
  * aligned no more than max characters are copied
  */
 void
  * aligned no more than max characters are copied
  */
 void
-cptrimmed(charstring_t dest, char *str, int wid, char fill, size_t max) {
+cptrimmed(charstring_t dest, char *str, int wid, char fill, size_t max)
+{
     int remaining;     /* remaining output width available */
     bool rjust;
     struct charstring *trimmed;
     int remaining;     /* remaining output width available */
     bool rjust;
     struct charstring *trimmed;
index 3a6522ce61fb9f5bf0d1456bb21d82032c06a528..7e691381866c70a531c53fa3a4429b4702531501 100644 (file)
@@ -289,7 +289,8 @@ folded-value         {VALUE-CHAR}*({fold}{VALUE-CHAR}*)+
 %%
 
 static char *
 %%
 
 static char *
-unfold (char *text, size_t *leng) {
+unfold (char *text, size_t *leng)
+{
     /* It's legal to shorten text and modify leng (because we don't
        use yymore()). */
     char *cp;
     /* It's legal to shorten text and modify leng (because we don't
        use yymore()). */
     char *cp;
@@ -321,7 +322,8 @@ unfold (char *text, size_t *leng) {
  * with something other than flex.
  */
 static void
  * with something other than flex.
  */
 static void
-destroy_icallex(void) {
+destroy_icallex(void)
+{
 #if defined FLEX_SCANNER  &&  defined YY_FLEX_SUBMINOR_VERSION
     /* Hack:  rely on fact that the the YY_FLEX_SUBMINOR_VERSION
        #define was added to flex (flex.skl v. 2.163) after
 #if defined FLEX_SCANNER  &&  defined YY_FLEX_SUBMINOR_VERSION
     /* Hack:  rely on fact that the the YY_FLEX_SUBMINOR_VERSION
        #define was added to flex (flex.skl v. 2.163) after
@@ -335,12 +337,14 @@ destroy_icallex(void) {
  * because flex 2.5.4 doesn't.
  */
 void
  * because flex 2.5.4 doesn't.
  */
 void
-icalset_inputfile (FILE *file) {
+icalset_inputfile (FILE *file)
+{
     yyin = file;
 }
 
 void
     yyin = file;
 }
 
 void
-icalset_outputfile (FILE *file) {
+icalset_outputfile (FILE *file)
+{
     yyout = file;
 }
 
     yyout = file;
 }
 
index f2fcc0ea863b998ff5dadc5a47b27c96c9156b04..ef302001132c906e244de54a9ef2637eab97ba3a 100644 (file)
@@ -138,13 +138,15 @@ param_value_list
  * Remove the contentline node (by setting its name to NULL).
  */
 void
  * Remove the contentline node (by setting its name to NULL).
  */
 void
-remove_contentline (contentline *node) {
+remove_contentline (contentline *node)
+{
     free (node->name);
     node->name = NULL;
 }
 
 contentline *
     free (node->name);
     node->name = NULL;
 }
 
 contentline *
-add_contentline (contentline *node, const char *name) {
+add_contentline (contentline *node, const char *name)
+{
     contentline *new_node;
 
     NEW0(new_node);
     contentline *new_node;
 
     NEW0(new_node);
@@ -159,7 +161,8 @@ add_contentline (contentline *node, const char *name) {
  * Remove the value from a value_list.
  */
 void
  * Remove the value from a value_list.
  */
 void
-remove_value (value_list *node) {
+remove_value (value_list *node)
+{
     free (node->value);
     node->value = NULL;
 }
     free (node->value);
     node->value = NULL;
 }
@@ -170,7 +173,8 @@ remove_value (value_list *node) {
  */
 contentline *
 find_contentline (contentline *contentlines, const char *name,
  */
 contentline *
 find_contentline (contentline *contentlines, const char *name,
-                  const char *val) {
+                  const char *val)
+{
     contentline *node;
 
     for (node = contentlines; node; node = node->next) {
     contentline *node;
 
     for (node = contentlines; node; node = node->next) {
@@ -185,7 +189,8 @@ find_contentline (contentline *contentlines, const char *name,
 }
 
 static char *
 }
 
 static char *
-append (contentline *cline, const char *src, const size_t src_len) {
+append (contentline *cline, const char *src, const size_t src_len)
+{
     if (src_len > 0) {
         const size_t len = cline->input_line_len + src_len;
 
     if (src_len > 0) {
         const size_t len = cline->input_line_len + src_len;
 
@@ -206,7 +211,8 @@ append (contentline *cline, const char *src, const size_t src_len) {
 }
 
 static void
 }
 
 static void
-new_content_line (contentline **cline) {
+new_content_line (contentline **cline)
+{
     contentline *new_node;
 
     NEW0(new_node);
     contentline *new_node;
 
     NEW0(new_node);
@@ -223,7 +229,8 @@ new_content_line (contentline **cline) {
 }
 
 static void
 }
 
 static void
-new_vevent (vevent *event) {
+new_vevent (vevent *event)
+{
     vevent *new_node, *node;
 
     NEW0(new_node);
     vevent *new_node, *node;
 
     NEW0(new_node);
@@ -234,7 +241,8 @@ new_vevent (vevent *event) {
 }
 
 void
 }
 
 void
-add_param_name (contentline *cline, char *name) {
+add_param_name (contentline *cline, char *name)
+{
     param_list *new_node;
     param_list *p;
 
     param_list *new_node;
     param_list *p;
 
@@ -254,7 +262,8 @@ add_param_name (contentline *cline, char *name) {
  * Add a value to the last parameter seen.
  */
 void
  * Add a value to the last parameter seen.
  */
 void
-add_param_value (contentline *cline, char *value) {
+add_param_value (contentline *cline, char *value)
+{
     value_list *new_node;
     param_list *p;
     value_list *v;
     value_list *new_node;
     param_list *p;
     value_list *v;
@@ -281,7 +290,8 @@ add_param_value (contentline *cline, char *value) {
 }
 
 void
 }
 
 void
-free_contentlines (contentline *root) {
+free_contentlines (contentline *root)
+{
     contentline *i, *next;
 
     for (i = root; i; i = next) {
     contentline *i, *next;
 
     for (i = root; i; i = next) {
@@ -298,7 +308,8 @@ free_contentlines (contentline *root) {
 }
 
 static void
 }
 
 static void
-free_param_names (param_list *p) {
+free_param_names (param_list *p)
+{
     param_list *next;
 
     for ( ; p; p = next) {
     param_list *next;
 
     for ( ; p; p = next) {
@@ -310,7 +321,8 @@ free_param_names (param_list *p) {
 }
 
 static void
 }
 
 static void
-free_param_values (value_list *v) {
+free_param_values (value_list *v)
+{
     value_list *next;
 
     for ( ; v; v = next) {
     value_list *next;
 
     for ( ; v; v = next) {
@@ -321,7 +333,8 @@ free_param_values (value_list *v) {
 }
 
 static int
 }
 
 static int
-icalerror (const char *error) {
+icalerror (const char *error)
+{
     contentline *c;
     charstring_t context = NULL;
 
     contentline *c;
     charstring_t context = NULL;
 
index 2b5855419f52c295655338cfb41c6a00e94c7eca..9793b05468422f10f898fc58bb3296596a0e76e1 100644 (file)
@@ -331,7 +331,8 @@ m_getfld_state_t m_getfld_state_init(FILE *iob)
 
 /* scan() needs to force an initial state of FLD for each message. */
 void
 
 /* scan() needs to force an initial state of FLD for each message. */
 void
-m_getfld_state_reset (m_getfld_state_t *gstate) {
+m_getfld_state_reset (m_getfld_state_t *gstate)
+{
     if (*gstate) {
        (*gstate)->state = FLD;
     }
     if (*gstate) {
        (*gstate)->state = FLD;
     }
@@ -341,7 +342,8 @@ m_getfld_state_reset (m_getfld_state_t *gstate) {
    calls, m_getfld() must keep track of the file position.  The caller
    must use this function to inform m_getfld(). */
 void
    calls, m_getfld() must keep track of the file position.  The caller
    must use this function to inform m_getfld(). */
 void
-m_getfld_track_filepos (m_getfld_state_t *gstate, FILE *iob) {
+m_getfld_track_filepos (m_getfld_state_t *gstate, FILE *iob)
+{
     if (! *gstate) {
        *gstate = m_getfld_state_init(iob);
     }
     if (! *gstate) {
        *gstate = m_getfld_state_init(iob);
     }
@@ -358,7 +360,8 @@ void m_getfld_track_filepos2(m_getfld_state_t *gstate)
     m_getfld_track_filepos(gstate, (*gstate)->iob);
 }
 
     m_getfld_track_filepos(gstate, (*gstate)->iob);
 }
 
-void m_getfld_state_destroy (m_getfld_state_t *gstate) {
+void m_getfld_state_destroy (m_getfld_state_t *gstate)
+{
     m_getfld_state_t s = *gstate;
 
     if (s) {
     m_getfld_state_t s = *gstate;
 
     if (s) {
@@ -401,7 +404,8 @@ void m_getfld_state_destroy (m_getfld_state_t *gstate) {
 
 
 static void
 
 
 static void
-enter_getfld (m_getfld_state_t *gstate, FILE *iob) {
+enter_getfld (m_getfld_state_t *gstate, FILE *iob)
+{
     m_getfld_state_t s;
     off_t pos;
     off_t pos_movement;
     m_getfld_state_t s;
     off_t pos;
     off_t pos_movement;
@@ -475,7 +479,8 @@ enter_getfld (m_getfld_state_t *gstate, FILE *iob) {
 }
 
 static void
 }
 
 static void
-leave_getfld (m_getfld_state_t s) {
+leave_getfld (m_getfld_state_t s)
+{
     s->total_bytes_read += s->bytes_read;
 
     if (s->track_filepos) {
     s->total_bytes_read += s->bytes_read;
 
     if (s->track_filepos) {
@@ -493,7 +498,8 @@ leave_getfld (m_getfld_state_t s) {
 }
 
 static size_t
 }
 
 static size_t
-read_more (m_getfld_state_t s) {
+read_more (m_getfld_state_t s)
+{
     /* Retain at least edelimlen characters that have already been read,
        if at least edelimlen have been read, so that we can back up to them
        in m_Eom(). */
     /* Retain at least edelimlen characters that have already been read,
        if at least edelimlen have been read, so that we can back up to them
        in m_Eom(). */
@@ -519,7 +525,8 @@ read_more (m_getfld_state_t s) {
 /* Return the next character consumed from the input, fetching more of
  * the input for the buffer if required, or EOF on end of file. */
 static int
 /* Return the next character consumed from the input, fetching more of
  * the input for the buffer if required, or EOF on end of file. */
 static int
-Getc (m_getfld_state_t s) {
+Getc (m_getfld_state_t s)
+{
     if ((s->end - s->readpos < 1 && read_more (s) == 0) ||
         s->readpos >= s->end)
         return EOF;
     if ((s->end - s->readpos < 1 && read_more (s) == 0) ||
         s->readpos >= s->end)
         return EOF;
index 123da576b556b2d9342b012a2f04822afbbd7491..726ce823f88458a031f88f12244d6039c206cc3a 100644 (file)
@@ -256,7 +256,8 @@ static svector_t exit_filelist = NULL;
  * Register a file for removal at program termination.
  */
 static void
  * Register a file for removal at program termination.
  */
 static void
-register_for_removal(const char *pathname) {
+register_for_removal(const char *pathname)
+{
     if (exit_filelist == NULL) exit_filelist = svector_create(20);
     (void) svector_push_back(exit_filelist, mh_xstrdup(pathname));
 }
     if (exit_filelist == NULL) exit_filelist = svector_create(20);
     (void) svector_push_back(exit_filelist, mh_xstrdup(pathname));
 }
@@ -280,7 +281,8 @@ register_for_removal(const char *pathname) {
  * quickly created with the same name.
  */
 void
  * quickly created with the same name.
  */
 void
-unregister_for_removal(int remove_files) {
+unregister_for_removal(int remove_files)
+{
     if (exit_filelist) {
         size_t i;
 
     if (exit_filelist) {
         size_t i;
 
@@ -303,7 +305,8 @@ unregister_for_removal(int remove_files) {
  * any case, unlink it.
  */
 int
  * any case, unlink it.
  */
 int
-m_unlink(const char *pathname) {
+m_unlink(const char *pathname)
+{
     if (exit_filelist) {
         char **slot = svector_find(exit_filelist, pathname);
 
     if (exit_filelist) {
         char **slot = svector_find(exit_filelist, pathname);
 
@@ -321,7 +324,8 @@ m_unlink(const char *pathname) {
  * Remove all registered temporary files.
  */
 void
  * Remove all registered temporary files.
  */
 void
-remove_registered_files_atexit(void) {
+remove_registered_files_atexit(void)
+{
     unregister_for_removal(1);
 }
 
     unregister_for_removal(1);
 }
 
@@ -333,7 +337,8 @@ remove_registered_files_atexit(void) {
  * in case the use was expecting a core dump.
  */
 void
  * in case the use was expecting a core dump.
  */
 void
-remove_registered_files(int sig) {
+remove_registered_files(int sig)
+{
     struct sigaction act;
 
     /*
     struct sigaction act;
 
     /*
index 76e5e17f3fecca82f2dd9807cf99fa5af0df66cb..bac97507f4b38c0321a3a3dd733bfac27ac90c68 100644 (file)
@@ -20,7 +20,8 @@ static bool seeded = false;
 
 
 int
 
 
 int
-m_rand (unsigned char *buf, size_t n) {
+m_rand (unsigned char *buf, size_t n)
+{
 #if !HAVE_ARC4RANDOM
   if (! seeded) {
     FILE *devurandom;
 #if !HAVE_ARC4RANDOM
   if (! seeded) {
     FILE *devurandom;
index 8decfa844d875257ab11232c06b4fb2054015527..ab697044c978c060fd2f2e6dcd36ae373a1b1668 100644 (file)
@@ -22,7 +22,8 @@ static char message_id_[BUFSIZ];
 
 /* Convert name of message id style to integer value and store it. */
 int
 
 /* Convert name of message id style to integer value and store it. */
 int
-save_message_id_style (const char *value) {
+save_message_id_style (const char *value)
+{
   if (! strcasecmp (value, "localname")) {
     message_id_style = NMH_MESSAGE_ID_LOCALNAME;
     return 0;
   if (! strcasecmp (value, "localname")) {
     message_id_style = NMH_MESSAGE_ID_LOCALNAME;
     return 0;
@@ -36,7 +37,8 @@ save_message_id_style (const char *value) {
 
 
 char *
 
 
 char *
-message_id (time_t tclock, int content_id) {
+message_id (time_t tclock, int content_id)
+{
   switch (message_id_style) {
     case NMH_MESSAGE_ID_LOCALNAME: {
 #define P(fmt) \
   switch (message_id_style) {
     case NMH_MESSAGE_ID_LOCALNAME: {
 #define P(fmt) \
index 016947aa222ad6bb62d6d75e1c9e6db847a2bb44..4e3ebbb797c84faf630e954e55c25b2374d90fd4 100644 (file)
@@ -20,7 +20,8 @@ static char *get_file_info(const char *, const char *);
  * is responsible for free'ing returned memory.
  */
 char *
  * is responsible for free'ing returned memory.
  */
 char *
-mime_type(const char *file_name) {
+mime_type(const char *file_name)
+{
     char *content_type = NULL;  /* mime content type */
     char *p;
 
     char *content_type = NULL;  /* mime content type */
     char *p;
 
index 4a056755d5b7f130757be0a8a44ab8049615e9a1..d67153fe2bd3f225a9b4a788be86734cca58a700 100644 (file)
--- a/sbr/mts.c
+++ b/sbr/mts.c
@@ -105,7 +105,8 @@ static struct bind binds[] = {
 
 /* Convert name of mts method to integer value and store it. */
 void
 
 /* Convert name of mts method to integer value and store it. */
 void
-save_mts_method (const char *value) {
+save_mts_method (const char *value)
+{
     if (! strcasecmp (value, "smtp")) {
         mts_method = "smtp";
         sm_mts = MTS_SMTP;
     if (! strcasecmp (value, "smtp")) {
         mts_method = "smtp";
         sm_mts = MTS_SMTP;
index 2aafe06e8abe9ee85004d3e795b61927b82c1905..66d27a02f9a45f667ca3697a2450a3b5f093247e 100644 (file)
@@ -64,7 +64,8 @@ static const char nmh_intro3[] = \
 "at http://www.nongnu.org/nmh/ .\n";
 
 void
 "at http://www.nongnu.org/nmh/ .\n";
 
 void
-print_intro (FILE *file, bool brief) {
+print_intro (FILE *file, bool brief)
+{
     fputs (nmh_intro1, file);
     if (! brief) {
         fputs (nmh_intro2, file);
     fputs (nmh_intro1, file);
     if (! brief) {
         fputs (nmh_intro2, file);
index 1bbc069c0117695f50829e04612f5e922de2f033..0b823b933bd2489c9471026baa3c7c032af01e4f 100644 (file)
@@ -155,7 +155,8 @@ readconfig (struct node **npp, FILE *ib, const char *file, int ctx)
 
 
 void
 
 
 void
-add_profile_entry (const char *key, const char *value) {
+add_profile_entry (const char *key, const char *value)
+{
     struct node *newnode;
 
     /* This inserts the new node at the beginning of m_defs because
     struct node *newnode;
 
     /* This inserts the new node at the beginning of m_defs because
index ad18261bb734d64e5badd07f5876a9edb260d9a5..ba37ee5eeaf86777045ba7bcc4842b62f304d8a9 100644 (file)
@@ -82,7 +82,8 @@ SIGNAL2 (int sig, SIGNAL_HANDLER func)
  * For use by nmh_init().
  */
 int
  * For use by nmh_init().
  */
 int
-setup_signal_handlers(void) {
+setup_signal_handlers(void)
+{
     /*
      * Catch HUP, INT, QUIT, and TERM so that we can clean up tmp
      * files when the user terminates the process early.  And also a
     /*
      * Catch HUP, INT, QUIT, and TERM so that we can clean up tmp
      * files when the user terminates the process early.  And also a
index 625c26c0ac0e022fff023db542293c05517fbd03..3263231a46ff4be886613eaafbc2303750fd4d4d 100644 (file)
@@ -49,7 +49,8 @@ trimcpy (char *cp)
  * complete copyright information.
  */
 char *
  * complete copyright information.
  */
 char *
-cpytrim (const char *sp) {
+cpytrim (const char *sp)
+{
     char *dp;
     char *cp;
 
     char *dp;
     char *cp;
 
@@ -81,7 +82,8 @@ cpytrim (const char *sp) {
  * complete copyright information.
  */
 char *
  * complete copyright information.
  */
 char *
-rtrim (char *sp) {
+rtrim (char *sp)
+{
     char *cp;
 
     /* start at the end and zap trailing whitespace */
     char *cp;
 
     /* start at the end and zap trailing whitespace */
index 2d0acb3947eaeda9623cd15a7a83c414a194ae85..18dd4b541e5dcdf1176c6be8cd7085f2518aa072 100644 (file)
@@ -272,7 +272,8 @@ app_msgnum(struct msgnum_array *msgs, int msgnum)
  * pointer so that the caller can modify it.
  */
 char *
  * pointer so that the caller can modify it.
  */
 char *
-find_str (const char buf[], size_t buflen, const char *str) {
+find_str (const char buf[], size_t buflen, const char *str)
+{
     const size_t len = strlen (str);
     size_t i;
 
     const size_t len = strlen (str);
     size_t i;
 
@@ -291,7 +292,8 @@ find_str (const char buf[], size_t buflen, const char *str) {
  * pointer so that the caller can modify it.
  */
 char *
  * pointer so that the caller can modify it.
  */
 char *
-rfind_str (const char buf[], size_t buflen, const char *str) {
+rfind_str (const char buf[], size_t buflen, const char *str)
+{
     const size_t len = strlen (str);
     size_t i;
 
     const size_t len = strlen (str);
     size_t i;
 
@@ -305,7 +307,8 @@ rfind_str (const char buf[], size_t buflen, const char *str) {
 
 /* POSIX doesn't have strcasestr() so emulate it. */
 char *
 
 /* POSIX doesn't have strcasestr() so emulate it. */
 char *
-nmh_strcasestr (const char *s1, const char *s2) {
+nmh_strcasestr (const char *s1, const char *s2)
+{
     const size_t len = strlen (s2);
 
     if (isupper ((unsigned char) s2[0])  ||  islower ((unsigned char)s2[0])) {
     const size_t len = strlen (s2);
 
     if (isupper ((unsigned char) s2[0])  ||  islower ((unsigned char)s2[0])) {
@@ -500,7 +503,8 @@ int nmh_init(const char *argv0, bool read_context, bool check_version)
  * use that prefix here.
  */
 int
  * use that prefix here.
  */
 int
-nmh_version_changed (int older) {
+nmh_version_changed (int older)
+{
     const char *const context_version = context_find("Version");
 
     if (older) {
     const char *const context_version = context_find("Version");
 
     if (older) {
@@ -559,7 +563,8 @@ bool contains8bit(const char *start, const char *end)
  * See if input has any 8-bit bytes.
  */
 int
  * See if input has any 8-bit bytes.
  */
 int
-scan_input (int fd, int *eightbit) {
+scan_input (int fd, int *eightbit)
+{
     int state;
     char buf[BUFSIZ];
 
     int state;
     char buf[BUFSIZ];
 
@@ -581,7 +586,8 @@ scan_input (int fd, int *eightbit) {
  * Convert an int to a char string.
  */
 char *
  * Convert an int to a char string.
  */
 char *
-m_str(int value) {
+m_str(int value)
+{
     return m_strn(value, 0);
 }
 
     return m_strn(value, 0);
 }
 
@@ -594,7 +600,8 @@ m_str(int value) {
 #define SIZE(n) (sizeof STR(n))
 
 char *
 #define SIZE(n) (sizeof STR(n))
 
 char *
-m_strn(int value, unsigned int width) {
+m_strn(int value, unsigned int width)
+{
     /* Need to include space for negative sign.  But don't use INT_MIN
        because it could be a macro that would fool SIZE(n). */
     static char buffer[SIZE(-INT_MAX)];
     /* Need to include space for negative sign.  But don't use INT_MIN
        because it could be a macro that would fool SIZE(n). */
     static char buffer[SIZE(-INT_MAX)];
index 6afe62aa29e2aecc1ad446c59ed175b81201476a..c87e2e4ddc856e91cf2769f2a7fbc03d4968c4aa 100644 (file)
@@ -54,7 +54,8 @@
 static void bvector_resize (bvector_t vec, size_t newsize);
 
 bvector_t
 static void bvector_resize (bvector_t vec, size_t newsize);
 
 bvector_t
-bvector_create (void) {
+bvector_create (void)
+{
     bvector_t vec;
 
     /* See "wider than unsigned long" comment above. */
     bvector_t vec;
 
     /* See "wider than unsigned long" comment above. */
@@ -74,7 +75,8 @@ void bvector_init(struct bvector *bv)
 }
 
 void
 }
 
 void
-bvector_copy (bvector_t dest, bvector_t src) {
+bvector_copy (bvector_t dest, bvector_t src)
+{
     size_t bytes = BVEC_BYTES(src->maxsize);
 
     if (dest->bits != dest->tiny)
     size_t bytes = BVEC_BYTES(src->maxsize);
 
     if (dest->bits != dest->tiny)
@@ -88,7 +90,8 @@ bvector_copy (bvector_t dest, bvector_t src) {
 }
 
 void
 }
 
 void
-bvector_free (bvector_t vec) {
+bvector_free (bvector_t vec)
+{
     bvector_fini(vec);
     free (vec);
 }
     bvector_fini(vec);
     free (vec);
 }
@@ -100,20 +103,23 @@ void bvector_fini(struct bvector *bv)
 }
 
 void
 }
 
 void
-bvector_clear (bvector_t vec, size_t n) {
+bvector_clear (bvector_t vec, size_t n)
+{
     if (n < vec->maxsize)
         vec->bits[BVEC_WORD(n)] &= ~(1ul << BVEC_OFFSET(n));
 }
 
 
 void
     if (n < vec->maxsize)
         vec->bits[BVEC_WORD(n)] &= ~(1ul << BVEC_OFFSET(n));
 }
 
 
 void
-bvector_clear_all (bvector_t vec) {
+bvector_clear_all (bvector_t vec)
+{
     memset (vec->bits, 0, BVEC_BYTES(vec->maxsize));
 }
 
 
 void
     memset (vec->bits, 0, BVEC_BYTES(vec->maxsize));
 }
 
 
 void
-bvector_set (bvector_t vec, size_t n) {
+bvector_set (bvector_t vec, size_t n)
+{
     size_t word = BVEC_WORD(n);
     size_t offset = BVEC_OFFSET(n);
 
     size_t word = BVEC_WORD(n);
     size_t offset = BVEC_OFFSET(n);
 
@@ -123,7 +129,8 @@ bvector_set (bvector_t vec, size_t n) {
 }
 
 unsigned int
 }
 
 unsigned int
-bvector_at (bvector_t vec, size_t i) {
+bvector_at (bvector_t vec, size_t i)
+{
     if (i < vec->maxsize)
         return !!(vec->bits[BVEC_WORD(i)] & (1ul << BVEC_OFFSET(i)));
 
     if (i < vec->maxsize)
         return !!(vec->bits[BVEC_WORD(i)] & (1ul << BVEC_OFFSET(i)));
 
@@ -131,7 +138,8 @@ bvector_at (bvector_t vec, size_t i) {
 }
 
 static void
 }
 
 static void
-bvector_resize (bvector_t vec, size_t newsize) {
+bvector_resize (bvector_t vec, size_t newsize)
+{
     size_t oldsize = vec->maxsize;
     size_t bytes;
 
     size_t oldsize = vec->maxsize;
     size_t bytes;
 
@@ -149,7 +157,8 @@ bvector_resize (bvector_t vec, size_t newsize) {
 }
 
 unsigned long
 }
 
 unsigned long
-bvector_first_bits (bvector_t vec) {
+bvector_first_bits (bvector_t vec)
+{
     return *vec->bits;
 }
 
     return *vec->bits;
 }
 
@@ -163,7 +172,8 @@ struct svector {
 static void svector_resize (svector_t, size_t);
 
 svector_t
 static void svector_resize (svector_t, size_t);
 
 svector_t
-svector_create (size_t init_size) {
+svector_create (size_t init_size)
+{
     svector_t vec;
     size_t bytes;
 
     svector_t vec;
     size_t bytes;
 
@@ -177,20 +187,23 @@ svector_create (size_t init_size) {
 }
 
 void
 }
 
 void
-svector_free (svector_t vec) {
+svector_free (svector_t vec)
+{
     free (vec->strs);
     free (vec);
 }
 
 char *
     free (vec->strs);
     free (vec);
 }
 
 char *
-svector_push_back (svector_t vec, char *s) {
+svector_push_back (svector_t vec, char *s)
+{
     if (++vec->size >= vec->maxsize)
         svector_resize (vec, vec->size);
     return vec->strs[vec->size-1] = s;
 }
 
 char *
     if (++vec->size >= vec->maxsize)
         svector_resize (vec, vec->size);
     return vec->strs[vec->size-1] = s;
 }
 
 char *
-svector_at (svector_t vec, size_t i) {
+svector_at (svector_t vec, size_t i)
+{
     if (i >= vec->maxsize)
         svector_resize (vec, i);
     return vec->strs[i];
     if (i >= vec->maxsize)
         svector_resize (vec, i);
     return vec->strs[i];
@@ -201,7 +214,8 @@ svector_at (svector_t vec, size_t i) {
  * The caller can replace the contents of the return address.
  */
 char **
  * The caller can replace the contents of the return address.
  */
 char **
-svector_find (svector_t vec, const char *s) {
+svector_find (svector_t vec, const char *s)
+{
     size_t i;
     char **str = vec->strs;
 
     size_t i;
     char **str = vec->strs;
 
@@ -215,17 +229,20 @@ svector_find (svector_t vec, const char *s) {
 }
 
 char **
 }
 
 char **
-svector_strs (svector_t vec) {
+svector_strs (svector_t vec)
+{
     return vec->strs;
 }
 
 size_t
     return vec->strs;
 }
 
 size_t
-svector_size (svector_t vec) {
+svector_size (svector_t vec)
+{
     return vec->size;
 }
 
 static void
     return vec->size;
 }
 
 static void
-svector_resize (svector_t vec, size_t maxsize) {
+svector_resize (svector_t vec, size_t maxsize)
+{
     size_t old_maxsize = vec->maxsize;
 
     while ((vec->maxsize *= 2) < maxsize)
     size_t old_maxsize = vec->maxsize;
 
     while ((vec->maxsize *= 2) < maxsize)
@@ -245,7 +262,8 @@ struct ivector {
 static void ivector_resize (ivector_t, size_t);
 
 ivector_t
 static void ivector_resize (ivector_t, size_t);
 
 ivector_t
-ivector_create (size_t init_size) {
+ivector_create (size_t init_size)
+{
     ivector_t vec;
     size_t bytes;
 
     ivector_t vec;
     size_t bytes;
 
@@ -259,34 +277,39 @@ ivector_create (size_t init_size) {
 }
 
 void
 }
 
 void
-ivector_free (ivector_t vec) {
+ivector_free (ivector_t vec)
+{
     free (vec->ints);
     free (vec);
 }
 
 int
     free (vec->ints);
     free (vec);
 }
 
 int
-ivector_push_back (ivector_t vec, int n) {
+ivector_push_back (ivector_t vec, int n)
+{
     if (++vec->size >= vec->maxsize)
         ivector_resize (vec, vec->size);
     return vec->ints[vec->size-1] = n;
 }
 
 int
     if (++vec->size >= vec->maxsize)
         ivector_resize (vec, vec->size);
     return vec->ints[vec->size-1] = n;
 }
 
 int
-ivector_at (ivector_t vec, size_t i) {
+ivector_at (ivector_t vec, size_t i)
+{
     if (i >= vec->maxsize)
         ivector_resize (vec, i);
     return vec->ints[i];
 }
 
 int *
     if (i >= vec->maxsize)
         ivector_resize (vec, i);
     return vec->ints[i];
 }
 
 int *
-ivector_atp (ivector_t vec, size_t i) {
+ivector_atp (ivector_t vec, size_t i)
+{
     if (i >= vec->maxsize)
         ivector_resize (vec, i);
     return &vec->ints[i];
 }
 
 static void
     if (i >= vec->maxsize)
         ivector_resize (vec, i);
     return &vec->ints[i];
 }
 
 static void
-ivector_resize (ivector_t vec, size_t maxsize) {
+ivector_resize (ivector_t vec, size_t maxsize)
+{
     size_t old_maxsize = vec->maxsize;
 
     while ((vec->maxsize *= 2) < maxsize)
     size_t old_maxsize = vec->maxsize;
 
     while ((vec->maxsize *= 2) < maxsize)
index 97a1fdcac22d09c4253df608e36f40046a05ed1a..c853086381eb24ede00d60910e1e396065f505d7 100644 (file)
@@ -98,7 +98,8 @@ static void readonly_folders (void);
  */
 static
 void
  */
 static
 void
-nonexistent_folder (int status) {
+nonexistent_folder (int status)
+{
     NMH_UNUSED (status);
     die("folder %s does not exist", folder);
 }
     NMH_UNUSED (status);
     die("folder %s does not exist", folder);
 }
index b8b28f24aa827a2a010ceff2ee9efbd3a382600b..9b2dc717e66f23ac3cb0301d9a597cb13c2db7f6 100644 (file)
@@ -2045,7 +2045,8 @@ setup_attach_content(CT ct, char *filename)
  * 'attachment'.
  */
 void
  * 'attachment'.
  */
 void
-set_disposition (CT ct) {
+set_disposition (CT ct)
+{
     if (ct->c_dispo_type == NULL) {
         char *cp = context_find_by_type ("disposition", ct->c_ctinfo.ci_type,
                                          ct->c_ctinfo.ci_subtype);
     if (ct->c_dispo_type == NULL) {
         char *cp = context_find_by_type ("disposition", ct->c_ctinfo.ci_type,
                                          ct->c_ctinfo.ci_subtype);
@@ -2075,7 +2076,8 @@ set_disposition (CT ct) {
  * -1: ignore content and use user's locale to determine charset
  */
 void
  * -1: ignore content and use user's locale to determine charset
  */
 void
-set_charset (CT ct, int contains8bit) {
+set_charset (CT ct, int contains8bit)
+{
     if (ct->c_type == CT_TEXT) {
         struct text *t;
 
     if (ct->c_type == CT_TEXT) {
         struct text *t;
 
@@ -2114,7 +2116,8 @@ set_charset (CT ct, int contains8bit) {
  */
 void
 expand_pseudoheaders (CT ct, struct multipart *m, const char *infile,
  */
 void
 expand_pseudoheaders (CT ct, struct multipart *m, const char *infile,
-                      const convert_list *convert_head) {
+                      const convert_list *convert_head)
+{
     /* text_plain_ct is used to concatenate all of the text/plain
        replies into one part, instead of having each one in a separate
        part. */
     /* text_plain_ct is used to concatenate all of the text/plain
        replies into one part, instead of having each one in a separate
        part. */
@@ -2190,7 +2193,8 @@ expand_pseudoheaders (CT ct, struct multipart *m, const char *infile,
 void
 expand_pseudoheader (CT ct, CT *text_plain_ct, struct multipart *m,
                      const char *infile, const char *type,
 void
 expand_pseudoheader (CT ct, CT *text_plain_ct, struct multipart *m,
                      const char *infile, const char *type,
-                     const char *argstring) {
+                     const char *argstring)
+{
     char *reply_file;
     FILE *reply_fp = NULL;
     char *convert, *type_p, *subtype_p;
     char *reply_file;
     FILE *reply_fp = NULL;
     char *convert, *type_p, *subtype_p;
@@ -2339,7 +2343,8 @@ expand_pseudoheader (CT ct, CT *text_plain_ct, struct multipart *m,
 
 /* Extract any Content-Type header from beginning of convert output. */
 int
 
 /* Extract any Content-Type header from beginning of convert output. */
 int
-extract_headers (CT ct, char *reply_file, FILE **reply_fp) {
+extract_headers (CT ct, char *reply_file, FILE **reply_fp)
+{
     char *buffer = NULL, *cp, *end_of_header;
     bool found_header = false;
     struct stat statbuf;
     char *buffer = NULL, *cp, *end_of_header;
     bool found_header = false;
     struct stat statbuf;
index 25116206e92f6fda792915ce2af05858e28c2db3..1067f01bf7cdbd15dce6170a8dd0eee02edfab3d 100644 (file)
@@ -123,7 +123,8 @@ static void pipeser (int);
 
 
 int
 
 
 int
-main (int argc, char **argv) {
+main (int argc, char **argv)
+{
     int msgnum;
     char *cp, *file = NULL, *folder = NULL;
     char *maildir = NULL, buf[100], *outfile = NULL;
     int msgnum;
     char *cp, *file = NULL, *folder = NULL;
     char *maildir = NULL, buf[100], *outfile = NULL;
@@ -517,7 +518,8 @@ main (int argc, char **argv) {
  */
 static int
 mhfixmsgsbr (CT *ctp, char *maildir, const fix_transformations *fx,
  */
 static int
 mhfixmsgsbr (CT *ctp, char *maildir, const fix_transformations *fx,
-             FILE **infp, char *outfile, FILE **outfp) {
+             FILE **infp, char *outfile, FILE **outfp)
+{
     /* Store input filename in case one of the transformations, i.e.,
        fix_boundary(), rewrites to a tmp file. */
     char *input_filename = maildir
     /* Store input filename in case one of the transformations, i.e.,
        fix_boundary(), rewrites to a tmp file. */
     char *input_filename = maildir
@@ -624,7 +626,8 @@ mhfixmsgsbr (CT *ctp, char *maildir, const fix_transformations *fx,
  */
 static int
 copy_input_to_output (const char *input_filename, FILE *infp,
  */
 static int
 copy_input_to_output (const char *input_filename, FILE *infp,
-                      const char *output_filename, FILE *outfp) {
+                      const char *output_filename, FILE *outfp)
+{
     int in = fileno (infp);
     int out = fileno (outfp);
     int status = OK;
     int in = fileno (infp);
     int out = fileno (outfp);
     int status = OK;
@@ -643,7 +646,8 @@ copy_input_to_output (const char *input_filename, FILE *infp,
  * Fix mismatched outer level boundary.
  */
 static int
  * Fix mismatched outer level boundary.
  */
 static int
-fix_boundary (CT *ct, int *message_mods) {
+fix_boundary (CT *ct, int *message_mods)
+{
     struct multipart *mp;
     int status = OK;
 
     struct multipart *mp;
     int status = OK;
 
@@ -719,7 +723,8 @@ fix_boundary (CT *ct, int *message_mods) {
  * Find boundary at end of multipart.
  */
 static int
  * Find boundary at end of multipart.
  */
 static int
-get_multipart_boundary (CT ct, char **part_boundary) {
+get_multipart_boundary (CT ct, char **part_boundary)
+{
     char buffer[NMH_BUFSIZ];
     char *end_boundary = NULL;
     off_t begin = (off_t) ct->c_end > (off_t) (ct->c_begin + sizeof buffer)
     char buffer[NMH_BUFSIZ];
     char *end_boundary = NULL;
     off_t begin = (off_t) ct->c_end > (off_t) (ct->c_begin + sizeof buffer)
@@ -806,7 +811,8 @@ get_multipart_boundary (CT ct, char **part_boundary) {
  * Open and copy ct->c_file to file, replacing the multipart boundary.
  */
 static int
  * Open and copy ct->c_file to file, replacing the multipart boundary.
  */
 static int
-replace_boundary (CT ct, char *file, char *boundary) {
+replace_boundary (CT ct, char *file, char *boundary)
+{
     FILE *fpin, *fpout;
     int compnum, state;
     char buf[NMH_BUFSIZ], name[NAMESZ];
     FILE *fpin, *fpout;
     int compnum, state;
     char buf[NMH_BUFSIZ], name[NAMESZ];
@@ -913,7 +919,8 @@ replace_boundary (CT ct, char *file, char *boundary) {
  * Fix Content-Type header to reflect the content of its part.
  */
 static int
  * Fix Content-Type header to reflect the content of its part.
  */
 static int
-fix_types (CT ct, svector_t fixtypes, int *message_mods) {
+fix_types (CT ct, svector_t fixtypes, int *message_mods)
+{
     int status = OK;
 
     switch (ct->c_type) {
     int status = OK;
 
     switch (ct->c_type) {
@@ -1027,7 +1034,8 @@ fix_types (CT ct, svector_t fixtypes, int *message_mods) {
  * Replace a substring, allocating space to hold the new one.
  */
 char *
  * Replace a substring, allocating space to hold the new one.
  */
 char *
-replace_substring (char **str, const char *old, const char *new) {
+replace_substring (char **str, const char *old, const char *new)
+{
     char *cp;
 
     if ((cp = strstr (*str, old))) {
     char *cp;
 
     if ((cp = strstr (*str, old))) {
@@ -1056,7 +1064,8 @@ replace_substring (char **str, const char *old, const char *new) {
  * Remove a name=value parameter, given just its name, from a header value.
  */
 char *
  * Remove a name=value parameter, given just its name, from a header value.
  */
 char *
-remove_parameter (char *str, const char *name) {
+remove_parameter (char *str, const char *name)
+{
     /* It looks to me, based on the BNF in RFC 2045, than there can't
        be whitespace between the parameter name and the "=", or
        between the "=" and the parameter value. */
     /* It looks to me, based on the BNF in RFC 2045, than there can't
        be whitespace between the parameter name and the "=", or
        between the "=" and the parameter value. */
@@ -1105,7 +1114,8 @@ remove_parameter (char *str, const char *name) {
  * 8 bit.
  */
 static int
  * 8 bit.
  */
 static int
-fix_composite_cte (CT ct, int *message_mods) {
+fix_composite_cte (CT ct, int *message_mods)
+{
     int status = OK;
 
     if (ct->c_type == CT_MESSAGE  ||  ct->c_type == CT_MULTIPART) {
     int status = OK;
 
     if (ct->c_type == CT_MESSAGE  ||  ct->c_type == CT_MULTIPART) {
@@ -1177,7 +1187,8 @@ fix_composite_cte (CT ct, int *message_mods) {
  * Set content encoding.
  */
 static int
  * Set content encoding.
  */
 static int
-set_ce (CT ct, int encoding) {
+set_ce (CT ct, int encoding)
+{
     const char *ce = ce_str (encoding);
     const struct str2init *ctinit = get_ce_method (ce);
 
     const char *ce = ce_str (encoding);
     const struct str2init *ctinit = get_ce_method (ce);
 
@@ -1234,7 +1245,8 @@ set_ce (CT ct, int encoding) {
  * Make sure each text part has a corresponding text/plain part.
  */
 static int
  * Make sure each text part has a corresponding text/plain part.
  */
 static int
-ensure_text_plain (CT *ct, CT parent, int *message_mods, int replacetextplain) {
+ensure_text_plain (CT *ct, CT parent, int *message_mods, int replacetextplain)
+{
     int status = OK;
 
     switch ((*ct)->c_type) {
     int status = OK;
 
     switch ((*ct)->c_type) {
@@ -1395,7 +1407,8 @@ ensure_text_plain (CT *ct, CT parent, int *message_mods, int replacetextplain) {
  */
 static int
 find_textplain_sibling (CT parent, int replacetextplain,
  */
 static int
 find_textplain_sibling (CT parent, int replacetextplain,
-                        int *new_subpart_number) {
+                        int *new_subpart_number)
+{
     struct multipart *mp = (struct multipart *) parent->c_ctparams;
     struct part *part, *prev;
     bool has_text_plain = false;
     struct multipart *mp = (struct multipart *) parent->c_ctparams;
     struct part *part, *prev;
     bool has_text_plain = false;
@@ -1436,7 +1449,8 @@ find_textplain_sibling (CT parent, int replacetextplain,
  * Insert a new text/plain part.
  */
 static int
  * Insert a new text/plain part.
  */
 static int
-insert_new_text_plain_part (CT ct, int new_subpart_number, CT parent) {
+insert_new_text_plain_part (CT ct, int new_subpart_number, CT parent)
+{
     struct multipart *mp = (struct multipart *) parent->c_ctparams;
     struct part *new_part;
 
     struct multipart *mp = (struct multipart *) parent->c_ctparams;
     struct part *new_part;
 
@@ -1465,7 +1479,8 @@ insert_new_text_plain_part (CT ct, int new_subpart_number, CT parent) {
  * Create a text/plain part to go along with non-plain sibling part.
  */
 static CT
  * Create a text/plain part to go along with non-plain sibling part.
  */
 static CT
-build_text_plain_part (CT encoded_part) {
+build_text_plain_part (CT encoded_part)
+{
     CT tp_part = divide_part (encoded_part);
     char *tmp_plain_file = NULL;
 
     CT tp_part = divide_part (encoded_part);
     char *tmp_plain_file = NULL;
 
@@ -1503,7 +1518,8 @@ build_text_plain_part (CT encoded_part) {
  * Slip new text/plain part into a new multipart/alternative.
  */
 static int
  * Slip new text/plain part into a new multipart/alternative.
  */
 static int
-insert_into_new_mp_alt (CT *ct, int *message_mods) {
+insert_into_new_mp_alt (CT *ct, int *message_mods)
+{
     CT tp_part = build_text_plain_part (*ct);
     int status = OK;
 
     CT tp_part = build_text_plain_part (*ct);
     int status = OK;
 
@@ -1543,7 +1559,8 @@ insert_into_new_mp_alt (CT *ct, int *message_mods) {
  * Clone a MIME part.
  */
 static CT
  * Clone a MIME part.
  */
 static CT
-divide_part (CT ct) {
+divide_part (CT ct)
+{
     CT new_part;
 
     NEW0(new_part);
     CT new_part;
 
     NEW0(new_part);
@@ -1573,7 +1590,8 @@ divide_part (CT ct) {
  * Copy the content info from one part to another.
  */
 static void
  * Copy the content info from one part to another.
  */
 static void
-copy_ctinfo (CI dest, CI src) {
+copy_ctinfo (CI dest, CI src)
+{
     PM s_pm, d_pm;
 
     dest->ci_type = src->ci_type ? mh_xstrdup (src->ci_type) : NULL;
     PM s_pm, d_pm;
 
     dest->ci_type = src->ci_type ? mh_xstrdup (src->ci_type) : NULL;
@@ -1599,7 +1617,8 @@ copy_ctinfo (CI dest, CI src) {
  * Decode content.
  */
 static int
  * Decode content.
  */
 static int
-decode_part (CT ct) {
+decode_part (CT ct)
+{
     char *tmp_decoded;
     int status;
     FILE *file;
     char *tmp_decoded;
     int status;
     FILE *file;
@@ -1629,7 +1648,8 @@ decode_part (CT ct) {
  * be in the future for other than text types.
  */
 static int
  * be in the future for other than text types.
  */
 static int
-reformat_part (CT ct, char *file, char *type, char *subtype, int c_type) {
+reformat_part (CT ct, char *file, char *type, char *subtype, int c_type)
+{
     int output_subtype, output_encoding;
     const char *reason = NULL;
     char *cp, *cf;
     int output_subtype, output_encoding;
     const char *reason = NULL;
     char *cp, *cf;
@@ -1695,7 +1715,8 @@ reformat_part (CT ct, char *file, char *type, char *subtype, int c_type) {
  * Fill in a multipart/alternative part.
  */
 static CT
  * Fill in a multipart/alternative part.
  */
 static CT
-build_multipart_alt (CT first_alt, CT new_part, int type, int subtype) {
+build_multipart_alt (CT first_alt, CT new_part, int type, int subtype)
+{
     char *boundary_prefix = "----=_nmh-multipart";
     char *boundary = concat (boundary_prefix, first_alt->c_partno, NULL);
     char *boundary_indicator = "; boundary=";
     char *boundary_prefix = "----=_nmh-multipart";
     char *boundary = concat (boundary_prefix, first_alt->c_partno, NULL);
     char *boundary_indicator = "; boundary=";
@@ -1831,7 +1852,8 @@ return_null:
  * Check that the boundary does not appear in the content.
  */
 static int
  * Check that the boundary does not appear in the content.
  */
 static int
-boundary_in_content (FILE **fp, char *file, const char *boundary) {
+boundary_in_content (FILE **fp, char *file, const char *boundary)
+{
     char buffer[NMH_BUFSIZ];
     size_t bytes_read;
     bool found_boundary = false;
     char buffer[NMH_BUFSIZ];
     size_t bytes_read;
     bool found_boundary = false;
@@ -1858,7 +1880,8 @@ boundary_in_content (FILE **fp, char *file, const char *boundary) {
  * Remove all non-Content headers.
  */
 static void
  * Remove all non-Content headers.
  */
 static void
-transfer_noncontent_headers (CT old, CT new) {
+transfer_noncontent_headers (CT old, CT new)
+{
     HF hp, hp_prev;
 
     hp_prev = hp = old->c_first_hf;
     HF hp, hp_prev;
 
     hp_prev = hp = old->c_first_hf;
@@ -1902,7 +1925,8 @@ transfer_noncontent_headers (CT old, CT new) {
  * Set content type.
  */
 static int
  * Set content type.
  */
 static int
-set_ct_type (CT ct, int type, int subtype, int encoding) {
+set_ct_type (CT ct, int type, int subtype, int encoding)
+{
     char *typename = ct_type_str (type);
     char *subtypename = ct_subtype_str (type, subtype);
     /* E.g, " text/plain" */
     char *typename = ct_type_str (type);
     char *subtypename = ct_subtype_str (type, subtype);
     /* E.g, " text/plain" */
@@ -1963,7 +1987,8 @@ set_ct_type (CT ct, int type, int subtype, int encoding) {
  */
 static int
 decode_text_parts (CT ct, int encoding, const char *decodetypes,
  */
 static int
 decode_text_parts (CT ct, int encoding, const char *decodetypes,
-                   int *message_mods) {
+                   int *message_mods)
+{
     int status = OK;
     int lf_line_endings = 0;
 
     int status = OK;
     int lf_line_endings = 0;
 
@@ -2083,7 +2108,8 @@ decode_text_parts (CT ct, int encoding, const char *decodetypes,
  * decodetypes (which came from the -decodetypes switch).
  */
 static int
  * decodetypes (which came from the -decodetypes switch).
  */
 static int
-should_decode(const char *decodetypes, const char *type, const char *subtype) {
+should_decode(const char *decodetypes, const char *type, const char *subtype)
+{
     /* Quick search for matching type[/subtype] in decodetypes:  bracket
        decodetypes with commas, then search for ,type, and ,type/subtype, in
        it. */
     /* Quick search for matching type[/subtype] in decodetypes:  bracket
        decodetypes with commas, then search for ,type, and ,type/subtype, in
        it. */
@@ -2118,7 +2144,8 @@ should_decode(const char *decodetypes, const char *type, const char *subtype) {
  *  to a string explaining why.
  */
 static int
  *  to a string explaining why.
  */
 static int
-content_encoding (CT ct, const char **reason) {
+content_encoding (CT ct, const char **reason)
+{
     CE ce = &ct->c_cefile;
     int encoding = CE_7BIT;
 
     CE ce = &ct->c_cefile;
     int encoding = CE_7BIT;
 
@@ -2177,7 +2204,8 @@ content_encoding (CT ct, const char **reason) {
  * Strip carriage returns from content.
  */
 static int
  * Strip carriage returns from content.
  */
 static int
-strip_crs (CT ct, int *message_mods) {
+strip_crs (CT ct, int *message_mods)
+{
     char *charset = content_charset (ct);
     int status = OK;
 
     char *charset = content_charset (ct);
     int status = OK;
 
@@ -2331,7 +2359,8 @@ strip_crs (CT ct, int *message_mods) {
  * of the part C-T-E's.
  */
 static void
  * of the part C-T-E's.
  */
 static void
-update_cte (CT ct) {
+update_cte (CT ct)
+{
     const int least_restrictive_enc = least_restrictive_encoding (ct);
 
     if (least_restrictive_enc != CE_UNKNOWN  &&
     const int least_restrictive_enc = least_restrictive_encoding (ct);
 
     if (least_restrictive_enc != CE_UNKNOWN  &&
@@ -2360,7 +2389,8 @@ update_cte (CT ct) {
  * within a message.
  */
 static int
  * within a message.
  */
 static int
-least_restrictive_encoding (CT ct) {
+least_restrictive_encoding (CT ct)
+{
     int encoding = CE_UNKNOWN;
 
     switch (ct->c_type) {
     int encoding = CE_UNKNOWN;
 
     switch (ct->c_type) {
@@ -2408,7 +2438,8 @@ least_restrictive_encoding (CT ct) {
  *   CE_8BIT is less restrictive than CE_7BIT.
  */
 static int
  *   CE_8BIT is less restrictive than CE_7BIT.
  */
 static int
-less_restrictive (int encoding, int second_encoding) {
+less_restrictive (int encoding, int second_encoding)
+{
     switch (second_encoding) {
     case CE_BINARY:
         return encoding != CE_BINARY;
     switch (second_encoding) {
     case CE_BINARY:
         return encoding != CE_BINARY;
@@ -2427,7 +2458,8 @@ less_restrictive (int encoding, int second_encoding) {
  * Convert character set of each part.
  */
 static int
  * Convert character set of each part.
  */
 static int
-convert_charsets (CT ct, char *dest_charset, int *message_mods) {
+convert_charsets (CT ct, char *dest_charset, int *message_mods)
+{
     int status = OK;
 
     switch (ct->c_type) {
     int status = OK;
 
     switch (ct->c_type) {
@@ -2492,7 +2524,8 @@ convert_charsets (CT ct, char *dest_charset, int *message_mods) {
  *    headers, respectively.
  */
 static int
  *    headers, respectively.
  */
 static int
-fix_always (CT ct, int *message_mods) {
+fix_always (CT ct, int *message_mods)
+{
     int status = OK;
 
     switch (ct->c_type) {
     int status = OK;
 
     switch (ct->c_type) {
@@ -2574,7 +2607,8 @@ fix_always (CT ct, int *message_mods) {
  * Factor out common code for loops in fix_filename_encoding().
  */
 static int
  * Factor out common code for loops in fix_filename_encoding().
  */
 static int
-fix_filename_param (char *name, char *value, PM *first_pm, PM *last_pm) {
+fix_filename_param (char *name, char *value, PM *first_pm, PM *last_pm)
+{
     bool fixed = false;
 
     if (has_prefix(value, "=?") && has_suffix(value, "?=")) {
     bool fixed = false;
 
     if (has_prefix(value, "=?") && has_suffix(value, "?=")) {
@@ -2600,7 +2634,8 @@ fix_filename_param (char *name, char *value, PM *first_pm, PM *last_pm) {
  * headers, respectively.
  */
 static int
  * headers, respectively.
  */
 static int
-fix_filename_encoding (CT ct) {
+fix_filename_encoding (CT ct)
+{
     PM pm;
     HF hf;
     int fixed = 0;
     PM pm;
     HF hf;
     int fixed = 0;
@@ -2666,7 +2701,8 @@ fix_filename_encoding (CT ct) {
  */
 static int
 write_content (CT ct, const char *input_filename, char *outfile, FILE *outfp,
  */
 static int
 write_content (CT ct, const char *input_filename, char *outfile, FILE *outfp,
-               int modify_inplace, int message_mods) {
+               int modify_inplace, int message_mods)
+{
     int status = OK;
 
     if (modify_inplace) {
     int status = OK;
 
     if (modify_inplace) {
@@ -2743,7 +2779,8 @@ write_content (CT ct, const char *input_filename, char *outfile, FILE *outfp,
  * function to do it.  It touches the parts the decodetypes identifies.
  */
 static void
  * function to do it.  It touches the parts the decodetypes identifies.
  */
 static void
-set_text_ctparams(CT ct, char *decodetypes, int lf_line_endings) {
+set_text_ctparams(CT ct, char *decodetypes, int lf_line_endings)
+{
     switch (ct->c_type) {
     case CT_MULTIPART: {
         struct multipart *m = (struct multipart *) ct->c_ctparams;
     switch (ct->c_type) {
     case CT_MULTIPART: {
         struct multipart *m = (struct multipart *) ct->c_ctparams;
@@ -2779,7 +2816,8 @@ set_text_ctparams(CT ct, char *decodetypes, int lf_line_endings) {
  * use the standard MH backup file.
  */
 static int
  * use the standard MH backup file.
  */
 static int
-remove_file (const char *file) {
+remove_file (const char *file)
+{
     if (rmmproc) {
         char *rmm_command = concat (rmmproc, " ", file, NULL);
         int status = system (rmm_command);
     if (rmmproc) {
         char *rmm_command = concat (rmmproc, " ", file, NULL);
         int status = system (rmm_command);
@@ -2798,7 +2836,8 @@ remove_file (const char *file) {
  * Output formatted message to user.
  */
 static void
  * Output formatted message to user.
  */
 static void
-report (char *what, char *partno, char *filename, char *message, ...) {
+report (char *what, char *partno, char *filename, char *message, ...)
+{
     va_list args;
     char *fmt;
 
     va_list args;
     char *fmt;
 
index a25b08bf854ba9acc29c9c04afbddda6062ef899..561935bfa4380557fc41d9f382345586672d794c 100644 (file)
@@ -60,7 +60,8 @@ vevent vevents = { NULL, NULL, NULL};
 int parser_status = 0;
 
 int
 int parser_status = 0;
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
     /* RFC 5322 Â§ 3.3 date-time format, including the optional
        day-of-week and not including the optional seconds.  The
        zone is required by the RFC but not always output by this
     /* RFC 5322 Â§ 3.3 date-time format, including the optional
        day-of-week and not including the optional seconds.  The
        zone is required by the RFC but not always output by this
@@ -257,7 +258,8 @@ main (int argc, char *argv[]) {
  * - Excise VALARM sections.
  */
 static void
  * - Excise VALARM sections.
  */
 static void
-convert_to_reply (contentline *clines, act action) {
+convert_to_reply (contentline *clines, act action)
+{
     char *partstat = NULL;
     bool found_my_attendee_line = false;
     contentline *node;
     char *partstat = NULL;
     bool found_my_attendee_line = false;
     contentline *node;
@@ -363,7 +365,8 @@ convert_to_reply (contentline *clines, act action) {
  * - Excise VALARM sections.
  */
 static void
  * - Excise VALARM sections.
  */
 static void
-convert_to_cancellation (contentline *clines) {
+convert_to_cancellation (contentline *clines)
+{
     contentline *node;
 
     convert_common (clines, ACT_CANCEL);
     contentline *node;
 
     convert_common (clines, ACT_CANCEL);
@@ -385,7 +388,8 @@ convert_to_cancellation (contentline *clines) {
 }
 
 static void
 }
 
 static void
-convert_common (contentline *clines, act action) {
+convert_common (contentline *clines, act action)
+{
     contentline *node;
     bool in_valarm;
 
     contentline *node;
     bool in_valarm;
 
@@ -496,7 +500,8 @@ convert_common (contentline *clines, act action) {
 
 /* Echo the input, but with unfolded lines. */
 static void
 
 /* Echo the input, but with unfolded lines. */
 static void
-dump_unfolded (FILE *file, contentline *clines) {
+dump_unfolded (FILE *file, contentline *clines)
+{
     contentline *node;
 
     for (node = clines; node; node = node->next) {
     contentline *node;
 
     for (node = clines; node; node = node->next) {
@@ -505,7 +510,8 @@ dump_unfolded (FILE *file, contentline *clines) {
 }
 
 static void
 }
 
 static void
-output (FILE *file, contentline *clines, int contenttype) {
+output (FILE *file, contentline *clines, int contenttype)
+{
     contentline *node;
 
     if (contenttype) {
     contentline *node;
 
     if (contenttype) {
@@ -558,7 +564,8 @@ output (FILE *file, contentline *clines, int contenttype) {
  *   - attendees (limited to number specified in initialization)
  */
 static void
  *   - attendees (limited to number specified in initialization)
  */
 static void
-display (FILE *file, contentline *clines, char *nfs) {
+display (FILE *file, contentline *clines, char *nfs)
+{
     tzdesc_t timezones = load_timezones (clines);
     bool in_vtimezone;
     bool in_valarm;
     tzdesc_t timezones = load_timezones (clines);
     bool in_vtimezone;
     bool in_valarm;
@@ -727,7 +734,8 @@ display (FILE *file, contentline *clines, char *nfs) {
 }
 
 static const char *
 }
 
 static const char *
-identity (const contentline *node) {
+identity (const contentline *node)
+{
     /* According to RFC 5545 Â§ 3.3.3, an email address in the value
        must be a mailto URI. */
     if (! strncasecmp (node->value, "mailto:", 7)) {
     /* According to RFC 5545 Â§ 3.3.3, an email address in the value
        must be a mailto URI. */
     if (! strncasecmp (node->value, "mailto:", 7)) {
@@ -757,7 +765,8 @@ identity (const contentline *node) {
 }
 
 static char *
 }
 
 static char *
-format_params (char *line, param_list *p) {
+format_params (char *line, param_list *p)
+{
     for ( ; p && p->param_name; p = p->next) {
         value_list *v;
         size_t num_values = 0;
     for ( ; p && p->param_name; p = p->next) {
         value_list *v;
         size_t num_values = 0;
@@ -790,7 +799,8 @@ format_params (char *line, param_list *p) {
 }
 
 static char *
 }
 
 static char *
-fold (char *line, int uses_cr) {
+fold (char *line, int uses_cr)
+{
     size_t remaining = strlen (line);
     size_t current_line_len = 0;
     charstring_t folded_line = charstring_create (2 * remaining);
     size_t remaining = strlen (line);
     size_t current_line_len = 0;
     charstring_t folded_line = charstring_create (2 * remaining);
index 4a5f80555ea5504421670dfe644917c4044fa354..4efe1a317e9927a89e505e9cce1bf8fa6d6dc234 100644 (file)
@@ -1377,7 +1377,8 @@ prefer_parts(CT ct)
    example, a text/plain part before a text/html part in a
    multipart/alternative part, for example, where it belongs. */
 void
    example, a text/plain part before a text/html part in a
    multipart/alternative part, for example, where it belongs. */
 void
-reverse_alternative_parts (CT ct) {
+reverse_alternative_parts (CT ct)
+{
     if (ct->c_type == CT_MULTIPART) {
         struct multipart *m = (struct multipart *) ct->c_ctparams;
         struct part *part;
     if (ct->c_type == CT_MULTIPART) {
         struct multipart *m = (struct multipart *) ct->c_ctparams;
         struct part *part;
@@ -3046,7 +3047,8 @@ get_leftover_mp_content (CT ct, int before /* or after */)
 
 
 char *
 
 
 char *
-ct_type_str (int type) {
+ct_type_str (int type)
+{
     switch (type) {
     case CT_APPLICATION:
         return "application";
     switch (type) {
     case CT_APPLICATION:
         return "application";
@@ -3071,7 +3073,8 @@ ct_type_str (int type) {
 
 
 char *
 
 
 char *
-ct_subtype_str (int type, int subtype) {
+ct_subtype_str (int type, int subtype)
+{
     switch (type) {
     case CT_APPLICATION:
         switch (subtype) {
     switch (type) {
     case CT_APPLICATION:
         switch (subtype) {
@@ -3126,7 +3129,8 @@ ct_subtype_str (int type, int subtype) {
 
 
 int
 
 
 int
-ct_str_type (const char *type) {
+ct_str_type (const char *type)
+{
     struct str2init *s2i;
 
     for (s2i = str2cts; s2i->si_key; ++s2i) {
     struct str2init *s2i;
 
     for (s2i = str2cts; s2i->si_key; ++s2i) {
@@ -3143,7 +3147,8 @@ ct_str_type (const char *type) {
 
 
 int
 
 
 int
-ct_str_subtype (int type, const char *subtype) {
+ct_str_subtype (int type, const char *subtype)
+{
     struct k2v *kv;
 
     switch (type) {
     struct k2v *kv;
 
     switch (type) {
@@ -3183,7 +3188,8 @@ ct_str_subtype (int type, const char *subtype) {
 
 /* Find the content type and InitFunc for the CT. */
 const struct str2init *
 
 /* Find the content type and InitFunc for the CT. */
 const struct str2init *
-get_ct_init (int type) {
+get_ct_init (int type)
+{
     const struct str2init *sp;
 
     for (sp = str2cts; sp->si_key; ++sp) {
     const struct str2init *sp;
 
     for (sp = str2cts; sp->si_key; ++sp) {
@@ -3196,7 +3202,8 @@ get_ct_init (int type) {
 }
 
 const char *
 }
 
 const char *
-ce_str (int encoding) {
+ce_str (int encoding)
+{
     switch (encoding) {
     case CE_BASE64:
         return "base64";
     switch (encoding) {
     case CE_BASE64:
         return "base64";
@@ -3219,7 +3226,8 @@ ce_str (int encoding) {
 
 /* Find the content type and InitFunc for the content encoding method. */
 const struct str2init *
 
 /* Find the content type and InitFunc for the content encoding method. */
 const struct str2init *
-get_ce_method (const char *method) {
+get_ce_method (const char *method)
+{
     struct str2init *sp;
 
     for (sp = str2ces; sp->si_key; ++sp) {
     struct str2init *sp;
 
     for (sp = str2ces; sp->si_key; ++sp) {
@@ -3641,7 +3649,8 @@ bad_quote:
  */
 
 char *
  */
 
 char *
-content_charset (CT ct) {
+content_charset (CT ct)
+{
     char *ret_charset = NULL;
 
     ret_charset = get_param(ct->c_ctinfo.ci_first_pm, "charset", '?', 0);
     char *ret_charset = NULL;
 
     ret_charset = get_param(ct->c_ctinfo.ci_first_pm, "charset", '?', 0);
index bbad9f08df6d0145f2d300555c0a0760ed604dcc..2a754a411170c1d7694a8c3697954496010d4cf8 100644 (file)
@@ -791,7 +791,8 @@ show_external (CT ct, int alternate, int concatsw, int textonly, int inlineonly,
 static int
 parse_display_string (CT ct, char *cp, int *xstdin, int *xlist,
                       char *file, char *buffer, size_t buflen,
 static int
 parse_display_string (CT ct, char *cp, int *xstdin, int *xlist,
                       char *file, char *buffer, size_t buflen,
-                      int multipart) {
+                      int multipart)
+{
     int len;
     bool quoted = false;
     char *bp = buffer, *pp;
     int len;
     bool quoted = false;
     char *bp = buffer, *pp;
@@ -1056,7 +1057,8 @@ raw:
 
 
 int
 
 
 int
-convert_charset (CT ct, char *dest_charset, int *message_mods) {
+convert_charset (CT ct, char *dest_charset, int *message_mods)
+{
     char *src_charset = content_charset (ct);
     int status = OK;
 
     char *src_charset = content_charset (ct);
     int status = OK;
 
@@ -1252,7 +1254,8 @@ iconv_start:
 
 
 static int
 
 
 static int
-convert_content_charset (CT ct, char **file) {
+convert_content_charset (CT ct, char **file)
+{
     int status = OK;
 
 #ifdef HAVE_ICONV
     int status = OK;
 
 #ifdef HAVE_ICONV
index 2b9448437182c88635fdc1339868e6d755615bae..6bf9790069b64d707028a733e5d484ebe7f7d690 100644 (file)
@@ -46,7 +46,8 @@ struct mhstoreinfo {
 static bool use_param_as_filename(const char *p);
 
 mhstoreinfo_t
 static bool use_param_as_filename(const char *p);
 
 mhstoreinfo_t
-mhstoreinfo_create (CT *ct, char *pwd, const char *csw, int asw, int vsw) {
+mhstoreinfo_create (CT *ct, char *pwd, const char *csw, int asw, int vsw)
+{
     mhstoreinfo_t info;
 
     NEW(info);
     mhstoreinfo_t info;
 
     NEW(info);
@@ -62,14 +63,16 @@ mhstoreinfo_create (CT *ct, char *pwd, const char *csw, int asw, int vsw) {
 }
 
 void
 }
 
 void
-mhstoreinfo_free (mhstoreinfo_t info) {
+mhstoreinfo_free (mhstoreinfo_t info)
+{
     free (info->cwd);
     free (info->dir);
     free (info);
 }
 
 int
     free (info->cwd);
     free (info->dir);
     free (info);
 }
 
 int
-mhstoreinfo_files_not_clobbered (const mhstoreinfo_t info) {
+mhstoreinfo_files_not_clobbered (const mhstoreinfo_t info)
+{
     return info->files_not_clobbered;
 }
 
     return info->files_not_clobbered;
 }
 
@@ -1126,7 +1129,8 @@ copy_some_headers (FILE *out, CT ct)
 
 static
 enum clobber_policy_t
 
 static
 enum clobber_policy_t
-clobber_policy (const char *value) {
+clobber_policy (const char *value)
+{
   if (value == NULL  ||  ! strcasecmp (value, "always")) {
     return NMH_CLOBBER_ALWAYS;
   }
   if (value == NULL  ||  ! strcasecmp (value, "always")) {
     return NMH_CLOBBER_ALWAYS;
   }
@@ -1148,7 +1152,8 @@ clobber_policy (const char *value) {
 
 
 static char *
 
 
 static char *
-next_version (char *file, enum clobber_policy_t clobber_policy) {
+next_version (char *file, enum clobber_policy_t clobber_policy)
+{
   const size_t max_versions = 1000000;
   /* 8 = log max_versions  +  one for - or .  +  one for null terminator */
   const size_t buflen = strlen (file) + 8;
   const size_t max_versions = 1000000;
   /* 8 = log max_versions  +  one for - or .  +  one for null terminator */
   const size_t buflen = strlen (file) + 8;
@@ -1209,7 +1214,8 @@ next_version (char *file, enum clobber_policy_t clobber_policy) {
 
 
 static char *
 
 
 static char *
-clobber_check (char *original_file, mhstoreinfo_t info) {
+clobber_check (char *original_file, mhstoreinfo_t info)
+{
   /* clobber policy        return value
    * --------------        ------------
    *   -always             original_file
   /* clobber policy        return value
    * --------------        ------------
    *   -always             original_file
index f066c5364524025ad0fc897d4590d7403265fc55..906d21ea6dc5538206b9f8ef001458e83a97627a 100644 (file)
@@ -34,7 +34,8 @@ static void process_args(int, char **, const char **, const char **, const char
  */
 
 int
  */
 
 int
-main(int argc, char *argv[]) {
+main(int argc, char *argv[])
+{
     const char *directory = "", *prefix = "", *suffix = "";
     size_t suffix_len;
     int fd;
     const char *directory = "", *prefix = "", *suffix = "";
     size_t suffix_len;
     int fd;
@@ -67,7 +68,8 @@ main(int argc, char *argv[]) {
 
 
 static char *
 
 
 static char *
-build_template(const char *directory, const char *prefix, const char *suffix) {
+build_template(const char *directory, const char *prefix, const char *suffix)
+{
     const char pattern[] = "XXXXXX";
     size_t len, directory_len, pathsep_len, prefix_len, suffix_len;
     char *template;
     const char pattern[] = "XXXXXX";
     size_t len, directory_len, pathsep_len, prefix_len, suffix_len;
     char *template;
@@ -146,7 +148,8 @@ DEFINE_SWITCH_ARRAY(MHFIXMSG, switches);
 
 static void
 process_args(int argc, char **argv, const char **directory,
 
 static void
 process_args(int argc, char **argv, const char **directory,
-             const char **prefix, const char **suffix) {
+             const char **prefix, const char **suffix)
+{
     char **argp, **arguments, *cp, buf[100];
 #   if ! HAVE_MKSTEMPS
     NMH_UNUSED(suffix);
     char **argp, **arguments, *cp, buf[100];
 #   if ! HAVE_MKSTEMPS
     NMH_UNUSED(suffix);
@@ -210,7 +213,8 @@ process_args(int argc, char **argv, const char **directory,
 #else  /* ! NMH */
 static void
 process_args(int argc, char **argv, const char **directory,
 #else  /* ! NMH */
 static void
 process_args(int argc, char **argv, const char **directory,
-             const char **prefix, const char **suffix) {
+             const char **prefix, const char **suffix)
+{
 #   if HAVE_MKSTEMPS
     const char usage[] =
         "usage: %s [-h] [-d directory] [-p prefix] [-s suffix]\n";
 #   if HAVE_MKSTEMPS
     const char usage[] =
         "usage: %s [-h] [-d directory] [-p prefix] [-s suffix]\n";
index 71ea481837e15931c994c13c768daae26773e098..ffb548440e8b5d543a3240233cac662e4e3dfa24 100644 (file)
@@ -510,7 +510,8 @@ docc (char *cp, int ccflag)
  */
 static void
 add_convert_header (const char *convert_type, char *convert_arg,
  */
 static void
 add_convert_header (const char *convert_type, char *convert_arg,
-                    char *filename, char *drft) {
+                    char *filename, char *drft)
+{
     char *field_name;
 
     field_name = concat (MHBUILD_FILE_PSEUDOHEADER, convert_type, NULL);
     char *field_name;
 
     field_name = concat (MHBUILD_FILE_PSEUDOHEADER, convert_type, NULL);
index 4a45392567db63167960ed2120a296d0ab130c1a..3fa67d204e7de6c51eb1c70f42599b7707ed45e2 100644 (file)
@@ -486,7 +486,8 @@ replfilter (FILE *in, FILE *out, char *filter, int fmtproc)
 
 static
 char *
 
 static
 char *
-fix_addresses (char *str) {
+fix_addresses (char *str)
+{
     char *fixed_str = NULL;
     bool fixed_address = false;
 
     char *fixed_str = NULL;
     bool fixed_address = false;
 
index 116469815abd6f2e8848cef1aa49ddd7828bee4e..a4508c02ab742d1be11a36e5cbb1171e89c9515a 100644 (file)
@@ -354,11 +354,13 @@ finished:
 
 /* The following two functions allow access to the global gstate above. */
 void
 
 /* The following two functions allow access to the global gstate above. */
 void
-scan_finished(void) {
+scan_finished(void)
+{
     m_getfld_state_destroy (&gstate);
 }
 
 void
     m_getfld_state_destroy (&gstate);
 }
 
 void
-scan_detect_mbox_style (FILE *f) {
+scan_detect_mbox_style (FILE *f)
+{
     m_unknown (&gstate, f);
 }
     m_unknown (&gstate, f);
 }
index 8d6dd616765ce822f2e7f484eb8e421fc5ba1ddf..5a841b0ac02ae1f653fb39bc7ed2c91bef0c3909 100644 (file)
@@ -740,7 +740,8 @@ oops:
 
 static
 void
 
 static
 void
-handle_sendfrom(char **vec, int *vecp, char *draft, const char *auth_svc) {
+handle_sendfrom(char **vec, int *vecp, char *draft, const char *auth_svc)
+{
     const char *addr, *host;
     const char *message;
 
     const char *addr, *host;
     const char *message;
 
@@ -783,7 +784,8 @@ handle_sendfrom(char **vec, int *vecp, char *draft, const char *auth_svc) {
  */
 static int
 setup_oauth_params(char *vec[], int *vecp, const char *auth_svc,
  */
 static int
 setup_oauth_params(char *vec[], int *vecp, const char *auth_svc,
-                  const char **message) {
+                  const char **message)
+{
     const char *saslmech = NULL, *user = NULL;
     mh_oauth_service_info svc;
     char errbuf[256];
     const char *saslmech = NULL, *user = NULL;
     mh_oauth_service_info svc;
     char errbuf[256];
@@ -848,7 +850,8 @@ setup_oauth_params(char *vec[], int *vecp, const char *auth_svc,
  */
 static
 int
  */
 static
 int
-get_from_header_info(const char *filename, const char **addr, const char **host, const char **message) {
+get_from_header_info(const char *filename, const char **addr, const char **host, const char **message)
+{
     struct stat st;
     FILE *in;
 
     struct stat st;
     FILE *in;
 
@@ -902,7 +905,8 @@ get_from_header_info(const char *filename, const char **addr, const char **host,
  */
 static
 const char *
  */
 static
 const char *
-get_message_header_info(FILE *in, char *format) {
+get_message_header_info(FILE *in, char *format)
+{
     int dat[5];
     struct format *fmt;
     struct stat st;
     int dat[5];
     struct format *fmt;
     struct stat st;
@@ -980,7 +984,8 @@ get_message_header_info(FILE *in, char *format) {
  */
 static
 void
  */
 static
 void
-merge_profile_entry(const char *addr, const char *host, char *vec[], int *vecp) {
+merge_profile_entry(const char *addr, const char *host, char *vec[], int *vecp)
+{
     char *addr_entry = concat("sendfrom-", addr, NULL);
     char *profile_entry = context_find(addr_entry);
 
     char *addr_entry = concat("sendfrom-", addr, NULL);
     char *profile_entry = context_find(addr_entry);