<commit_before>/*
 * Copyright © 2011 INRIA.  All rights reserved.
 * See COPYING in top-level directory.
 */

#include <private/autogen/config.h>
#include <hwloc.h>

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

static void usage(char *name, FILE *where)
{
  fprintf (where, "Usage: %s [options] <output>.xml <input1>.xml <input2>.xml ...\n", name);
  fprintf (where, "Options:\n");
  fprintf (where, "  -v --verbose   Show verbose messages\n");
}

int main(int argc, char *argv[])
{
  hwloc_topology_t topology;
  char *callname;
  char *output;
  int verbose = 0;
  int opt;
  int i;

  callname = strrchr(argv[0], '/');
  if (!callname)
    callname = argv[0];
  else
    callname++;
  argc--;
  argv++;

  while (argc >= 1) {
    opt = 0;
    if (!strcmp(argv[0], "-v") || !strcmp(argv[0], "--verbose")) {
      verbose++;
    } else if (!strcmp(argv[0], "--")) {
      argc--;
      argv++;
      break;
    } else if (*argv[0] == '-') {
      fprintf(stderr, "Unrecognized option: %s\n", argv[0]);
      usage(callname, stderr);
      exit(EXIT_FAILURE);
    } else
      break;
    argc -= opt+1;
    argv += opt+1;
  }

  if (!argc) {
    fprintf(stderr, "Missing output file name\n");
    usage(callname, stderr);
    exit(EXIT_FAILURE);
  }
  output = argv[0];
  argc--;
  argv++;<commit_msg>hwloc-assembler: add -h/--help<commit_after>/*
 * Copyright © 2011 INRIA.  All rights reserved.
 * See COPYING in top-level directory.
 */

#include <private/autogen/config.h>
#include <hwloc.h>

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

static void usage(char *name, FILE *where)
{
  fprintf (where, "Usage: %s [options] <output>.xml <input1>.xml <input2>.xml ...\n", name);
  fprintf (where, "Options:\n");
  fprintf (where, "  -v --verbose   Show verbose messages\n");
}

int main(int argc, char *argv[])
{
  hwloc_topology_t topology;
  char *callname;
  char *output;
  int verbose = 0;
  int opt;
  int i;

  callname = strrchr(argv[0], '/');
  if (!callname)
    callname = argv[0];
  else
    callname++;
  argc--;
  argv++;

  while (argc >= 1) {
    opt = 0;
    if (!strcmp(argv[0], "-v") || !strcmp(argv[0], "--verbose")) {
      verbose++;
    } else if (!strcmp(argv[0], "-h") || !strcmp(argv[0], "--help")) {
      usage(callname, stdout);
      exit(EXIT_SUCCESS);
    } else if (!strcmp(argv[0], "--")) {
      argc--;
      argv++;
      break;
    } else if (*argv[0] == '-') {
      fprintf(stderr, "Unrecognized option: %s\n", argv[0]);
      usage(callname, stderr);
      exit(EXIT_FAILURE);
    } else
      break;
    argc -= opt+1;
    argv += opt+1;
  }

  if (!argc) {
    fprintf(stderr, "Missing output file name\n");
    usage(callname, stderr);
    exit(EXIT_FAILURE);
  }
  output = argv[0];
  argc--;
  argv++;
{'fraction_non_alphanumeric': 0.1957538682979489, 'fraction_numerical': 0.01439366678661389, 'mean_word_length': 2.7926330150068215, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '480385', 'n_tokens_mistral': 1043, 'n_tokens_neox': 1048, 'n_words': 260}