<commit_before>#include <err.h>
#include <stdlib.h>
#include <string.h>

#include "mem_io_cl_params.h"
#include "mem_io_cl_params_aux.h"

#define MAX_CL_OPT_LEN 128
#define MAX_CL_LINE_LEN 1024

void initCL(Params *params) {
	int len;
	len = strlen("localhost");
	if (!(params->host = (char *) calloc(len + 1, sizeof(char))))
		errx(EXIT_CL_ALLOC_FAIL, "can not allocate host field");
	strncpy(params->host, "localhost", len + 1);
	params->port = 6379;
	params->timeout = 2;
	len = strlen("foobared");
	if (!(params->password = (char *) calloc(len + 1, sizeof(char))))
		errx(EXIT_CL_ALLOC_FAIL, "can not allocate password field");
	strncpy(params->password, "<PASSWORD>", len + 1);
	len = strlen("default");
	if (!(params->mem_io_id = (char *) calloc(len + 1, sizeof(char))))
		errx(EXIT_CL_ALLOC_FAIL, "can not allocate mem_io_id field");
	strncpy(params->mem_io_id, "default", len + 1);
	len = strlen("/usr/local/software/redis/3.0.7/bin/redis-server");
	if (!(params->redis_path = (char *) calloc(len + 1, sizeof(char))))
		errx(EXIT_CL_ALLOC_FAIL, "can not allocate redis_path field");
	strncpy(params->redis_path, "/usr/local/software/redis/3.0.7/bin/redis-server", len + 1);
	len = strlen("/home/lucg5005/redis.conf");
	if (!(params->redis_conf = (char *) calloc(len + 1, sizeof(char))))
		errx(EXIT_CL_ALLOC_FAIL, "can not allocate redis_conf field");
	strncpy(params->redis_conf, "/home/lucg5005/redis.conf", len + 1);
	len = strlen(".mem_io.conf");
	if (!(params->mem_io_conf = (char *) calloc(len + 1, sizeof(char))))
		errx(EXIT_CL_ALLOC_FAIL, "can not allocate mem_io_conf field");
	strncpy(params->mem_io_conf, ".mem_io.conf", len + 1);
	params->channel_id = -1;
	params->nr_channels = -1;
	params->verbose = false;
	params->force = false;
}

void parseCL(Params *params, int *argc, char **argv[]) {
	char *argv_str;
	int i = 1;<commit_msg>Changed default password, mem_io ID<commit_after>#include <err.h>
#include <stdlib.h>
#include <string.h>

#include "mem_io_cl_params.h"
#include "mem_io_cl_params_aux.h"

#define MAX_CL_OPT_LEN 128
#define MAX_CL_LINE_LEN 1024

void initCL(Params *params) {
	int len;
	len = strlen("localhost");
	if (!(params->host = (char *) calloc(len + 1, sizeof(char))))
		errx(EXIT_CL_ALLOC_FAIL, "can not allocate host field");
	strncpy(params->host, "localhost", len + 1);
	params->port = 6379;
	params->timeout = 2;
	len = strlen("");
	if (!(params->password = (char *) calloc(len + 1, sizeof(char))))
		errx(EXIT_CL_ALLOC_FAIL, "can not allocate password field");
	strncpy(params->password, "", len + 1);
	len = strlen("");
	if (!(params->mem_io_id = (char *) calloc(len + 1, sizeof(char))))
		errx(EXIT_CL_ALLOC_FAIL, "can not allocate mem_io_id field");
	strncpy(params->mem_io_id, "", len + 1);
	len = strlen("/usr/local/software/redis/3.0.7/bin/redis-server");
	if (!(params->redis_path = (char *) calloc(len + 1, sizeof(char))))
		errx(EXIT_CL_ALLOC_FAIL, "can not allocate redis_path field");
	strncpy(params->redis_path, "/usr/local/software/redis/3.0.7/bin/redis-server", len + 1);
	len = strlen("/home/lucg5005/redis.conf");
	if (!(params->redis_conf = (char *) calloc(len + 1, sizeof(char))))
		errx(EXIT_CL_ALLOC_FAIL, "can not allocate redis_conf field");
	strncpy(params->redis_conf, "/home/lucg5005/redis.conf", len + 1);
	len = strlen(".mem_io.conf");
	if (!(params->mem_io_conf = (char *) calloc(len + 1, sizeof(char))))
		errx(EXIT_CL_ALLOC_FAIL, "can not allocate mem_io_conf field");
	strncpy(params->mem_io_conf, ".mem_io.conf", len + 1);
	params->channel_id = -1;
	params->nr_channels = -1;
	params->verbose = false;
	params->force = false;
}

void parseCL(Params *params, int *argc, char **argv[]) {
	char *argv_str;
	int i = 1;
{'fraction_non_alphanumeric': 0.1836127636560303, 'fraction_numerical': 0.022174148188209845, 'mean_word_length': 5.280135823429542, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 46, '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': '884358', 'n_tokens_mistral': 1489, 'n_tokens_neox': 1425, 'n_words': 307}