<commit_before>#include <getopt.h>
#include "cli.h"

const char *cli_info_purpose = "A flexible command-line interface for the FSEvents API";
const char *cli_info_usage = "Usage: fsevent_watch [OPTIONS]... [PATHS]...";
const char *cli_info_help[] = {
  "  -h, --help                you're looking at it",
  "  -V, --version             print version number and exit",
  "  -s, --since-when=EventID  fire historical events since ID",
  "  -l, --latency=seconds     latency period (default='0.5')",
  "  -n, --no-defer            enable no-defer latency modifier",
  "  -r, --watch-root          watch for when the root path has changed",
  "  -i, --ignore-self         ignore current process",
  "  -F, --file-events         provide file level event data",
  "  -f, --format=name         output format (classic, niw)",
  0
};

static void default_args (struct cli_info *args_info)
{
  args_info->since_when_arg = kFSEventStreamEventIdSinceNow;
  args_info->latency_arg = 0.5;
  args_info->no_defer_flag = false;
  args_info->watch_root_flag = false;
  args_info->ignore_self_flag = false;
  args_info->file_events_flag = false;
  args_info->format_arg = kFSEventWatchOutputFormatClassic;
}

static void cli_parser_release (struct cli_info *args_info)
{
  unsigned int i;
  
  for (i=0; i < args_info->inputs_num; ++i)
    free(args_info->inputs[i]);
  
  if (args_info->inputs_num)
    free(args_info->inputs);
  
  args_info->inputs_num = 0;
}<commit_msg>comment out the help for ignore-self since, as its own process, this thing doesn't write to the filesystem and the option's availability is... odd.<commit_after>#include <getopt.h>
#include "cli.h"

const char *cli_info_purpose = "A flexible command-line interface for the FSEvents API";
const char *cli_info_usage = "Usage: fsevent_watch [OPTIONS]... [PATHS]...";
const char *cli_info_help[] = {
  "  -h, --help                you're looking at it",
  "  -V, --version             print version number and exit",
  "  -s, --since-when=EventID  fire historical events since ID",
  "  -l, --latency=seconds     latency period (default='0.5')",
  "  -n, --no-defer            enable no-defer latency modifier",
  "  -r, --watch-root          watch for when the root path has changed",
  // "  -i, --ignore-self         ignore current process",
  "  -F, --file-events         provide file level event data",
  "  -f, --format=name         output format (classic, niw)",
  0
};

static void default_args (struct cli_info *args_info)
{
  args_info->since_when_arg = kFSEventStreamEventIdSinceNow;
  args_info->latency_arg = 0.5;
  args_info->no_defer_flag = false;
  args_info->watch_root_flag = false;
  args_info->ignore_self_flag = false;
  args_info->file_events_flag = false;
  args_info->format_arg = kFSEventWatchOutputFormatClassic;
}

static void cli_parser_release (struct cli_info *args_info)
{
  unsigned int i;
  
  for (i=0; i < args_info->inputs_num; ++i)
    free(args_info->inputs[i]);
  
  if (args_info->inputs_num)
    free(args_info->inputs);
  
  args_info->inputs_num = 0;
}
{'fraction_non_alphanumeric': 0.12963570725303578, 'fraction_numerical': 0.004594683295044306, 'mean_word_length': 3.118918918918919, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 29, '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': '7107051', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1042, 'n_words': 273}