<commit_before>/*
 * File.h
 *
 *  Created on: 2016年9月22日
 *      Author: xzl
 */

#ifndef SRC_UTIL_FILE_H_
#define SRC_UTIL_FILE_H_

#include <stdio.h>
#include <stdlib.h>

#if defined(_WIN32)
#include <WinSock2.h>   
#pragma comment (lib,"WS2_32")
#endif // WIN32
#include <stdio.h>

#if defined(_WIN32)
#ifndef PATH_MAX
#define PATH_MAX 256
#endif // !PATH_MAX

struct dirent{
	long d_ino;              /* inode number*/
	off_t d_off;             /* offset to this dirent*/
	unsigned short d_reclen; /* length of this d_name*/
	unsigned char d_type;    /* the type of d_name*/
	char d_name[1];          /* file name (null-terminated)*/
};
typedef struct _dirdesc {
	int     dd_fd;      /** file descriptor associated with directory */
	long    dd_loc;     /** offset in current buffer */<commit_msg>PATH_MAX在win下设置为1024<commit_after>/*
 * File.h
 *
 *  Created on: 2016年9月22日
 *      Author: xzl
 */

#ifndef SRC_UTIL_FILE_H_
#define SRC_UTIL_FILE_H_

#include <stdio.h>
#include <stdlib.h>
#if defined(__linux__)
#include <limits.h>
#endif

#if defined(_WIN32)
#include <WinSock2.h>   
#pragma comment (lib,"WS2_32")
#endif // WIN32

#if defined(_WIN32)
#ifndef PATH_MAX
#define PATH_MAX 1024
#endif // !PATH_MAX

struct dirent{
	long d_ino;              /* inode number*/
	off_t d_off;             /* offset to this dirent*/
	unsigned short d_reclen; /* length of this d_name*/
	unsigned char d_type;    /* the type of d_name*/
	char d_name[1];          /* file name (null-terminated)*/
};
typedef struct _dirdesc {
	int     dd_fd;      /** file descriptor associated with directory */
	long    dd_loc;     /** offset in current buffer */
{'fraction_non_alphanumeric': 0.12294583079732198, 'fraction_numerical': 0.028606208155812538, 'mean_word_length': 2.9902912621359223, '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': '7508822', 'n_tokens_mistral': 645, 'n_tokens_neox': 597, 'n_words': 167}