]> diplodocus.org Git - nmh/blobdiff - uip/sendsbr.c
Corrected comment: whom(1) does not use context_foil().
[nmh] / uip / sendsbr.c
index 5a841b0ac02ae1f653fb39bc7ed2c91bef0c3909..be3b414f79e072c480a94bd0850e9666c6d0646b 100644 (file)
@@ -5,16 +5,36 @@
  * complete copyright information.
  */
 
-#include <h/mh.h>
-#include <h/fmt_scan.h>
-#include <h/fmt_compile.h>
-#include <h/signals.h>
+#include "h/mh.h"
+#include "sbr/fmt_new.h"
+#include "sendsbr.h"
+#include "distsbr.h"
+#include "annosbr.h"
+#include "sbr/m_name.h"
+#include "sbr/m_getfld.h"
+#include "sbr/concat.h"
+#include "sbr/cpydgst.h"
+#include "sbr/trimcpy.h"
+#include "sbr/uprf.h"
+#include "sbr/getcpy.h"
+#include "sbr/m_convert.h"
+#include "sbr/m_backup.h"
+#include "sbr/folder_read.h"
+#include "sbr/folder_free.h"
+#include "sbr/context_find.h"
+#include "sbr/brkstring.h"
+#include "sbr/pidstatus.h"
+#include "sbr/arglist.h"
+#include "sbr/error.h"
+#include "h/fmt_scan.h"
+#include "h/fmt_compile.h"
+#include "h/signals.h"
 #include <setjmp.h>
 #include <fcntl.h>
-#include <h/mime.h>
-#include <h/tws.h>
-#include <h/utils.h>
-#include <h/mts.h>
+#include "h/mime.h"
+#include "h/tws.h"
+#include "h/utils.h"
+#include "h/mts.h"
 
 #ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
@@ -22,7 +42,7 @@
 #include <time.h>
 
 #ifdef OAUTH_SUPPORT
-#include <h/oauth.h>
+#include "h/oauth.h"
 #endif
 #include "h/done.h"
 #include "sbr/m_maildir.h"
@@ -240,12 +260,8 @@ splitmsg (char **vec, int vecp, char *program, char *drft,
                     * of each message/partial in the collection.
                     */
                    if (!strcasecmp (name, "Subject")) {
-                       size_t sublen;
-
                        strncpy (subject, buffer, BUFSIZ);
-                       sublen = strlen (subject);
-                       if (sublen > 0 && subject[sublen - 1] == '\n')
-                           subject[sublen - 1] = '\0';
+                        trim_suffix_c(subject, '\n');
                    }
 
                    dp = add (concat (name, ":", buffer, NULL), dp);
@@ -738,8 +754,7 @@ oops:
 }
 
 
-static
-void
+static void
 handle_sendfrom(char **vec, int *vecp, char *draft, const char *auth_svc)
 {
     const char *addr, *host;
@@ -848,8 +863,7 @@ setup_oauth_params(char *vec[], int *vecp, const char *auth_svc,
 /*
  * Extract user and domain from From: header line in draft.
  */
-static
-int
+static int
 get_from_header_info(const char *filename, const char **addr, const char **host, const char **message)
 {
     struct stat st;
@@ -903,8 +917,7 @@ get_from_header_info(const char *filename, const char **addr, const char **host,
  * Get formatted information from header of a message.
  * Adapted from process_single_file() in uip/fmttest.c.
  */
-static
-const char *
+static const char *
 get_message_header_info(FILE *in, char *format)
 {
     int dat[5];
@@ -982,8 +995,7 @@ get_message_header_info(FILE *in, char *format)
  * If no -server passed in from profile or commandline, could use smtp.<svc>.com for gmail,
  * but that might not generalize for other svcs.
  */
-static
-void
+static void
 merge_profile_entry(const char *addr, const char *host, char *vec[], int *vecp)
 {
     char *addr_entry = concat("sendfrom-", addr, NULL);