-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgheader.h
More file actions
42 lines (34 loc) · 1.32 KB
/
gheader.h
File metadata and controls
42 lines (34 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef GHM_DEFS_H
#define GHM_DEFS_H
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
// typedef hash_map_struct
typedef struct hash_map
{
unsigned long _IDX__;
void *_Key__;
void *_Val__;
unsigned int _Type__;
struct hash_map *_LST_Prv__; // the previus item in the list
struct hash_map *_LST_Nxt__; // next hashed item in the list
} _H_map_;
// def types
// dwriter !
int get_data_size(const char *data);
int dwriter(char *data, int fd);
// pcalls aka program calls !
// h_packe functions ! aka helper packe ! lol
int _memRp__(void *_mem_ARA0__, void *_mem_ARA1__, size_t _R_Size__);
int _dmtc_Qmark__(const char *_FSide__, const char *_SSide__);
char *_data_DUP__(const char *_Or_d);
_H_map_ *_gen_HM_pair__(void);
int initem(_H_map_ **_Hm_root__, void *_Key__, size_t _Key_size__, void *_Val__, size_t _Val_size__);
unsigned long _generate_hash_idx__(void *_Key__, size_t _Key_size__);
_H_map_ *fetch_by_key(_H_map_ *_Hm_root__, void *_Key__, size_t _Key_size__);
_H_map_ *fetch_pair(_H_map_ *_Hm_root__, void *_Key__, size_t _Key_size__);
_H_map_ **fetch_by_value(_H_map_ *_Hm_root__, void *_Val__, size_t _Val_size__, int *_Result_count__);
_H_map_ *fetch_by_id(_H_map_ *_Hm_root__, unsigned long _Target_idx__);
void _free_node__(_H_map_ *_Node__);
void _free_hash_map__(_H_map_ *_Hm_root__);
#endif