PHP 7.4.33
Preview: hashmap.h Size: 1.49 KB
/home/godevadmin/public_html/upload_images/home/000~ROOT~000/usr/include/ext2fs/hashmap.h

#ifndef HASHMAP_H
# define HASHMAP_H

# include <stdlib.h>
# include <stdint.h>

#ifndef __GNUC_PREREQ
#if defined(__GNUC__) && defined(__GNUC_MINOR__)
#define __GNUC_PREREQ(maj, min) \
	((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
#else
#define __GNUC_PREREQ(maj, min) 0
#endif
#endif

struct ext2fs_hashmap {
	uint32_t size;
	uint32_t(*hash)(const void *key, size_t len);
	void(*free)(void*);
	struct ext2fs_hashmap_entry *first;
	struct ext2fs_hashmap_entry *last;
	struct ext2fs_hashmap_entry {
		void *data;
		const void *key;
		size_t key_len;
		struct ext2fs_hashmap_entry *next;
		struct ext2fs_hashmap_entry *list_next;
		struct ext2fs_hashmap_entry *list_prev;
#if __GNUC_PREREQ (4, 8)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#endif
	} *entries[0];
#if __GNUC_PREREQ (4, 8)
#pragma GCC diagnostic pop
#endif
};

struct ext2fs_hashmap *ext2fs_hashmap_create(
				uint32_t(*hash_fct)(const void*, size_t),
				void(*free_fct)(void*), size_t size);
void ext2fs_hashmap_add(struct ext2fs_hashmap *h, void *data, const void *key,
			size_t key_len);
void *ext2fs_hashmap_lookup(struct ext2fs_hashmap *h, const void *key,
			    size_t key_len);
void *ext2fs_hashmap_iter_in_order(struct ext2fs_hashmap *h,
				   struct ext2fs_hashmap_entry **it);
void ext2fs_hashmap_del(struct ext2fs_hashmap *h,
			struct ext2fs_hashmap_entry *e);
void ext2fs_hashmap_free(struct ext2fs_hashmap *h);

uint32_t ext2fs_djb2_hash(const void *str, size_t size);

#endif /* !HASHMAP_H */

Directory Contents

Dirs: 0 × Files: 12

Name Size Perms Modified Actions
21.63 KB lrw-r--r-- 2020-03-21 04:24:04
Edit Download
70.71 KB lrw-r--r-- 2025-06-03 02:09:55
Edit Download
11.63 KB lrw-r--r-- 2025-06-03 02:10:08
Edit Download
2.58 KB lrw-r--r-- 2020-03-21 04:24:04
Edit Download
41.09 KB lrw-r--r-- 2020-03-21 04:24:04
Edit Download
5.26 KB lrw-r--r-- 2020-03-21 04:24:04
Edit Download
4.11 KB lrw-r--r-- 2025-06-03 02:10:08
Edit Download
1.22 KB lrw-r--r-- 2025-06-03 02:10:18
Edit Download
4.45 KB lrw-r--r-- 2020-03-21 04:24:04
Edit Download
1.49 KB lrw-r--r-- 2025-06-03 02:09:55
Edit Download
2.53 KB lrw-r--r-- 2020-03-21 04:24:04
Edit Download
8.66 KB lrw-r--r-- 2020-03-21 04:24:04
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).