<commit_before>
/*
 * mhbuild.c -- expand/translate MIME composition files
 *
 * 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>
#include <h/md5.h>
#include <h/mts.h>
#include <h/tws.h>
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/mhcachesbr.h>
#include <h/utils.h>

#define MHBUILD_SWITCHES \
    X("auto", 0, AUTOSW) \
    X("noauto", 0, NAUTOSW) \
    X("check", 0, CHECKSW) \
    X("nocheck", 0, NCHECKSW) \
    X("directives", 0, DIRECTIVES) \
    X("nodirectives", 0, NDIRECTIVES) \
    X("headers", 0, HEADSW) \
    X("noheaders", 0, NHEADSW) \
    X("list", 0, LISTSW) \
    X("nolist", 0, NLISTSW) \
    X("realsize", 0, SIZESW) \
    X("norealsize", 0, NSIZESW) \
    X("rfc934mode", 0, RFC934SW) \
    X("norfc934mode", 0, NRFC934SW) \
    X("verbose", 0, VERBSW) \
    X("noverbose", 0, NVERBSW) \
    X("disposition", 0, DISPOSW) \
    X("nodisposition", 0, NDISPOSW) \
    X("rcache policy", 0, RCACHESW) \
    X("wcache policy", 0, WCACHESW) \
    X("contentid", 0, CONTENTIDSW) \
    X("nocontentid", 0, NCONTENTIDSW) \
    X("headerencoding encoding-algorithm", 0, HEADERENCSW) \
    X("autoheaderencoding", 0, AUTOHEADERENCSW) \
    X("maxunencoded", 0, MAXUNENCSW) \
    X("version", 0, VERSIONSW) \
    X("help", 0, HELPSW) \
    X("debug", -5, DEBUGSW) \
    X("dist", 0, DISTSW) \

#define X(sw, minchars, id) id,
DEFINE_SWITCH_ENUM(MHBUILD);
#undef X

#define X(sw, minchars, id) { sw, minchars, id },
DEFINE_SWITCH_ARRAY(MHBUILD, switches);
#undef X

/* utf-8 is for Email Address Internationalization, using SMTPUTF8. */
#define MIMEENCODING_SWITCHES \
    X("base64", 0, BASE64SW) \
    X("quoted-printable", 0, QUOTEDPRINTSW) \
    X("utf-8", 0, UTF8SW) \

#define X(sw, minchars, id) id,
DEFINE_SWITCH_ENUM(MIMEENCODING);
#undef X

#define X(sw, minchars, id) { sw, minchars, id },
DEFINE_SWITCH_ARRAY(MIMEENCODING, encodingswitches);
#undef X

/* mhcachesbr.c */
extern int rcachesw;
extern int wcachesw;
extern char *cache_public;
extern char *cache_private;

int debugsw = 0;

int listsw   = 0;
int rfc934sw = 0;
int contentidsw = 1;

/*
 * Temporary files
 */
static char infile[BUFSIZ];
static int unlink_infile  = 0;

static char outfile[BUFSIZ];
static int unlink_outfile = 0;

static void unlink_done (int) NORETURN;

/* mhbuildsbr.c */
int output_message (CT, char *);
int output_message_fp (CT, FILE *, char*);


int
main (int argc, char **argv)
{
    int sizesw = 1, headsw = 1, directives = 1, autobuild = 0, dist = 0;
    int verbosw = 0, dispo = 0;
    size_t maxunencoded = MAXTEXTPERLN;
    int *icachesw;
    char *cp, buf[BUFSIZ];
    char buffer[BUFSIZ], *compfile = NULL;
    char **argp, **arguments;
    CT ct, cts[2];
    FILE *fp = NULL;
    FILE *fp_out = NULL;<commit_msg>Removed unused declaration of output_message().<commit_after>
/*
 * mhbuild.c -- expand/translate MIME composition files
 *
 * 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>
#include <h/md5.h>
#include <h/mts.h>
#include <h/tws.h>
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/mhcachesbr.h>
#include <h/utils.h>

#define MHBUILD_SWITCHES \
    X("auto", 0, AUTOSW) \
    X("noauto", 0, NAUTOSW) \
    X("check", 0, CHECKSW) \
    X("nocheck", 0, NCHECKSW) \
    X("directives", 0, DIRECTIVES) \
    X("nodirectives", 0, NDIRECTIVES) \
    X("headers", 0, HEADSW) \
    X("noheaders", 0, NHEADSW) \
    X("list", 0, LISTSW) \
    X("nolist", 0, NLISTSW) \
    X("realsize", 0, SIZESW) \
    X("norealsize", 0, NSIZESW) \
    X("rfc934mode", 0, RFC934SW) \
    X("norfc934mode", 0, NRFC934SW) \
    X("verbose", 0, VERBSW) \
    X("noverbose", 0, NVERBSW) \
    X("disposition", 0, DISPOSW) \
    X("nodisposition", 0, NDISPOSW) \
    X("rcache policy", 0, RCACHESW) \
    X("wcache policy", 0, WCACHESW) \
    X("contentid", 0, CONTENTIDSW) \
    X("nocontentid", 0, NCONTENTIDSW) \
    X("headerencoding encoding-algorithm", 0, HEADERENCSW) \
    X("autoheaderencoding", 0, AUTOHEADERENCSW) \
    X("maxunencoded", 0, MAXUNENCSW) \
    X("version", 0, VERSIONSW) \
    X("help", 0, HELPSW) \
    X("debug", -5, DEBUGSW) \
    X("dist", 0, DISTSW) \

#define X(sw, minchars, id) id,
DEFINE_SWITCH_ENUM(MHBUILD);
#undef X

#define X(sw, minchars, id) { sw, minchars, id },
DEFINE_SWITCH_ARRAY(MHBUILD, switches);
#undef X

/* utf-8 is for Email Address Internationalization, using SMTPUTF8. */
#define MIMEENCODING_SWITCHES \
    X("base64", 0, BASE64SW) \
    X("quoted-printable", 0, QUOTEDPRINTSW) \
    X("utf-8", 0, UTF8SW) \

#define X(sw, minchars, id) id,
DEFINE_SWITCH_ENUM(MIMEENCODING);
#undef X

#define X(sw, minchars, id) { sw, minchars, id },
DEFINE_SWITCH_ARRAY(MIMEENCODING, encodingswitches);
#undef X

/* mhcachesbr.c */
extern int rcachesw;
extern int wcachesw;
extern char *cache_public;
extern char *cache_private;

int debugsw = 0;

int listsw   = 0;
int rfc934sw = 0;
int contentidsw = 1;

/*
 * Temporary files
 */
static char infile[BUFSIZ];
static int unlink_infile  = 0;

static char outfile[BUFSIZ];
static int unlink_outfile = 0;

static void unlink_done (int) NORETURN;

/* mhbuildsbr.c */
int output_message_fp (CT, FILE *, char*);


int
main (int argc, char **argv)
{
    int sizesw = 1, headsw = 1, directives = 1, autobuild = 0, dist = 0;
    int verbosw = 0, dispo = 0;
    size_t maxunencoded = MAXTEXTPERLN;
    int *icachesw;
    char *cp, buf[BUFSIZ];
    char buffer[BUFSIZ], *compfile = NULL;
    char **argp, **arguments;
    CT ct, cts[2];
    FILE *fp = NULL;
    FILE *fp_out = NULL;
{'fraction_non_alphanumeric': 0.15801276522339142, 'fraction_numerical': 0.0255304467828187, 'mean_word_length': 3.4772200772200774, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4687963', 'n_tokens_mistral': 2524, 'n_tokens_neox': 2355, 'n_words': 603}