<commit_before>/* Copyright 2013-2017 <NAME> <<EMAIL>>.
 * Licensed under the 2-clause BSD license, see LICENSE for details. */

#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>

#include "error.h"
#include "fileutil.h"
#include "go.h"
#include "proc.h"
#include "queue.h"
#include "strutil.h"

#define PROGNAME "procwait"

#ifndef VERSION
#define VERSION "unknown (" __DATE__ ")"
#endif

#define LICENSE_STR "Copyright 2013-2015 <NAME> "\
		    "<<EMAIL>>.\n"\
		    "Licensed under the 2-clause BSD license."

#define DEFAULT_SLEEP_SEC 1
#define DEFAULT_SLEEP_NSEC 0

struct options {
	int action;		/* selected action */
	struct timespec sleep;	/* time to sleep between polls (PID stats) */
};

/* available actions */
enum {
	A_PROCWAIT,
	A_VERSION,
	A_HELP<commit_msg>Update copyright year in program output<commit_after>/* Copyright 2013-2017 <NAME> <<EMAIL>>.
 * Licensed under the 2-clause BSD license, see LICENSE for details. */

#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>

#include "error.h"
#include "fileutil.h"
#include "go.h"
#include "proc.h"
#include "queue.h"
#include "strutil.h"

#define PROGNAME "procwait"

#ifndef VERSION
#define VERSION "unknown (" __DATE__ ")"
#endif

#define LICENSE_STR "Copyright 2013-2017 <NAME> "\
		    "<<EMAIL>>.\n"\
		    "Licensed under the 2-clause BSD license."

#define DEFAULT_SLEEP_SEC 1
#define DEFAULT_SLEEP_NSEC 0

struct options {
	int action;		/* selected action */
	struct timespec sleep;	/* time to sleep between polls (PID stats) */
};

/* available actions */
enum {
	A_PROCWAIT,
	A_VERSION,
	A_HELP
{'fraction_non_alphanumeric': 0.14419695193434937, 'fraction_numerical': 0.023446658851113716, 'mean_word_length': 4.236196319018405, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '2670987', 'n_tokens_mistral': 668, 'n_tokens_neox': 617, 'n_words': 182}