-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththash.h
More file actions
38 lines (31 loc) · 769 Bytes
/
thash.h
File metadata and controls
38 lines (31 loc) · 769 Bytes
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
/* OLARU Gabriel-312CB */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <time.h>
#include "functii-LDI.h"
#ifndef _TAB_HASH_
#define _TAB_HASH_
typedef int (*TFElem)(void*); /* functie prelucrare element */
typedef int (*TFCmp)(void*, char*); /* functie de comparare doua elemente */
typedef void (*TFF)(void*,FILE*); /* functie afisare/eliberare un element */
typedef void (*TF)(void*);
typedef int (*TFHash)(char*,int);
typedef struct
{
int M;
TFHash fh;
TLDI *v;
} TH;
typedef struct
{
char* nume;
char* ip;
} TSite;
/* functii tabela hash */
TH* IniTH(int M, TFHash fh);
int InsTH(TH*a, void*ae, TFCmp f);
int ExistaTH(TH *h, char* ae, TFCmp fcmp, int M);
void DistrTH(TH *aa);
#endif