<commit_before>#define _GNU_SOURCE

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "../src/cmime_message.h"

void usage() {
    printf("\n");
    printf("libcmime - simple api demonstration\n");
    printf("-----------------------------------\n");
    printf("demonstrates: manual creation of new CMimeMessage_T mime message. Furthermore the message is manually extended by an attachment\n");
    printf("output: output is written to stdout if no output file is specified (-f /path/to/out_file.txt)\n");
    printf("\n");
}


int main(int argc, char *argv[]) {

    // addresses can either be specified "just as an address" or like "<NAME> <<EMAIL>>"
    char from[] = "<EMAIL>";
    char to[] = "<EMAIL>";
    char *file = NULL;
    char *out = NULL;
    char *msgid = NULL;
    char *attachment = NULL;
    int option;
    int retval = 0;

   // check command line parameters
    while((option = getopt(argc,argv,"hf:a:")) != EOF) {
        switch(option) {
            case 'f':
                asprintf(&file, "%s", optarg);
                break; 
            case 'a':
                asprintf(&attachment, "%s", optarg);
                break;
            case 'h':
                usage();
                break; 
            default:
                usage();
        }
    }

    if(attachment != NULL) {

        CMimeMessage_T *message = cmime_message_new();
        CMimePart_T *part = cmime_part_new();
        CMimeListElem_T *elem = NULL;
        CMimePart_T *prev = NULL;
        
        // set the sender of the message
        cmime_message_set_sender(message,from);

        // add an recipient, this can also be done with cmime_message_add_recipient_to
        cmime_message_add_recipient(message, to, CMIME_ADDRESS_TYPE_TO);

        // set subject
        cmime_message_set_subject(message, "This is an exmaple");
<commit_msg>Removed unused variables<commit_after>#define _GNU_SOURCE

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "../src/cmime_message.h"

void usage() {
    printf("\n");
    printf("libcmime - simple api demonstration\n");
    printf("-----------------------------------\n");
    printf("demonstrates: manual creation of new CMimeMessage_T mime message. Furthermore the message is manually extended by an attachment\n");
    printf("output: output is written to stdout if no output file is specified (-f /path/to/out_file.txt)\n");
    printf("\n");
}


int main(int argc, char *argv[]) {

    // addresses can either be specified "just as an address" or like "<NAME> <<EMAIL>>"
    char from[] = "<EMAIL>";
    char to[] = "<EMAIL>";
    char *file = NULL;
    char *out = NULL;
    char *msgid = NULL;
    char *attachment = NULL;
    int option;
    int retval = 0;

   // check command line parameters
    while((option = getopt(argc,argv,"hf:a:")) != EOF) {
        switch(option) {
            case 'f':
                asprintf(&file, "%s", optarg);
                break; 
            case 'a':
                asprintf(&attachment, "%s", optarg);
                break;
            case 'h':
                usage();
                break; 
            default:
                usage();
        }
    }

    if(attachment != NULL) {

        CMimeMessage_T *message = cmime_message_new();
        CMimePart_T *part = cmime_part_new();
        
        // set the sender of the message
        cmime_message_set_sender(message,from);

        // add an recipient, this can also be done with cmime_message_add_recipient_to
        cmime_message_add_recipient(message, to, CMIME_ADDRESS_TYPE_TO);

        // set subject
        cmime_message_set_subject(message, "This is an exmaple");

{'fraction_non_alphanumeric': 0.1413427561837456, 'fraction_numerical': 0.0005436259853220984, 'mean_word_length': 2.1002527379949454, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '4220380', 'n_tokens_mistral': 1117, 'n_tokens_neox': 1066, 'n_words': 312}