]> diplodocus.org Git - nmh/blobdiff - uip/mhical.c
context_find.c: Move interface to own file.
[nmh] / uip / mhical.c
index a25b08bf854ba9acc29c9c04afbddda6062ef899..bb5a9eee39dfab58cf5acb4ecc9d149e687150f4 100644 (file)
@@ -6,9 +6,14 @@
  */
 
 #include "h/mh.h"
+#include "sbr/ambigsw.h"
+#include "sbr/path.h"
+#include "sbr/print_version.h"
+#include "sbr/print_help.h"
+#include "sbr/error.h"
 #include "h/icalendar.h"
 #include "sbr/icalparse.h"
-#include <h/fmt_scan.h>
+#include "h/fmt_scan.h"
 #include "h/addrsbr.h"
 #include "h/mts.h"
 #include "h/done.h"
@@ -60,7 +65,8 @@ vevent vevents = { NULL, NULL, NULL};
 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
@@ -257,7 +263,8 @@ main (int argc, char *argv[]) {
  * - 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;
@@ -363,7 +370,8 @@ convert_to_reply (contentline *clines, act action) {
  * - Excise VALARM sections.
  */
 static void
-convert_to_cancellation (contentline *clines) {
+convert_to_cancellation (contentline *clines)
+{
     contentline *node;
 
     convert_common (clines, ACT_CANCEL);
@@ -385,7 +393,8 @@ convert_to_cancellation (contentline *clines) {
 }
 
 static void
-convert_common (contentline *clines, act action) {
+convert_common (contentline *clines, act action)
+{
     contentline *node;
     bool in_valarm;
 
@@ -496,7 +505,8 @@ convert_common (contentline *clines, act action) {
 
 /* 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) {
@@ -505,7 +515,8 @@ dump_unfolded (FILE *file, contentline *clines) {
 }
 
 static void
-output (FILE *file, contentline *clines, int contenttype) {
+output (FILE *file, contentline *clines, int contenttype)
+{
     contentline *node;
 
     if (contenttype) {
@@ -558,7 +569,8 @@ output (FILE *file, contentline *clines, int contenttype) {
  *   - 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;
@@ -727,7 +739,8 @@ display (FILE *file, contentline *clines, char *nfs) {
 }
 
 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)) {
@@ -757,7 +770,8 @@ identity (const contentline *node) {
 }
 
 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;
@@ -790,7 +804,8 @@ format_params (char *line, param_list *p) {
 }
 
 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);