<commit_before>#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>

#include "options.h"
#include "log.h"

void parse_options(int argc, char **argv) {
    int ch;

    opts.follow_symlinks = 0;
    opts.recurse_dirs = 1;
    opts.casing = CASE_SENSITIVE_RETRY_INSENSITIVE;

    struct option longopts[] = {
        { "after", required_argument, NULL, 'A' },
        { "before", required_argument, NULL, 'B' },
        { "context", required_argument, NULL, 'C' },
        { "ackmate", no_argument, NULL, 0 },
        { "follow", no_argument, &(opts.follow_symlinks), 1 },
        { "nofollow", no_argument, &(opts.follow_symlinks), 0 },
        { "ignore-case", no_argument, NULL, 'i' },
        { "nosmart-case", no_argument, NULL, 0 },
        { "ackmate-dir-filter", required_argument, NULL, 0 },
        { NULL, 0, NULL, 0 }
    };

    int opt_index = 0;

    // XXX: this is nowhere near done
    while ((ch = getopt_long(argc, argv, "A:B:C:fi", longopts, &opt_index)) != -1) {
        switch (ch) {
            case 'A':
                opts.after = atoi(optarg);
                break;
            case 'B':
                opts.before = atoi(optarg);
                break;
            case 'C':
                opts.context = atoi(optarg);
                break;
            case 'f':
                opts.follow_symlinks = 1;
                break;
            case 'i':
                opts.casing = CASE_INSENSITIVE;
                break;
            case 0: // Long option
                // Continue to usage if we don't recognize the option
                if (longopts[opt_index].flag != 0) {
                    break;
                }
                log_err("Unknown option %s");
            default:
                usage();
                exit(1);
        }
    }
    argc -= optind;
    argv += optind;
};

void usage() {
    // I am a terrible person
    printf("Usage: omg I hate writing docs just look at the source :P\n");
};
<commit_msg>Remove silly semicolons.<commit_after>#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>

#include "options.h"
#include "log.h"

void parse_options(int argc, char **argv) {
    int ch;

    opts.follow_symlinks = 0;
    opts.recurse_dirs = 1;
    opts.casing = CASE_SENSITIVE_RETRY_INSENSITIVE;

    struct option longopts[] = {
        { "after", required_argument, NULL, 'A' },
        { "before", required_argument, NULL, 'B' },
        { "context", required_argument, NULL, 'C' },
        { "ackmate", no_argument, NULL, 0 },
        { "follow", no_argument, &(opts.follow_symlinks), 1 },
        { "nofollow", no_argument, &(opts.follow_symlinks), 0 },
        { "ignore-case", no_argument, NULL, 'i' },
        { "nosmart-case", no_argument, NULL, 0 },
        { "ackmate-dir-filter", required_argument, NULL, 0 },
        { NULL, 0, NULL, 0 }
    };

    int opt_index = 0;

    // XXX: this is nowhere near done
    while ((ch = getopt_long(argc, argv, "A:B:C:fi", longopts, &opt_index)) != -1) {
        switch (ch) {
            case 'A':
                opts.after = atoi(optarg);
                break;
            case 'B':
                opts.before = atoi(optarg);
                break;
            case 'C':
                opts.context = atoi(optarg);
                break;
            case 'f':
                opts.follow_symlinks = 1;
                break;
            case 'i':
                opts.casing = CASE_INSENSITIVE;
                break;
            case 0: // Long option
                // Continue to usage if we don't recognize the option
                if (longopts[opt_index].flag != 0) {
                    break;
                }
                log_err("Unknown option %s");
            default:
                usage();
                exit(1);
        }
    }
    argc -= optind;
    argv += optind;
}

void usage() {
    // I am a terrible person
    printf("Usage: omg I hate writing docs just look at the source :P\n");
}

{'fraction_non_alphanumeric': 0.13419257012888552, 'fraction_numerical': 0.0075815011372251705, 'mean_word_length': 1.6073781291172595, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2586425', 'n_tokens_mistral': 1289, 'n_tokens_neox': 1214, 'n_words': 314}