<commit_before>/**
 * File  : filesystem_core.h
 * Author: <NAME>
 * Date  : 2017-07-22
 *
 * Copyright (c) 2017 <NAME>.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef API_PROJECT_FS_CORE_INCLUDED
#define API_PROJECT_FS_CORE_INCLUDED

#define MAX_FILESYSTEM_DEPTH 255
#define MAX_DIRECTORY_CHILDREN 1024

typedef union  fs_file_content_u fs_file_content_t;
typedef struct fs_file_s         fs_file_t;

union fs_file_content_u {
	fs_file_t* l_child;
	char* data;
};

struct fs_file_s {
	size_t hash;
	char* name;
	bool is_dir;
	unsigned short n_children;
	fs_file_content_t content;
	fs_file_t *parent, *l_sibling, *r_sibling;
};

fs_file_t** fs_table;
fs_file_t*  fs_root;
unsigned    fs_table_files;
size_t      fs_table_size;

/**
 * Initialize the hash table and create the root.
 * @post the hash table has been allocated in memory and the root has been created.
 */<commit_msg>Changed file count variable type to `size_t`.<commit_after>/**
 * File  : filesystem_core.h
 * Author: <NAME>
 * Date  : 2017-07-24
 *
 * Copyright (c) 2017 <NAME>.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef API_PROJECT_FS_CORE_INCLUDED
#define API_PROJECT_FS_CORE_INCLUDED

#define MAX_FILESYSTEM_DEPTH 255
#define MAX_DIRECTORY_CHILDREN 1024

typedef union  fs_file_content_u fs_file_content_t;
typedef struct fs_file_s         fs_file_t;

union fs_file_content_u {
	fs_file_t* l_child;
	char* data;
};

struct fs_file_s {
	size_t hash;
	char* name;
	bool is_dir;
	unsigned short n_children;
	fs_file_content_t content;
	fs_file_t *parent, *l_sibling, *r_sibling;
};

fs_file_t** fs_table;
fs_file_t*  fs_root;
size_t      fs_table_files;
size_t      fs_table_size;

/**
 * Initialize the hash table and create the root.
 * @post the hash table has been allocated in memory and the root has been created.
 */
{'fraction_non_alphanumeric': 0.07630098452883263, 'fraction_numerical': 0.01617440225035162, 'mean_word_length': 4.172727272727273, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4854131', 'n_tokens_mistral': 969, 'n_tokens_neox': 926, 'n_words': 328}