<commit_before>/*
 * Threaded test program for CUPS.
 *
 * Copyright © 2012-2019 by Apple Inc.
 *
 * Licensed under Apache License v2.0.  See the file "LICENSE" for more
 * information.
 */

/*
 * Include necessary headers...
 */

#include <stdio.h>
#include <errno.h>
#include <cups/cups.h>
#include <cups/thread-private.h>


/*
 * Local functions...
 */

static int	enum_dests_cb(void *_name, unsigned flags, cups_dest_t *dest);
static void	*run_query(cups_dest_t *dest);
static void	show_supported(http_t *http, cups_dest_t *dest, cups_dinfo_t *dinfo, const char *option, const char *value);


/*
 * 'main()' - Main entry.
 */

int					/* O - Exit status */
main(int  argc,				/* I - Number of command-line arguments */
     char *argv[])			/* I - Command-line arguments */
{
 /*
  * Go through all the available destinations to find the requested one...
  */

  (void)argc;

  cupsEnumDests(CUPS_DEST_FLAGS_NONE, -1, NULL, 0, 0, enum_dests_cb, argv[1]);

  return (0);
}


/*
 * 'enum_dests_cb()' - Destination enumeration function...
 */

static int				/* O - 1 to continue, 0 to stop */
enum_dests_cb(void        *_name,	/* I - Printer name, if any */
              unsigned    flags,	/* I - Enumeration flags */
              cups_dest_t *dest)	/* I - Found destination */
{
  const char		*name = (const char *)_name;
					/* Printer name */
  cups_dest_t		*cdest;		/* Copied destination */


 /*
  * If a name was specified, compare it...<commit_msg>More compiler warnings.<commit_after>/*
 * Threaded test program for CUPS.
 *
 * Copyright © 2012-2019 by Apple Inc.
 *
 * Licensed under Apache License v2.0.  See the file "LICENSE" for more
 * information.
 */

/*
 * Include necessary headers...
 */

#include <stdio.h>
#include <errno.h>
#include <cups/cups.h>
#include <cups/thread-private.h>


/*
 * Local functions...
 */

static int	enum_dests_cb(void *_name, unsigned flags, cups_dest_t *dest);
static void	*run_query(cups_dest_t *dest);
static void	show_supported(http_t *http, cups_dest_t *dest, cups_dinfo_t *dinfo, const char *option, const char *value);


/*
 * 'main()' - Main entry.
 */

int					/* O - Exit status */
main(int  argc,				/* I - Number of command-line arguments */
     char *argv[])			/* I - Command-line arguments */
{
 /*
  * Go through all the available destinations to find the requested one...
  */

  (void)argc;

  cupsEnumDests(CUPS_DEST_FLAGS_NONE, -1, NULL, 0, 0, enum_dests_cb, argv[1]);

  return (0);
}


/*
 * 'enum_dests_cb()' - Destination enumeration function...
 */

static int				/* O - 1 to continue, 0 to stop */
enum_dests_cb(void        *_name,	/* I - Printer name, if any */
              unsigned    flags,	/* I - Enumeration flags */
              cups_dest_t *dest)	/* I - Found destination */
{
  const char		*name = (const char *)_name;
					/* Printer name */
  cups_dest_t		*cdest;		/* Copied destination */


  (void)flags;

 /*
  * If a name was specified, compare it...
{'fraction_non_alphanumeric': 0.14276002719238612, 'fraction_numerical': 0.011556764106050306, 'mean_word_length': 2.715909090909091, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '4181699', 'n_tokens_mistral': 1089, 'n_tokens_neox': 1017, 'n_words': 306}