/*
- * mhlistsbr.c -- routines to list information about the
- * -- contents of MIME messages
- *
- * This code is Copyright (c) 2002, by the authors of nmh. See the
- * COPYRIGHT file in the root directory of the nmh distribution for
- * complete copyright information.
- */
+** mhlistsbr.c -- routines to list information about the
+** -- contents of MIME messages
+**
+** This code is Copyright (c) 2002, by the authors of nmh. See the
+** COPYRIGHT file in the root directory of the nmh distribution for
+** complete copyright information.
+*/
#include <h/mh.h>
#include <fcntl.h>
void flush_errors (void);
/*
- * prototypes
- */
+** prototypes
+*/
void list_all_messages (CT *, int, int, int, int);
int list_switch (CT, int, int, int, int);
int list_content (CT, int, int, int, int);
/*
- * static prototypes
- */
+** static prototypes
+*/
static void list_single_message (CT, int, int, int);
static int list_debug (CT);
static int list_multi (CT, int, int, int, int);
/*
- * various formats for -list option
- */
+** various formats for -list option
+*/
#define LSTFMT1 "%4s %-5s %-24s %5s %-36s\n"
#define LSTFMT2a "%4d "
#define LSTFMT2b "%-5s %-24.24s "
/*
- * Top level entry point to list group of messages
- */
+** Top level entry point to list group of messages
+*/
void
list_all_messages (CT *cts, int headers, int realsize, int verbose, int debug)
/*
- * Entry point to list a single message
- */
+** Entry point to list a single message
+*/
static void
list_single_message (CT ct, int realsize, int verbose, int debug)
/*
- * Primary switching routine to list information about a content
- */
+** Primary switching routine to list information about a content
+*/
int
list_switch (CT ct, int toplevel, int realsize, int verbose, int debug)
#define empty(s) ((s) ? (s) : "")
/*
- * Method for listing information about a simple/generic content
- */
+** Method for listing information about a simple/generic content
+*/
int
list_content (CT ct, int toplevel, int realsize, int verbose, int debug)
printf ("\n");
/*
- * If verbose, print any RFC-822 comments in the
- * Content-Type line.
- */
+ ** If verbose, print any RFC-822 comments in the
+ ** Content-Type line.
+ */
if (verbose && ci->ci_comment) {
char *dp;
/*
- * Print debugging information about a content
- */
+** Print debugging information about a content
+*/
static int
list_debug (CT ct)
/*
- * list content information for type "multipart"
- */
+** list content information for type "multipart"
+*/
static int
list_multi (CT ct, int toplevel, int realsize, int verbose, int debug)
/*
- * list content information for type "message/partial"
- */
+** list content information for type "message/partial"
+*/
static int
list_partial (CT ct, int toplevel, int realsize, int verbose, int debug)
list_content (ct, toplevel, realsize, verbose, debug);
if (verbose) {
- printf ("\t [message %s, part %d", p->pm_partid, p->pm_partno);
+ printf ("\t [message %s, part %d",
+ p->pm_partid, p->pm_partno);
if (p->pm_maxno)
printf (" of %d", p->pm_maxno);
printf ("]\n");
/*
- * list content information for type "message/external"
- */
+** list content information for type "message/external"
+*/
static int
list_external (CT ct, int toplevel, int realsize, int verbose, int debug)
}
/*
- * Now list the information for the external content
- * to which this content points.
- */
+ ** Now list the information for the external content
+ ** to which this content points.
+ */
list_content (e->eb_content, 0, realsize, verbose, debug);
return OK;
/*
- * list content information for type "application"
- */
+** list content information for type "application"
+*/
static int
list_application (CT ct, int toplevel, int realsize, int verbose, int debug)
/*
- * list information about the Content-Transfer-Encoding
- * used by a content.
- */
+** list information about the Content-Transfer-Encoding
+** used by a content.
+*/
static int
list_encoding (CT ct)