Blame src/win32/dir.h

Packit Service 20376f
/*
Packit Service 20376f
 * Copyright (C) the libgit2 contributors. All rights reserved.
Packit Service 20376f
 *
Packit Service 20376f
 * This file is part of libgit2, distributed under the GNU GPL v2 with
Packit Service 20376f
 * a Linking Exception. For full terms see the included COPYING file.
Packit Service 20376f
 */
Packit Service 20376f
#ifndef INCLUDE_dir_h__
Packit Service 20376f
#define INCLUDE_dir_h__
Packit Service 20376f
Packit Service 20376f
#include "common.h"
Packit Service 20376f
#include "w32_util.h"
Packit Service 20376f
Packit Service 20376f
struct git__dirent {
Packit Service 20376f
	int d_ino;
Packit Service 20376f
	git_win32_utf8_path d_name;
Packit Service 20376f
};
Packit Service 20376f
Packit Service 20376f
typedef struct {
Packit Service 20376f
	HANDLE h;
Packit Service 20376f
	WIN32_FIND_DATAW f;
Packit Service 20376f
	struct git__dirent entry;
Packit Service 20376f
	int first;
Packit Service 20376f
	char dir[GIT_FLEX_ARRAY];
Packit Service 20376f
} git__DIR;
Packit Service 20376f
Packit Service 20376f
extern git__DIR *git__opendir(const char *);
Packit Service 20376f
extern struct git__dirent *git__readdir(git__DIR *);
Packit Service 20376f
extern int git__readdir_ext(
Packit Service 20376f
	git__DIR *, struct git__dirent *, struct git__dirent **, int *);
Packit Service 20376f
extern void git__rewinddir(git__DIR *);
Packit Service 20376f
extern int git__closedir(git__DIR *);
Packit Service 20376f
Packit Service 20376f
# ifndef GIT__WIN32_NO_WRAP_DIR
Packit Service 20376f
#	define dirent git__dirent
Packit Service 20376f
#	define DIR git__DIR
Packit Service 20376f
#	define opendir	git__opendir
Packit Service 20376f
#	define readdir	git__readdir
Packit Service 20376f
#   define readdir_r(d,e,r) git__readdir_ext((d),(e),(r),NULL)
Packit Service 20376f
#	define rewinddir git__rewinddir
Packit Service 20376f
#	define closedir git__closedir
Packit Service 20376f
# endif
Packit Service 20376f
Packit Service 20376f
#endif /* INCLUDE_dir_h__ */