<commit_before>/*
 * Copyright © 2009 CNRS
 * Copyright © 2009-2010 INRIA
 * Copyright © 2009 Université Bordeaux 1
 * Copyright © 2011 Cisco Systems, Inc.  All rights reserved.
 * See COPYING in top-level directory.
 */

/* The configuration file */

#ifndef HWLOC_DEBUG_H
#define HWLOC_DEBUG_H

#include <private/autogen/config.h>

#ifdef HWLOC_DEBUG
#include <stdarg.h>
#include <stdio.h>
#endif

static inline void hwloc_debug(const char *s __hwloc_attribute_unused, ...)
{
#ifdef HWLOC_DEBUG
    va_list ap;

    va_start(s, ap);
    vfprintf(stderr, s, ap);
    va_end(ap);
#endif
}

#ifdef HWLOC_DEBUG
#define hwloc_debug_bitmap(fmt, bitmap) do { \
  char *s= hwloc_bitmap_printf_value(bitmap); \
  fprintf(stderr, fmt, s); \
  free(s); \
} while (0)
#define hwloc_debug_1arg_bitmap(fmt, arg1, bitmap) do { \
  char *s= hwloc_bitmap_printf_value(bitmap); \
  fprintf(stderr, fmt, arg1, s); \
  free(s); \
} while (0)
#define hwloc_debug_2args_bitmap(fmt, arg1, arg2, bitmap) do { \
  char *s= hwloc_bitmap_printf_value(bitmap); \
  fprintf(stderr, fmt, arg1, arg2, s); \<commit_msg>Fix va_start invokation in hwloc_debug  <commit_after>/*
 * Copyright © 2009 CNRS
 * Copyright © 2009-2010 INRIA
 * Copyright © 2009 Univers<NAME> 1
 * Copyright © 2011 Cisco Systems, Inc.  All rights reserved.
 * See COPYING in top-level directory.
 */

/* The configuration file */

#ifndef HWLOC_DEBUG_H
#define HWLOC_DEBUG_H

#include <private/autogen/config.h>

#ifdef HWLOC_DEBUG
#include <stdarg.h>
#include <stdio.h>
#endif

static inline void hwloc_debug(const char *s __hwloc_attribute_unused, ...)
{
#ifdef HWLOC_DEBUG
    va_list ap;

    va_start(ap, s);
    vfprintf(stderr, s, ap);
    va_end(ap);
#endif
}

#ifdef HWLOC_DEBUG
#define hwloc_debug_bitmap(fmt, bitmap) do { \
  char *s= hwloc_bitmap_printf_value(bitmap); \
  fprintf(stderr, fmt, s); \
  free(s); \
} while (0)
#define hwloc_debug_1arg_bitmap(fmt, arg1, bitmap) do { \
  char *s= hwloc_bitmap_printf_value(bitmap); \
  fprintf(stderr, fmt, arg1, s); \
  free(s); \
} while (0)
#define hwloc_debug_2args_bitmap(fmt, arg1, arg2, bitmap) do { \
  char *s= hwloc_bitmap_printf_value(bitmap); \
  fprintf(stderr, fmt, arg1, arg2, s); \
{'fraction_non_alphanumeric': 0.13096862210095497, 'fraction_numerical': 0.02819463392451114, 'mean_word_length': 4.238095238095238, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, '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': '2450973', 'n_tokens_mistral': 876, 'n_tokens_neox': 840, 'n_words': 218}